Foundation
One job establishes the canonical contract, storage boundary, or shared interface with focused tests.
Swarming
A Task Program is a pre-planned, end-to-end prompt for work that needs multiple dependent stages. It tells Swarm what can run now, what must wait, when successful commits should be integrated, and how each stage hands off to the next.
Swarm creates Task Programs when appropriate, but you can override that choice by asking, Make me a Task Program
, in Plan mode or the default mode.
Sample Task Program
A Task Program is essentially a pre-planned, end-to-end prompt. Before execution starts, it defines the jobs, their order, the dependencies between them, what each worker must deliver, and the checks each result must pass.
Swarm runs that reviewed program stage by stage. Successful Coder jobs work in isolated worktrees, make scoped commits, and return clean handoffs. Swarm integrates accepted commits before dependent work begins, then reports the final result, commit evidence, and validation in the checkpoint handoff.
Establish the shared contract, build both consumers against it, then audit the integrated feature.
Dependencies: ready · no unfinished child work
↓ Integration barrier Accept the clean foundation commit into the parent.
Dependencies: after foundation · integrated core contract required
↓ Integration barrier Accept both independent commits before audit begins.
Dependencies: after consumers · integrated feature required
When to use one
A Task Program earns its structure when the request crosses material subsystem boundaries, contains several substantial responsibility clusters, or needs a final audit that should begin only after implementation is integrated.
Do not use one for a single cohesive edit, one independent delegated wave, or several alternatives that do not depend on each other. Those are better handled directly, through regular delegation, or through an Iteration Swarm.
“Build the image feature as a Task Program: establish the core contract first, then implement independent API and runtime consumers, then run a fresh-context integration audit.”
Program anatomy
stagesOrdered execution boundaries such as foundation, consumers, and audit. A stage opens only after the stages it depends on reach their integration barrier.jobsBounded assignments with one agent type, title, complete brief, deliverable, acceptance criteria, and dependency evidence.depends_onThe explicit edge between a prerequisite and the job or stage that consumes its accepted, integrated result.owned_scopeThe files or directories a Coder or workspace Designer may own. Managed Designer jobs omit it and return managed artifacts instead.integration barrierThe point where successful prerequisite work is accepted into the parent state before downstream work begins.When a Task Program is attached to an approved checkpoint, that reviewed graph is the execution contract. Swarm loads it directly rather than rebuilding the program from conversational notes.
Three-stage pattern
One job establishes the canonical contract, storage boundary, or shared interface with focused tests.
Independent jobs implement API, runtime, UI, or other consumers against the now-integrated foundation.
A fresh-context job reviews the integrated system, fixes cross-boundary gaps, and records focused validation.
Program: image-feature
foundation
└─ core-contract
consumers (after core-contract)
├─ api-consumer
└─ runtime-consumer
audit (after both consumers)
└─ integration-auditRecovery
Task Programs do not have a resume, redeploy, or continue operation. If a program blocks, Swarm inspects the durable status, verifies the blocker, preserves completed and integrated jobs, and recovers any safely usable child work.
After the blocker is fixed, Swarm creates a new Task Program containing only unfinished jobs. It does not replay completed work or pretend that a failed first attempt succeeded.
Fix an integration conflict or missing permission first, verify the parent state, then launch a new program for the remaining consumers and audit. Repeating the same blocked program without new evidence is not recovery.