[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MZ0ESH82QSZPX2VVBNFB5Z":3,"skill-same:01M6MZ0ESH82QSZPX2VVBNFB5Z":115},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":29,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6MZ0ESH82QSZPX2VVBNFB5Z","agent-teams",null,"Orchestrate Claude Code agent teams for collaborative multi-agent work. Use when tasks need 2+ coordinated agents that communicate with each other. Supports research teams (competing hypotheses, parallel investigation), implementation teams (architect + implementers + reviewer), hybrid teams, and code review teams. Integrates with AA-MA for structured execution. Handles team creation, task distribution, inter-agent debate, progress monitoring, error recovery, and graceful shutdown. Keywords: team, teammate, multi-agent, swarm, coordinate, collaborate, spawn agents, parallel agents communicate, competing hypotheses, research team, implementation team.","snewhouse\u002Faa-ma-forge","snewhouse","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6317143?v=4","01M6MYYWF28C4KBQHHWB9SC6TS","Stephen J Newhouse","01M6MYYWJWQMDN2ZPFMJ584SSM",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002FSKILL.md",[18,23,26],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"teams","agent teams","work","error","debate","progress","distribution","creation","collaborate","coordinate","shutdown","code review","reviewer","team","monitoring","orchestrate","code","tasks","error recovery","review","2026-11-10 10:12:30",false,"---\nname: agent-teams\ndescription: >-\n  Orchestrate Claude Code agent teams for collaborative multi-agent work.\n  Use when tasks need 2+ coordinated agents that communicate with each other.\n  Supports research teams (competing hypotheses, parallel investigation),\n  implementation teams (architect + implementers + reviewer), hybrid teams,\n  and code review teams. Integrates with AA-MA for structured execution.\n  Handles team creation, task distribution, inter-agent debate, progress\n  monitoring, error recovery, and graceful shutdown. Keywords: team, teammate,\n  multi-agent, swarm, coordinate, collaborate, spawn agents, parallel agents\n  communicate, competing hypotheses, research team, implementation team.\n---\n\n# Agent Teams Orchestration\n\nOrchestrate persistent Claude Code agent teams with shared task lists, inter-agent messaging, and structured coordination for complex collaborative work.\n\n## When to Use This Skill\n\n**Use agent-teams when:**\n- Task needs 2+ agents that **communicate** with each other\n- Research needs **competing hypotheses** with adversarial debate\n- Implementation needs **architect + implementers + reviewer** coordination\n- Work benefits from persistent teammates over one-shot subagents\n\n**Do NOT use — use these instead:**\n- Tasks are independent, no communication needed → `dispatching-parallel-agents`\n- Sequential tasks with review gates, same session → `subagent-driven-development`\n- Single investigation or code change → direct execution\n\n### Decision Flowchart\n\n```\nComplex task requiring multiple agents?\n├── NO → Execute directly or use a single subagent\n└── YES → Do agents need to communicate\u002Fcoordinate?\n    ├── NO → dispatching-parallel-agents (one-shot, parallel)\n    └── YES → Are tasks sequential with review between each?\n        ├── YES → subagent-driven-development (same session)\n        └── NO → ★ agent-teams (persistent, communicating)\n```\n\n---\n\n## Task Classification\n\nClassify the user's request to select the right team type:\n\n```\nUser Request → keyword + intent analysis:\n\n  \"research\u002Finvestigate\u002Fexplore\u002Fcompare\u002Fanalyze\u002Fevaluate\"\n    → RESEARCH team\n\n  \"implement\u002Fbuild\u002Fcreate\u002Ffix\u002Frefactor\u002Fdeploy\u002Fmigrate\"\n    → IMPLEMENTATION team\n\n  \"review\u002Faudit\u002Fcheck\u002Fvalidate\u002Fassess\"\n    → REVIEW team\n\n  Both research + implementation signals present\n    → HYBRID team (research phase → implementation phase)\n\n  AA-MA active? → read milestone type for additional signal\n\n  Ambiguous? → AskUserQuestion to clarify\n```\n\n| Type | When | Team Size | Debate Mode |\n|------|------|-----------|-------------|\n| RESEARCH | Investigation, comparison, analysis | 2-4 researchers + synthesizer | YES |\n| IMPLEMENTATION | Building, fixing, deploying | architect + 1-3 impl + reviewer | No |\n| HYBRID | Research then build | Phase 1: research → Phase 2: impl | Phase 1 only |\n| REVIEW | Code audit, security review | 2-3 specialized reviewers | No |\n\n---\n\n## 7-Phase Lifecycle\n\n```\n┌─────────────────────────────────────────────────────┐\n│ Phase 1: ANALYZE  → Classify task, detect AA-MA     │\n│ Phase 2: COMPOSE  → Select roles, size team         │\n│ Phase 3: APPROVE  → Present proposal to user        │\n│ Phase 4: SPAWN    → TeamCreate, spawn teammates     │\n│ Phase 5: COORDINATE → Messages, progress, debate    │\n│ Phase 6: SHUTDOWN → Drain, verify, shutdown          │\n│ Phase 7: CLEANUP  → TeamDelete, report, AA-MA sync  │\n└─────────────────────────────────────────────────────┘\n```\n\n### Phase 1: Task Analysis\n\n1. Parse user intent — extract keywords, scope, complexity\n2. Check `.claude\u002Fdev\u002Factive\u002F` for AA-MA tasks\n3. Classify: RESEARCH \u002F IMPLEMENTATION \u002F HYBRID \u002F REVIEW\n4. Estimate team size (2-5 teammates; below 2 → recommend subagents instead)\n5. If ambiguous, ask user via AskUserQuestion\n\n### Phase 2: Team Composition\n\nSelect roles from **ROLE_TEMPLATES.md** based on task type:\n\n| Type | Roles to Spawn |\n|------|---------------|\n| RESEARCH | 2-4 Researchers (Explore) + optional Synthesizer (Explore) |\n| IMPLEMENTATION | 1 Architect (Plan) + 1-3 Implementers (general-purpose) + 1 Reviewer (code-reviewer) |\n| HYBRID | Phase 1: Research roles → Phase 2: Implementation roles |\n| REVIEW | 2-3 Reviewers (code-reviewer \u002F security-auditor \u002F test-automator) |\n\n**Plan approval logic (adaptive, per-teammate):**\n```\nTeammate modifies core\u002Fshared modules (3+ importers)? → plan mode required\nModifies API contracts, DB schema, config?             → plan mode required\nCreates new isolated files only?                       → NOT required\nWrites tests only?                                     → NOT required\nResearch\u002Freview role?                                  → NEVER required\n```\n\n**Team naming convention:** `{task-type}-{short-descriptor}` (e.g., `research-auth-audit`, `impl-user-dashboard`)\n\n### Phase 3: User Approval\n\nPresent the team proposal via AskUserQuestion:\n\n```\nTeam Proposal: {team-name}\nType: {RESEARCH|IMPLEMENTATION|HYBRID|REVIEW}\nTeammates ({count}):\n  - {role}: {name} ({agent-type}) — {purpose}\n  - ...\nTasks ({count}):\n  - {task summary} → assigned to {name}\n  - ...\nAA-MA: {active task name | not active}\nEstimated scope: {brief}\n\nApprove this team configuration?\n- Approve (Recommended)\n- Modify (adjust roles\u002Ftasks)\n- Cancel\n```\n\n### Phase 4: Team Spawn\n\nExecute in this order:\n\n1. **TeamCreate** — create team with descriptive name\n2. **TaskCreate** — create all tasks with descriptions, activeForm\n3. **TaskUpdate** — set dependencies (addBlockedBy) between tasks\n4. **Task tool** — spawn each teammate with:\n   - `team_name` parameter\n   - `name` parameter (human-readable role name)\n   - `subagent_type` from role template\n   - `mode` set appropriately (plan for risky changes)\n   - Prompt from role template with task-specific details\n5. **TaskUpdate** — assign tasks to teammates (set owner)\n\n**Spawn prompt structure:**\n```\nYou are the {role} on team \"{team-name}\".\n\nYour assignment: {task description}\n\nTeam context:\n- Team type: {type}\n- Your teammates: {list with roles}\n- Your tasks: {assigned task IDs and descriptions}\n\nWorking directory: {path}\n\nInstructions:\n1. Read your assigned tasks via TaskGet\n2. Mark tasks in_progress via TaskUpdate when starting\n3. Communicate findings\u002Fblockers via SendMessage to team lead\n4. Mark tasks completed via TaskUpdate when done\n5. Check TaskList for next available work\n\n{role-specific instructions from ROLE_TEMPLATES.md}\n```\n\n### Phase 5: Coordinate & Monitor\n\nAs team lead (your session), you:\n\n1. **Receive messages** — teammates auto-deliver messages when they complete tasks or need help\n2. **Track progress** — periodically check TaskList for status\n3. **Unblock teammates** — answer questions, resolve conflicts, reassign work\n4. **Sync state** — after each task completion, sync TaskList↔AA-MA per SYNC_PROTOCOL.md\n5. **Trigger quality gates** — see QUALITY_GATES.md\n6. **Handle errors** — see ERROR_RECOVERY.md\n\n**AA-MA Sync (if active):** After each teammate task completion, immediately update AA-MA files (tasks.md Result Log, reference.md facts, context-log.md decisions, provenance.log). Follow domain ownership rules in `references\u002FAA_MA_INTEGRATION.md` § Bidirectional Sync Protocol. Escalate ambiguous updates to user.\n\n**For RESEARCH teams — Competing Hypotheses Protocol:**\n\nAfter researchers complete initial investigation:\n1. SendMessage to each researcher: \"Share your findings and explicitly challenge the other researchers' conclusions\"\n2. Allow one debate round via peer SendMessage\n3. Synthesizer (or lead) consolidates surviving conclusions\n4. Only findings that survived adversarial challenge are reported\n\n> Detail: See **references\u002FTEAM_PATTERNS.md** § Competing Hypotheses\n\n### Phase 6: Shutdown\n\nFollow the graceful shutdown protocol:\n\n1. **Drain** — message busy teammates to finish current task (don't start new)\n2. **Verify** — TaskList check, all tasks complete or explicitly deferred\n3. **Shutdown** — SendMessage type:shutdown_request to each (reverse spawn order)\n4. **Handle rejections** — if teammate rejects, allow to finish, retry\n\n> Detail: See **references\u002FSHUTDOWN_PROTOCOL.md**\n\n### Phase 7: Cleanup & Report\n\n1. **Final AA-MA sync** — if active, perform final bidirectional sync:\n   - Sync all remaining TaskList statuses → tasks.md\n   - Verify all AA-MA content is current\n   - Follow SYNC_PROTOCOL.md § Team Shutdown sync\n2. **TeamDelete** — remove team and task directories\n3. **Final report** — summarise to user:\n   - Tasks completed vs deferred\n   - Key findings (research) or changes made (implementation)\n   - Files modified\n   - Any follow-up actions needed\n\n> Detail: See **references\u002FAA_MA_INTEGRATION.md** § Bidirectional Sync Protocol\n\n---\n\n## AA-MA Integration\n\nWhen `.claude\u002Fdev\u002Factive\u002F` contains an active task:\n\n- **Detection**: Check for active AA-MA task at Phase 1\n- **Milestone mapping**: Parse tasks.md ACTIVE milestone → map to team tasks\n- **State sync**: Teammate completions update tasks.md, reference.md, context-log.md, provenance.log\n- **Finalization**: Run AA-MA Finalization Protocol at milestone boundaries\n- **Commits**: Include AA-MA commit signature\n\nThe skill works identically without AA-MA — state sync is simply skipped.\n\n> Detail: See **references\u002FAA_MA_INTEGRATION.md**\n\n---\n\n## Error Handling\n\n| Scenario | Response |\n|----------|----------|\n| File conflict between teammates | See ERROR_RECOVERY.md § File Conflicts |\n| Teammate stuck\u002Funresponsive | Message → wait → reassign → replace |\n| Task fails | Retry same → different teammate → escalate to user |\n| Partial completion | Preserve state, present options to user |\n\n> Detail: See **references\u002FERROR_RECOVERY.md**\n\n---\n\n## Quality Gates\n\n| Gate | When | Enforced By |\n|------|------|-------------|\n| Design Review | Before implementation | Architect teammate |\n| Code Review | After each impl task | Reviewer teammate |\n| Test Verification | After impl + review | Tester or lead |\n| Consistency Check | After all tasks | Lead (git status, diff, tests) |\n| AA-MA Validation | Milestone boundary | Lead |\n\n> Detail: See **references\u002FQUALITY_GATES.md**\n\n---\n\n## Reference Files\n\n| File | Content |\n|------|---------|\n| `references\u002FROLE_TEMPLATES.md` | 6 role definitions with spawn prompts |\n| `references\u002FTEAM_PATTERNS.md` | Research\u002Fimpl\u002Fhybrid\u002Freview patterns |\n| `references\u002FAA_MA_INTEGRATION.md` | Milestone mapping, state sync |\n| `references\u002FERROR_RECOVERY.md` | Conflicts, stuck, failures, partials |\n| `references\u002FSHUTDOWN_PROTOCOL.md` | 4-phase graceful + emergency shutdown |\n| `references\u002FQUALITY_GATES.md` | 5 gate types + enforcement |\n\n## Templates\n\n| File | Content |\n|------|---------|\n| `templates\u002Fresearch-team.md` | Ready-to-use research team config |\n| `templates\u002Fimplementation-team.md` | Ready-to-use implementation team config |\n| `templates\u002Freview-team.md` | Ready-to-use review team config |\n\n---\n\n## Quick Reference Checklist\n\n### Before Team Creation\n- [ ] Classified task type (RESEARCH\u002FIMPLEMENTATION\u002FHYBRID\u002FREVIEW)\n- [ ] Checked for AA-MA active tasks\n- [ ] Selected roles from ROLE_TEMPLATES.md\n- [ ] Sized team (2-5; \u003C2 → use subagents instead)\n- [ ] Determined plan approval needs per teammate\n- [ ] Presented proposal and got user approval\n\n### During Team Execution\n- [ ] All teammates spawned and tasks assigned\n- [ ] Monitoring TaskList for progress\n- [ ] Responding to teammate messages\n- [ ] Quality gates enforced at checkpoints\n- [ ] Research teams: debate round triggered after initial findings\n- [ ] Errors handled per ERROR_RECOVERY.md\n\n### After Team Completion\n- [ ] All tasks completed or explicitly deferred\n- [ ] Graceful shutdown executed (SHUTDOWN_PROTOCOL.md)\n- [ ] TeamDelete called\n- [ ] Final report presented to user\n- [ ] AA-MA files updated (if active)\n- [ ] Git commit with changes (AA-MA signature if applicable)\n","# Agent Teams Orchestration\n\nOrchestrate persistent Claude Code agent teams with shared task lists, inter-agent messaging, and structured coordination for complex collaborative work.\n\n## When to Use This Skill\n\n**Use agent-teams when:**\n- Task needs 2+ agents that **communicate** with each other\n- Research needs **competing hypotheses** with adversarial debate\n- Implementation needs **architect + implementers + reviewer** coordination\n- Work benefits from persistent teammates over one-shot subagents\n\n**Do NOT use — use these instead:**\n- Tasks are independent, no communication needed → `dispatching-parallel-agents`\n- Sequential tasks with review gates, same session → `subagent-driven-development`\n- Single investigation or code change → direct execution\n\n### Decision Flowchart\n\n```\nComplex task requiring multiple agents?\n├── NO → Execute directly or use a single subagent\n└── YES → Do agents need to communicate\u002Fcoordinate?\n    ├── NO → dispatching-parallel-agents (one-shot, parallel)\n    └── YES → Are tasks sequential with review between each?\n        ├── YES → subagent-driven-development (same session)\n        └── NO → ★ agent-teams (persistent, communicating)\n```\n\n---\n\n## Task Classification\n\nClassify the user's request to select the right team type:\n\n```\nUser Request → keyword + intent analysis:\n\n  \"research\u002Finvestigate\u002Fexplore\u002Fcompare\u002Fanalyze\u002Fevaluate\"\n    → RESEARCH team\n\n  \"implement\u002Fbuild\u002Fcreate\u002Ffix\u002Frefactor\u002Fdeploy\u002Fmigrate\"\n    → IMPLEMENTATION team\n\n  \"review\u002Faudit\u002Fcheck\u002Fvalidate\u002Fassess\"\n    → REVIEW team\n\n  Both research + implementation signals present\n    → HYBRID team (research phase → implementation phase)\n\n  AA-MA active? → read milestone type for additional signal\n\n  Ambiguous? → AskUserQuestion to clarify\n```\n\n| Type | When | Team Size | Debate Mode |\n|------|------|-----------|-------------|\n| RESEARCH | Investigation, comparison, analysis | 2-4 researchers + synthesizer | YES |\n| IMPLEMENTATION | Building, fixing, deploying | architect + 1-3 impl + reviewer | No |\n| HYBRID | Research then build | Phase 1: research → Phase 2: impl | Phase 1 only |\n| REVIEW | Code audit, security review | 2-3 specialized reviewers | No |\n\n---\n\n## 7-Phase Lifecycle\n\n```\n┌─────────────────────────────────────────────────────┐\n│ Phase 1: ANALYZE  → Classify task, detect AA-MA     │\n│ Phase 2: COMPOSE  → Select roles, size team         │\n│ Phase 3: APPROVE  → Present proposal to user        │\n│ Phase 4: SPAWN    → TeamCreate, spawn teammates     │\n│ Phase 5: COORDINATE → Messages, progress, debate    │\n│ Phase 6: SHUTDOWN → Drain, verify, shutdown          │\n│ Phase 7: CLEANUP  → TeamDelete, report, AA-MA sync  │\n└─────────────────────────────────────────────────────┘\n```\n\n### Phase 1: Task Analysis\n\n1. Parse user intent — extract keywords, scope, complexity\n2. Check `.claude\u002Fdev\u002Factive\u002F` for AA-MA tasks\n3. Classify: RESEARCH \u002F IMPLEMENTATION \u002F HYBRID \u002F REVIEW\n4. Estimate team size (2-5 teammates; below 2 → recommend subagents instead)\n5. If ambiguous, ask user via AskUserQuestion\n\n### Phase 2: Team Composition\n\nSelect roles from **ROLE_TEMPLATES.md** based on task type:\n\n| Type | Roles to Spawn |\n|------|---------------|\n| RESEARCH | 2-4 Researchers (Explore) + optional Synthesizer (Explore) |\n| IMPLEMENTATION | 1 Architect (Plan) + 1-3 Implementers (general-purpose) + 1 Reviewer (code-reviewer) |\n| HYBRID | Phase 1: Research roles → Phase 2: Implementation roles |\n| REVIEW | 2-3 Reviewers (code-reviewer \u002F security-auditor \u002F test-automator) |\n\n**Plan approval logic (adaptive, per-teammate):**\n```\nTeammate modifies core\u002Fshared modules (3+ importers)? → plan mode required\nModifies API contracts, DB schema, config?             → plan mode required\nCreates new isolated files only?                       → NOT required\nWrites tests only?                                     → NOT required\nResearch\u002Freview role?                                  → NEVER required\n```\n\n**Team naming convention:** `{task-type}-{short-descriptor}` (e.g., `research-auth-audit`, `impl-user-dashboard`)\n\n### Phase 3: User Approval\n\nPresent the team proposal via AskUserQuestion:\n\n```\nTeam Proposal: {team-name}\nType: {RESEARCH|IMPLEMENTATION|HYBRID|REVIEW}\nTeammates ({count}):\n  - {role}: {name} ({agent-type}) — {purpose}\n  - ...\nTasks ({count}):\n  - {task summary} → assigned to {name}\n  - ...\nAA-MA: {active task name | not active}\nEstimated scope: {brief}\n\nApprove this team configuration?\n- Approve (Recommended)\n- Modify (adjust roles\u002Ftasks)\n- Cancel\n```\n\n### Phase 4: Team Spawn\n\nExecute in this order:\n\n1. **TeamCreate** — create team with descriptive name\n2. **TaskCreate** — create all tasks with descriptions, activeForm\n3. **TaskUpdate** — set dependencies (addBlockedBy) between tasks\n4. **Task tool** — spawn each teammate with:\n   - `team_name` parameter\n   - `name` parameter (human-readable role name)\n   - `subagent_type` from role template\n   - `mode` set appropriately (plan for risky changes)\n   - Prompt from role template with task-specific details\n5. **TaskUpdate** — assign tasks to teammates (set owner)\n\n**Spawn prompt structure:**\n```\nYou are the {role} on team \"{team-name}\".\n\nYour assignment: {task description}\n\nTeam context:\n- Team type: {type}\n- Your teammates: {list with roles}\n- Your tasks: {assigned task IDs and descriptions}\n\nWorking directory: {path}\n\nInstructions:\n1. Read your assigned tasks via TaskGet\n2. Mark tasks in_progress via TaskUpdate when starting\n3. Communicate findings\u002Fblockers via SendMessage to team lead\n4. Mark tasks completed via TaskUpdate when done\n5. Check TaskList for next available work\n\n{role-specific instructions from ROLE_TEMPLATES.md}\n```\n\n### Phase 5: Coordinate & Monitor\n\nAs team lead (your session), you:\n\n1. **Receive messages** — teammates auto-deliver messages when they complete tasks or need help\n2. **Track progress** — periodically check TaskList for status\n3. **Unblock teammates** — answer questions, resolve conflicts, reassign work\n4. **Sync state** — after each task completion, sync TaskList↔AA-MA per SYNC_PROTOCOL.md\n5. **Trigger quality gates** — see QUALITY_GATES.md\n6. **Handle errors** — see ERROR_RECOVERY.md\n\n**AA-MA Sync (if active):** After each teammate task completion, immediately update AA-MA files (tasks.md Result Log, reference.md facts, context-log.md decisions, provenance.log). Follow domain ownership rules in `references\u002FAA_MA_INTEGRATION.md` § Bidirectional Sync Protocol. Escalate ambiguous updates to user.\n\n**For RESEARCH teams — Competing Hypotheses Protocol:**\n\nAfter researchers complete initial investigation:\n1. SendMessage to each researcher: \"Share your findings and explicitly challenge the other researchers' conclusions\"\n2. Allow one debate round via peer SendMessage\n3. Synthesizer (or lead) consolidates surviving conclusions\n4. Only findings that survived adversarial challenge are reported\n\n> Detail: See **references\u002FTEAM_PATTERNS.md** § Competing Hypotheses\n\n### Phase 6: Shutdown\n\nFollow the graceful shutdown protocol:\n\n1. **Drain** — message busy teammates to finish current task (don't start new)\n2. **Verify** — TaskList check, all tasks complete or explicitly deferred\n3. **Shutdown** — SendMessage type:shutdown_request to each (reverse spawn order)\n4. **Handle rejections** — if teammate rejects, allow to finish, retry\n\n> Detail: See **references\u002FSHUTDOWN_PROTOCOL.md**\n\n### Phase 7: Cleanup & Report\n\n1. **Final AA-MA sync** — if active, perform final bidirectional sync:\n   - Sync all remaining TaskList statuses → tasks.md\n   - Verify all AA-MA content is current\n   - Follow SYNC_PROTOCOL.md § Team Shutdown sync\n2. **TeamDelete** — remove team and task directories\n3. **Final report** — summarise to user:\n   - Tasks completed vs deferred\n   - Key findings (research) or changes made (implementation)\n   - Files modified\n   - Any follow-up actions needed\n\n> Detail: See **references\u002FAA_MA_INTEGRATION.md** § Bidirectional Sync Protocol\n\n---\n\n## AA-MA Integration\n\nWhen `.claude\u002Fdev\u002Factive\u002F` contains an active task:\n\n- **Detection**: Check for active AA-MA task at Phase 1\n- **Milestone mapping**: Parse tasks.md ACTIVE milestone → map to team tasks\n- **State sync**: Teammate completions update tasks.md, reference.md, context-log.md, provenance.log\n- **Finalization**: Run AA-MA Finalization Protocol at milestone boundaries\n- **Commits**: Include AA-MA commit signature\n\nThe skill works identically without AA-MA — state sync is simply skipped.\n\n> Detail: See **references\u002FAA_MA_INTEGRATION.md**\n\n---\n\n## Error Handling\n\n| Scenario | Response |\n|----------|----------|\n| File conflict between teammates | See ERROR_RECOVERY.md § File Conflicts |\n| Teammate stuck\u002Funresponsive | Message → wait → reassign → replace |\n| Task fails | Retry same → different teammate → escalate to user |\n| Partial completion | Preserve state, present options to user |\n\n> Detail: See **references\u002FERROR_RECOVERY.md**\n\n---\n\n## Quality Gates\n\n| Gate | When | Enforced By |\n|------|------|-------------|\n| Design Review | Before implementation | Architect teammate |\n| Code Review | After each impl task | Reviewer teammate |\n| Test Verification | After impl + review | Tester or lead |\n| Consistency Check | After all tasks | Lead (git status, diff, tests) |\n| AA-MA Validation | Milestone boundary | Lead |\n\n> Detail: See **references\u002FQUALITY_GATES.md**\n\n---\n\n## Reference Files\n\n| File | Content |\n|------|---------|\n| `references\u002FROLE_TEMPLATES.md` | 6 role definitions with spawn prompts |\n| `references\u002FTEAM_PATTERNS.md` | Research\u002Fimpl\u002Fhybrid\u002Freview patterns |\n| `references\u002FAA_MA_INTEGRATION.md` | Milestone mapping, state sync |\n| `references\u002FERROR_RECOVERY.md` | Conflicts, stuck, failures, partials |\n| `references\u002FSHUTDOWN_PROTOCOL.md` | 4-phase graceful + emergency shutdown |\n| `references\u002FQUALITY_GATES.md` | 5 gate types + enforcement |\n\n## Templates\n\n| File | Content |\n|------|---------|\n| `templates\u002Fresearch-team.md` | Ready-to-use research team config |\n| `templates\u002Fimplementation-team.md` | Ready-to-use implementation team config |\n| `templates\u002Freview-team.md` | Ready-to-use review team config |\n\n---\n\n## Quick Reference Checklist\n\n### Before Team Creation\n- [ ] Classified task type (RESEARCH\u002FIMPLEMENTATION\u002FHYBRID\u002FREVIEW)\n- [ ] Checked for AA-MA active tasks\n- [ ] Selected roles from ROLE_TEMPLATES.md\n- [ ] Sized team (2-5; \u003C2 → use subagents instead)\n- [ ] Determined plan approval needs per teammate\n- [ ] Presented proposal and got user approval\n\n### During Team Execution\n- [ ] All teammates spawned and tasks assigned\n- [ ] Monitoring TaskList for progress\n- [ ] Responding to teammate messages\n- [ ] Quality gates enforced at checkpoints\n- [ ] Research teams: debate round triggered after initial findings\n- [ ] Errors handled per ERROR_RECOVERY.md\n\n### After Team Completion\n- [ ] All tasks completed or explicitly deferred\n- [ ] Graceful shutdown executed (SHUTDOWN_PROTOCOL.md)\n- [ ] TeamDelete called\n- [ ] Final report presented to user\n- [ ] AA-MA files updated (if active)\n- [ ] Git commit with changes (AA-MA signature if applicable)\n",{"name":5,"description":7},"main","cd9a2962c9a7e0797fe440f7b1ba4ceccc16ae0d","claude-code\u002Fskills\u002Fagent-teams",1,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge","https:\u002F\u002Fgithub.com\u002Fsnewhouse","Data Scientist, Bioinformatician, Dad, Husband, MS warrior","2026-11-12 06:45:42",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add snewhouse\u002Faa-ma-forge --skill agent-teams",{"tool":69,"command":70},"bunx","bunx skills add snewhouse\u002Faa-ma-forge --skill agent-teams",{"tool":72,"command":73},"pnpm","pnpm dlx skills add snewhouse\u002Faa-ma-forge --skill agent-teams","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002FSKILL.md",true,[77,83,87,91,95,99,103,107,111],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002FAA_MA_INTEGRATION.md","REFERENCE","参考文档",8059,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FAA_MA_INTEGRATION.md",{"path":84,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002FERROR_RECOVERY.md",6252,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FERROR_RECOVERY.md",{"path":88,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002FQUALITY_GATES.md",7222,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FQUALITY_GATES.md",{"path":92,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002FROLE_TEMPLATES.md",11150,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FROLE_TEMPLATES.md",{"path":96,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":97,"sourceHtmlUrl":98},"references\u002FSHUTDOWN_PROTOCOL.md",6097,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FSHUTDOWN_PROTOCOL.md",{"path":100,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":101,"sourceHtmlUrl":102},"references\u002FTEAM_PATTERNS.md",12445,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Freferences\u002FTEAM_PATTERNS.md",{"path":104,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":105,"sourceHtmlUrl":106},"templates\u002Fimplementation-team.md",7811,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Ftemplates\u002Fimplementation-team.md",{"path":108,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":109,"sourceHtmlUrl":110},"templates\u002Fresearch-team.md",6668,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Ftemplates\u002Fresearch-team.md",{"path":112,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":113,"sourceHtmlUrl":114},"templates\u002Freview-team.md",5407,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fagent-teams\u002Ftemplates\u002Freview-team.md",[116,139,165,186,208,238],{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":125,"publishedAt":50},"01M6MZ588SD5DDH59H18PRNWEV","deploy-helper","You can use this to help with deploy stuff, deploying, deployments, releases, shipping, pushing to prod, going live, rollouts.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fevals\u002Fskill-draft\u002Fdraft\u002FSKILL.md",[122],{"categoryNo":123,"categoryName":124,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",[126,127,128,129,130,131,132,133,134,135,136,137,138],"deploy","deploy helper","helper","you","live","with","can","rollouts","shipping","use","deployments","releases","help",{"skillNo":140,"name":141,"nameZh":6,"description":142,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":143,"licenseFileUrl":144,"sourceHtmlUrl":145,"categories":146,"keywords":156,"publishedAt":50},"01M6MZ54NEKRYXGMJ1KJWYMKM7","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","MIT","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fwriting-for-agents\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[147,150,151],{"categoryNo":148,"categoryName":149,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":152,"categoryName":153,"taxonomyType":154,"taxonomyTypeDesc":155},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[157,158,159,160,135,161,162,163,164],"writing","writing for agents","for","line","instructions","read","editing","documents",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"publishedAt":50},"01M6MZ500T0FH1G8TBSQV7G5G2","verify-plan","Slash entry for plan verification: runs plan-verification on an existing AA-MA plan, writes [task]-verification.md, and with --iterate loops until the plan converges. Use when the user types \u002Fverify-plan or wants the verification report saved.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-plan\u002FSKILL.md",[],[172,173,174,175,176,135,177,131,178,179,180,181,182,183,184,159,185],"verify","plan","verify plan","loops","task","user","verification","report","types","plan verification","entry","iterate","Existing","saved",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":50},"01M6MZ4V9ST4K54NT1SRBGCE7P","verify-impl","Post-impl adversarial review symmetric to \u002Fverify-plan. Dispatches up to 5 parallel audit agents (code-reviewer, security-auditor, tdd-sequence-auditor, context7-evidence-auditor, future-proofing-auditor) based on the milestone's plan-declared Audit-Profile. CRITICAL findings surface via AskUserQuestion accept\u002Fdispute\u002Fdefer panel before §7.3 user authorization. Introduced in v0.8.0 per ADR-0005. Invoked by Phase 6.8 of \u002Fexecute-aa-ma-milestone.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-impl\u002FSKILL.md",[],[193,194,172,195,196,197,198,199,49,200,201,202,42,203,204,173,205,46,206,207],"impl","verify impl","adversarial","post","panel","via","critical","context7","up","evidence","parallel","adr","audit","tdd","milestone",{"skillNo":209,"name":210,"nameZh":6,"description":211,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":212,"categories":213,"keywords":218,"publishedAt":50},"01M6MZ4K7CC9PMJ1KEY3F53RS1","understand-codebase","Onboard to a new, inherited, or shared codebase. Read it, understand it, map it, and learn its conventions, versioning, tests, tech stack, rules (AGENTS.md \u002F CLAUDE.md \u002F .cursorrules \u002F etc.), build\u002Frun\u002FCI, integrations, security posture, and repo health — then produce an honest pros\u002Fcons verdict, a \"contribute safely\" playbook, and an \"add a feature\" playbook, written to ONBOARDING.md at the repo root plus a .claude\u002Fonboarding\u002F set of deep-dives — and optionally author an AGENTS.md if one is missing, or review and propose improvements to an existing one. Tiered (Quick \u002F Standard \u002F Deep). Reuses codemem (index + diagrams), gsd-map-codebase, system-mapping, code-intelligence, impact-analysis rather than re-implementing them; Deep tier runs a TeamCreate agent-team. Keywords: new codebase, shared codebase, inherited code, onboard, understand this repo, how do I contribute, how do I add a feature, ramp up, get oriented, ONBOARDING.md, AGENTS.md, codebase walkthrough, joining a project.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Funderstand-codebase\u002FSKILL.md",[214,215],{"categoryNo":27,"categoryName":28,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":216,"categoryName":217,"taxonomyType":154,"taxonomyTypeDesc":155},"01JBSEEDCAT000000000000038","人力资源",[219,220,221,201,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237],"understand codebase","codebase","understand","walkthrough","analysis","SET","ci","learn","diagrams","repo health","implementing","re","quick","impact","get","project","deep","shared","map",{"skillNo":239,"name":240,"nameZh":6,"description":241,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":242,"categories":243,"keywords":244,"publishedAt":50},"01M6MZ4D1ZC8MTW064QXY6WC76","token-compression","Output token compression for AA-MA workflows. Reduces response tokens by 40-75% while preserving full technical accuracy. Three intensity levels mapped to execution modes: lite (HITL), full (general), ultra (AFK). Auto-activates during AA-MA execution based on task Mode field. Manual activation via \u002Fcompress lite|full|ultra.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Ftoken-compression\u002FSKILL.md",[],[245,246,247,248,249,250,251,159,252,253,198,254,255,256,257,176,258,259,260,261],"compression","token compression","token","workflows","output","modes","accuracy","mode","manual","intensity","tokens","hitl","three","general","auto","technical","execution"]