--- name: swarm description: Parallel agent orchestration. Decomposes large tasks into waves, spawns specialist agents from the A2A registry concurrently, collects and synthesizes results. Enterprise-scale execution mode. argument-hint: [task description] allowed-tools: Bash, Read, Grep, Glob, Agent, WebFetch, WebSearch --- # /swarm — CoM Parallel Agent Orchestration Decomposes a large task and spawns specialist agents from the A2A registry in coordinated waves. ## Step 1: Registry Load Read `~/.claude/a2a/agent-cards.json` — parse agents, capabilities, hardware limits. ## Step 2: Task Analysis Parse $ARGUMENTS. Use Sequential Thinking to decompose: 1. Overarching goal 2. Independent sub-tasks (can run in parallel) 3. Dependent sub-tasks (must wait) 4. Agent mapping by capabilities keywords 5. Group into waves respecting max_concurrent_agents limit ## Step 3: Wave Planning Present formatted plan with waves, agent assignments, deliverables, and hardware constraints. ## Step 4: Conflict Prevention - No two agents write the same file (serialize if needed) - Cipher and Vanguard never run concurrently on same crate - Aegis and Specter can run in parallel (both read-only) - Total concurrent <= hardware profile limit (reserve 1 slot for overhead) ## Step 5: Approval and Execution Ask: **"Deploy swarm? [y/N]"** On approval: execute waves sequentially, agents within each wave in parallel. ## Step 6: Post-Swarm Report Show results per agent, failures, and final unified deliverable. ## CONSTRAINTS - Respect hardware limits - If task is inherently sequential, recommend `/go` instead - Every swarm requires user approval - Failed agents don't block others