Migrate an API import by import
Sweep a codebase from a legacy API to its v2 replacement with tests and typecheck as the safety net, capped at 30 turns.
/goal every file importing from `./legacy-api` now imports from `./v2-api`, all tests pass, and `npm run typecheck` is clean — stop after 30 turns
claude-code · codex · cursor
Implementation note
Swap the module paths for your own migration. The typecheck condition catches signature drift that tests miss.
More refactoring loops
Keep refactoring this module until it is clean…
Community loop loop for refactoring, sourced from github. Verified exit condition, evaluator-gated.
/loop keep refactoring this module until it is clean, then stop
Run full dev cycle autonomously
Execute the complete development cycle repeatedly until completion or encountering a blocking issue.
/loop /dev-cycle # runs the full loop autonomously until done or blocked
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.
Run `pnpm exec react-doctor . --verbose --yes --offline --fail-on none` to record the baseline, then rerun with `--fail-on error`. Fix at most five genuine findings, run the same scan and relevant project checks, and keep only verified improvements. Clear errors before high-confidence warnings. Stop when clean, blocked, approval is required, a finding is false-positive, or another pass makes no measurable progress. Finish with baseline and final results, retained fixes, reverted attempts, checks, and remaining findings.