AgentSkillsCN

subagent-driven-development

将工作分解为具体任务,委派专业化的执行人员,通过迭代式评审不断优化

SKILL.md
--- frontmatter
name: subagent-driven-development
description: Break work into tasks, dispatch specialized agents, review iteratively
globs: "**/*"

Subagent-Driven Development (SDD)

Overview

SDD uses specialized agents to implement and review code. Instead of doing everything yourself, you:

  1. Plan the work (break into tasks)
  2. Dispatch an implementer agent per task
  3. Review with specialized reviewers
  4. Fix and re-review until quality passes

Workflow

1. Create a Plan

Write a plan with clear, independent tasks. Use the superteam-tasks format:

markdown
```superteam-tasks
- title: Create user model
  description: Define User type with validation
  files: [src/models/user.ts, src/models/user.test.ts]
- title: Add authentication
  description: JWT-based auth with login/logout
  files: [src/auth.ts, src/auth.test.ts]
```

Each task should be:

  • Independent — can be implemented without other tasks
  • Testable — has clear success criteria
  • Small — completable in one agent session

2. Load and Run

code
/sdd load plan.md     — Load the plan
/sdd run              — Run SDD for current task
/sdd status           — Check progress
/sdd next             — Skip to next task

3. Review Cycle

For each task, the SDD orchestrator:

  1. Dispatches implementer (with TDD enforcement)
  2. Runs spec review (does code match spec?)
  3. Runs quality review (is code well-written?)
  4. Optionally runs security and performance reviews in parallel
  5. On failure: re-dispatches implementer with specific findings
  6. On max retries: escalates to you

4. Available Agents

AgentRoleTools
scoutFast recon, find relevant coderead, grep, find, ls, bash
implementerTDD implementationall tools
spec-reviewerVerify spec complianceread, grep, find, ls
quality-reviewerCode + test qualityread, grep, find, ls
security-reviewerVulnerability scanningread, grep, find, ls
performance-reviewerPerformance analysisread, grep, find, ls
architectDesign + structure reviewread, grep, find, ls

5. Direct Team Use

You can also use the team tool directly without SDD:

code
"Dispatch scout to find all database access patterns"
"Run security-reviewer and performance-reviewer in parallel on src/auth/"
"Chain: scout finds the code, then architect reviews the structure"

Best Practices

  • Small tasks — each task should touch 1-3 files
  • Clear specs — reviewers need to know what to check against
  • Don't skip reviews — they catch real bugs
  • Fix, don't argue — when a reviewer finds an issue, fix it
  • Monitor costs — use /team to check session cost