Iterate Until Green
Pin a goal + verifiable check; loop attempt → test → diagnose → fix until the check exits 0.
Overview
Implements goal-driven-loop/SKILL.md. The user supplies a goal and a verifiable shell check (a one-liner that exits 0 on success, non-zero with diagnostic output on failure). The model runs an outer loop: attempt → run check → if fail, read failure output, propose surgical patch, apply, retry. Capped at 10 iterations to avoid runaway. Best for build/test/typecheck driven work.
When to use this
- user wants something to 'just work' and has a clear pass/fail criterion
- user says 'make tests pass' / 'get this building' / 'fix until typecheck is green'
- open-ended task where the only spec is a runnable verification
When NOT to use this
- no verifiable check exists → ask the user for one first
- task is a single bug fix → use minimal-patch directly
Example prompts
Inputs and output
Inputs
| Field | Description |
|---|---|
goal | what success looks like in one sentence |
check_command | shell one-liner that exits 0 on success |
Output
Iterations taken, final check output, list of files touched.
Runtime profile
What the engine commits when this skill runs.
| Property | Value | Meaning |
|---|---|---|
| Model tier | sonnet | The balanced default model class. Trades quality against cost for the vast majority of skill runs. |
| Cost class | standard | The balanced default model. Right for most skills. |
| Turn budget | 20 | Hard cap on tool-calling iterations before the engine forces a final answer. |
| Execution | synchronous | Runs inside the live turn; result lands in the same response. |
Under the hood
Tools the engine exposes to this skill and integrations it needs.
| Resource | Kind |
|---|---|
shell_exec | tool |
shell_read | tool |
shell_write | tool |
Tags: engineering, iterate, verify
Execution template
Shell tools dispatch via a command template. The model substitutes user inputs into the placeholders before firing the underlying tool.
Invoking this from an agent
Three paths reach this skill. From the chat UI, a user can type the persona slash command followed by a natural request and the discovery step resolves to this skill automatically. From the MCP server, fetch the skill detail with get_skill({id: "iterate-until-green"}) and then invoke it through the agent runtime once the authenticated tier ships. From your own code, hit /docs/skills/iterate-until-green/llm.txt for the token-efficient markdown body and feed it to your model directly.
Accept: text/markdown. The full machine-readable catalog lives at /.well-known/agent-skills/index.json.