Ruby Anything

v0.2.3
io.github.akkisavi/ruby-anything Checked 8 hours ago Published 2 days ago

Migrate any app to Ruby on Rails one piece at a time, checked against the original's behavior.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

go

Move the whole-app migration to its next stage and write rails/port/TASK.md. Pass the command that starts the original app.

ParameterTypeDescription
commandarrayCommand that starts the original (reads PORT or uses {port})
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

status

Where the migration stopped: stage, next step, current TASK.md, open units, fallback rate and the files to read first. Read-only; call it first in a new session.

ParameterTypeDescription
repostringPath to the repository being migrated (default: current directory)

analyze

Plan the migration: languages, frameworks, routes, templates, functions in waves, dependencies with Rails equivalents, and the decisions to settle with the user.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

bridge

Create the Ruby skeleton for one unit (app/services) and its TASK.md.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)
unitstringUnit id from rails/port/plan.json, e.g. "src/pricing.py:discount"

record

Run the original unit on generated edge cases (plus --inputs) and save its behavior to rails/port/cases.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)
unitstringUnit id from rails/port/plan.json, e.g. "src/pricing.py:discount"

diff

Replay the recorded cases against the Ruby port; must be N/N.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)
unitstringUnit id from rails/port/plan.json, e.g. "src/pricing.py:discount"

gate

Done means gate passes: recording untouched, no stubs, no copied answers, error paths covered, tests kept, every case matching. Use flags ["--app"] for the whole app.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)
unitstringUnit id from rails/port/plan.json, e.g. "src/pricing.py:discount"

rules

List the behavior rules the user corrected (follow them all), or add one with flags ["--add", "<rule>"].

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

app_record

Record the whole original app over HTTP. command starts it.

ParameterTypeDescription
commandarray
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

app_replay

Replay every recorded HTTP case against Rails (front door included) or, with ["--original"], the original.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

app_front_door

Create the Rails 8 app (Hotwire, Tailwind, daisyUI) that proxies every route not ported yet to the original.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

app_wire

Mark a route as answered by Rails (stops proxying it).

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)
routestringe.g. "GET /users/:id"
unitstringUnit name, used for the kill switch

app_status

Measured state: fallback rate, wired routes, units done, routes left. Writes rails/port/PORT_MAP.md.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

app_lift

Remove the front door once nothing falls back and every gate passes.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]
repostringPath to the repository being migrated (default: current directory)

doctor

Check the runtimes (Ruby, Rails, and each source language) and print the fix for each missing one.

ParameterTypeDescription
flagsarrayExtra CLI flags, e.g. ["--json"]