Conventions, in Markdown
AGENTS.md and the guides tell the agent how to do each thing: the stack, the layout, naming, security and tests. Your agent reads them, so you don't have to. Browse the guides.
Under active development. Star us on GitHub
Rails' conventions, without Rails. Your agent writes the code, and the checks keep it on the tracks.
You describe a web app in plain words. Your coding agent (Claude Code, Codex, opencode, Muse or any other) builds it in Rust from our conventions, a tested app template and optional parts, and it isn't done until the tests pass on SQLite and Postgres. The convention lives in the prose. The agent writes the code.
bin/setup && bin/devcurl -fsSL https://rustoffrails.org/install.sh | shor in Claude Code: /plugin marketplace add rust-off-rails/rustoffrails
Read before you pipe: the install script · INSTALL.md
Four things your coding agent uses to build a full-stack Rust web app. All of it is copied into your app, so it's yours to read and change.
AGENTS.md and the guides tell the agent how to do each thing: the stack, the layout, naming, security and tests. Your agent reads them, so you don't have to. Browse the guides.
A complete app that compiles and passes its tests on SQLite and Postgres on day one: sessions, security headers, CSRF, Docker and CI. The template.
Mail and a dev mailbox, a job queue and its dashboard, sign-in, realtime and a dev dashboard: tested code to copy, one command each. Read them first in the samples repo or on the parts page.
offrails-check and one command, cargo offrails verify, decide when the agent is done: tests on both databases, every acceptance criterion tested. The checks.
The rule behind it: agents write the code. You say what you want, in plain words or in specs; the agent writes the rest. Read §0.
Field tests
Agents port well-loved open-source apps to Rust off Rails. Every rough edge they hit goes back into the framework.
from Fizzy In progress
Fizzy's boards and cards, rebuilt in Rust by agents.
About 20x less memory than the original Fizzy, measured by the maintainer.
from FreeScout In progress
A shared-inbox help desk, built by agents on another machine.
from Uptime Kuma Built
1,556 tests green on SQLite and Postgres.
About 7x less memory than Uptime Kuma on one machine.
Built with GPT-6 Luna Claude Sonnet 5.5 Meta's Muse Wonder 1 GLM 5.3 Flash via opencode The goal: small, cheap agents that get real work done too.
"I love Ruby on Rails and Phoenix. I built this as an experiment, and I loved it."
These are optional parts, and we highly recommend them: traces, a profiler, a local mailbox, a jobs dashboard and live presence. With them you see what your app is doing from the first run, and your agent reads the same data as JSON, so it can check its own work. Take the ones you want, skip the rest.
The dashboard costs about 1 µs per request in a release build, and is development only by default.
Markdown carries the conventions. A checker, offrails-check, runs on every app, this site included, and says no when an agent breaks one. The rules come from mistakes agents actually made.
header The AGENTS.md header is complete and consistent with the vendored framework version.ac Every acceptance criterion in the specs is cited by a test.security Every feature has a security table, and every test it names exists.env Every environment variable the app reads is listed in .env.example.ids No id column is a 32-bit integer. One of them once made every Postgres write a 500 behind a green SQLite suite.postgres The test suite can run on Postgres, not only SQLite.bind Development listens on this machine only, and foreign Host names are refused.routes docs/routes.md lists every route.Then the test suites must pass on both databases before anything counts as done. The Definition of Done
An agent isn't done until one command, cargo offrails verify --full, passes: the tests on SQLite and Postgres, every acceptance criterion cited by a test, at least 80% line coverage (90% for models and policies), no unwrap outside startup, migrations that roll back, dependency and secret scans, no accessibility violations in light or dark, and a screenshot of every page. The rules come from years of shipping and upgrading apps on other stacks.
Measured by the agents that ran them. How upgrades work
Every app starts with the same protections and the same accessibility checks, and its tests prove them.
HttpOnly session cookies, only hashed tokens in the database, and rate limits on sign-in.offrails-check verifies exists.How it works
The agent asks only what a human can answer, writes the answers down, and is done only when the compiler and the test suite on both databases agree.
The boxes show an example app, a bookshelf, in the formats the framework really uses.
Product questions only, each with a recommended default. "Who can see this?" yes; "which ORM?" never. Say "you decide" and it takes the defaults.
? Accounts? a) magic link (Recommended) b) email + password c) invite-only d) none
A compact plan (resources, pages, jobs, assumptions) written into product/ specs with acceptance criteria. The spec is the durable record; chat is not.
product/features/books.md
- [ ] AC-books-1: a signed-in user can add a book
Generator recipes, run by the agent: migration, model, failing tests, controller, views, one vertical slice at a time.
tests/app/books_test.rs cites AC-books-1
src/controllers/books.rs
fmt, clippy, tests on SQLite and Postgres, every acceptance criterion traced to a test, coverage gates. Green or it didn't happen.
ok [ac] 12 criteria, all cited
offrails-check: 0 error(s), 0 warning(s)
nextest: SQLite pass, Postgres pass
Red at any station? The failure goes back to the agent, and nothing counts as done until it is green on both databases.
| Skill | What it does |
|---|---|
/offrails:new | Interview → plan → app skeleton → planned features, green |
/offrails:feature | Spec first, then code. With no argument: build what changed in product/ |
/offrails:scaffold | A full resource in the app's frontend mode |
/offrails:generate | Jobs, mailers, channels, authentication, models, migrations, tasks |
/offrails:check | The Definition of Done: fmt, clippy, tests on SQLite and Postgres |
/offrails:doctor | Audits the app against every convention in the docs |
/offrails:deploy | Deploy config and a verified image; confirms before anything outward-facing |
/offrails:upgrade | Moves the app's vendored framework forward and migrates conventions |
How you'll use it
Say what you want, or write it in product/features/*.md. Plain English.
The agent writes the spec, then the code: migrations, models, views, tests.
Done means green on SQLite and Postgres, every acceptance criterion tested.
The deal
generators/scaffold.md: a recipe the agent runsThe stack in one breath
Axum·Tokio·SeaORM SQLite locally, Postgres in production, same code·Askama·Tailwind·lettre·tracing·one binary, one Docker image
FRONTEND_MODE, chosen once in the interviewhtmx default
Askama templates, checked at compile time, plus htmx. No Node. For CRUD apps, dashboards, content sites (like this one).
inertia
React or Svelte pages with server-side routing and controllers, through a generated Inertia adapter. The pick when you want a JS UI.
spa
A separate single-page app plus a JSON API, for when the UI must be a standalone app. Types flow from Rust via ts-rs.
api in progress
No UI at all: a backend and a versioned API for mobile apps, partners and scripts.
UI_LIBRARYreact (default) or svelte, for inertia, spa and htmx islandsAPInone, rest (OpenAPI + tokens), graphql or both: a public, versioned API, independent of the UIAnd in the database: a job queue, a cache and pub/sub. The database is the only infrastructure.
Standing on giants
None of the good ideas here are new. We took the ones that aged best from two frameworks we love, gave each a Rust shape, and wrote them down for agents.
rails new and scaffold, as recipes the agent runs/up and Docker by defaultbin/rails tasks → one app binary/admin/jobs dashboard/dev/mailbox/dev toolboxGet started
/plugin marketplace add rust-off-rails/rustoffrails
/plugin install offrails@offrailsThen, in an empty directory:
/offrails:new bookshelf: people track the books they've read and review themThe agent interviews you, confirms a plan, then builds. Skills also trigger on plain requests ("make me a new Rust web app…").
AGENTS.mdRead /path/to/rustoffrails/AGENTS.md and make me a new app called "bookshelf".Generated apps carry AGENTS.md and a vendored .offrails/, so later sessions need no setup.
Describe features in plain language, or write them as specs in product/:
Scaffold Book with title:string, author:string, published_on:date, rating:integer.
Users must be logged in to create books.The full walkthrough How you'll use it Read the docs Star on GitHub