superpowers-mcp 6.2.3 → 6.3.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.
@@ -53,8 +53,11 @@ without it, so always give the user the **complete** URL from the `url` field fo
53
53
  the first load — never strip the query string. The key gates HTTP access, then
54
54
  moves into an `HttpOnly`/`SameSite=Strict` cookie; the browser's same-origin
55
55
  WebSocket automatically sends that cookie. The key is never stored in
56
- page-readable storage. A new server invocation rotates the key, so a restarted
57
- server requires the new URL.
56
+ page-readable storage. With `--project-dir`, the key is persisted to
57
+ `.superpowers/brainstorm/.last-token` and reused across restarts, so an
58
+ already-open tab stays connected; delete that file (with the server stopped)
59
+ to force a fresh key. Without it, a new server invocation rotates the key and
60
+ a restarted server requires the new URL.
58
61
 
59
62
  **Finding connection info:** The server writes its startup JSON to `$STATE_DIR/server-info`. If you launched the server in the background and didn't capture stdout, read that file to get the URL and port. When using `--project-dir`, check `<project>/.superpowers/brainstorm/` for the session directory.
60
63
 
@@ -104,7 +107,7 @@ The `--url-host` value must also be a loopback hostname or address.
104
107
  ## The Loop
105
108
 
106
109
  1. **Check server is alive**, then **write HTML** to a new file in `screen_dir`:
107
- - **Required: confirm the server is alive before referring to the URL or pushing a screen.** Check that `$STATE_DIR/server-info` exists and `$STATE_DIR/server-stopped` does not. If it has shut down, restart it with `start-server.sh` using the **same `--project-dir`** — it may reuse the same port, but the authentication key rotates, so share the new URL from `server-info` with the user. The server auto-exits after 4 hours idle (configurable with `--idle-timeout-minutes`).
110
+ - **Required: confirm the server is alive before referring to the URL or pushing a screen.** Check that `$STATE_DIR/server-info` exists and `$STATE_DIR/server-stopped` does not. If it has shut down, restart it with `start-server.sh` using the **same `--project-dir`** — it reuses the same port and session key (from `.last-token`), so an already-open tab keeps working; without `--project-dir` the key rotates, so share the new URL from `server-info` with the user. The server auto-exits after 4 hours idle (configurable with `--idle-timeout-minutes`).
108
111
  - Use semantic filenames: `platform.html`, `visual-style.html`, `layout.html`
109
112
  - **Never reuse filenames** — each screen gets a fresh file
110
113
  - Use your file-creation tool — **never use cat/heredoc** (dumps noise into terminal)
@@ -174,6 +174,35 @@ git worktree remove "$WORKTREE_PATH"
174
174
  git worktree prune # Self-healing: clean up any stale registrations
