[01] LOOP
TestingmanualHardened
Test Until Green
Run your test suite, fix the smallest root cause on failure, and repeat until every test passes.
by Trooper
Kickoff prompt
Start the "Test Until Green" loop. Goal: all tests pass Max iterations: 10 Between iterations run: npm test Exit when: tests exit 0 Step 1: Run tests. If there are failures, fix the smallest root cause, then repeat. Self-pace this loop. After each iteration, run the check command, read the output, and only continue if the exit condition is not met. Stop when the exit condition passes or max iterations is reached. Give a short status update each pass.
Paste the kickoff prompt into Cursor, Claude Code, or Codex. Deeplinks do not install hook files.
Steps
1. Run tests
Execute the full or scoped test suite.
2. Triage failures
Pick the smallest root cause from the failure output.
3. Fix and re-run
Patch, then run tests again.
Flow diagram
Guardrails
Rules the agent must follow so it cannot cheat the exit condition.
- Do not weaken or delete tests to force green
- Fix the smallest root cause per iteration
