The loop
The original stays the source of truth. A migration moves through the same steps for every
piece, and ruby-anything go tells you (or your agent) which one is next.
- Plan:
analyzewritesrails/port/PLAN.mdwith the waves and the decisions. You settle the decisions; they are written torails/port/DECISIONS.mdas ADRs. - Record:
app recordcaptures what the whole app answers;recordcaptures what single functions return, raise and print. - Front door:
app front-doorputs Rails in front of the original. Every route Rails does not own yet is proxied to the original, so the app keeps running. - Port: your agent ports one route or unit at a time:
bridgemakes the Ruby skeleton, the agent writes the Ruby. - Verify:
diff(units) andapp replay(routes) compare the port to the recording. - Gate: a piece is done when
gatepasses. - Lift: when nothing falls back to the original,
app liftremoves the proxy.
go
sh
ruby-anything go [-- <command that starts the app>]
Each run moves to the next stage and writes the next task to rails/port/TASK.md. The first run
analyzes and stops for your decisions; go waits until DECISIONS.md has at least one ADR.
Waves
analyze orders the work in waves, lowest first, so a route's models and services are Ruby before
its controller:
| Wave | What moves |
|---|---|
| 1 | Models |
| 2 | Business logic |
| 3 | Routes and controllers |
| 4 | Views |
| 5 | Jobs and mailers |
| 6 | Lift |
Units in one wave do not depend on each other, so a wave can be ported in parallel.