swarm: Command for Claude Code

.claude/commands/bv-dispatch.md

bv-dispatch is a command for Claude Code from swarm-ai-research/swarm. It costs 35 tokens per session (5,219 once invoked), scanned A, original, MIT.

A dispatch command that examines a graph of tasks and dependencies, then prepares ranked work suggestions for different tracks. A task graph represents tasks as connected items whose links show what depends on what.

In plain words
What is it for?
Use it for full work dispatch, a planning-only report, dependency hygiene checks, or a review of how accurate previous dispatch predictions were.
Why use it?
It helps coordinate parallel coding work by identifying important tasks, possible blockers, stale work, cycles, and missing dependency links.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

This is swarm-ai-research/swarm's own configuration. It tells Claude Code how to work on swarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/bv-dispatch.md
Clone the repo
git clone --depth 1 https://github.com/swarm-ai-research/swarm

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bv-dispatch

README.md
[![agentmods](https://agentmods.dev/badge/commands/swarm-ai-research/swarm/bv-dispatch/github.svg)](https://agentmods.dev/commands/swarm-ai-research/swarm/bv-dispatch)
Your own site
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/bv-dispatch"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/bv-dispatch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bv-dispatch

Your own site · 80×15
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/bv-dispatch"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/bv-dispatch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,219 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.05219
Opus 5.5 $0.00014 $0.02088
Sonnet 5.5 $0.00007 $0.01044
Haiku 4.5 $0.00003 $0.00522

Measured 1mo ago against content hash a9fc221383ce, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

bv-dispatch scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/bv-dispatch.md · 331 lines

How it starts

The opening of the file, as written. The whole thing — 331 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Mode

Arguments: $ARGUMENTS

  • (no mode) — full dispatch: analyze, publish per-track ranked digests to the channel, stamp assignee-free rationale on shortlisted beads; push ASSIGN mail only for strategic beads (critical path, epics). Agents pull from their track's digest at claim time (beads-x3q7 — see "Pull-model delivery").
  • plan — analysis and assignment table ONLY. Zero writes: no bead comments, no dependency edges, no mail. Safe to run anywhere.
  • hygiene — run only the hygiene pass (step 5): cycles, orphans, stale in-progress beads, missing edges. Propose fixes; apply only bd dep add / comment fixes the operator approves.
  • retro — grade the last dispatch: find rationale comments from previous runs (they contain predicted unblock counts and metric values), compare predictions against what actually closed/unblocked since, and report prediction accuracy. This is how the dispatch policy learns whether its graph theory is working. Also produce the MUD LEDGER (Foote & Yoder, Big Ball of Mud):
    1. Entropy ratio — beads closed by consolidation work (hygiene, sweeps, cleanup, test/CI fixes) vs new beads opened, since last retro. A rig that only expands is building a shantytown; report the ratio and trend.
    2. Rug audit — find results flagged "machinery validation only", mock-based numbers, or similar cordons in bead comments; verify nothing downstream cites them as real measurements. A rug becomes load-bearing silently.
    3. Shearing-layer check — fast-layer defaults (library constants, tool versions, config defaults) that have drifted against slow-layer commitments (prereg locks, frozen schemas, append-only principles). The pattern: grep frozen/locked/prereg commitments, compare each to the current default it constrains. Every hit is a naa8-class incident waiting.
    4. Orphan influx (Morgenthaler et al., "Searching for Build Debt", MTD'12: make the default the right thing) — of beads created since last retro, what fraction arrived with zero edges? The wrong default (edgeless creation) is a debt factory; sweeps and sessions should file with discovered-from/blocks edges at creation time. Report the fraction, name the worst offender source, and propose the default-side fix (creation-time nudge or template) rather than another cleanup pass.
    5. Gate execution audit (erdos-1038 lesson: verification-shaped ≠ verified; docs/research/erdos-1038-swarm-lessons.md) — for each bead closed as verified/tested since last retro, confirm the actual gate ran: test output or run-folder path in a comment, CI run that executed (not just a lint/regex proxy job), benchmark numbers from a real invocation. Distinct from the rug audit: a rug is a cordoned mock cited as real; a phantom gate is a verification step everyone believes ran and never did. Where the bead carries a WARDS: stamp, check the DONE against that stamp's negative_spec list (python -m swarm.agentgit wards show <id>) rather than against the prose; a "flag pinned, behaviour not exercised" gate (Cantrip lesson 4) counts as phantom, one notch above "job never dispatched". Also audit blocked-bead reopenings: each must name the materially new mechanism that justified reopening (see analysis step 6).
    6. Uses-hierarchy audit (Parnas & Clements 1986, "fake the rational process"; docs/research/classic-essays-swarm-lessons.md §4) — for each epic opened or closed since last retro, does its DESIGN field name what its children depend on OUTSIDE the epic (beads, modules, frozen schemas)? A pointer to an external report does not count. Every dispatch mistake in retro 1 traced to an undeclared dependency, and the one epic that later needed a hand-added edge (36t6) had a pointer-only design. Report the fraction with a uses hierarchy; file the fix on the epic, not on the children.
    7. Cusp ledger (Conklin 1992; same note §6) — list every bead that entered blocked or passed its due since last retro, and whether a CUSP comment (template below) was posted within 24h with an owner answer. A slip with no cusp comment is a slip nobody re-planned. Also run the Conway audit over the window (python scripts/conway_audit.py --since <last retro date>) and record its UNNEGOTIATED list; each hit is either a missing edge (fix: bd dep add) or a missing owner (fix: bead ref in the commit).

Read the full file on GitHub · 331 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago Changed · +88 lines a9fc221383ce
  2. 1mo ago Changed · +21 lines a5b18d20de86
  3. 1mo ago First seen · 222 lines · 35 tokens per session scan A 38b8531dcacf

Subscribe to this mod's changes

bv-dispatch is a command published in the GitHub repository swarm-ai-research/swarm (48 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 5,219 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.