seam-audit

A method for finding interface-seam bugs, where two connected parts of a system do not actually pass information between each other. It checks UI, events, fields, routes, database columns, producers, and consumers, while distinguishing real gaps from intentional omissions.

In plain words
What is it for?
Use it when investigating frontend/backend mismatches, dropped event fields, unwritten or unread data, disconnected controls, or routes and database columns that produce no result.
Why use it?
It prevents developers from treating a documented or retired feature as a bug and provides evidence-based categories for genuine gaps and drift.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/lawofall/agentcore/seam-audit
Clone the repo
git clone --depth 1 https://github.com/Lawofall/AgentCore

Made for: Cursor.

Per session 75 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 793 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00075 $0.00793
Opus 5 $0.00037 $0.00396
Sonnet 5 $0.00015 $0.00159
Haiku 4.5 $0.00007 $0.00079

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

Security

Grade A, and why

seam-audit 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 2d 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/seam-audit.mdc · 34 lines

What it actually says

接缝排查配方(interface-seam audit)

排查「一侧定义了、另一侧没接」的接缝 bug。逐轮结论正文见 git;公开仓不复述审计票号。

两类接缝签名(判据)

  1. 渲染画了却没接(drawn-but-not-wired)=一侧有 UI/控件/动词/handler,却没把输出真正喂到另一侧、或输出被静默丢弃。
    • 例:多选 scale 手柄画了不 hit-test;board_opsref 目标被 applier 丢。
  2. 已铺管线·零产出(plumbed-but-zero-producer/consumer)=字段/事件/路由/DB 列/类型在一侧已定义并承载,另一侧却无 producer(无人写/发)或无 consumer(无人读/渲)。
    • 例:rotation 全链认却无 producer;run_id 后端发前端丢;辩论 BatchMetrics 收了不 emit。

铁律:判 gap 前先查文档(防误报)

判「有后端无前端 / 有前端无后端」为 gap 之前,先 grep docs/ 看是否记为有意休眠 / 退役 / ⏳待后端——大量「缺口」实为 by-design(质量档 UI 内测退役、admin LLM 窗待后端、mobile lite 减法)。

弱证据不冒充 bug,置信五档只对前两档动手: GAP(真缺口·修)/ DRIFT(漂移·修)/ RESERVED(前瞻预留 → 远期规划)/ BY-DESIGN(有意 → 记档闭案)/ UNSURE(留观察)。

可复用配方

  1. 按面切分(画板/分享/admin/记忆/…)派并行只读探子,每子代理带「两签名 + 本铁律 + 五档置信 + 必附 file:line 证据」(子代理模型见 multitask.mdc)。与讨论并行时的主/子分相见 multitask.mdc「讨论 + 审计分相」。
  2. 探子回报的 GAP 先 Read 源码复核——别信行号(复核曾翻过「有前端无后端」误报);复核以外禁止主侧重跑整审计。
  3. 复核为实的 GAP·DRIFT 才修,改完 vitest/pytest + biome/ruff + tsc 自检。
  4. RESERVED 进 远期规划、BY-DESIGN 记档闭案、UNSURE 留观察。

收口判据

每批稳定 ~2 真 bug、二批后边际递减(多为 by-design)即收口,别为凑数造 busywork。

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. 2d ago First seen · 34 lines · 75 tokens per session scan A c15c90c55fdb

Subscribe to this mod's changes

seam-audit is a cursor rule published in the GitHub repository Lawofall/AgentCore (78 stars, last pushed 3d ago), licensed MIT. It adds 75 tokens to every session and 793 once invoked, about $0.0004 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.