Loop/ralphTestinglow riskintermediatesafety B · 80X

Backlog-clearing loop with a separate verifier

The four-settings loop template: a separate verifier model that never shares context with the writer, a hard stop rule, a state file re-read each cycle, and worktree isolation. Point it at a checkable backlog and let it run overnight.

Prompt
→ Claude Code
GOAL: every test in [/tests/TARGET] passes, lint is clean, zero type errors. EACH CYCLE: 1. run the suite, read every failure 2. pick the single highest-impact failure 3. write the smallest change that fixes it 4. re-run tests + lint + type check VERIFY: a separate model instance checks the goal — never the writer. Verifier prompt: "You are a verifier. You did not write this code. GOAL: <the exact goal string>. Given the diff and the test output, answer ONLY: PASS — every condition in GOAL is objectively met, with evidence, or FAIL: <the specific condition not met, and the evidence>. Do not fix anything. If unsure, FAIL." STOP WHEN: verify passes, OR after 10 iterations, OR $5 spent, OR no progress in 2 attempts. ON BLOCKER: log it, skip to the next item, never halt the whole loop. STATE: append done / failed / next to a state file, re-read it at the top of every cycle. ISOLATION: one git worktree per subagent.
claude-code

Implementation note

Near-verbatim from the source article's copy-paste template (structure and verifier prompt verbatim; target path parameterized). The verifier-never-shares-context split is the load-bearing setting: the writer is optimistic, the verifier is skeptical. Source claims ~340 cycles/7 days at ~$2.30 per accepted change; treat the numbers as anecdote, the shape as sound.

Source: Mnilax ↗graded B · 80/100 — how grades work (Safety Score v2) →

/goalTestingmedium risknew

Fix the flaky checkout test

Run checkout tests repeatedly until 20 consecutive passes, logging failure modes and hypotheses after each iteration.

prompt
→ Claude Code
/goal Reproduce and fix the flaky checkout test so it passes 20 consecutive runs, verified by npm test -- checkout, while preserving checkout API behavior and existing correctness tests. Use the checkout test files, checkout service code, fixtures, and related logs. Between iterations, record the observed failure mode, hypothesis, change, and rerun result. If reproduction stays unavailable or valid paths are exhausted, stop with reproduction attempts, logs, most likely absent condition, blocker, and next input needed
/goalTestingmedium risknew

Fix flaky tests, get CI green

Run an agent to identify and fix flaky tests until your CI pipeline passes completely.

prompt
→ Claude Code
/goal fix all flaky tests and make CI green in a new chat. Pair it with a custom mode to follow a playbook, or /loop for recurring check-ins
/goalTestingmedium risk

Reach a coverage target

Add focused tests for the least-covered files and re-measure each turn until coverage hits 80 percent or the turn cap.

prompt
→ Claude Code
/goal test coverage is at least 80% with all tests passing — add focused tests for the least-covered files, re-run coverage each turn, stop at the threshold or after 12 turns