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.
More testing loops
Stabilize flaky tests for good
Measure the flakiness, fix one root cause at a time, and stop after a defined streak of stable full-suite runs.
Run [test suite] [N] times under the same conditions and list tests whose result changes. Fix the most frequent flake at its root cause—shared state, timing, ordering, or an external dependency—never with a blind sleep or retry. Run that test [N] times, then rerun the full suite. Repeat until [N] consecutive full-suite runs pass, progress stalls, or approval is required. Return each flake, root cause, fix, evidence, and justified quarantine.
Build a todo CLI app with tests
Ralph autonomously builds a todo CLI application with comprehensive test coverage over multiple iterations until complete.
/ralph-loop "Build a todo CLI app with tests" --max-iterations 30
Kill flaky tests
Run your test suite repeatedly, collect every intermittent failure, and fix or quarantine flaky tests until you get five consecutive green runs.
/loop run my test suite 20 times, collect every intermittent failure, fix or quarantine the flaky ones, and don't stop until you get 5 consecutive fully-green runs