Orchestration patterns
Every pattern Gantry ships — what each declares, what it takes, and its whole text as the annotated program it already is.
build
The default milestone build: decompose a plan into ordered milestone briefs, then build each milestone as the shared milestone unit. Use for an ambitious plan larger than one work unit; the omakase route a flagless `gantry <plan>` takes.
| parameter | default | what it is |
|---|---|---|
|
plan_source
string takes the run's plan |
plan.md | The plan prose or source path the milestone planner reads (the run's plan for a top-level build; goal's per-cycle plan when build runs as a sub-pattern). |
milestone
One milestone: plan a unit into sprints, author and ground its gate, then run each sprint through the included `sprint` pipeline — execute → gate → one bounded fix → re-gate → review → commit — with a bounded recovery ladder. Invoked as a sub-pattern by build (per milestone) — not selected directly.
| parameter | default | what it is |
|---|---|---|
|
baseline_relaxed
string |
false | "true" to skip the baseline-green grounding while keeping per-sprint gates; "false" for build. |
|
plan_source
file |
plan.md | The plan prose the briefer and planner read for this unit. |
|
prompt_prefix
string |
— | Optional prefix for prompt ids this shared unit resolves, e.g. design/briefs/. |
|
review_prompt
string |
review | Prompt id for the review stage; pass-specific gated units may provide their own. |
sprint
One sprint's gated pipeline: execute → gate → one bounded fix → re-gate → review → re-gate → post-review repair-or-revert → commit. Composed into `milestone`'s sprint loop by an `include` step — material for an includer, never selected or run on its own.
Declares no parameters.
map
Map fan-out: enumerate a work list and run a per-task pipeline concurrently across a worker pool, with per-task repair, systemic thresholds, and checkpoint QA. Use for embarrassingly-parallel batch work over a spec-defined roster.
| parameter | default | what it is |
|---|---|---|
|
map_spec
file takes the run's plan |
— declares no default | The map spec or prose source used to produce the fan-out roster. |
|
worker_pool_width
string |
— | Optional operator override for the number of worker slots the fan-out may drain concurrently. |
|
slice_args
string |
— | Opaque arguments forwarded to the map roster enumerator. |
goal
Goal loop: freeze an acceptance check, then repeat a cycle — compose a gap plan from the goal-check output, build that whole plan, re-check the goal — until the frozen goal goes green, two cycles plan no work, or the cycle ceiling is hit. Use for a moving target expressed as an executable acceptance check rather than a fixed plan; the recursive built-in that reuses the whole build as its cycle body.
| parameter | default | what it is |
|---|---|---|
|
goal_source
file takes the run's plan |
— declares no default | The acceptance goal file frozen before the goal loop starts. |
|
test
string |
— | The optional baseline test command that must stay green during the goal run. |
|
max_cycles
string |
18446744073709551615 | The optional cycle ceiling before the loop stops resumably. |
ralph
Ralph loop: repeat one standing prompt until the agent writes the loop_done channel or the iteration ceiling is hit. Use for open-ended maintenance driven by a single standing instruction, with the filesystem and git as the loop's memory.
| parameter | default | what it is |
|---|---|---|
|
prompt
file takes the run's plan |
— declares no default | The standing prompt repeated each iteration. |
|
max_iters
string |
100 | The iteration ceiling before the loop stops resumably. |
|
quiesce_after
string |
2 | The empty-iteration threshold retained for fixed-flag binding parity. |
|
effort
string |
— | The harness effort hint applied to each iteration agent when supplied. |
Which copy of a pattern wins
Pattern registry tiers — 3 rows exported from
src/engine/pattern_language.rs
| tier | shown as | consulted |
|---|---|---|
| project | project | 1st |
| global | global | 2nd |
| bundled | built-in | 3rd |
Extra and experimental patterns
careful
declares the name map
Map fan-out: enumerate a work list and run a per-task pipeline concurrently across a worker pool, with per-task repair, systemic thresholds, and checkpoint QA. Use for embarrassingly-parallel batch work over a spec-defined roster.
| parameter | default | what it is |
|---|---|---|
|
map_spec
file takes the run's plan |
— declares no default | The map spec or prose source used to produce the fan-out roster. |
|
worker_pool_width
string |
— | Optional operator override for the number of worker slots the fan-out may drain concurrently. |
|
slice_args
string |
— | Opaque arguments forwarded to the map roster enumerator. |
design
Two-pass additive page design: write one design brief per listed surface, then build one real page per committed brief through the shared milestone unit. Use when existing pages should inform and constrain the new design.
| parameter | default | what it is |
|---|---|---|
|
pages_source
file |
pages.md | The surface index for the design run. |
redesign
Two-pass clean-slate page redesign: blank existing listed surfaces, write one design brief per surface, then build one real page per committed brief through the shared milestone unit. Use when existing pages should not anchor the replacement design.
| parameter | default | what it is |
|---|---|---|
|
pages_source
file |
pages.md | The surface index for the redesign run. |
steady
declares the name map
Map fan-out: enumerate a work list and run a per-task pipeline concurrently across a worker pool, with per-task repair, systemic thresholds, and checkpoint QA. Use for embarrassingly-parallel batch work over a spec-defined roster.
| parameter | default | what it is |
|---|---|---|
|
map_spec
file takes the run's plan |
— declares no default | The map spec or prose source used to produce the fan-out roster. |
|
worker_pool_width
string |
— | Optional operator override for the number of worker slots the fan-out may drain concurrently. |
|
slice_args
string |
— | Opaque arguments forwarded to the map roster enumerator. |
3 patterns —
careful, map, steady
— declare the header name map.
Their declarations are the same 105 lines of TOML
apart from
1 line.
| pattern | line 100 of the declaration |
|---|---|
| careful | condition = { kind = "counter-threshold", counter = "consecutive_faults", threshold = 1 } |
| map | condition = { kind = "counter-threshold", counter = "consecutive_faults", threshold = 2 } |
| steady | condition = { kind = "counter-threshold", counter = "consecutive_faults", threshold = 3 } |