AgentSkillsCN

subagent-driven-development

通过将任务委派给专业子智能体机器人,并在每项任务完成后进行两阶段审核,高效执行实施计划。

SKILL.md
--- frontmatter
name: subagent-driven-development
description: Executes implementation plans by delegating tasks to specialized subagent droids with two-stage review after each task.

Subagent-Driven Development

When This Skill Activates

  • An approved implementation plan exists
  • User says "go", "execute", "start building"
  • The /execute command is invoked

Prerequisites

  • An approved plan MUST exist. If not, activate writing-plans first.
  • The plan must be saved in .factory/docs/plans/.

Process

For Each Task in the Plan:

Step 1: Delegate to Task Executor

code
Task tool → subagent_type: task-executor
Provide: The single task details, project context

Step 2: Check Executor Result

  • If ✅ PASS → proceed to review
  • If ❌ FAIL → delegate to debugger droid:
    code
    Task tool → subagent_type: debugger
    Provide: The failure details, file paths, error messages
    
    After debug fix, re-run the task executor.

Step 3: Two-Stage Review

code
Task tool → subagent_type: code-reviewer
Provide: The spec, changed files, repo path
  • If Stage 1 (correctness) BLOCKS → fix and re-review
  • If Stage 1 PASSES → note Stage 2 (quality) suggestions for later

Step 4: Report Progress

After each task, report to the user:

  • Task N of M completed ✅
  • Brief summary of what was done
  • Any reviewer suggestions noted

Step 5: Commit

After a verified, reviewed task:

  • Stage the changed files
  • Commit with a descriptive message: feat(component): task N — description

After All Tasks Complete:

Final Verification

code
Task tool → subagent_type: verifier
Provide: Original spec, plan, all changed files, repo path

Report the final verification result to the user.

Error Recovery

  • If a task fails after 2 attempts → pause, report to user, ask for guidance
  • If the debugger can't find the root cause → escalate to user with full evidence
  • Never silently skip a failing task

Output

A fully implemented, tested, reviewed, and verified feature.