plugins/agent-teams/commands/team-debug.md
Debug complex issues using the Analysis of Competing Hypotheses (ACH) methodology. Multiple debugger agents investigate different hypotheses in parallel, gathering evidence to confirm or falsify each one.
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 is set$ARGUMENTS:
<error-description-or-file>: description of the bug, error message, or path to a file exhibiting the issue--hypotheses N: number of hypotheses to generate (default: 3)--scope: investigation scope — files (specific files), module (module/package), project (entire project)Generate N hypotheses about the root cause, covering different failure mode categories:
Present hypotheses to user: "Generated {N} hypotheses. Spawning investigators..."
Teammate tool with operation: "spawnTeam", team name: debug-{timestamp}Task tool to spawn a teammate:
name: investigator-{n} (e.g., "investigator-1")subagent_type: "agent-teams:team-debugger"prompt: Include the hypothesis, investigation scope, and relevant contextTaskCreate for each investigator's task:
Compare findings across all investigators:
Rank confirmed hypotheses by:
Present root cause analysis:
## Debug Report: {error description}
### Root Cause (Most Likely)
**Hypothesis**: {description}
**Confidence**: {High/Medium/Low}
**Evidence**: {summary with file:line citations}
**Causal Chain**: {step-by-step from cause to symptom}
### Recommended Fix
{specific fix with code changes}
### Other Hypotheses
- {hypothesis 2}: {status} — {brief evidence summary}
- {hypothesis 3}: {status} — {brief evidence summary}
shutdown_request to all investigatorsTeammate cleanup to remove team resources