Why moving to a monorepo made development with AI tools easier
TL;DR
A monorepo keeps all of a product's code in one place instead of spreading it across separate projects.
At the end of December 2025, Taproot moved its pieces into one repository. Each piece still builds and ships on its own.
The move ended a whole release process whose only job was passing code between parts of the same product.
One small feature, letting a site set its browser tab icon, touched 21 files across the product and was still reviewed as a single change.
With everything in one place, the AI tool can see how the parts connect, and I saw the quality of its work go up. We haven't measured that with a controlled test.
Why I moved Taproot to a monorepo
I was trying to break things up too much. I blame the early 2010s for making microservices popular. Microservices have their place, but it's a much tighter space than 2012 would have you believe.
When most of a project's solutions are relatively tightly coupled, it makes a lot more sense to put them in a monorepo. That allows changes to be coordinated, reducing work and increasing quality.
Moving Taproot from several repositories into one monorepo made our work faster and better. We had fewer releases to coordinate, spent less time waiting on CI/CD, and could make related changes in one commit. The AI tool could see the whole product at once, and the changes it proposed fit together more easily.
It also got us out of a familiar chicken-and-egg problem: one piece needed an update before another could use it, but finishing that update meant working on both pieces together.
I haven't measured the improvement with a controlled test, so I won't put a percentage on it. What I have is the experience of working both ways and a Git history that shows what changed.

What our monorepo looks like
A monorepo keeps several projects in one repository. A polyrepo (or multi-repo) setup gives each project its own.
Taproot is a publishing platform with four main services: the authoring interface, the backend API, the site generator, and the image processor. The frontend and Node services are TypeScript and the backend is C#. Shared protobuf files describe the service contracts, which is the basis of our contract-driven development with generated clients.
At the end of December 2025 we moved the API, frontend, generator, and contracts into one repository, and we kept pulling related code in after that. Each service sits in its own top-level folder (api/, ux/, generator/, image-processor/) next to protos/, the local dev setup in devenv/, and the task history in docs/tasks/.
The services still build and deploy separately, and we don't use a monorepo build tool like Nx or Turborepo, or pnpm workspaces. Each folder keeps its own project files and scripts. Where the source lives and how you build and deploy it are two separate decisions, and you can make the first without buying a tool for the second.
The internal package that was costing us time
I had put the web components the generator owns (album, article, hero, and so on) in a separate repository because I thought keeping them apart would make things easier. Looking back, that mostly added work.
We published them as a private npm package used by the site generator and by the previews in the authoring interface. Only one codebase ever consumed it: Taproot. It was tightly tied to Taproot's templates, design system, and CDN layout, and the independence I expected when I split it out never showed up. I've written about the cost of depending on packages you don't control; this one we did control, and it still made us pay for releases.
Our migration notes counted 23 published versions, 14 or more version bumps in the generator's package.json, a package token on every CI job and local install, two workflows whose only job was publishing, and a cross-repository release trigger to paper over the seam. We moved the component source into the generator's folder and pointed the generator and the editor preview at it there.
| Part of the work | Before | After |
|---|---|---|
| Get a component change to its consumers | Publish the package and bump dependency versions | Change the source and its consumers in the same checkout |
| Review the implementation and integration | Follow changes across repositories and package versions | Look at the related changes in one diff |
| Coordinate the component release | Maintain a separate publishing and notification path | Build the component source with the product |
We kept versioning for the runtime delivered to published websites, because that version identifies something actually deployed. What we removed was a publishing step for code we were writing as part of the same product.
Why a monorepo helps AI tools
A feature often crosses the lines you'd draw on a repository diagram. Setting a site's favicon is a good example from January 2026. One commit touched 21 files in every layer: the settings contract in its .proto file, the backend gRPC service, handler and entity, the regenerated TypeScript client, and the settings screen in the editor.
Split across repositories, that's the chicken-and-egg problem: the contract and backend ship first, the client gets regenerated and published, and only then can the frontend be built against it. In one checkout, the frontend was built against the matching backend before either was released, and the whole thing went through review as one change.
The AI tool can follow that same path through the code. It reads the contract, finds its consumers, looks at an existing example, and proposes the related changes together, and I review whether the pieces agree in one diff. That makes it practical for me to describe the behavior I want and let the AI tool work out the implementation across layers. Once it had that broader view, I saw the quality of its solutions go up, because it could see how the parts actually connected.
Claude Code and OpenAI Codex can work across several repositories if you give them access. That solves part of the problem, but you'd still be coordinating separate commits, dependency versions, and releases. The same thinking is why we keep our backlog in Git: the intended behavior, the implementation, and the verification record travel together.
Does a bigger repository waste the context window?
It can. Being able to reach the whole repository doesn't mean an AI tool should read all of it. The context a change needs is usually small: the requirement, the relevant contracts, implementations, consumers, tests, and architectural rules. Anthropic's Claude Code best practices (opens in a new tab) recommend pointing the AI tool at specific files and examples and clearing out unrelated material, and a monorepo doesn't change that.
What gives our AI tools a starting point is boring structure: one folder per service with its own README, an AGENTS.md that states the architectural rules and points to examples, and task files that say what needs to change and what counts as done. The AI tool can still miss a dependency. We haven't measured whether any of this cuts token usage; we keep it because the workflow is simpler and the work is better.
Migration costs to plan for
The editor and the generator each had their own node_modules. Once the editor imported source from the generator's folder, module resolution could find a second copy of the design system, which would register the same custom elements twice. We configured resolution so the editor bundle uses one copy.
The editor's Docker image only has the files its Dockerfile copies, so it needed a new COPY for the component folder even though my local checkout worked fine. TypeScript, the bundler, and the test runner also needed matching import paths. An import working locally doesn't prove your tests, container builds, and release workflows understand the new layout.
Keeping the boundaries inside one repository
Code that sits close by is easier to reuse, and easier to import where it shouldn't be. Taproot still has rules about which layers can import which and where mutations and authorization belong, and automated guards enforce parts of them, which I cover in how we enforce coding standards for AI-written code.
Verification needs the same care. Our verify-changed.sh script picks checks by which paths changed, so a contract change runs checks for every service that consumes it:
case "$path" in
# ...
protos/*)
run_proto_lint=true
run_api=true
run_generator=true
run_image_processor=true
run_generated_generator=true
# ...
;;
api/*)
run_api=true
;;That mapping is code we maintain. If it doesn't change when the relationships between services do, a shared edit skips the checks that would have caught it, and nothing warns us.
A monorepo also doesn't make production updates atomic. Services and published sites can run different versions during a rollout, so release order still needs deliberate handling. Running the whole stack locally helps catch mismatches first; that's covered in why we run Tilt in manual mode.
Monorepo vs polyrepo: when I'd keep separate repositories
I'd keep separate repositories when you need to restrict access by repository, when the products share little code, or when a library has independent consumers who need a stable release contract. If the main problem is finding related code, I'd try a better multi-repo workspace before migrating, since the move has to pay back the work of changing builds, CI, permissions, and documentation.
To decide, pick a recent feature and trace it. Where did it start? Which components needed updating? How many releases did it take, and how did you check the combined result? If the frontend, backend, and contracts keep changing together, or you keep publishing an internal package just to update the only product that uses it, that's your case for a monorepo.
Why I'm keeping the monorepo
For Taproot, the monorepo fits how we build. I describe a product change, the AI tool investigates the relevant layers, and we build and verify the result in one checkout. It also let us delete machinery whose main job was shuttling changes between parts of the same product, and the work is a lot easier without it.
If you're building a product and want help making that process work better, I'd be glad to talk about the software, the constraints, and where the work is getting stuck.