monorepo-template / core
louisbrulenaudet/monorepo-template/.cursor/rules/core/boundaries.mdc
Package dependency boundaries - tag map and enforced invariants.
Cursor rule19 starsChanged 6 days ago
What's in it
- Package Boundaries
- Tag map
- Invariants
--- description: "Package dependency boundaries - tag map and enforced invariants." alwaysApply: false globs: **/turbo.json --- # Package Boundaries Root `turbo.json` `boundaries.tags` is the enforcement: `pnpm boundaries` (inside `pnpm run ci`) **fails CI** on a violation, it is not a convention. This rule is the rationale. ## Tag map | Tag | Packages | |-----|----------| | `app` | every `front-*` / `worker-*` / `queue-*` / `webhook-*` / `mcp-*` | | `contracts` | `@repo/dtos-common` | | `contracts-base` | `@repo/enums-common` | | `lib` | `@repo/correlation-id` | | `config` | `@repo/typescript-config`, `@repo/vitest-config` | ## Invariants - **Nothing may depend on an `app`.** `app.dependents.deny` lists all four tags, so apps are entry points and never installable dependencies. Worker-to-Worker calls go through service-binding RPC declared in `wrangler.jsonc` - never a package import. - **The contract chain cannot invert.** `contracts` → `contracts-base` → `config` are declared as allow-lists, so the documented `enums → dtos` direction is genuinely enforced and cannot become a cycle. - **`lib` must not depend on apps or contracts.** `lib.dependencies.allow` is `["config"]`: apps may depend on `lib`, never the reverse. - **A new package must declare its tag.** Add `turbo.json` with `"extends": ["//"]` and a `tags` entry, or `pnpm boundaries` reports it as untagged. - **`config` depends on nothing internal.** `config.dependencies.allow` is `[]`, so `@repo/typescript-config` and `@repo/vitest-config` cannot depend on any tagged workspace package.
More agent context in louisbrulenaudet/monorepo-template
68 other files this repository gives its agents, the first 60 shown.
CLAUDE.md
Cursor rule
- .cursor/rules/backend/hono-gateway.mdc
- .cursor/rules/backend/ports.mdc
- .cursor/rules/backend/workers-cache.mdc
- .cursor/rules/backend/workers-config.mdc
- .cursor/rules/contracts/contracts.mdc
- .cursor/rules/contracts/type-inference.mdc
- .cursor/rules/core/guardrails.mdc
- .cursor/rules/core/turborepo.mdc
- .cursor/rules/core/worktrees.mdc
- .cursor/rules/frontend/frontend-architecture.mdc
- .cursor/rules/frontend/react-doctor.mdc
- .cursor/rules/frontend/react.mdc
- .cursor/rules/frontend/tailwind.mdc
- .cursor/rules/frontend/tanstack-query.mdc
- .cursor/rules/frontend/tanstack-router.mdc
- .cursor/rules/frontend/vite-config.mdc
- .cursor/rules/ops/cd.mdc
- .cursor/rules/ops/ci.mdc
- .cursor/rules/ops/previews.mdc
- .cursor/rules/ops/release.mdc
- .cursor/rules/quality/code-style.mdc
- .cursor/rules/quality/comments.mdc
- .cursor/rules/quality/knip.mdc
- .cursor/rules/quality/markdown-style.mdc
- .cursor/rules/quality/naming.mdc
- .cursor/rules/quality/testing.mdc
- .cursor/rules/quality/typescript-config.mdc
- .cursor/rules/quality/vitest-config.mdc
- .cursor/rules/tests/front-react.mdc
- .cursor/rules/tests/hono-workers.mdc
- .cursor/rules/tests/vitest.mdc
Skill
- front-vitest.agents/skills/front-vitest/SKILL.md
- git-commit.agents/skills/git-commit/SKILL.md
- hono.agents/skills/hono/SKILL.md
- monorepo-agent-setup.agents/skills/monorepo-agent-setup/SKILL.md
- playwright-cli.agents/skills/playwright-cli/SKILL.md
- pnpm.agents/skills/pnpm/SKILL.md
- privileged-legal-data.agents/skills/privileged-legal-data/SKILL.md
- react-doctor.agents/skills/react-doctor/SKILL.md
- review-architecture.agents/skills/review-architecture/SKILL.md
- review-ci.agents/skills/review-ci/SKILL.md
- review-code-quality.agents/skills/review-code-quality/SKILL.md
- review-configuration.agents/skills/review-configuration/SKILL.md
- review-performance.agents/skills/review-performance/SKILL.md
- review-security.agents/skills/review-security/SKILL.md
- review-seo.agents/skills/review-seo/SKILL.md
- review.agents/skills/review/SKILL.md
- review-stack.agents/skills/review-stack/SKILL.md
- review-tests.agents/skills/review-tests/SKILL.md
- review-ui.agents/skills/review-ui/SKILL.md
- run-app.agents/skills/run-app/SKILL.md
- security-audit.agents/skills/security-audit/SKILL.md
- skills-update.agents/skills/skills-update/SKILL.md
- tanstack-config.agents/skills/tanstack-config/SKILL.md
- tanstack-devtools.agents/skills/tanstack-devtools/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
Reports can't be read right now.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

