@jaggerxtrm/specialists 3.12.0 → 3.14.0
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/config/hooks/specialists-session-start.mjs +1 -1
- package/config/mandatory-rules/bead-id-verbatim.md +14 -0
- package/config/mandatory-rules/per-turn-handoff-schema.md +16 -0
- package/config/skills/specialists-creator/SKILL.md +16 -0
- package/config/skills/update-specialists/SKILL.md +183 -350
- package/config/skills/using-kpi/SKILL.md +86 -0
- package/config/skills/using-script-specialists/SKILL.md +7 -5
- package/config/skills/using-specialists-v2/SKILL.md +1 -1
- package/config/skills/using-specialists-v3/SKILL.md +530 -112
- package/config/specialists/changelog-keeper.specialist.json +2 -1
- package/config/specialists/code-sanity.specialist.json +3 -1
- package/config/specialists/debugger.specialist.json +3 -1
- package/config/specialists/executor.specialist.json +3 -1
- package/config/specialists/explorer.specialist.json +2 -1
- package/config/specialists/overthinker.specialist.json +2 -1
- package/config/specialists/planner.specialist.json +3 -1
- package/config/specialists/researcher.specialist.json +2 -1
- package/config/specialists/reviewer.specialist.json +3 -1
- package/config/specialists/security-auditor.specialist.json +53 -10
- package/config/specialists/specialists-creator.specialist.json +2 -2
- package/config/specialists/sync-docs.specialist.json +3 -1
- package/config/specialists/test-runner.specialist.json +2 -1
- package/dist/index.js +634 -498
- package/dist/lib.js +183 -62
- package/dist/types/cli/help.d.ts.map +1 -1
- package/dist/types/cli/run.d.ts.map +1 -1
- package/dist/types/cli/script.d.ts.map +1 -1
- package/dist/types/cli/serve.d.ts +11 -2
- package/dist/types/cli/serve.d.ts.map +1 -1
- package/dist/types/cli/version-check.d.ts +3 -0
- package/dist/types/cli/version-check.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/specialist/mandatory-rules.d.ts +5 -0
- package/dist/types/specialist/mandatory-rules.d.ts.map +1 -1
- package/dist/types/specialist/observability-sqlite.d.ts +1 -0
- package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
- package/dist/types/specialist/schema.d.ts +27 -0
- package/dist/types/specialist/schema.d.ts.map +1 -1
- package/dist/types/specialist/script-runner.d.ts +5 -1
- package/dist/types/specialist/script-runner.d.ts.map +1 -1
- package/package.json +4 -4
- package/config/specialists/.serena/project.yml +0 -151
|
@@ -5,39 +5,179 @@ description: >
|
|
|
5
5
|
that should be delegated, tracked, reviewed, fixed, tested, or merged through
|
|
6
6
|
specialists: code review, debugging, implementation, planning, doc sync,
|
|
7
7
|
security checks, multi-step chains, and questions about specialist workflow.
|
|
8
|
-
version: 3.
|
|
8
|
+
version: 3.2
|
|
9
9
|
---
|
|
10
10
|
|
|
11
11
|
# Using Specialists v3
|
|
12
12
|
|
|
13
|
-
You are the orchestrator.
|
|
13
|
+
You are the orchestrator. Turn user intent into a strong bead contract, choose right specialist from live registry, launch chain, monitor it, consume results, drive fixes, and publish through specialist merge path.
|
|
14
14
|
|
|
15
|
-
Keep
|
|
15
|
+
Keep skill practical. Core behavior belongs here; volatile detail stays in live commands.
|
|
16
|
+
|
|
17
|
+
> **MANDATORY — Run on skill load and before every new substantial task or epic:**
|
|
18
|
+
> ```bash
|
|
19
|
+
> specialists list --full
|
|
20
|
+
> ```
|
|
21
|
+
> Do not rely on remembered roles, models, or permissions. The registry is the source of truth.
|
|
22
|
+
> Run it again before dispatching any new chain or starting any epic — specialists change between sessions.
|
|
23
|
+
|
|
24
|
+
## Specialist File Locations
|
|
25
|
+
|
|
26
|
+
Specialists live in three layers. Know which layer you are reading or editing:
|
|
27
|
+
|
|
28
|
+
| Layer | Path | Purpose |
|
|
29
|
+
|-------|------|---------|
|
|
30
|
+
| Package (shipped) | `config/specialists/*.specialist.json` | Canonical role definitions; versioned with the repo |
|
|
31
|
+
| User override | `.specialists/user/*.specialist.json` | Per-project customizations; wins over package layer for same name |
|
|
32
|
+
| Default mirror | `.specialists/default/*.specialist.json` | Repo-managed mirror of package defaults; overrides package fallback |
|
|
33
|
+
|
|
34
|
+
The loader resolves in priority order: user → default-mirror → package. A same-name file in `.specialists/user/` fully replaces the package version for that specialist. When creating or editing a specialist, use `config/specialists/` for shipped roles and `.specialists/user/` for project-specific overrides. Never edit `.specialists/default/` by hand — it is managed by `update-specialists`.
|
|
35
|
+
|
|
36
|
+
`specialists list --full` shows the resolved set (which layer each specialist comes from) so you always know what will actually run.
|
|
37
|
+
|
|
38
|
+
### Editing Specialist Fields: `sp edit` Is Required
|
|
39
|
+
|
|
40
|
+
Direct JSON editing is error-prone and bypasses schema validation. Use `sp edit` for all field changes — it validates dot-paths, handles array append/remove, and writes to the correct layer.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Read a field
|
|
44
|
+
sp edit executor --get specialist.execution.model
|
|
45
|
+
|
|
46
|
+
# Set a field (schema-validated)
|
|
47
|
+
sp edit executor specialist.execution.model <model-id>
|
|
48
|
+
|
|
49
|
+
# Set prompt.system or task_template from a file (required for multi-line content)
|
|
50
|
+
sp edit executor --set specialist.prompt.system _ --file ./my-system-prompt.txt
|
|
51
|
+
|
|
52
|
+
# Append or remove tags
|
|
53
|
+
sp edit executor --set specialist.metadata.tags review,security --append
|
|
54
|
+
sp edit executor --set specialist.metadata.tags old-tag --remove
|
|
55
|
+
|
|
56
|
+
# Apply a named preset (run sp edit --list-presets for current options)
|
|
57
|
+
sp edit executor --preset power
|
|
58
|
+
sp edit executor --preset cheap --dry-run # preview first
|
|
59
|
+
|
|
60
|
+
# Target a specific scope when name exists in multiple layers
|
|
61
|
+
sp edit executor --scope user --set specialist.execution.model <model-id>
|
|
62
|
+
|
|
63
|
+
# Bulk read across all specialists
|
|
64
|
+
sp edit --all --get specialist.execution.model
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**When `sp edit` is required vs. direct JSON edit:**
|
|
68
|
+
- Model, thinking level, timeout, tags, permission, description → always `sp edit`
|
|
69
|
+
- `prompt.system` or `task_template` longer than one line → `sp edit --file`
|
|
70
|
+
- Structural schema fields (execution flags, output_schema) → `sp edit` with dot-path
|
|
71
|
+
- Net-new specialist creation → `specialists-creator` skill, then `sp edit` for tuning
|
|
72
|
+
- Bulk cross-specialist reads → `sp edit --all --get <path>`
|
|
73
|
+
- Available presets → `sp edit --list-presets` (do not hardcode; varies by install)
|
|
74
|
+
|
|
75
|
+
## Orchestration Discipline (Paranoid Mode)
|
|
76
|
+
|
|
77
|
+
You are an orchestrator, not a hero. Move slowly enough to be correct.
|
|
78
|
+
|
|
79
|
+
- Run `specialists list --full` and `sp help` again at the start of every new substantial task. Do not skip because "you remember." Roles, models, and flags drift between sessions.
|
|
80
|
+
- Re-read the bead before dispatch. If you cannot defend each contract field out loud, the bead is not ready.
|
|
81
|
+
- Never dispatch a chain you cannot describe end-to-end (which specialist, which bead, which workspace, which merge target).
|
|
82
|
+
- Verify worktree and job state before and after each dispatch with `sp ps` and `git worktree list`. Drift is silent until merge.
|
|
83
|
+
- Treat reviewer `PARTIAL` and code-sanity `FINDINGS` as mandatory fix loops, not advisory noise.
|
|
84
|
+
- When unsure, prefer extra explorer/debugger passes over an over-eager executor. Wrong code merged is more expensive than slow research.
|
|
85
|
+
|
|
86
|
+
## Project-Specific Specialists
|
|
87
|
+
|
|
88
|
+
Users define their own specialists in `.specialists/user/*.specialist.json` to fit project shape (domain knowledge, language, framework, conventions). These override package defaults and may not match generic role descriptions.
|
|
89
|
+
|
|
90
|
+
- Always run `specialists list --full` to see the resolved set, including project-specific roles, before choosing.
|
|
91
|
+
- Read `sp help` and the specialist's description/tags to confirm fit. Do not assume a name maps to its package-default behavior — a `.specialists/user/` override may have a different prompt, model, or scope.
|
|
92
|
+
- Pick the project-specific specialist when its role matches the task shape. Do not fall back to a generic role just because it is more familiar.
|
|
93
|
+
- If the task does not match any project-specific role, use the package default and consider whether a new project-specific specialist would help (use `specialists-creator` skill).
|
|
94
|
+
|
|
95
|
+
## Security-Auditor and Code-Sanity Are Part of the Chain
|
|
96
|
+
|
|
97
|
+
These are not optional. For any substantive diff (auth, secrets, input handling, dependency changes, control-flow rewrites, type-risky changes, agent/config surfaces), include them between executor and reviewer.
|
|
98
|
+
|
|
99
|
+
- `code-sanity` — cheap simplification and type-safety screen. Run when diff smells overcomplicated, brittle, or duplicates logic. Output is advisory; reviewer still gates merge.
|
|
100
|
+
- `security-auditor` — scan-only risk surface review. Run when diff touches auth, secrets, input handling, dependency logic, or agent/config. Output is advisory; executor applies fixes if any.
|
|
101
|
+
- Both run with their own bead and `--job <exec-job>` so they enter the executor workspace.
|
|
102
|
+
- Order: executor → code-sanity (if smell) → security-auditor (if risk surface) → reviewer.
|
|
103
|
+
- Never skip security-auditor on auth/secrets/input changes "because the diff looks small." Small diffs hide the worst regressions.
|
|
104
|
+
|
|
105
|
+
## Monitoring Long-Running Jobs: Sleep Timers Are Mandatory
|
|
106
|
+
|
|
107
|
+
Specialists run async. You will lose the chain if you do not actively monitor it.
|
|
108
|
+
|
|
109
|
+
**Required pattern after every dispatch:**
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
sp run <role> --bead <id> --background ... # dispatch
|
|
113
|
+
sleep 10 && sp ps # confirm started
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then cycle sleeps based on average completion time per role, checking `sp ps` each cycle:
|
|
117
|
+
|
|
118
|
+
| Role | Typical duration | Initial sleep cycle |
|
|
119
|
+
|------|------------------|---------------------|
|
|
120
|
+
| sync-docs, changelog-keeper | 60–180s | `sleep 60` then `sleep 60` |
|
|
121
|
+
| code-sanity, security-auditor | 60–180s | `sleep 60` then `sleep 60` |
|
|
122
|
+
| reviewer | 90–240s | `sleep 90` then `sleep 60` |
|
|
123
|
+
| explorer, debugger, planner, overthinker | 120–300s | `sleep 120` then `sleep 90` |
|
|
124
|
+
| executor | 180–600s+ | `sleep 180` then `sleep 120` |
|
|
125
|
+
| test-runner | varies with suite | start at `sleep 120`, adjust |
|
|
126
|
+
|
|
127
|
+
Rules:
|
|
128
|
+
- After dispatch, **always** `sleep 10 && sp ps` first to confirm the job is `running`, not stuck in `queued` or already `failed`.
|
|
129
|
+
- Then sleep again per the table; check `sp ps` each cycle.
|
|
130
|
+
- Do not poll faster than every 30s after the initial check — it wastes context.
|
|
131
|
+
- When status flips to `completed`, run `sp result <job-id>` immediately to consume output before context grows.
|
|
132
|
+
- If a job exceeds 2× its typical duration without completing, inspect with `sp feed <job-id>` before assuming hang.
|
|
133
|
+
|
|
134
|
+
You are not "done" until every dispatched job is `completed` or `failed` and consumed.
|
|
135
|
+
|
|
136
|
+
## Worktree Cleanup After Merge
|
|
137
|
+
|
|
138
|
+
`sp merge` and `sp epic merge` clean up automatically when they succeed. If you fall back to manual `git merge` (e.g., doc-only chains), you own cleanup.
|
|
139
|
+
|
|
140
|
+
After every merge, verify:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
git worktree list # any orphaned worktrees from this session?
|
|
144
|
+
sp ps # any leftover jobs?
|
|
145
|
+
git worktree prune # drop stale worktree metadata
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If a feature/epic worktree remains after merge, remove it explicitly:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
git worktree remove <path>
|
|
152
|
+
git branch -d <merged-branch> # only after confirming merged
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
`sp ps` must be empty (or only contain jobs you intentionally kept alive) before session close. Stale worktrees and stale jobs both block future dispatches via the stale-base guard.
|
|
16
156
|
|
|
17
157
|
## When To Delegate
|
|
18
158
|
|
|
19
159
|
Use specialists for substantial work: codebase exploration, debugging, implementation, review, test execution, planning, documentation sync, security/config audit, release publication, and multi-chain epics.
|
|
20
160
|
|
|
21
|
-
Do small deterministic edits directly when
|
|
161
|
+
Do small deterministic edits directly when scope is already obvious and delegation would add ceremony. Do not self-investigate or self-implement a substantial task just because you can read files faster; audit trail and specialist review are part of workflow.
|
|
22
162
|
|
|
23
163
|
## Non-Negotiable Rules
|
|
24
164
|
|
|
25
|
-
1. `--bead` is
|
|
26
|
-
2. Do not dispatch until
|
|
27
|
-
3. Never use `--prompt` to supplement tracked work. Update
|
|
28
|
-
4. Choose by task shape, not
|
|
165
|
+
1. `--bead` is prompt for tracked work.
|
|
166
|
+
2. Do not dispatch until bead is usable task contract.
|
|
167
|
+
3. Never use `--prompt` to supplement tracked work. Update bead instead.
|
|
168
|
+
4. Choose by task shape, not habit. Check `specialists list --full` when roles may have changed.
|
|
29
169
|
5. Explorer/debugger answer uncertainty before executor writes code.
|
|
30
170
|
6. Executor starts only when scope, constraints, and validation are clear.
|
|
31
|
-
7. Reviewer uses its own bead and
|
|
171
|
+
7. Reviewer uses its own bead and executor workspace via `--job <exec-job>`.
|
|
32
172
|
8. Keep executor/debugger jobs alive through review so they can be resumed.
|
|
33
173
|
9. Merge specialist-owned work with `sp merge` or `sp epic merge`, not manual `git merge`.
|
|
34
174
|
10. Specialists must not perform destructive or irreversible operations.
|
|
35
|
-
11. Treat tests as evidence: classify failures as in-scope, pre-existing, or infrastructure before starting
|
|
36
|
-
12. Drive routine stages autonomously once
|
|
175
|
+
11. Treat tests as evidence: classify failures as in-scope, pre-existing, or infrastructure before starting fix loop.
|
|
176
|
+
12. Drive routine stages autonomously once task is clear. Escalate only for human judgment, destructive actions, repeated crashes, or reviewer `FAIL`.
|
|
37
177
|
|
|
38
178
|
## Live Registry And Help
|
|
39
179
|
|
|
40
|
-
Use
|
|
180
|
+
Use live registry for role details, permissions, current models, and skills:
|
|
41
181
|
|
|
42
182
|
```bash
|
|
43
183
|
specialists list --full
|
|
@@ -58,93 +198,304 @@ sp epic --help
|
|
|
58
198
|
|
|
59
199
|
Do not rely on stale remembered flags when help is available.
|
|
60
200
|
|
|
61
|
-
##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
201
|
+
## Writing Bead Contracts Well
|
|
202
|
+
|
|
203
|
+
Bead quality controls specialist quality. A title-only bead produces wandering output because specialist has no contract to optimize against. Write contract before dispatch. Tighten vague scope before launch.
|
|
204
|
+
|
|
205
|
+
Bad bead:
|
|
206
|
+
|
|
207
|
+
```text
|
|
208
|
+
TITLE: Fix bug
|
|
209
|
+
PROBLEM: Something is broken.
|
|
210
|
+
SUCCESS: It works.
|
|
211
|
+
SCOPE: src/
|
|
212
|
+
NON_GOALS: N/A
|
|
213
|
+
CONSTRAINTS: Be careful.
|
|
214
|
+
VALIDATION: Tests pass.
|
|
215
|
+
OUTPUT: Done.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Good bead:
|
|
219
|
+
|
|
220
|
+
```text
|
|
221
|
+
TITLE: Fix feed cursor regression in sp result
|
|
222
|
+
PROBLEM: specialists feed follow skips events after restart because cursor tracks count, not last seq.
|
|
223
|
+
SUCCESS: feed follow resumes from last seen seq; result still reads terminal output.
|
|
224
|
+
SCOPE: src/cli/feed.ts, src/cli/result.ts, tests/unit/cli/feed.test.ts
|
|
225
|
+
NON_GOALS: No new runtime format, no DB schema change, no unrelated poll changes.
|
|
226
|
+
CONSTRAINTS: Preserve existing job IDs, keep backwards-compatible CLI output, avoid file-based fallback drift.
|
|
227
|
+
VALIDATION: Add regression test for restart resume; run targeted CLI tests.
|
|
228
|
+
OUTPUT: Changed files, test evidence, residual risks.
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Fix three bad smells fast:
|
|
232
|
+
|
|
233
|
+
- Title-only bead. Add problem, scope, validation, output.
|
|
234
|
+
- Vague SCOPE like `src/`. Name files, symbols, or bounded docs.
|
|
235
|
+
- Missing VALIDATION. Say what proves done, not just that work is “finished.”
|
|
236
|
+
|
|
237
|
+
What differs: orchestrator writes contract before dispatch, so specialist does less guessing and more useful work.
|
|
238
|
+
|
|
239
|
+
## Dependency Linking
|
|
240
|
+
|
|
241
|
+
Link beads with correct edge shape. The edge tells orchestrator what blocks what, what is only related, and what should auto-nest.
|
|
242
|
+
|
|
243
|
+
- `bd dep add <issue> <depends-on>`: issue depends on depends-on; depends-on blocks issue. Use this for hard sequencing. [source: bd dep --help]
|
|
244
|
+
- `bd dep <blocker> --blocks <blocked>`: reverse phrasing of same edge; blocker-first reads better when thinking in blockers. [source: bd dep --help; CLAUDE.md lines 62-64]
|
|
245
|
+
- `bd dep relate <a> <b>`: non-blocking `relates_to` link. Use for context, not order. [source: bd dep --help; CLAUDE.md lines 64, 200-204]
|
|
246
|
+
- `bd create --parent <epic-id>`: epic-child edge; auto-names child `.1`, `.2`, … and adds parent edge. Use for chain members that must live under epic. [source: CLAUDE.md lines 49-50, 154-156; bd create --help]
|
|
247
|
+
- `bd create --deps discovered-from:<id>`: follow-up work discovered from source bead. Use when one bead reveals new tracked work. [source: CLAUDE.md lines 50, 62-65; bd create --help]
|
|
248
|
+
|
|
249
|
+
Use each form for a different reason:
|
|
250
|
+
|
|
251
|
+
- `add` / `--blocks` for must-happen-before dependency.
|
|
252
|
+
- `relate` for soft linkage with no schedule effect.
|
|
253
|
+
- `--parent` for epic ownership and child naming.
|
|
254
|
+
- `discovered-from:` for spawned follow-up beads.
|
|
255
|
+
|
|
256
|
+
What differs: orchestrator chooses edge type deliberately, so graph stays correct for chain execution, epic publish, and follow-up traceability.
|
|
257
|
+
|
|
258
|
+
## Bead Contract By Bead Type
|
|
259
|
+
|
|
260
|
+
Use shape that fits specialist.
|
|
261
|
+
|
|
262
|
+
Task/epic bead:
|
|
263
|
+
|
|
264
|
+
```text
|
|
265
|
+
PROBLEM: User-facing or project-facing objective.
|
|
266
|
+
SUCCESS: End-state across all child beads.
|
|
267
|
+
SCOPE: Area of project affected.
|
|
268
|
+
REFERENCES: Optional files, skills, or docs specialist reads only if work needs them.
|
|
269
|
+
NON_GOALS: Boundaries for entire effort.
|
|
270
|
+
CONSTRAINTS: Sequencing, compatibility, branch/merge rules.
|
|
271
|
+
VALIDATION: Final checks before close.
|
|
272
|
+
OUTPUT: What orchestrator reports back.
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
`SCOPE` is always loaded as context. `REFERENCES` is progressive disclosure: name what exists, but do not force load unless task needs it. Use this when a file would bloat payload today, like citing a huge skill file in scope and dragging in all lines before specialist even knows it must read them.
|
|
276
|
+
|
|
277
|
+
Example:
|
|
278
|
+
|
|
279
|
+
```text
|
|
280
|
+
SCOPE: config/skills/using-specialists-v3/SKILL.md, docs/specialists/handoff-schema.md
|
|
281
|
+
REFERENCES: config/skills/prompt-improving/SKILL.md (xml_core conventions), sibling beads per-turn-handoff-schema and bead-id-verbatim once landed
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
Explorer bead:
|
|
285
|
+
|
|
286
|
+
```text
|
|
287
|
+
PROBLEM: What is unknown.
|
|
288
|
+
SUCCESS: Questions answered with evidence.
|
|
289
|
+
SCOPE: Code areas, docs, commands, or symbols to inspect.
|
|
290
|
+
NON_GOALS: No implementation, no broad audit outside scope.
|
|
291
|
+
CONSTRAINTS: READ_ONLY, cite files/symbols/flows.
|
|
292
|
+
VALIDATION: Findings cite evidence.
|
|
293
|
+
OUTPUT: Findings, risks, recommended implementation track, stop condition.
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Debugger bead:
|
|
297
|
+
|
|
298
|
+
```text
|
|
299
|
+
PROBLEM: Symptom, regression, or failing test.
|
|
300
|
+
SUCCESS: Root cause plus minimal fix path.
|
|
301
|
+
SCOPE: Logs, reproduction, code paths, and related tests.
|
|
302
|
+
NON_GOALS: No broad refactor.
|
|
303
|
+
CONSTRAINTS: Preserve behavior outside fault line.
|
|
304
|
+
VALIDATION: Repro steps and diagnosis.
|
|
305
|
+
OUTPUT: Root cause, fix options, confidence, remaining unknowns.
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Executor bead:
|
|
309
|
+
|
|
310
|
+
```text
|
|
311
|
+
PROBLEM: Exact behavior or artifact to change.
|
|
312
|
+
SUCCESS: Observable acceptance criteria.
|
|
313
|
+
SCOPE: Target files/symbols; include do-not-touch boundaries.
|
|
314
|
+
NON_GOALS: Related improvements explicitly excluded.
|
|
315
|
+
CONSTRAINTS: API compatibility, style, migrations, safety.
|
|
316
|
+
VALIDATION: Lint/typecheck/tests or manual checks.
|
|
317
|
+
OUTPUT: Changed files, verification, residual risks.
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Reviewer bead:
|
|
321
|
+
|
|
322
|
+
```text
|
|
323
|
+
PROBLEM: Verify executor output against requirements.
|
|
324
|
+
SUCCESS: PASS only if requirements and validation are satisfied.
|
|
325
|
+
SCOPE: Executor job, diff, task bead, acceptance criteria.
|
|
326
|
+
NON_GOALS: Do not rewrite unless explicitly asked.
|
|
327
|
+
CONSTRAINTS: Code-review mindset; findings first.
|
|
328
|
+
VALIDATION: Run or inspect required checks where feasible.
|
|
329
|
+
OUTPUT: PASS/PARTIAL/FAIL with file/line findings.
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Test bead:
|
|
333
|
+
|
|
334
|
+
```text
|
|
335
|
+
PROBLEM: Validate one or more implementation chains.
|
|
336
|
+
SUCCESS: Relevant tests/checks pass or failures are diagnosed.
|
|
337
|
+
SCOPE: Commands and implementation beads covered.
|
|
338
|
+
NON_GOALS: No broad unrelated suite expansion unless requested.
|
|
339
|
+
CONSTRAINTS: Avoid destructive cleanup; report flaky/infra failures separately.
|
|
340
|
+
VALIDATION: Command output and failure interpretation.
|
|
341
|
+
OUTPUT: Pass/fail summary, failing tests, likely owner.
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
Sync-docs bead:
|
|
345
|
+
|
|
346
|
+
```text
|
|
347
|
+
PROBLEM: Exactly one doc drifted from source truth.
|
|
348
|
+
SUCCESS: One doc updated and drift checked clean.
|
|
349
|
+
SCOPE: One doc only.
|
|
350
|
+
NON_GOALS: No source-code rewrite.
|
|
351
|
+
CONSTRAINTS: Keep doc and source aligned.
|
|
352
|
+
VALIDATION: Drift scan or bounded source cross-check.
|
|
353
|
+
OUTPUT: Updated doc, drift evidence, remaining doc gaps.
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
What differs: orchestrator gives each specialist a contract shape that matches job, so role stays narrow and reviewable.
|
|
357
|
+
|
|
358
|
+
For evidence-heavy or multi-item beads, let `SCOPE`, `CONSTRAINTS`, and `EXAMPLES` carry opt-in XML tags. Follow prompt-improving `xml_core` style: wrap only the subpart that needs structure, not whole bead. Example: a debugger bead can put stack trace lines in `<evidence>` and do-not-touch items in `<constraints>`, so specialist can scan facts fast without turning every field into markup.
|
|
359
|
+
|
|
360
|
+
## Choosing The Specialist
|
|
361
|
+
|
|
362
|
+
Run `specialists list` if you need live registry. Choose by task, not habit.
|
|
363
|
+
|
|
364
|
+
| Need | Specialist | Use when |
|
|
365
|
+
| --- | --- | --- |
|
|
366
|
+
| Architecture/code mapping | `explorer` | Need evidence and scoped implementation track |
|
|
367
|
+
| Root-cause analysis | `debugger` | Symptom, stack trace, failing test, or regression |
|
|
368
|
+
| Planning/decomposition | `planner` | Need beads, dependencies, file scopes, sequencing |
|
|
369
|
+
| Design/tradeoffs | `overthinker` | Approach is risky, ambiguous, or needs critique |
|
|
370
|
+
| Implementation | `executor` | Contract is clear enough to write code or docs |
|
|
371
|
+
| Compliance/code review | `reviewer` | Executor/debugger produced changes that need final PASS/PARTIAL/FAIL |
|
|
372
|
+
| Implementation sanity | `code-sanity` | Diff smells overcomplicated, brittle, or type-risky |
|
|
373
|
+
| Security/dependency audit | `security-auditor` | Need threat modeling, secure-code review, or agent/config security scan |
|
|
374
|
+
| Multiple review perspectives | `parallel-review` | Critical diff needs independent review passes |
|
|
375
|
+
| Test execution | `test-runner` | Need suites run and failures interpreted |
|
|
376
|
+
| Docs audit/sync | `sync-docs` | Docs may be stale or need targeted synchronization |
|
|
377
|
+
| External/live research | `researcher` | Current non-security library/docs/media lookup is needed |
|
|
378
|
+
| Specialist config | `specialists-creator` | Creating or changing specialist JSON/config |
|
|
379
|
+
| Release publication | `changelog-keeper` | New tag is being cut |
|
|
80
380
|
|
|
81
381
|
Selection rules:
|
|
82
382
|
|
|
83
|
-
-
|
|
84
|
-
-
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
383
|
+
- Explorer is READ_ONLY and should answer specific questions.
|
|
384
|
+
- Debugger beats explorer for failures because it traces causes and remediation.
|
|
385
|
+
- Planner shapes epic/task graph before executor starts.
|
|
386
|
+
- Overthinker defends risky design before code locks in. It is CoT specialist by design, so thinking-heavy turns and `<thinking>` tags fit there.
|
|
387
|
+
- Reviewer already uses structured evidence/gap matrices, which is CoT in disguise; keep that structure, do not add freeform `<thinking>` blocks.
|
|
388
|
+
- Executor, debugger, changelog-keeper, sync-docs, and test-runner should not carry mandatory `<thinking>` blocks. That bloats output without payoff and hides the real contract.
|
|
389
|
+
- Executor does not own full test validation; use reviewer/test-runner for that phase.
|
|
390
|
+
- Sync-docs is for audit/sync; executor is for heavy doc rewrites.
|
|
391
|
+
- Researcher is for current external info, not repo archaeology.
|
|
392
|
+
- Specialists-creator should precede specialist config/schema edits.
|
|
89
393
|
|
|
90
|
-
##
|
|
394
|
+
## Code-sanity
|
|
91
395
|
|
|
92
|
-
|
|
396
|
+
Use code-sanity when diff smells overcomplicated, brittle, or type-risky, but not yet broken enough for debugger. Use it before final review when you want cheap simplification check without blocking merge.
|
|
93
397
|
|
|
94
|
-
|
|
398
|
+
Bead shape:
|
|
95
399
|
|
|
96
400
|
```text
|
|
97
|
-
PROBLEM:
|
|
98
|
-
SUCCESS:
|
|
99
|
-
SCOPE:
|
|
100
|
-
NON_GOALS:
|
|
101
|
-
CONSTRAINTS:
|
|
102
|
-
VALIDATION:
|
|
103
|
-
OUTPUT:
|
|
401
|
+
PROBLEM: Diff has complexity, duplication, or type-safety smell that could hide bugs.
|
|
402
|
+
SUCCESS: Findings isolate concrete smell or confirm clean shape.
|
|
403
|
+
SCOPE: Executor diff, risky files, and any nearby helpers.
|
|
404
|
+
NON_GOALS: No edits, no broad refactor, no merge gate decision.
|
|
405
|
+
CONSTRAINTS: READ_ONLY, keep feedback cheap, cite exact lines or symbols.
|
|
406
|
+
VALIDATION: Findings name concrete improvement or say OK.
|
|
407
|
+
OUTPUT: FINDINGS with severity, or OK with caveats.
|
|
104
408
|
```
|
|
105
409
|
|
|
106
|
-
|
|
410
|
+
Use `sp resume <exec-job> "Code-sanity findings: ..."` or `sp resume <exec-job> "Code-sanity OK; continue to reviewer."` to hand findings back.
|
|
107
411
|
|
|
108
|
-
|
|
109
|
-
|
|
412
|
+
OK is not reviewer PASS. It is advisory only.
|
|
413
|
+
|
|
414
|
+
What differs: orchestrator uses code-sanity as cheap smell screen, not as merge gate.
|
|
415
|
+
|
|
416
|
+
## Security-auditor
|
|
417
|
+
|
|
418
|
+
Use security-auditor when diff touches auth, secrets, input handling, dependency logic, or agent/config surfaces. Keep it advisory and scan-only.
|
|
419
|
+
|
|
420
|
+
Bead shape:
|
|
421
|
+
|
|
422
|
+
```text
|
|
423
|
+
PROBLEM: Diff may open auth, secrets, input, dependency, or agent-config risk.
|
|
424
|
+
SUCCESS: Findings isolate real security concern or confirm no obvious issue.
|
|
425
|
+
SCOPE: Executor diff, touched configs, and security-relevant paths.
|
|
426
|
+
NON_GOALS: No edits, no package updates, no destructive scans, no live exploit tests.
|
|
427
|
+
CONSTRAINTS: LOW permissions, scan-only, recommendations only.
|
|
428
|
+
VALIDATION: Findings cite risk surface and why it matters.
|
|
429
|
+
OUTPUT: Recommendations for executor to apply in a separate bead.
|
|
110
430
|
```
|
|
111
431
|
|
|
112
|
-
|
|
432
|
+
Use `sp resume <exec-job> "Security findings: ..."` or `sp resume <exec-job> "Security scan clean; continue to reviewer."`.
|
|
433
|
+
|
|
434
|
+
No findings is not reviewer PASS. Executor still applies fixes if any, then reviewer decides publish.
|
|
435
|
+
|
|
436
|
+
What differs: orchestrator uses security-auditor to surface risk early, not to bless merge.
|
|
437
|
+
|
|
438
|
+
## Dependency Graph Shapes
|
|
439
|
+
|
|
440
|
+
Draw graph before dispatch.
|
|
441
|
+
|
|
442
|
+
Simple chain:
|
|
113
443
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
444
|
+
```text
|
|
445
|
+
task -> explore -> impl -> review
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
Fix loop:
|
|
449
|
+
|
|
450
|
+
```text
|
|
451
|
+
debug -> exec -> code-sanity? -> security-auditor? -> reviewer
|
|
452
|
+
^ |
|
|
453
|
+
|------ resume PARTIAL --------------|
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
Epic:
|
|
457
|
+
|
|
458
|
+
```text
|
|
459
|
+
epic
|
|
460
|
+
├─ prep/planner
|
|
461
|
+
├─ impl-a
|
|
462
|
+
├─ impl-b
|
|
463
|
+
├─ test-batch
|
|
464
|
+
└─ merge/review chain(s)
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
What differs: orchestrator sees edge shape up front, so can pick sequential chain, fix loop, or multi-chain epic without graph drift.
|
|
120
468
|
|
|
121
469
|
## Canonical Single-Chain Flow
|
|
122
470
|
|
|
123
|
-
Use
|
|
471
|
+
Use for one implementation branch.
|
|
124
472
|
|
|
125
473
|
```bash
|
|
126
474
|
# 1. Create or claim root task bead with complete contract
|
|
127
|
-
bd create --title "
|
|
475
|
+
bd create --title "Fix token refresh retry" --type task --priority 2 --description "PROBLEM: login and refresh flow have a retry bug when transient token refresh fails before backoff clears stale state. SUCCESS: token refresh retries once, login survives transient failure, and terminal failure stays clear. SCOPE: src/auth/refresh.ts, src/cli/login.ts, tests/unit/auth/refresh.test.ts. NON_GOALS: no auth provider redesign, no storage migration, no UI changes. CONSTRAINTS: preserve token format, keep error text backward-compatible, avoid broad retry changes outside auth flow. VALIDATION: add regression test for fail-then-succeed path and run targeted auth tests. OUTPUT: changed files, test proof, residual risks."
|
|
128
476
|
bd update <task> --claim
|
|
129
477
|
|
|
130
478
|
# 2. Optional discovery when path is unknown
|
|
131
|
-
bd create --title "Explore
|
|
479
|
+
bd create --title "Explore auth refresh path" --type task --priority 2 --description "PROBLEM: token refresh retry path is undocumented and likely drifts on failure handling. SUCCESS: evidence-backed plan names exact files, symbols, and risk. SCOPE: src/auth/refresh.ts, src/cli/login.ts, tests/unit/auth/*.test.ts. NON_GOALS: no implementation, no broad audit. CONSTRAINTS: READ_ONLY, cite files/symbols/flows, stay within live repo evidence. VALIDATION: findings cite code path and recommended sequence. OUTPUT: tracked discovery plan with stop condition."
|
|
132
480
|
bd dep add <explore> <task>
|
|
133
481
|
specialists run explorer --bead <explore> --context-depth 3
|
|
134
482
|
specialists result <explore-job>
|
|
135
483
|
|
|
136
484
|
# 3. Implementation
|
|
137
|
-
bd create --title "Implement
|
|
485
|
+
bd create --title "Implement token refresh retry" --type task --priority 2 --description "PROBLEM: login fails after transient token refresh error because retry path returns before backoff and clear error state. SUCCESS: retry waits once, preserves session on success, and surfaces final failure clearly. SCOPE: src/auth/refresh.ts, src/cli/login.ts, tests/unit/auth/refresh.test.ts. NON_GOALS: no auth redesign, no storage migration, no UI refresh. CONSTRAINTS: preserve existing token format, keep backward-compatible error text, avoid broad retry changes elsewhere. VALIDATION: add regression test for transient failure then success; run targeted auth tests. OUTPUT: changed files, test evidence, residual risks."
|
|
138
486
|
bd dep add <impl> <explore-or-task>
|
|
139
487
|
specialists run executor --bead <impl> --context-depth 3
|
|
140
488
|
specialists result <exec-job>
|
|
141
489
|
|
|
142
|
-
# 4.
|
|
490
|
+
# 4. Advisory passes when diff smells risky
|
|
491
|
+
bd create --title "Sanity check token retry diff" --type task --priority 2 --description "PROBLEM: auth retry diff has control-flow and state-handling smell that could hide bug. SUCCESS: findings identify concrete simplification or confirm clean shape. SCOPE: executor diff in auth refresh and login flow. NON_GOALS: no edits, no merge gate decision. CONSTRAINTS: READ_ONLY, keep feedback cheap, cite exact lines or symbols. VALIDATION: findings name concrete improvement or say OK. OUTPUT: FINDINGS with severity or OK with caveats."
|
|
143
492
|
specialists run code-sanity --bead <sanity-bead> --job <exec-job> --context-depth 3
|
|
493
|
+
|
|
494
|
+
bd create --title "Security scan token retry diff" --type task --priority 2 --description "PROBLEM: auth refresh code touches secrets and session handling, so security regression is possible. SUCCESS: findings isolate real risk surface or confirm no obvious issue. SCOPE: executor diff in auth, token storage, and login path. NON_GOALS: no edits, no package updates, no destructive scans, no live exploit tests. CONSTRAINTS: LOW permissions, scan-only, recommendations only. VALIDATION: findings cite auth/secrets/input surface and why it matters. OUTPUT: recommendations for executor to apply in separate bead."
|
|
144
495
|
specialists run security-auditor --bead <security-bead> --job <exec-job> --context-depth 3
|
|
145
496
|
|
|
146
497
|
# 5. Final review
|
|
147
|
-
bd create --title "Review
|
|
498
|
+
bd create --title "Review token refresh retry" --type task --priority 2 --description "PROBLEM: verify executor output against auth retry requirements. SUCCESS: PASS only if retry behavior, error handling, and tests satisfy contract. SCOPE: executor job, diff, acceptance criteria, and target auth files. NON_GOALS: do not rewrite unless explicitly asked. CONSTRAINTS: code-review mindset; findings first; verify security and sanity findings were handled. VALIDATION: inspect targeted checks and regression coverage. OUTPUT: PASS/PARTIAL/FAIL with file/line findings."
|
|
148
499
|
bd dep add <review> <impl>
|
|
149
500
|
specialists run reviewer --bead <review> --job <exec-job> --context-depth 3
|
|
150
501
|
specialists result <review-job>
|
|
@@ -154,11 +505,46 @@ sp merge <impl>
|
|
|
154
505
|
bd close <task> --reason "Reviewer PASS; merged."
|
|
155
506
|
```
|
|
156
507
|
|
|
157
|
-
Edit-capable specialists with `--bead` auto-provision a worktree. `--worktree` is accepted for clarity but
|
|
508
|
+
Edit-capable specialists with `--bead` auto-provision a worktree. `--worktree` is accepted for clarity but usually unnecessary. Use `--job <exec-job>` for reviewer/fix passes that must enter existing executor workspace.
|
|
509
|
+
|
|
510
|
+
What differs: orchestrator carries full bead contract inline, so downstream specialists inherit the actual job shape, not a title.
|
|
511
|
+
|
|
512
|
+
## Multi-Chain Epic Flow
|
|
513
|
+
|
|
514
|
+
Use epic when multiple implementation chains publish together.
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Epic bead
|
|
518
|
+
bd create --title "Epic: auth refresh hardening" --type epic --priority 2 --description "PROBLEM: login and refresh flow have retry drift, weak error surfacing, and unclear follow-up ownership. SUCCESS: epic closes with stable retry behavior, tests, docs, and clean publish. SCOPE: src/auth/*, src/cli/login.ts, tests/unit/auth/*, docs/auth-refresh.md. NON_GOALS: no auth provider swap, no storage migration, no unrelated session revamp. CONSTRAINTS: preserve token format, keep login compatible, sequence risky fixes before merge, use child beads for parallelizable slices. VALIDATION: targeted tests, code-sanity or security pass if risk appears, final reviewer PASS. OUTPUT: merged chain set with notes on remaining gaps."
|
|
519
|
+
|
|
520
|
+
# Planner bead
|
|
521
|
+
bd create --title "Plan auth refresh split" --type task --priority 2 --description "PROBLEM: epic needs disjoint chains before executor starts. SUCCESS: child beads, dependency edges, and file ownership split are explicit. SCOPE: auth refresh epic area. NON_GOALS: no code changes. CONSTRAINTS: keep chains disjoint, identify security-sensitive slice, name review order. VALIDATION: plan names beads and edges. OUTPUT: parallel-ready plan with risk notes."
|
|
522
|
+
bd dep add <plan> <epic>
|
|
523
|
+
specialists run planner --bead <plan> --context-depth 3
|
|
524
|
+
|
|
525
|
+
# Parallel impl beads
|
|
526
|
+
bd create --parent <epic> --title "Impl auth retry" --type task --priority 2 --description "PROBLEM: transient refresh failure breaks login flow. SUCCESS: retry path succeeds after one transient failure and preserves session state. SCOPE: src/auth/refresh.ts, tests/unit/auth/refresh.test.ts. NON_GOALS: no UI changes, no storage migration, no unrelated retry framework edits. CONSTRAINTS: preserve error text, keep backoff bounded, avoid side effects outside auth flow. VALIDATION: regression test for fail-then-succeed path. OUTPUT: code diff, test proof, residual risk list."
|
|
527
|
+
bd create --parent <epic> --title "Impl login handoff" --type task --priority 2 --description "PROBLEM: login CLI does not surface refresh outcome clearly enough for operators. SUCCESS: login shows clear success/failure handoff and no stale token state. SCOPE: src/cli/login.ts, tests/unit/cli/login.test.ts. NON_GOALS: no auth protocol redesign. CONSTRAINTS: preserve CLI flags and error codes, keep output terse. VALIDATION: CLI regression test. OUTPUT: login diff and test evidence."
|
|
528
|
+
|
|
529
|
+
specialists run executor --bead <impl-a> --context-depth 3
|
|
530
|
+
specialists run executor --bead <impl-b> --context-depth 3
|
|
531
|
+
|
|
532
|
+
# Per-chain review
|
|
533
|
+
specialists run reviewer --bead <review-a> --job <exec-a-job> --context-depth 3
|
|
534
|
+
specialists run reviewer --bead <review-b> --job <exec-b-job> --context-depth 3
|
|
535
|
+
|
|
536
|
+
# Publish
|
|
537
|
+
sp epic status <epic>
|
|
538
|
+
sp epic merge <epic>
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
Use `--epic <id>` when job belongs to epic but bead is not direct child. Avoid parallel executors on same file; sequence them or consolidate work.
|
|
542
|
+
|
|
543
|
+
What differs: orchestrator splits graph first, then launches parallel work only when file scopes are provably disjoint.
|
|
158
544
|
|
|
159
545
|
## Review And Fix Loop
|
|
160
546
|
|
|
161
|
-
A chain stays alive until
|
|
547
|
+
A chain stays alive until merged or abandoned.
|
|
162
548
|
|
|
163
549
|
```text
|
|
164
550
|
executor/debugger -> waiting
|
|
@@ -167,16 +553,52 @@ reviewer -> PASS | PARTIAL | FAIL
|
|
|
167
553
|
```
|
|
168
554
|
|
|
169
555
|
- `PASS`: verify expected commit/diff, then publish.
|
|
170
|
-
- `PARTIAL`: resume
|
|
171
|
-
- `FAIL`: stop and decide whether to replace
|
|
556
|
+
- `PARTIAL`: resume same executor/debugger with exact findings, then re-review.
|
|
557
|
+
- `FAIL`: stop and decide whether to replace chain, re-scope bead, or ask operator if judgment is required.
|
|
172
558
|
|
|
173
|
-
Prefer resume over
|
|
559
|
+
Prefer resume over new fix executor when original job is waiting and context is healthy:
|
|
174
560
|
|
|
175
561
|
```bash
|
|
176
562
|
sp resume <exec-job> "Reviewer PARTIAL. Fix only these findings: ..."
|
|
177
563
|
```
|
|
178
564
|
|
|
179
|
-
Do not treat job completion, code-sanity OK,
|
|
565
|
+
Do not treat job completion, code-sanity OK, security no-findings, or test-runner pass as equivalent to reviewer PASS.
|
|
566
|
+
|
|
567
|
+
What differs: orchestrator uses PASS/PARTIAL/FAIL as real control flow, not just status labels.
|
|
568
|
+
|
|
569
|
+
## Mini-Flows For Under-Promoted Specialists
|
|
570
|
+
|
|
571
|
+
Planner:
|
|
572
|
+
- Use when epic needs bead split, dependency graph, or file ownership before code starts.
|
|
573
|
+
- Bead shape: task/epic contract with clear success criteria, child beads, and edge plan.
|
|
574
|
+
- Chain position: first or pre-impl.
|
|
575
|
+
|
|
576
|
+
Debugger:
|
|
577
|
+
- Use when symptom exists and root cause is unclear.
|
|
578
|
+
- Bead shape: reproduction, logs, expected vs actual, scope to investigate.
|
|
579
|
+
- Chain position: before executor, or after a failing review when cause is unclear.
|
|
580
|
+
|
|
581
|
+
Overthinker:
|
|
582
|
+
- Use for risky design, cross-cutting tradeoffs, or premortem before lock-in.
|
|
583
|
+
- Bead shape: options, risks, constraint conflicts, decision asked for.
|
|
584
|
+
- Chain position: before planner/executor when design uncertainty is high.
|
|
585
|
+
|
|
586
|
+
Researcher:
|
|
587
|
+
- Use for current external docs, package behavior, or ecosystem facts that repo cannot answer.
|
|
588
|
+
- Bead shape: source list, question set, required citations.
|
|
589
|
+
- Chain position: before executor when outside facts matter.
|
|
590
|
+
|
|
591
|
+
Test-runner:
|
|
592
|
+
- Use when commands need to run and failures need classification, not fixes.
|
|
593
|
+
- Bead shape: exact command list, suites, and expected failure taxonomy.
|
|
594
|
+
- Chain position: after executor or between fix loops.
|
|
595
|
+
|
|
596
|
+
Sync-docs:
|
|
597
|
+
- Use when one doc drifts and must be synced to source truth.
|
|
598
|
+
- Bead shape: one-doc scope, source cross-check, drift checks.
|
|
599
|
+
- Chain position: parallel to code only when doc scope is isolated; otherwise after code settles.
|
|
600
|
+
|
|
601
|
+
What differs: orchestrator uses specialists beyond the common trio, so planning, diagnosis, research, tests, and docs do not collapse into executor work.
|
|
180
602
|
|
|
181
603
|
## Monitoring And Steering
|
|
182
604
|
|
|
@@ -186,11 +608,11 @@ Use `sp ps` for state and `sp result` for completed turns.
|
|
|
186
608
|
sp ps
|
|
187
609
|
sp ps <job-id>
|
|
188
610
|
sp ps --bead <bead-id>
|
|
189
|
-
sp feed <job-id>
|
|
190
|
-
sp result <job-id>
|
|
611
|
+
sp feed <job-id>
|
|
612
|
+
sp result <job-id>
|
|
191
613
|
```
|
|
192
614
|
|
|
193
|
-
If
|
|
615
|
+
If job is running, use `sp feed`. If it is waiting, use `sp result` and decide whether to resume, review, merge, or stop. Avoid tight polling; sleep based on task size, then check once.
|
|
194
616
|
|
|
195
617
|
Use `steer` for running jobs and `resume` for waiting jobs:
|
|
196
618
|
|
|
@@ -204,10 +626,29 @@ Context usage is an action signal when available:
|
|
|
204
626
|
- 0-40%: healthy.
|
|
205
627
|
- 40-65%: monitor.
|
|
206
628
|
- 65-80%: steer toward conclusion.
|
|
207
|
-
- Above 80%: finish, summarize, or replace
|
|
629
|
+
- Above 80%: finish, summarize, or replace job.
|
|
208
630
|
|
|
209
631
|
Raw token totals are not context percentages.
|
|
210
632
|
|
|
633
|
+
## What Stays Out
|
|
634
|
+
|
|
635
|
+
- `memory-processor` — memory synthesis specialist; see `/documenting`.
|
|
636
|
+
- `xt-merge`: deferred to xt-merge skill; this skill names specialist flow, not merge-wrapper internals.
|
|
637
|
+
|
|
638
|
+
## Adjacent xt commands
|
|
639
|
+
|
|
640
|
+
Source: latest xt report + `xt --help`; keep commands here, not full CLI surface.
|
|
641
|
+
- `xt report` — session report input for release synthesis; see `/session-close-report`.
|
|
642
|
+
- `xt end` — close worktree session: push, PR, merge, cleanup; see `/xt-end`.
|
|
643
|
+
- `xt claude` — launch Claude in sandboxed worktree; see `/using-xtrm`.
|
|
644
|
+
- `xt update` — refresh xtrm-managed files in one repo or many; see `/update-xt`.
|
|
645
|
+
- `xt doctor` — diagnose xtrm drift in current project; see `/update-xt`.
|
|
646
|
+
- `xt init` — bootstrap xtrm in project; see xtrm-tools docs.
|
|
647
|
+
- `xt release prepare/publish` — legacy release path; canonical flow is `/releasing`.
|
|
648
|
+
- `bd prime` — refresh beads workflow context; see `CLAUDE.md`.
|
|
649
|
+
- `memory-processor` — memory synthesis specialist; see `/documenting`.
|
|
650
|
+
- `xt-merge` — defer merge-queue internals to `/xt-merge`.
|
|
651
|
+
|
|
211
652
|
## Merge And Publication
|
|
212
653
|
|
|
213
654
|
Standalone chain:
|
|
@@ -225,25 +666,12 @@ sp epic merge <epic-id>
|
|
|
225
666
|
|
|
226
667
|
Rules:
|
|
227
668
|
|
|
228
|
-
- Merge only after reviewer PASS unless
|
|
669
|
+
- Merge only after reviewer PASS unless operator explicitly accepts draft for follow-up work.
|
|
229
670
|
- Use `sp epic merge` for unresolved epic chains; `sp merge` refuses those by design.
|
|
230
671
|
- Do not manually `git merge` specialist branches.
|
|
231
|
-
- If merge refuses because
|
|
232
|
-
- If merge reports
|
|
233
|
-
- Run or confirm required gates before closing
|
|
234
|
-
|
|
235
|
-
## Multi-Chain Epic Flow
|
|
236
|
-
|
|
237
|
-
Use an epic when multiple implementation chains publish together.
|
|
238
|
-
|
|
239
|
-
1. Create an epic bead with complete contract.
|
|
240
|
-
2. Use planner/explorer for shared prep if needed.
|
|
241
|
-
3. Create independent implementation beads with disjoint file scopes.
|
|
242
|
-
4. Dispatch executors in parallel only when scopes are provably disjoint.
|
|
243
|
-
5. Review each chain with its own review bead and `--job`.
|
|
244
|
-
6. After every chain has reviewer PASS, publish with `sp epic merge <epic-id>`.
|
|
245
|
-
|
|
246
|
-
Use `--epic <id>` when a job belongs to an epic but its bead is not a direct child. Avoid parallel executors on the same file; sequence them or consolidate the work.
|
|
672
|
+
- If merge refuses because chain job is still `waiting`, consume result and either resume/stop/finalize that job deliberately.
|
|
673
|
+
- If merge reports dirty worktree, inspect that worktree. Revert generated noise only when clearly unrelated; otherwise ask or re-dispatch.
|
|
674
|
+
- Run or confirm required gates before closing root bead or epic.
|
|
247
675
|
|
|
248
676
|
## Failure Recovery
|
|
249
677
|
|
|
@@ -258,27 +686,17 @@ sp doctor
|
|
|
258
686
|
|
|
259
687
|
Then choose one action:
|
|
260
688
|
|
|
261
|
-
-
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
- Report blocker if destructive/high-risk/manual action is required.
|
|
267
|
-
|
|
268
|
-
Common recovery commands:
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
sp stop <job-id>
|
|
272
|
-
sp clean --processes --dry-run
|
|
273
|
-
sp epic status <epic-id>
|
|
274
|
-
sp epic sync <epic-id> --apply
|
|
275
|
-
sp epic abandon <epic-id> --reason "..."
|
|
276
|
-
specialists doctor --check-drift
|
|
277
|
-
sp prune-stale-defaults --dry-run
|
|
278
|
-
```
|
|
279
|
-
|
|
280
|
-
Do not silently take over substantial specialist work yourself unless the operator agrees or the remaining change is genuinely small and deterministic.
|
|
689
|
+
- Resume waiting executor/debugger with exact findings.
|
|
690
|
+
- Re-run with better bead if contract was weak.
|
|
691
|
+
- Re-scope bead if scope was wrong.
|
|
692
|
+
- Escalate if human decision is needed.
|
|
693
|
+
- Replace specialist only if failure mode repeats.
|
|
281
694
|
|
|
282
|
-
## What
|
|
695
|
+
## What Orchestrator Does Differently Because Of This Skill
|
|
283
696
|
|
|
284
|
-
|
|
697
|
+
- Writes bead contract before dispatch.
|
|
698
|
+
- Chooses edge type before creating chain.
|
|
699
|
+
- Uses specialist role by job shape, not by habit.
|
|
700
|
+
- Keeps fix loops alive with resume, not re-spawn.
|
|
701
|
+
- Treats reviewer PASS as only publish gate.
|
|
702
|
+
- Keeps memory-processor and xt-merge out of this skill on purpose.
|