Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Monolith Strikes Back: Why AI Agents ❤️ Rai...

The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths

AI agents don't reason about what they can't see. Microservices fragment context across repositories; modular monoliths keep the entire solution accessible — for humans and agents alike.

This talk introduces progressive disclosure as the unifying principle connecting UX design, cognitive science, and software architecture. The constraint changed from working memory to context window. The principle didn't.

Through Rails Whey — an open-source project with 28 git branches evolving the same Rails application from fat controllers to bounded contexts — we measure agent-friendliness across five dimensions: context window cost, discoverability,
isolation, predictability, and blast radius. The results reveal a clear sweet spot where naming conventions and modular orchestrations maximize AI agent effectiveness (24/25) using nothing but native Rails tools.

We examine why AI is a capacity amplifier that makes fundamentals more valuable, not less. Why the cost of producing code dropped while the cost of deciding rose. And why orthogonality, unified naming, resource discipline, and named
orchestrations are the four highest-leverage changes you can make today.

Along the way: Shopify's 237 billion BFCM requests, Ruby's #1 token efficiency with Claude Code, Y Combinator calling convention-over-configuration "LLM catnip," and a modularity-vs-deployment quadrant that reframes the monolith debate
entirely.

Good architecture is progressive disclosure for any operator. If it's simple to find and understand, it's simple to maintain and evolve.

If you write Rails, you're already on the best platform for coding with AI agents. This talk shows you why — and how to make it even better.

Presented at Tropical on Rails 2026, São Paulo, Brazil.

Avatar for Rodrigo Serradura

Rodrigo Serradura

April 10, 2026

More Decks by Rodrigo Serradura

Other Decks in Programming

