runtime-dependency-boundaries

runtime-dependency-boundaries is a cursor rule for Cursor from paperclipai/paperclip. It costs 0 tokens per session (552 once invoked), scanned A, original, MIT.

A rule for accounting for the real cost and failure behavior of dependencies used during application startup, request handling, discovery, or recurring work.

In plain words
What is it for?
It helps inspect dependency behavior, match call frequency to how often data changes, keep unrelated work responsive, and test assumptions that could invalidate the design.
Why use it?
Mocks can hide blocking calls, repeated work, slow failures, and operations that continue after a timeout, leading to designs that make shared services less responsive.

Cursor rule for Cursor

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

Good fit It helps inspect dependency behavior, match call frequency to how often data changes, keep unrelated work responsive, and test assumptions that could invalidate the design.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/paperclipai/paperclip/runtime-dependency-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 · 102,719 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 runtime-dependency-boundaries

README.md
[![agentmods](https://agentmods.dev/badge/rules/paperclipai/paperclip/runtime-dependency-boundaries/github.svg)](https://agentmods.dev/rules/paperclipai/paperclip/runtime-dependency-boundaries)
Your own site
<a href="https://agentmods.dev/rules/paperclipai/paperclip/runtime-dependency-boundaries"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/runtime-dependency-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 runtime-dependency-boundaries

Your own site · 80×15
<a href="https://agentmods.dev/rules/paperclipai/paperclip/runtime-dependency-boundaries"><img src="https://agentmods.dev/badge/rules/paperclipai/paperclip/runtime-dependency-boundaries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 552 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.00552
Opus 5.5 $0.00000 $0.00221
Sonnet 5.5 $0.00000 $0.00110
Haiku 4.5 $0.00000 $0.00055

Measured today against content hash 24202e5d4166, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

runtime-dependency-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 today.

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/runtime-dependency-boundaries.mdc · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Runtime dependency boundaries

Apply this rule when adding or moving dependency calls into startup, request handling, discovery, or recurring orchestration in the server, adapters, or runner. A dependency includes a runtime API, filesystem, database, subprocess, or remote service.

Account for the work at the call site

Establish what the dependency actually does: whether it blocks shared execution, how often it runs, what its cost grows with, and how it fails or stops. Reading a small result does not imply a cheap operation. Use implementation, documentation, or measurement as evidence when the behavior is not established.

Match repeated work to how often its underlying facts can change. Account for calls inside loops and repeated requests. Keep unrelated work responsive when the dependency is slow or unavailable. If using a timeout or cancellation, verify that it can take effect while the operation is running and account for work that continues after the caller stops waiting.

Test the assumption that could invalidate the design

Identify the consequential assumption introduced by the change and choose evidence that could disprove it. Check whether mocks remove the behavior being relied upon, such as timing, contention, cancellation, persistence, or external side effects. Where they do, exercise that boundary with a representative real dependency or a controlled fault that preserves the relevant behavior.

Verify the affected contract, including unrelated work that must remain responsive, rather than only the returned value. Keep coverage proportional to the changed behavior; an exhaustive environment matrix is unnecessary. Record the assumption, evidence, and remaining limits in the PR's verification section.

Examples and limits

  • A configuration getter that reads a network filesystem needs evidence about slow or unavailable storage and the effect on other work using that process.
  • A remote permission check moved inside a search-result loop needs evidence about call count and latency as the result set grows. Any reuse must preserve authorization scope and freshness.
  • Reading an already-loaded map or changing a pure value transformation does not require dependency-failure testing unless the change introduces a consequential cost or behavior assumption. Cosmetic edits do not trigger it.

Read the full file on GitHub · 55 lines

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. today First seen · 55 lines · 0 tokens per session scan A 24202e5d4166

Subscribe to this mod's changes

runtime-dependency-boundaries is a cursor rule published in the GitHub repository paperclipai/paperclip (102,719 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 552 tokens. 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-16.