Self-driving Rails
Your Rails app notices, diagnoses, and fixes its own problems.
RailsMind watches your app in production, turns what it sees into findings, works out why against your source, and hands your coding agent a fix brief. Today you review and merge the pull request. Next, RailsMind opens it itself.
- Today Findings, investigations, fix briefs, quiet auto-resolve
- Coming RailsMind opens the pull request and measures the result
One drive
A slow page, from first request to fixed.
Illustrative example, modeled on the sample app
-
09:12Observe
Requests arrive with their queries.
Every request to
GET /invoicesreports its controller action, its timing, how many queries it ran, and fingerprints for the queries it repeated most, tagged with the release that served it. -
09:13Find
A repeated query becomes a finding.
One request to
GET /invoicesran the same query 25 times, which usually means an N+1.action InvoicesController#index queries 27 repeated 25 × one fingerprint release 4f1c2e9
-
09:15Diagnose
An investigation reads the source.
You or your agent start an investigation from the finding; once automation is on, new and returning exceptions start one on their own. It reads
app/controllers/invoices_controller.rbat that release through the GitHub App and writes down a suspected cause: the index loads 25 invoices, and the view asks each one forinvoice.customer.name. -
09:16Brief
The fix brief is ready.
Evidence, source, the analysis, your test conventions, and a definition of done, in one document your agent can fetch.
## Definition of done 1. Write a regression test that counts the queries for a request to GET /invoices with several records and fails today. 2. Make the narrowest change that makes that test pass. 3. Run the test file, then the full suite. Both pass. 4. Open a pull request. Do not merge or deploy; a person reviews it.
-
09:31Change
Claude Code opens a pull request.
It writes the failing test, preloads each invoice's customer, runs the suite, and opens the pull request. You read the diff and merge.
@invoices = @account.invoices.includes(:customer) .order(created_at: :desc).limit(25)
- Today Your agent opens it and you merge
- Coming RailsMind opens it itself
-
Day 8Verify
Resolved, quietly.
After the release, no request repeats the query. Seven days pass with no new evidence, so RailsMind resolves the finding quietly. If the N+1 comes back, the finding reopens and the next daily digest lists it as a regression.
Autonomy
Level 3 today. Built for level 5.
Self-driving cars are graded in levels, from driver assistance to no driver at all. RailsMind uses the same idea for a Rails app, and says plainly which levels it reaches now.
-
Level 1
It shows you
Today
-
Level 2
It tells you
Today
-
Level 3
It hands your agent the fix
Today You are here
-
Level 4
It opens the pull request
Coming
-
Level 5
It ships and steers
Later
Rails only
It knows Rails, so it knows where to look.
-
Controllers and routes
Every request is named by its action, so a finding points at
InvoicesController#index, not a URL pattern. -
Active Record
It counts the queries in every request and fingerprints the ones that repeat, which is how it flags a suspected N+1 from the queries themselves, not from latency alone.
-
Jobs, errors, releases
Background jobs, exceptions, and the release that served each request arrive together, so a slowdown has a release to compare against.
-
The setup you have
The installer prints its plan before it changes any integration, and leaves Ahoy, Flipper, and OpenTelemetry in charge of what they already do.
For agents
Your agent can drive it too.
RailsMind serves the Model Context Protocol from the same app. Connect Claude Code once and ask for the open findings, the slowest endpoint, or a fix brief: up to 56 tools behind one revocable token, scoped to your workspace.
Connect Claude Code
claude mcp add --transport http railsmind https://railsmind.com/mcp \ --header "Authorization: Bearer rmt_…"
Install
A gem, an installer, one key.
The installer inspects your app and prints a plan before it changes any integration. Set the ingest key in your deployment environment; the release is detected when your host exposes it.
The RailsMind gem is open source and installs from RubyGems.org.
# Customer application Gemfile gem "rails_mind", "~> 0.3.1" bundle install bin/rails generate rails_mind:install --plan bin/rails generate rails_mind:install
RAILS_MIND_KEY=your_ingest_key
# With the key in the app's environment bin/rails rails_mind:doctor
Dogfood
It drives itself.
RailsMind watches its own production app, with a guard that keeps it from observing the telemetry it sends itself, alongside two other Rails apps in production.
Every Today label on this site ships in the build those apps report to.
Get started
Take your app for a drive.
Create a workspace, add an application, and connect it with one key. Sign in if you already have one.