Agents and Directory Structure Pyn restructured its codebase from a Rails-style MVC layout into an app-based, domain-centric directory structure to support AI agents shipping 200 pull requests on a normal day, according to the company's account of the change. Pyn says the layout gives agents clear lanes to work in, reduces merge conflicts because agents in different apps don't touch the same files, adds an index.md to each package for clickable navigation, and provides template apps agents can copy. Pyn advises teams adapting a codebase for agents to start with directory structure. If you are loop engineering, your repository just got a lot busier. If engineers and others are shipping 100+ PRs a day that inevitably leads to an air traffic control problem. This presents in many ways, but merge conflicts, a growing PR backlog, and aging PRs are some of the clearest signals. I’m going to talk about one the crudest and most effective first solutions: Your directory structure. Your directory structure used to be to help software engineers navigate your codebase. Whilst that isn’t out the window, you now need to accommodate a whole new set of participants. At Pyn https://www.pyn.ai we structure our codebase by "app", and I think that structure matters more now that agents are doing the work. An app is a discrete domain a single integration, say with everything needed to realize it. Our old layout more philosophically aligned to classic Rails MVC, with models in one tree, controllers in another and views in a third. This type of separation helps when the tech and concerns are all co-located. The simplest example is frontend belongs with frontend. However, to complete one feature - you needed to navigate multiple trees. Flipping that was one of my first big changes https://jonathannen.com/building-towards-100-prs-a-day/ restructuring-the-codebase for AI. The app “domain-centric” structure pays off in four ways. 1 Clear lanes for agents . I can tell an agent "work on this directory" and what it needs is there. Otherwise it wanders the codebase and copies whatever it finds