Convert codebase to TypeScript
Refactor all files to TypeScript and run tests until the full suite passes.
Use this when
You are migrating an existing JavaScript codebase to TypeScript and the job is too large for one sitting — many files, an existing test suite that must stay green, and no appetite to babysit each batch.
Done when
✓ Done means every file is converted and the full test suite passes — the loop declaring COMPLETE is not the signal, the passing suite is. High cost-risk: 100 iterations on a big repo burns real tokens. Run it in a worktree, commit before starting, and spot-check the types (not just the tests) afterward.
Why it works
The Ralph pattern restarts with fresh context each iteration, so a large migration does not decay as the context window fills. The completion promise (COMPLETE) plus --max-iterations 100 gives the loop both a goal state and a hard stop.
More refactoring loops
Keep refactoring this module until it is clean…
Community loop loop for refactoring, sourced from github. Verified exit condition, evaluator-gated.
Run full dev cycle autonomously
Execute the complete development cycle repeatedly until completion or encountering a blocking issue.
Repair React issues in small batches
Baseline the scan, fix a small batch of real errors or warnings, and verify each change improves it without regressions.