Subagent driven development
Skill itallstartedwithaidea/agent-skills/skills/software-dev/subagent-driven-development
Subagent-Driven Development dispatches each discrete task to a fresh subagent with a clean context window, then subjects the output to a two-stage review before merging.From its SKILL.md
npx -y skills add itallstartedwithaidea/agent-skills --skill subagent-driven-developmentAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
5.4 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
Subagent-Driven Development
Part of Agent Skills™ by googleadsagent.ai™
Description
Subagent-Driven Development dispatches each discrete task to a fresh subagent with a clean context window, then subjects the output to a two-stage review before merging. The orchestrating agent decomposes work into atomic units, writes precise specifications for each, and spawns isolated subagents that cannot pollute each other's context or carry forward stale assumptions.
Context window contamination is the silent killer of agent code quality. As a conversation grows, early instructions fade, variable names blur, and the agent begins referencing code that has since been refactored. By giving each task a fresh subagent, every implementation starts from a clean slate with only the relevant specification and referenced files. The result is consistently high-quality output regardless of session length.
The two-stage review process catches defects at different abstraction levels. Stage 1 verifies spec compliance: does the output do what was asked? Stage 2 evaluates code quality: is it well-structured, tested, and maintainable? Only code that passes both gates is accepted into the codebase.
Use When
- A task can be decomposed into 3+ independent subtasks
- The conversation context has grown large enough to risk coherence loss
- Multiple files or modules must be modified in parallel
- You need best-of-N attempts for a complex implementation
- Quality gates must be enforced consistently across all outputs
- The user requests parallel or isolated task execution
How It Works
graph TD
A[Orchestrator: Decompose Task] --> B[Write Spec for Subtask 1]
A --> C[Write Spec for Subtask 2]
A --> D[Write Spec for Subtask N]
B --> E[Spawn Subagent 1]
C --> F[Spawn Subagent 2]
D --> G[Spawn Subagent N]
E --> H[Stage 1: Spec Compliance Review]
F --> H
G --> H
H --> I{Passes?}
I -->|No| J[Return to Subagent with Feedback]
J --> H
I -->|Yes| K[Stage 2: Code Quality Review]
K --> L{Passes?}
L -->|No| J
L -->|Yes| M[Merge to Main Branch]
The orchestrator never writes implementation code directly. Its role is to decompose, specify, dispatch, and review. Each subagent operates in an isolated git worktree, preventing conflicts between parallel implementations.
Implementation
orchestrator:
decompose:
- analyze_task_for_independent_subtasks
- ensure_each_subtask_has: [clear_input, clear_output, testable_criteria]
- max_subtask_size: "completable_in_one_session"
spec_template: |
## Subtask: {name}
**Input**: {files_to_read}
**Output**: {files_to_create_or_modify}
**Acceptance Criteria**:
- {criterion_1}
- {criterion_2}
**Constraints**: {architectural_boundaries}
**Tests**: {required_test_cases}
dispatch:
method: "fresh_subagent_per_task"
isolation: "git_worktree"
context: "spec_only" # No conversation history
review_stage_1_spec_compliance:
checks:
- all_acceptance_criteria_met
- all_required_tests_present_and_passing
- output_files_match_specification
- no_unspecified_side_effects
review_stage_2_code_quality:
checks:
- no_linter_errors
- no_type_errors
- naming_conventions_followed
- no_dead_code_or_debug_artifacts
- error_handling_present
- documentation_for_public_apis
merge:
strategy: "squash_per_subtask"
commit_message: "feat({subtask_name}): {one_line_summary}"
Best Practices
- Keep subtask specs self-contained—a subagent should need no context beyond the spec
- Include file paths and relevant type signatures in every spec
- Run both review stages even if the code "looks correct" at first glance
- Limit subagent retry attempts to 2 before escalating to the orchestrator
- Use git worktrees for true filesystem isolation between parallel subagents
- Squash-merge each subtask to maintain a clean commit history
Platform Compatibility
| Platform | Support | Notes |
|---|---|---|
| Cursor | Full | Native Task tool for subagent dispatch |
| VS Code | Partial | Requires manual subprocess management |
| Windsurf | Full | Cascade supports subagent spawning |
| Claude Code | Full | Built-in subagent support |
| Cline | Partial | Plugin-based subagent support |
| aider | Limited | No native subagent capability |
Related Skills
- Git Worktrees - Isolated filesystem workspaces that prevent subagents from clobbering each other's changes
- Writing Plans - Plan authoring that produces the subtask specifications subagents execute against
- Code Review - Two-stage review process that validates subagent outputs before merge
- Sandbox Hardening - Execution isolation that constrains subagent permissions and resource usage
Keywords
subagent task-decomposition parallel-development two-stage-review context-isolation orchestrator spec-driven fresh-context
© 2026 googleadsagent.ai™ | Agent Skills™ | MIT License
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 1 of the 12 instructions most context ai engineering skills give in ~1.2k tokens
Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-07
- Dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
- Dispatch a final code reviewer after all tasksin 33 of 1193, across 8 files
- Provide full task text to the subagentin 30 of 1193, across 9 files
- Review spec compliance before code qualityhere, and in 27 of 1193, across 10 files
- Make the hook script executablein 26 of 1193, across 8 files
- Re-snapshot after navigation or DOM changesin 25 of 1193, across 19 files
- Read files before editing themin 22 of 1193, across 11 files
- Answer subagent questions before proceedingin 22 of 1193, across 7 files
- Mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
- Merge hook into existing settingsin 21 of 1193, across 3 files
- Ask if installation is global or projectin 20 of 1193, across 2 files
- Copy the hook script to target locationin 20 of 1193, across 2 files
Said here and by no other author read
- write precise specifications for each subtask
- dispatch subagents with specification-only context
- limit subagent retry attempts to two
- squash-merge each completed subtask
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.