Transcript

  1. Rodrigo Serradura Creator of Ada.rb, Solid Process and Rails Whey

    16+ years building and maintaining Rails applications Principal Software Engineer @ Wavelo Currently leading AI adoption at scale
  2. Does Rails scale? Ask Shopify. 2023: 145B requests, 60M req/min,

    $4.1B → 2025: 237B requests, 117M req/min, $6.2B
  3. How token-efficient is Ruby? [IMAGE: @token-efficiency/tweet-01-2026.png] Martin Alderson — Token

    efficiency across 18 languages (226K views) [IMAGE: @token-efficiency/tweet-03-2026.png] Yusuke Endoh — Claude Code benchmark (89K views) Alderson: Ruby top 3 (2.6x gap) | Endoh: Ruby #1 with Claude Code — $0.36/task, fastest, most stable
  4. "Convention over Configuration is LLM Catnip (irresistible)" Garry Tan, CEO

    — Y Combinator [IMAGE: @ycombinator-recommendation-for-ai/tweet.png] Garry Tan (678K views) [IMAGE: @ycombinator-recommendation-for-ai/youtube.pn g] Tom Blomfield, YC Startup School (343K views) "Rails was designed for people who love syntactic sugar, and LLMs are sugar fiends."
  5. How versatile is Ruby on Rails? Web Hotwire PWA Mobile

    Turbo Native API REST GraphQL Jobs Solid Queue Multi DB Active Record Uploads Active Storage Cache Solid Cache Deploy Kamal upright
  6. The framework embraced it. [IMAGE: @rails-branding/image1.png] Homepage Rails — "Scales

    from PROMPT to IPO" [IMAGE: @rails-branding/image2.png] Homepage Rails — "Everything you need"
  7. The questions that remain How adaptable is the framework? What

    level of complexity can it support? How do coding agents benefit from its architecture?
  8. The questions that remain How adaptable is the framework? What

    level of complexity can it support? How do coding agents benefit from its architecture?
  9. The questions that remain How adaptable is the framework? What

    level of complexity can it support? How do coding agents benefit from its architecture?
  10. The questions that remain How adaptable is the framework? What

    level of complexity can it support? How do coding agents benefit from its architecture?
  11. The questions that remain How adaptable is the framework? What

    level of complexity can it support? How do coding agents benefit from its architecture? Why do these questions matter in the AI era?
  12. Why Now? — The AI Era Thesis Software engineering aims

    to reduce the cost of change. AI is a capacity amplifier. If the foundation is weak, the quality of change will be too. Amplifying a weak base generates a high volume of poor decisions. The cost of doing dropped. The cost of deciding rose. Producing code became cheap. Deciding what to produce, how to structure, where to place — that got more expensive. Mastering fundamentals is the key. To unlock AI's real value, a developer needs to know what a good solution looks like before asking for one.
  13. What does all of this have to do with AI

    Agents? Is Rails the right stage for a conversation about Software Architecture?
  14. What does all of this have to do with AI

    Agents? Is Rails the right stage for a conversation about Software Architecture?
  15. What does all of this have to do with AI

    Agents? Is Rails the right stage for a conversation about Software Architecture?
  16. What does all of this have to do with AI

    Agents? Is Rails the right stage for a conversation about Software Architecture?
  17. What does all of this have to do with AI

    Agents? Is Rails the right stage for a conversation about Software Architecture?
  18. Orthogonality: how progressive disclosure works in code High cohesion +

    loose coupling = each part can be found, understood, and changed in isolation. Low orthogonality (1A) High orthogonality (6G) Cohesion 3 concerns in 1 file 1 concept per file Coupling Change auth → 4 files, 3 strategies Change invitation → 1 file Agent cost 363 lines loaded, 10 lines signal 35 lines loaded, 35 lines signal
  19. But not all monoliths are equal. 10/25 24/25 Same framework.

    Same language. Same app. 2.4x difference.
  20. Five dimensions — five facets of progressive disclosure Dimension What

    it measures Progressive Disclosure lens Context Window Cost Files/lines an agent must load How much is hidden vs shown Discoverability How quickly it finds the right file Names guide you to the right place Isolation Change one thing without loading everything Each part is self-contained Predictability Patterns generalize across codebase Consistent structure = less cognitive load Blast Radius Files touched by a change A change stays on its own screen
  21. Three changes that transform agent-friendliness UNIFIED VOCABULARY — 5C +3

    1 grep = 16 files across ALL layers RESOURCE DISCIPLINE — 3F +4 Zero route overrides Agent's first guess is correct NAMED ORCHESTRATIONS — 6G +2 after_create → User::Registration
  22. The Sweet Spot — Family 6: 24/25 Family 6 —

    score 24/25 with only ~18 lines of CLAUDE.md.
  23. When you need more: the gradient continues Companies at this

    level: Shopify 2.8M LOC, Packwerk Doximity 15 years, 100+ engineers Gusto 250K+ commits
  24. Modularity matters more than deployment topology Modularity ↑ Number of

    deployment units → Modular Monolith ★ Agents thrive here Microservices Modular but fragmented Monolithic Big Ball of Mud 10/25 agent-friendliness Distributed Big Ball of Mud The worst of both worlds
  25. Modularity matters more than deployment topology Modularity ↑ Number of

    deployment units → Modular Monolith ★ Agents thrive here Microservices Modular but fragmented Monolithic Big Ball of Mud 10/25 agent-friendliness Distributed Big Ball of Mud The worst of both worlds
  26. Four highest-leverage changes you can make today 1. Unify naming

    — 5C One grep = all layers 2. Declare authority — 5D+6E Every question → one address 3. Name orchestrations — 6G Callbacks → Domain objects 4. Eliminate route overrides — 3F Fix the name, not the route Agent's first guess is correct
  27. Good architecture is progressive disclosure for any operator. "If it's

    simple to find and understand, it's simple to maintain and evolve. The constraint changed from working memory to context window. The principle didn't.
  28. Does Rails scale? Ask Shopify. 2023: 145B requests, 60M req/min,

    $4.1B → 2025: 237B requests, 117M req/min, $6.2B
  29. How token-efficient is Ruby? [IMAGE: @token-efficiency/tweet-01-2026.png] Martin Alderson — Token

    efficiency across 18 languages (226K views) [IMAGE: @token-efficiency/tweet-03-2026.png] Yusuke Endoh — Claude Code benchmark (89K views) Alderson: Ruby top 3 (2.6x gap) | Endoh: Ruby #1 with Claude Code — $0.36/task, fastest, most stable
  30. "Convention over Configuration is LLM Catnip (irresistible)" Garry Tan, CEO

    — Y Combinator [IMAGE: @ycombinator-recommendation-for-ai/tweet.png] Garry Tan (678K views) [IMAGE: @ycombinator-recommendation-for-ai/youtube.pn g] Tom Blomfield, YC Startup School (343K views) "Rails was designed for people who love syntactic sugar, and LLMs are sugar fiends."
  31. How versatile is Ruby on Rails? Web Hotwire PWA Mobile

    Turbo Native API REST GraphQL Jobs Solid Queue Multi DB Active Record Uploads Active Storage Cache Solid Cache Deploy Kamal upright
  32. Why Now? — The AI Era Thesis Software engineering aims

    to reduce the cost of change. AI is a capacity amplifier. If the foundation is weak, the quality of change will be too. Amplifying a weak base generates a high volume of poor decisions. The cost of doing dropped. The cost of deciding rose. Producing code became cheap. Deciding what to produce, how to structure, where to place — that got more expensive. Mastering fundamentals is the key. To unlock AI's real value, a developer needs to know what a good solution looks like before asking for one.