module-boundaries

module-boundaries is a cursor rule for Cursor from paperclipai/paperclip. It costs 525 tokens per session, scanned A, original, MIT.

A set of coding rules for keeping each behavior inside the software module that owns it and keeping shared interfaces narrow. A module is a part of a program responsible for a related area of behavior.

In plain words
What is it for?
Use it when adding or changing behavior across modules, reviewing ownership, designing shared interfaces, and deciding where parsing or provider logic belongs.
Why use it?
It reduces tangled dependencies and prevents provider-specific details from spreading through unrelated parts of the codebase.

Cursor rule for Cursor

Written for Cursor: a Cursor rule (.mdc).

Good fit Use it when adding or changing behavior across modules, reviewing ownership, designing shared interfaces, and deciding where parsing or provider logic belongs.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/paperclipai/paperclip/module-boundaries
About the project

Paperclip is a Node.js server and React application for coordinating AI agents as a business team, with goals, organizational roles, budgets, governance, and work tracking in one interface. It is used by people managing multiple agents or autonomous agent organizations across tools such as OpenClaw, Claude Code, Codex, and Cursor. The catalogue includes skills, agents, an MCP add-on, and an instruction for working with Paperclip.

paperclipai/paperclip · 118,214 stars · on GitHub · paperclip.ing

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/paperclipai/paperclip

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 module-boundaries

README.md
[![agentmods](https://agentmods.dev/badge/rules/paperclipai/paperclip/module-boundaries/github.svg)](https://agentmods.dev/rules/paperclipai/paperclip/module-boundaries)
Your own site
<a href="https://agentmods.dev/rules/paperclipai/paperclip/module-boundaries"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/module-boundaries/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for module-boundaries

Your own site · 80×15
<a href="https://agentmods.dev/rules/paperclipai/paperclip/module-boundaries"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/module-boundaries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 525 This file is loaded in full into every session.
When invoked 525 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.00525 $0.00525
Opus 5.5 $0.00210 $0.00210
Sonnet 5.5 $0.00105 $0.00105
Haiku 4.5 $0.00052 $0.00052

Measured 1mo ago against content hash c81d7c31d6cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

module-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 1mo 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.

rules/module-boundaries.mdc · 47 lines

What it actually says

Module boundaries

Apply to new or materially changed behavior across modules. Follow subsystem ownership rules; unrelated code need not be reorganized.

  • Choose ownership first. Identify the owner, existing contract, and missing shared capability in the task's existing plan or PR. No separate document or approval is required. Convenient local variables do not justify orchestrator logic.
  • Isolate implementation details. Provider protocols, payload parsing, workarounds, and feature sequencing belong with their owner. Shared code consumes normalized domain contracts, not provider payloads or SDK types. Small registries and dispatch branches may select implementations and delegate behavior.
  • Keep contracts narrow. Reuse extension points; add only what the workflow needs. Pass required dependencies, not the whole service context. Moving code or renaming interfaces does not remove coupling. A coherent shared contract should survive provider removal or substitution. One consumer can justify it; speculative reuse or another fixture alone cannot. Preserve provider differences rather than forcing a universal interface.
  • Preserve invariant ownership. Authorization, company isolation, audit, transactions, and resource ownership retain their existing owners. Adapters must neither bypass controls nor create parallel enforcement paths.
  • Explain shared changes. For each substantive change outside the owner, explain the capability, why existing contracts are insufficient, affected consumers, and behavior with the feature absent or disabled. Group related files. Catalog entries, branding, schemas, and registration may stay in established locations without teaching shared execution the provider protocol.
  • Separate ownership from delivery scope. Even well-factored platform work may need a separate reviewable slice or explicit PR-stack dependency to clarify effects on existing consumers. Keep tests and docs with behavior. Preserve requested features and delivery constraints; avoid unusable intermediate states and arbitrary PR/file counts.

Verify: Exercise observable behavior through new and relevant existing consumers, including affected absent/disabled states—not just helper calls. A different-protocol fixture can expose coupling but proves neither production compatibility nor the abstraction's necessity.

Review: Flag misplaced behavior, leaked private representations, duplicated invariant ownership, and unexplained shared changes; name the proper owner and contract. Recheck necessity and scope after refactoring. Identifier searches, line counts, and passing CI alone do not establish sound boundaries.

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. 1mo ago First seen · 47 lines · 525 tokens per session scan A c81d7c31d6cc

Subscribe to this mod's changes

module-boundaries is a cursor rule published in the GitHub repository paperclipai/paperclip (118,214 stars, last pushed yesterday), licensed MIT. It adds 525 tokens to every session, about $0.0021 per session on Opus 5.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-10-22.

Related

module-boundaries compared with cursor rules from other repositories

module-boundaries next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
module-boundariespaperclipai/paperclipCursor rule118kyesterdayMITA525Cursor
ponytailDietrichGebert/ponytailCursor rule201k8d agoMITA604Cursor
angular-20angular/angularCursor rule102k4d agoMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Cursor