You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Full context dump for debugging — use when stuck or disoriented
4
+
---
5
+
6
+
## Context
7
+
8
+
- Session status: !`crosslink session status`
9
+
- Open issues: !`crosslink issue list -s open`
10
+
- Active locks: !`crosslink locks list 2>/dev/null`
11
+
- Current branch: !`git branch --show-current`
12
+
- Working tree: !`git status --short`
13
+
14
+
## Your task
15
+
16
+
You are stuck, confused, or need to re-orient. This skill dumps all available context so you can diagnose the problem. Run through each section and print the results.
17
+
18
+
### 1. Project grounding (same as /preflight)
19
+
20
+
Read core rules:
21
+
```
22
+
Read .crosslink/rules/global.md
23
+
```
24
+
25
+
Detect languages and read relevant rule files (check for `Cargo.toml`, `package.json`, `tsconfig.json`, `pyproject.toml`, `go.mod`, etc.).
26
+
27
+
Read project-specific rules:
28
+
```
29
+
Read .crosslink/rules/project.md
30
+
```
31
+
32
+
Read tracking rules based on current mode:
33
+
```bash
34
+
crosslink config get tracking_mode
35
+
```
36
+
Then read `.crosslink/rules/tracking-<mode>.md`.
37
+
38
+
### 2. Project tree scan
39
+
40
+
```bash
41
+
ls -1
42
+
```
43
+
44
+
Scan the project tree (max depth 3, max 50 entries) to ground yourself on actual paths.
45
+
46
+
### 3. Dependency versions
47
+
48
+
Read the primary manifest file to confirm actual dependency versions.
49
+
50
+
### 4. Session state
51
+
52
+
```bash
53
+
crosslink session status
54
+
```
55
+
56
+
What issue are you working on? What was the last action?
57
+
58
+
### 5. Active issue details
59
+
60
+
If working on an issue, get full details:
61
+
62
+
```bash
63
+
crosslink issue show <issue-id>
64
+
```
65
+
66
+
Review all comments, especially plan and decision comments.
67
+
68
+
### 6. Related issues and blockers
69
+
70
+
```bash
71
+
crosslink issue blocked
72
+
crosslink issue ready
73
+
```
74
+
75
+
Are there blocking dependencies? What's unblocked and available?
76
+
77
+
### 7. Lock state
78
+
79
+
```bash
80
+
crosslink locks list 2>/dev/null
81
+
```
82
+
83
+
Are any issues locked by other agents?
84
+
85
+
### 8. Recent interventions
86
+
87
+
Check if there have been recent hook blocks or driver redirects by reviewing recent issue comments.
88
+
89
+
### 9. Hook configuration
90
+
91
+
```bash
92
+
crosslink config show
93
+
```
94
+
95
+
What tracking mode is active? What commands are blocked/gated?
96
+
97
+
### 10. Git state
98
+
99
+
```bash
100
+
git status
101
+
git log --oneline -5
102
+
git diff --stat HEAD
103
+
```
104
+
105
+
What's the current branch state? Any uncommitted changes?
- Active tmux sessions: !`tmux list-sessions 2>/dev/null`
9
10
- Current worktrees: !`git worktree list`
10
11
11
12
## Your task
12
13
13
-
The user optionally provides a tmux session name (e.g. `feat-add-batch-retry`). If no session name is given, check **all** active `feat-*`tmux sessions and report a summary for each.
14
+
The user optionally provides an agent name (e.g. `crosslink-task-add-batch-retry` or `feat-add-batch-retry`). If no name is given, check **all** active feature agents (both containers and tmux sessions) and report a summary for each.
14
15
15
-
### 1. Identify sessions to check
16
+
### 1. Identify agents to check
16
17
17
-
- If the user provided a session name, use that single session.
18
-
- If no session name was provided, list all tmux sessions whose names start with `feat-`: `tmux list-sessions -F '#{session_name}' 2>/dev/null | grep '^feat-'`
19
-
- If no `feat-*` sessions exist, report "No active feature agent sessions found."
18
+
#### a. Find container-based agents
20
19
21
-
### 2. For each session, perform these checks:
20
+
1. Get this repo's worktree paths: `git worktree list --porcelain | grep '^worktree ' | sed 's/^worktree //'`
21
+
2. List crosslink containers: `docker ps -a --filter label=crosslink-agent=true --format '{{.Names}} {{.Status}} {{.Label "crosslink-task"}}' 2>/dev/null`
22
+
3. Match containers to this repo: for each container, check if its `crosslink-task` label value matches any of this repo's worktree directory names (the last path component)
23
+
4. If the user provided a name starting with `crosslink-task-`, filter to that specific container
22
24
23
-
#### a. Check the sentinel file
25
+
#### b. Find tmux-based agents
24
26
25
-
Find the worktree path for this session by checking `git worktree list` and matching the session name to a feature branch. The session name `feat-<slug>` corresponds to branch `feature/<slug>`.
Possible states: `running`, `exited` (check exit code), `restarting`, `paused`.
52
+
53
+
##### c. Capture recent output
54
+
55
+
```bash
56
+
docker logs --tail 80 <container-name>2>&1
57
+
```
58
+
59
+
##### d. Analyze state
60
+
61
+
-**Working**: Container status is `running`, no sentinel file, recent tool calls visible in logs
62
+
-**Idle**: Container is `running` but no recent output changes — may be thinking or waiting for API
63
+
-**Error**: Container `exited` with non-zero exit code, or error messages in recent logs
64
+
-**Done**: Sentinel file says `DONE`, or container exited with code 0
65
+
-**CI Failed**: Sentinel file says `CI_FAILED`
66
+
67
+
#### For tmux-based agents:
68
+
69
+
##### a. Check the sentinel file
70
+
71
+
Get the worktree path for this session from tmux: `tmux display-message -t <session-name> -p '#{session_path}'`. Alternatively, match the session name to a feature branch in `git worktree list`.
26
72
27
73
- Check if `.kickoff-status` exists in the worktree: `cat <worktree-path>/.kickoff-status 2>/dev/null`
28
74
- If it contains `DONE`, mark this session as finished.
29
75
30
-
#### b. Capture the terminal state
76
+
#####b. Capture the terminal state
31
77
32
78
```bash
33
79
tmux capture-pane -t <session-name> -p -S -80
34
80
```
35
81
36
82
This captures the last ~80 lines of visible output.
37
83
38
-
#### c. Analyze state
84
+
#####c. Analyze state
39
85
40
86
Read the captured output and determine the agent's current state:
41
87
@@ -46,38 +92,49 @@ Read the captured output and determine the agent's current state:
46
92
47
93
### 3. Report
48
94
49
-
When checking **multiple sessions**, use a compact table format:
95
+
When checking **multiple agents**, use a compact table format with a backend indicator:
50
96
51
97
```
52
98
Feature Agents:
53
99
54
-
feat-add-retry Working Implementing retry logic in _sources.py
55
-
feat-fix-lens-bug Done All changes committed and reviewed
56
-
feat-new-cli-cmd Waiting Asking about CLI argument format
100
+
crosslink-task-add-retry [container] Working Implementing retry logic in _sources.py
101
+
crosslink-task-fix-lens [container] Done All changes committed and reviewed
102
+
feat-new-cli-cmd [tmux] Waiting Asking about CLI argument format
57
103
```
58
104
59
-
When checking a **single session**, use the detailed format:
105
+
When checking a **single agent**, use the detailed format:
60
106
61
107
```
62
-
Session: <name>
63
-
Status: <Working | Waiting | Done | Error>
108
+
Agent: <name>
109
+
Backend: <container|tmux>
110
+
Status: <Working | Idle | Waiting | Done | Error>
64
111
65
112
<2-3 sentence summary of what the agent is currently doing or has accomplished>
-**If working**: "Check back later, or attach directly: `tmux attach -t <name>`"
73
132
-**If waiting for input**: Read the question, and ask the user what to answer. If the user provides an answer, send it: `tmux send-keys -t <session-name> "<response>" Enter`
description: Commit changes and auto-document the result on the active crosslink issue
4
+
---
5
+
6
+
## Context
7
+
8
+
- Working tree status: !`git status --short`
9
+
- Current branch: !`git branch --show-current`
10
+
- Active session: !`crosslink session status 2>/dev/null`
11
+
12
+
## Your task
13
+
14
+
The user wants to commit their current changes. You will create a well-formed git commit AND automatically record a result comment on the active crosslink issue.
15
+
16
+
### 1. Review changes
17
+
18
+
Run `git diff --cached --stat` and `git diff --stat` to see staged and unstaged changes. If nothing is staged, stage the relevant files (ask the user if unclear which files to include). Never use `git add -A` blindly — stage specific files.
19
+
20
+
### 2. Write the commit message
21
+
22
+
- Summarize what changed and why (1-2 sentences)
23
+
- Follow conventional commit style if the project uses it
24
+
- Include the crosslink issue reference if an active issue exists (e.g. `[CL-5]`)
25
+
26
+
### 3. Create the commit
27
+
28
+
```bash
29
+
git commit -m "<message>"
30
+
```
31
+
32
+
### 4. Auto-document the result on the active crosslink issue
33
+
34
+
After a successful commit, check if there's an active crosslink session with an active issue:
35
+
36
+
```bash
37
+
crosslink session status
38
+
```
39
+
40
+
If an active issue exists, record the commit as a result comment:
41
+
42
+
```bash
43
+
crosslink issue comment <issue-id>"Committed: <first line of commit message> | Files: <shortstat summary>" --kind result
44
+
```
45
+
46
+
For example:
47
+
```bash
48
+
crosslink issue comment 5 "Committed: Add typed comment support to schema | Files: 14 files changed, 312 insertions(+), 48 deletions(-)" --kind result
49
+
```
50
+
51
+
If no active session or issue, skip the comment silently.
52
+
53
+
### 5. Show summary
54
+
55
+
Display:
56
+
- The commit hash and message
57
+
- Files changed summary
58
+
- Whether the result was recorded on a crosslink issue
59
+
60
+
## Constraints
61
+
62
+
- Never force-push or amend commits without explicit user request.
63
+
- Never use `git add -A` or `git add .` without confirming with the user.
64
+
- Always record the result comment after a successful commit when an active issue exists.
65
+
- If the commit fails (e.g. pre-commit hook), fix the issue and retry — do NOT record a result comment for failed commits.
0 commit comments