
Subagent Driven Development
Orchestrate a build by spawning a fresh subagent per atomic task and gating merges with a two-stage spec-then-quality review so long sessions do not rot context.
Overview
Subagent-Driven Development is an agent skill most often used in Build (also Ship review) that dispatches each atomic task to a fresh subagent and merges only after two-stage spec and quality review.
Install
npx skills add https://github.com/itallstartedwithaidea/agent-skills --skill subagent-driven-developmentWhat is this skill?
- Decomposes work into atomic units with precise per-task specifications for isolated subagents
- Each task runs in a fresh subagent context to avoid stale assumptions and cross-task contamination
- Two-stage review: Stage 1 spec compliance, Stage 2 structure, tests, and maintainability
- Only output passing both gates is accepted into the main codebase
- Designed to keep implementation quality stable as the parent session grows long
- Uses a two-stage review process: spec compliance then code quality
Adoption & trust: 1 installs on skills.sh; 18 GitHub stars; 3/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
What problem does it solve?
Long agent sessions blur earlier instructions and polluted context causes implementations that drift from spec or reference refactored code incorrectly.
Who is it for?
Solo builders running multi-hour agent implementations on agents, APIs, or SaaS features where orchestration and review discipline matter more than one-shot edits.
Skip if: Single-file typo fixes or chores where spawning subagents and dual review cost more than the change itself.
When should I use this skill?
Implementing multi-step agent work where context contamination risks quality and you need isolated subagents plus dual review before merge.
What do I get? / Deliverables
Each atomic task lands as reviewed, spec-compliant code accepted only after compliance and quality gates—without carrying forward a degraded parent context.
- Per-task subagent implementations accepted through both review gates
- Orchestrator specs tying each atomic unit to referenced files and acceptance criteria
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Canonical shelf is Build agent-tooling because the core mechanic is decomposing work and dispatching isolated implementer subagents with precise specs. Agent-tooling fits orchestration patterns—atomic tasks, clean context windows, and subagent spawning—rather than a single frontend or backend file edit.
Where it fits
Split a new agent tool surface into atomic implementer subagents after you have a written task spec.
Hand each API endpoint change to a fresh subagent so prior endpoint context does not leak wrong models or routes.
Run Stage 1 spec and Stage 2 quality review on subagent diffs before you merge to main.
Replay the same atomic dispatch pattern when fixing production bugs without reopening a bloated parent thread.
How it compares
Use instead of one monolithic agent thread for entire features when you need isolation per task and explicit two-gate review before merge.
Common Questions / FAQ
Who is subagent-driven-development for?
Indie builders and agent-heavy developers who orchestrate Claude Code or similar tools and want production-grade output without context rot across long builds.
When should I use subagent-driven-development?
During Build when implementing multi-step features with subagents; during Ship review when you want spec compliance plus quality review before merging agent-written code.
Is subagent-driven-development safe to install?
Review the Security Audits panel on this Prism page; subagents still inherit your repo and tool permissions, so scope filesystem and network access deliberately.
SKILL.md
READMESKILL.md - Subagent Driven Development
# Subagent-Driven Development Part of [Agent Skills™](https://github.com/itallstartedwithaidea/agent-skills) by [googleadsagent.ai™](https://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 ```mermaid 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 ```yaml 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