Cursor rule
.cursor/rules/trust-boundary.mdcWhere untrusted input becomes a domain type, and the rules that hold there
Cursor rules
Quality
58/100
Scores the file, not the repository.Length
597 words
3 headings · 0 code blocksRepository
27
— · pushed 0 days agoLast changed
yesterday
First indexed yesterday.1234567# The trust boundary89Feed responses and local cache files are untrusted input. They enter through10`packages/core/src/trust/` and leave as a domain type or as a stated reason they11could not. Nothing else builds a `Match` or a `MarketSignal` from raw input.1213## Rules1415- **An adapter FETCHES; it does not interpret.** Parsing lives in `trust/`16 (`trust/espn.ts` is the model). The adapter that also parsed is how `id` and17 `kickoff` ended up copied verbatim while every string beside them was cleaned.18- **Record refusal is local, not a provider outage.** `ProviderAdapter` returns19 plain arrays. Omit malformed, duplicate, or truncated records while keeping20 readable siblings usable and attributed to the provider. Throw into the21 degraded path only for transport/JSON failure, or an incomplete payload with22 no usable records. Parser-local `BoundedList.complete` is diagnostic; never23 promote one refused record into a batch-wide blackout.24- **Both paths end at the same constructor.** Live and cache reads call25 `sealMatch` / `sealMarketSignal`. When they had separate rules, each fix landed26 on one of them; `core/test/trust-parity.test.ts` asserts they agree, as a JSON27 round trip, because that is literally what the cache file is.28- **Text has roles.** `humanLabel` is prose — no controls, no format characters,29 **no emoji**, bounded by display columns *and* code points. `opaqueId` is30 checked against an exact grammar. `canonicalTimestamp` re-emits one form and31 refuses a date that does not exist. `productFlag` GENERATES the flag from the32 nation.33- **Never accept a product glyph from input.** While flags travelled through the34 text filter it needed an emoji carve-out, and a carve-out without a grammar is35 a covert channel: TAG characters, variation selectors and ZWJ each rode through36 it. A `🏴` plus 42 tag characters is ONE two-column glyph spelling a full37 instruction sentence — invisible on a terminal, legible to a model reading38 `--json`.39- **Say which kind of failure it is.** `ParseResult` = `valid` /40 `definitive-none` / `malformed` / `ambiguous` / `unresolved`. For per-item41 market resolution, `valid`, `definitive-none` and `ambiguous` are stable and42 cacheable; `malformed` and `unresolved` must not become definitive negatives.43 A successful provider batch with one malformed sibling is still shared for44 the coalescing TTL: identical bytes will parse identically, and immediate45 refetches only waste egress and starve the readable records.46- **Enrichment completeness reaches the renderer.** Market cache/fetch helpers47 return `{ signals, complete }`; default-on annotations, dedicated tools,48 share cards, and structured output retain it. Only a complete empty batch may49 say "no signal"; an incomplete one warns and carries `marketComplete:false`50 or `complete:false`.51- **Bound the work, not just the output.** `takeBounded` slices *before* the52 per-record map. A surface reports `total`/`shown`/`truncated` from one53 `BoundedList`; no handler recomputes a count. `total` is exact only when54 `complete` is true, so incomplete hot-path scans use a nonnumeric `more`55 marker rather than guessing how many valid records remain. MCP response56 limiting preflights depth, width, entries, containers, and aggregate text57 before serialization or recursive shrinking; a byte cap alone does not bound58 the CPU and allocation spent discovering that a payload is too large.59- **Fail closed on ABSENCE.** A missing field must be at least as rejecting as a60 wrong one. Five market gates were `x != null && ...`, so the more malformed61 payload was the more successful one.6263## Changing this area6465Add the property to `core/test/trust-properties.test.ts` (table-driven off each66type's declared key list, so a new field fails by default), and **verify it goes67red** with the rule reverted — a property test you have not made fail is pinning68nothing. If it is a claim `SECURITY.md` makes, cite the test there;69`core/test/security-claims.test.ts` fails if a citation rots.70
Also in arturogarrido/claudinho
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| arturogarrido/claudinho.cursor/rules/bundle-bracket-pr.mdc · 27 | Cursor rules | buildtesttesting-strategygit+1 | 79/100 | 2 days ago | |
| arturogarrido/claudinho.cursor/rules/change-discipline.mdc · 27 | Cursor rules | no sections | 30/100 | yesterday | |
| arturogarrido/claudinho.cursor/rules/release-discipline.mdc · 27 | Cursor rules | lint-formatgitperformancedeployment+1 | 63/100 | 2 days ago | |
| arturogarrido/claudinho.cursor/rules/surface-parity.mdc · 27 | Cursor rules | lint-formattesting-strategyperformancedo-not | 68/100 | 2 days ago | |
| arturogarrido/claudinhoAGENTS.md · 27 | AGENTS.md | setuptestlint-formatstyle+8 | 84/100 | yesterday | |
| arturogarrido/claudinhoCLAUDE.md · 27 | CLAUDE.md | lint-formatperformanceagent-behaviour | 72/100 | 2 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
