Skip to main content
When an xBRIEF plan splits into items that can run at once, the issue’s own work agent acts as the foreman: it works a single linear chain of items itself, and dispatches parallel work only when a wave has more than one dispatchable item. There are two ways it can run that parallel work, described below. Neither is ranked over the other.

Foreman workers

When workers are dispatched

With a single linear chain of items, the foreman works through them itself, one at a time. When a wave has more than one dispatchable item, it dispatches a worker for each one. This only serializes correctly when the plan’s files_scope on each item is accurate, since overlapping scopes are what keeps two workers from racing the same files.

Subagents and pan spawn panes

The foreman has two ways to dispatch a worker: a same-harness subagent running in-harness, or a separate pane started with pan spawn for another harness, or for work the operator should watch directly.

Item worktrees and branches

A pan spawn worker runs in its own item worktree, <workspace>/.swarm/<item>/, on a branch named <feature-branch>-<item>; an existing worktree for the same item is reused rather than recreated. pan spawn --shared is the one exception: it runs the worker directly in the issue’s own workspace, on the feature branch, with no item worktree or item branch. It is for the foreman or an operator only, and is meant for strictly serial use: run at most one --shared worker at a time, since nothing enforces that.

How work comes back

Each worker commits once per item, with Item: <id> and one Item: <id>.acN line per acceptance criterion. Workers do not push, and they do not run pan task done or pan done themselves. The foreman integrates each item onto the feature branch, pushes it, runs pan task done for the item and its criteria, and runs pan done once at the end, after every item is integrated.

Claims and overlapping files

pan task claim refuses to claim an item that a live agent already holds, or whose files_scope overlaps an item a live agent holds. An item whose files_scope_confidence is low refuses any concurrent claim at all. --steal overrides this. It is meant for the foreman or an operator; nothing checks who passes it.

Who can message a worker

Only the issue’s own work pane, the worker’s parent, or an operator conversation may send a message to a worker’s pane.

Gated slot swarm

A plan is eligible for the gated slot swarm when at least two items are slot-eligible (readiness ready, a non-empty files_scope whose files_scope_confidence is not low, and at least one verify_commands and one expected_outputs entry), and at least one slot-eligible item is currently dispatchable (not waiting on an unfinished dependency). A plan with two slot-eligible items that both depend on the same unfinished, unscoped item is not eligible until that blocker clears. A slot runs on its own branch, feature/<issue>-slot-<N>, in its own worktree. pan swarm <id> starts or attaches the foreman; it does not dispatch slot work itself, and it prints that the foreman owns dispatch. It refuses a plan that is not eligible and lists the reasons. When the effective swarm mode is Off, it first stores swarm.policy.mode=always for that issue, so the foreman stays managed. The foreman is what drives slots forward, with pan swarm dispatch, pan swarm wait, pan swarm merge and the rest of the pan swarm subcommands. Settings → Swarming holds the swarm policy for this mechanism: “Automatic selection” (Off, Auto, Always), “Maximum slots per issue”, and “Advance waves automatically” (defaults: Off, 3 slots with a range of 1 to 12, advance on). A project’s own “Automatic swarming” select (Inherit global, Off, Auto, Always) overrides the global setting for that project.

CLI

See pan swarm and pan spawn for the full command and flag tables. pan task claim --steal is the foreman or operator override mentioned above under Claims and overlapping files.

Get help

Join the Overdeck Discord or file an issue on GitHub Issues.