Distributing and Reviewing Claude Code Implementation Plans with Sub-Agents
機械翻訳 / Machine-translated
機械翻訳 / Machine-translated
Original article: Claude Codeの実装計画をサブエージェントに分担してレビューする (cccskills)
Skill page: subagent-driven-development
Key takeaways from this article
With subagent-driven-development, you can delegate each task in a Claude Code implementation plan to a separate agent.
Everything from confirming each task to the overall review proceeds as one continuous flow.
Progress is saved to a file, so even if work is interrupted midway, you can resume from where you left off.
This article introduces how the process actually unfolds, how to install it, example prompts, and prerequisites to verify before use.
Just hand over your implementation plan and make a single request — the agent takes on the coordinator role and drives task implementation and review all the way to the end.
Please carry this implementation plan through to completion using subagent-driven-development.
Upon receiving the request, the agent first sets up a Git worktree for the work (a mechanism that lets you work on the same repository in a separate folder).
It then reads through the plan once and creates a to-do list for each task.
Before starting, it identifies any contradictions in the plan and writes a table of task pairs that share files or handoffs into the progress log.
After that, starting from Task 1, it calls a new sub-agent (a separate agent handling a portion of the work) to handle implementation.
The implementation agent's job covers implementation, testing, committing, and writing results to a report file.
A separate review agent then reads the diff and returns a verdict on two points: conformance to specs and code quality.
Once all tasks are complete, the changes across the entire branch are reviewed using the highest-performing model available.
Appended to the final message is a list called "Rulings I made" — the decisions the agent made autonomously along the way.
What you need to verify is consolidated in the final review results and the list of decisions.
There are no "shall we continue?" check-ins between tasks.
The agent stops to ask the user only in these four situations:
This skill combines three elements — "a new implementation agent per task," "per-task review," and "a final overall review" — to support implementation that stays true to the plan.
It is distributed from the GitHub repository obra/superpowers.
The same repository also includes skills for planning and requesting reviews.
Each task is implemented by a new sub-agent that carries no context from previous conversations.
The coordinator extracts the full text of each task into an instruction file and passes that to the sub-agent — the entire plan file is never shared with it.
There is also no accumulation of summaries from previous tasks, so the implementation agent can focus solely on its own task.
When multiple small, similar changes are lined up, they are bundled together and given to a single sub-agent.
However, multiple implementation agents are never run simultaneously, in order to avoid conflicting changes.
Here is how it differs from executing-plans, another skill in the same repository:
| Item | subagent-driven-development | executing-plans |
|---|---|---|
| Who implements | A new sub-agent for each task | All tasks in a single context |
| When reviews happen | After each task, plus a final overall review | Final review only |
| Context cost | New context for every task and review | One context plus one final review |
| In common | Runs in the same session, uses the same progress log, does not stop between tasks | Same |
For each task, a review agent checks both conformance to specs and code quality.
The review agent receives the instruction file, the implementation agent's report file, and a file summarizing the commit list and diff.
Reports that are missing either verdict are not accepted.
This review is not skipped even when the implementation agent has performed a self-review.
When a significant issue is flagged, a correction cycle begins.
There are up to 5 correction attempts per task:
Minor issues are not entered into the correction cycle; instead, they are noted as pending in the progress log.
The list of pending items is passed to the final review, where a determination is made about what needs to be fixed before merging.
Progress is saved in a log file, so if work is interrupted, completed tasks can be skipped and work can resume from where it left off.
Log files are stored under .superpowers/sdd/ within the repository and are created per plan.
This folder is excluded from Git tracking.
Completed tasks are marked with a completion line.
Conversational memory can be lost due to compaction.
For this reason, when resuming, the procedure is to trust the log file and git log over the agent's own memory.
This mechanism prevents the mistake of redoing already-completed tasks from scratch.
Models are chosen based on the minimum capability needed for each role.
There is a rule to specify the model explicitly with every call, so no expensive model is used by default when none is specified.
| Role | Model selected |
|---|---|
| Implementation involving 1–2 files with clear specs | A fast, inexpensive model |
| Integration across multiple files or bug investigation | A standard model |
| Design decisions and the final overall review | The highest-performing model |
In the final review, the agent reads the cumulative diff from the branch's starting point to the present.
If issues are raised, all of them are passed together to a single fix agent, and only one re-review is conducted.
Afterward, the working folder is deleted and control is handed off to finishing-a-development-branch to proceed with the choice of merging or creating a Pull Request.
There are two ways to install: with a single command, or by having Claude handle the verification for you.
To install via command, run the following:
npx skills add https://github.com/obra/superpowers --skill subagent-driven-development
To ask Claude to handle it, send the following message as-is:
次の Agent Skill をインストールしてください。
https://github.com/obra/superpowers/tree/main/skills/subagent-driven-development
まず SKILL.md と付属ファイルの中身を確認し、不審な処理(外部への送信、認証情報の読み取りなど)がないことを確かめてから、~/.claude/skills/subagent-driven-development/ に配置してください。
The installation location should be ~/.claude/skills/ if you want to use it across all projects, or .claude/skills/ within a specific project if you only want it there.
You can check the file structure from the distribution source at SKILL.md on GitHub.
The skill includes instruction templates for the implementation agent, task reviewer, and re-reviewer, along with three scripts for creating the working folder and diff files.
Your request just needs to briefly state where the plan file is and what you want done.
Please take the implementation plan in docs/plan.md and proceed by delegating each task to a separate agent.
After checking the worktree, a table of contradictions found in the plan is written to the progress log.
Implementation and review then proceed in order starting from Task 1, and at the end you receive the final review results along with the list of decisions made.
The previous work stopped partway through.
Please check the progress log and resume from the first incomplete task.
In this case, the agent checks which tasks are marked complete in the log file and resumes from the first incomplete one.
For tasks that were stopped mid-correction, the procedure is to continue from the next attempt.
Please verify specs and quality for each task, and review all branch changes at the end.
In addition to per-task reviews, the highest-performing model reviews the cumulative diff from the branch's starting point.
Whether to fix minor issues that were left pending is also decided during this review.
Using this skill requires two things: an implementation plan, and an environment capable of calling sub-agents.
If no plan exists or tasks are tightly coupled, you will be guided to proceed manually or to go back to the planning stage first.
In environments where sub-agents cannot be used, executing-plans is the alternative.
Work takes place in an isolated Git working area.
If implementation is to begin on the main/master branch, explicit consent from the user is required.
The bundled scripts run in bash.
The working folder is outside Git tracking, so note that running git clean -fdx will delete it.
Except for the four stop conditions, the agent makes decisions on its own throughout the process.
Always read through the list of decisions, and if anything differs from your intent, instruct the agent to correct it.
Also, since a new context is used for every task and review, the context cost is higher than running everything in a single conversation.
The final review references the review template included in requesting-code-review from the same repository.
If installing standalone, add that skill as well to ensure the process runs as documented.
The license is MIT.
Before installing, read the contents of SKILL.md and the bundled scripts to verify what they do.
Here are three skills from the same obra/superpowers repository that are used before and after this one.
executing-plans executes an existing implementation plan task by task within the same session.
It is the option for environments where sub-agents cannot be used, or when you prefer to proceed within a single context.
requesting-code-review is a skill for requesting a code review from another agent.
The final review in subagent-driven-development uses this skill's template.
finishing-a-development-branch verifies tests after implementation is complete and lets you choose to merge or create a Pull Request.
It is the skill that subagent-driven-development hands off to at the end.
No.
To avoid conflicting changes, implementation agents are always called one at a time.
When multiple similar small fixes are lined up, they are bundled and given to a single agent.
No.
Progress is saved in a per-plan log file, and completed tasks are skipped on resumption.
Even if the log file is lost, the procedure is to restore the situation from git log.
Generally, no.
The agent stops only in four cases: destructive operations, security-related operations, operations that affect areas outside the worktree such as merges or publishing, and cases where the plan is broken.
All other decisions are recorded and reported as a list at the end.
subagent-driven-development is a skill that delegates each task in an implementation plan to a new sub-agent and advances through them with per-task reviews and a final overall review in between.
Progress is saved in a log file, so even lengthy work can be resumed from where it left off.
It is well suited for development where the plan and task breakdown are already in place and you want to catch deviations from specs early.
Before and after installing, check the distribution source and related skills on the cccskills page.
This article is a reprint of the cccskills article "Claude Codeの実装計画をサブエージェントに分担してレビューする."
Details about the skill and installation instructions can be found on the cccskills subagent-driven-development page.