---
name: gauntlet-loop
description: Run reference-benchmarked improvement rounds on an outcome that must match or beat a concrete quality bar — decompose into independently judgeable parts, then loop builder → fresh-context gauntlet-critic on the single biggest gap until parity, diminishing returns, or budget. Use for quality-benchmarked deliverables, not routine maintenance (that is dev-loop).
allowed-tools: Read Grep Glob Bash Write Edit Skill Agent
---

Iterate work against a concrete reference until a fresh-eyes referee calls parity — the Gauntlet Loop (Matt Shumer's method behind "Claude of Duty"). Opus owns routing and acceptance; this skill is the loop discipline.

## Preconditions — refuse to start until all three hold

1. **The bar is concrete.** `docs/REFERENCE_BAR.md` names at least one inspectable reference artifact per part in scope (file, screenshot, URL, sample output, recording) and how to compare against it. An adjective is not a bar; "make it amazing" starts nothing. If the bar is missing, request it from the owner as a decision-ready item — that request never stalls other lanes.
2. **A budget exists.** Max tokens/time per part and for the whole gauntlet, written into the orchestration record and the `docs/GAUNTLET.md` row.
3. **The bar is not gameable.** The referee judges the artifact as a user would experience it; any single metric is supporting evidence, never the target.

## Round protocol (per part)

1. **Decompose once.** Opus splits the outcome into the smallest parts that can be improved and judged separately — coupled work stays one part. Each part gets a row in `docs/GAUNTLET.md`: part, bar reference, budget, status.
2. **Build.** One builder owns the part and returns the artifact plus exact instructions to render/run/see it. The builder never assesses its own round against the bar.
3. **Referee.** Spawn `gauntlet-critic` fresh. Its packet is the part contract, the bar, and artifact access — no builder narrative, no prior round reports (round history lives on the board as one-line entries, not in the referee's context). It returns verdict, single biggest gap, evidence, also-observed list, stop signal. Referee effort is `high`; raise to `xhigh` only for a final parity verdict at the high-risk gate.
4. **Log.** Append one line to Round history in `docs/GAUNTLET.md`: part, round, verdict, gap, spend.
5. **Loop.** The builder's next packet targets exactly the named gap (plus any P0 from the also-observed list). Never pre-commit to a round count — "do three rounds and stop" defeats the method.
6. **Parallelize across parts** freely: different parts may sit in different rounds, with one builder and one referee per part per round.

## Stop conditions (per part)

- **Parity or better** — the referee's verdict says the output matches or beats the bar.
- **Diminishing returns** — two consecutive rounds where the named gap is cosmetic or the improvement is negligible.
- **Budget exhausted** — record the last verdict and open gap on the board; surface to the owner.
- **Recurring gap** — the same gap survives two rounds with no new strategy: park it decision-ready (short options, recommended default) and move to the next part.
- **Boundary** — a round would need a destructive, external, or permission-crossing action: stop and escalate; never proceed on referee authority.

## Endgame

When every part has stopped: run one integration pass (integrator merges, verifier re-runs the full checks) so independently polished parts still work as a whole; apply the normal quality gates for the risk level; and if the per-part bars were partial views, run one final whole-artifact referee round against the bar. Record final verdicts on the board, then compress the outcome into `HANDOFF.md` and `PROGRESS.md` in owner language: what reached the bar, what stopped short and why.

## Guardrails

- Builders never self-grade; referees never see builder narrative; Opus never overrides a verdict without observable evidence.
- Evidence is observable — rendered pixels, command output, test results, a cold read of the finished writing — never a summary of them.
- Consequential actions (deploy, spend, delete, credentials) stay behind explicit owner authorization regardless of loop momentum.
