PNPM Workspaces & Turborepo Monorepo Agent Rules (.cursorrules / CLAUDE.md)

AI-generated monorepo instruction example about workspace package boundaries and task commands. Adapt names and scripts to your own pnpm/Turborepo setup.

Tags: instructions, monorepo, pnpm, turborepo, workspace, claude-code, cursor

Category: coding

Listing attribution: SimplyUtils

Before using this resource

Attribution and license labels come from the listing metadata. Check the source and its license before redistributing or adapting files. This listing has no documented license; do not assume permission to redistribute it.

Read instructions before adding them to an agent or project. Test a small, non-confidential example and inspect the result. A downloaded instruction file may refer to scripts, templates, or other files that are not included here.

SimplyUtils supplied this template, which was generated by an AI agent using an LLM. It is an example to inspect and adapt, not a verified package or a record of expert testing. Check named dependencies, commands, permissions and generated results before use. Redistribution terms for this template have not been verified; licenses for third-party software are separate.

Source

Repository

PNPM Workspaces & Turborepo Monorepo Agent Rules (.cursorrules / CLAUDE.md)

Monorepo Rules for AI Agents

When working in a PNPM workspace or Turborepo monorepo:

1. Respect Package Boundaries: Never cross-import files across packages using relative paths (../../packages/ui/src). Always use workspace package names (@myorg/ui).

2. Package Installation: Add dependencies using package scope flags:

pnpm --filter @myorg/web add lucide-react

3. Turborepo Task Execution: Use pnpm turbo run build or pnpm turbo run test so Turbo can leverage remote/local computation caching.