In plain words
A monorepo holds several projects in one repository, such as a web app, a background worker and a shared package, so one change can update all of them together.
Where you see it
Harbor's repository has apps/web, apps/worker for sending invoices, and packages/billing used by both. npm, pnpm or Yarn workspaces link them locally, and tools like Turborepo or Nx run only the builds and tests a change affects.
What goes wrong
- Running every test on every change
A one-line fix in the web app triggers the worker's slow test suite too, and CI takes 40 minutes. Use your tool's affected or filter option so each change runs only what it can touch.
- Agents wandering across the whole repository
An agent asked to fix the worker reads all three projects and edits code in the wrong one. Point it at the folder by path, and give each app a short rules file saying how to build and test it.
- Apps reaching into each other's internals
apps/web imports a file deep inside apps/worker, and now neither can change without breaking the other. Share code only through packages, imported by package name.
import { retry } from "../../worker/src/lib/retry";
What to tell your agent
Quick check
Sign in to earn +10 XP for itHarbor's web app and worker both need the proration rules. In a monorepo, where should that code live?