Skip to content

feat: add --swarm flag to /debug command#21

Merged
iamladi merged 3 commits intomainfrom
feat/debug-swarm-mode
Feb 9, 2026
Merged

feat: add --swarm flag to /debug command#21
iamladi merged 3 commits intomainfrom
feat/debug-swarm-mode

Conversation

@iamladi
Copy link
Owner

@iamladi iamladi commented Feb 9, 2026

Summary

  • Add --swarm flag support to /debug for parallel hypothesis-testing via agent teams
  • Spawn up to 4 teammates, each investigating one hypothesis independently
  • Evidence sharing between teammates via SendMessage for cross-hypothesis elimination
  • Synthesis with teammate attribution and consensus markers
  • Graceful fallback to standard workflow when agent teams unavailable
  • Constitution-compliant reasoning-based constraints in all teammate prompts

Part of cross-repo --swarm expansion: agent-teams-expansion plan

Related PRs: github-plugin, workflows-plugin, sdlc-plugin (same feature across repos)

Test plan

  • Invoke /debug --swarm with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 enabled
  • Verify fallback to standard workflow without the env var
  • Verify bun run validate passes

Phase 1 of agent-teams-expansion plan. Adds --swarm flag support
to enable parallel hypothesis testing with agent teams.

Key additions:
- Argument parsing section to extract --swarm flag
- Mode selection routing to swarm vs standard workflow
- Swarm workflow with team prerequisites and fallback
- Context preparation and shared task list creation
- Teammate spawn protocol with context injection
- Evidence sharing between teammates investigating different hypotheses
- Completion protocol with 10-minute timeout
- Synthesis with hypothesis attribution
- Resource cleanup (SendMessage shutdown + TeamDelete)

Cross-cutting rules embedded in teammate prompts:
- Read-only tools only (no git commit/push/add)
- No AskUserQuestion (can't interact with user)
- No build/test commands (may interfere)
- Context as string literals (not references)

Standard workflow unchanged and clearly labeled.

Ref: agent-teams-expansion Phase 1
…m prompts

Replace bare "CRITICAL CONSTRAINTS" rules with reasoning-based constraints
that explain *why* each constraint exists (parallel interference, team context).
Replace rigid FINDINGS FORMAT with judgment-guided FINDINGS GUIDANCE.
@iamladi iamladi merged commit f8cb891 into main Feb 9, 2026
1 check passed
@iamladi iamladi deleted the feat/debug-swarm-mode branch February 9, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant