Swarm management

  1. What a swarm is here
  2. The rule that matters most
  3. Most “parallel” work is not
  4. Sizing
  5. Stopping early
  6. What is not built

Started, not finished. #223 comment 14:48 asks for a whole skill set covering model levels, swarm size and CPU, and for this page to exist. The skill is swarm-management; this page is the reader-facing summary and the record of what is not yet built.

What a swarm is here

Several agents working one goal in parallel, each against a disjoint slice of the corpus, rolling up into one parent bean. It is the most expensive tool the harness offers.

The rule that matters most

An agent must ask before starting a swarm, every time. It spends the author’s tokens, and permission is per swarm rather than standing — “yes” to one fan-out does not authorise the next.

When asking, an agent gives three numbers: how many agents, at which model level, and the rough cost relative to doing the work serially.

Most “parallel” work is not

situationwhat to do
one file at a timeserial — a swarm cannot make one edit faster
the parts share stateserial — parallel writers to one file is a self-inflicted merge
not yet decomposeddecompose first — N agents will otherwise discover the same thing N times
two or three independent partssub-beans, run in order
many independent parts, disjoint inputsa swarm is justified

The decomposition is the work. If you cannot write down N units with non-overlapping inputs and separate outputs, you do not have a swarm shape.

Sizing

dimensionguidance
sizestart at 3; above 6 only for genuinely disjoint slices; past ~10 coordination and token cost outgrow throughput
model levelmatch the hardest judgement in a unit, not the average — mixed swarms (small workers, one large reviewer) are usually right
CPUbounded by the box; if units shell out to a build or solver, that tool’s parallelism is the real limit
wall-clockbound every unit — an unbounded unit is an unbounded swarm

Stopping early

If the first two units disagree about something structural, stop: the decomposition was wrong, and the remaining units will reproduce the disagreement at full price.

What is not built

This page and its skill are written ahead of the tooling, and that is worth stating plainly rather than leaving a reader to discover it:

  • No swarm runner enforces the sizing above. dispatch-agent covers the mechanics of dispatching background agents; nothing checks the count, the model level, or the slice disjointness.
  • No per-unit wall-clock bound exists, so “bound every unit” is currently a discipline rather than a mechanism.
  • No cost estimate can be shown to the author at the moment of asking, which is exactly when they need it — so the ask is qualitative today.
  • No sub-bean hierarchy. TodoItem has related[] but no parent, so the roll-up this page assumes is done by convention. See the minimum cat-harness analysis §”User todo management”.

Closing those is what would turn this from guidance into a guardrail.


folio-assistant — code under the Apache License 2.0, documentation under CC BY 3.0. Generated schema and API references are rebuilt from source on every push to main.

deployed dev