summaryrefslogtreecommitdiff
path: root/skills/subagent-driven-development
diff options
context:
space:
mode:
authorJesse Vincent <jesse@primeradiant.com>2026-09-18 17:28:09 -0700
committerJesse Vincent <jesse@primeradiant.com>2026-09-18 17:28:09 -0700
commitcffb7c95b64524cd59ddb4d1c9d2c2675482315e (patch)
tree38263673a455cdf894f19301aa284009d7edb1d8 /skills/subagent-driven-development
parent835c5f951cce3e169b755218a9d8f26b5854f0d5 (diff)
Plans as directories, and a boundary check before each next planplan-directories
A plan is a directory: 00-header.md plus one NN-<task>.md per task. The brief for task N is the header plus that file; sdd-workspace, task-brief, review-package, task-start and task-done take a file or a directory. Before starting the next plan in a set, executors run scripts/plan-boundary, which names every identifier the plan consumes from earlier plans that the code as built does not contain, in the next plan and in every later plan's Plan Set entry, and fix the plan until it prints clean. Measured: the directory form executes the same as the file form (inline 9/9, SDD 6/6, same cost) and plans at the same volume; the gate kept a five-plan set consistent with the code 2/2 against a planted cross-plan naming conflict, where a per-ruling duty managed 0/2.
Diffstat (limited to 'skills/subagent-driven-development')
-rw-r--r--skills/subagent-driven-development/SKILL.md30
-rwxr-xr-xskills/subagent-driven-development/scripts/review-package2
-rwxr-xr-xskills/subagent-driven-development/scripts/sdd-workspace4
-rwxr-xr-xskills/subagent-driven-development/scripts/task-brief10
4 files changed, 29 insertions, 17 deletions
diff --git a/skills/subagent-driven-development/SKILL.md b/skills/subagent-driven-development/SKILL.md
index f0e9b9f..6723646 100644
--- a/skills/subagent-driven-development/SKILL.md
+++ b/skills/subagent-driven-development/SKILL.md
@@ -134,7 +134,7 @@ sequences — the single most expensive failure observed. Track progress in
a ledger file, not only in todos.
- Each plan owns a workspace: at skill start, run this skill's
- `bash scripts/sdd-workspace PLAN_FILE` — it prints the plan's git-ignored
+ `bash scripts/sdd-workspace PLAN` — it prints the plan's git-ignored
directory (under `<repo-root>/.superpowers/sdd/`), home to
every artifact for THIS plan: ledger, briefs, reports, review packages.
Another plan's directory is never yours to read or write.
@@ -146,7 +146,7 @@ a ledger file, not only in todos.
ledger at the old flat path `.superpowers/sdd/progress.md` — is another
plan's progress: leave it in place and start your own, fresh.
- Create the ledger with its identity as the first line:
- `# SDD ledger — plan: <plan file path>`.
+ `# SDD ledger — plan: <plan path>`.
- The ledger is your recovery map: the commits it names exist in git even
when your context no longer remembers creating them. After compaction,
trust the ledger and `git log` over your own recollection.
@@ -249,7 +249,7 @@ Record BASE (`git rev-parse HEAD`) before dispatching — the review package
and fix-round diffs need it.
- **Task brief:** before dispatching an implementer, run this skill's
- `bash scripts/task-brief PLAN_FILE N` — it extracts the task's full text to a
+ `bash scripts/task-brief PLAN N` — it extracts the task's full text to a
uniquely named file and prints the path. Compose the dispatch so the
brief stays the single source of
requirements. Your dispatch should contain: (1) one line on where this
@@ -287,7 +287,7 @@ Template: [implementer-prompt.md](implementer-prompt.md)
Implementer subagents report one of four statuses. Handle each appropriately:
-**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.
+**DONE:** Generate the review package (`bash scripts/review-package PLAN 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.
**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.
@@ -314,7 +314,7 @@ required. Implementer self-review never replaces the task review; both are
needed.
- Hand the reviewer its diff as a file: run this skill's
- `bash scripts/review-package PLAN_FILE BASE HEAD` and pass the reviewer the file path
+ `bash scripts/review-package PLAN BASE HEAD` and pass the reviewer the file path
it prints (or, without bash: `git log --oneline`, `git diff --stat`,
and `git diff -U10` for the range, redirected to one uniquely named
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
covering test files in the fix message — a one-line fix does not need the
whole suite.
-**The re-review is scoped.** Run `bash scripts/review-package PLAN_FILE FIX_BASE HEAD`
+**The re-review is scoped.** Run `bash scripts/review-package PLAN FIX_BASE HEAD`
where FIX_BASE is the head the previous review saw, and dispatch
[re-review-prompt.md](re-review-prompt.md) with the findings list, the
brief, the report file, and the printed diff path. The re-reviewer verdicts
@@ -445,7 +445,7 @@ parked-with-ruling at the cap.
## Final Review
The final whole-branch review gets a package too: run
-`bash scripts/review-package PLAN_FILE MERGE_BASE HEAD` (MERGE_BASE = the commit the
+`bash scripts/review-package PLAN MERGE_BASE HEAD` (MERGE_BASE = the commit the
branch started from, e.g. `git merge-base main HEAD`) and include the
printed path in the final review dispatch, so the final reviewer reads
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.
Per-finding fixers each rebuild context and re-run suites; a real
session's final-review fix wave cost more than all its tasks combined.
Then run exactly one scoped re-review of the fix wave
-(`bash scripts/review-package PLAN_FILE FIX_BASE HEAD` over the fix range,
+(`bash scripts/review-package PLAN FIX_BASE HEAD` over the fix range,
[re-review-prompt.md](re-review-prompt.md)).
Adjudicate any residual findings as in the task loop's breaker: park with
rulings, or rule on the load-bearing ones and ledger what you decided. Only
@@ -481,7 +481,11 @@ made in secret. Then, under "Remaining plans", the Plan Set lines after this
plan (`None` if there are none): this plan being complete is not the
project being complete. When a plan follows this one, finishing this plan
means starting that one, under the same method and in this session: the
-set was reviewed once, and only the four stops stop you.
+set was reviewed once, and only the four stops stop you. Before its Task 1,
+run `../executing-plans/scripts/plan-boundary NEXT_PLAN`: it names
+every identifier the plan's Consumes lines take from earlier plans that the
+code as built does not contain. Fix each one in the plan file, ledger it as
+a ruling, and re-run until it prints `boundary: clean`.
When the final whole-branch review is clean and its fixes are merged,
delete this plan's workspace (`rm -rf <workspace>`) — the git history is
@@ -528,7 +532,7 @@ Implementer: [Later]
- Self-review: Found I missed --force flag, added it
- Committed
-[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]
+[Run review-package PLAN BASE HEAD; dispatch task reviewer with the printed path]
Task reviewer: Spec ✅ - all requirements met, nothing extra.
Strengths: Good test coverage, clean. Issues: None. Task quality: Approved.
@@ -543,7 +547,7 @@ Implementer: [No questions]
- 8/8 tests passing
- Committed
-[Run review-package PLAN_FILE BASE HEAD; dispatch task reviewer with the printed path]
+[Run review-package PLAN BASE HEAD; dispatch task reviewer with the printed path]
Task reviewer: Spec ❌:
- Missing: Progress reporting (spec says "report every 100 items")
Issues (Important): Magic number (100)
@@ -552,7 +556,7 @@ Task reviewer: Spec ❌:
Implementer: Added progress reporting, extracted PROGRESS_INTERVAL constant.
Re-ran test/recovery.test.js — 10/10 passing. Fix report appended.
-[Run review-package PLAN_FILE FIX_BASE HEAD; dispatch scoped re-review]
+[Run review-package PLAN FIX_BASE HEAD; dispatch scoped re-review]
Re-reviewer: Missing progress reporting — ADDRESSED (src/recovery.js:41).
Magic number — ADDRESSED (src/recovery.js:7). New breakage: none.
Verdict: all findings addressed.
@@ -563,7 +567,7 @@ Re-reviewer: Missing progress reporting — ADDRESSED (src/recovery.js:41).
...
[After all tasks]
-[Run review-package PLAN_FILE MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]
+[Run review-package PLAN MERGE_BASE HEAD; dispatch final code-reviewer, most capable model]
Final reviewer: All requirements met. Deferred minors triaged: none block merge.
[Delete this plan's workspace — the record now lives in git]
diff --git a/skills/subagent-driven-development/scripts/review-package b/skills/subagent-driven-development/scripts/review-package
index fa7625f..1898406 100755
--- a/skills/subagent-driven-development/scripts/review-package
+++ b/skills/subagent-driven-development/scripts/review-package
@@ -17,7 +17,7 @@ fi
plan=$1
base=$2
head=$3
-[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
+[ -e "$plan" ] || { echo "no such plan: $plan" >&2; exit 2; }
git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
diff --git a/skills/subagent-driven-development/scripts/sdd-workspace b/skills/subagent-driven-development/scripts/sdd-workspace
index ff6b983..dc3507d 100755
--- a/skills/subagent-driven-development/scripts/sdd-workspace
+++ b/skills/subagent-driven-development/scripts/sdd-workspace
@@ -36,9 +36,9 @@ if [ $# -ne 1 ]; then
fi
plan=$1
-[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
+[ -e "$plan" ] || { echo "no such plan: $plan" >&2; exit 2; }
-slug=$(basename "$plan" .md)
+slug=$(basename "$plan" .md) # a plan directory keeps its own name
[ -n "$slug" ] && [ "$slug" != "." ] && [ "$slug" != ".." ] \
|| { echo "cannot derive a workspace name from: $plan" >&2; exit 2; }
diff --git a/skills/subagent-driven-development/scripts/task-brief b/skills/subagent-driven-development/scripts/task-brief
index b49fc54..dd6994c 100755
--- a/skills/subagent-driven-development/scripts/task-brief
+++ b/skills/subagent-driven-development/scripts/task-brief
@@ -16,7 +16,7 @@ fi
plan=$1
n=$2
-[ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
+[ -e "$plan" ] || { echo "no such plan: $plan" >&2; exit 2; }
if [ $# -eq 3 ]; then
out=$3
@@ -27,6 +27,14 @@ else
out="$dir/task-${n}-brief.md"
fi
+if [ -d "$plan" ]; then
+ # directory plan: the shared header, then this task's own file
+ task=$(ls "$plan"/[0-9][0-9]-*.md 2>/dev/null | awk -v n="$n" '{ f=$0; sub(/.*\//,"",f); if (f+0==n) print $0 }' | head -1)
+ [ -n "$task" ] || { echo "task ${n} not found in ${plan} (no [0-9][0-9]-*.md numbered ${n})" >&2; exit 3; }
+ { [ -f "$plan/00-header.md" ] && cat "$plan/00-header.md"; echo; cat "$task"; } > "$out"
+ echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
+ exit 0
+fi
awk -v n="$n" '
/^```/ { infence = !infence }
!infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {