skip to content
Replays

Runs That Build Until a Goal Passes

Point Gantry at a check and let it plan, build, and re-plan until that check turns green.

Gantry milestones

5 milestones 30 sprints 74 agents

18 plan 29 execute 35 review 4 fix

240k peak context

144k median execute

Building the verification-driven goal and loop run system.

12h 39m total 16m 40s per sprint

12m 30s plan 3h 39m execute 2h review

393 edits 2.6k commands

codex harness

This job changed Gantry from a system that only built a supplied plan into one that can be aimed at an executable target. The work added a shared test and goal model, an amber verdict for unfinished goal checks, and the driver machinery for campaign-shaped goal runs and iteration-shaped loop runs.

The decomposition spends its early milestones on foundations and refactors before any new user-facing mode appears. The goal driver then proves the full-campaign loop, the loop driver adds repeated fresh-agent iterations, and the final milestone updates the public web and documentation surfaces. Some public positioning has changed since this run, but the engine modules for goal checks, loop execution, progress descriptors, partial merge, resume, and review still stand in the current tree.

How this walkthrough is structured

Feature

What did the run build and ship?

Gantry gained frozen goal checks, amber results, campaign loops, Ralph-style iterations, and review-gated completion, with the core code still present even where the website framing later changed.

Build

How did Gantry structure the work?

The run put shared verification and campaign seams ahead of the new drivers, then let the later goal and loop milestones expose exactly where live progress, resume, and public copy needed correction.

Milestone 1

Verification Foundations

5 sprints 13 agents 1h 14m wall time 173k peak context

The shared pieces are still visible in the tree. `src/engine/tiny_config.rs` owns the small parser, `src/engine/goal.rs` holds front matter, polarity, command verification, and snapshots, and amber is represented through domain and event paths. Ordinary builds still keep goal vocabulary behind explicit job kinds.

This milestone carried only prerequisite verification work, which kept it independent of any new command flag. Its briefs were narrow enough for fresh agents because each sprint took one layer of the future goal model: parsing, verdict transport, rendering, polarity, then snapshots. The run stayed green here, so the boundary behaved like infrastructure rather than feature work.

Shared Config Parser

2 agents 16m 14s wall time 109k peak context

`src/engine/tiny_config.rs` remains the common lexer for Gantry's small config formats. The goal module calls it for prompt front matter, and other build code can keep format-specific validation outside the parser. The surviving tests around plan sources and front matter indicate this was folded into the normal configuration path.

This sprint removed duplicated tiny key-value parsing before goal front matter depended on it. The brief gave a fresh agent a compatibility task with a clear boundary: move existing consumers to one parser while preserving old edge cases. It passed without a recorded repair, which fits a refactor whose proof was byte-for-byte behavior.

Amber Domain Transport

2 agents 9m 50s wall time 144k peak context

Amber survives as a normal command verdict and event value rather than a UI-only color. Goal and loop code can publish an unfinished acceptance check without calling the run red, and replay or attach consumers receive a structured value. That distinction is now part of the engine vocabulary the later drivers use.

This sprint gave later agents a real verdict to pass around instead of asking them to encode unfinished work as failure text. The scope stopped at types, serialization, history, and attach transport, so it could be proven before any producer existed. Its boundary stayed green because the sprint was explicitly required not to make existing jobs emit amber.

Amber Replay Rendering

2 agents 12m 32s wall time 153k peak context

Current output paths still treat amber as an unfinished goal state, not as a failed gate. The goal and loop surfaces can show amber checks in ledgers, replay, and operator output, while ordinary run kinds do not gain amber wording by accident. That separation is the visible half of the shared verification model.

After transport could carry amber, this sprint owned the observable side. Its task was small enough for a clean agent because it dealt with replay, headless output, JSON, and TUI presentation for a synthetic state, not with goal execution. The gate stayed green, so amber rendering was proven before any real run emitted it.

Shared Verification Polarity

2 agents 13m 43s wall time 113k peak context

`src/engine/goal.rs` still documents the polarity split directly: test commands pass on a successful exit, while goal commands are amber until the acceptance check succeeds. The same module returns captured output with the classified verdict. Later goal and loop code consume that result instead of parsing logs.

This sprint turned command checking into a polarity-aware operation. A fresh agent could hold it because the work was the shared command core, not the drivers that would later schedule campaigns or iterations. The green boundary mattered: existing gate baseline behavior had to remain the same while goal polarity became available.

Goal Frontmatter Snapshot

2 agents 15m 18s wall time 173k peak context

The goal snapshot machinery still lives in `src/engine/goal.rs`. It copies simple repo-local scripts into a run-owned snapshot and records shell commands honestly when their dependencies cannot be frozen. Goal and loop startup paths use that snapshot rather than trusting a worktree file after agents have edited it.

This sprint finished the reusable goal module without exposing goal mode at the CLI. The boundary was concrete: parse the new keys, preserve existing sprint metadata, and freeze the goal command Gantry can freeze. It remained green, giving later driver work a tested anti-cheat rule to rely on.

Milestone 2

Campaign And Build Refactors

6 sprints 16 agents 1h 11m wall time 140k peak context

The campaign and driver seams remain distributed across the build engine. Milestone execution is still represented separately from goal and loop drivers, plan sources are explicit, partial merge is driver-capability based, and progress descriptors have their own module. The old standalone sprint-driver file is gone, matching the public retirement of the forced flat entry point.

This milestone reshaped existing build machinery so new drivers would not be special cases. Most sprints were behavior-preserving seams, but the progress descriptor sprint came back from the ledger as a failed first cut and was retried after its scope was narrowed to rendering. A historical plan-impact note then carried the live descriptor work forward to the goal driver, marking a boundary the run had not finished yet.

Campaign Core

3 agents 13m 6s wall time 140k peak context 1 replan

The milestone driver and build context still expose campaign execution as a reusable part of the engine. Goal runs can build nested campaign work instead of inventing another build path. The current tree has refactored around that boundary, but the feature is still observable in the goal driver using ordinary campaign planning inside cycles.

This sprint extracted the reusable middle of a milestone-planned build from run setup and final landing. It was a manageable cut because existing milestone behavior supplied the regression oracle while the new primitive ran under a caller-supplied orchestration area. A replan ran after review, showing that this seam affected how remaining work should be described even though the gate itself stayed green.

Plan Source Synthesis

2 agents 6m 16s wall time 92k peak context

`src/engine/build/plan_source.rs` still exists and plan-source tests remain in the build suite. The goal driver can compose a cycle plan inside the run directory while preserving the outer run identity. That is the mechanism that lets a goal run plan from captured goal output without becoming a different run on resume.

This sprint separated the user's run identity from a plan file synthesized inside the orchestration area. A fresh agent could verify that without needing the future goal loop: synthesized plans only had to feed the campaign primitive while resume continued to resolve through the original invocation. The run recorded no stress at this boundary.

Partial Merge Support

2 agents 12m 56s wall time 132k peak context

Current command code still reports partial merge as a capability supported by map, goal, and Ralph-style loop drivers. The build job model exposes driver capabilities, and the finalization code uses shared merge handling for live and stopped runs. Goal and loop partial merge behavior now builds on the seam created here.

This sprint moved partial merge from a map-only check into a per-driver capability. The work was bounded by keeping map behavior as the only active yes while every other driver still refused honestly. That made the future goal and loop opt-in a small interface decision rather than a rewrite of merge safety.

Progress Descriptors

2 agents 7m 37s wall time 138k peak context

`src/progress_descriptor.rs` is still the central rendering type for sprint, iteration, and custom progress. It supplies strings for window titles, list and status views, TUI output, and stats surfaces. The live emission part was not left here; later goal work completed that producer path.

This is where the refactor milestone pushed back. The first attempt failed and was re-scoped to a rendering seam only, with live event, codec, journal, and replay wiring explicitly moved into the goal milestone. That made the retry small enough for a fresh agent: prove all existing surfaces can render one descriptor type without yet changing the event source.

Parameterised Reviewer

2 agents 17m 46s wall time 136k peak context

The separate milestone-review prompt is absent from the current tree, and the reference documentation points at a shared review prompt. Goal and loop review code can ask for different review levels without maintaining separate prompt files. The feature that remains is less visible as a file and more visible as one review contract.

This sprint unified review prompts by making altitude an explicit parameter. The boundary stayed clear because sprint review could keep edit-capable behavior while milestone review remained read-only, both using one trailer parser. The run recorded a green result, giving later cycle and run review work a shared review surface.

Retire Sprint Entry

2 agents 9m 1s wall time 104k peak context

The current command surface no longer presents forced flat sprints as a public mode. Legacy flat runs can still resume through retained compatibility paths, while new ordinary builds route through milestone planning. That matches the later goal and loop design, where explicit flags are required for nonstandard drivers.

This sprint changed the public starting surface while preserving legacy resume. It was deliberately mechanical: hide the forced flat-build front door, warn for deprecated aliases, and keep the flat pipeline as internal machinery. The green boundary meant later drivers could assume milestone planning was the normal entry path.

Milestone 3

Goal Campaign Driver

8 sprints 28 agents 2h 58m wall time 240k peak context

The current tree still contains `src/engine/build/driver_goal.rs` and extensive goal-driver tests. Goal jobs validate front matter, snapshot acceptance checks, compose cycle plans, run ordinary campaigns, resume from durable cycle artifacts, partially merge completed cycle work, and review before final landing. Public spelling has drifted so `--loop` is now the headline campaign command and `--goal` is an alias.

This milestone was the first new job type, and it inherited every seam built earlier. The stress landed where the milestone brief predicted: live progress descriptor wiring and goal startup both triggered replan or repair work, while later cycle, termination, review, and surface sprints composed over the same foundations. The cut let failures stay local to driver integration rather than reopening the verification model.

Live Progress Labels

8 agents 23m 50s wall time 195k peak context 6 replans

Driver-supplied progress descriptors now survive beyond rendering helpers. The attach and replay paths can carry custom goal-cycle labels, while current sprint and map output remains formatted through the same descriptor type. In the live tree, this is the path that lets non-sprint-shaped work appear without special front-end inference.

This sprint inherited the unfinished half of the progress descriptor seam. It had to move descriptors through live events, durable history, attach, replay, and front-end folds without changing legacy progress text. The run facts show repeated errored replan attempts attached to this sprint after it completed, which marks live progress as the hardest boundary in the goal driver.

Startup Flow

3 agents 28m 8s wall time 114k peak context 1 fix 1 replan

Goal startup is still modeled as an explicit job kind in `src/engine/build/job.rs` and implemented in the goal driver. The code distinguishes goal specs from ordinary builds, persists enough configuration for resume, and handles the already-satisfied baseline case without launching agents. Current command parsing keeps goal mode self-authorizing through explicit flags.

This sprint established the goal job identity before any cycle work existed. Its boundary crossed flag parsing, mutual exclusion, baseline test and goal verification, job persistence, and frozen snapshots. The first gate went red and a fix pass was needed, which locates startup validation as real integration work rather than pure wiring.

Cycle Planning

2 agents 11m 10s wall time 109k peak context

Goal cycle planning still creates stored plan inputs under the run's cycle state. The current goal driver can reuse a composed plan on resume and preserve the original run identity even though the inner campaign reads a generated plan. Escaped and multiline goal fields are reconstructed through the job parsing layer before planning logic consumes them.

This sprint made each goal cycle feed the normal milestone planner with a synthesized plan. The unit was small enough because it did not execute the campaign; it only composed, stored, and reused the cycle plan from goal prose, captured output, and previous cycle context. Its green boundary gave the next sprint a deterministic plan artifact to build.

Single Cycle Run

2 agents 18m 5s wall time 173k peak context

The goal driver still delegates cycle work to the normal campaign machinery. Nested ledgers and progress labels represent cycle work without inventing a separate sprint pipeline. That is why later goal features, such as resume and partial merge, can reason about completed cycle artifacts instead of opaque driver-local work.

This sprint proved that a cycle is one ordinary campaign, not a parallel execution model. Its responsibility was to run the synthesized plan through nested cycle, milestone, and sprint ledgers with coherent events and resume behavior. The gate stayed green, so the later loop could add termination policy around a trusted inner campaign.

Loop Stop Logic

3 agents 22m 19s wall time 148k peak context 1 replan

Goal runs now end by re-running the frozen acceptance check, not by trusting the campaign's own report. The current driver distinguishes successful goal completion from amber continuation and from resumable stop conditions. That distinction feeds ledger, headless, and replay output rather than disappearing into a generic failure.

This sprint wrapped the single cycle with goal checks and stop reasons. The work was bounded around termination: green goal, still-amber continuation, empty-plan discrepancy, ceiling, and campaign failure. A replan ran after this unit, showing that the successful cycle loop changed how the remaining review and surface work had to proceed.

Resume And Merge

3 agents 26m 29s wall time 155k peak context 1 fix

Goal resume and partial merge remain in the goal driver and shared finish paths. A stopped run can reuse existing cycle plans, continue unfinished campaigns, start later cycles only from completed amber work, and land completed cycle work without ending the run. Persisted prompt, test, and goal strings are reconstructed before those decisions are made.

This sprint made the long-running goal mode operational. It had to derive resume and partial merge decisions from durable cycle artifacts, not live preannounced rows, because the live roster could name work before it existed on disk. A gate failure after review required a fix, which is consistent with a boundary involving persisted state and merge safety.

Review Levels

2 agents 17m 13s wall time 112k peak context

Goal jobs still run review at cycle and run levels before final merge. The current code uses shared review parsing while keeping read-only guarantees where edits are not allowed. Review concerns can stop final landing even after the executable goal succeeds, which keeps the acceptance check from being the only approval signal.

This sprint placed the shared reviewer at the new goal boundaries. It separated cycle review from whole-run review and made scheduling depend on completed cycle outcomes rather than preannounced rows. The run stayed green here, which suggests the earlier altitude reviewer seam did what this driver needed.

Goal Surfaces

2 agents 24m 5s wall time 240k peak context

Goal-facing operator surfaces still show amber checks and nested cycle progress through the shared event and descriptor paths. The current docs have since renamed the public emphasis, but the command table still includes `--goal` as an alias. The end-to-end coverage this sprint added has been folded into the larger goal and loop test suite.

This sprint closed the goal driver by wiring it into CLI help, status, list, replay, headless, JSON, attach, and an end-to-end throwaway-repo scenario. Because the engine work already existed, the sprint's boundary was mostly surface coherence and broad integration proof. It stayed green, making the milestone publishable as a complete job type.

Milestone 4

Loop Iteration Driver

8 sprints 20 agents 2h 37m wall time 187k peak context

The current tree still contains the Ralph-style loop driver in `src/engine/build/driver_loop.rs`, though public naming now uses `--ralph` for that simpler iteration mode. It runs repeated fresh-agent iterations, tests each increment, repairs or reverts red work, tracks optional goals, resumes durable state, partially merges green iterations, and surfaces honest stop reasons.

This milestone built the second loop-shaped driver after the goal campaign driver had completed the shared live progress path. Most of the work stayed green because startup, iteration execution, recovery, cadence, termination, resume, and surfaces each had their own sprint. A late replan after review changed the final web and docs instructions so completion would be described as review-gated, not immediately merged.

Job Startup

2 agents 18m 56s wall time 186k peak context

Loop startup is still explicit in the job model and loop driver. The current code persists prompt, test, goal, and control settings, rejects conflicting job selectors, and accepts open-ended mode only where the loop contract permits it. Plain builds still do not parse goal or loop vocabulary through this route.

This sprint established the loop job contract before any iteration body existed. It reused the shared goal machinery for optional frozen goals and baseline polarity while adding loop-specific validation and durable job identity. The gate stayed green, so later iteration work could assume startup and resume routing were already settled.

Green Pipeline

2 agents 22m 18s wall time 171k peak context

The loop driver still creates sequential synthetic iterations and commits successful work only after Gantry's own verification. Progress descriptors can present iteration-shaped work without front ends pretending it is a sprint roster. Accumulated work carries forward across iterations in the same run worktree.

This sprint implemented the normal iteration path before any red recovery or stop policy. The cut was a single green loop body: fresh agent, invariant test, commit, ledger row, and iteration-shaped progress. Its green boundary gave the next sprint a known-good state transition to defend against regressions.

Red Recovery

2 agents 19m 36s wall time 171k peak context

Red iterations no longer poison later loop work. The current driver gives a failing iteration a bounded repair attempt, reverts unrepaired work to the last verified green state, records the red outcome, and stops only when repeated red results meet the systemic rule. Goal checks are skipped when the repository state has not changed.

This sprint added the safety policy for bad iterations after the green path existed. A fresh agent could focus on bounded repair, revert, red ledger rows, and systemic halt without also inventing iteration execution. The run stayed green, showing the policy composed cleanly over the previous unit.

Goal Cadence

2 agents 18m 24s wall time 144k peak context

Goal-backed loop runs still check the frozen goal at setup and after green iterations. Amber output remains available for the audit trail, and a green goal proceeds through the normal successful-run path. The driver avoids re-freezing or reading a mutated goal file from the worktree.

This sprint attached the frozen goal check to the green iteration path. The invariant test remained the per-iteration safety check, while the goal became the run terminator after committed work. The boundary stayed green because red and empty-diff behavior had already defined when not to spend another goal check.

Sentinel Quiescence

2 agents 17m 27s wall time 187k peak context

The loop driver still distinguishes a worker claim from verified completion. Consecutive sentinel results can end open-ended work, while the same signal with an amber goal becomes a discrepancy. Empty iterations and ceilings have their own stop reasons, which keeps operator output from treating every stop as success or failure.

