6 ms·
We just did this the other week and it's such a great setup using AI. Monorepos in general are better for coding agents since it's a single location to search.
by themanmaran 6mo ago
We just did this the other week and it's such a great setup using AI. Monorepos in general are better for coding agents since it's a single location to search. But now we have the ability to say "Add xyz optional param to our API" and claude adds the code + updates the documentation. I was also able to quickly ask "look at our API and our docs, find anything out of date".
Our set up is:
packages/
↳ server
↳ app
↳ docs
Using mintlify for the docs, just points to the markdown files in the docs folder. And then a line in the claude.md to always check /docs for updates after adding new code.
- dheera 6mo agoThe one thing I hate about monorepos is nothing ever gets versioned, packaged, and shipped. Polyrepos are workable, the way to do it is to actually version, ship, and document every subcomponent. When I mean ship, I really mean ship, as in a .deb package or python wheel with a version number, not a commit hash. AI can work with this as well, as long as it has access to the docs (which can also be AI-generated).
- giorgioz 6mo agoThe monorepo make it easier to ship the overall product but harder to ship parts of it. I've used a monorepo for the past 13 years and I got all shared packages with version 0.0.0 and I still haven't figured out a simple way to share just some parts of it like a CLI. Does anyone have a monorepo and publishes NPM packages with source code of only that folder? Sub-gits required to pull in multiple places...
- fixxation92 6mo agoI've got about ~15 repos for a project and I just start Claude Code in the parent directory of all of them, so it has clear visibility everything and cross-reference whatever it needs.... super handy.
- dezgeg 6mo agoThe best thing about monorepos is nothing ever gets versioned and packaged. That means, a subcomponent can just make a needed change in the supercomponent as well, and test and the ship the subcomponent without excess ceremonies and releases.
- dheera 6mo agoThat strategy sucks when you have 15 supercomponents depending on 1 subcomponent, you want to rewrite the subcomponent, and now you have to deal with all 15 of them and get codeowners approvals from all 15 of those teams. In a polyrepo org you just release version 2.0 of the subcomponent and upgrade the 1-2 of the 15 teams where the 2.0 features are actually needed now. The rest of the users can upgrade on their own schedule.
- giorgioz 6mo agoYes it's awesome! I'm creating a lot of CLIs with Claude Code to interact with external services. Yesterday made a CLI for the Google Search Console so I can prompt "get all problems from indexing in Google Search Console and fix them". Same with Sentry bugs. Same with the customer support "Use the the customer support cli skill to get recent conversations from customers and rank bug reporting and features requests and suggest things to work on"
- serial_dev 6mo agoSentry MCP is great, “find out top 10 issues by users affected, check what it would take to fix and if you think it’s a low risk fix, apply it. Open a PR that links to the issues and explain the issue and the fix in three sentences max”.
- 8note 6mo agocouldnt the docs be a build output rather than a dedicated folder? keep the docs close to the code they document?