Loop/goalTestingmedium riskadvancedsafety C · 55Forward Futurepre-dates current gate · under review

Refactor in tested checkpoints

Reshape the architecture in small, independently reviewed steps — live-test, commit a checkpoint, and log progress each pass.

prompt
→ Claude Code
Refactor until you are happy with the architecture. After each significant step, live-test the system, run autoreview, and commit. Track progress in /tmp/refactor-{projectname}.md.
claude-code · codex

Use this when

Use this for a deliberate architectural refactor where the destination can be stated in concrete terms and the current system can be tested after each meaningful change.

How it runs

  1. Write down the architectural target, constraints, and current risks before editing code.
  2. Make one significant, reviewable change at a time.
  3. Live-test the affected behavior and run an independent review after each significant step.
  4. Commit each verified checkpoint and update the temporary progress file with decisions, blockers, and the next action.

Done when

✓ The architecture is satisfactory and checks pass. Live-test, autoreview, and commit each significant step.

Why it works

Small verified checkpoints reduce refactor risk and preserve rollback points. The progress file keeps the goal and decisions available across long sessions or handoffs.

Implementation note

Define what satisfactory means before starting, such as module boundaries, dependency direction, passing tests, and acceptable performance. A subjective stop condition can otherwise run indefinitely.

Source: Forward Future ↗graded C · 55/100 — how grades work →

More testing loops

Build a REST API with tests

Loop/ralphGitHubB

Run autonomous iterations to ship a complete REST API with full test coverage until completion is promised.

prompt
→ Claude Code
/ralph-loop "Build a REST API with tests" --max-iterations 30 --completion-promise "COMPLETE
testingmedium risk

Test all endpoints

Loop/goalGitHubB

Run tests against every API endpoint until coverage is complete or you hit 30 iterations.

prompt
→ Claude Code
/goal all endpoints tested or stop after 30 turns
testingmedium risk

Hit acceptance criteria

Loop/goalXB

Drive a feature to done against explicit acceptance criteria: a working paginated endpoint, passing tests, clean lint, and a hard turn cap.

prompt
→ Claude Code
/goal the /users endpoint returns 200 with a paginated JSON body, all tests pass, and lint is clean — stop after 20 turns