@jspg-ai/coding-bb 0.0.3-beta.6 → 0.0.3-beta.8

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.
Files changed (92) hide show
  1. package/cbb/dev-standards/rules/cbb-ai-behavior.md +1 -1
  2. package/cbb/lib/install/claude-code.js +1 -3
  3. package/cbb/lib/install/codebuddy.js +0 -2
  4. package/cbb/lib/install/init.js +115 -85
  5. package/cbb/lib/install/opencode.js +1 -5
  6. package/cbb/lib/install/qoder.js +1 -3
  7. package/cbb/lib/install/trae.js +0 -2
  8. package/cbb/lib/openspec/index.js +337 -554
  9. package/cbb/lib/superpowers/index.js +246 -265
  10. package/cbb/lib/utils/tar.js +92 -0
  11. package/cbb/lib/utils/upstream.js +90 -0
  12. package/cbb/worktrees/skills/cbb-worktree-close/SKILL.md +31 -22
  13. package/cbb/worktrees/skills/cbb-worktree-init/SKILL.md +21 -22
  14. package/cbb/worktrees/skills/cbb-worktree-push/SKILL.md +66 -30
  15. package/config/openspec/schemas/spec-driven/schema.yaml +21 -30
  16. package/config/openspec/schemas/spec-driven/templates/design.md +0 -18
  17. package/config/openspec/schemas/spec-driven/templates/proposal.md +4 -3
  18. package/config/upstream-mirrors.json +12 -0
  19. package/config/workspace-agents.sample.md +6 -6
  20. package/openspec/.version +2 -3
  21. package/openspec/commands/apply.md +189 -175
  22. package/openspec/commands/archive.md +237 -216
  23. package/openspec/commands/bulk-archive.md +355 -327
  24. package/openspec/commands/continue.md +116 -105
  25. package/openspec/commands/explore.md +230 -199
  26. package/openspec/commands/ff.md +115 -104
  27. package/openspec/commands/new.md +74 -63
  28. package/openspec/commands/onboard.md +557 -548
  29. package/openspec/commands/propose.md +161 -150
  30. package/openspec/commands/sync.md +277 -249
  31. package/openspec/commands/update.md +92 -80
  32. package/openspec/commands/verify.md +175 -162
  33. package/openspec/skills/openspec-apply-change/SKILL.md +20 -5
  34. package/openspec/skills/openspec-archive-change/SKILL.md +30 -8
  35. package/openspec/skills/openspec-bulk-archive-change/SKILL.md +36 -6
  36. package/openspec/skills/openspec-continue-change/SKILL.md +14 -2
  37. package/openspec/skills/openspec-explore/SKILL.md +21 -9
  38. package/openspec/skills/openspec-ff-change/SKILL.md +14 -2
  39. package/openspec/skills/openspec-new-change/SKILL.md +13 -1
  40. package/openspec/skills/openspec-onboard/SKILL.md +49 -39
  41. package/openspec/skills/openspec-propose/SKILL.md +15 -3
  42. package/openspec/skills/openspec-sync-specs/SKILL.md +31 -2
  43. package/openspec/skills/openspec-update-change/SKILL.md +27 -14
  44. package/openspec/skills/openspec-verify-change/SKILL.md +17 -3
  45. package/package.json +1 -1
  46. package/superpowers/.version +4 -4
  47. package/superpowers/skills/brainstorming/SKILL.md +47 -12
  48. package/superpowers/skills/brainstorming/scripts/frame-template.html +213 -213
  49. package/superpowers/skills/brainstorming/scripts/server.cjs +723 -723
  50. package/superpowers/skills/brainstorming/visual-companion.md +6 -6
  51. package/superpowers/skills/diagnosing-superpowers/SKILL.md +120 -0
  52. package/superpowers/skills/diagnosing-superpowers/prompts/analyst-common.md +38 -0
  53. package/superpowers/skills/diagnosing-superpowers/prompts/cost-and-time.md +28 -0
  54. package/superpowers/skills/diagnosing-superpowers/prompts/plan-adherence.md +29 -0
  55. package/superpowers/skills/diagnosing-superpowers/prompts/quality-evidence.md +26 -0
  56. package/superpowers/skills/diagnosing-superpowers/prompts/repeated-work.md +30 -0
  57. package/superpowers/skills/diagnosing-superpowers/prompts/request-conflicts.md +20 -0
  58. package/superpowers/skills/diagnosing-superpowers/prompts/scrub-audit.md +33 -0
  59. package/superpowers/skills/diagnosing-superpowers/prompts/scrub.md +29 -0
  60. package/superpowers/skills/diagnosing-superpowers/prompts/similar-session.md +38 -0
  61. package/superpowers/skills/diagnosing-superpowers/prompts/skill-timeline.md +30 -0
  62. package/superpowers/skills/diagnosing-superpowers/prompts/stumbles.md +28 -0
  63. package/superpowers/skills/diagnosing-superpowers/references/context-safety.md +22 -0
  64. package/superpowers/skills/diagnosing-superpowers/references/github-issues.md +47 -0
  65. package/superpowers/skills/diagnosing-superpowers/references/redaction-policy.md +34 -0
  66. package/superpowers/skills/diagnosing-superpowers/references/session-discovery.md +31 -0
  67. package/superpowers/skills/diagnosing-superpowers/templates/bundle-README.md +77 -0
  68. package/superpowers/skills/diagnosing-superpowers/templates/case.md +64 -0
  69. package/superpowers/skills/diagnosing-superpowers/templates/issue.md +51 -0
  70. package/superpowers/skills/diagnosing-superpowers/templates/report.md +82 -0
  71. package/superpowers/skills/executing-plans/SKILL.md +350 -41
  72. package/superpowers/skills/executing-plans/scripts/task-done +52 -0
  73. package/superpowers/skills/executing-plans/scripts/task-start +28 -0
  74. package/superpowers/skills/requesting-code-review/SKILL.md +1 -1
  75. package/superpowers/skills/requesting-code-review/code-reviewer.md +17 -0
  76. package/superpowers/skills/subagent-driven-development/SKILL.md +18 -18
  77. package/superpowers/skills/subagent-driven-development/re-review-prompt.md +1 -1
  78. package/superpowers/skills/subagent-driven-development/scripts/review-package +53 -46
  79. package/superpowers/skills/subagent-driven-development/scripts/sdd-workspace +82 -40
  80. package/superpowers/skills/subagent-driven-development/scripts/task-brief +43 -41
  81. package/superpowers/skills/subagent-driven-development/task-reviewer-prompt.md +2 -2
  82. package/superpowers/skills/systematic-debugging/root-cause-tracing.md +1 -1
  83. package/superpowers/skills/test-driven-development/SKILL.md +10 -0
  84. package/superpowers/skills/using-superpowers/SKILL.md +2 -0
  85. package/superpowers/skills/using-superpowers/references/claude-code-tools.md +29 -0
  86. package/superpowers/skills/using-superpowers/references/muse-tools.md +35 -0
  87. package/superpowers/skills/writing-plans/SKILL.md +30 -9
  88. package/superpowers/skills/writing-skills/SKILL.md +4 -2
  89. package/superpowers/skills/writing-skills/graphviz-conventions.dot +171 -171
  90. package/cbb/worktrees/commands/worktree-close.md +0 -63
  91. package/cbb/worktrees/commands/worktree-init.md +0 -50
  92. package/cbb/worktrees/commands/worktree-push.md +0 -42
@@ -1,64 +1,373 @@
1
1
  ---
2
2
  name: executing-plans
3
- description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
3
+ description: Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
4
4
  ---
5
5
 
6
6
  # Executing Plans
7
7
 
8
- ## Overview
8
+ Execute the plan yourself, task by task, in this session: no implementer
9
+ subagent per task, no reviewer per task. One fresh-context review of the
10
+ whole branch at the end.
9
11
 
10
- Load plan, review critically, execute all tasks, report when complete.
12
+ **Why inline:** Subagent-driven development pays for a fresh implementer
13
+ and a fresh reviewer on every task, each re-reading the codebase from zero.
14
+ Inline execution pays for one context (yours) plus one reviewer at the end.
15
+ What it gives up is a fresh context per task and a second pair of eyes per
16
+ task. This skill keeps what those two things bought, by other means: the
17
+ brief is the spec, the ledger is your memory, TDD is the per-task gate, and
18
+ the final reviewer is the second pair of eyes.
11
19
 
12
- **Announce at start:** "I'm using the executing-plans skill to implement this plan."
20
+ **Core principle:** The plan already did the thinking. Execute it exactly,
21
+ prove each step with a test you watched fail and then pass, and leave a
22
+ record that survives your own forgetting.
13
23
 
14
- **Note:** Tell your human partner that Superpowers works much better with access to subagents (Claude Code, Codex CLI, Codex App, Copilot CLI, and Gemini CLI all qualify; see the per-platform tool refs in `../using-superpowers/references/`). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
24
+ **Narration:** between tool calls, narrate at most one short line the
25
+ ledger and the tool results carry the record.
26
+
27
+ **Continuous execution:** Do not pause to check in with your human partner
28
+ between tasks. They chose inline execution to spend less, not to answer
29
+ "should I continue?" after every task. Execute all tasks from the plan
30
+ without stopping.
31
+
32
+ **Rulings, not stalls.** Conflicts, ambiguities, plan defects — decide them.
33
+ The spec is the binding authority, the plan is its argument, and your
34
+ judgment settles what neither answers. Record every decision in the ledger
35
+ as `Ruling: <what you decided> — <why> — <what it costs if wrong>`, and keep
36
+ going. Deviating from the plan without a ledgered ruling is a decision made
37
+ in secret.
38
+
39
+ Four things stop you, and only these: an irreversible or destructive
40
+ operation; a security-sensitive action; a side effect outside this worktree
41
+ that norms say you ask about first (a merge, a push to a shared branch, a
42
+ publish); and a plan so broken that every path forward is a guess. For
43
+ those, stop and ask.
44
+
45
+ ## When to Use
46
+
47
+ - You have a plan from superpowers:writing-plans and your human partner
48
+ chose inline execution at the handoff.
49
+ - Your harness has no subagent tool (see the per-platform references in
50
+ `../using-superpowers/references/`). Never fabricate a dispatch; run
51
+ the plan here.
52
+ - Tasks are mostly independent — the same precondition as
53
+ superpowers:subagent-driven-development.
54
+
55
+ A fully specified plan makes inline execution transcription plus testing:
56
+ it runs well on a mid-tier session model, and the one place the most
57
+ capable model earns its cost is the final review, which this skill
58
+ dispatches separately. Tell your human partner so when they choose inline.
59
+
60
+ Prefer superpowers:subagent-driven-development when your human partner
61
+ wants a review gate on every task, or when the plan is long enough that
62
+ its later tasks would run on a compacted context. Inline execution over a
63
+ long plan still works — the ledger is what makes it recoverable — but the
64
+ last tasks get the least of you.
15
65
 
