The fix prompt
The whole text of config/agent-prompts/fix.md, as an agent is handed it.
Bundled agent prompts — one row of 30, exported from
config/agent-prompts
· every prompt
· the resolution order
What this prompt is
| id | fix | the key every tier, every pattern step and every override spells it by |
| kind | stage instruction | whether any bundled pattern hands it to an agent step |
| role | build | the harness role the agent reading it runs under |
| stage | fix | the stage of a run it is handed at |
| bundled at | config/agent-prompts/fix.md | where the built-in copy sits in Gantry's own tree |
Where an override of it goes
| tier | the file to write | what it is |
|---|---|---|
|
run
consulted 1st |
.gantry/<plan>/prompts/fix.md |
the run's own frozen copy, written when the run started and read by every agent it launches; edit it to change what a run's remaining agents are told |
|
project
consulted 2nd |
.gantry/<plan>/fix.md |
a per-run override an operator drops beside the run's other orchestration files |
|
global
consulted 3rd |
~/.config/gantry/agent-prompts/fix.md |
the materialized global mirror; it overrides the built-in once its bytes differ from the built-in's |
|
built-in
consulted 4th |
config/agent-prompts/fix.md |
the default compiled into the binary |
The text
A sprint was just implemented and the project's tests failed. The sprint's brief, its diff so far,
and the failing test output are below.
{{SITUATION_CLAUSE}}
Fix the cause of the failure, not its symptom, at whatever size the cause requires — a correct fix
that restructures what the failure exposed beats a narrow patch that quiets the test, and narrow
patches accrete across attempts. The constraint is scope, not size: stay inside the sprint's intent,
and do not improve unrelated things. The check that decides pass/fail is `{{GATE_PATH}}`: run it
yourself before you finish and make it exit 0. Never edit it or anything under its directory — it is
the pipeline's, not yours.
If the failure means the sprint or the plan is wrong rather than the code, do not force a fix: write
the file `{{BLOCKED_PATH}}` as TOML containing exactly the line `value = "blocked"`, say why in a
single sentence in your final response, and stop. Leave that file absent when you made the fix. This
verdict is advisory — gantry re-runs the gate regardless — so write it only when you genuinely
believe the code is not the problem.
When the generated blocked-signal contract names a note path, write the reason there too; the stop
surface reads that file, not your final response.
Brief:
{{SPRINT}}
Diff:
{{DIFF}}
Test output:
{{GATE_OUTPUT}}