Subagent-Driven Development
Execute plan by dispatching fresh subagent per task, with a single read-only task review after each — one reviewer returns a spec-compliance verdict and a code-quality verdict in one pass.
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.
Core principle: Fresh subagent per task + a single read-only task review (spec + quality verdicts in one pass) = high quality, fast iteration
Continuous execution: Do not pause to check in with your human partner between tasks. Execute all tasks from the plan without stopping. The only reasons to stop are: BLOCKED status you cannot resolve, ambiguity that genuinely prevents progress, or all tasks complete. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
When to Use
digraph when_to_use {
"Have implementation plan?" [shape=diamond];
"Tasks mostly independent?" [shape=diamond];
"Stay in this session?" [shape=diamond];
"subagent-driven-development" [shape=box];
"executing-plans" [shape=box];
"Manual execution or brainstorm first" [shape=box];
"Have implementation plan?" -> "Tasks mostly independent?" [label="yes"];
"Have implementation plan?" -> "Manual execution or brainstorm first" [label="no"];
"Tasks mostly independent?" -> "Stay in this session?" [label="yes"];
"Tasks mostly independent?" -> "Manual execution or brainstorm first" [label="no - tightly coupled"];
"Stay in this session?" -> "subagent-driven-development" [label="yes"];
"Stay in this session?" -> "executing-plans" [label="no - parallel session"];
}
vs. Executing Plans (parallel session):
- Same session (no context switch)
- Fresh subagent per task (no context pollution)
- One task review after each task: spec-compliance and code-quality verdicts in a single read-only pass
- Faster iteration (no human-in-loop between tasks)
Pre-Flight Plan Review
Before dispatching Task 1, scan the plan once for conflicts:
- tasks that contradict each other or the plan's Global Constraints
- anything the plan explicitly mandates that the review rubric treats as a defect (a test that asserts nothing, verbatim duplication of a logic block)
Present everything you find to your human partner as one batched structured question — each finding beside the plan text that mandates it, asking which governs — before execution begins, not one interrupt per discovery mid-plan. If the scan is clean, proceed without comment. The review loop remains the net for conflicts that only emerge from implementation.
The Process (Sequential Mode)
This section describes sequential execution — one task at a time in a shared epic worktree. This is the default when tasks have dependencies or only one task is unblocked. For parallel execution of independent tasks, see Parallel Batch Mode below.
digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task";
"Dispatch implementer subagent (./implementer-prompt.md)" [shape=box];
"Implementer subagent asks questions?" [shape=diamond];
"Answer questions, provide context" [shape=box];
"Implementer subagent implements, tests, commits, self-reviews" [shape=box];
"Dispatch task reviewer subagent (./task-reviewer-prompt.md)" [shape=box];
"Task reviewer: spec compliant AND quality approved?" [shape=diamond];
"Fix round (max 5): FRESH implementer + scoped re-review (./re-review-prompt.md)" [shape=box];
"Re-review PASS and full suite green?" [shape=diamond];
"Breaker: file findings, block task (references/breaker-trip.md)" [shape=box];
"bd close <task-id> --reason 'Completed'" [shape=box];
}
"Read plan, extract all tasks, create epic bead + child beads (bd create)" [shape=box];
"More tasks remain?" [shape=diamond];
"Dispatch final code reviewer subagent for entire implementation" [shape=box];
"Use beads-superpowers:finishing-a-development-branch" [shape=box style=filled fillcolor=lightgreen];
"Read plan, extract all tasks, create epic bead + child beads (bd create)" -> "Dispatch implementer subagent (./implementer-prompt.md)";
"Dispatch implementer subagent (./implementer-prompt.md)" -> "Implementer subagent asks questions?";
"Implementer subagent asks questions?" -> "Answer questions, provide context" [label="yes"];
"Answer questions, provide context" -> "Dispatch implementer subagent (./implementer-prompt.md)";
"Implementer subagent asks questions?" -> "Implementer subagent implements, tests, commits, self-reviews" [label="no"];
"Implementer subagent implements, tests, commits, self-reviews" -> "Dispatch task reviewer subagent (./task-reviewer-prompt.md)";
"Dispatch task reviewer subagent (./task-reviewer-prompt.md)" -> "Task reviewer: spec compliant AND quality approved?";
"Task reviewer: spec compliant AND quality approved?" -> "Fix round (max 5): FRESH implementer + scoped re-review (./re-review-prompt.md)" [label="no"];
"Fix round (max 5): FRESH implementer + scoped re-review (./re-review-prompt.md)" -> "Re-review PASS and full suite green?";
"Re-review PASS and full suite green?" -> "bd close <task-id> --reason 'Completed'" [label="yes"];
"Re-review PASS and full suite green?" -> "Fix round (max 5): FRESH implementer + scoped re-review (./re-review-prompt.md)" [label="no - round < 5"];
"Re-review PASS and full suite green?" -> "Breaker: file findings, block task (references/breaker-trip.md)" [label="no - round 5 closed"];
"Task reviewer: spec compliant AND quality approved?" -> "bd close <task-id> --reason 'Completed'" [label="yes"];
"bd close <task-id> --reason 'Completed'" -> "More tasks remain?";
"More tasks remain?" -> "Dispatch implementer subagent (./implementer-prompt.md)" [label="yes"];
"More tasks remain?" -> "Dispatch final code reviewer subagent for entire implementation" [label="no"];
"Dispatch final code reviewer subagent for entire implementation" -> "Use beads-superpowers:finishing-a-development-branch";
}
Checking for remaining tasks: Use bd ready --parent <epic-id> to see remaining unblocked child tasks. Use bd epic status <epic-id> for a summary view of completion percentage. When bd ready returns no results for the epic, all tasks are complete.
--claimconsent boundary. This skill's autonomous take-next / batch-dispatch flow is the one placebd ready --claimis legitimate. That autonomous--claimis FORBIDDEN wherever the user picks the work (orientation, brainstorming, session close) — the consent gate binds even when this skill is not loaded.
Parallel Batch Mode
When bd ready --parent <epic-id> returns multiple unblocked tasks, those tasks have no dependencies between them and can execute in parallel — each in its own isolated bd worktree.
Core principle: One bd worktree per task + parallel dispatch = safe concurrency with per-task rollback.
Parallel cap: Maximum 5 subagents per batch. If more tasks are unblocked, split into batches of 5.
Before you fan out (orchestrator-only)
Worktrees isolate files, not assumptions — parallel agents on different files can still diverge on an un-prescribed shared decision (MAST FC2). Before dispatching:
- Front-load shared decisions — list every decision ≥2 agents depend on (schemas, naming, interfaces, conventions); decide each once and write it verbatim into every agent prompt.
- Share full context, not summaries — give each agent the relevant traces/facts, not a lossy digest.
This is orchestrator discipline applied be