16
66
  ## The Process
17
67
 
18
- ### Step 1: Load and Review Plan
19
- 1. Ensure an isolated workspace: use superpowers:using-git-worktrees to create one or verify the existing one
20
- 2. Read plan file
21
- 3. Review critically - identify any questions or concerns about the plan
22
- 4. If concerns: Raise them with your human partner before starting
23
- 5. If no concerns: Create todos for the plan items and proceed
68
+ ```dot
69
+ digraph process {
70
+ rankdir=TB;
71
+
72
+ subgraph cluster_per_task {
73
+ label="Per Task";
74
+ "task-start: brief + BASE; read the brief" [shape=box];
75
+ "Work the steps in order: TDD, run every verification, read every output" [shape=box];
76
+ "Step output matches plan's Expected?" [shape=diamond];
77
+ "Plan wrong? Rule and ledger. Code wrong? systematic-debugging" [shape=box];
78
+ "Commit as the plan's commit steps say" [shape=box];
79
+ "Completion contract met?" [shape=diamond];
80
+ "task-done: run tests, ledger the result; mark todo complete" [shape=box];
81
+ }
82
+
83
+ "Setup: worktree, workspace + ledger, read plan + spec, pre-flight scan" [shape=box];
84
+ "More tasks remain?" [shape=diamond];
85
+ "Final whole-branch review (fresh reviewer if you have one)" [shape=box];
86
+ "Re-grade, then: Critical/Important → ONE fix pass, each fix RED→GREEN + green suite; Minor → ledger" [shape=box];
87
+ "Final review clean: delete this plan's workspace" [shape=box];
88
+ "Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
89
+
90
+ "Setup: worktree, workspace + ledger, read plan + spec, pre-flight scan" -> "task-start: brief + BASE; read the brief";
91
+ "task-start: brief + BASE; read the brief" -> "Work the steps in order: TDD, run every verification, read every output";
92
+ "Work the steps in order: TDD, run every verification, read every output" -> "Step output matches plan's Expected?";
93
+ "Step output matches plan's Expected?" -> "Plan wrong? Rule and ledger. Code wrong? systematic-debugging" [label="no"];
94
+ "Plan wrong? Rule and ledger. Code wrong? systematic-debugging" -> "Work the steps in order: TDD, run every verification, read every output";
95
+ "Step output matches plan's Expected?" -> "Commit as the plan's commit steps say" [label="yes, last step"];
96
+ "Commit as the plan's commit steps say" -> "Completion contract met?";
97
+ "Completion contract met?" -> "Work the steps in order: TDD, run every verification, read every output" [label="no - finish the task"];
98
+ "Completion contract met?" -> "task-done: run tests, ledger the result; mark todo complete" [label="yes"];
99
+ "task-done: run tests, ledger the result; mark todo complete" -> "More tasks remain?";
100
+ "More tasks remain?" -> "task-start: brief + BASE; read the brief" [label="yes"];
101
+ "More tasks remain?" -> "Final whole-branch review (fresh reviewer if you have one)" [label="no"];
102
+ "Final whole-branch review (fresh reviewer if you have one)" -> "Re-grade, then: Critical/Important → ONE fix pass, each fix RED→GREEN + green suite; Minor → ledger";
103
+ "Re-grade, then: Critical/Important → ONE fix pass, each fix RED→GREEN + green suite; Minor → ledger" -> "Final review clean: delete this plan's workspace";
104
+ "Final review clean: delete this plan's workspace" -> "Use superpowers:finishing-a-development-branch";
105
+ }
106
+ ```
107
+
108
+ ## Setup
109
+
110
+ Ensure the work happens in an isolated workspace: use
111
+ superpowers:using-git-worktrees to create one or verify the existing one.
112
+ Never start implementation on a main/master branch without your human
113
+ partner's explicit consent.
114
+
115
+ Conversation memory does not survive compaction. An inline executor that
116
+ loses its place re-implements tasks whose commits already exist — the same
117
+ failure as a controller re-dispatching them, paid for in your own context.
118
+ Track progress in a ledger file, not only in todos. Harness todos are a
119
+ live view; the ledger is the record.
120
+
121
+ The workspace and ledger are shared with superpowers:subagent-driven-development
122
+ — same directory, same format — so a plan can change executors mid-flight
123
+ and the new one resumes from the same ledger.
124
+
125
+ - Each plan owns a workspace: at skill start, run
126
+ `../subagent-driven-development/scripts/sdd-workspace PLAN_FILE` — it
127
+ prints the plan's git-ignored directory
128
+ (`<repo-root>/.superpowers/sdd/<plan-basename>/`), home to every
129
+ artifact for THIS plan: ledger, briefs, review packages. Another plan's
130
+ directory is never yours to read or write.
131
+ - Check for this plan's ledger at `<workspace>/progress.md`. If its first
132
+ line names your plan file, tasks with a `Task <N>: complete` line are
133
+ DONE — do not redo them; resume at the first task without one. Their
134
+ commits exist in git even when your context no longer remembers making
135
+ them: after compaction, trust the ledger and `git log` over your own
136
+ recollection. A ledger whose first line names a different plan file is
137
+ another plan's progress: leave it and start your own, fresh.
138
+ - Create the ledger with its identity as the first line:
139
+ `# SDD ledger — plan: <plan file path>`.
140
+ - `git clean -fdx` will destroy the workspace (it's git-ignored scratch);
141
+ if that happens, recover from `git log`.
142
+
143
+ Read the plan once, note its context and Global Constraints, and create a
144
+ todo per task. If the plan names a Spec, read that too: the spec is the
145
+ authority the plan argues from, and conflicts inside the plan resolve
146
+ against it. A plan with no reachable spec gets a ledger note saying so —
147
+ rulings made without one are provisional.
148
+
149
+ **REQUIRED SUB-SKILL:** load superpowers:test-driven-development now,
150
+ before Task 1. It governs every step of every task below; a plan whose
151
+ steps already say "write the failing test first" does not exempt you
152
+ from reading it.
153
+
154
+ Before Task 1, scan the plan for conflicts between tasks. The plan's
155
+ Interfaces blocks tell you where to look: for every task that consumes
156
+ what an earlier task produces, one ledger row — the two tasks, what one
157
+ produces against what the other consumes, and what you found. Tasks that
158
+ share nothing get no row; a plan whose tasks share nothing gets the single
159
+ line `Pre-flight: no shared interfaces`. Rule on each conflict a row
160
+ surfaces with the spec as the binding authority, record the ruling beside
161
+ its row, and start Task 1. Each task's own text is checked when you read
162
+ its brief, not here.
163
+
164
+ ## The Task Loop
165
+
166
+ Everything you print, and every tool result, stays resident in your
167
+ context for the rest of the session. Redirect long test output to a file
168
+ in the workspace and read its tail; read a brief, not the whole plan.
169
+
170
+ ### 1. Take the task
171
+
172
+ - Run this skill's `scripts/task-start PLAN_FILE N`. It prints the brief
173
+ path and BASE (the commit the task's range is cut from) in one call.
174
+ Read the brief for every task, including ones you remember from setup:
175
+ what you remember is a summary, the brief has the exact values,
176
+ signatures, and test cases.
177
+ - Mark the task's todo in_progress.
178
+
179
+ Every tool call is a turn that re-reads your whole context. Bookkeeping
180
+ rides along with work — a ledger append in the same call as the commit,
181
+ never in a call of its own.
182
+
183
+ ### 2. Work the steps
184
+
185
+ The plan's steps are already in RED-GREEN order; follow them in that
186
+ order under superpowers:test-driven-development, loaded at setup. A test
187
+ step's code is written first and run first. Watching it fail is a step,
188
+ not a formality — a test that passes before the implementation exists is
189
+ a finding about the test.
190
+
191
+ Every step that runs a command has an `Expected:` line. Run the command,
192
+ read its output, and compare. Three outcomes:
193
+
194
+ - **Matches.** Next step.
195
+ - **The code is wrong.** Use superpowers:systematic-debugging. Find the
196
+ cause; never patch the symptom to make the step's output match.
197
+ - **The plan is wrong** — a step contradicts the spec, an interface from an
198
+ earlier task doesn't match what this task consumes, a command that
199
+ cannot work. Rule on the smallest change that satisfies the spec, ledger
200
+ it as `Task <N>: Ruling: <finding> — <what you decided and why>`, and
201
+ continue. The ruling is carried, not remembered: later tasks that touch
202
+ the same interface read it from the ledger.
203
+
204
+ Commit as the plan's commit steps say. A task that spans several commits
205
+ is fine; BASE is what the review range is cut from, never `HEAD~1`.
206
+
207
+ ### 3. The completion contract
208
+
209
+ Before a task's ledger line, all of the following are true, with evidence
210
+ in this session — not inferred from the diff looking right:
211
+
212
+ - Every test the brief names exists and ran in this task, and you read
213
+ the output.
214
+ - The final test run for the task passed — `task-done` is that run, and
215
+ it writes the command and result into the ledger line.
216
+ - Every `Expected:` line in the brief was compared against real output.
217
+ - Every deviation from the brief has a `Ruling:` line in the ledger.
218
+
219
+ **REQUIRED SUB-SKILL:** superpowers:verification-before-completion governs
220
+ the claim. If any item is missing, the task is not complete: finish it.
221
+
222
+ ### 4. Complete the task
223
+
224
+ Run this skill's `scripts/task-done PLAN_FILE N BASE -- <test command>`
225
+ with the test command the brief names for the whole task. It runs the
226
+ tests, keeps the full output in the workspace, prints the tail, and — only
227
+ if they pass — appends the completion line to the ledger:
228
+
229
+ `Task <N>: complete (commits <base7>..<head7>, tests: <command> → <result>)`
230
+
231
+ A failing run records nothing; the task is not complete. When it records,
232
+ mark the todo complete and take the next task.
233
+
234
+ ## Final Review
235
+
236
+ Run `../subagent-driven-development/scripts/review-package PLAN_FILE MERGE_BASE HEAD`
237
+ (MERGE_BASE = the commit the branch started from, e.g.
238
+ `git merge-base main HEAD`) and review from the file it prints.
239
+
240
+ **With a subagent tool:** dispatch the reviewer on the most capable
241
+ available model — the whole-branch review is a judgment task — using
242
+ superpowers:requesting-code-review's
243
+ [code-reviewer.md](../requesting-code-review/code-reviewer.md), with the
244
+ package path, the plan and spec paths, the plan's Review Focus section
245
+ verbatim if it has one (the input classes and failure modes the plan's
246
+ tests do not exercise — the reviewer checks each deliberately), and a
247
+ pointer to the ledger's `Ruling:` lines so it can weigh the calls you
248
+ made. Specify the model
249
+ explicitly; an omitted model inherits the session's, which may not be the
250
+ most capable. This is the one fresh context the whole run buys. Do not
251
+ skip it, and do not replace it with your own read of the diff.
252
+
253
+ **Without a subagent tool:** read code-reviewer.md and perform that review
254
+ yourself against the package, as a separate pass after the last task's
255
+ ledger line. Write `Final review: self-review (no subagent tool)` to the
256
+ ledger, and say so in your final message: a self-review by the author is
257
+ weaker than a fresh reviewer, and your human partner decides whether that
258
+ is enough before merge.
259
+
260
+ Sort the findings before you act on any of them. The reviewer's severity
261
+ labels are advice; the gate is yours. Its "Declined to judge" list is
262
+ yours too: every line there is a ruling you make and ledger, exactly like
263
+ a plan conflict — `Final: Ruling: <behavior the reviewer set aside> —
264
+ <what a reasonable person using this software gets, and why that stands
265
+ or why it is now a finding> — <cost if wrong>`. Re-grade first, by effect: the
266
+ spec is a vision document, and a finding's grade is what a reasonable
267
+ person using this software gets if it ships, not whether the spec names
268
+ the input that triggers it — a reviewer who set a finding at Minor
269
+ because the spec was silent has graded the spec, not the effect. Then:
270
+
271
+ - **Critical and Important** enter the fix pass.
272
+ - **Minor** goes to the ledger as `Final: minor (deferred): <one-liner>`
273
+ and to your final message under "Deferred minors". Minors never enter
274
+ the fix pass, and never become rulings — a ruling is a decision about a
275
+ conflict, not a note that you declined a polish suggestion.
276
+
277
+ Fix the Critical and Important findings yourself — you are the
278
+ implementer here — in ONE pass. Each fix is verified by TDD, not by a
279
+ second reviewer: write the test that reproduces the finding, watch it
280
+ fail, make it pass, then run the whole suite. Record each in the ledger as
281
+ `Final: fixed <finding> — <test name> RED→GREEN, suite <N>/<N>`. A fix
282
+ without a test that failed first is not verified; a suite that is not
283
+ green after the pass means the pass is not over. Do not dispatch a
284
+ re-review: it would re-read a diff whose covering tests already answer
285
+ "addressed" and whose suite run already answers "broke nothing".
286
+
287
+ A finding you decide not to fix is a ruling — `Final: Ruling: <finding> —
288
+ <why the code stands> — <cost if wrong>` — and reaches your human partner
289
+ in the rulings list. There is no second fix pass.
290
+
291
+ ## Finish
292
+
293
+ Before you delete anything, collect every ledger line containing
294
+ `Ruling:` into your final message under "Rulings I made", in the order you
295
+ made them, each with what it costs if wrong, and every `minor (deferred)`
296
+ line under "Deferred minors". Both lists are exhaustive. Your final
297
+ message is the only place the decisions you took on your human partner's
298
+ behalf — and the findings you chose not to act on — reach them.
299
+
300
+ When the final review is clean and its fixes are committed, delete this
301
+ plan's workspace directory — the git history is the record now. Sibling
302
+ directories belong to other plans; leave them alone.
303
+
304
+ Use superpowers:finishing-a-development-branch.
305
+
306
+ ## Common Rationalizations
307
+
308
+ | Excuse | Reality |
309
+ |--------|---------|
310
+ | "I remember what Task N says" | You remember a summary. The brief has the exact values. Read it. |
311
+ | "The plan's code is right, skip watching the test fail" | A test you never saw fail proves nothing. It is one step. Run it. |
312
+ | "I'll run the full suite at the end instead of per step" | Per-step runs are how you learn which step broke it. The end-of-task run is the contract, not a substitute. |
313
+ | "The plan is wrong here, I'll just do the right thing" | Do the right thing and ledger the ruling. Unledgered deviation is a decision made in secret. |
314
+ | "I'll write the ledger lines after a few tasks" | Compaction does not wait for a convenient moment. One line per task, in the same message as the commit. |
315
+ | "Let me check in before the next task" | They chose inline to spend less. Progress prompts spend their time instead. Only the four stops stop you. |
316
+ | "I read my own diff carefully; the final reviewer is redundant" | Same author, same blind spots. The reviewer is the only fresh context this run buys. |
317
+ | "Tests should pass, the change was trivial" | "Should" is not evidence. The contract requires the command and its output. |
318
+ | "Subagents are slow and expensive, I'll skip the final review too" | Inline already removed the per-task reviewers. One review of the whole branch is the floor, not the ceiling. |
319
+ | "The reviewer said Minor, so it's Minor" | The label graded the spec's silence. Grade what the person gets. Re-grade, then gate. |
320
+ | "The fix is obvious, no need for a failing test first" | The failing test is the only proof the finding was real and is now gone. Without it you have a diff and a hope. |
321
+ | "I'll fix the minors too while I'm in there" | Every minor you fix is a test, a fix, and a suite run your partner did not ask for. Ledger them; your partner decides. |
322
+
323
+ ## Example Workflow
324
+
325
+ ```
326
+ You: I'm using the executing-plans skill to implement this plan inline.
24
327
 
25
- ### Step 2: Execute Tasks
328
+ [Setup: worktree verified]
329
+ [Read plan once: docs/superpowers/plans/feature-plan.md; spec read]
330
+ [Resolve workspace: sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
331
+ [Pre-flight scan: 2 shared-interface rows, 4 self-consistency rows, clean; written to ledger]
332
+ [Create todos for all tasks]
26
333
 
27
- For each task:
28
- 1. Mark as in_progress
29
- 2. Follow each step exactly (plan has bite-sized steps)
30
- 3. Run verifications as specified
31
- 4. Mark as completed
334
+ Task 1: Hook installation script
32
335
 
33
- ### Step 3: Complete Development
336
+ [task-start plan 1 brief read; BASE a1b2c3d]
337
+ [Step 1: write failing test — written]
338
+ [Step 2: run it — FAIL: install_hook not defined. Matches Expected.]
339
+ [Step 3: implement — written]
340
+ [Step 4: run it — PASS 1/1. Matches Expected.]
341
+ [Step 5: commit — d4e5f6a]
342
+ [Contract: tests ran, output read, no deviations]
343
+ [task-done plan 1 a1b2c3d -- npm test -- hooks → ledger: Task 1: complete (commits a1b2c3d..d4e5f6a, tests: npm test -- hooks → 1/1 pass)]
34
344
 
35
- After all tasks complete and verified:
36
- - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
37
- - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
38
- - Follow that skill to verify tests, present options, execute choice
345
+ Task 2: Recovery modes
39
346
 
40
- ## When to Stop and Ask for Help
347
+ [task-start plan 2 brief read; BASE d4e5f6a]
348
+ [Step 2: run failing test — FAIL, but on an import error: Task 1 exported
349
+ installHook, brief consumes install_hook]
350
+ [Ruling: brief's consumer name is a typo against Task 1's Produces block;
351
+ use installHook — Ledger: Task 2: Ruling: install_hook → installHook — matches Task 1 Produces — cost if wrong: one rename]
352
+ [Steps 2-5 as planned; commit b7c8d9e]
353
+ [task-done plan 2 d4e5f6a -- npm test -- recovery → ledger: Task 2: complete (commits d4e5f6a..b7c8d9e, tests: npm test -- recovery → 8/8 pass)]
41
354
 
42
- **STOP executing immediately when:**
43
- - Hit a blocker (missing dependency, test fails, instruction unclear)
44
- - Plan has critical gaps preventing starting
45
- - You don't understand an instruction
46
- - Verification fails repeatedly
355
+ ...
47
356
 
48
- **Ask for clarification rather than guessing.**
357
+ [After all tasks: review-package plan MERGE_BASE HEAD; dispatch code-reviewer, most capable model]
358
+ Reviewer: One Important finding — progress reporting interval hardcoded. Two Minor.
359
+ [Re-grade: Important stands; minors → ledger as deferred]
360
+ [Fix pass: test_progress_interval_configurable RED → extract PROGRESS_INTERVAL → GREEN; suite 12/12; commit]
361
+ [Ledger: Final: fixed hardcoded interval — test_progress_interval_configurable RED→GREEN, suite 12/12]
49
362
 
50
- ## When to Revisit Earlier Steps
363
+ Rulings I made:
364
+ - Task 2: install_hook → installHook (brief typo; cost if wrong: one rename)
51
365
 
52
- **Return to Review (Step 1) when:**
53
- - Partner updates the plan based on your feedback
54
- - Fundamental approach needs rethinking
366
+ Deferred minors:
367
+ - README lacks a usage example
368
+ - recovery.js could split verify/repair into two files
55
369
 
56
- **Don't force through blockers** - stop and ask.
370
+ [Delete this plan's workspace the record now lives in git]
57
371
 
58
- ## Remember
59
- - Review plan critically first
60
- - Follow plan steps exactly
61
- - Don't skip verifications
62
- - Reference skills when plan says to
63
- - Stop when blocked, don't guess
64
- - Never start implementation on main/master branch without explicit user consent
372
+ Using superpowers:finishing-a-development-branch.
373
+ ```
@@ -0,0 +1,52 @@
1
+ #!/usr/bin/env bash
2
+ # Close one task of an inline plan execution in a single call: run the task's
3
+ # test command, keep its full output in the workspace, print the tail, and —
4
+ # only if the command succeeded — append the completion line to the ledger.
5
+ # A failing command records nothing: the task is not complete.
6
+ #
7
+ # Usage: task-done PLAN_FILE TASK_NUMBER BASE -- TEST_COMMAND [ARGS...]
8
+ # BASE is the SHA task-start printed; the completion line records BASE..HEAD.
9
+ # Exit: the test command's exit status.
10
+ set -euo pipefail
11
+
12
+ if [ $# -lt 5 ] || [ "$4" != "--" ]; then
13
+ echo "usage: task-done PLAN_FILE TASK_NUMBER BASE -- TEST_COMMAND [ARGS...]" >&2
14
+ exit 2
15
+ fi
16
+
17
+ plan=$1
18
+ n=$2
19
+ base=$3
20
+ shift 4
21
+ sdd="$(cd "$(dirname "$0")/../../subagent-driven-development/scripts" && pwd)"
22
+
23
+ git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
24
+
25
+ dir=$("$sdd/sdd-workspace" "$plan")
26
+ log="$dir/task-${n}-tests.log"
27
+ ledger="$dir/progress.md"
28
+
29
+ # Render the command the way a person would type it, for the ledger line.
30
+ cmd=""
31
+ for a in "$@"; do
32
+ case "$a" in
33
+ *[[:space:]\"\;\|\&]*) cmd="$cmd '$a'" ;;
34
+ *) cmd="$cmd $a" ;;
35
+ esac
36
+ done
37
+ cmd=${cmd# }
38
+
39
+ rc=0
40
+ "$@" > "$log" 2>&1 || rc=$?
41
+
42
+ tail -n 5 "$log"
43
+ if [ "$rc" -ne 0 ]; then
44
+ echo "task-done: test command exited $rc; Task $n NOT recorded (full output: $log)" >&2
45
+ exit "$rc"
46
+ fi
47
+
48
+ last=$(grep -v '^[[:space:]]*$' "$log" | tail -n 1)
49
+ [ -f "$ledger" ] || printf '# SDD ledger — plan: %s\n' "$plan" > "$ledger"
50
+ line="Task $n: complete (commits $(git rev-parse --short=7 "$base")..$(git rev-parse --short=7 HEAD), tests: $cmd → $last)"
51
+ printf '%s\n' "$line" >> "$ledger"
52
+ echo "ledger: $line"
@@ -0,0 +1,28 @@
1
+ #!/usr/bin/env bash
2
+ # Begin one task of an inline plan execution in a single call: extract the
3
+ # task's brief (via subagent-driven-development's task-brief, so both skills
4
+ # share one workspace) and record BASE, the commit the task's review range is
5
+ # cut from. One tool call instead of two, because every call in an inline
6
+ # session is a turn that re-reads the whole context.
7
+ #
8
+ # Usage: task-start PLAN_FILE TASK_NUMBER
9
+ # Prints:
10
+ # brief: <path to the task's brief file>
11
+ # base: <full SHA of HEAD>
12
+ set -euo pipefail
13
+
14
+ if [ $# -ne 2 ]; then
15
+ echo "usage: task-start PLAN_FILE TASK_NUMBER" >&2
16
+ exit 2
17
+ fi
18
+
19
+ plan=$1
20
+ n=$2
21
+ sdd="$(cd "$(dirname "$0")/../../subagent-driven-development/scripts" && pwd)"
22
+
23
+ out=$("$sdd/task-brief" "$plan" "$n")
24
+ brief=$(printf '%s\n' "$out" | sed -n 's/^wrote \(.*\): [0-9][0-9]* lines$/\1/p')
25
+ [ -n "$brief" ] || { echo "task-brief did not report a path: $out" >&2; exit 1; }
26
+
27
+ echo "brief: $brief"
28
+ echo "base: $(git rev-parse HEAD)"
@@ -25,7 +25,7 @@ Dispatch a code reviewer subagent to catch issues before they cascade. The revie
25
25
 
26
26
  **1. Get git SHAs:**
27
27
  ```bash
28
- BASE_SHA=$(git rev-parse HEAD~1) # or origin/main
28
+ BASE_SHA=$(git rev-parse HEAD~1) # or: git merge-base origin/main HEAD
29
29
  HEAD_SHA=$(git rev-parse HEAD)
30
30
  ```
31
31
 
@@ -30,6 +30,23 @@ Subagent (general-purpose):
30
30
  git diff [BASE_SHA]..[HEAD_SHA]
31
31
  ```
32
32
 
33
+ ## The spec is a vision document
34
+
35
+ The spec says what the software must do. It does not enumerate every
36
+ input, environment, or condition the software will meet. For behavior
37
+ the spec is silent on, judge by what a reasonable person using this
38
+ software would expect: a reasonable person's expectation is a
39
+ requirement, and a spec's silence is not permission. Grade such
40
+ findings by their effect on that person, not by whether the spec
41
+ mentions the trigger.
42
+
43
+ ## Declined to judge
44
+
45
+ Before your verdict, list every behavior you considered and set aside
46
+ as outside the plan or spec, one line each, with the reason. The
47
+ executor rules on each line; nothing you set aside is dropped
48
+ silently. An empty list means you set nothing aside.
49
+
33
50
  ## Read-Only Review
34
51
 
35
52
  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,25 +36,25 @@ stop and ask.
36
36
  digraph when_to_use {
37
37
  "Have implementation plan?" [shape=diamond];
38
38
  "Tasks mostly independent?" [shape=diamond];
39
- "Stay in this session?" [shape=diamond];
39
+ "Partner chose inline, or no subagent tool?" [shape=diamond];
40
40
  "subagent-driven-development" [shape=box];
41
41
  "executing-plans" [shape=box];
42
42
  "Manual execution or brainstorm first" [shape=box];
43
43
 
44
44
  "Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
45
45
  "Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
46
- "Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
46
+ "Tasks mostly independent?" -> "Partner chose inline, or no subagent tool?" [label="yes"];
47
47
  "Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
48
- "Stay in this session?" -> "subagent-driven-development" [label="yes"];
49
- "Stay in this session?" -> "executing-plans" [label="no - parallel session"];
48
+ "Partner chose inline, or no subagent tool?" -> "executing-plans" [label="yes"];
49
+ "Partner chose inline, or no subagent tool?" -> "subagent-driven-development" [label="no"];
50
50
  }
51
51
  ```
52
52
 
53
- **vs. Executing Plans (parallel session):**
54
- - Same session (no context switch)
55
- - Fresh subagent per task (no context pollution)
56
- - Review after each task (spec compliance + code quality), broad review at the end
57
- - Faster iteration (no human-in-loop between tasks)
53
+ **vs. Executing Plans (inline):**
54
+ - Fresh subagent per task (no context pollution) instead of one context doing every task
55
+ - Review after each task (spec compliance + code quality) instead of only at the end
56
+ - Costs a fresh context per task and per review; inline costs one context plus one final reviewer
57
+ - Both run in this session, share the same plan workspace and ledger, and never pause between tasks
58
58
 
59
59
  ## The Process
60
60
 
@@ -134,8 +134,8 @@ sequences — the single most expensive failure observed. Track progress in
134
134
  a ledger file, not only in todos.
135
135
 
136
136
  - Each plan owns a workspace: at skill start, run this skill's
137
- `scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
138
- directory (`<repo-root>/.superpowers/sdd/<plan-basename>/`), home to
137
+ `bash scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
138
+ directory (under `<repo-root>/.superpowers/sdd/`), home to
139
139
  every artifact for THIS plan: ledger, briefs, reports, review packages.
140
140
  Another plan's directory is never yours to read or write.
141
141
  - Check for this plan's ledger at `<workspace>/progress.md`. If its first
@@ -249,7 +249,7 @@ Record BASE (`git rev-parse HEAD`) before dispatching — the review package
249
249
  and fix-round diffs need it.
250
250
 
251
251
  - **Task brief:** before dispatching an implementer, run this skill's
252
- `scripts/task-brief PLAN_FILE N` — it extracts the task's full text to a
252
+ `bash scripts/task-brief PLAN_FILE N` — it extracts the task's full text to a
253
253
  uniquely named file and prints the path. Compose the dispatch so the
254
254
  brief stays the single source of
255
255
  requirements. Your dispatch should contain: (1) one line on where this
@@ -287,7 +287,7 @@ Template: [implementer-prompt.md](implementer-prompt.md)
287
287
 
288
288
  Implementer subagents report one of four statuses. Handle each appropriately:
289
289
 
290
- **DONE:** Generate the review package (`scripts/review-package PLAN_FILE BASE HEAD`, 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.
290
+ **DONE:** Generate the review package (`bash scripts/review-package PLAN_FILE BASE HEAD`, 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.
291
291
 
292
292
  **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.
293
293
 
@@ -314,7 +314,7 @@ required. Implementer self-review never replaces the task review; both are
314
314
  needed.
315
315
 
316
316
  - Hand the reviewer its diff as a file: run this skill's
317
- `scripts/review-package PLAN_FILE BASE HEAD` and pass the reviewer the file path
317
+ `bash scripts/review-package PLAN_FILE BASE HEAD` and pass the reviewer the file path
318
318
  it prints (or, without bash: `git log --oneline`, `git diff --stat`,
319
319
  and `git diff -U10` for the range, redirected to one uniquely named
320
320
  file). The output never enters your own context, and the reviewer sees
@@ -393,7 +393,7 @@ output; dispatch the re-review once all three are present. Name the
393
393
  covering test files in the fix message — a one-line fix does not need the
394
394
  whole suite.
395
395
 
396
- **The re-review is scoped.** Run `scripts/review-package PLAN_FILE FIX_BASE HEAD`
396
+ **The re-review is scoped.** Run `bash scripts/review-package PLAN_FILE FIX_BASE HEAD`
397
397
  where FIX_BASE is the head the previous review saw, and dispatch
398
398
  [re-review-prompt.md](re-review-prompt.md) with the findings list, the
399
399
  brief, the report file, and the printed diff path. The re-reviewer verdicts
@@ -445,7 +445,7 @@ parked-with-ruling at the cap.
445
445
  ## Final Review
446
446
 
447
447
  The final whole-branch review gets a package too: run
448
- `scripts/review-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the
448
+ `bash scripts/review-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the
449
449
  branch started from, e.g. `git merge-base main HEAD`) and include the
450
450
  printed path in the final review dispatch, so the final reviewer reads
451
451
  one file instead of re-deriving the branch diff with git commands. Dispatch
@@ -460,7 +460,7 @@ with the complete findings list — not one fixer per finding.
460
460
  Per-finding fixers each rebuild context and re-run suites; a real
461
461
  session's final-review fix wave cost more than all its tasks combined.
462
462
  Then run exactly one scoped re-review of the fix wave
463
- (`scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
463
+ (`bash scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
464
464
  [re-review-prompt.md](re-review-prompt.md)).
465
465
  Adjudicate any residual findings as in the task loop's breaker: park with
466
466
  rulings, or rule on the load-bearing ones and ledger what you decided. Only
@@ -507,7 +507,7 @@ You: I'm using Subagent-Driven Development to execute this plan.
507
507
 
508
508
  [Setup: worktree verified]
509
509
  [Read plan file once: docs/superpowers/plans/feature-plan.md]
510
- [Resolve workspace: scripts/sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
510
+ [Resolve workspace: bash scripts/sdd-workspace docs/superpowers/plans/feature-plan.md — no ledger inside, fresh start]
511
511
  [Create todos for all tasks]
512
512
 
513
513
  Task 1: Hook installation script
@@ -109,7 +109,7 @@ Subagent (general-purpose):
109
109
  - `[REPORT_FILE]` — the implementer's report file (fix reports appended)
110
110
  - `[FIX_BASE_SHA]` — the head the previous review saw
111
111
  - `[HEAD_SHA]` — current commit
112
- - `[DIFF_FILE]` — the path `scripts/review-package PLAN_FILE FIX_BASE HEAD` printed
112
+ - `[DIFF_FILE]` — the path `bash scripts/review-package PLAN_FILE FIX_BASE HEAD` printed
113
113
 
114
114
  **Re-reviewer returns:** per-finding verdicts (ADDRESSED / NOT ADDRESSED),
115
115
  new breakage in the fix diff, out-of-scope observations, and a round verdict.