xtrm-tools 0.7.9 → 0.7.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.xtrm/skills/default/update-xt/SKILL.md +185 -0
- package/.xtrm/skills/default/using-nodes/SKILL.md +127 -43
- package/.xtrm/skills/default/using-specialists/SKILL.md +144 -54
- package/cli/dist/index.cjs +47 -43
- package/cli/dist/index.cjs.map +1 -1
- package/cli/package.json +1 -1
- package/package.json +1 -1
- package/packages/pi-extensions/package.json +1 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-xt
|
|
3
|
+
description: >
|
|
4
|
+
Update an xtrm-initialized project to match the current canonical install state.
|
|
5
|
+
Use this skill whenever the user asks to update, upgrade, repair, or re-sync xtrm
|
|
6
|
+
in a project — or when they say something like "xt is out of date", "skills aren't
|
|
7
|
+
loading", "hooks aren't firing", "the install looks wrong", or "I just pulled new
|
|
8
|
+
xtrm changes". Also triggers when the agent detects stale paths like
|
|
9
|
+
.claude/skills → active/claude (old structure) or .pi/settings.json pointing to
|
|
10
|
+
active/pi (old structure). Proactively suggest running this skill after any
|
|
11
|
+
xtrm-tools upgrade.
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# update-xt
|
|
15
|
+
|
|
16
|
+
Reconcile a project's xtrm installation against the current canonical state. Detect
|
|
17
|
+
drift, apply targeted fixes, verify everything is wired correctly.
|
|
18
|
+
|
|
19
|
+
## Canonical State (current)
|
|
20
|
+
|
|
21
|
+
This is what a correctly installed project looks like. Check each item.
|
|
22
|
+
|
|
23
|
+
### Skills wiring
|
|
24
|
+
|
|
25
|
+
| Check | Expected value |
|
|
26
|
+
|-------|----------------|
|
|
27
|
+
| `.claude/skills` symlink target | `../.xtrm/skills/active` |
|
|
28
|
+
| `.xtrm/skills/active/` | Flat directory of symlinks to `../default/<skill>` |
|
|
29
|
+
| `active/pi/` subdirectory | Must NOT exist (stale — old runtime split) |
|
|
30
|
+
| `active/claude/` subdirectory | Must NOT exist (stale — old runtime split) |
|
|
31
|
+
| `.pi/settings.json` `.skills` array | Must include `"../.xtrm/skills/active"` |
|
|
32
|
+
| `.pi/settings.json` `.skills` array | Must NOT include `"../.xtrm/skills/active/pi"` (old path) |
|
|
33
|
+
|
|
34
|
+
### Hooks wiring
|
|
35
|
+
|
|
36
|
+
| Check | Expected value |
|
|
37
|
+
|-------|----------------|
|
|
38
|
+
| `.claude/settings.json` or `~/.claude/settings.json` | Has `hooks` block with commands containing `/.xtrm/hooks/` paths |
|
|
39
|
+
| Hooks events covered | At minimum: `SessionStart`, `PreToolUse`, `PostToolUse`, `Stop` |
|
|
40
|
+
|
|
41
|
+
### Project bootstrap
|
|
42
|
+
|
|
43
|
+
| Check | Expected value |
|
|
44
|
+
|-------|----------------|
|
|
45
|
+
| `.beads/` exists | Yes |
|
|
46
|
+
| `CLAUDE.md` or `AGENTS.md` exists | Yes |
|
|
47
|
+
|
|
48
|
+
## Detection
|
|
49
|
+
|
|
50
|
+
Run these in order. Report what passes and what drifts.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# 1. High-level status — shows pending syncs
|
|
54
|
+
xt status
|
|
55
|
+
|
|
56
|
+
# 2. Claude hook wiring
|
|
57
|
+
xt claude status
|
|
58
|
+
|
|
59
|
+
# 3. Skills symlink
|
|
60
|
+
readlink .claude/skills
|
|
61
|
+
# Expected: ../.xtrm/skills/active
|
|
62
|
+
# Stale: ../.xtrm/skills/active/claude
|
|
63
|
+
|
|
64
|
+
# 4. Stale runtime subdirs (should return nothing)
|
|
65
|
+
ls .xtrm/skills/active/pi 2>/dev/null && echo "STALE: active/pi exists"
|
|
66
|
+
ls .xtrm/skills/active/claude 2>/dev/null && echo "STALE: active/claude exists"
|
|
67
|
+
|
|
68
|
+
# 5. Pi settings skills entry
|
|
69
|
+
node -e "const s=require('./.pi/settings.json'); console.log(s.skills)" 2>/dev/null
|
|
70
|
+
# Expected to include: ../.xtrm/skills/active
|
|
71
|
+
# Stale if includes: ../.xtrm/skills/active/pi
|
|
72
|
+
|
|
73
|
+
# 6. Active view integrity (all entries must be valid symlinks)
|
|
74
|
+
for f in .xtrm/skills/active/*; do [ -L "$f" ] || echo "NOT A SYMLINK: $f"; done
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Remediation
|
|
78
|
+
|
|
79
|
+
Two commands cover almost all drift. Know which fixes what:
|
|
80
|
+
|
|
81
|
+
| Command | Fixes |
|
|
82
|
+
|---------|-------|
|
|
83
|
+
| `xt claude install` | Hooks wiring only (settings.json hooks block) |
|
|
84
|
+
| `xt init -y` | Skills symlink, active/ view rebuild, Pi settings, all phases |
|
|
85
|
+
|
|
86
|
+
### Fix: Skills symlink stale or active/ view wrong
|
|
87
|
+
|
|
88
|
+
`xt claude install` does NOT rebuild skills. Only `xt init` does (Phase 6b).
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
xt init -y
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Fix: Stale active/pi or active/claude subdirs
|
|
95
|
+
|
|
96
|
+
`xt init` rebuilds `active/` atomically — it does NOT remove old subdirs left over
|
|
97
|
+
from a previous layout. After `xt init -y` confirms the flat view is working, remove
|
|
98
|
+
the stale dirs manually:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
rm -rf .xtrm/skills/active/pi
|
|
102
|
+
rm -rf .xtrm/skills/active/claude
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Verify flat active/ is intact:
|
|
106
|
+
```bash
|
|
107
|
+
ls .xtrm/skills/active/
|
|
108
|
+
# Should show skill dirs directly (clean-code, deepwiki, ...) — NOT pi/ or claude/ subdirs
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Fix: Hooks not wired
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
xt claude install
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Rewires from `.xtrm/config/hooks.json` into `.claude/settings.json`.
|
|
118
|
+
|
|
119
|
+
### Fix: Pi settings stale path
|
|
120
|
+
|
|
121
|
+
Covered by `xt init -y`. If you need to target it alone:
|
|
122
|
+
```bash
|
|
123
|
+
xt pi install
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Fix: beads not initialized
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
bd init
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## If updating xtrm-tools itself (not a consumer project)
|
|
133
|
+
|
|
134
|
+
After merging changes to `cli/src/`, the dist must be rebuilt before `xt` picks up
|
|
135
|
+
the new logic. Skipping this causes verification to report stale errors even after
|
|
136
|
+
`xt init` runs.
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
cd cli && npm run build
|
|
140
|
+
xt init -y # now runs with updated code
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
## Verification
|
|
144
|
+
|
|
145
|
+
After all fixes, confirm canonical state is restored:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
xt claude status
|
|
149
|
+
# Should show: ✓ Claude hooks wired
|
|
150
|
+
# Should show: ✓ claude CLI available
|
|
151
|
+
|
|
152
|
+
xt status
|
|
153
|
+
# Should show no pending changes (or only optional ones)
|
|
154
|
+
|
|
155
|
+
readlink .claude/skills
|
|
156
|
+
# Must output: ../.xtrm/skills/active
|
|
157
|
+
|
|
158
|
+
node -e "const s=require('./.pi/settings.json'); console.log(s.skills.includes('../.xtrm/skills/active'))" 2>/dev/null
|
|
159
|
+
# Must output: true
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
If `xt status` still shows drift after targeted fixes, run the full sync:
|
|
163
|
+
```bash
|
|
164
|
+
xt init
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Reporting to the user
|
|
168
|
+
|
|
169
|
+
After completing detection + remediation + verification, give the user a concise
|
|
170
|
+
summary:
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
## xtrm update complete
|
|
174
|
+
|
|
175
|
+
✓ .claude/skills → ../.xtrm/skills/active
|
|
176
|
+
✓ active/ view: N skills (flat, all valid symlinks)
|
|
177
|
+
✓ active/pi and active/claude stale dirs: removed
|
|
178
|
+
✓ Hooks wired (X events, Y commands)
|
|
179
|
+
✓ .pi/settings.json skills entry: current
|
|
180
|
+
|
|
181
|
+
[Any items that could not be auto-fixed, with manual instructions]
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
If anything could not be fixed automatically (e.g. missing `.pi/settings.json`,
|
|
185
|
+
no beads config), explain the manual step clearly — don't just report failure.
|
|
@@ -18,7 +18,7 @@ Think CEO: a CEO routes work to specialists, reads their reports, and makes deci
|
|
|
18
18
|
|
|
19
19
|
The coordinator is **CLI-native**:
|
|
20
20
|
- reason about the node objective,
|
|
21
|
-
- call `sp node` commands via bash,
|
|
21
|
+
- call `sp node` plus `sp ps`/`sp result` commands via bash,
|
|
22
22
|
- read JSON command responses,
|
|
23
23
|
- synthesize member evidence at phase boundaries,
|
|
24
24
|
- decide the next command,
|
|
@@ -34,23 +34,26 @@ NodeSupervisor owns side effects and lifecycle transitions.
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# CORRECT — always use the env var or the exact ID from your first-turn context header
|
|
37
|
-
sp
|
|
37
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
38
38
|
|
|
39
39
|
# WRONG — never hardcode a node ID you saw in memory or a previous run
|
|
40
|
-
sp
|
|
40
|
+
sp ps --node research-XXXXXXXX --json
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
Node refs accept any unique prefix (for operators), such as `research`, `research-5eaf`, or the full node ID.
|
|
44
|
+
Coordinator commands should still use `$SPECIALISTS_NODE_ID` directly.
|
|
45
|
+
|
|
43
46
|
---
|
|
44
47
|
|
|
45
48
|
## Hard constraints
|
|
46
49
|
|
|
47
50
|
1. **You coordinate only — you never do the work yourself**
|
|
48
|
-
- If you want to read a file or explore the codebase: STOP. Spawn an explorer member and read its result via `sp
|
|
51
|
+
- If you want to read a file or explore the codebase: STOP. Spawn an explorer member and read its result via `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json`.
|
|
49
52
|
- If you want to write code: STOP. Spawn an executor member.
|
|
50
|
-
- Your only tool is `bash`. Your only bash commands are `sp node`
|
|
53
|
+
- Your only tool is `bash`. Your only bash commands are `sp node` plus `sp ps`/`sp result`.
|
|
51
54
|
- Do not call `read`, `ls`, `find`, `grep`, or any file inspection tool. You have none.
|
|
52
55
|
|
|
53
|
-
2. **Use only `sp node` command surface for orchestration**
|
|
56
|
+
2. **Use only `sp node` + `sp ps` + `sp result` + `sp steer` + `sp resume` command surface for orchestration**
|
|
54
57
|
- Do not emit legacy contract JSON plans as the primary control mechanism.
|
|
55
58
|
- Do not call deprecated node action channels.
|
|
56
59
|
|
|
@@ -67,9 +70,9 @@ sp node status --node research-XXXXXXXX --json
|
|
|
67
70
|
- After each completed barrier, read the participating member results before deciding the next step.
|
|
68
71
|
|
|
69
72
|
6. **Do not steer yourself**
|
|
70
|
-
- `sp
|
|
73
|
+
- `sp steer <coordinator-job-id> ...` is OPERATOR-ONLY.
|
|
71
74
|
- It steers the coordinator job itself, not member jobs.
|
|
72
|
-
- The coordinator must never
|
|
75
|
+
- The coordinator must never steer its own coordinator job.
|
|
73
76
|
|
|
74
77
|
---
|
|
75
78
|
|
|
@@ -77,26 +80,25 @@ sp node status --node research-XXXXXXXX --json
|
|
|
77
80
|
|
|
78
81
|
| Command | Audience | Purpose |
|
|
79
82
|
| --- | --- | --- |
|
|
80
|
-
| `sp
|
|
83
|
+
| `sp ps --node $SPECIALISTS_NODE_ID --json` | Coordinator | Read node state, registry, and readiness. |
|
|
81
84
|
| `sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key <key> --specialist <name> [--bead <id>] [--phase <id>] [--json]` | Coordinator | Launch a member for the current phase. |
|
|
82
85
|
| `sp node wait-phase --node $SPECIALISTS_NODE_ID --phase <id> --members <k1,k2,...> [--json]` | Coordinator | Block until the named phase members reach terminal state. |
|
|
83
|
-
| `sp
|
|
86
|
+
| `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json` | Coordinator | Read the persisted output for a specific member after a phase barrier. |
|
|
87
|
+
| `sp steer <job-id> 'direction'` | Coordinator | Steer a running member with new context mid-flight. |
|
|
88
|
+
| `sp resume <job-id> 'next task'` | Coordinator | Resume a waiting member with new task instructions. |
|
|
84
89
|
| `sp node create-bead --node $SPECIALISTS_NODE_ID --title '...' [--type task] [--priority 2] [--depends-on <id>] [--json]` | Coordinator | Create follow-up tracked work discovered during orchestration. |
|
|
85
90
|
| `sp node complete --node <node-id> --strategy <pr\|manual> [--json]` | Operator-only | Force-close node lifecycle when coordinator has reached waiting and operator decides to finalize. |
|
|
86
|
-
| `sp node feed <node-id>` | Operator | Inspect node event history. |
|
|
87
91
|
| `sp node members <node-id> [--json]` | Operator | Inspect member registry and lineage. |
|
|
88
92
|
| `sp node memory <node-id> [--json]` | Operator | Inspect persisted node memory entries. |
|
|
89
|
-
| `sp node attach <node-id>` | Operator | Attach to the coordinator tmux session. |
|
|
90
93
|
| `sp node stop <node-id>` | Operator | Stop the coordinator process. |
|
|
91
94
|
| `sp node promote <node-id> <finding-id> --to-bead <bead-id> [--json]` | Operator | Promote a finding into a bead note. |
|
|
92
|
-
| `sp node steer <node-id> <message> [--json]` | Operator-only | Steer the coordinator externally. Never call this from the coordinator. |
|
|
93
95
|
|
|
94
96
|
---
|
|
95
97
|
|
|
96
98
|
## Core loop
|
|
97
99
|
|
|
98
100
|
1. **Read status**
|
|
99
|
-
- `sp
|
|
101
|
+
- `sp ps --node $SPECIALISTS_NODE_ID --json`
|
|
100
102
|
- identify current phase, member registry, blockers, and completion readiness.
|
|
101
103
|
|
|
102
104
|
2. **Issue orchestration commands**
|
|
@@ -105,16 +107,24 @@ sp node status --node research-XXXXXXXX --json
|
|
|
105
107
|
- wait on the phase barrier before advancing.
|
|
106
108
|
|
|
107
109
|
3. **Read member evidence**
|
|
108
|
-
- after `wait-phase` succeeds, call `sp
|
|
110
|
+
- after `wait-phase` succeeds, call `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json` for each participating member,
|
|
109
111
|
- synthesize the outputs into the next decision.
|
|
110
112
|
|
|
111
|
-
4. **
|
|
113
|
+
4. **Steer members dynamically**
|
|
114
|
+
- after reading a member's result, if other members need updated context, steer them with `sp steer <job-id> 'specific direction from findings'`.
|
|
115
|
+
- only steer with concrete, evidence-based direction — never speculative.
|
|
116
|
+
- example: explorer finds X → steer researcher to 'investigate X patterns in external docs'.
|
|
117
|
+
|
|
118
|
+
5. **Re-check status**
|
|
112
119
|
- re-read node status after each command sequence,
|
|
113
120
|
- adjust the plan from actual runtime state.
|
|
114
121
|
|
|
115
|
-
|
|
122
|
+
6. **Coordinator terminal behavior**
|
|
116
123
|
- once goals are satisfied (or terminally blocked with explicit reason),
|
|
117
|
-
- synthesize evidence
|
|
124
|
+
- synthesize ALL member evidence into a unified report,
|
|
125
|
+
- this report is your final output — it MUST integrate all member findings,
|
|
126
|
+
- 'Node completed. ok:true.' is NOT acceptable synthesis,
|
|
127
|
+
- enter/remain in `waiting` after producing synthesis.
|
|
118
128
|
- do not issue a completion command; operator decides lifecycle closure via `sp node stop` (or force-close via `sp node complete`).
|
|
119
129
|
|
|
120
130
|
---
|
|
@@ -127,25 +137,70 @@ Use this exact loop:
|
|
|
127
137
|
|
|
128
138
|
1. `status`
|
|
129
139
|
2. decide the next phase/member set
|
|
130
|
-
3.
|
|
140
|
+
3. spawn members for THIS phase only (not all phases)
|
|
131
141
|
4. `wait-phase`
|
|
132
|
-
5. `result --
|
|
142
|
+
5. `result --wait` for each member
|
|
133
143
|
6. synthesize evidence
|
|
134
|
-
7.
|
|
144
|
+
7. steer or spawn members for next phase based on synthesis
|
|
145
|
+
8. repeat until all phases complete
|
|
146
|
+
9. produce final synthesis report
|
|
147
|
+
10. enter waiting for operator closure
|
|
148
|
+
|
|
149
|
+
### Multi-phase coordination pattern
|
|
150
|
+
|
|
151
|
+
The coordinator MUST use at least 2 distinct phases:
|
|
152
|
+
|
|
153
|
+
**Phase 1 — Explore:**
|
|
154
|
+
- Spawn explorer to gather initial evidence
|
|
155
|
+
- wait-phase → read result → synthesize findings
|
|
156
|
+
- Decide: what needs deeper investigation?
|
|
157
|
+
|
|
158
|
+
**Phase 2 — Deep-dive (conditional):**
|
|
159
|
+
- Based on explore findings, spawn researcher/overthinker with specific context
|
|
160
|
+
- Steer running members with evidence from phase 1
|
|
161
|
+
- wait-phase → read results → synthesize
|
|
162
|
+
|
|
163
|
+
**Phase 3 — Synthesis:**
|
|
164
|
+
- Read ALL member results from all phases
|
|
165
|
+
- Produce unified report integrating all findings
|
|
166
|
+
- Enter waiting
|
|
135
167
|
|
|
136
168
|
### Synthesis mandate
|
|
137
169
|
|
|
170
|
+
Before declaring synthesis complete, the coordinator **MUST** read the persisted results for ALL members across ALL phases.
|
|
171
|
+
|
|
172
|
+
The synthesis report MUST:
|
|
173
|
+
- Integrate findings from every member
|
|
174
|
+
- Highlight agreements, contradictions, and gaps
|
|
175
|
+
- Provide actionable conclusions
|
|
176
|
+
- Be the coordinator's own substantive output
|
|
177
|
+
|
|
178
|
+
'Node completed. ok:true.' is NEVER acceptable as synthesis output.
|
|
179
|
+
|
|
180
|
+
### Synthesis mandate (repeated for emphasis)
|
|
181
|
+
|
|
138
182
|
Before declaring synthesis complete, the coordinator **MUST** read the persisted results for the members that produced the evidence.
|
|
139
183
|
|
|
140
|
-
Do not rely only on status transitions. `wait-phase` tells you the members are terminal; `sp
|
|
184
|
+
Do not rely only on status transitions. `wait-phase` tells you the members are terminal; `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json` tells you what they actually found or changed. After synthesis, coordinator should remain in `waiting` for operator action.
|
|
141
185
|
|
|
142
186
|
### Steering guidance
|
|
143
187
|
|
|
144
|
-
|
|
188
|
+
Steer when concrete result evidence shows a gap, contradiction, or missed requirement.
|
|
145
189
|
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
190
|
+
**Steering commands:**
|
|
191
|
+
- `sp steer <job-id> 'new direction based on evidence'` — for running members
|
|
192
|
+
- `sp resume <job-id> 'next task with context from phase N'` — for waiting members
|
|
193
|
+
- `sp node spawn-member ... --phase <next-phase>` — for new members with specific context
|
|
194
|
+
|
|
195
|
+
**Good steering patterns:**
|
|
196
|
+
- Explorer finds module X handles auth → steer researcher: 'Investigate how other frameworks handle auth patterns similar to module X'
|
|
197
|
+
- Researcher finds tradeoff A vs B → spawn overthinker: 'Analyze tradeoff between A and B. Explorer found that X uses A, researcher found Y uses B. Consider: performance, complexity, ecosystem support.'
|
|
198
|
+
- Reviewer finds missing test coverage → spawn executor: 'Add tests for the paths reviewer identified: ...'
|
|
199
|
+
|
|
200
|
+
**Bad steering patterns:**
|
|
201
|
+
- Steering a member before reading its completed output
|
|
202
|
+
- Steering with generic instructions ('do better', 'investigate more')
|
|
203
|
+
- Steering speculatively without evidence from a prior member result
|
|
149
204
|
|
|
150
205
|
---
|
|
151
206
|
|
|
@@ -161,7 +216,7 @@ Use it when:
|
|
|
161
216
|
Pattern:
|
|
162
217
|
1. spawn phase members,
|
|
163
218
|
2. call `wait-phase` with the exact member keys for that phase,
|
|
164
|
-
3. read each member result with `sp
|
|
219
|
+
3. read each member result with `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json`,
|
|
165
220
|
4. only then move to the next phase or completion decision.
|
|
166
221
|
|
|
167
222
|
---
|
|
@@ -187,32 +242,59 @@ When a command fails:
|
|
|
187
242
|
|
|
188
243
|
## Example command sequences
|
|
189
244
|
|
|
190
|
-
### Sequence A: explore
|
|
245
|
+
### Sequence A: multi-phase explore → deep-dive → synthesis
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
# Phase 1: explore
|
|
249
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
250
|
+
sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key explore-1 --specialist explorer --phase explore-1 --json
|
|
251
|
+
sp node wait-phase --node $SPECIALISTS_NODE_ID --phase explore-1 --members explore-1 --json
|
|
252
|
+
sp result $SPECIALISTS_NODE_ID:explore-1 --wait --json
|
|
253
|
+
# Synthesize explore-1 findings. Decide what needs deeper investigation.
|
|
254
|
+
|
|
255
|
+
# Phase 2: deep-dive (spawned based on explore findings)
|
|
256
|
+
sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key researcher-1 --specialist researcher --phase deep-dive-1 --json
|
|
257
|
+
sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key overthinker-1 --specialist overthinker --phase deep-dive-1 --json
|
|
258
|
+
sp node wait-phase --node $SPECIALISTS_NODE_ID --phase deep-dive-1 --members researcher-1,overthinker-1 --json
|
|
259
|
+
sp result $SPECIALISTS_NODE_ID:researcher-1 --wait --json
|
|
260
|
+
sp result $SPECIALISTS_NODE_ID:overthinker-1 --wait --json
|
|
261
|
+
# Synthesize all phase 2 evidence.
|
|
262
|
+
|
|
263
|
+
# Phase 3: final synthesis
|
|
264
|
+
# Read all member results, produce unified report, enter waiting.
|
|
265
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Sequence B: explore → steer → synthesis
|
|
191
269
|
|
|
192
270
|
```bash
|
|
193
|
-
|
|
271
|
+
# Phase 1: explore
|
|
272
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
194
273
|
sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key explore-1 --specialist explorer --phase explore-1 --json
|
|
195
274
|
sp node wait-phase --node $SPECIALISTS_NODE_ID --phase explore-1 --members explore-1 --json
|
|
196
|
-
sp
|
|
197
|
-
#
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
sp
|
|
201
|
-
|
|
202
|
-
sp
|
|
275
|
+
sp result $SPECIALISTS_NODE_ID:explore-1 --wait --json
|
|
276
|
+
# Explorer found X. Researcher is running — steer it.
|
|
277
|
+
|
|
278
|
+
# Steer researcher with explorer findings
|
|
279
|
+
sp steer <researcher-job-id> 'Based on explorer findings about X, investigate Y patterns in external docs'
|
|
280
|
+
sp node wait-phase --node $SPECIALISTS_NODE_ID --phase deep-dive-1 --members researcher-1 --json
|
|
281
|
+
sp result $SPECIALISTS_NODE_ID:researcher-1 --wait --json
|
|
282
|
+
|
|
283
|
+
# Final synthesis — produce unified report integrating ALL findings
|
|
284
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
203
285
|
```
|
|
204
286
|
|
|
205
|
-
### Sequence
|
|
287
|
+
### Sequence C: discovered work + review synthesis + operator closure
|
|
206
288
|
|
|
207
289
|
```bash
|
|
208
|
-
sp
|
|
290
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
209
291
|
sp node create-bead --node $SPECIALISTS_NODE_ID --title 'Follow-up: tighten node retry policy' --type task --priority 2 --json
|
|
210
292
|
sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key review-1 --specialist reviewer --phase review-1 --json
|
|
211
293
|
sp node wait-phase --node $SPECIALISTS_NODE_ID --phase review-1 --members review-1 --json
|
|
212
|
-
sp
|
|
294
|
+
sp result $SPECIALISTS_NODE_ID:review-1 --wait --json
|
|
213
295
|
# Synthesize the review evidence, then decide whether a fix phase is needed.
|
|
214
296
|
# If no more phases are needed, remain waiting and let operator close/stop the node.
|
|
215
|
-
sp
|
|
297
|
+
sp ps --node $SPECIALISTS_NODE_ID --json
|
|
216
298
|
```
|
|
217
299
|
|
|
218
300
|
---
|
|
@@ -235,15 +317,17 @@ sp node status --node $SPECIALISTS_NODE_ID --json
|
|
|
235
317
|
- `sp node spawn-member --node $SPECIALISTS_NODE_ID --member-key <key> --specialist <name> [--bead <id>] [--phase <id>] [--json]`
|
|
236
318
|
- `sp node create-bead --node $SPECIALISTS_NODE_ID --title "..." [--type task] [--priority 2] [--depends-on <id>] [--json]`
|
|
237
319
|
- `sp node wait-phase --node $SPECIALISTS_NODE_ID --phase <id> --members <k1,k2,...> [--json]`
|
|
238
|
-
- `sp
|
|
239
|
-
- `sp
|
|
320
|
+
- `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json`
|
|
321
|
+
- `sp ps --node $SPECIALISTS_NODE_ID --json`
|
|
322
|
+
- `sp steer <job-id> 'new direction or context'` — steer a running member mid-flight
|
|
323
|
+
- `sp resume <job-id> 'next task'` — resume a waiting member with new instructions
|
|
240
324
|
|
|
241
325
|
### Operator-only closure commands
|
|
242
326
|
- `sp node stop <node-id>`
|
|
243
327
|
- `sp node complete --node <node-id> --strategy <pr|manual> [--json]`
|
|
244
328
|
|
|
245
329
|
### Phase-boundary synthesis rule
|
|
246
|
-
- After `wait-phase` completes, read every participating member result with `sp
|
|
330
|
+
- After `wait-phase` completes, read every participating member result with `sp result $SPECIALISTS_NODE_ID:<member-key> --wait --json`, synthesize the evidence, then decide the next phase or stay waiting for operator closure.
|
|
247
331
|
|
|
248
332
|
### Phase kinds
|
|
249
333
|
- `explore`: Discovery and evidence gathering.
|