بنقرة واحدة
subagent-driven-development
Use when executing implementation plans with independent tasks in the current session
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when executing implementation plans with independent tasks in the current session
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use after all implementation tasks complete, after major features are integrated, or before merging to verify work meets requirements
MUST USE when the user asks for deepwork-style planning, multi-agent execution, code review, research, or workflow routing inside Codex.
Use when executing implementation plans with independent tasks in the current session
Use after all implementation tasks complete, after major features are integrated, or before merging to verify work meets requirements
Use before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.
Use when you have a spec or requirements for a multi-step task, before touching code
| name | subagent-driven-development |
| description | Use when executing implementation plans with independent tasks in the current session |
Execute plan by dispatching a fresh subagent per task, running a completion/integration check after each returned agent, and running one final acceptance review after all tasks are done.
Why subagents: You delegate tasks to specialized agents with isolated context. By precisely crafting their instructions and context, you ensure they stay focused and succeed at their task. They should never inherit your session's context or history — you construct exactly what they need. This also preserves your own context for coordination work.
Core principle: Fresh subagent per task + per-agent completion/integration check + final acceptance review = high quality without drowning in per-subtask reviews
Continuous execution: Do not pause to check in with your human partner 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. "Should I continue?" prompts and progress summaries waste their time — they asked you to execute the plan, so execute it.
Narration discipline: Between tool calls, write at most one line of narration. The todo list and tool results carry the record — do not duplicate progress in prose. Reserve prose for decisions, blockers, and questions to your partner.
Task-type analysis before execution: Before dispatching the first implementer, assess the plan. If the plan has 2+ independent tasks with no shared state or sequential dependencies, prefer the dispatching-parallel-agents skill to execute them concurrently rather than dispatching them one-by-one here. This skill's sequential per-task loop is for tasks with dependencies or shared state.
Git ownership: Subagents do not commit, stage, push, or run any Git write command. They return changed files and a suggested commit message to the orchestrator, along with verification evidence. The orchestrator performs any Git write only after explicit user authorization.
Use the least powerful model that can handle each role — but always specify the model explicitly when dispatching a subagent. Omitting it inherits the session model, which is usually the most expensive.
Turn count beats token price. The cheapest model often takes 2-3× more turns to complete a task; the aggregate cost is frequently higher than a mid-tier model that completes it in one pass. Apply a mid-tier floor to reviewers and prose-heavy implementers.
Tiered guidance:
Task complexity signals:
Implementer subagents report one of four statuses. Handle each appropriately:
DONE: Run the completion/integration check, then continue to the next task. Do not dispatch spec-reviewer or code-quality-reviewer for a clean DONE result. If the work needs a commit, the implementer reports the intended files and message; the orchestrator handles any Git write only after explicit user authorization.
DONE_WITH_CONCERNS: The implementer completed the work but flagged doubts. Read the concerns before proceeding. If the concerns are about correctness or scope, resolve them before continuing. If the concerns indicate high risk or cross-task conflict, consult a reviewer early; otherwise note them and continue after the completion check.
NEEDS_CONTEXT: The implementer needs information that wasn't provided. Provide the missing context and re-dispatch.
BLOCKED: The implementer cannot complete the task. Assess the blocker:
Never ignore an escalation or force the same model to retry without changes. If the implementer said it's stuck, something needs to change.
./implementer-prompt.md - Dispatch implementer subagent./spec-reviewer-prompt.md - Optional narrow consultation when a completion check reveals a scope/compliance risk./code-quality-reviewer-prompt.md - Optional narrow consultation when a completion check reveals a quality/maintainability riskEach implementation task follows TDD:
Never:
If subagent asks questions:
If the completion check finds issues:
If a reviewer is consulted early (only for DONE_WITH_CONCERNS, BLOCKED, user-requested strict step-by-step review, or obvious high-risk conflict):
If subagent fails task:
After each implementer returns, run this check before moving to the next task. It is lightweight and focused on factual verification, not a full reviewer-style audit.
Read the summary: What was done, what was not done, what evidence the implementer provides.
Verify completion: Does the diff satisfy the task's acceptance criteria? Are the files that should have been created/modified actually present?
Inspect touched files / diff: Read the changed files or diff. Look for obvious omissions, scope creep, or unintended edits.
Run targeted tests or record evidence: If the task has targeted tests, run them. If not, record the implementer's test output or other evidence in the todo list.
Check integration / conflicts: Does this change conflict with earlier tasks (same files, inverted assumptions, duplicated logic)? If yes, resolve before continuing, either by re-dispatching the same implementer or by consulting a reviewer if the conflict is high-risk.
When to consult a reviewer early: Early reviewer/oracle consultation is exceptional and reserved for:
Do not dispatch spec-reviewer or code-quality-reviewer after a clean DONE result. If early consultation is needed, ask for the narrow issue to be evaluated; do not recreate the old routine per-task review loop.
Reviewer prompts shape what the reviewer finds. A poorly constructed prompt pre-judges findings, bloats context with history, or sends the reviewer on irrelevant tangents.
Do not pre-judge findings. If your prompt contains any of these, stop — you are pre-judging:
The reviewer must evaluate the diff on its merits. If you have context the reviewer lacks, state it as context, not as a verdict.
Do not add open-ended directives without a task-specific reason. "Check all uses of this function," "run race tests if useful," "verify every edge case" — these send the reviewer on unfocused tangents. Point them at specific concerns instead.
Do not let reviewers re-run tests the implementer already ran. The reviewer evaluates the diff and the test results the implementer reported. Re-running wastes time and tokens.
Global constraints block. Copy the plan's Global Constraints (or spec constraints) verbatim into the reviewer prompt — exact values, formats, relationships. This is the reviewer's attention lens. The reviewer template already contains process rules; you add the task-specific constraints.
Do not paste accumulated history into dispatch prompts. Each dispatch gets exactly the context it needs — the task text, the diff, the constraints. A real session once dispatched 42k characters where 99% was pasted conversation history. The reviewer cannot use that; it dilutes focus.
Dispatch the diff, not a summary. When early consultation or final acceptance review is needed, the reviewer needs the actual diff with context, not your description of it. Structure the dispatch with the review input, the diff, and the task description; the review input may be a committed range or a working-tree/staged diff. The final acceptance review uses code-reviewer.md via the requesting-code-review skill; spec-reviewer-prompt.md and code-quality-reviewer-prompt.md are optional narrow-consult tools only, not routine per-task gates.
Handling findings:
[product], change the implementation to address it.[evidence], supply the missing evidence/proof; do not change product behavior unless the evidence exposes a real defect.After all plan tasks are marked complete, before declaring the work done, run a final acceptance review over the full change set. This is distinct from completion/integration checks — it evaluates the work as a whole.
1. Assess complexity and choose reviewers deliberately:
Review selection has two independent axes: role/model priority and logical rigor.
oracle, oracle-2nd, then configured oracle-3rd through oracle-9th.oracle-2nd and later slots mean lower selection priority, never stronger capability.low, normal, high, max (normal is the unsuffixed profile; other tiers are used only when configured and available).| Complexity / evidence shape | Reviewer(s) | Tier choice |
|---|---|---|
| Simple | 1-2 tasks, single module, no architectural change | first available Oracle at normal |
| Complex / cross-module | 3+ tasks, cross-module integration, architectural change, migration | first available Oracle + reviewer in parallel; configured high, otherwise normal |
| Security / performance / data-loss / release / runtime-safety | high-impact risk profile regardless of file count | first available Oracle + reviewer in parallel; configured max, otherwise high, otherwise normal |
| Additional evidence requested | user/orchestrator asks for more independent model evidence | additional Oracle slots in order (start with oracle-2nd, then later configured/available slots in ordinal order) while keeping the intentionally selected tier |
The orchestrator performs this selection after all tasks complete. Do not fan out reviews merely because several Oracle slots or tiers are registered. Collect only intentionally requested reviews. A later Oracle slot is another configured model perspective, not a stronger reviewer.
2. Dispatch the acceptance review:
Use the requesting-code-review skill. Pass either a committed range or an uncommitted working-tree/staged diff:
BASE_SHA, HEAD_SHA, DESCRIPTION, and PLAN_OR_REQUIREMENTS when the orchestrator has already created a user-authorized commit;git diff --stat, git diff, git diff --cached --stat, git diff --cached, DESCRIPTION, and PLAN_OR_REQUIREMENTS when implementation subagents returned uncommitted changes.Do not require implementation subagents to commit, stage, or push merely to create review SHAs. The orchestrator owns any Git write and performs it only after explicit user authorization.
For baseline dispatch: use the selected first available Oracle, and add reviewer only when the complexity table says so.
For additional evidence: add the next configured/available Oracle slot(s) in ordinal order, each with the same review input and context. Do not add slots automatically without an intentional evidence need.
3. Process feedback:
receiving-code-review skill to handle feedback with technical rigor.4. When to skip:
The final acceptance review is mandatory unless the user explicitly delegates ("你自己决定" / "无需批准自行继续"). Completion/integration checks do not replace final acceptance review.
Required workflow skills: