skip to content
Replays

Environment Bootstrap

Run Briefings Before Worker Prompts

A run-local environment section became part of the worker preamble surface.

Gantry milestones

2 milestones 8 tasks 19 agents

4 plan 7 execute 10 review

230k peak context

141k median execute

A run-local environment section became part of the worker preamble surface.

1h 42m total 9m 12s per task

4m 11s plan 52m 55s execute 21m 25s review

84 edits 664 commands

codex harness

This run built the first environment-bootstrap path for Gantry: a worker-authored briefing, a shared preamble slot for that briefing, and prompt cleanup around the new source of run context. Its own review found that the first milestone had left map and checkpoint prompt paths outside the shared renderer, so the second milestone tightened those consumers before moving documentation and prompt wording around it. The live tree has since changed the original validation idea into a best-effort briefing model, but the preamble composition, map consumer path, prompt catalog, and rendered-prompt coverage still carry the shape this run introduced.

How this walkthrough is structured

Feature

What did the run build and ship?

Gantry now composes worker preambles from known run facts, optional environment prose, and bounded run history, with map and checkpoint workers using the same rendered environment section.

Build

How did Gantry structure the work?

The work was cut as a lifecycle milestone followed by a prompt-surface milestone, with the milestone review forcing the second pass to close bypasses before cleanup.

Milestone 1

Bootstrap Lifecycle

4 tasks 11 agents 1h 4m wall time 230k peak context

The current tree still has the stage, artifact name, preamble placeholder, and composition code that make an environment section available to workers. The original validation contract no longer stands as written: the shipped code treats the authored briefing as best-effort prose and lets the run continue when it is absent or stale. That later change does not erase the milestone's core shape, but it means the surviving feature is composition and reuse, not mechanical proof of every briefing claim.

This milestone was asked to turn an environment briefing idea into a run artifact and preamble input. The split gave early sprints the contracts the later lifecycle and composition work would consume, so each fresh agent could work against a named boundary rather than the whole prompt stack. Two sprint gates were run again after their reviews, which put the pressure around artifact validation and preamble insertion rather than around initial prompt lookup. The milestone review then found that map and checkpoint prompt paths still bypassed the shared environment-aware renderer, and that finding became the reason for the next milestone.

Strict Prompt Rendering

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

Strict prompt filling is still present in the run engine, rejecting malformed markers, undeclared values, and rendered text that still contains template braces. The current tests cover missing and malformed placeholder cases, and the prompt documentation still treats engine-read placeholders as protocol rather than cosmetic wording. Later refactors moved files around, but the fail-loud rendering rule remains part of the prompt surface.

This sprint carried the prerequisite contract: prompt rendering had to fail loudly before later work could trust an environment placeholder. Its brief was narrow enough for one agent because it did not need the artifact lifecycle yet; it only had to distinguish complete rendered prompts from missing or malformed substitutions. The run facts show it passed through its boundary cleanly, which left later sprints able to consume the renderer instead of defending every call site themselves.

Environment Artifact Contract

2 agents 11m wall time 136k peak context

The durable artifact name and write prompt are still visible, and the prompt now tells the briefer to write concise, verified context for the specific work. The validator this sprint planned is no longer the active behavior; current documentation says the briefing is inserted as-is and never stops the run. The surviving contribution is therefore the artifact surface and authoring prompt, while the proof model was replaced by a lighter best-effort contract.

This sprint was asked to define the environment briefing artifact and the validation boundary before any lifecycle code depended on it. That made the hard question explicit: what can Gantry safely reuse as shared context for every later worker. Its gate ran again after review, locating the stress at the contract edge where prompt wording, artifact shape, and deterministic checks met.

Bootstrap Lifecycle

2 agents 22m 50s wall time 230k peak context

The environment-build stage still exists in the domain model and is described as running before later worker work. Tests show a missing briefing can be authored, an existing briefing is reused silently, and a failed briefer becomes a note while the run continues with Gantry's own facts. That is the current lifecycle: existence-keyed reuse and non-fatal absence, not the original rebuild-on-invalid behavior.

This sprint turned the artifact contract into an early run stage. Its boundary was clean because it consumed the renderer and artifact conventions from the previous sprints, then focused on when the briefer runs and what happens on resume. The sprint stayed green through its own gate and review, so the lifecycle was ready for the preamble work without another decomposition change.

Preamble Composition

2 agents 12m 40s wall time 141k peak context

