gate-trace

gate-trace is a cursor rule for Cursor from danielvm-git/bigpowers. It costs 50 tokens per session (1,106 once invoked), scanned A, original, MIT.

Deterministic traceability quality gate — reads coverage matrix + blind-spot data, applies decision rules with oracle confidence downgrade, emits PASS/CONCERNS/FAIL/WAIVED verdict. Use before release-branch to gate merges on traceability.

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/danielvm-git/bigpowers/gate-trace
Clone the repo
git clone --depth 1 https://github.com/danielvm-git/bigpowers

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 gate-trace

README.md
[![agentmods](https://agentmods.dev/badge/rules/danielvm-git/bigpowers/gate-trace.svg)](https://agentmods.dev/rules/danielvm-git/bigpowers/gate-trace)
Your own site
<a href="https://agentmods.dev/rules/danielvm-git/bigpowers/gate-trace"><img src="https://agentmods.dev/badge/rules/danielvm-git/bigpowers/gate-trace.svg" alt="Measured on agentmods" height="20"></a>
Per session 50 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,106 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.00050 $0.01106
Opus 5 $0.00025 $0.00553
Sonnet 5 $0.00010 $0.00221
Haiku 4.5 $0.00005 $0.00111

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

Security

Grade A, and why

gate-trace 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.

.cursor/rules/gate-trace.mdc · 92 lines

How it starts

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

Gate Trace

Deterministic quality gate that combines traceability coverage and blind-spot data into a single PASS/FAIL/CONCERNS/WAIVED decision before release.

Decision Rules

Rule Condition Verdict
R1 Any undone story with 0 code tags FAIL
R2 Any story done but no verify evidence CONCERNS
R3 P0 story (top WSJF quartile) with 0% coverage FAIL
R4 Overall coverage < 60% CONCERNS
R6 P0 story + eNN-TEST_PLAN_LATEST.md exists + zero SC-eNNsYY-P0-* in test files CONCERNS
R5 Overall ≥ 80% + no critical gaps + all verify → PASS PASS

Oracle Confidence Downgrade

TEA-inspired: if trace links rely on heuristics rather than explicit tags, confidence drops.

Heuristic Ratio Downgrade
> 50% links from heuristics (file-name or task-reference) One level (PASS→CONCERNS, CONCERNS→FAIL)
> 80% links from heuristics Two levels (PASS→FAIL, CONCERNS→FAIL)

Process

  1. Pre-flight: Ensure scripts/trace-stories.sh --json has been run (produces specs/traceability-matrix.json). If not present, run it.
  2. Ensure scripts/check-blind-spots.sh has been run (produces specs/blind-spots.json). If not present, run it.
  3. Read specs/traceability-matrix.json and specs/blind-spots.json.
  4. Apply decision rules R1–R5 in order (first match wins).
  5. Apply oracle confidence downgrade based on the heuristic link ratio from the matrix's oracle_stats.
  6. Drift check (e39s03): If specs/drift-report.json exists and has suspect links, mark verdict as CONCERNS with note: "Drift detected — some implementing files are newer than their specs. Run scripts/check-spec-drift.sh for details."
  7. Output verdict + rationale to stdout.
  8. Adversarial refute check (e45s32): Before emitting PASS, attempt to refute the verdict — list at least one concrete traceability gap that would block merge if it were real. If the gap is real, downgrade the verdict. Rubber-stamping is prohibited; every PASS must survive one refutation attempt.
  9. Completeness critic (e45s05) — Run adversarial gap-finding:

Read the full file on GitHub · 92 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 · 92 lines · 50 tokens per session scan A c712b007cfb7

Subscribe to this mod's changes

gate-trace is a cursor rule published in the GitHub repository danielvm-git/bigpowers (163 stars, last pushed 2d ago), licensed MIT. It adds 50 tokens to every session and 1,106 once invoked, about $0.0003 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-09-03.