From design-to-code
Use after design-to-code:writing-plans completes and plan.md is user-approved. Dispatches fresh implementer subagents per task; each task passes spec-review and code-quality-review before completion. Main agent orchestrates; it never edits code. MUST be followed by design-to-code:tdd-verify-from-spec.
How this skill is triggered — by the user, by Claude, or both
Slash command
/design-to-code:subagent-driven-developmentThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Execute `plan.md` by dispatching a fresh subagent per task, with two-stage review (spec compliance then code quality) after each. The main agent orchestrates; it never edits code directly.
Execute plan.md by dispatching a fresh subagent per task, with two-stage review (spec compliance then code quality) after each. The main agent orchestrates; it never edits code directly.
Why subagents: You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions, you keep them focused and preserve your own context for coordination. They should never inherit your session's history — construct exactly what they need.
Core principle: Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration.
Continuous execution: Do not pause to check in with the user 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.
Announce at start: "I'm using the subagent-driven-development skill to execute the plan."
digraph when_to_use {
"Have user-approved plan.md?" [shape=diamond];
"On a feature branch/worktree?" [shape=diamond];
"design-to-code:subagent-driven-development" [shape=box];
"Return to design-to-code:writing-plans" [shape=box];
"Create feature branch/worktree first" [shape=box];
"Have user-approved plan.md?" -> "On a feature branch/worktree?" [label="yes"];
"Have user-approved plan.md?" -> "Return to design-to-code:writing-plans" [label="no"];
"On a feature branch/worktree?" -> "design-to-code:subagent-driven-development" [label="yes"];
"On a feature branch/worktree?" -> "Create feature branch/worktree first" [label="no"];
"Create feature branch/worktree first" -> "design-to-code:subagent-driven-development";
}
When invoked in a fresh session where the plan.md path was not passed from a previous skill:
find docs/design-to-code -name "plan.md" | sort to discover existing plans.plan.md and the spec.md in the same directory.plan.md was found under docs/design-to-code/; ask the user to run design-to-code:writing-plans first.Also check for an existing progress.md in the same directory — if present, read it to understand which tasks are already complete before starting.
You MUST create a task for each of these items and complete them in order:
plan.md once — extract every task with full text and Shared Context. The main agent holds this in memory; subagents never read the plan file directly.Depends on relationships.Depends on are satisfied and whose Files sets do not overlap with each other. Send all of them in a single message as parallel Agent calls. Tasks that share files or have unresolved dependencies are dispatched alone in their own round.Files list from plan.md to stage only that task's files (git add <exact paths>). Never use git add . or git add -A. Implementer subagents do NOT commit.progress.md after each task completes.design-to-code:tdd-verify-from-spec.digraph process {
rankdir=TB;
subgraph cluster_per_task {
label="Per Task (reviews serial)";
"Dispatch implementer (./implementer-prompt.md)" [shape=box];
"Implementer has questions?" [shape=diamond];
"Answer questions, re-dispatch implementer" [shape=box];
"Implementer implements, tests, self-reviews" [shape=box];
"Dispatch spec-reviewer (./spec-reviewer-prompt.md)" [shape=box];
"Spec review passes?" [shape=diamond];
"Re-dispatch implementer with spec feedback" [shape=box];
"Dispatch code-quality-reviewer (./code-quality-reviewer-prompt.md)" [shape=box];
"Code-quality review passes?" [shape=diamond];
"Re-dispatch implementer with quality feedback" [shape=box];
"Main agent: git add <task files>; git commit" [shape=box];
"Append progress.md" [shape=box];
}
"Read plan.md, extract all tasks, create TodoWrite" [shape=box];
"Ready tasks remain?" [shape=diamond];
"Group: tasks with Depends on satisfied + no file overlap" [shape=box];
"Dispatch all in group as parallel Agent calls" [shape=box];
"Invoke design-to-code:tdd-verify-from-spec" [shape=doublecircle];
"Read plan.md, extract all tasks, create TodoWrite" -> "Ready tasks remain?";
"Ready tasks remain?" -> "Group: tasks with Depends on satisfied + no file overlap" [label="yes"];
"Ready tasks remain?" -> "Invoke design-to-code:tdd-verify-from-spec" [label="no"];
"Group: tasks with Depends on satisfied + no file overlap" -> "Dispatch all in group as parallel Agent calls";
"Dispatch all in group as parallel Agent calls" -> "Dispatch implementer (./implementer-prompt.md)";
"Dispatch implementer (./implementer-prompt.md)" -> "Implementer has questions?";
"Implementer has questions?" -> "Answer questions, re-dispatch implementer" [label="yes"];
"Answer questions, re-dispatch implementer" -> "Dispatch implementer (./implementer-prompt.md)";
"Implementer has questions?" -> "Implementer implements, tests, self-reviews" [label="no"];
"Implementer implements, tests, self-reviews" -> "Dispatch spec-reviewer (./spec-reviewer-prompt.md)";
"Dispatch spec-reviewer (./spec-reviewer-prompt.md)" -> "Spec review passes?";
"Spec review passes?" -> "Re-dispatch implementer with spec feedback" [label="no"];
"Re-dispatch implementer with spec feedback" -> "Dispatch spec-reviewer (./spec-reviewer-prompt.md)";
"Spec review passes?" -> "Dispatch code-quality-reviewer (./code-quality-reviewer-prompt.md)" [label="yes"];
"Dispatch code-quality-reviewer (./code-quality-reviewer-prompt.md)" -> "Code-quality review passes?";
"Code-quality review passes?" -> "Re-dispatch implementer with quality feedback" [label="no"];
"Re-dispatch implementer with quality feedback" -> "Dispatch code-quality-reviewer (./code-quality-reviewer-prompt.md)";
"Code-quality review passes?" -> "Main agent: git add <task files>; git commit" [label="yes"];
"Main agent: git add <task files>; git commit" -> "Append progress.md";
"Append progress.md" -> "Ready tasks remain?";
}
Use the least powerful model that can handle each role to conserve cost and increase speed.
Task complexity signals:
Implementer subagents report one of four statuses. Handle each appropriately:
Never ignore an escalation or force the same model to retry without changes.
If a reviewer keeps finding issues, the implementer keeps fixing until the reviewer approves. There is no maximum round count — quality gates do not expire. If a loop feels stuck, the response is to diagnose root cause (task cut too large, plan unclear, wrong model) and adjust, not to time it out.
Multiple ready tasks (no open Depends on) whose Files sets do not overlap may be dispatched in parallel — implementers in one message with multiple Agent tool calls. Review stages remain serial to keep feedback tractable.
./implementer-prompt.md — sent to implementer subagents../spec-reviewer-prompt.md — sent to spec-compliance reviewer subagents../code-quality-reviewer-prompt.md — sent to code-quality reviewer subagents.Reviewer subagents return compact verdicts: PASS or FAIL, per-item findings, and required fixes. The main agent reads only the verdict and the required-fixes list — do not accumulate the full review body in context. Pass the required-fixes list verbatim to the next implementer dispatch.
Never:
plan.md; provide the full task text instead.main/release without an explicit user-created feature branch or worktree.If a subagent asks questions: answer clearly and completely before letting them proceed.
If a reviewer finds issues: the same implementer subagent fixes, reviewer re-reviews. Repeat until approved. Don't skip re-review.
progress.md — committed to git by the user's project. Appended per task:
## Task N: <name>
- Status: completed
- Implementer rounds: <n>
- Spec-review rounds: <n>
- Quality-review rounds: <n>
- Files changed: <list>
- Acceptance: ✅ <each item>
- Notes: <deviations worth recording>
Required workflow skills:
plan.md this skill executes.Subagents follow (inside their prompts):
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub zhangtianwei1998/design-to-code --plugin design-to-code