175
175
  ```
176
176
 
177
+ **If removal is refused** (`contains modified or untracked files`): the
178
+ worktree holds files that exist nowhere else — uncommitted plans, notes,
179
+ or scratch work. Never `--force` on your own initiative. Show your human
180
+ partner what is at stake and ask:
181
+
182
+ ```bash
183
+ git -C "$WORKTREE_PATH" status --porcelain -uall
184
+ ```
185
+
186
+ ```
187
+ Worktree removal refused — these files were never committed:
188
+
189
+ <file list>
190
+
191
+ 1. Commit them to <branch> before cleanup
192
+ 2. Move them into <main repo root>
193
+ 3. Delete them (unrecoverable)
194
+
195
+ Which?
196
+ ```
197
+
198
+ Carry out the choice, then remove the worktree.
199
+
200
+ **If you chose "Commit them to <branch>" after a merge (Option 1):** the
201
+ new commit sits on top of the merge, so `git branch -d <feature-branch>`
202
+ will refuse ("not fully merged"). Merge the branch into the base branch
203
+ again — or cherry-pick the new commit there — before cleanup, so the
204
+ saved files survive the branch deletion.
205
+
177
206
  **Otherwise:** The host environment owns this workspace — leave it in
178
207
  place. If your platform provides a workspace-exit tool, use it.
179
208
 
@@ -196,6 +225,7 @@ place. If your platform provides a workspace-exit tool, use it.
196
225
  | "'Yeah, get rid of it' counts as confirmation" | Only the typed word `discard` authorizes deletion. |
197
226
  | "The PR is up, so the worktree is clutter now" | PR feedback gets fixed in that worktree. It stays until the work lands. |
198
227
  | "This other worktree looks stale — I'll clean it too" | Clean up only worktrees under `.worktrees/` or `worktrees/`. Everything else belongs to the host. |
228
+ | "Removal refused — `--force` is just finishing the cleanup" | The refusal means files exist only in that worktree. `--force` destroys them permanently. Show your human partner and ask. |
199
229
  | "The merged-result failure is probably flaky" | A failing merged result stops everything. Branch and worktree stay put while you investigate. |
200
230
  | "The base branch is obviously main" | Confirm the fork point or ask. Merging into the wrong base is expensive to undo. |
201
231
  | "The push was rejected — force-push will fix it" | A rejected push means the remote moved. Investigate; force-push only on your human partner's explicit request. |
@@ -34,6 +34,15 @@ Subagent (general-purpose):
34
34
 
35
35
  Your review is read-only on this checkout. Do not mutate the working tree, the index, HEAD, or branch state in any way. Use tools like `git show`, `git diff`, and `git log` to inspect history. If you need a working copy of a different revision, check it out into a separate temporary directory (e.g. `git worktree add /tmp/review-[SHA] [SHA]`) — never move HEAD on this checkout.
36
36
 
37
+ ## You Do Not Dispatch Subagents
38
+
39
+ Do all of this review yourself. Never spawn a subagent to review part
40
+ of the diff, and never spawn another reviewer for a second opinion.
41
+ This process already provides every review seat the work gets; a
42
+ reviewer you spawn duplicates one of them at full cost, and its
43
+ verdict counts for nothing. If the diff feels too large for one
44
+ pass, review it in passes yourself and say so in your report.
45
+
37
46
  ## What to Check
38
47
 
39
48
  **Plan alignment:**
@@ -14,7 +14,21 @@ Execute plan by dispatching a fresh implementer subagent per task, a task review
14
14
  **Narration:** between tool calls, narrate at most one short line — the
15
15
  ledger and the tool results carry the record.
16
16
 
17
- **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
17
+ **Continuous execution:** Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are the four named below, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
18
+
19
+ **Rulings, not stalls.** A running plan does not wait on a human. Conflicts,
20
+ ambiguities, plan defects, a cap you would have asked to exceed — decide
21
+ them. The spec is the binding authority, the plan is its argument, and your
22
+ judgment settles what neither answers. Record every decision in the ledger as
23
+ `Ruling: <what you decided> — <why> — <what it costs if wrong>`, and keep
24
+ going. A wrong ruling costs rework your human partner can see and undo; a
25
+ session parked on a question costs their whole day and buys nothing.
26
+
27
+ Four things stop you, and only these: an irreversible or destructive
28
+ operation; a security-sensitive action; a side effect outside this worktree
29
+ that norms say you ask about first (a merge, a push to a shared branch, a
30
+ publish); and a plan so broken that every path forward is a guess. For those,
31
+ stop and ask.
18
32
 
19
33
  ## When to Use
20
34
 
@@ -57,14 +71,14 @@ digraph process {
57
71
  "Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [shape=box];
58
72
  "Spec ✅ and quality approved?" [shape=diamond];
59
73
  "Finding conflicts with plan text?" [shape=diamond];
60
- "Ask human partner which governs" [shape=box];
74
+ "Rule on the conflict, ledger the ruling" [shape=box];
61
75
  "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [shape=box];
62
76
  "Dispatch scoped re-review (./re-review-prompt.md)" [shape=box];
63
77
  "All findings addressed?" [shape=diamond];
64
78
  "R = 5?" [shape=diamond];
65
79
  "Adjudicate each open finding" [shape=box];
66
80
  "Any load-bearing finding?" [shape=diamond];
67
- "STOP: report BLOCKED to human partner" [shape=box];
81
+ "Rule and continue; stop only if every path forward is a guess" [shape=box];
68
82
  "Park findings in ledger with rulings" [shape=box];
69
83
  "Append completion to ledger, mark todo complete" [shape=box];
70
84
  }
@@ -85,8 +99,8 @@ digraph process {
85
99
  "Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" -> "Spec ✅ and quality approved?";
86
100
  "Spec ✅ and quality approved?" -> "Append completion to ledger, mark todo complete" [label="yes"];
87
101
  "Spec ✅ and quality approved?" -> "Finding conflicts with plan text?" [label="no"];
88
- "Finding conflicts with plan text?" -> "Ask human partner which governs" [label="yes"];
89
- "Ask human partner which governs" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model";
102
+ "Finding conflicts with plan text?" -> "Rule on the conflict, ledger the ruling" [label="yes"];
103
+ "Rule on the conflict, ledger the ruling" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model";
90
104
  "Finding conflicts with plan text?" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [label="no"];
91
105
  "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" -> "Dispatch scoped re-review (./re-review-prompt.md)";
92
106
  "Dispatch scoped re-review (./re-review-prompt.md)" -> "All findings addressed?";
@@ -95,7 +109,7 @@ digraph process {
95
109
  "R = 5?" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [label="no - next round"];
96
110
  "R = 5?" -> "Adjudicate each open finding" [label="yes - breaker trips"];
97
111
  "Adjudicate each open finding" -> "Any load-bearing finding?";
98
- "Any load-bearing finding?" -> "STOP: report BLOCKED to human partner" [label="yes"];
112
+ "Any load-bearing finding?" -> "Rule and continue; stop only if every path forward is a guess" [label="yes"];
99
113
  "Any load-bearing finding?" -> "Park findings in ledger with rulings" [label="no"];
100
114
  "Park findings in ledger with rulings" -> "Append completion to ledger, mark todo complete";
101
115
  "Append completion to ledger, mark todo complete" -> "More tasks remain?";
@@ -140,19 +154,32 @@ a ledger file, not only in todos.
140
154
  that happens, recover from `git log`.
141
155
 
142
156
  Read the plan once, note its context and Global Constraints, and create a
143
- todo per task.
157
+ todo per task. If the plan names a Spec, read that too: the spec is the
158
+ authority the plan argues from, and conflicts inside the plan resolve
159
+ against it. A plan with no reachable spec gets a ledger note saying so —
160
+ rulings made without one are provisional.
144
161
 
145
- Before dispatching Task 1, scan the plan once for conflicts:
162
+ Before dispatching Task 1, scan the plan once for conflicts, writing down
163
+ what you checked as you check it:
146
164
 
147
165
  - tasks that contradict each other or the plan's Global Constraints
148
166
  - anything the plan explicitly mandates that the review rubric treats as a
149
167
  defect (a test that asserts nothing, verbatim duplication of a logic block)
150
168
 
151
- Present everything you find to your human partner as one batched question —
152
- each finding beside the plan text that mandates it, asking which governs —
153
- before execution begins, not one interrupt per discovery mid-plan. If the
154
- scan is clean, proceed without comment. The review loop remains the net for
155
- conflicts that only emerge from implementation.
169
+ The scan's output is a table, not a verdict. One row for every pair of tasks
170
+ that share a file or an interface: the two tasks, what one produces against
171
+ what the other consumes, and what you found. One row for every task: whether
172
+ its own text agrees with itself — the tests it specifies against the code it
173
+ specifies, the files it creates against the files it later touches. "The scan
174
+ is clean" without those rows is not a scan you ran.
175
+
176
+ Write the table to the ledger. Rule on everything you find before execution
177
+ begins — each finding against the plan text that mandates it — and record
178
+ each ruling in the ledger. If the scan is clean, proceed without comment.
179
+ Rule on each conflict it surfaces — the spec is the binding authority, the
180
+ plan is its argument — record the ruling beside its row, and dispatch
181
+ Task 1. The review loop remains the net for conflicts that only emerge from
182
+ implementation.
156
183
 
157
184
  ## Model Selection
158
185
 
@@ -193,17 +220,37 @@ that implementer. Single-file mechanical fixes also take the cheapest tier.
193
220
 
194
221
  ## The Task Loop
195
222
 
223
+ **Batch small same-shape work.** When the plan lists several tasks that are
224
+ each a small, independent edit of the same kind — the same one-line fix,
225
+ constant change, or field addition repeated across files — do not dispatch
226
+ one subagent per task. Compose ONE dispatch brief listing every file and
227
+ its change, send the whole batch to a single subagent, and review its diff
228
+ as one unit. Reserve one-dispatch-per-task for work that needs its own
229
+ judgment, its own tests, or its own review surface.
230
+
196
231
  Everything you paste into a dispatch prompt — and everything a subagent
197
232
  prints back — stays resident in your context for the rest of the session
198
233
  and is re-read on every later turn. Hand artifacts over as files.
199
234
 
235
+ **Waiting on dispatched subagents:** never poll a wait interface with
236
+ short timeouts, and never sit in one silent, open-ended wait either.
237
+ While you have local work — ledger updates, packaging the next review,
238
+ reading reports — keep working; child results arrive on their own.
239
+ When you are genuinely idle, wait in bounded stretches (five to ten
240
+ minutes, where your platform allows), and between stretches post one
241
+ line of status and reconcile your live children: list them, and chase
242
+ any that finished without reporting. A bounded stretch keeps nearly
243
+ all of a long wait's efficiency while guaranteeing a stuck or lost
244
+ child is noticed within minutes, not at the end of the session.
245
+
200
246
  ### 1. Dispatch the implementer
201
247
 
202
248
  Record BASE (`git rev-parse HEAD`) before dispatching — the review package
203
249
  and fix-round diffs need it.
204
250
 
205
251
  - **Task brief:** before dispatching an implementer, run this skill's
206
- `scripts/task-brief PLAN_FILE N` (or `scripts/task-brief.ps1 PLAN_FILE N` on Windows PowerShell) — it extracts the task's full text to a
252
+ `scripts/task-brief PLAN_FILE N` (or `scripts/task-brief.ps1 PLAN_FILE N` on
253
+ Windows PowerShell) — it extracts the task's full text to a
207
254
  uniquely named file and prints the path. Compose the dispatch so the
208
255
  brief stays the single source of
209
256
  requirements. Your dispatch should contain: (1) one line on where this
@@ -223,6 +270,12 @@ and fix-round diffs need it.
223
270
  later dispatches — a real session's dispatch hit 42k chars of which 99%
224
271
  was pasted history. A fresh subagent needs its task, the interfaces it
225
272
  touches, and the global constraints. Nothing else.
273
+ - The dispatch carries the no-subagents contract (it is in the
274
+ implementer template): the implementer never dispatches subagents —
275
+ not helpers, and never a reviewer. Review arrives from you, after the
276
+ report. In real sessions, every reviewer a worker spawned duplicated
277
+ the task review the controller dispatched anyway — a full extra
278
+ review seat per task.
226
279
  - If an earlier task parked a finding in the area this task touches, carry
227
280
  a pointer to that ledger entry in the dispatch.
228
281
  - Record the implementer's agent identity from the dispatch result —
@@ -245,7 +298,7 @@ Implementer subagents report one of four statuses. Handle each appropriately:
245
298
  1. If it's a context problem, provide more context and re-dispatch with the same model
246
299
  2. If the task requires more reasoning, re-dispatch with a more capable model
247
300
  3. If the task is too large, break it into smaller pieces
248
- 4. If the plan itself is wrong, escalate to the human
301
+ 4. If the plan itself is wrong, rule on the correction, ledger it, and re-dispatch with the ruling carried in the dispatch
249
302
 
250
303
  **Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
251
304
 
@@ -262,7 +315,9 @@ required. Implementer self-review never replaces the task review; both are
262
315
  needed.
263
316
 
264
317
  - Hand the reviewer its diff as a file: run this skill's
265
- `scripts/review-package PLAN_FILE BASE HEAD` (or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell) and pass the reviewer the file path
318
+ `scripts/review-package PLAN_FILE BASE HEAD` (or
319
+ `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell) and
320
+ pass the reviewer the file path
266
321
  it prints (or, without bash: `git log --oneline`, `git diff --stat`,
267
322
  and `git diff -U10` for the range, redirected to one uniquely named
268
323
  file). The output never enters your own context, and the reviewer sees
