superpowers-mcp 6.0.3 → 6.2.1
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/README.ja.md +15 -2
- package/README.ko.md +15 -2
- package/README.md +21 -2
- package/README.zh-TW.md +22 -3
- package/out/server.js +1 -1
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +1 -9
- package/skills/brainstorming/scripts/stop-server.ps1 +11 -3
- package/skills/brainstorming/visual-companion.md +7 -0
- package/skills/dispatching-parallel-agents/SKILL.md +0 -18
- package/skills/executing-plans/SKILL.md +6 -12
- package/skills/finishing-a-development-branch/SKILL.md +64 -105
- package/skills/receiving-code-review/SKILL.md +0 -8
- package/skills/requesting-code-review/SKILL.md +6 -14
- package/skills/subagent-driven-development/SKILL.md +314 -228
- package/skills/subagent-driven-development/implementer-prompt.md +6 -3
- package/skills/subagent-driven-development/re-review-prompt.md +106 -0
- package/skills/subagent-driven-development/scripts/review-package +11 -9
- package/skills/subagent-driven-development/scripts/review-package.ps1 +17 -10
- package/skills/subagent-driven-development/scripts/sdd-workspace +26 -8
- package/skills/subagent-driven-development/scripts/sdd-workspace.ps1 +29 -4
- package/skills/subagent-driven-development/scripts/task-brief +4 -3
- package/skills/subagent-driven-development/scripts/task-brief.ps1 +5 -4
- package/skills/subagent-driven-development/task-reviewer-prompt.md +3 -5
- package/skills/systematic-debugging/SKILL.md +1 -14
- package/skills/systematic-debugging/find-polluter.ps1 +20 -4
- package/skills/test-driven-development/SKILL.md +10 -61
- package/skills/test-driven-development/writing-good-tests.md +198 -0
- package/skills/using-git-worktrees/SKILL.md +9 -44
- package/skills/using-superpowers/references/antigravity-tools.md +1 -1
- package/skills/using-superpowers/references/codex-tools.md +1 -1
- package/skills/using-superpowers/references/gemini-tools.md +44 -32
- package/skills/verification-before-completion/SKILL.md +0 -19
- package/skills/writing-plans/SKILL.md +0 -6
- package/skills/writing-skills/SKILL.md +1 -11
- package/skills/test-driven-development/testing-anti-patterns.md +0 -299
- package/skills/using-superpowers/references/copilot-tools.md +0 -42
|
@@ -51,38 +51,96 @@ digraph process {
|
|
|
51
51
|
subgraph cluster_per_task {
|
|
52
52
|
label="Per Task";
|
|
53
53
|
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
|
|
54
|
-
"Implementer
|
|
54
|
+
"Implementer asks questions?" [shape=diamond];
|
|
55
55
|
"Answer questions, provide context" [shape=box];
|
|
56
|
-
"Implementer
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
56
|
+
"Implementer implements, tests, commits, self-reviews" [shape=box];
|
|
57
|
+
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [shape=box];
|
|
58
|
+
"Spec ✅ and quality approved?" [shape=diamond];
|
|
59
|
+
"Finding conflicts with plan text?" [shape=diamond];
|
|
60
|
+
"Ask human partner which governs" [shape=box];
|
|
61
|
+
"Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [shape=box];
|
|
62
|
+
"Dispatch scoped re-review (./re-review-prompt.md)" [shape=box];
|
|
63
|
+
"All findings addressed?" [shape=diamond];
|
|
64
|
+
"R = 5?" [shape=diamond];
|
|
65
|
+
"Adjudicate each open finding" [shape=box];
|
|
66
|
+
"Any load-bearing finding?" [shape=diamond];
|
|
67
|
+
"STOP: report BLOCKED to human partner" [shape=box];
|
|
68
|
+
"Park findings in ledger with rulings" [shape=box];
|
|
69
|
+
"Append completion to ledger, mark todo complete" [shape=box];
|
|
61
70
|
}
|
|
62
71
|
|
|
63
|
-
"
|
|
72
|
+
"Setup: worktree, ledger check, read plan, pre-flight review" [shape=box];
|
|
64
73
|
"More tasks remain?" [shape=diamond];
|
|
65
|
-
"Dispatch final code reviewer
|
|
74
|
+
"Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" [shape=box];
|
|
75
|
+
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" [shape=box];
|
|
76
|
+
"Final review clean: delete this plan's workspace" [shape=box];
|
|
66
77
|
"Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
|
|
67
78
|
|
|
68
|
-
"
|
|
69
|
-
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer
|
|
70
|
-
"Implementer
|
|
71
|
-
"Answer questions, provide context" -> "
|
|
72
|
-
"Implementer
|
|
73
|
-
"Implementer
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
+
"Setup: worktree, ledger check, read plan, pre-flight review" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
|
80
|
+
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer asks questions?";
|
|
81
|
+
"Implementer asks questions?" -> "Answer questions, provide context" [label="yes"];
|
|
82
|
+
"Answer questions, provide context" -> "Implementer implements, tests, commits, self-reviews";
|
|
83
|
+
"Implementer asks questions?" -> "Implementer implements, tests, commits, self-reviews" [label="no"];
|
|
84
|
+
"Implementer implements, tests, commits, self-reviews" -> "Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)";
|
|
85
|
+
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" -> "Spec ✅ and quality approved?";
|
|
86
|
+
"Spec ✅ and quality approved?" -> "Append completion to ledger, mark todo complete" [label="yes"];
|
|
87
|
+
"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";
|
|
90
|
+
"Finding conflicts with plan text?" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [label="no"];
|
|
91
|
+
"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
|
+
"Dispatch scoped re-review (./re-review-prompt.md)" -> "All findings addressed?";
|
|
93
|
+
"All findings addressed?" -> "Append completion to ledger, mark todo complete" [label="yes"];
|
|
94
|
+
"All findings addressed?" -> "R = 5?" [label="no"];
|
|
95
|
+
"R = 5?" -> "Fix round R of 5: R≤3 resume implementer; R≥4 fresh implementer, more capable model" [label="no - next round"];
|
|
96
|
+
"R = 5?" -> "Adjudicate each open finding" [label="yes - breaker trips"];
|
|
97
|
+
"Adjudicate each open finding" -> "Any load-bearing finding?";
|
|
98
|
+
"Any load-bearing finding?" -> "STOP: report BLOCKED to human partner" [label="yes"];
|
|
99
|
+
"Any load-bearing finding?" -> "Park findings in ledger with rulings" [label="no"];
|
|
100
|
+
"Park findings in ledger with rulings" -> "Append completion to ledger, mark todo complete";
|
|
101
|
+
"Append completion to ledger, mark todo complete" -> "More tasks remain?";
|
|
79
102
|
"More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
|
|
80
|
-
"More tasks remain?" -> "Dispatch final code reviewer
|
|
81
|
-
"Dispatch final code reviewer
|
|
103
|
+
"More tasks remain?" -> "Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" [label="no"];
|
|
104
|
+
"Dispatch final code reviewer (../requesting-code-review/code-reviewer.md)" -> "Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals";
|
|
105
|
+
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" -> "Final review clean: delete this plan's workspace";
|
|
106
|
+
"Final review clean: delete this plan's workspace" -> "Use superpowers:finishing-a-development-branch";
|
|
82
107
|
}
|
|
83
108
|
```
|
|
84
109
|
|
|
85
|
-
##
|
|
110
|
+
## Setup
|
|
111
|
+
|
|
112
|
+
Ensure the work happens in an isolated workspace: use
|
|
113
|
+
superpowers:using-git-worktrees to create one or verify the existing one.
|
|
114
|
+
Never start implementation on a main/master branch without your human
|
|
115
|
+
partner's explicit consent.
|
|
116
|
+
|
|
117
|
+
Conversation memory does not survive compaction. In real sessions,
|
|
118
|
+
controllers that lost their place have re-dispatched entire completed task
|
|
119
|
+
sequences — the single most expensive failure observed. Track progress in
|
|
120
|
+
a ledger file, not only in todos.
|
|
121
|
+
|
|
122
|
+
- Each plan owns a workspace: at skill start, run this skill's
|
|
123
|
+
`scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
|
|
124
|
+
directory (`<repo-root>/.superpowers/sdd/<plan-basename>/`), home to
|
|
125
|
+
every artifact for THIS plan: ledger, briefs, reports, review packages.
|
|
126
|
+
Another plan's directory is never yours to read or write.
|
|
127
|
+
- Check for this plan's ledger at `<workspace>/progress.md`. If its first
|
|
128
|
+
line names your plan file, tasks with a `Task <N>: complete` line are DONE
|
|
129
|
+
— do not re-dispatch them; resume at the first task without one. A task
|
|
130
|
+
whose last line is a fix round is mid-loop: resume the loop at the next
|
|
131
|
+
round. A ledger whose first line names a different plan file — or a stray
|
|
132
|
+
ledger at the old flat path `.superpowers/sdd/progress.md` — is another
|
|
133
|
+
plan's progress: leave it in place and start your own, fresh.
|
|
134
|
+
- Create the ledger with its identity as the first line:
|
|
135
|
+
`# SDD ledger — plan: <plan file path>`.
|
|
136
|
+
- The ledger is your recovery map: the commits it names exist in git even
|
|
137
|
+
when your context no longer remembers creating them. After compaction,
|
|
138
|
+
trust the ledger and `git log` over your own recollection.
|
|
139
|
+
- `git clean -fdx` will destroy the workspace (it's git-ignored scratch); if
|
|
140
|
+
that happens, recover from `git log`.
|
|
141
|
+
|
|
142
|
+
Read the plan once, note its context and Global Constraints, and create a
|
|
143
|
+
todo per task.
|
|
86
144
|
|
|
87
145
|
Before dispatching Task 1, scan the plan once for conflicts:
|
|
88
146
|
|
|
@@ -110,7 +168,11 @@ capable available model, not the session default.
|
|
|
110
168
|
|
|
111
169
|
**Review tasks**: choose the model with the same judgment, scaled to the
|
|
112
170
|
diff's size, complexity, and risk. A small mechanical diff does not need the
|
|
113
|
-
most capable model; a subtle concurrency change does.
|
|
171
|
+
most capable model; a subtle concurrency change does. Scoped re-reviews of
|
|
172
|
+
small fix diffs take a cheap-to-mid tier.
|
|
173
|
+
|
|
174
|
+
**Fix-loop escalation (rounds 4-5)**: use a model at least one tier above
|
|
175
|
+
the implementer that got stuck.
|
|
114
176
|
|
|
115
177
|
**Always specify the model explicitly when dispatching a subagent.** An
|
|
116
178
|
omitted model inherits your session's model — often the most capable and
|
|
@@ -129,11 +191,51 @@ that implementer. Single-file mechanical fixes also take the cheapest tier.
|
|
|
129
191
|
- Touches multiple files with integration concerns → standard model
|
|
130
192
|
- Requires design judgment or broad codebase understanding → most capable model
|
|
131
193
|
|
|
132
|
-
##
|
|
194
|
+
## The Task Loop
|
|
195
|
+
|
|
196
|
+
Everything you paste into a dispatch prompt — and everything a subagent
|
|
197
|
+
prints back — stays resident in your context for the rest of the session
|
|
198
|
+
and is re-read on every later turn. Hand artifacts over as files.
|
|
199
|
+
|
|
200
|
+
### 1. Dispatch the implementer
|
|
201
|
+
|
|
202
|
+
Record BASE (`git rev-parse HEAD`) before dispatching — the review package
|
|
203
|
+
and fix-round diffs need it.
|
|
204
|
+
|
|
205
|
+
- **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
|
|
207
|
+
uniquely named file and prints the path. Compose the dispatch so the
|
|
208
|
+
brief stays the single source of
|
|
209
|
+
requirements. Your dispatch should contain: (1) one line on where this
|
|
210
|
+
task fits in the project; (2) the brief path, introduced as "read this
|
|
211
|
+
first — it is your requirements, with the exact values to use verbatim";
|
|
212
|
+
(3) interfaces and decisions from earlier tasks that the brief cannot
|
|
213
|
+
know; (4) your resolution of any ambiguity you noticed in the brief;
|
|
214
|
+
(5) the report-file path and report contract. Exact values (numbers,
|
|
215
|
+
magic strings, signatures, test cases) appear only in the brief. Never
|
|
216
|
+
make a subagent read the whole plan file.
|
|
217
|
+
- **Report file:** name the implementer's report file after the brief
|
|
218
|
+
(brief `…/task-N-brief.md` → report `…/task-N-report.md`) and put it in
|
|
219
|
+
the dispatch prompt. The implementer writes the full report there and
|
|
220
|
+
returns only status, commits, a one-line test summary, and concerns.
|
|
221
|
+
- A dispatch prompt describes one task, not the session's history. Do not
|
|
222
|
+
paste accumulated prior-task summaries ("state after Tasks 1-3") into
|
|
223
|
+
later dispatches — a real session's dispatch hit 42k chars of which 99%
|
|
224
|
+
was pasted history. A fresh subagent needs its task, the interfaces it
|
|
225
|
+
touches, and the global constraints. Nothing else.
|
|
226
|
+
- If an earlier task parked a finding in the area this task touches, carry
|
|
227
|
+
a pointer to that ledger entry in the dispatch.
|
|
228
|
+
- Record the implementer's agent identity from the dispatch result —
|
|
229
|
+
fix-loop rounds 1-3 resume this agent.
|
|
230
|
+
- Never dispatch multiple implementation subagents in parallel (conflicts).
|
|
231
|
+
|
|
232
|
+
Template: [implementer-prompt.md](implementer-prompt.md)
|
|
233
|
+
|
|
234
|
+
### 2. Handle the report
|
|
133
235
|
|
|
134
236
|
Implementer subagents report one of four statuses. Handle each appropriately:
|
|
135
237
|
|
|
136
|
-
**DONE:** Generate the review package (`scripts/review-package BASE HEAD`, or `scripts/review-package.ps1 BASE HEAD` on Windows PowerShell, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.
|
|
238
|
+
**DONE:** Generate the review package (`scripts/review-package PLAN_FILE BASE HEAD`, or `scripts/review-package.ps1 PLAN_FILE BASE HEAD` on Windows PowerShell, from this skill's directory — it prints the unique file path it wrote; BASE is the commit you recorded before dispatching the implementer — never `HEAD~1`, which silently drops all but the last commit of a multi-commit task), then dispatch the task reviewer with the printed path.
|
|
137
239
|
|
|
138
240
|
**DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, address them before review. If they're observations (e.g., "this file is getting large"), note them and proceed to review.
|
|
139
241
|
|
|
@@ -147,20 +249,37 @@ Implementer subagents report one of four statuses. Handle each appropriately:
|
|
|
147
249
|
|
|
148
250
|
**Never** ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
|
|
149
251
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
that live in unchanged code or span tasks. These do not block the rest of the
|
|
154
|
-
review, but you must resolve each one yourself before marking the task
|
|
155
|
-
complete: you hold the plan and cross-task context the reviewer
|
|
156
|
-
lacks. If you confirm an item is a real gap, treat it as a failed spec
|
|
157
|
-
review — send it back to the implementer and re-review.
|
|
252
|
+
If the implementer asks questions — before starting or mid-task — answer
|
|
253
|
+
clearly and completely, provide additional context if needed, and don't
|
|
254
|
+
rush it into implementation.
|
|
158
255
|
|
|
159
|
-
|
|
256
|
+
### 3. Review the task
|
|
160
257
|
|
|
161
258
|
Per-task reviews are task-scoped gates. The broad review happens once, at the
|
|
162
|
-
final whole-branch review.
|
|
259
|
+
final whole-branch review. Never skip the task review, and never accept a
|
|
260
|
+
report missing either verdict — spec compliance AND task quality are both
|
|
261
|
+
required. Implementer self-review never replaces the task review; both are
|
|
262
|
+
needed.
|
|
163
263
|
|
|
264
|
+
- 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
|
|
266
|
+
it prints (or, without bash: `git log --oneline`, `git diff --stat`,
|
|
267
|
+
and `git diff -U10` for the range, redirected to one uniquely named
|
|
268
|
+
file). The output never enters your own context, and the reviewer sees
|
|
269
|
+
the commit list, stat summary, and full diff with context in one Read
|
|
270
|
+
call. Use the BASE you recorded before dispatching the implementer —
|
|
271
|
+
never `HEAD~1`, which silently truncates multi-commit tasks. Never
|
|
272
|
+
dispatch a task reviewer without a diff file.
|
|
273
|
+
- **Reviewer inputs:** the task reviewer gets three paths — the same brief
|
|
274
|
+
file, the report file, and the review package — plus the global
|
|
275
|
+
constraints that bind the task.
|
|
276
|
+
- The global-constraints block you hand the reviewer is its attention
|
|
277
|
+
lens. Copy the binding requirements verbatim from the plan's Global
|
|
278
|
+
Constraints section or the spec: exact values, exact formats, and the
|
|
279
|
+
stated relationships between components ("same layout as X", "matches
|
|
280
|
+
Y"). The reviewer's template already carries the process rules (YAGNI,
|
|
281
|
+
test hygiene, review method) — the constraints block is for what THIS
|
|
282
|
+
project's spec demands.
|
|
164
283
|
- Do not add open-ended directives like "check all uses" or "run race tests
|
|
165
284
|
if useful" without a concrete, task-specific reason
|
|
166
285
|
- Do not ask a reviewer to re-run tests the implementer already ran on the
|
|
@@ -171,110 +290,160 @@ final whole-branch review. When you fill a reviewer template:
|
|
|
171
290
|
loop. If the prompt you are writing contains "do not flag," "don't treat X
|
|
172
291
|
as a defect," "at most Minor," or "the plan chose" — stop: you are
|
|
173
292
|
pre-judging, usually to spare yourself a review loop.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
was pasted history. A fresh subagent needs its task, the interfaces it
|
|
193
|
-
touches, and the global constraints. Nothing else.
|
|
194
|
-
- Dispatch fix subagents for Critical and Important findings. Record Minor
|
|
195
|
-
findings in the progress ledger as you go, and point the final
|
|
293
|
+
The task reviewer may report "⚠️ Cannot verify from diff" items — requirements
|
|
294
|
+
that live in unchanged code or span tasks. These do not block the rest of the
|
|
295
|
+
review, but you must resolve each one yourself before marking the task
|
|
296
|
+
complete: you hold the plan and cross-task context the reviewer
|
|
297
|
+
lacks. If you confirm an item is a real gap, treat it as a failed spec
|
|
298
|
+
review — it enters the fix loop with the other findings.
|
|
299
|
+
|
|
300
|
+
Template: [task-reviewer-prompt.md](task-reviewer-prompt.md)
|
|
301
|
+
|
|
302
|
+
### 4. The fix loop
|
|
303
|
+
|
|
304
|
+
The loop triggers when the review reports spec ❌, any Critical or Important
|
|
305
|
+
finding, or a ⚠️ item you confirmed as a real gap.
|
|
306
|
+
|
|
307
|
+
Before the loop starts, two routes leave it immediately:
|
|
308
|
+
|
|
309
|
+
- Record Minor findings in the progress ledger as you go
|
|
310
|
+
(`Task <N>: minor (deferred): <one-liner>`), and point the final
|
|
196
311
|
whole-branch review at that list so it can triage which must be fixed
|
|
197
|
-
before merge. A roll-up nobody reads is a silent discard.
|
|
312
|
+
before merge. A roll-up nobody reads is a silent discard. Minor findings
|
|
313
|
+
never enter the loop.
|
|
198
314
|
- A finding labeled plan-mandated — or any finding that conflicts with
|
|
199
315
|
what the plan's text requires — is the human's decision, like any plan
|
|
200
316
|
contradiction: present the finding and the plan text, ask which governs.
|
|
201
317
|
Do not dismiss the finding because the plan mandates it, and do not
|
|
202
318
|
dispatch a fix that contradicts the plan without asking.
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
a
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
|
|
319
|
+
Everything else enters the loop. A fix round is one fix dispatch plus one
|
|
320
|
+
scoped re-review. Five rounds maximum per task:
|
|
321
|
+
|
|
322
|
+
**Rounds 1-3 — resume the original implementer.** Send it the open findings
|
|
323
|
+
verbatim. Its context is intact: it knows the task, the code, and its own
|
|
324
|
+
choices. If your harness cannot send another message to a live subagent,
|
|
325
|
+
dispatch a fresh implementer carrying the brief path, the report-file path,
|
|
326
|
+
and the findings — the report file is the persistent memory either way.
|
|
327
|
+
|
|
328
|
+
**Rounds 4-5 — dispatch a fresh implementer on a more capable model** (per
|
|
329
|
+
Model Selection), with the brief path, the report-file path, the open
|
|
330
|
+
findings, and this framing: "A prior implementer attempted this task
|
|
331
|
+
[N] times; you own it now. Read the report file for what was tried." A loop
|
|
332
|
+
that survives three resumes usually means the implementer cannot see its
|
|
333
|
+
own problem — fresh eyes and a capability bump in one move.
|
|
334
|
+
|
|
335
|
+
**Every round, either way:** the implementer fixes, re-runs the tests
|
|
336
|
+
covering the amended code, appends its fix report to the same report file,
|
|
337
|
+
and returns the short contract. Before re-dispatching the reviewer, confirm
|
|
338
|
+
the fix report contains the covering tests, the command run, and the
|
|
339
|
+
output; dispatch the re-review once all three are present. Name the
|
|
340
|
+
covering test files in the fix message — a one-line fix does not need the
|
|
341
|
+
whole suite.
|
|
342
|
+
|
|
343
|
+
**The re-review is scoped.** Run `scripts/review-package PLAN_FILE FIX_BASE HEAD`
|
|
344
|
+
(or `scripts/review-package.ps1 PLAN_FILE FIX_BASE HEAD` on Windows PowerShell)
|
|
345
|
+
where FIX_BASE is the head the previous review saw, and dispatch
|
|
346
|
+
[re-review-prompt.md](re-review-prompt.md) with the findings list, the
|
|
347
|
+
brief, the report file, and the printed diff path. The re-reviewer verdicts
|
|
348
|
+
each finding ADDRESSED or NOT ADDRESSED and flags new breakage in the fix
|
|
349
|
+
diff only. New Critical/Important breakage in the fix diff joins the open
|
|
350
|
+
findings list. Out-of-scope observations go to the ledger as deferred
|
|
351
|
+
minors — they never extend the loop.
|
|
352
|
+
|
|
353
|
+
**After each round,** append to the ledger:
|
|
354
|
+
`Task <N>: fix round <R>/5 (<X> addressed, <Y> open — <finding one-liners>; commits <a7>..<b7>)`
|
|
355
|
+
|
|
356
|
+
Never fix findings yourself in the controller session — your context stays
|
|
357
|
+
clean for coordination, and controller fixes skip review.
|
|
358
|
+
|
|
359
|
+
**The breaker.** When round 5's re-review still leaves findings open, stop
|
|
360
|
+
dispatching. Adjudicate each open finding yourself — you hold the plan and
|
|
361
|
+
the cross-task context the reviewer lacks:
|
|
362
|
+
|
|
363
|
+
- **The reviewer is wrong, or the point is contestable:** park it —
|
|
364
|
+
`Task <N>: parked — <finding> — ruling: <why the code stands>`. The final
|
|
365
|
+
review sees both sides.
|
|
366
|
+
- **Real, but nothing downstream builds on it:** park it the same way, with
|
|
367
|
+
a ruling that says it's real and deferred.
|
|
368
|
+
- **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.
|
|
373
|
+
|
|
374
|
+
Adjudicate only at the cap. Adjudicating earlier to end a loop is
|
|
375
|
+
pre-judging with a different name. Every adjudication is a ledger entry —
|
|
376
|
+
a silent discard is forbidden.
|
|
377
|
+
|
|
378
|
+
### 5. Complete the task
|
|
379
|
+
|
|
380
|
+
When the review comes back clean — or every open finding is parked with a
|
|
381
|
+
ruling at the cap — append the completion line to the ledger in the same
|
|
382
|
+
message as your other bookkeeping:
|
|
383
|
+
|
|
384
|
+
- `Task <N>: complete (commits <base7>..<head7>, review clean)`
|
|
385
|
+
- `Task <N>: complete (commits <base7>..<head7>, <K> parked)` after a
|
|
386
|
+
tripped breaker
|
|
387
|
+
|
|
388
|
+
Then mark the todo complete and move on. Never move to the next task while
|
|
389
|
+
the review has open Critical/Important issues that are neither fixed nor
|
|
390
|
+
parked-with-ruling at the cap.
|
|
391
|
+
|
|
392
|
+
## Final Review
|
|
393
|
+
|
|
394
|
+
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
|
|
397
|
+
printed path in the final review dispatch, so the final reviewer reads
|
|
398
|
+
one file instead of re-deriving the branch diff with git commands. Dispatch
|
|
399
|
+
on the most capable available model (see Model Selection), using
|
|
400
|
+
superpowers:requesting-code-review's
|
|
401
|
+
[code-reviewer.md](../requesting-code-review/code-reviewer.md). Point it at
|
|
402
|
+
the ledger's deferred-minor and parked lines so it can triage which must be
|
|
403
|
+
fixed before merge.
|
|
404
|
+
|
|
405
|
+
If the final whole-branch review returns findings, dispatch ONE fix subagent
|
|
406
|
+
with the complete findings list — not one fixer per finding.
|
|
407
|
+
Per-finding fixers each rebuild context and re-run suites; a real
|
|
408
|
+
session's final-review fix wave cost more than all its tasks combined.
|
|
409
|
+
Then run exactly one scoped re-review of the fix wave
|
|
410
|
+
(`scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
|
|
411
|
+
[re-review-prompt.md](re-review-prompt.md)).
|
|
412
|
+
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 —
|
|
414
|
+
residual load-bearing findings surface to your human partner when
|
|
415
|
+
finishing-a-development-branch presents the options.
|
|
416
|
+
|
|
417
|
+
## Finish
|
|
418
|
+
|
|
419
|
+
When the final whole-branch review is clean and its fixes are merged,
|
|
420
|
+
delete this plan's workspace (`rm -rf <workspace>`) — the git history is
|
|
421
|
+
the record now. Sibling directories belong to other plans; leave them
|
|
422
|
+
alone.
|
|
423
|
+
|
|
424
|
+
Use superpowers:finishing-a-development-branch.
|
|
425
|
+
|
|
426
|
+
## Common Rationalizations
|
|
427
|
+
|
|
428
|
+
| Excuse | Reality |
|
|
429
|
+
|--------|---------|
|
|
430
|
+
| "Close enough on spec compliance" | Reviewer found spec gaps = not done. Fix or hit the cap and adjudicate — those are the only exits. |
|
|
431
|
+
| "I'll fix it myself, dispatching is overhead" | Controller fixes pollute your context and skip review. Resume the implementer. |
|
|
432
|
+
| "One more round will converge" | Past the cap, rounds don't converge — the failure is structural. Adjudicate and route. |
|
|
433
|
+
| "The reviewer will just find something new anyway" | Scoped re-reviews verify fixes; they cannot wander. New findings on untouched code go to the ledger, not the loop. |
|
|
434
|
+
| "This finding is obviously wrong, I'll drop it" | You adjudicate only at the cap, and every ruling is a ledger entry. Silent discards are forbidden. |
|
|
435
|
+
| "The fix was small, skip the re-review" | Unreviewed fixes are how regressions land. Every round ends with a scoped re-review. |
|
|
436
|
+
| "Reviews slow the loop down" | The loop without reviews is just unverified churn. Reviews are the loop's brakes and steering. |
|
|
437
|
+
| "Ledger bookkeeping is overhead" | The ledger is what survives compaction. Controllers without one have re-dispatched entire completed task sequences. |
|
|
271
438
|
|
|
272
439
|
## Example Workflow
|
|
273
440
|
|
|
274
441
|
```
|
|
275
442
|
You: I'm using Subagent-Driven Development to execute this plan.
|
|
276
443
|
|
|
444
|
+
[Setup: worktree verified]
|
|
277
445
|
[Read plan file once: docs/superpowers/plans/feature-plan.md]
|
|
446
|
+
[Resolve workspace: scripts/sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
|
|
278
447
|
[Create todos for all tasks]
|
|
279
448
|
|
|
280
449
|
Task 1: Hook installation script
|
|
@@ -285,134 +454,51 @@ Implementer: "Before I begin - should the hook be installed at user or system le
|
|
|
285
454
|
|
|
286
455
|
You: "User level (~/.config/superpowers/hooks/)"
|
|
287
456
|
|
|
288
|
-
Implementer:
|
|
289
|
-
[Later] Implementer:
|
|
457
|
+
Implementer: [Later]
|
|
290
458
|
- Implemented install-hook command
|
|
291
459
|
- Added tests, 5/5 passing
|
|
292
460
|
- Self-review: Found I missed --force flag, added it
|
|
293
461
|
- Committed
|
|
294
462
|
|
|
295
|
-
[Run review-package
|
|
463
|
+
[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]
|
|
296
464
|
Task reviewer: Spec ✅ - all requirements met, nothing extra.
|
|
297
465
|
Strengths: Good test coverage, clean. Issues: None. Task quality: Approved.
|
|
298
466
|
|
|
299
|
-
[
|
|
467
|
+
[Ledger: Task 1: complete (commits a1b2c3d..d4e5f6a, review clean)]
|
|
300
468
|
|
|
301
469
|
Task 2: Recovery modes
|
|
302
470
|
|
|
303
471
|
[Run task-brief for Task 2; dispatch implementer with brief + report paths + context]
|
|
304
472
|
|
|
305
|
-
Implementer: [No questions
|
|
306
|
-
Implementer:
|
|
473
|
+
Implementer: [No questions]
|
|
307
474
|
- Added verify/repair modes
|
|
308
475
|
- 8/8 tests passing
|
|
309
|
-
- Self-review: All good
|
|
310
476
|
- Committed
|
|
311
477
|
|
|
312
|
-
[Run review-package
|
|
478
|
+
[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]
|
|
313
479
|
Task reviewer: Spec ❌:
|
|
314
480
|
- Missing: Progress reporting (spec says "report every 100 items")
|
|
315
|
-
- Extra: Added --json flag (not requested)
|
|
316
481
|
Issues (Important): Magic number (100)
|
|
317
482
|
|
|
318
|
-
[
|
|
319
|
-
|
|
483
|
+
[Fix round 1: resume the implementer with both findings]
|
|
484
|
+
Implementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.
|
|
485
|
+
Re-ran test/recovery.test.js — 10/10 passing. Fix report appended.
|
|
320
486
|
|
|
321
|
-
[
|
|
322
|
-
|
|
487
|
+
[Run review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review]
|
|
488
|
+
Re-reviewer: Missing progress reporting — ADDRESSED (src/recovery.js:41).
|
|
489
|
+
Magic number — ADDRESSED (src/recovery.js:7). New breakage: none.
|
|
490
|
+
Verdict: all findings addressed.
|
|
323
491
|
|
|
324
|
-
[
|
|
492
|
+
[Ledger: Task 2: fix round 1/5 (2 addressed, 0 open; commits d4e5f6a..b7c8d9e)]
|
|
493
|
+
[Ledger: Task 2: complete (commits d4e5f6a..b7c8d9e, review clean)]
|
|
325
494
|
|
|
326
495
|
...
|
|
327
496
|
|
|
328
497
|
[After all tasks]
|
|
329
|
-
[
|
|
330
|
-
Final reviewer: All requirements met
|
|
498
|
+
[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]
|
|
499
|
+
Final reviewer: All requirements met. Deferred minors triaged: none block merge.
|
|
331
500
|
|
|
332
|
-
|
|
333
|
-
```
|
|
501
|
+
[Delete this plan's workspace — the record now lives in git]
|
|
334
502
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
**vs. Manual execution:**
|
|
338
|
-
- Subagents follow TDD naturally
|
|
339
|
-
- Fresh context per task (no confusion)
|
|
340
|
-
- Parallel-safe (subagents don't interfere)
|
|
341
|
-
- Subagent can ask questions (before AND during work)
|
|
342
|
-
|
|
343
|
-
**vs. Executing Plans:**
|
|
344
|
-
- Same session (no handoff)
|
|
345
|
-
- Continuous progress (no waiting)
|
|
346
|
-
- Review checkpoints automatic
|
|
347
|
-
|
|
348
|
-
**Efficiency gains:**
|
|
349
|
-
- Controller curates exactly what context is needed; bulk artifacts move
|
|
350
|
-
as files, not pasted text
|
|
351
|
-
- Subagent gets complete information upfront
|
|
352
|
-
- Questions surfaced before work begins (not after)
|
|
353
|
-
|
|
354
|
-
**Quality gates:**
|
|
355
|
-
- Self-review catches issues before handoff
|
|
356
|
-
- Task review carries two verdicts: spec compliance and code quality
|
|
357
|
-
- Review loops ensure fixes actually work
|
|
358
|
-
- Spec compliance prevents over/under-building
|
|
359
|
-
- Code quality ensures implementation is well-built
|
|
360
|
-
|
|
361
|
-
**Cost:**
|
|
362
|
-
- More subagent invocations (implementer + reviewer per task)
|
|
363
|
-
- Controller does more prep work (extracting all tasks upfront)
|
|
364
|
-
- Review loops add iterations
|
|
365
|
-
- But catches issues early (cheaper than debugging later)
|
|
366
|
-
|
|
367
|
-
## Red Flags
|
|
368
|
-
|
|
369
|
-
**Never:**
|
|
370
|
-
- Start implementation on main/master branch without explicit user consent
|
|
371
|
-
- Skip task review, or accept a report missing either verdict (spec compliance AND task quality are both required)
|
|
372
|
-
- Proceed with unfixed issues
|
|
373
|
-
- Dispatch multiple implementation subagents in parallel (conflicts)
|
|
374
|
-
- Make a subagent read the whole plan file (hand it its task brief —
|
|
375
|
-
`scripts/task-brief` / `scripts/task-brief.ps1` — instead)
|
|
376
|
-
- Skip scene-setting context (subagent needs to understand where task fits)
|
|
377
|
-
- Ignore subagent questions (answer before letting them proceed)
|
|
378
|
-
- Accept "close enough" on spec compliance (reviewer found spec issues = not done)
|
|
379
|
-
- Skip review loops (reviewer found issues = implementer fixes = review again)
|
|
380
|
-
- Let implementer self-review replace actual review (both are needed)
|
|
381
|
-
- Tell a reviewer what not to flag, or pre-rate a finding's severity in the
|
|
382
|
-
dispatch prompt ("treat it as Minor at most") — the plan's example code is
|
|
383
|
-
a starting point, not evidence that its weaknesses were chosen
|
|
384
|
-
- Dispatch a task reviewer without a diff file — generate it first
|
|
385
|
-
(`scripts/review-package BASE HEAD`, or `scripts/review-package.ps1 BASE HEAD` on Windows PowerShell) and name the printed path in the
|
|
386
|
-
prompt
|
|
387
|
-
- Move to next task while the review has open Critical/Important issues
|
|
388
|
-
- Re-dispatch a task the progress ledger already marks complete — check
|
|
389
|
-
the ledger (and `git log`) after any compaction or resume
|
|
390
|
-
|
|
391
|
-
**If subagent asks questions:**
|
|
392
|
-
- Answer clearly and completely
|
|
393
|
-
- Provide additional context if needed
|
|
394
|
-
- Don't rush them into implementation
|
|
395
|
-
|
|
396
|
-
**If reviewer finds issues:**
|
|
397
|
-
- Implementer (same subagent) fixes them
|
|
398
|
-
- Reviewer reviews again
|
|
399
|
-
- Repeat until approved
|
|
400
|
-
- Don't skip the re-review
|
|
401
|
-
|
|
402
|
-
**If subagent fails task:**
|
|
403
|
-
- Dispatch fix subagent with specific instructions
|
|
404
|
-
- Don't try to fix manually (context pollution)
|
|
405
|
-
|
|
406
|
-
## Integration
|
|
407
|
-
|
|
408
|
-
**Required workflow skills:**
|
|
409
|
-
- **superpowers:using-git-worktrees** - Ensures isolated workspace (creates one or verifies existing)
|
|
410
|
-
- **superpowers:writing-plans** - Creates the plan this skill executes
|
|
411
|
-
- **superpowers:requesting-code-review** - Code review template for the final whole-branch review
|
|
412
|
-
- **superpowers:finishing-a-development-branch** - Complete development after all tasks
|
|
413
|
-
|
|
414
|
-
**Subagents should use:**
|
|
415
|
-
- **superpowers:test-driven-development** - Subagents follow TDD for each task
|
|
416
|
-
|
|
417
|
-
**Alternative workflow:**
|
|
418
|
-
- **superpowers:executing-plans** - Use for parallel session instead of same-session execution
|
|
503
|
+
Done! Using superpowers:finishing-a-development-branch.
|
|
504
|
+
```
|