dispatch

A coordinator for running several independent, already-validated software specifications at the same time, each in its own Git worktree, which is an isolated copy of the repository.

In plain words
What is it for?
Use it to fan out independent feature or maintenance tasks, check that their file areas do not overlap, and prepare their results for review and merging.
Why use it?
It reduces interference between unrelated changes while checking that the work remains separate. A lead reviews the results and handles the final merge.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/dwarvesf/dwarves-kit/dispatch
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,341 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00041 $0.02341
Opus 5 $0.00020 $0.01171
Sonnet 5 $0.00008 $0.00468
Haiku 4.5 $0.00004 $0.00234

Measured 2d ago against content hash 2c50e3fe8245, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

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 2d 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.

commands/dispatch.md · 134 lines

How it starts

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

You are a cross-goal dispatch lead. Your job is to take N independent specs, run the disjointness gate, fan out one isolated worktree worker per parallel-safe spec, collate their signals, and hand convergence to /kit:ship. You do NOT implement anything yourself and you NEVER auto-merge.

This is the kit's bounded concurrency surface (ADR-0019). It is cross-goal only: it never parallelizes one spec's tasks (/kit:execute stays sequential). The model is flat fan-out + a pairwise gate + a wait-queue, NOT a DAG. Dependent sub-goals that must be sequenced are /kit:mega territory; a real ordering graph (C needs A+B, then D needs C) is the handoff tripwire to GSD v2, not a reason to grow a scheduler here.

Prerequisites

  1. Each input spec is Status: VALIDATED and has a ## Touches section (directory-prefix globs). A spec lacking ## Touches is rejected by the gate (not assumed-empty).
  2. The session runs under bypassPermissions (unattended workers cannot answer prompts; SPEC-032 DEC-009). Worker isolation rides on the worktree + the gate + the drift guard + the human-gated merge, NOT on per-command approval.
  3. Git working tree is clean (uncommitted changes would leak into worktrees).

If any prerequisite fails, say what is missing and stop.

Process

Step 1: Collect the dispatch-eligible specs

Take the specs named in the command argument, or if none given, list docs/specs/SPEC-*.md with Status: VALIDATED and a ## Touches section and ask the user which to dispatch. Show the set before going further.

Step 2: Run the disjointness gate (the moat)

bash lib/gate/dispatch-gate.sh plan <spec1> <spec2> ...

This prints one line per spec: PARALLEL <spec> (admitted to the concurrent set) or WAIT <spec> after <other> (overlaps an admitted spec; serialized into the wait-queue). The gate is conservative: any pair it cannot PROVE disjoint is serialized (over-serializing is safe-but-slower; merges are human-gated, so under-serializing is the only real danger and the gate structurally prevents it). A spec with no ## Touches makes the gate exit non-zero with a REJECT message; fix the spec, do not bypass the gate.

Read the full file on GitHub · 134 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. 2d ago First seen · 134 lines · 41 tokens per session scan A 2c50e3fe8245

Subscribe to this mod's changes

dispatch is a command published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 2d ago), licensed MIT. It adds 41 tokens to every session and 2,341 once invoked, about $0.0002 per session on Opus 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.