The shared preamble template still carries the environment placeholder, and the engine replaces it with a composed section before workers see their system prompt. That section now includes Gantry's own run facts, optional briefing prose, and bounded run history from ledgers and stage summaries. The rendered preamble remains an inspectable file, so later agents can be audited against the exact context they received.

This sprint connected the validated artifact assumption to the shared worker preamble. It was the point where a local file became prompt context, so its brief centered on placeholder satisfaction and inspectable rendered output. Its gate ran again after review, and the later milestone review showed why: ordinary paths had been covered, but not every worker-style consumer had been brought through the same renderer.

Milestone 2

Prompt Cleanup

4 tasks 10 agents 32m 37s wall time 147k peak context

The live prompt catalog now documents the environment section as worker-preamble material, with map fan-out and checkpoint workers called out explicitly. The tests cover ordinary worker prompts, map workers, checkpoint workers, and preamble-less one-shots as separate cases. Some prompt cleanup has since evolved, so this milestone's durable result is the documented consumer map and coverage baseline more than a perfectly centralized wording surface.

This milestone was a reaction to the first milestone's review note rather than a fresh feature island. It had to centralize worker preamble consumers before deleting duplicated prompt text, so the early sprints proved map and checkpoint paths first and the later sprints handled coverage, ownership cleanup, and documentation. Its final review still recorded a remaining prompt-flow caveat, which makes the boundary honest: the run improved the shared surface, but it did not prove every later mode was finished.

Worker Preamble Intake

2 agents 7m 36s wall time 145k peak context

Map fan-out now resolves its generated spec, builds the environment, and writes worker and checkpoint preambles through the shared renderer. The map code renders the spec's preamble for unit workers and a separate checkpoint system prompt when needed, avoiding a race with the pool's shared preamble file. The prompt catalog describes the same behavior, including the required environment marker for generated map preambles.

This sprint closed the bypasses found by the previous milestone review. Its task was focused on consumers rather than wording: make map fan-out and checkpoint prompt paths render through the same environment-aware preamble route before any cleanup depended on them. It stayed green, which meant the next sprint could write coverage against a real shared path instead of a desired one.

Rendered Prompt Checks

2 agents 9m 13s wall time 147k peak context

The current test suite still has a rendered worker prompt baseline that checks ordinary worker preambles, map fan-out preambles, checkpoint preambles, and preamble-less decoration prompts. Those assertions look for the rendered environment section and for absence of unresolved placeholders. This is the part of the feature that keeps prompt responsibility changes from silently dropping the worker context.

This sprint made the consumer change testable before prose was removed. Its brief asked for a baseline across ordinary stages, map workers, checkpoint prompts, design passes, and intentionally preamble-less one-shots. The unit stayed green, so the later cleanup sprint had a concrete rendered-output net rather than relying on prompt authors to remember where shared rules had moved.

Prompt Ownership Cleanup

2 agents 3m 29s wall time 89k peak context

The live documentation still states the ownership split: worker prompts receive a rendered preamble, while self-contained one-shots do not. At the same time, the current catalog also says active doing prompts deliberately keep some shared orientation wording in agreement, so this sprint's cleanup no longer survives as a pure removal of duplicated text. What remains is the maintained distinction between worker preamble material, role-specific prompt duties, and reader-facing one-shots.

This sprint consumed the coverage baseline and tried to remove duplicated shared-context clauses from role prompts. Its unit was intentionally editorial and bounded: keep role prompts focused on role-specific duties while the preamble carries universal worker context. The run facts show the sprint itself went green, though its recorded commit is folded into later prompt edits enough that today's tree should be read as evolved policy rather than a frozen cleanup.

Docs and Terms

1 agents 4m 14s wall time 60k peak context

The prompt reference and bundled prompt README now describe the environment briefing, the worker preamble templates, map and checkpoint behavior, and the preamble-less utility prompts. They also explain that the environment section is composed from Gantry's own facts plus optional authored prose and bounded run history. The vocabulary is not a complete rename away from gate terminology, but the docs distinguish user-facing test language from compatibility names that remain in stages, files, and historical records.

This sprint wrote down the completed prompt design after the consumer and coverage work had landed. Its brief was deliberately small, covering the prompt catalog, environment-bootstrap wording, and vocabulary around test and gate concepts. It ran at the end because earlier documentation would have described a moving target, and its green result closed the run with the design recorded for later maintainers.