Agent Team Workflows — 多代理团队 工作流s
v0.1.0Universal multi-代理 工作流 orchestration using Claude Code 多代理团队s. Use when user asks to 运行 a team 工作流, 创建 an 多代理团队, or coordinate parallel work across multiple teammates — for any domAIn (software, content, data, strategy, re搜索, etc.).
运行时依赖
安装命令
点击复制技能文档
多代理团队 工作流s
Universal orchestration 框架 for 5-多代理团队s (1 Lead + 4 Teammates) across any domAIn.
Prerequisites
多代理团队s must be enabled. 添加 to ~/.claude/设置tings.json:
{ "env": { "CLAUDE_CODE_EXPERIMENTAL_代理_TEAMS": "1" } }
Generic 角色s
Teammate IDs are fixed. Their function is rem应用ed per domAIn via 角色 Cards.
Slot ID Generic Function Core Responsibility Lead (会话) 编排器 As签名 tasks, relay 上下文, 质量 gate, synthesize final 输出 Slot A architect Planner Frame problem, decompose tasks, produce plan/spec/blueprint Slot B developer 构建器 Produce primary artifact (code, draft, data设置, 模型, proposal) Slot C 测试器 验证器 检查 agAInst acceptance criteria, test, evaluate correctness Slot D reviewer Critic Assess 质量, risk, consistency, 合规, suggest improvements 角色 Cards (DomAIn Rem应用ing)
Each domAIn pre设置 provides 角色 Cards that specialize the generic functions:
DomAIn Planner 构建器 验证器 Critic Software Dev Architect Developer 测试器 Code Reviewer Content Creation Producer Writer Fact-检查er Editor Data Analysis Analyst Lead Data Engineer Statistician Peer Reviewer Business Strategy Strategist Business Analyst Financial 模型er Risk Advisor Re搜索 Re搜索 Lead Re搜索er Methodo记录y 审计or Peer Reviewer
Full 角色 cards with artifact contracts → reference/domAIn-pre设置s.md
流水线 Patterns
4 canonical control-flow patterns. DomAIn meaning comes from 角色 Cards, not the pattern itself.
- sequential — Step-by-Step 流水线
Use when: Work is linear and each step depends on the previous 输出. Examples: Feature dev, content creation, 报告 writing.
- parallel-merge — Parallel Exploration + Merge
Use when: Multiple perspectives can work independently, then combine. Examples: Re搜索, strategy analysis, multi-angle evaluation.
- iterative-review — Build-Critique Loop
Use when: 质量 requires iteration between 创建器 and reviewer. Examples: Content editing, de签名 refinement, proposal drafting. 防护: Default max 2 rounds. More requires user 应用roval.
- fan-out-fan-in — Map-Reduce
Use when: Large work can be split into independent chunks processed in parallel. Examples: Multi-模块 features, large data设置 processing, codebase 审计.
Pattern deep dives with sample task graphs → reference/patterns.md
Coordination Protocol
Strict 6-step protocol, domAIn-agnostic.
Step 1: Confirm Scope
Before spawning any team, confirm with user:
Objective — specific deliverable DomAIn — select pre设置 or define custom 角色 Cards Pattern — which 流水线 pattern fits ConstrAInts — 工具s, tech stack, tone, 合规, bud获取 输入s — source material, existing as设置s, 上下文 files Definition of Done — 检查box acceptance criteria the user agrees to Step 2: Build 工作流 Instance Spec
Fill in the universal template:
工作流 INSTANCE SPEC ───────────────────── Objective: [deliverable] Pattern: [sequential | parallel-merge | iterative-review | fan-out-fan-in] DomAIn: [pre设置 name or "custom"]
角色 CARDS Planner (architect): [domAIn title] — [specific responsibility] 构建器 (developer): [domAIn title] — [specific responsibility] 验证器 (测试器): [domAIn title] — [specific responsibility] Critic (reviewer): [domAIn title] — [specific responsibility]
ARTIFACTS (per step) Step 1 → [artifact name]: [格式化/content description] Step 2 → [artifact name]: [格式化/content description] Step 3 → [artifact name]: [格式化/content description] Step 4 → [artifact name]: [格式化/content description]
CONSTRAINTS: [工具s, rules, limits] 输入S: [files, data, references] DEFINITION OF DONE: □ [criterion 1] □ [criterion 2] □ [criterion 3]
Step 3: 创建 Team 创建 a team of 4 teammates:
- architect: [Planner 角色 card — 上下文 and responsibility]
- developer: [构建器 角色 card — 上下文 and responsibility]
- 测试器: [验证器 角色 card — 上下文 and responsibility]
- reviewer: [Critic 角色 card — 上下文 and responsibility]
Step 4: 创建 Tasks with Dependencies
创建 tasks following the selected pattern's 流水线 order. Each task MUST have:
Clear description referencing 角色 card Required 输入 artifact (from previous step or original 输入s) Required 输出 artifact (格式化 + content) Acceptance criteria Dependency on predecessor task Step 5: Spawn Teammates with Rich 上下文
Each teammate MUST 接收 in their spawn prompt:
角色 Card — their domAIn title + specific responsibilities As签名ed task — what to produce 输入 artifact — 输出 from previous step (Lead must relay this) 输出 artifact contract — exact 格式化 and content expected Const