This talk presents what is the current problem with Rails apps from AI agents perspective. The lack of modularity in Rails apps make agents confused - the context is too big for them. The solution is making a big number of small modules with well defined interfaces.
Domain Driven Design (DDD) is a technique which, together with event-driven and CQRS results in smaller modules.
The app I am presenting has 50 small modules, composed via commands and events.
I am also presenting an algorithm which helps reducing the size of ActiveRecord models - by gradually moving their responsibilities to read models and aggregates.
Look at this repo to see the modularity mentioned - https://github.com/RailsEventStore/ecommerce