This sprint added the non-goal termination ladder. It was deliberately separate from goal cadence so open-ended loops could be bounded by sentinels, empty-diff quiescence, ceilings, and discrepancy stops without confusing those outcomes with success. The run recorded no repair here.

Resume And Merge

2 agents 17m 4s wall time 168k peak context

Loop runs can resume after green, red, empty, sentinel, ceiling, and systemic states. Partial merge lands completed green iterations while leaving the run resumable, using the shared merge behavior created earlier. The original frozen goal snapshot remains the reference point after resume.

This sprint made loop state durable enough for interruption and partial landing. The brief tied resume to persisted rows and repository state rather than live-only memory, which kept the task scoped for a fresh agent. The green run boundary meant iteration recovery and termination state could be reconstructed from disk.

Review Surfaces

3 agents 20m 53s wall time 142k peak context 1 replan

Loop runs now surface iteration progress, amber checks, red reverts, and stop reasons through attach, replay, status, list, headless output, JSON output, TUI, and the window title. Successful loop completion includes a run-level review before merge. That review-gated completion story still appears in the current docs and content reference.

This sprint made loop completion pass through the same review discipline as other successful runs and carried loop-specific progress through operator surfaces. A replan ran after the sprint, and the top ledger records its plan impact: remaining public copy had to say final merge follows a usable clean run-level review. That feedback directly shaped the next milestone.

Docs And E2E

2 agents 16m 17s wall time 169k peak context

Loop and goal documentation still explain the shared test, goal, and amber model, though the public names have since shifted toward `--loop` for campaigns and `--ralph` for iteration mode. End-to-end coverage exercises green iterations, red reverts, resume, partial merge, replay, and review-before-merge behavior. The older loop design note is now historical context rather than the main contract.

This sprint finished the loop driver with user-facing command coverage and broad throwaway-repo tests. It was the right final cut because all internal behavior already existed, so the sprint could validate the whole workflow rather than design the loop body. The gate stayed green and closed the driver milestone.

Milestone 5

Web And Docs Surface

3 sprints 11 agents 18m 41s wall time 79k peak context

The current public site has kept the Loop section and command documentation, but not the exact page split this milestone shipped. Map and Design are no longer standalone pages in the live tree; their routes redirect to landing-page anchors, and the old standalone view files are absent. The review-gated completion wording and amber model still appear in the content reference.

This milestone translated the engine work into the website and documentation after the loop review had corrected the completion story. Its first two sprints hit red gates and were fixed, which places the stress in public navigation and Loop-page copy rather than in the docs sync. The milestone was intentionally scoped away from commerce and unrelated web surfaces.

Build Map Design

3 agents 6m 26s wall time 71k peak context 1 fix

The exact standalone split no longer stands at current HEAD. The separate Map and Design page files are absent, and the routes now redirect those paths to anchors on the landing page. Some styling and tests from the web rework remain, but this sprint's feature has been superseded by a later single-page site structure.

This sprint split the old combined mode surface into independent Build, Map, and Design destinations. It was structural website work with clear routing, navigation, view, and style boundaries. The first gate failed and a fix pass followed, locating the difficulty in turning the new page structure into tested Rails behavior.

Build Loop Section

3 agents 3m 57s wall time 56k peak context 1 fix

The landing page still contains a Loop section after Merge and before Map. Its current copy presents `gantry --loop goal.md` as the campaign command, `--goal` as an alias, and `--ralph` as the simpler fresh-agent iteration mode. Amber is still described as unfinished work rather than failure, and the section still says final landing waits for review.

This sprint added the public Loop explanation after the Build page's merge story, with goal campaigns primary and the simpler loop as an aside in the original plan. It carried the review-gated completion correction from the previous milestone, so copy accuracy was part of the task boundary. The first gate went red and was repaired, which fits a prose-and-view sprint where tests protected exact wording and order.

Docs Sync Refresh

2 agents 4m 8s wall time 79k peak context

`web/docs/page-content.md` still documents the Loop section, the goal and Ralph-style command rows, the frozen goal rule, amber language, partial merge, and review-gated completion. The content reference has drifted with the later one-page site, but it still carries the product contract this sprint synchronized. The retired sprint flag does not reappear as a public job type there.

This sprint was the thin follow-through after the web structure and Loop copy existed. It aligned the docs page and content reference with the new command surface, removed the retired sprint flag from user-facing docs, and kept critical links current. The run stayed green, which is what a bounded docs synchronization unit should do when the behavior is already implemented.