$npx -y skills add NeoLabHQ/context-engineering-kit --skill subagent-driven-developmentUse when executing implementation plans with independent tasks in the current session or facing 3+ independent issues that can be investigated without shared state or dependencies - dispatches fresh subagent for each task with code review between tasks, enabling fast iteration wi
| 1 | # Subagent-Driven Development |
| 2 | |
| 3 | Create and execute plan by dispatching fresh subagent per task or issue, with code and output review after each or batch of tasks. |
| 4 | |
| 5 | **Core principle:** Fresh subagent per task + review between or after tasks = high quality, fast iteration. |
| 6 | |
| 7 | Executing Plans through agents: |
| 8 | |
| 9 | - Same session (no context switch) |
| 10 | - Fresh subagent per task (no context pollution) |
| 11 | - Code review after each or batch of task (catch issues early) |
| 12 | - Faster iteration (no human-in-loop between tasks) |
| 13 | |
| 14 | ## Supported types of execution |
| 15 | |
| 16 | ### Sequential Execution |
| 17 | |
| 18 | When you have a tasks or issues that are related to each other, and they need to be executed in order, investigating or modifying them sequentially is the best way to go. |
| 19 | |
| 20 | Dispatch one agent per task or issue. Let it work sequentially. Review the output and code after each task or issue. |
| 21 | |
| 22 | **When to use:** |
| 23 | |
| 24 | - Tasks are tightly coupled |
| 25 | - Tasks should be executed in order |
| 26 | |
| 27 | ### Parallel Execution |
| 28 | |
| 29 | When you have multiple unrelated tasks or issues (different files, different subsystems, different bugs), investigatin or modifying them sequentially wastes time. Each task or investigation is independent and can happen in parallel. |
| 30 | |
| 31 | Dispatch one agent per independent problem domain. Let them work concurrently. |
| 32 | |
| 33 | **When to use:** |
| 34 | |
| 35 | - Tasks are mostly independent |
| 36 | - Overral review can be done after all tasks are completed |
| 37 | |
| 38 | ## Sequential Execution Process |
| 39 | |
| 40 | ### 1. Load Plan |
| 41 | |
| 42 | Read plan file, create TodoWrite with all tasks. |
| 43 | |
| 44 | ### 2. Execute Task with Subagent |
| 45 | |
| 46 | For each task: |
| 47 | |
| 48 | **Dispatch fresh subagent:** |
| 49 | |
| 50 | ``` |
| 51 | Task tool (general-purpose): |
| 52 | description: "Implement Task N: [task name]" |
| 53 | prompt: | |
| 54 | You are implementing Task N from [plan-file]. |
| 55 | |
| 56 | Read that task carefully. Your job is to: |
| 57 | 1. Implement exactly what the task specifies |
| 58 | 2. Write tests (following TDD if task says to) |
| 59 | 3. Verify implementation works |
| 60 | 4. Commit your work |
| 61 | 5. Report back |
| 62 | |
| 63 | Work from: [directory] |
| 64 | |
| 65 | Report: What you implemented, what you tested, test results, files changed, any issues |
| 66 | ``` |
| 67 | |
| 68 | **Subagent reports back** with summary of work. |
| 69 | |
| 70 | ### 3. Review Subagent's Work |
| 71 | |
| 72 | **Dispatch code-reviewer subagent:** |
| 73 | |
| 74 | ``` |
| 75 | Task tool (superpowers:code-reviewer): |
| 76 | Use template at requesting-code-review/code-reviewer.md |
| 77 | |
| 78 | WHAT_WAS_IMPLEMENTED: [from subagent's report] |
| 79 | PLAN_OR_REQUIREMENTS: Task N from [plan-file] |
| 80 | BASE_SHA: [commit before task] |
| 81 | HEAD_SHA: [current commit] |
| 82 | DESCRIPTION: [task summary] |
| 83 | ``` |
| 84 | |
| 85 | **Code reviewer returns:** Strengths, Issues (Critical/Important/Minor), Assessment |
| 86 | |
| 87 | ### 4. Apply Review Feedback |
| 88 | |
| 89 | **If issues found:** |
| 90 | |
| 91 | - Fix Critical issues immediately |
| 92 | - Fix Important issues before next task |
| 93 | - Note Minor issues |
| 94 | |
| 95 | **Dispatch follow-up subagent if needed:** |
| 96 | |
| 97 | ``` |
| 98 | "Fix issues from code review: [list issues]" |
| 99 | ``` |
| 100 | |
| 101 | ### 5. Mark Complete, Next Task |
| 102 | |
| 103 | - Mark task as completed in TodoWrite |
| 104 | - Move to next task |
| 105 | - Repeat steps 2-5 |
| 106 | |
| 107 | ### 6. Final Review |
| 108 | |
| 109 | After all tasks complete, dispatch final code-reviewer: |
| 110 | |
| 111 | - Reviews entire implementation |
| 112 | - Checks all plan requirements met |
| 113 | - Validates overall architecture |
| 114 | |
| 115 | ### 7. Complete Development |
| 116 | |
| 117 | After final review passes: |
| 118 | |
| 119 | - Announce: "I'm using the finishing-a-development-branch skill to complete this work." |
| 120 | - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch |
| 121 | - Follow that skill to verify tests, present options, execute choice |
| 122 | |
| 123 | ### Example Workflow |
| 124 | |
| 125 | ``` |
| 126 | You: I'm using Subagent-Driven Development to execute this plan. |
| 127 | |
| 128 | [Load plan, create TodoWrite] |
| 129 | |
| 130 | Task 1: Hook installation script |
| 131 | |
| 132 | [Dispatch implementation subagent] |
| 133 | Subagent: Implemented install-hook with tests, 5/5 passing |
| 134 | |
| 135 | [Get git SHAs, dispatch code-reviewer] |
| 136 | Reviewer: Strengths: Good test coverage. Issues: None. Ready. |
| 137 | |
| 138 | [Mark Task 1 complete] |
| 139 | |
| 140 | Task 2: Recovery modes |
| 141 | |
| 142 | [Dispatch implementation subagent] |
| 143 | Subagent: Added verify/repair, 8/8 tests passing |
| 144 | |
| 145 | [Dispatch code-reviewer] |
| 146 | Reviewer: Strengths: Solid. Issues (Important): Missing progress reporting |
| 147 | |
| 148 | [Dispatch fix subagent] |
| 149 | Fix subagent: Added progress every 100 conversations |
| 150 | |
| 151 | [Verify fix, mark Task 2 complete] |
| 152 | |
| 153 | ... |
| 154 | |
| 155 | [After all tasks] |
| 156 | [Dispatch final code-reviewer] |
| 157 | Final reviewer: All requirements met, ready to merge |
| 158 | |
| 159 | Done! |
| 160 | ``` |
| 161 | |
| 162 | ### Red Flags |
| 163 | |
| 164 | **Never:** |
| 165 | |
| 166 | - Skip code review between tasks |
| 167 | - Proceed with unfixed Critical issues |
| 168 | - Dispatch multiple implementation subagents in parallel (conflicts) |
| 169 | - Implement without reading plan task |
| 170 | |
| 171 | **If subagent fails task:** |
| 172 | |
| 173 | - Dispatch fix subagent with specific instructions |
| 174 | - Don't try to fix manually (context pollution) |
| 175 | |
| 176 | ## Parallel Execution Process |
| 177 | |
| 178 | Load plan, review critically, execute tasks in batches, report for review betwe |