@@ -312,10 +367,11 @@ Before the loop starts, two routes leave it immediately:
312
367
  before merge. A roll-up nobody reads is a silent discard. Minor findings
313
368
  never enter the loop.
314
369
  - A finding labeled plan-mandated — or any finding that conflicts with
315
- what the plan's text requires — is the human's decision, like any plan
316
- contradiction: present the finding and the plan text, ask which governs.
317
- Do not dismiss the finding because the plan mandates it, and do not
318
- dispatch a fix that contradicts the plan without asking.
370
+ what the plan's text requires — is yours to rule on: weigh the finding
371
+ against the plan text, decide with the spec as the binding authority, and
372
+ ledger the ruling before you act on it. Do not dismiss the finding because
373
+ the plan mandates it, and do not dispatch a fix that contradicts the plan
374
+ without a recorded ruling.
319
375
  Everything else enters the loop. A fix round is one fix dispatch plus one
320
376
  scoped re-review. Five rounds maximum per task:
321
377
 
@@ -361,15 +417,16 @@ dispatching. Adjudicate each open finding yourself — you hold the plan and
361
417
  the cross-task context the reviewer lacks:
362
418
 
363
419
  - **The reviewer is wrong, or the point is contestable:** park it —
364
- `Task <N>: parked — <finding> — ruling: <why the code stands>`. The final
420
+ `Task <N>: parked — <finding> — Ruling: <why the code stands>`. The final
365
421
  review sees both sides.
