I’ve been shipping Ruby on Rails applications since Twitter was a Rails app. Since then I’ve collected some strong opinions on what solid Rails code looks like. AI agents don’t share any of them. I’ve written about this dynamic before. Someone has to own quality in the age of AI. A few months ago I started packaging those opinions into a Claude Code plugin so the agent would work the way I would. This week, I’ve opened it to the public: RailsCTO.
Three things have changed how I work.
Quality gates force refactoring. Tests, RuboCop, Reek, Flog, Flay, Brakeman, and bundler-audit run on every Ruby file the agent touches. ERB templates get the same treatment, formatted and linted with Herb. No rubocop:disable escape hatches. No skipping the security scan because it’s noisy today. Reek and Flog have repeatedly forced cleaner refactors on code I would have shipped and regretted.
Conventions, not just rules. Each part of the Rails stack has a dedicated skill that knows the house style: RESTful routing, ViewComponent patterns, Stimulus, Tailwind, Minitest with SimpleCov to ensure proper test coverage on all new updates. The bar is the question that actually matters: “is this how a senior Rails dev on this team would write it?”
Architecture before code. The architect skill plans multi-step features as bite-sized tasks before a single line of code is written: codebase recon, gem research, architectural decisions, no hand-waving. This has caught more half-baked feature designs than I want to admit. The kind that would have shipped fine on day one, then turned into rework two weeks later when the second use case showed up.
The result has been surprising. A feeling of trust and delight about what gets shipped. The agent writes the code I would have written, in roughly the same shape, with the same conventions, and with tests this time.
RailsCTO is open source and in early development. It’s working well enough that I want other Rails developers using it, breaking it, and shaping what it becomes. RSpec support is missing since I’m a Minitest enthusiast, but it’s on the roadmap. If you’re an RSpec person, I need your help.
Smarter architect logic is also on the roadmap. The skill catalog is going to grow. If there’s a Rails opinion you’d want a CTO-grade agent to enforce that isn’t there yet, I want to hear about it.
The site is at railscto.com. The repo is at github.com/mattsears/rails-cto. Issues, PRs, and strong opinions are all welcome.
What’s the one Rails opinion you’d want a CTO-grade agent to enforce? Open an issue and let me know.