What problem does it solve?
It solves the confusion of where specific Rails code should live, helping you avoid god objects, fat controllers, and hard-to-maintain private abstractions.
Core Features & Use Cases
- Rails-layer decision tree: Choose the correct layer (controller, model, service, query object, policy, presenter, ViewComponent, job, form, mailer, channel) based on intent like orchestration, querying, authorization, formatting, or async work.
- Layer interaction flow: Use a clear request-to-response and async/email/realtime flow diagram to keep responsibilities separated.
- Refactoring and anti-pattern guidance: Recognize over-engineering and common pitfalls (fat controller, callback hell, helper soup, N+1, premature abstraction) and apply targeted fixes.
- Multi-tenancy defaults & testing strategy: Keep queries scoped through account and map each layer to appropriate test types to prevent regressions.
Quick Start
Tell your AI assistant: “I’m refactoring a Rails 8 feature where a controller action calls multiple models, needs authorization, and triggers background notifications—what layer(s) should each piece go into, and what refactor steps should I take?”