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.
/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
claude-code · codex · cursor
Implementation note
Adjust the threshold to your project. Review the generated tests afterward; coverage loops can produce assertions that pass without proving much.
Source: loops! ↗graded C · 65/100 — how grades work →
More testing loops
Build a REST API with tests
Run autonomous iterations to ship a complete REST API with full test coverage until completion is promised.
/ralph-loop "Build a REST API with tests" --max-iterations 30 --completion-promise "COMPLETE
testingmedium risk
Test all endpoints
Run tests against every API endpoint until coverage is complete or you hit 30 iterations.
/goal all endpoints tested or stop after 30 turns
testingmedium risk
Hit acceptance criteria
Drive a feature to done against explicit acceptance criteria: a working paginated endpoint, passing tests, clean lint, and a hard turn cap.
/goal the /users endpoint returns 200 with a paginated JSON body, all tests pass, and lint is clean — stop after 20 turns
testingmedium risk