| name | sling-dispatch |
| description | Instruction dispatch pipeline for routing work items to available agents. Implements a 7-stage fetch-allocate-prepare-hook-store-launch-confirm pipeline with batch convoy mode, formula expansion, idempotent dispatch, and crash recovery. |
| format | "2025-10-02T00:00:00.000Z" |
| version | 1.0.0 |
| status | ACTIVE |
| updated | "2026-04-25T00:00:00.000Z" |
| triggers | ["mayor needs to assign work items to available polecats","convoy of beads is ready for dispatch to a rig","formula template needs expansion into ordered dispatch steps","partial dispatch needs recovery after a crash or session restart"] |
| references_subdir | true |
| word_budget | 800 |
Sling Dispatch
Instruction dispatch unit for the Gastown chipset. The sling routes a work item (bead) to an available polecat through a 7-stage pipeline. In hardware terms, the sling is the instruction fetch-decode-dispatch unit — it sets up the conditions for execution and confirms the dispatch was recorded, but does not execute work itself.
Activation Triggers
This skill activates when:
- The mayor needs to assign work items to available polecats
- A convoy of beads is ready for dispatch to a rig
- A formula template needs expansion into ordered dispatch steps
- A partial dispatch needs recovery after a crash or session restart
The 7-Stage Dispatch Pipeline
Every dispatch flows through seven stages in strict order. Each stage completes before the next begins. If any stage fails, the pipeline halts at that stage and the partial state is recoverable.
| # | Stage | Purpose |
|---|
| 1 | Fetch | Resolve bead ID to a work item; reject anything not in open status (idempotency). |
| 2 | Allocate | Select an idle polecat from the pool, or spawn a new one if the pool has capacity. |
| 3 | Prepare | Set up the polecat's isolated workspace (worktree + execution context). |
| 4 | Hook | Set work item status to hooked and bind it to the polecat. Idempotency boundary. |
| 5 | Store | Write dispatch arguments to durable state so a crash after this point is recoverable. |
| 6 | Launch | Start the polecat's agent session and send assignment mail. GUPP activates immediately. |
| 7 | Confirm | Record the bead-to-agent assignment in convoy tracking and notify the witness. |
Full TypeScript implementations live in references/pipeline-implementation.md.
Batch Mode
When more than batch_threshold beads (default: 3, configurable in chipset YAML at dispatch.batch_threshold) target the same rig, the sling automatically batches them into a convoy and dispatches in parallel. The batch detection groups beads by target rig; groups exceeding the threshold become convoys. Dispatches within a batch run in parallel up to max_parallel. Convoy progress updates after each individual dispatch confirms.