copilot-swarm
v0.1.0
Published
Copilot-swarm (CSW): a native GitHub Copilot CLI plugin for parallel delegation, evidence-gated goal runtime, and plan/execute/review discipline.
Maintainers
Readme
[!NOTE] CSW turns
copilotinto a swarm — running independent subtasks in parallel — and wraps work in a disciplined plan → execute → review loop whose "done" is decided by an evidence-gated oracle, not by assertion. It is built entirely on Copilot CLI's native extension surfaces (plugin manifest, skills, custom agents, hooks, MCP) with zero runtime dependencies.
Features
- Swarm dispatch (MCP) — Copilot CLI has no model-callable subagent-spawn, so CSW
ships a zero-dependency MCP server that orchestrates parallel
copilot -pworkers:dispatch,code_search,research. Bounded concurrency, per-worker timeout, failure isolation, recursion guard. - Worker roster — six focused custom agents:
explorer,researcher,planner,gap-analyst,plan-reviewer,verifier. - Evidence-gated goal runtime — machine success criteria
(
C0NN | channel: | test: | scenario:), a completion oracle that requires every criterion to pass with captured evidence and zero open blockers, a steering guard that refuses gate-weakening, and an append-only ledger under.csw/. - Workflow skills —
swarm,csw-plan(explore-first planning with an approval gate),csw-work(disciplined execution),csw-review(multi-lane, all-or-nothing). - Hooks — session doctrine injection, steering audit, an anti AI-slop comment check, and a continuation gate that keeps work going until the oracle passes.
- HUD — a live status line showing the active goal's criteria progress and blockers.
- Install UX — a polished
cswCLI (banner, themes, status/install/doctor).
Quick Start
[!TIP] Requires the GitHub Copilot CLI and Node.js >= 20.
npm install -g copilot-swarm # (after publish) — or see "From source" below
csw install # registers the plugin with Copilot CLI
csw status # verify
copilot # start a session — CSW is activeFrom source (before npm publish)
git clone https://github.com/wjgoarxiv/copilot-swarm.git && cd copilot-swarm
npm pack # build copilot-swarm-0.1.0.tgz
npm install -g ./copilot-swarm-0.1.0.tgz # clean copy (avoid `npm i -g .` — it symlinks the dev tree)
csw installUsage
In a copilot session:
- Run the loop — type
csw(alone, orcsw <task>) to start the full evidence-bound loop (csw-loop): it binds a goal, plans if needed, then drives test-first execution → real manual QA → review → cleanup until the completion oracle passes. (Equivalent explicit form:/copilot-swarm:csw-loop.) - Parallelize — just ask: "investigate auth, session storage, and rate limiting in parallel". CSW dispatches read-only workers and you integrate the results skeptically.
- Plan —
/copilot-swarm:csw-planruns explore-first research, interviews you on genuine unknowns, and stops at an approval gate before writing one decision-complete plan. - Execute —
/copilot-swarm:csw-workdrives each task test-first with real manual QA and only finishes when the goal runtime's oracle passes. - Review —
/copilot-swarm:csw-reviewruns compliance / quality / real-QA / scope lanes in parallel and gates all-or-nothing. - Workers — route a task to a specific agent with
@copilot-swarm:explorer(etc.).
Enable the HUD status line:
csw hud # prints the snippet to add to ~/.copilot/settings.jsonHow it works
| Capability | Copilot CLI surface |
|---|---|
| Parallel delegation | CSW dispatch MCP over copilot -p workers |
| Worker roster | agents/*.agent.md (namespaced copilot-swarm:*) |
| Always-on doctrine | sessionStart hook injecting additionalContext |
| Goal state / oracle | self-managed .csw/ (JSON state + JSONL ledger) |
| Continuation | agentStop / subagentStop hook (force-continue) |
| Steering / comments | userPromptSubmitted / postToolUse hooks |
| HUD | Copilot statusLine |
See docs/supporting-components.md for the
port / keep-native / skip decisions (e.g. LSP stays native).
Development
npm test # unit + e2e tests (Node test runner)
npm run scan # forbidden-token cleanliness scan (all surfaces)
npm run pack:dry-run
python3 generate_cover.py # regenerate the cover imageLicense
MIT — see LICENSE. No telemetry, no call-home.