366
422
  - **Real, but nothing downstream builds on it:** park it the same way, with
367
423
  a ruling that says it's real and deferred.
368
424
  - **Real and load-bearing** — a later task builds on it, or it reveals a
369
- plan defect: STOP. Append `Task <N>: BLOCKED — <reason>` and report to
370
- your human partner with the finding, the plan text it collides with, and
371
- the fix history. Parking a structural failure lets every dependent task
372
- build on it and hands the final review a problem it cannot fix either.
425
+ plan defect: rule on the smallest change that unblocks the dependent work,
426
+ ledger it as `Task <N>: Ruling: <finding> — <what you decided and why>`,
427
+ and carry it into the next task's dispatch. Parking a structural failure
428
+ silently lets every dependent task build on it. Stop only when the defect
429
+ leaves every path forward a guess.
373
430
 
374
431
  Adjudicate only at the cap. Adjudicating earlier to end a loop is
375
432
  pre-judging with a different name. Every adjudication is a ledger entry —
@@ -392,8 +449,10 @@ parked-with-ruling at the cap.
392
449
  ## Final Review
393
450
 
394
451
  The final whole-branch review gets a package too: run
395
- `scripts/review-package PLAN_FILE MERGE_BASE HEAD` (or `scripts/review-package.ps1 PLAN_FILE MERGE_BASE HEAD` on Windows PowerShell; MERGE_BASE = the commit the
396
- branch started from, e.g. `git merge-base main HEAD`) and include the
452
+ `scripts/review-package PLAN_FILE MERGE_BASE HEAD` (or
453
+ `scripts/review-package.ps1 PLAN_FILE MERGE_BASE HEAD` on Windows PowerShell;
454
+ MERGE_BASE = the commit the branch started from, e.g. `git merge-base main HEAD`)
455
+ and include the
397
456
  printed path in the final review dispatch, so the final reviewer reads
