@loneexile/omp-superpowers 7.0.0-omp.1 → 7.0.0-omp.3
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/CHANGELOG.md +22 -1
- package/README.md +25 -15
- package/agents/sdd-final-reviewer.md +4 -3
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +65 -21
- package/skills/executing-plans/SKILL.md +11 -9
- package/skills/requesting-code-review/SKILL.md +2 -2
- package/skills/subagent-driven-development/SKILL.md +233 -86
- package/skills/subagent-driven-development/implementer-prompt.md +23 -8
- package/skills/subagent-driven-development/re-review-prompt.md +3 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +5 -0
- package/skills/using-git-worktrees/SKILL.md +1 -1
- package/skills/using-superpowers/references/pi-tools.md +1 -1
- package/skills/writing-plans/SKILL.md +51 -21
|
@@ -5,11 +5,11 @@ description: Use when executing implementation plans with independent tasks in t
|
|
|
5
5
|
|
|
6
6
|
# Subagent-Driven Development
|
|
7
7
|
|
|
8
|
-
Execute plan by dispatching a fresh implementer subagent per task, a task review (spec compliance + code quality)
|
|
8
|
+
Execute a plan by dispatching a fresh implementer subagent per task — independent tasks in parallel waves, each in its own worktree — with a task review (spec compliance + code quality) for each task on the review list, and one broad whole-branch review at the end that also does the task review's work for every other task.
|
|
9
9
|
|
|
10
10
|
**Why subagents:** You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
|
|
11
11
|
|
|
12
|
-
**Core principle:** Fresh subagent per task + task review
|
|
12
|
+
**Core principle:** Fresh subagent per task + parallel waves for independent tasks + a task review where risk earns it + one broad final review = high quality, fast iteration
|
|
13
13
|
|
|
14
14
|
**Narration:** between tool calls, narrate at most one short line — the
|
|
15
15
|
ledger and the tool results carry the record.
|
|
@@ -28,7 +28,8 @@ Four things stop you, and only these: an irreversible or destructive
|
|
|
28
28
|
operation; a security-sensitive action; a side effect outside this worktree
|
|
29
29
|
that norms say you ask about first (a merge, a push to a shared branch, a
|
|
30
30
|
publish); and a plan so broken that every path forward is a guess. For those,
|
|
31
|
-
stop and ask.
|
|
31
|
+
stop and ask. This skill's own wave merges into the plan branch, and the task
|
|
32
|
+
worktrees it creates and removes, are not among them.
|
|
32
33
|
|
|
33
34
|
**On omp in vibe mode** (your tools include `vibe_spawn` but not `task`)
|
|
34
35
|
you are the director, and this loop cannot run in your session: you have
|
|
@@ -54,24 +55,25 @@ limits are in "Vibe mode" in
|
|
|
54
55
|
digraph when_to_use {
|
|
55
56
|
"Have implementation plan?" [shape=diamond];
|
|
56
57
|
"Tasks mostly independent?" [shape=diamond];
|
|
57
|
-
"
|
|
58
|
+
"Inline approved at the handoff, or no subagent tool?" [shape=diamond];
|
|
58
59
|
"subagent-driven-development" [shape=box];
|
|
59
60
|
"executing-plans" [shape=box];
|
|
60
61
|
"Manual execution or brainstorm first" [shape=box];
|
|
61
62
|
|
|
62
63
|
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
|
|
63
64
|
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
|
|
64
|
-
"Tasks mostly independent?" -> "
|
|
65
|
+
"Tasks mostly independent?" -> "Inline approved at the handoff, or no subagent tool?" [label="yes"];
|
|
65
66
|
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
|
|
66
|
-
"
|
|
67
|
-
"
|
|
67
|
+
"Inline approved at the handoff, or no subagent tool?" -> "executing-plans" [label="yes"];
|
|
68
|
+
"Inline approved at the handoff, or no subagent tool?" -> "subagent-driven-development" [label="no"];
|
|
68
69
|
}
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
**vs. Executing Plans (inline):**
|
|
72
73
|
- Fresh subagent per task (no context pollution) instead of one context doing every task
|
|
73
|
-
-
|
|
74
|
-
-
|
|
74
|
+
- Independent tasks run in parallel; inline runs every task in turn
|
|
75
|
+
- A task review (spec compliance + code quality) for each high-risk task, plus the final review; inline has only the final review
|
|
76
|
+
- Costs a fresh context per task and per task review; inline costs one context plus one final reviewer
|
|
75
77
|
- Both run in this session, share the same plan workspace and ledger, and never pause between tasks
|
|
76
78
|
|
|
77
79
|
## The Process
|
|
@@ -81,11 +83,14 @@ digraph process {
|
|
|
81
83
|
rankdir=TB;
|
|
82
84
|
|
|
83
85
|
subgraph cluster_per_task {
|
|
84
|
-
label="Per Task";
|
|
86
|
+
label="Per Task (every task of a wave at once)";
|
|
85
87
|
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
|
|
86
88
|
"Implementer asks questions?" [shape=diamond];
|
|
87
89
|
"Answer questions, provide context" [shape=box];
|
|
88
90
|
"Implementer implements, tests, commits, self-reviews" [shape=box];
|
|
91
|
+
"On the review list?" [shape=diamond];
|
|
92
|
+
"Run the brief's covering tests yourself" [shape=box];
|
|
93
|
+
"Resume implementer with the failure" [shape=box];
|
|
89
94
|
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [shape=box];
|
|
90
95
|
"Spec ✅ and quality approved?" [shape=diamond];
|
|
91
96
|
"Finding conflicts with plan text?" [shape=diamond];
|
|
@@ -98,42 +103,49 @@ digraph process {
|
|
|
98
103
|
"Any load-bearing finding?" [shape=diamond];
|
|
99
104
|
"Rule and continue; stop only if every path forward is a guess" [shape=box];
|
|
100
105
|
"Park findings in ledger with rulings" [shape=box];
|
|
101
|
-
"
|
|
106
|
+
"Merge the task branch (wave of 2+), append completion to ledger, mark todo complete" [shape=box];
|
|
102
107
|
}
|
|
103
108
|
|
|
104
|
-
"Setup: worktree, ledger check, read plan, pre-flight review" [shape=box];
|
|
105
|
-
"
|
|
106
|
-
"
|
|
109
|
+
"Setup: worktree, ledger check, read plan, pre-flight scan: review list + waves" [shape=box];
|
|
110
|
+
"Start the next wave: a worktree per task when it has 2+" [shape=box];
|
|
111
|
+
"More waves remain?" [shape=diamond];
|
|
112
|
+
"Dispatch final reviewer: sdd-final-reviewer (package + ledger lines + the tasks left to it; its agent file governs the output)" [shape=box];
|
|
107
113
|
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" [shape=box];
|
|
108
114
|
"Final review clean: delete this plan's workspace" [shape=box];
|
|
109
115
|
"Use superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
|
|
110
116
|
|
|
111
|
-
"Setup: worktree, ledger check, read plan, pre-flight review" -> "
|
|
117
|
+
"Setup: worktree, ledger check, read plan, pre-flight scan: review list + waves" -> "Start the next wave: a worktree per task when it has 2+";
|
|
118
|
+
"Start the next wave: a worktree per task when it has 2+" -> "Dispatch implementer subagent (./implementer-prompt.md)";
|
|
112
119
|
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer asks questions?";
|
|
113
120
|
"Implementer asks questions?" -> "Answer questions, provide context" [label="yes"];
|
|
114
121
|
"Answer questions, provide context" -> "Implementer implements, tests, commits, self-reviews";
|
|
115
122
|
"Implementer asks questions?" -> "Implementer implements, tests, commits, self-reviews" [label="no"];
|
|
116
|
-
"Implementer implements, tests, commits, self-reviews" -> "
|
|
123
|
+
"Implementer implements, tests, commits, self-reviews" -> "On the review list?";
|
|
124
|
+
"On the review list?" -> "Run the brief's covering tests yourself" [label="no - review at final"];
|
|
125
|
+
"Run the brief's covering tests yourself" -> "Merge the task branch (wave of 2+), append completion to ledger, mark todo complete" [label="pass"];
|
|
126
|
+
"Run the brief's covering tests yourself" -> "Resume implementer with the failure" [label="fail"];
|
|
127
|
+
"Resume implementer with the failure" -> "Run the brief's covering tests yourself";
|
|
128
|
+
"On the review list?" -> "Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" [label="yes"];
|
|
117
129
|
"Generate review package, dispatch task reviewer (./task-reviewer-prompt.md)" -> "Spec ✅ and quality approved?";
|
|
118
|
-
"Spec ✅ and quality approved?" -> "
|
|
130
|
+
"Spec ✅ and quality approved?" -> "Merge the task branch (wave of 2+), append completion to ledger, mark todo complete" [label="yes"];
|
|
119
131
|
"Spec ✅ and quality approved?" -> "Finding conflicts with plan text?" [label="no"];
|
|
120
132
|
"Finding conflicts with plan text?" -> "Rule on the conflict, ledger the ruling" [label="yes"];
|
|
121
133
|
"Rule on the conflict, ledger the ruling" -> "Fix round R of 3: R≤2 resume implementer; R=3 fresh sdd-escalation-implementer";
|
|
122
134
|
"Finding conflicts with plan text?" -> "Fix round R of 3: R≤2 resume implementer; R=3 fresh sdd-escalation-implementer" [label="no"];
|
|
123
135
|
"Fix round R of 3: R≤2 resume implementer; R=3 fresh sdd-escalation-implementer" -> "Dispatch scoped re-review (./re-review-prompt.md)";
|
|
124
136
|
"Dispatch scoped re-review (./re-review-prompt.md)" -> "All findings addressed?";
|
|
125
|
-
"All findings addressed?" -> "
|
|
137
|
+
"All findings addressed?" -> "Merge the task branch (wave of 2+), append completion to ledger, mark todo complete" [label="yes"];
|
|
126
138
|
"All findings addressed?" -> "R = 3?" [label="no"];
|
|
127
139
|
"R = 3?" -> "Fix round R of 3: R≤2 resume implementer; R=3 fresh sdd-escalation-implementer" [label="no - next round"];
|
|
128
140
|
"R = 3?" -> "Adjudicate each open finding" [label="yes - breaker trips"];
|
|
129
141
|
"Adjudicate each open finding" -> "Any load-bearing finding?";
|
|
130
142
|
"Any load-bearing finding?" -> "Rule and continue; stop only if every path forward is a guess" [label="yes"];
|
|
131
143
|
"Any load-bearing finding?" -> "Park findings in ledger with rulings" [label="no"];
|
|
132
|
-
"Park findings in ledger with rulings" -> "
|
|
133
|
-
"
|
|
134
|
-
"More
|
|
135
|
-
"More
|
|
136
|
-
"Dispatch final reviewer: sdd-final-reviewer (package + ledger lines; its agent file governs the output)" -> "Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals";
|
|
144
|
+
"Park findings in ledger with rulings" -> "Merge the task branch (wave of 2+), append completion to ledger, mark todo complete";
|
|
145
|
+
"Merge the task branch (wave of 2+), append completion to ledger, mark todo complete" -> "More waves remain?" [label="after the wave's last task"];
|
|
146
|
+
"More waves remain?" -> "Start the next wave: a worktree per task when it has 2+" [label="yes"];
|
|
147
|
+
"More waves remain?" -> "Dispatch final reviewer: sdd-final-reviewer (package + ledger lines + the tasks left to it; its agent file governs the output)" [label="no"];
|
|
148
|
+
"Dispatch final reviewer: sdd-final-reviewer (package + ledger lines + the tasks left to it; its agent file governs the output)" -> "Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals";
|
|
137
149
|
"Final findings? ONE fix dispatch, one scoped re-review, adjudicate residuals" -> "Final review clean: delete this plan's workspace";
|
|
138
150
|
"Final review clean: delete this plan's workspace" -> "Use superpowers:finishing-a-development-branch";
|
|
139
151
|
}
|
|
@@ -184,8 +196,14 @@ a ledger file, not only in todos.
|
|
|
184
196
|
line names your plan file, tasks with a `Task <N>: complete` line are DONE
|
|
185
197
|
— do not re-dispatch them; resume at the first task without one. A task
|
|
186
198
|
whose last line is `dispatched` or `re-dispatched` is mid-implementation:
|
|
187
|
-
check `git log` from its BASE
|
|
188
|
-
|
|
199
|
+
check `git log` from its BASE (on its task branch, for a wave task whose
|
|
200
|
+
`dispatched` line names a worktree) and read `agent://<id>` before you
|
|
201
|
+
dispatch anything. A wave task whose last line is `merged` is merged: clean
|
|
202
|
+
up its worktree and branch (Complete the task) and write its `complete`
|
|
203
|
+
line. A wave task whose branch tip is already an ancestor of the plan
|
|
204
|
+
branch (`git merge-base --is-ancestor <branch> HEAD`) merged before the
|
|
205
|
+
ledger caught up: ledger `merged` and do the same. A worktree that exists
|
|
206
|
+
for a task with no `dispatched` line is reused, not added again. A task
|
|
189
207
|
whose last line is a fix round is mid-loop: resume the loop at the next
|
|
190
208
|
round. A ledger whose first line names a different plan file — or a stray
|
|
191
209
|
ledger at the old flat path `.superpowers/sdd/progress.md` — is another
|
|
@@ -222,9 +240,34 @@ Write the table to the ledger. Rule on everything you find before execution
|
|
|
222
240
|
begins — each finding against the plan text that mandates it — and record
|
|
223
241
|
each ruling in the ledger. If the scan is clean, proceed without comment.
|
|
224
242
|
Rule on each conflict it surfaces — the spec is the binding authority, the
|
|
225
|
-
plan is its argument — record the ruling beside its row
|
|
226
|
-
|
|
227
|
-
|
|
243
|
+
plan is its argument — and record the ruling beside its row. Clean or not,
|
|
244
|
+
the same table then gives you the two ledger blocks below; write both before
|
|
245
|
+
the first dispatch. The review loop remains the net for conflicts that only
|
|
246
|
+
emerge from implementation.
|
|
247
|
+
|
|
248
|
+
**The review list.** A task gets its own task review when the plan marks it
|
|
249
|
+
`**Review:** per-task`, or when you rule it high-risk: security or
|
|
250
|
+
authentication, concurrency, a data migration or persisted format, money, a
|
|
251
|
+
destructive operation, or an interface two or more later tasks consume. A
|
|
252
|
+
batch (below) counts as one task. Ledger one line per task, `Task <N>:
|
|
253
|
+
review per-task — <class>` or `Task <N>: review at final`. The final
|
|
254
|
+
whole-branch review does the task review's work for every `review at final`
|
|
255
|
+
task. A task joins the list mid-run, ledgered as `Task <N>: review per-task
|
|
256
|
+
— <reason>`, when its report is DONE_WITH_CONCERNS about correctness, it
|
|
257
|
+
went BLOCKED, or its implementer needed 100+ turns.
|
|
258
|
+
|
|
259
|
+
**The waves.** Tasks with no row between them in the scan table (no shared
|
|
260
|
+
file, no shared interface), whose `Consumes` all come from earlier waves,
|
|
261
|
+
form one wave: take them in plan order, at most three to a wave. A task that
|
|
262
|
+
consumes another's interface waits for the wave that produces it. Files
|
|
263
|
+
every task tends to touch (a lockfile, a manifest, a CHANGELOG, an index or
|
|
264
|
+
barrel file) count as shared, and so does anything the tests hold at run
|
|
265
|
+
time (a fixed port, a database, a cache directory). Ledger
|
|
266
|
+
`Wave <K>: tasks <N>, <N>, <N>` for each wave, then start Wave 1. A plan that
|
|
267
|
+
is one long chain gets one task per wave and runs in sequence, and so does
|
|
268
|
+
every plan whose checkout has uncommitted changes to tracked files
|
|
269
|
+
(`git status --porcelain --untracked-files=no` not empty): a merge needs
|
|
270
|
+
them committed or stashed. Untracked files do not block a wave.
|
|
228
271
|
|
|
229
272
|
## Agent Selection
|
|
230
273
|
|
|
@@ -346,13 +389,12 @@ needs 100+ turns, or a re-review that wanders, is the signal to rule that
|
|
|
346
389
|
task onto the escalation seat. Re-reviews are verdict-only work over a small
|
|
347
390
|
diff — `low` reasoning is correct for them, not a compromise.
|
|
348
391
|
|
|
349
|
-
**Scale the task review to the diff's risk.**
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
the risk — `Task <N>: high-risk diff — <class>` — and name that class in the
|
|
392
|
+
**Scale the task review to the diff's risk.** Every task on the review list
|
|
393
|
+
is there for its risk class or a trouble signal (Setup), so its reviewer needs the deepest
|
|
394
|
+
reasoning the seat has. When `task.enableEffort` is on (it is off by
|
|
395
|
+
default — `omp config get task.enableEffort`), dispatch that reviewer with
|
|
396
|
+
`effort: "hi"`: that selects the resolved model's top thinking level,
|
|
397
|
+
capped by `task.maxEffort`. Either way, name each listed task's class in the
|
|
356
398
|
final review dispatch.
|
|
357
399
|
|
|
358
400
|
**Escalation (fix round 3):** the implementer that got stuck cannot see its
|
|
@@ -406,8 +448,9 @@ judge, and **Mergeable:** come last.
|
|
|
406
448
|
|
|
407
449
|
### 1. Dispatch the implementer
|
|
408
450
|
|
|
409
|
-
Record BASE (`git rev-parse HEAD`) before dispatching —
|
|
410
|
-
and fix-round diffs need it.
|
|
451
|
+
Record BASE (`git rev-parse HEAD` in the plan checkout) before dispatching —
|
|
452
|
+
the review package and fix-round diffs need it. Every task in a wave shares
|
|
453
|
+
the wave's BASE.
|
|
411
454
|
|
|
412
455
|
- **Task brief:** before dispatching an implementer, run this skill's
|
|
413
456
|
`bash scripts/task-brief PLAN_FILE N` — it extracts the task's full text to a
|
|
@@ -440,7 +483,8 @@ and fix-round diffs need it.
|
|
|
440
483
|
a pointer to that ledger entry in the dispatch.
|
|
441
484
|
- Record the implementer's agent identity from the dispatch result —
|
|
442
485
|
fix-loop rounds 1-2 resume this agent.
|
|
443
|
-
-
|
|
486
|
+
- Dispatch a wave's implementers together: ONE `task` call with one item per
|
|
487
|
+
task. A task runs only in the wave the ledger gave it.
|
|
444
488
|
- **On omp, the agent id is the handle and resume is a message.** The
|
|
445
489
|
`<task-result id="X" …>` envelope (inline, or delivered as a notice)
|
|
446
490
|
reports the agent id and says the agent is now idle. Use that id exactly
|
|
@@ -448,7 +492,8 @@ and fix-round diffs need it.
|
|
|
448
492
|
that was already taken (`Name-2`), and calls a follow-up turn's job
|
|
449
493
|
`<id>-2` — the job id is not the agent id. Ledger the dispatch the moment
|
|
450
494
|
you have the id, together with BASE, so both survive compaction:
|
|
451
|
-
`Task <N>: dispatched (BASE <base7>, implementer <id>
|
|
495
|
+
`Task <N>: dispatched (BASE <base7>, implementer <id>[, worktree <absolute path>])`,
|
|
496
|
+
the worktree part for a wave task only. Fix rounds 1-2
|
|
452
497
|
and the answer to a NEEDS_CONTEXT then go to that agent with
|
|
453
498
|
`write agent://<id>`.
|
|
454
499
|
- **The write has two success answers; only an error means "dispatch
|
|
@@ -461,14 +506,51 @@ and fix-round diffs need it.
|
|
|
461
506
|
next result arrives as a notice either way. Only an error answer (`Failed:
|
|
462
507
|
…`, or a write error) means dispatch a fresh `sdd-implementer`. That
|
|
463
508
|
dispatch gets a new id, which omp may suffix (`Name-2`) because the old id is
|
|
464
|
-
taken: ledger it — `Task <N>: re-dispatched (implementer <new id>)` — and use
|
|
509
|
+
taken: ledger it — `Task <N>: re-dispatched (implementer <new id>[, worktree <absolute path>])` — and use
|
|
465
510
|
it from then on.
|
|
466
|
-
- **
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
`task.isolation.merge: patch` an isolated run's work lands as an applied
|
|
470
|
-
uncommitted diff, so a review package has no commit range to cut
|
|
471
|
-
|
|
511
|
+
- **A wave of two or more: one git worktree per task, not omp isolation.**
|
|
512
|
+
Implementers sharing one checkout overwrite each other, and
|
|
513
|
+
`task.isolation.enabled` does not fit SDD. Under the default
|
|
514
|
+
`task.isolation.merge: patch` an isolated run's work lands as an applied
|
|
515
|
+
but uncommitted diff, so a review package has no commit range to cut.
|
|
516
|
+
`merge: branch` keeps the commits, but omp cherry-picks them onto the plan
|
|
517
|
+
branch the moment the task ends, before any review, under new commit ids,
|
|
518
|
+
and deletes the task branch. And fix rounds 1-2 resume the implementer,
|
|
519
|
+
which an isolated agent cannot take. Measured on omp 18.11.0: a `write
|
|
520
|
+
agent://<id>` to an isolated agent answers `Delivered`, the agent commits
|
|
521
|
+
its fix in its own copy, and the fix never reaches the plan branch while
|
|
522
|
+
the session runs; after the session ended it sat on a leftover
|
|
523
|
+
`omp/task/<id>` branch that also repeats the already-merged commit.
|
|
524
|
+
Before dispatching the wave, from the plan checkout, add one
|
|
525
|
+
worktree per task at the plan branch's head:
|
|
526
|
+
|
|
527
|
+
```bash
|
|
528
|
+
repo=$(basename "$(git rev-parse --show-toplevel)")
|
|
529
|
+
omp worktree add -b "sdd/<plan>/task-<N>" ~/.omp/wt/"$repo-<plan>-task-<N>"
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
`<plan>` is the plan file's name without `.md`;
|
|
533
|
+
superpowers:using-git-worktrees says why `omp worktree add` and
|
|
534
|
+
`~/.omp/wt/`. If the add warns that the clone fell back to a plain
|
|
535
|
+
checkout, the worktree lacks `node_modules` and other ignored build
|
|
536
|
+
output: run the plan's install step there before dispatching. A wave of
|
|
537
|
+
one runs in the plan checkout, with no extra worktree.
|
|
538
|
+
|
|
539
|
+
**Until it merges, a wave task lives in its worktree, not in yours.** The
|
|
540
|
+
`task` tool has no `cwd`, so every subagent starts in your checkout, which
|
|
541
|
+
does not have the task's commits yet. So every dispatch for the task —
|
|
542
|
+
implementer, re-dispatch, escalation, reviewer, re-reviewer — carries its
|
|
543
|
+
worktree's absolute path: the implementer template's `Work from:` line,
|
|
544
|
+
and for a reviewer a `Checkout: <path>` line saying to read the changed
|
|
545
|
+
files and their call sites there. Every command you run for the task
|
|
546
|
+
(its tests, a proven-trivial fix and its commit) runs with the `bash`
|
|
547
|
+
tool's `cwd` set to that path, and its branch `sdd/<plan>/task-<N>` stands
|
|
548
|
+
in for HEAD in every review-package command for it. The skill's scripts
|
|
549
|
+
(`task-brief`, `review-package`) still run from the plan checkout, never
|
|
550
|
+
from a task worktree: they write into the workspace of the checkout they
|
|
551
|
+
run in, and a task worktree's copy is deleted with it. If the session
|
|
552
|
+
never got `/move`d into the plan's worktree (Setup), run every git command
|
|
553
|
+
that touches the plan branch with `cwd` set to the plan checkout, too.
|
|
472
554
|
|
|
473
555
|
Template: [implementer-prompt.md](implementer-prompt.md)
|
|
474
556
|
|
|
@@ -476,9 +558,18 @@ Template: [implementer-prompt.md](implementer-prompt.md)
|
|
|
476
558
|
|
|
477
559
|
Implementer subagents report one of four statuses. Handle each appropriately:
|
|
478
560
|
|
|
479
|
-
**DONE:**
|
|
561
|
+
**DONE:** For a wave task, first check it worked where it should: its
|
|
562
|
+
worktree has commits past BASE (`git -C <worktree> rev-list --count
|
|
563
|
+
BASE..HEAD` is 1 or more), its worktree is clean (`git -C <worktree> status
|
|
564
|
+
--porcelain` empty; untracked leftovers go back to the implementer), and
|
|
565
|
+
your own checkout gained no changes. A task that wrote into your checkout
|
|
566
|
+
goes back to its implementer with the paths. Then check the task's line in
|
|
567
|
+
the review list.
|
|
480
568
|
|
|
481
|
-
|
|
569
|
+
- **`review per-task`:** 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; for a wave task, its branch `sdd/<plan>/task-<N>` stands in for HEAD), then dispatch `sdd-reviewer` with the printed path.
|
|
570
|
+
- **`review at final`:** run the covering test command from the brief yourself, once, in the task's checkout, with its output redirected to a file in the plan's workspace; read the tail. A brief that names no test (docs, configuration) gets the cheapest check that can fail instead (a build, a lint, a parse), or goes on the review list. That run is the only check this task gets before the final review, so never take the implementer's report in its place. A pass completes the task (step 5). A failure goes back to the implementer with the output file's path: rounds 1-2 resume it, round 3 is a fresh `sdd-escalation-implementer`, as in the fix loop, and each round ends when your rerun passes, with no re-review. A failure after round 3 is a plan the tests disagree with: stop and ask.
|
|
571
|
+
|
|
572
|
+
**DONE_WITH_CONCERNS:** The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness, address them before review, and put a `review at final` task on the review list (`Task <N>: review per-task — <concern>`). If they're observations (e.g., "this file is getting large"), note them and proceed.
|
|
482
573
|
|
|
483
574
|
**NEEDS_CONTEXT:** The implementer needs information that wasn't provided. Provide the missing context and re-dispatch. On omp, message the idle agent instead (`write agent://<id>`, the id from the ledger's `dispatched` line): it keeps its context and yields again. Only a write error means re-dispatch, with the context carried in the brief.
|
|
484
575
|
|
|
@@ -505,11 +596,13 @@ rush it into implementation.
|
|
|
505
596
|
|
|
506
597
|
### 3. Review the task
|
|
507
598
|
|
|
508
|
-
|
|
509
|
-
final whole-branch review.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
599
|
+
Task reviews run for the tasks on the review list (Setup); every other task
|
|
600
|
+
gets its review from the final whole-branch review. Per-task reviews are
|
|
601
|
+
task-scoped gates; the broad review happens once, at the end. For a task on
|
|
602
|
+
the list, never skip the review, and never accept a report missing either
|
|
603
|
+
verdict — spec compliance AND task quality are both required. Implementer
|
|
604
|
+
self-review never replaces a review: for a listed task the task review is
|
|
605
|
+
it, for any other the final review is.
|
|
513
606
|
|
|
514
607
|
- Hand the reviewer its diff as a file: run this skill's
|
|
515
608
|
`bash scripts/review-package PLAN_FILE BASE HEAD` and pass the reviewer the file path
|
|
@@ -527,7 +620,8 @@ needed.
|
|
|
527
620
|
dispatch a task reviewer without a diff file.
|
|
528
621
|
- **Reviewer inputs:** the task reviewer gets three paths — the same brief
|
|
529
622
|
file, the report file, and the review package — plus the global
|
|
530
|
-
constraints that bind the task
|
|
623
|
+
constraints that bind the task, and for a wave task a `Checkout:` line with
|
|
624
|
+
its worktree's absolute path (the re-reviewer gets the same line).
|
|
531
625
|
- The global-constraints block you hand the reviewer is its attention
|
|
532
626
|
lens. Copy the binding requirements verbatim from the plan's Global
|
|
533
627
|
Constraints section or the spec: exact values, exact formats, and the
|
|
@@ -693,17 +787,58 @@ a silent discard is forbidden.
|
|
|
693
787
|
|
|
694
788
|
### 5. Complete the task
|
|
695
789
|
|
|
696
|
-
|
|
697
|
-
ruling at the cap
|
|
698
|
-
|
|
790
|
+
A task is done when its review comes back clean, when every open finding is
|
|
791
|
+
parked with a ruling at the cap, or, for a `review at final` task, when your
|
|
792
|
+
own run of its covering tests passes.
|
|
793
|
+
|
|
794
|
+
**A wave task merges first, and its tests run before the merge commits.**
|
|
795
|
+
From the plan checkout, as soon as the task is done (wave tasks are
|
|
796
|
+
independent, so their order does not matter):
|
|
797
|
+
|
|
798
|
+
```bash
|
|
799
|
+
git merge --no-ff --no-commit "sdd/<plan>/task-<N>"
|
|
800
|
+
# run the task's covering tests on the merged tree, output to a workspace file
|
|
801
|
+
git commit --no-edit
|
|
802
|
+
```
|
|
803
|
+
|
|
804
|
+
If the merge stops on a conflict, or the covering tests fail on the merged
|
|
805
|
+
tree, run `git merge --abort` and send the task back to its implementer
|
|
806
|
+
(`write agent://<id>`) with the plan branch's name and, for a failure, the
|
|
807
|
+
output file's path: rebase onto the plan branch, fix what the merge
|
|
808
|
+
exposed, re-run its covering tests, report again. Each such round counts
|
|
809
|
+
toward the task's three rounds (rounds and breaker as in the fix loop);
|
|
810
|
+
ledger it as `Task <N>: rebased (<conflict | failing test>)`. A `review
|
|
811
|
+
per-task` task whose rebase changed code gets a scoped re-review over its
|
|
812
|
+
rebased commits: `review-package PLAN_FILE <plan-branch>
|
|
813
|
+
sdd/<plan>/task-<N>`. A failure that belongs to a task already merged, not
|
|
814
|
+
to this one, goes to ONE fix dispatch on the plan checkout as a fix round of
|
|
815
|
+
that earlier task; then merge this one.
|
|
816
|
+
|
|
817
|
+
Right after the merge commit, ledger `Task <N>: merged (<sha7>)`, then
|
|
818
|
+
remove the task's worktree and branch: `git worktree remove <path>`, then
|
|
819
|
+
`git branch -d "sdd/<plan>/task-<N>"`. If the removal refuses, read
|
|
820
|
+
`git -C <path> status --short`: use `--force` only when nothing it lists is
|
|
821
|
+
missing from the merge; otherwise ledger it and leave it for Finish.
|
|
822
|
+
|
|
823
|
+
After the last task of a wave of two or more merges, run the full suite once
|
|
824
|
+
in the plan checkout, output to a workspace file. Implementers ran it in
|
|
825
|
+
worktrees without their siblings, so this is the first run on the combined
|
|
826
|
+
tree. A failure no single task owns goes to ONE fix dispatch on the plan
|
|
827
|
+
checkout, ledgered `Wave <K>: fix (<failing tests>)`, before the next wave
|
|
828
|
+
starts.
|
|
829
|
+
|
|
830
|
+
Then append the completion line to the ledger in the same message as your
|
|
831
|
+
other bookkeeping:
|
|
699
832
|
|
|
700
833
|
- `Task <N>: complete (commits <base7>..<head7>, review clean)`
|
|
701
834
|
- `Task <N>: complete (commits <base7>..<head7>, <K> parked)` after a
|
|
702
835
|
tripped breaker
|
|
836
|
+
- `Task <N>: complete (commits <base7>..<head7>, review at final — tests: <command>, pass)`
|
|
703
837
|
|
|
704
|
-
Then mark the todo complete
|
|
705
|
-
|
|
706
|
-
parked-with-ruling at
|
|
838
|
+
Then mark the todo complete. Start the next wave only when every task of
|
|
839
|
+
this one is complete and merged; never start it while a task has open
|
|
840
|
+
Critical/Important issues that are neither fixed nor parked-with-ruling at
|
|
841
|
+
the cap.
|
|
707
842
|
|
|
708
843
|
## Final Review
|
|
709
844
|
|
|
@@ -713,13 +848,15 @@ branch started from, e.g. `git merge-base main HEAD`) and include the
|
|
|
713
848
|
printed path in the final review dispatch, so the final reviewer reads
|
|
714
849
|
one file instead of re-deriving the branch diff with git commands. Dispatch
|
|
715
850
|
`sdd-final-reviewer` (the deepest seat, once per plan — see Agent
|
|
716
|
-
Selection) with a `task` that says the plan ran subagent-driven
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
`
|
|
851
|
+
Selection) with a `task` that says the plan ran subagent-driven and names:
|
|
852
|
+
the package path; the plan/spec paths; every `review per-task` task with its
|
|
853
|
+
class, which had its own task review (so the last review spends its depth
|
|
854
|
+
on the seams around them); every `review at final` task, which had none, so
|
|
855
|
+
the final reviewer does the task review's work on it first; the ledger's
|
|
856
|
+
deferred-minor and parked-with-ruling lines verbatim; every `rebased` and
|
|
857
|
+
`Wave <K>: fix` line (code no task review saw); and every `Task <N>:
|
|
858
|
+
applied … proof:` line, a fix you applied yourself on the proven-trivial
|
|
859
|
+
route without a re-review (the reviewer checks those as if unreviewed). Do not
|
|
723
860
|
paste requesting-code-review's `code-reviewer.md` into the dispatch — that
|
|
724
861
|
template asks a prose "Ready to merge?" and has no slot for the package or
|
|
725
862
|
the ledger; the agent reads that file's review rubric itself. The agent
|
|
@@ -757,6 +894,11 @@ took on your human partner's behalf reach them — they read it and rework
|
|
|
757
894
|
whatever you got wrong. A ruling that dies with the workspace was a decision
|
|
758
895
|
made in secret.
|
|
759
896
|
|
|
897
|
+
Check that no wave left anything behind: `git worktree list` shows none of
|
|
898
|
+
this plan's task worktrees, and `git branch --list 'sdd/<plan>/*'` is empty.
|
|
899
|
+
Remove a leftover as in Complete the task, or name it in your final message
|
|
900
|
+
if it holds work the merge does not.
|
|
901
|
+
|
|
760
902
|
When the final whole-branch review is clean and its fixes are merged,
|
|
761
903
|
delete this plan's workspace (`rm -rf <workspace>`) — the git history is
|
|
762
904
|
the record now. Sibling directories belong to other plans; leave them
|
|
@@ -774,7 +916,9 @@ Use superpowers:finishing-a-development-branch.
|
|
|
774
916
|
| "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. |
|
|
775
917
|
| "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. |
|
|
776
918
|
| "The fix was small, skip the re-review" | Small is not the test — proven is. If you cannot run one command that proves the exact property (and ledger it), the round ends with a scoped re-review. |
|
|
777
|
-
| "
|
|
919
|
+
| "This auth change is one line — review it at final" | Risk class, not size, puts a task on the review list. One line of auth gets its own review. |
|
|
920
|
+
| "The report says the tests pass, skip my run" | For a `review at final` task, your run is the only check before the merge. Run it. |
|
|
921
|
+
| "These two tasks barely touch — same wave" | A shared file or a Consumes/Produces link means separate waves. A conflict costs a rebase round; a silent clash between them costs the final review. |
|
|
778
922
|
| "Ledger bookkeeping is overhead" | The ledger is what survives compaction. Controllers without one have re-dispatched entire completed task sequences. |
|
|
779
923
|
| "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. |
|
|
780
924
|
|
|
@@ -784,15 +928,17 @@ Use superpowers:finishing-a-development-branch.
|
|
|
784
928
|
You: I'm using Subagent-Driven Development to execute this plan.
|
|
785
929
|
|
|
786
930
|
[Setup: worktree verified; on omp, session moved into it with /move]
|
|
787
|
-
[Read plan file once: docs/
|
|
788
|
-
[Resolve workspace: bash scripts/sdd-workspace docs/
|
|
931
|
+
[Read plan file once: docs/plans/feature-plan.md]
|
|
932
|
+
[Resolve workspace: bash scripts/sdd-workspace docs/plans/feature-plan.md — no ledger inside, fresh start]
|
|
789
933
|
[On omp: scripts dir resolved with realpath skill://subagent-driven-development/scripts and added to the ledger as "SDD scripts: <dir>"; each script runs as bash <dir>/<name>]
|
|
790
934
|
[Create todos for all tasks]
|
|
935
|
+
[Pre-flight scan → ledger: Tasks 1, 3, 4: review at final · Task 2: review per-task — persisted data (repair rewrites stored records) · Wave 1: tasks 1, 3 · Wave 2: tasks 2, 4]
|
|
791
936
|
|
|
792
|
-
|
|
937
|
+
Wave 1: Task 1 (hook installation script) and Task 3 (help text)
|
|
793
938
|
|
|
794
|
-
[
|
|
795
|
-
[
|
|
939
|
+
[Two worktrees: omp worktree add -b sdd/feature-plan/task-1 …, and task-3]
|
|
940
|
+
[Run task-brief for Tasks 1 and 3; ONE task call with two implementer items, each naming its worktree]
|
|
941
|
+
[Ledger: Task 1: dispatched (BASE a1b2c3d, implementer Impl1, worktree /home/me/.omp/wt/app-feature-plan-task-1)]
|
|
796
942
|
|
|
797
943
|
Implementer: "Before I begin - should the hook be installed at user or system level?"
|
|
798
944
|
|
|
@@ -804,23 +950,23 @@ Implementer: [Later]
|
|
|
804
950
|
- Self-review: Found I missed --force flag, added it
|
|
805
951
|
- Committed
|
|
806
952
|
|
|
807
|
-
[
|
|
808
|
-
sdd-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
[
|
|
953
|
+
[Task 1 is review at final: run the brief's covering test in its worktree — npm test test/install.test.js: 5/5 passing]
|
|
954
|
+
[git merge --no-ff --no-commit sdd/feature-plan/task-1; covering test on the merged tree passes; git commit --no-edit]
|
|
955
|
+
[Ledger: Task 1: merged (9a8b7c6); worktree and branch removed]
|
|
956
|
+
[Ledger: Task 1: complete (commits a1b2c3d..d4e5f6a, review at final — tests: npm test test/install.test.js, pass)]
|
|
957
|
+
[Task 3 likewise; its merge was the wave's last, so the full suite runs once in the plan checkout: pass]
|
|
812
958
|
|
|
813
|
-
|
|
959
|
+
Wave 2: Task 2 (recovery modes, review per-task) and Task 4
|
|
814
960
|
|
|
815
961
|
[Run task-brief for Task 2; dispatch implementer with brief + report paths + context]
|
|
816
|
-
[Ledger: Task 2: dispatched (BASE
|
|
962
|
+
[Ledger: Task 2: dispatched (BASE e5f6a7b, implementer Impl2, worktree /home/me/.omp/wt/app-feature-plan-task-2)]
|
|
817
963
|
|
|
818
964
|
Implementer: [No questions]
|
|
819
965
|
- Added verify/repair modes
|
|
820
966
|
- 8/8 tests passing
|
|
821
967
|
- Committed
|
|
822
968
|
|
|
823
|
-
[Run review-package PLAN_FILE BASE
|
|
969
|
+
[Run review-package PLAN_FILE BASE sdd/feature-plan/task-2; dispatch sdd-reviewer with the printed path]
|
|
824
970
|
sdd-reviewer: spec_compliance: issues · task_quality: needs_fixes
|
|
825
971
|
spec_issues: ["Missing: progress reporting (spec says 'report every 100 items')"]
|
|
826
972
|
findings: [{severity: Important, location: src/recovery.js:7, body: "Magic number (100)"}]
|
|
@@ -829,19 +975,20 @@ sdd-reviewer: spec_compliance: issues · task_quality: needs_fixes
|
|
|
829
975
|
Implementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.
|
|
830
976
|
Re-ran test/recovery.test.js — 10/10 passing. Fix report appended.
|
|
831
977
|
|
|
832
|
-
[Run review-package PLAN_FILE FIX_BASE
|
|
978
|
+
[Run review-package PLAN_FILE FIX_BASE sdd/feature-plan/task-2; dispatch sdd-rereviewer]
|
|
833
979
|
sdd-rereviewer: round_verdict: all_addressed
|
|
834
980
|
finding_verdicts: [{Missing progress reporting: ADDRESSED, src/recovery.js:41},
|
|
835
981
|
{Magic number: ADDRESSED, src/recovery.js:7}]
|
|
836
982
|
new_breakage: [] · out_of_scope: []
|
|
837
983
|
|
|
838
|
-
[Ledger: Task 2: fix round 1/3 (2 addressed, 0 open; commits
|
|
839
|
-
[Ledger: Task 2:
|
|
984
|
+
[Ledger: Task 2: fix round 1/3 (2 addressed, 0 open; commits e5f6a7b..b7c8d9e)]
|
|
985
|
+
[Merge sdd/feature-plan/task-2 the same way; Ledger: Task 2: merged (c3d4e5f)]
|
|
986
|
+
[Ledger: Task 2: complete (commits e5f6a7b..b7c8d9e, review clean)]
|
|
840
987
|
|
|
841
988
|
...
|
|
842
989
|
|
|
843
|
-
[After
|
|
844
|
-
[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch sdd-final-reviewer]
|
|
990
|
+
[After the last wave]
|
|
991
|
+
[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch sdd-final-reviewer naming Task 2's class, and Tasks 1, 3, 4 as review at final]
|
|
845
992
|
[Read the full result at agent://<id>]
|
|
846
993
|
sdd-final-reviewer: Ledger triage: deferred minors — none block merge. **Mergeable:** yes
|
|
847
994
|
|
|
@@ -47,7 +47,14 @@ Use this template when dispatching an implementer subagent.
|
|
|
47
47
|
5. Self-review (see below)
|
|
48
48
|
6. Report back
|
|
49
49
|
|
|
50
|
-
Work from: [directory]
|
|
50
|
+
Work from: [directory — for a wave task, its worktree's absolute path]
|
|
51
|
+
|
|
52
|
+
Work only under that directory. Your session may have started in a
|
|
53
|
+
different checkout, so give every file tool (`read`, `write`, `edit`,
|
|
54
|
+
`grep`, `glob`, `lsp`) absolute paths under it, set the `bash` tool's
|
|
55
|
+
`cwd` to it for every command, and commit on the branch checked out
|
|
56
|
+
there. The brief and the report file are the exception: use the paths
|
|
57
|
+
given for them.
|
|
51
58
|
|
|
52
59
|
**While you work:** If you encounter something unexpected or unclear, **ask questions**.
|
|
53
60
|
It's always OK to pause and clarify. Don't guess or make assumptions.
|
|
@@ -60,12 +67,12 @@ Use this template when dispatching an implementer subagent.
|
|
|
60
67
|
Do all of this task's work yourself. Never spawn a subagent to
|
|
61
68
|
implement part of the task, and above all never spawn a reviewer to
|
|
62
69
|
check your work. Self-review (below) means reading your own diff.
|
|
63
|
-
Review is the controller's job: after you report, it
|
|
64
|
-
|
|
65
|
-
that review at full cost, and its
|
|
66
|
-
the process. If you catch yourself
|
|
67
|
-
would strengthen my report" — that
|
|
68
|
-
Report instead.
|
|
70
|
+
Review is the controller's job: after you report, it reviews or tests
|
|
71
|
+
your work, and a whole-branch review at the end covers every task. A
|
|
72
|
+
reviewer you spawn duplicates that review at full cost, and its
|
|
73
|
+
approval counts for nothing in the process. If you catch yourself
|
|
74
|
+
thinking "an independent review would strengthen my report" — that
|
|
75
|
+
review is already scheduled. Report instead.
|
|
69
76
|
|
|
70
77
|
## Code Organization
|
|
71
78
|
|
|
@@ -126,13 +133,21 @@ Use this template when dispatching an implementer subagent.
|
|
|
126
133
|
|
|
127
134
|
## After Review Findings
|
|
128
135
|
|
|
129
|
-
If the task review
|
|
136
|
+
If the task review, or the controller's own run of your covering tests,
|
|
137
|
+
finds issues, you will be resumed with the findings.
|
|
130
138
|
Fix them, re-run the tests that cover the amended code, and append a fix
|
|
131
139
|
report to your report file: what you changed, the covering tests you
|
|
132
140
|
ran, the command, and the output. Reviewers will not re-run tests for
|
|
133
141
|
you — your report is the test evidence. Then reply with the same short
|
|
134
142
|
status contract as your first report.
|
|
135
143
|
|
|
144
|
+
You may also be resumed because your branch would not merge into the
|
|
145
|
+
plan branch: the message names the plan branch and, when tests failed
|
|
146
|
+
on the merged tree, the file holding their output. Rebase onto the
|
|
147
|
+
plan branch, fix what the merge exposed, re-run your covering tests,
|
|
148
|
+
append what you did to your report file, and reply with the same short
|
|
149
|
+
status contract.
|
|
150
|
+
|
|
136
151
|
## Report Format
|
|
137
152
|
|
|
138
153
|
Write your full report to [REPORT_FILE]:
|