Monorepo root
Root AGENTS.md for a pnpm and Turborepo workspace: commands, package boundaries, scope limits, and Changesets.
Composed from the monorepo rules pack. Same file from the CLI: aibysitter init --packs monorepo --format agents
Written for this site, CC0, scored by this linter, not tested against any agent.
- File
- AGENTS.md, 28 lines
- Format
- AGENTS.md
- Save as
AGENTS.md- Category
- General
- Tags
- License
- CC0 1.0, public domain. No attribution needed.
Download AGENTS.md Lint a copy
Aibysitter lint score
100 / 100 — A
Ruleset v4
No deductions.
Badge
Markdown for a README:
[](https://aibysitting.net/Gallery/monorepo-root)
AGENTS.md
# pnpm and Turborepo monorepo pnpm workspaces with Turborepo. Apps live in `apps/`, shared packages in `packages/`. A package can have its own `AGENTS.md`. The file closest to the code being edited takes precedence over this one. ## Commands (from the repo root) - Install: `pnpm install --frozen-lockfile` - Build everything: `pnpm turbo run build` - Test one package: `pnpm turbo run test --filter=<package-name>` - Test packages changed on this branch: `pnpm turbo run test --filter=...[origin/main]` - Lint and type check: `pnpm turbo run lint typecheck` ## Workspace - Packages import each other by package name (`@<scope>/ui`). No relative imports across package folders. - Every package lists the dependencies it imports in its own `package.json`. - Shared TypeScript settings come from `packages/tsconfig`. Package configs extend it and do not copy compiler options. - Add dependencies with `pnpm add <dep> --filter <package-name>`. `pnpm-lock.yaml` is not edited by hand. ## Scope - Change only the packages the task names. When another package needs a change, stop and describe the change instead of making it. - `turbo.json`, root `package.json` scripts, and CI workflows change only on explicit request. ## Versioning - Packages under `packages/` are versioned with Changesets. A change to a published package includes a changeset from `pnpm changeset`. - Apps are not versioned. ## Pull requests - Title format: `<package-name>: <summary>`. - The description lists every package the PR touches.
pnpm and Turborepo monorepo
pnpm workspaces with Turborepo. Apps live in apps/, shared packages in packages/. A package can have its own AGENTS.md. The file closest to the code being edited takes precedence over this one.
Commands (from the repo root)
- Install:
pnpm install --frozen-lockfile - Build everything:
pnpm turbo run build - Test one package:
pnpm turbo run test --filter=<package-name> - Test packages changed on this branch:
pnpm turbo run test --filter=...[origin/main] - Lint and type check:
pnpm turbo run lint typecheck
Workspace
- Packages import each other by package name (
@<scope>/ui). No relative imports across package folders. - Every package lists the dependencies it imports in its own
package.json. - Shared TypeScript settings come from
packages/tsconfig. Package configs extend it and do not copy compiler options. - Add dependencies with
pnpm add <dep> --filter <package-name>.pnpm-lock.yamlis not edited by hand.
Scope
- Change only the packages the task names. When another package needs a change, stop and describe the change instead of making it.
turbo.json, rootpackage.jsonscripts, and CI workflows change only on explicit request.
Versioning
- Packages under
packages/are versioned with Changesets. A change to a published package includes a changeset frompnpm changeset. - Apps are not versioned.
Pull requests
- Title format:
<package-name>: <summary>. - The description lists every package the PR touches.