398
457
  one file instead of re-deriving the branch diff with git commands. Dispatch
399
458
  on the most capable available model (see Model Selection), using
@@ -407,15 +466,27 @@ with the complete findings list — not one fixer per finding.
407
466
  Per-finding fixers each rebuild context and re-run suites; a real
408
467
  session's final-review fix wave cost more than all its tasks combined.
409
468
  Then run exactly one scoped re-review of the fix wave
410
- (`scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
469
+ (`scripts/review-package PLAN_FILE FIX_BASE HEAD`, or
470
+ `scripts/review-package.ps1 PLAN_FILE FIX_BASE HEAD` on Windows PowerShell,
471
+ over the fix range,
411
472
  [re-review-prompt.md](re-review-prompt.md)).
412
473
  Adjudicate any residual findings as in the task loop's breaker: park with
413
- rulings, or stop on load-bearing ones. There is no second fix wave —
474
+ rulings, or rule on the load-bearing ones and ledger what you decided. Only
475
+ the four classes above stop you here. There is no second fix wave —
414
476
  residual load-bearing findings surface to your human partner when
415
477
  finishing-a-development-branch presents the options.
416
478
 
417
479
  ## Finish
418
480
 
481
+ Before you delete anything, collect every ledger line containing `Ruling:` —
482
+ preflight rulings, parked findings, breaker adjudications, all of them — into
483
+ your final message under "Rulings I made", in the order you made them, each
484
+ with what it costs if wrong. The list is exhaustive: if the ledger holds a
485
+ ruling, the list holds it. That list is the only place the decisions you
486
+ took on your human partner's behalf reach them — they read it and rework
487
+ whatever you got wrong. A ruling that dies with the workspace was a decision
488
+ made in secret.
489
+
419
490
  When the final whole-branch review is clean and its fixes are merged,
420
491
  delete this plan's workspace (`rm -rf <workspace>`) — the git history is
421
492
  the record now. Sibling directories belong to other plans; leave them
@@ -435,6 +506,7 @@ Use superpowers:finishing-a-development-branch.
435
506
  | "The fix was small, skip the re-review" | Unreviewed fixes are how regressions land. Every round ends with a scoped re-review. |
436
507
  | "Reviews slow the loop down" | The loop without reviews is just unverified churn. Reviews are the loop's brakes and steering. |
437
508
  | "Ledger bookkeeping is overhead" | The ledger is what survives compaction. Controllers without one have re-dispatched entire completed task sequences. |
509
+ | "The implementer spawned its own reviewer — free extra assurance" | It's a duplicate seat reviewing the same diff; the task review is the gate. A worker-spawned reviewer is a defect to flag, not rigor. |
438
510
 
439
511
  ## Example Workflow
440
512
 
@@ -47,6 +47,18 @@ Subagent (general-purpose):
47
47
  While iterating, run the focused test for what you're changing; run the
48
48
  full suite once before committing, not after every edit.
49
49
 
50
+ ## You Do Not Dispatch Subagents
51
+
52
+ Do all of this task's work yourself. Never spawn a subagent to
53
+ implement part of the task, and above all never spawn a reviewer to
54
+ check your work. Self-review (below) means reading your own diff.
55
+ Review is the controller's job: after you report, it dispatches a
56
+ fresh reviewer against your diff. A reviewer you spawn duplicates
57
+ that review at full cost, and its approval counts for nothing in
58
+ the process. If you catch yourself thinking "an independent review
59
+ would strengthen my report" — that review is already scheduled.
60
+ Report instead.
61
+
50
62
  ## Code Organization
51
63
 
52
64
  You reason best about code you can hold in context at once, and your edits are more
@@ -43,6 +43,15 @@ Subagent (general-purpose):
43
43
  Your review is read-only on this checkout. Do not mutate the working
44
44
  tree, the index, HEAD, or branch state in any way.
45
45
 
46
+ ## You Do Not Dispatch Subagents
47
+
48
+ Do all of this review yourself. Never spawn a subagent to review part
49
+ of the diff, and never spawn another reviewer for a second opinion.
50
+ This process already provides every review seat the work gets; a
51
+ reviewer you spawn duplicates one of them at full cost, and its
52
+ verdict counts for nothing. If the diff feels too large for one
53
+ pass, review it in passes yourself and say so in your report.
54
+
46
55
  ## Scope
47
56
 
48
57
  Your scope is the findings list and the fix diff. Verdict every finding.
@@ -22,7 +22,7 @@ if (-not (Test-Path -LiteralPath $plan -PathType Leaf)) {
22
22
  exit 2
23
23
  }
24
24
 
25
- $slug = [System.IO.Path]::GetFileName($plan) -replace '\.md$', ''
25
+ $slug = [System.IO.Path]::GetFileName($plan) -creplace '\.md$', ''
26
26
  if ([string]::IsNullOrEmpty($slug) -or $slug -eq "." -or $slug -eq "..") {
27
27
  [Console]::Error.WriteLine("cannot derive a workspace name from: $plan")
28
28
  exit 2
@@ -52,6 +52,15 @@ Subagent (general-purpose):
52
52
  Your review is read-only on this checkout. Do not mutate the working
53
53
  tree, the index, HEAD, or branch state in any way.
54
54
 
55
+ ## You Do Not Dispatch Subagents
56
+
57
+ Do all of this review yourself. Never spawn a subagent to review part
58
+ of the diff, and never spawn another reviewer for a second opinion.
59
+ This process already provides every review seat the work gets; a
60
+ reviewer you spawn duplicates one of them at full cost, and its
61
+ verdict counts for nothing. If the diff feels too large for one
62
+ pass, review it in passes yourself and say so in your report.
63
+
55
64
  ## Do Not Trust the Report
56
65
 
57
66
  Treat the implementer's report as unverified claims about the code. It
@@ -75,6 +84,13 @@ Subagent (general-purpose):
75
84
  Warnings or other noise in the implementer's reported test output are
76
85
  findings — test output should be pristine.
77
86
 
87
+ Evidence you cannot see is not evidence that doesn't exist. If the
88
+ report or its test evidence looks truncated, or you cannot locate the
89
+ results it claims, re-read the file at its stated path — and if it is
90
+ genuinely missing or garbled, report that as a gap for the controller.
91
+ Re-running the suite to regenerate what you failed to read is not
92
+ verification; illegibility of the evidence is not invalidation of it.
93
+
78
94
  ## Part 1: Spec Compliance
79
95
 
80
96
  Compare the diff against What Was Requested:
@@ -86,6 +102,12 @@ Subagent (general-purpose):
86
102
  - **Misunderstood:** right feature built the wrong way, wrong problem
87
103
  solved
88
104
 
105
+ If the brief lists several files each with its own change (a batched
106
+ dispatch), check the diff against that list file by file: every listed
107
+ file must have its corresponding hunk. A listed file the diff never
108
+ touches is a Missing finding, no matter how clean the rest of the
109
+ batch looks.
110
+
89
111
  If a requirement cannot be verified from this diff alone (it lives in
90
112
  unchanged code or spans tasks), report it as a ⚠️ item instead of
91
113
  broadening your search.
@@ -167,8 +189,7 @@ Subagent (general-purpose):
167
189
 
168
190
  **Placeholders:**
169
191
  - `[MODEL]` — REQUIRED: reviewer model per SKILL.md Model Selection
170
- - `[BRIEF_FILE]` — REQUIRED: the task brief file (`scripts/task-brief PLAN N`,
171
- or `scripts/task-brief.ps1 PLAN N` on Windows PowerShell,
192
+ - `[BRIEF_FILE]` — REQUIRED: the task brief file (`scripts/task-brief PLAN N`, or `scripts/task-brief.ps1 PLAN N` on Windows PowerShell,
172
193
  prints the path; same file the implementer worked from)
173
194
  - `[GLOBAL_CONSTRAINTS]` — the binding requirements copied verbatim from
174
195
  the plan's Global Constraints section or the spec: exact values, formats,
@@ -179,9 +200,8 @@ Subagent (general-purpose):
179
200
  - `[BASE_SHA]` — commit before this task
180
201
  - `[HEAD_SHA]` — current commit
181
202
  - `[DIFF_FILE]` — REQUIRED: the path the controller wrote the review
182
- package to (`scripts/review-package PLAN_FILE BASE HEAD`, or
183
- `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell,
184
- prints the unique path it wrote; the package never enters the controller's context)
203
+ package to (`scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, prints the unique
204
+ path it wrote; the package never enters the controller's context)
185
205
 
186
206
  **Reviewer returns:** Spec Compliance verdict (✅/❌/⚠️), Strengths, Issues
187
207
  (Critical/Important/Minor), Task quality verdict
@@ -56,6 +56,7 @@ If your harness appears here, read its reference file for special instructions:
56
56
  - Codex: `references/codex-tools.md`
57
57
  - Pi: `references/pi-tools.md`
58
58
  - Antigravity: `references/antigravity-tools.md`
59
+ - Hermes Agent: `references/hermes-tools.md`
59
60
 
60
61
  ## User Instructions
61
62
 
@@ -7,7 +7,76 @@ Add to your Codex config (`~/.codex/config.toml`):
7
7
  multi_agent = true
8
8
  ```
9
9
 
10
- This enables `spawn_agent`, `wait_agent`, and `close_agent` for skills like `dispatching-parallel-agents` and `subagent-driven-development`. When using subagent-driven-development, close reviewer subagents when their review returns. Keep each implementer subagent open until its task's review passes — the fix loop resumes the implementer — then close it. If your harness cannot send another message to a spawned agent, dispatch each fix round as a fresh implementer carrying the brief, the report file, and the findings.
10
+ This enables the multi-agent tools that skills like
11
+ `dispatching-parallel-agents` and `subagent-driven-development` use.
12
+ Which tools you get depends on the multi-agent version your model
13
+ preset selects (current presets run V2; older ones run V1). Trust your
14
+ actual tool list over any table — including this one — when they
15
+ disagree.
16
+
17
+ - **Spawning:** give children a clean context with
18
+ `spawn_agent {fork_turns: "none"}`; the default `"all"` copies your
19
+ entire transcript into the child. On Codex 0.145+, role files under
20
+ `~/.codex/agents/` attach to isolated forks via `agent_type`.
21
+ Full-history forks accept `model` and `reasoning_effort` overrides
22
+ (only `agent_type` is refused there) — isolated forks are the SDD
23
+ default for context hygiene, not because overrides require them.
24
+ - **Fix rounds:** resume the implementer with `followup_task` — it
25
+ delivers your message, triggers a turn, and transparently reloads a
26
+ child the harness evicted. Never dispatch a fresh implementer on the
27
+ theory that a spawned agent cannot be messaged again; on V2 it
28
+ always can.
29
+ - **Lifecycle:** V2 has no `close_agent`. Finished children are
30
+ evicted automatically when slots are needed; leaving them unclosed
31
+ costs nothing. Only V1 sessions have `close_agent` — there, close
32
+ reviewers when their review returns, and close each implementer
33
+ after its task's review passes.
34
+ - **Model names:** never copy a model name from a skill, table, or old
35
+ session into `spawn_agent` without checking it against your current
36
+ spawn allowlist — V2 accepts only V2-capable presets and hard-errors
37
+ on the rest.
38
+
39
+ ## Waiting on children
40
+
41
+ `wait_agent` is an event subscription, not a poll: a long wait wakes
42
+ the moment a child produces mailbox activity, with the same latency as
43
+ a short one. Short-timeout polling buys nothing and costs a tool call —
44
+ and a context rebill — per poll. In measured sessions, roughly
45
+ two-thirds of all wait calls were short polls that timed out.
46
+
47
+ - While you still have local work, do not wait at all. A completed
48
+ child's final answer is pushed into your mailbox and arrives with
49
+ your next turn.
50
+ - When you are genuinely idle with children outstanding, wait in
51
+ bounded stretches: `wait_agent` with `timeout_ms` 300000-600000
52
+ (5-10 minutes). After each stretch — wake or timeout — post one
53
+ status line, run `list_agents`, and chase any child that finished
54
+ without reporting. Never stack polls shorter than five minutes; the
55
+ event subscription wakes a bounded stretch just as fast as a short
56
+ one.
57
+ - Completion mail cannot wake an idle controller (it is delivered
58
+ without triggering a turn); covering that idle window is
59
+ `wait_agent`'s only job. A stretch that times out with no activity
60
+ is your cue to reconcile, not to shorten the next stretch.
61
+
62
+ ## Model routing on spawns
63
+
64
+ Every `spawn_agent` you issue — including when you are yourself a
65
+ spawned child running a fan-out — sets `model` AND `reasoning_effort`
66
+ explicitly, per the Model Selection rules of the skill you are
67
+ executing. Setting `model` alone is a trap: the child's effort
68
+ silently resets to that model's default, not to yours.
69
+
70
+ Ask your human partner to add a machine-level backstop to
71
+ `~/.codex/config.toml` so any spawn that slips through still routes to
72
+ a deliberate tier instead of silently inheriting the session's most
73
+ expensive model:
74
+
75
+ ```toml
76
+ [agents]
77
+ default_subagent_model = "<a mid-tier model from your spawn allowlist>"
78
+ default_subagent_reasoning_effort = "medium"
79
+ ```
11
80
 
12
81
  ## Environment Detection
13
82
 
@@ -0,0 +1,56 @@
1
+ # Hermes Agent Tool Mapping
2
+
3
+ Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Hermes Agent these resolve to the tools below.
4
+
5
+ ## Tools
6
+
7
+ | Action skills request | Hermes tool |
8
+ |---|---|
9
+ | Read a file | `read_file` |
10
+ | Create a new file | `write_file` |
11
+ | Edit a file (targeted patch) | `patch` |
12
+ | Run a shell command | `terminal` |
13
+ | Search file contents | `search_files` |
14
+ | Find files by name | `terminal` with `find` |
15
+ | Fetch a URL / read a webpage | `web_extract(urls=[...])` |
16
+ | Search the web | `web_search(query=...)` |
17
+ | Dispatch a subagent | `delegate_task(goal=..., context=..., toolsets=[...], role="leaf")` |
18
+ | Task tracking | `todo` tool |
19
+ | Invoke a skill | `skill_view("skill-name")` |
20
+
21
+ ## Instructions file
22
+
23
+ When a skill mentions "your instructions file," on Hermes Agent this is **`AGENTS.md`** in the project directory, or **`SOUL.md`** globally at `~/.hermes/SOUL.md`.
24
+
25
+ ## Invoking a skill
26
+
27
+ Hermes Agent has a `skills` toolset with `skill_view` and `skills_list` tools.
28
+ To invoke a superpowers skill, use:
29
+
30
+ ```
31
+ skill_view("brainstorming")
32
+ skill_view("test-driven-development")
33
+ ```
34
+
35
+ If `skill_view` cannot find a superpowers skill (it may not appear in the catalog
36
+ until the plugin fully registers it), fall back to reading the SKILL.md directly:
37
+
38
+ ```
39
+ read_file(path="~/.hermes/plugins/superpowers/skills/<skill-name>/SKILL.md")
40
+ ```
41
+
42
+ This fallback is the same mechanism used by other harnesses without native skill loading.
43
+
44
+ ## Subagent dispatch
45
+
46
+ Use `delegate_task` to spawn isolated subagents for parallel or sequential workstreams:
47
+
48
+ ```
49
+ delegate_task(goal="...", context="...", toolsets=[...], role="leaf")
50
+ ```
51
+
52
+ If `delegate_task` is unavailable, do the work inline rather than inventing tool calls.
53
+
54
+ ## Task tracking
55
+
56
+ Use the `todo` tool for task tracking within a session. For multi-agent task boards, use `hermes kanban` CLI if available. Treat older `TodoWrite` references as the task-tracking action.
@@ -66,6 +66,9 @@ independently testable deliverable.
66
66
 
67
67
  **Tech Stack:** [Key technologies/libraries]
68
68
 
69
+ **Spec:** [path to the spec/design doc this plan implements — the plan
70
+ argues from the spec, so the spec travels with it; executors read both]
71
+
69
72
  ## Global Constraints
70
73
 
71
74
  [The spec's project-wide requirements — version floors, dependency limits,
@@ -246,7 +246,7 @@ SKILL.md serves as an overview that points agents to detailed materials as neede
246
246
 
247
247
  A basic Skill starts with just a SKILL.md file containing metadata and instructions:
248
248
 
249
- <img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=87782ff239b297d9a9e8e1b72ed72db9" alt="Simple SKILL.md file showing YAML frontmatter and markdown body" data-og-width="2048" width="2048" data-og-height="1153" height="1153" data-path="images/agent-skills-simple-file.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=c61cc33b6f5855809907f7fda94cd80e 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=90d2c0c1c76b36e8d749f49e0810dbfd 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=ad17d231ac7b0bea7e5b4d58fb4aeabb 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=f5d0a7a3c668435bb0aee9a3a8f8c329 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=0e927c1af9de5799cfe557d12249f6e6 1650w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=2500&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=46bbb1a51dd4c8202a470ac8c80a893d 2500w" />
249
+ <img src="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=87782ff239b297d9a9e8e1b72ed72db9" alt="Simple SKILL.md file showing YAML frontmatter and markdown body" data-og-width="2048" width="2048" data-og-height="1153" height="1153" data-path="images/agent-skills-simple-file.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=280&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=c61cc33b6f5855809907f7fda94cd80e 280w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=560&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=90d2c0c1c76b36e8d485f49e0810dbfd 560w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=840&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=ad17d231ac7b0bea7e5b4d58fb4aeabb 840w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=1100&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=f5d0a7a3c668435bb0aee9a3a8f8c329 1100w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=1650&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=0e927c1af9de5799cfe557d12249f6e6 1650w, https://mintcdn.com/anthropic-claude-docs/4Bny2bjzuGBK7o00/images/agent-skills-simple-file.png?w=2500&fit=max&auto=format&n=4Bny2bjzuGBK7o00&q=85&s=46bbb1a51dd4c8202a470ac8c80a893d 2500w" />
250
250
 
251
251
  As your Skill grows, you can bundle additional content that agents load only when needed:
252
252