boundaries

boundaries is a cursor rule for Cursor from louisbrulenaudet/monorepo-template. It costs 415 tokens per session, scanned A, original, Apache-2.0.

A set of dependency-boundary rules for a monorepo, which is one repository containing multiple related packages and applications. It assigns package categories and restricts which categories may depend on others.

In plain words
What is it for?
It helps enforce application, library, configuration, and shared-contract boundaries, including rules for Worker-to-Worker communication.
Why use it?
It catches unwanted imports and dependency cycles before they spread through the codebase or fail later in production.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit It helps enforce application, library, configuration, and shared-contract boundaries, including rules for Worker-to-Worker communication.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/louisbrulenaudet/monorepo-template/boundaries
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/louisbrulenaudet/monorepo-template

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for boundaries

README.md
[![agentmods](https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/boundaries.svg)](https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/boundaries)
Your own site
<a href="https://agentmods.dev/rules/louisbrulenaudet/monorepo-template/boundaries"><img src="https://agentmods.dev/badge/rules/louisbrulenaudet/monorepo-template/boundaries.svg" alt="Measured on agentmods" height="20"></a>
Per session 415 This file is loaded in full into every session.
When invoked 415 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00415 $0.00415
Opus 5 $0.00208 $0.00208
Sonnet 5 $0.00083 $0.00083
Haiku 4.5 $0.00042 $0.00042

Measured 8d ago against content hash 6f66ae265a3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

boundaries scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/core/boundaries.mdc · 27 lines

What it actually says

Package Boundaries

turbo.json under boundaries.tags is the source of truth and it is already commented - read it rather than trusting a copy. pnpm boundaries (inside pnpm run ci) enforces it: a violation fails CI, it is not a convention. This file carries only what the config cannot say about itself.

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. contractscontracts-baseconfig are declared as allow-lists, so the documented enums → dtos direction is genuinely enforced and cannot become a cycle.
  • 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.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 27 lines · 415 tokens per session scan A 6f66ae265a3b

Subscribe to this mod's changes

boundaries is a cursor rule published in the GitHub repository louisbrulenaudet/monorepo-template (19 stars, last pushed 7d ago), licensed Apache-2.0. It adds 415 tokens to every session, about $0.0021 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.