AgentSkillsCN

sdd-team

借助 Claude Code Agent Teams 实现团队驱动的 SDD 工作流。创建由 3 名成员组成的团队,分别负责并行验证(GATE 2)、实施(Phase 8),以及现有规格的审计。触发条件:/sdd-team、/sdd-team 审计、/sdd-team 验证、/sdd-team 实施。

SKILL.md
--- frontmatter
name: sdd-team
description: >
  Team-powered SDD workflow using Claude Code Agent Teams. Creates 3-teammate
  teams for parallel validation (GATE 2), implementation (Phase 8), and existing
  specs audit. Triggers: /sdd-team, /sdd-team audit, /sdd-team validate, /sdd-team implement.
degree-of-freedom: high
allowed-tools: Task, SlashCommand, Read, Write, Edit, Glob, Grep, Bash(fd:*), Bash(rg:*), Bash(git:*), Bash(project-intel.mjs:*), Bash(pnpm:*), Bash(pytest:*), Bash(gh:*), AskUserQuestion, TeamCreate, TeamDelete, TaskCreate, TaskUpdate, TaskList, TaskGet, SendMessage

SDD Team Orchestrator

Announce: "Using the SDD Team orchestrator for parallel agent-powered development."

If TeamCreate tool is NOT available → "Enable Agent Teams: set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, restart Claude Code." → STOP.

Known Constraints

#ConstraintImpact
1One team per sessionMust TeamDelete before creating next team
2No teammate session resumptionRe-create team, skip completed tasks via .sdd/sdd-state.md
3Cost: 3-5x vs subagentsOnly use teams at complexity 4+; 1-3 defers to /sdd
4Task status lagNudge idle teammates after 5+ min silence
5Terminal split-paneWorks in iTerm2/Terminal.app only (not VS Code/Ghostty)

Quick Reference

CommandActionTeam Pattern
/sdd-teamFull SDD workflow (team-enhanced)GATE 2 + Phase 8 teams
/sdd-team auditAudit existing specs vs codeMapReduce audit team
/sdd-team validateRun GATE 2 validation only3-validator team
/sdd-team implementRun Phase 8 only3-lead pipeline team
/sdd-team statusCheck SDD + team stateStatus report

$FEATURE: NNN-feature-name (e.g., 001-auth-oauth)

Intent Router

InputIntentRoute
(empty) or feature descriptionfull_workflowPhases 0-9 with team-enhanced GATE 2 + Phase 8
"audit" or "audit existing"audit@workflows/audit-team.md
"validate" or "run validators"validate@workflows/validation-team.md
"implement" or "start coding"implement@workflows/implementation-team.md
"status" or "where am I"statusSee @templates/status-report.md
"continue" or "next"continueResume from checkpoint

Dynamic Team Sizing

Score complexity per @.claude/skills/sdd/references/complexity-detection.md:

FactorPtsComplexityAction
Multiple integrations+21-3Defer to /sdd solo
New technology+24-7Standard: 3 teammates
DB schema changes+18-10Enhanced: 3 teammates + extra subagents
Auth/security+2
Multi-user interactions+1
External API deps+2
Frontend + Backend+1

Phase Execution

Team-Enhanced Phases

PhaseEnhancementWorkflow
GATE 2 (before Phase 5)3-teammate validation team@workflows/validation-team.md
Phase 8 (/implement)3-teammate TDD pipeline@workflows/implementation-team.md
/audit (standalone)3-teammate MapReduce audit@workflows/audit-team.md

Solo phases (0-6, 9) are imported verbatim from @references/existing-sdd-import.md.

Full Workflow Sequence

code
START → Complexity Check
  [1-3] → Defer to /sdd (STOP)
  [4-5] → Ask user if teams needed
  [6+]  → Phase 0 (discovery) + teams

Phase 0: Discovery (solo) → GATE 0
Phase 1-2: Product/Constitution (solo, optional)
Phase 3: Specification (solo) → GATE 1
Phase 4: Clarification (solo, if needed)
★ GATE 2: TEAM Validation ★ → Pass: 0 CRITICAL/HIGH → TeamDelete
Phase 5-6: Planning/Tasks (solo)
Phase 7: Audit (solo) → GATE 3
★ Phase 8: TEAM Implementation ★ → TDD per story → TeamDelete
Phase 9: Finalization (solo)

Validation Gates

GateCriteriaOn-Fail
GATE 0.sdd/discovery/ artifacts existBlock Phase 3
GATE 1spec.md exists, 0 [NEEDS CLARIFICATION], >= 2 ACs per storyRoute to Phase 3/4
GATE 20 CRITICAL, 0 HIGH across all validatorsRoute to Phase 3/4
GATE 3audit-report.md PASS, 0 CRITICAL, 0 HIGHBlock Phase 8

State Management

See @references/state-management.md for state layers, flow, and recovery.

Team Spawn Patterns

See @references/tool-patterns.md for TeamCreate, TaskCreate, spawn, assign, messaging, and cleanup patterns.

Subagent Strategy

OperationWho SpawnsSubagent Types
Research (docs, APIs)TeammatesFirecrawl, Ref MCP, Explore
Validation (domain checks)Teammatessdd-*-validator agents
Implementation (code)TeammatesExplore, Research, Review
Coordination/GatesLead onlyStatus, Gate enforcement

Status Report

See @templates/status-report.md for the status report template.

Error Handling

ErrorDetectionRecovery
Teams not enabledTeamCreate unavailable"Enable CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"
Complexity too lowScore 1-3Defer to /sdd
No spec.md/validate without spec"Run /feature first"
GATE 2 FAILCRITICAL/HIGH findings"Fix spec issues: [list]"
Audit FAILCRITICAL in report"Fix issues: [list]"
[NEEDS CLARIFICATION]Markers in spec"Run /clarify first"
Teammate crashNo response after timeoutRe-spawn, reassign (max 2 retries)
Teammate repeat fail2+ crashesFallback to subagent-only
Team stuckAll idle, tasks pendingNudge → reassign → unblock
State corruptionInvalid sdd-state.mdRebuild from artifacts
TDD violationCode before test"Delete code, start with TDD"

Quality Gates

See @.claude/skills/sdd/references/quality-gates.md for constitutional articles (I, III, IV, VI, VIII-XI).

Memory Auto-Sync

  • New patterns → memory/patterns.md
  • Architecture decisions → memory/decisions.md
  • Lessons learned → memory/learnings.md

Integration Points

  • /sdd-team extends /sdd — all solo phases imported verbatim; complexity 1-3 defers to /sdd
  • Six validators (in .claude/agents/): sdd-frontend/data-layer/auth/api/architecture/testing-validator — invoked by teammates
  • Team workflows: @workflows/validation-team.md, @workflows/implementation-team.md, @workflows/audit-team.md

Version

Version: 1.1.0 | Updated: 2026-02-07

  • v1.1.0: Token optimization — compressed SKILL.md, extracted patterns to references
  • v1.0.0: Initial SDD Team skill