Refactor API to use dependency injection

Refactor src/api/ to use dependency injection, keep all existing tests passing, add tests for the new DI container, and output completion promise when done.

prompt
→ Claude
/ralph-loop "Refactor src/api/ to use dependency injection. Keep all existing tests passing. Add tests for new DI container. Output <promise>COMPLETE</promise> when done and all tests pass." --max-iterations 20
claude-code

Source: larsderidder

More refactoring loops

Run full dev cycle autonomously

Loop/loopnew

Execute the complete development cycle repeatedly until completion or encountering a blocking issue.

prompt
→ Claude
/loop /dev-cycle # runs the full loop autonomously until done or blocked
refactoringmedium risk

Verify foundations refactor baseline

Loop/goal

Record baseline documentation and contract specifications when pure validation refactoring completes with zero public API impact.

prompt
→ Claude
/goal records docs/reports/ baselines/2026-06-02-foundations-after.md + specs/047-foundations-programme-closeout/contracts/after-baseline.md ; no public product .fsi /surface/package/runtime impact; Principle IV (Elmish/MVU) is not applicable (pure validation refactor, IO confined to the existing read-file wrapper); required real evidence = prose-size accounting, the rewording-passes / drift-fails red→green, the enumerated contract-token set, and the restated-goal record Cap the run at 20 turns.
refactoringlow risk

Migrate an API import by import

Loop/goal

Sweep a codebase from a legacy API to its v2 replacement with tests and typecheck as the safety net, capped at 30 turns.

prompt
→ Claude
/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
refactoringmedium risk