trust-boundary

trust-boundary is a cursor rule for Cursor from arturogarrido/claudinho. It costs 0 tokens per session (1,040 once invoked), scanned A, original, MIT.

A set of rules for turning untrusted provider responses and cache files into validated domain records. A trust boundary is the point where raw outside data is checked before the rest of the program can use it.

In plain words
What is it for?
Keeping fetching separate from parsing, validating live and cached data through the same constructors, and handling individual bad records separately from transport or JSON failures.
Why use it?
It prevents malformed, duplicate, or incomplete records from creating invalid matches or market signals. One bad record should not discard usable records from the same response.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Keeping fetching separate from parsing, validating live and cached data through the same constructors, and handling individual bad records separately from transport or JSON failures.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/arturogarrido/claudinho/trust-boundary
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/arturogarrido/claudinho

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 trust-boundary

README.md
[![agentmods](https://agentmods.dev/badge/rules/arturogarrido/claudinho/trust-boundary.svg)](https://agentmods.dev/rules/arturogarrido/claudinho/trust-boundary)
Your own site
<a href="https://agentmods.dev/rules/arturogarrido/claudinho/trust-boundary"><img src="https://agentmods.dev/badge/rules/arturogarrido/claudinho/trust-boundary.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,040 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.01040
Opus 5 $0.00000 $0.00520
Sonnet 5 $0.00000 $0.00208
Haiku 4.5 $0.00000 $0.00104

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

Security

Grade A, and why

trust-boundary 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/trust-boundary.mdc · 70 lines

How it starts

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

The trust boundary

Feed responses and local cache files are untrusted input. They enter through packages/core/src/trust/ and leave as a domain type or as a stated reason they could not. Nothing else builds a Match or a MarketSignal from raw input.

Rules

  • An adapter FETCHES; it does not interpret. Parsing lives in trust/ (trust/espn.ts is the model). The adapter that also parsed is how id and kickoff ended up copied verbatim while every string beside them was cleaned.
  • Record refusal is local, not a provider outage. ProviderAdapter returns plain arrays. Omit malformed, duplicate, or truncated records while keeping readable siblings usable and attributed to the provider. Throw into the degraded path only for transport/JSON failure, or an incomplete payload with no usable records. Parser-local BoundedList.complete is diagnostic; never promote one refused record into a batch-wide blackout.
  • Both paths end at the same constructor. Live and cache reads call sealMatch / sealMarketSignal. When they had separate rules, each fix landed on one of them; core/test/trust-parity.test.ts asserts they agree, as a JSON round trip, because that is literally what the cache file is.
  • Text has roles. humanLabel is prose — no controls, no format characters, no emoji, bounded by display columns and code points. opaqueId is checked against an exact grammar. canonicalTimestamp re-emits one form and refuses a date that does not exist. productFlag GENERATES the flag from the nation.
  • Never accept a product glyph from input. While flags travelled through the text filter it needed an emoji carve-out, and a carve-out without a grammar is a covert channel: TAG characters, variation selectors and ZWJ each rode through it. A 🏴 plus 42 tag characters is ONE two-column glyph spelling a full instruction sentence — invisible on a terminal, legible to a model reading --json.
  • Say which kind of failure it is. ParseResult = valid / definitive-none / malformed / ambiguous / unresolved. For per-item market resolution, valid, definitive-none and ambiguous are stable and cacheable; malformed and unresolved must not become definitive negatives. A successful provider batch with one malformed sibling is still shared for the coalescing TTL: identical bytes will parse identically, and immediate refetches only waste egress and starve the readable records.
  • Enrichment completeness reaches the renderer. Market cache/fetch helpers return { signals, complete }; default-on annotations, dedicated tools, share cards, and structured output retain it. Only a complete empty batch may say "no signal"; an incomplete one warns and carries marketComplete:false or complete:false.
  • Bound the work, not just the output. takeBounded slices before the per-record map. A surface reports total/shown/truncated from one BoundedList; no handler recomputes a count. total is exact only when complete is true, so incomplete hot-path scans use a nonnumeric more marker rather than guessing how many valid records remain. MCP response limiting preflights depth, width, entries, containers, and aggregate text before serialization or recursive shrinking; a byte cap alone does not bound the CPU and allocation spent discovering that a payload is too large.
  • Fail closed on ABSENCE. A missing field must be at least as rejecting as a wrong one. Five market gates were x != null && ..., so the more malformed payload was the more successful one.

Read the full file on GitHub · 70 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. 8d ago First seen · 70 lines · 0 tokens per session scan A dfc6961a3880

Subscribe to this mod's changes

trust-boundary is a cursor rule published in the GitHub repository arturogarrido/claudinho (28 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,040 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-08-30.