| name | rails |
| description | Router for Ruby/Rails work: Rails Guides, official reference apps, four schools (incl. packwerk), Active Record associations, webhooks, migrations, security, jobs, Hotwire/realtime, testing, Docker dev, performance, upgrades, Inertia, refactoring. Use for Rails/Ruby tasks; vanilla 37signals is default, escalate on named pains. Read one reference. Triggers: Rails, Ruby, migration, Turbo, Sidekiq, RSpec, Minitest, N+1, DHH. |
Rails (router)
Sources/gaps: references/sources.md maps which Rails references already have provenance; references/coverage-gaps.md lists places where rules should stay project-local until source-backed.
For Rails/Ruby work, route through this file first; do not jump straight to a style reference. Pick the school — vanilla 37signals (references/dhh-style.md) is the DEFAULT; escalate only on named pains — then the topic file. Read exactly one reference file; its full body loads on demand.
Schools (four positions): references/dhh-style.md (vanilla 37signals default — fat models, concerns, Hotwire, Solid suite; owns database-per-tenant architecture) · references/layered-rails.md (Evil Martians extraction — named layers, Action Policy, gem map) · packwerk module boundaries (Shopify; no separate file — its criteria live in the four-school router inside references/rails-event-sourcing.md) · references/rails-event-sourcing.md (Arkency — DDD, events, aggregates; carries the full four-school router). Pain→school: models/controllers bloat → layered-rails · "200 models, zero modules" but simple processes → packwerk · process state accreting on entity tables (status enums, *_sent_at/retry columns) → rails-event-sourcing · no named pain → stay vanilla. references/ruby-refactoring.md (thoughtbot smell→refactoring catalog) is an extraction aid, not a school. Route by project; never blend schools in one codebase.
Topics: references/rails-guides.md (official Rails Guides lookup: verify current framework mechanisms before inventing abstractions) · references/rails-reference-apps.md (official Rails reference apps: Campfire, Writebook, Fizzy code-pattern exemplars before inventing app structure) · references/active-record-associations.md (association design: scoped has_many, ordered children, has_one, dependent, inverse_of, touch, counter caches, where.missing, default-scope boundaries) · references/rails-webhooks.md (outbox, signing, SSRF, circuit breakers) · references/rails-migrations.md (safe schema changes, locks, backfills) · references/rails-security-multitenancy.md (tenant boundaries, scoped lookups, auth chain) · references/rails-jobs.md (Active Job design, idempotency, Solid Queue) · references/rails-fixtures-testing.md (fixtures school — tight Minitest coverage at the owning layer) · references/rails-testing.md (factories school — TestProf, flaky taxonomy, CI) · references/rails-hotwire-realtime.md (app-level Turbo/Stimulus patterns) · references/rails-realtime.md (websocket SCALE — Action Cable, avalanches, LLM streaming) · references/rails-docker-dev.md (containerized dev, agent sandboxing) · references/optimizing-rails.md (production performance — profiling, N+1, Puma/GVL, Sidekiq throughput, queue-time autoscaling) · references/rails-upgrades.md (FastRuby dual-boot methodology) · references/inertia-rails.md (React-on-Rails without an API layer) · dhh (/dhh — review a diff in DHH's voice; a standalone skill, not a reference file).
Boundary splits to respect: job design → references/rails-jobs.md, queue throughput → references/optimizing-rails.md · app-level Turbo → references/rails-hotwire-realtime.md, websocket scale → references/rails-realtime.md · fixtures vs factories: route by the project's existing choice.