π Swarm Command
Multi-model consensus swarm orchestration for the Copilot CLI. Launch 50β250+ AI agents across 15 models with Shadow Score Spec L2 validation β from one command.
Learn more and see the website here: dubsopenhub.github.io/swarm-command
β‘ One Command. That's It.
Never used the CLI before? No problem.
- Open your terminal
- Paste this:
curl -fsSL https://raw.githubusercontent.com/DUBSOpenHub/swarm-command/main/quickstart.sh | bash
- When Copilot opens, type:
swarm command
Requires an active Copilot subscription.
π 30-Second Overview
Swarm Command is for tasks that are too big, risky, or cross-cutting for one model:
- Need one answer from many perspectives? It fans your task out across a layered swarm.
- Need confidence, not vibes? It uses cross-review + consensus scoring.
- Need hidden quality checks? It validates bundles with sealed acceptance criteria.
- Need speed at scale? Designed for parallel execution β agents work simultaneously, not sequentially.
- Need zero setup? No servers, no API keys, no build step.
If your task spans architecture + implementation + testing + docs + integration, this is exactly what Swarm Command is built for.
π€ What Is This?
Swarm Command is a multi-model swarm orchestration skill for the Copilot CLI that launches 50 to 250+ AI agents across 15 different models to solve complex tasks through hierarchical fan-out, cross-family review, and consensus-gated synthesis.
Give it a task β architecture, refactoring, testing, docs, or integration β and it decomposes the mission into domains, dispatches Commanders, Squad Leads, and Workers, validates outputs against sealed acceptance criteria, and synthesizes a final answer from collective intelligence instead of single-model intuition.
π¬ The Problem
One model gives you one perspective.
For small tasks, that's perfect. For high-stakes tasks, it's fragile:
- the model may miss cross-cutting risks,
- the task may exceed one context window,
- the output may sound confident without being complete,
- and you have no independent check that the answer actually satisfies the mission.
Swarm Command solves that by turning one request into a structured swarm process: split, parallelize, review, validate, converge.
π₯ Swarm Command vs. Stampede vs. Havoc
These systems are complementary β not competitors.
| If you need to... |
Use |
Why |
| Solve one complex task with layered consensus inside your current Copilot CLI session |
Swarm Command |
Best when you want decomposition, cross-model review, shadow validation, and one synthesized answer |
| Run parallel coding workstreams across terminals or branches |
Stampede |
Best when the goal is execution throughput across independent task lanes |
| Run a many-model tournament to pressure-test ideas and rank options |
Havoc Hackathon |
Best when you want competitive ideation, elimination rounds, and judged synthesis |
Rule of thumb:
β‘ What Makes It Different
- π True swarm β 50 to 250+ agents, not 3β5
- ποΈ 5-layer hierarchy β Nexus β Commander β Squad Lead β Worker β Reviewer
- π Cross-model diversity β Claude + GPT families mixed within every pod
- π³οΈ Consensus scoring β 4-stage gate-then-rank with CONSENSUS / MAJORITY / CONFLICT tiers
- π» Shadow Score β Shadow Score Spec L2 conformance. Sealed acceptance criteria generated before commanders execute, validated after, hardened on failure.
- π‘οΈ Depth Guard β 5 laws + 3-layer enforcement prevent runaway agent spawning
- β‘ Circuit breaker β 3-state FSM with 5-level recovery escalation
- π Parallel by design β agents execute concurrently with hierarchical fan-out and pipeline overlap
- π° Cost-controlled β 1024:1 token compression, wave deployment, hard cost ceilings, and cheap workers
- π¦ Zero infrastructure β no servers, no API keys, no build step
π° Built for Cost Control
Running 250+ agents sounds expensive. It isn't β because every layer is engineered to minimize spend.
Token Compression (1024:1)
Context shrinks at every layer. The Nexus holds 128K tokens; by the time instructions reach a worker, they're 128 tokens. Parents strip rationale, narrow file scope, and tighten constraints so children only receive the bytes they need.
Nexus 128K tokens βββΊ 4K task brief
Commander 64K tokens βββΊ 2K context capsule
Squad Lead 32K tokens βββΊ 512 shard
Worker 8K tokens βββΊ 128 micro-brief
Circuit Breakers
A three-state FSM (CLOSED β OPEN β HALF-OPEN) monitors every layer. If too many agents fail (50β60% threshold), the breaker trips β no new agents spawn, costs stop climbing, and a recovery probe tests before the swarm resumes.
5-level recovery escalation: Retry β Simplify β Model Swap β Scope Reduce β Graceful Degrade.
Wave Deployment (Canary β Probe β Remainder)
Agents don't all launch at once. Each pod deploys in three waves with health gates between them:
- Wave 1 (Canary) β 1 agent verifies the task is feasible
- Wave 2 (Probe) β 3 agents test for rate limits and bulk viability
- Wave 3 (Remainder) β full pod only if gates pass
If the canary fails, the full pod never deploys. One cheap test prevents many expensive failures.
Six Resource Guards
| Guard |
What it does |
| Timeout cascade |
90s β 60s β 40s β 30s per layer β children always finish before parents |
| Token ceiling |
128K / 64K / 32K / 8K per layer |
| Output size cap |
4K / 1K / 512 / 256 tokens per layer |
| Retry budget |
Workers: 0 retries. Squad Leads: 1 retry. |
| Concurrent agent cap |
Max 50 agents launching simultaneously |
| Cost ceiling |
$5 / $10 / $20 hard cap β kills all agents if breached |
Cost by Scale
| Scale |
Agents |
Typical Cost |
Hard Cap |
Wall-Clock |
| SS-50 |
~36-52 |
$2.50 |
$5 |
~30s |
| SS-100 |
~89 |
$5.50 |
$10 |
~45s |
| SS-250 |
~316 |
$10 |
$20 |
~65β90s |
Why It's Cheap
- Workers are the cheapest models β Haiku and GPT-Mini at L3, 10Γ cheaper than Opus
- Expensive reasoning stays at the top β Opus and Sonnet only at Commander/Nexus level
- Context compresses monotonically β each layer receives a fraction of its parent's tokens
- Failed work stops early β circuit breakers and canary gates prevent runaway spend
π§ 30-Second Architecture
Before the full diagrams, here's the mental model:
- Nexus reads the mission and splits it into domains.
- Commanders own each domain and dispatch sub-work.
- Workers do tiny atomic tasks in parallel.
- Reviewers + Shadow Score decide what survives into the final answer.
You ask one question
β
Nexus decomposes the mission
β
Commanders split by domain
β
Workers execute atomic tasks in parallel
β
Reviewers score + Shadow Score validates
β
Nexus emits one final bundle
If you want the visual deep dive, jump to docs/architecture.md or docs/architecture-diagrams.md.
ποΈ How It Works
βββββββββββββββββββ
L0 β NEXUS (1) β claude-opus-4.6
β 128K ctx budget β Task decomposition + final synthesis
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
β β β
βββββββ΄ββββββ βββββββ΄ββββββ βββββββ΄ββββββ
L1 β CMD-ARCH β β CMD-IMPL β ... β CMD-INTG β Γ 5 Commanders
β 64K ctx β β 64K ctx β β 64K ctx β Domain specialists
βββββββ¬βββββββ βββββββ¬βββββββ βββββββ¬βββββββ
β β β
ββββββββββΌβββββββββ β β
β β β β β
ββββ΄βββ ββββ΄βββ ββββ΄βββ
L2 βSQ-1β βSQ-2β ... βSQ-10β Γ 10 per Commander = 50 Squad Leads
β32K β β32K β β32K β Micro-task decomposition + canary deploy
ββββ¬βββ ββββ¬βββ ββββ¬βββ
β β β
ββββ΄βββ ββββ΄βββ ββββ΄βββ
L3 βWΓ5 β βWΓ5 β βWΓ5 β Γ 5 per Squad Lead = 250 Workers
β 8K β β 8K β β 8K β Atomic execution (LEAF β no spawning)
βββββββ βββββββ βββββββ
ββββββββββββββββ
L4 β REVIEWERSΓ10 β Cross-review mesh (pipeline overlap)
β 16K ctx β 4-axis sealed scoring + consensus tiers
ββββββββββββββββ
+ SHADOW SCORING (sealed acceptance criteria, Shadow Score Spec L2)
Time-Flow Architecture
T+0s T+2s T+5s T+12s T+45s T+65s T+80s T+90s
β β β β β β β β
βΌ βΌ βΌ βΌ βΌ βΌ βΌ βΌ
ββββββ ββββββββ βββββββββββ ββββββββββββ ββββββββββ βββββββββ ββββββ ββββββ
βNEXUSββ βCMDs ββ βSQUAD ββ βWORKERS β βREVIEW β βMERGE β βVOTEβ βEMITβ
βBOOT β βSPAWN β βLEADS β βEXECUTE β βMESH β βRESULTSβ β β β β
β β β β β+ CANARY β β(parallel)β β(overlapβ β β β β β β
β β β β βVERIFY β β β βstart) β β β β β β β
ββββββ ββββββββ βββββββββββ ββββββββββββ ββββββββββ βββββββββ ββββββ ββββββ
2s 3s 7s 33s 20s 15s 10s 5s
Signal Flow β Token Compression
CONTEXT DOWN (shrinking) RESULTS UP (compressing)
======================== ========================
L0 Full Task Brief βββ 4K tokens ββββΊ Final Report βββ 4K tokens
β β²
L1 Context Capsule βββ 2K tokens ββββΊ Bundle βββ 1K tokens
β β²
L2 Shard βββ 512 tokens βββΊ Atom Set βββ 512 tokens
β β²
L3 Micro-Brief βββ 128 tokens βββΊ Atom βββ 256 tokens
β β²
L4 Review Capsule βββ 1K tokens ββββΊ Score Card βββ 512 tokens
π Scaling Variants
| Scale |
Agents |
Commanders |
Workers |
Reviewers |
Best For |
Wall-Clock |
| SS-50 |
~36-52 |
2-3 |
30-45 |
3 |
Fast bounded tasks |
~30s |
| SS-100 |
~89 |
5 |
75 |
8 |
Multi-file features and reviews |
~45s |
| SS-250 |
~316 |
5 |
250 |
10 |
Repo-wide or high-stakes work |
~65β90s |
10-Second Decision Tree
Do you need a fast second opinion on 1β2 files?
β SS-50
Do you need a serious answer for a multi-file feature or subsystem?
β SS-100
Do you need repo-wide coverage, compliance-grade review, or maximum consensus?
β SS-250
Default is SS-100. Say swarm command ss-250 for full deployment or swarm command ss-50 for quick tasks.
See docs/scaling.md for cost breakdowns, chooser guidance, and a deeper decision matrix.
π― Use Cases
Curated highlights β see docs/use-cases.md for the full gallery.
SS-50 β Fast Expert Panels (~30s)
π₯ Stack Trace Whisperer
swarm command ss-50 "Diagnose this error β 3 most likely root causes with fixes: [paste error]"