bigpowers / rules
Cursor rule252 starsChanged 3 months agoMITView on GitHub
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.
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository165 other files it gives its agents.
- docs/AGENTS.mdAGENTS.md
- website/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- website/CLAUDE.mdCLAUDE.md
- .cursor/rules/align-grid.mdcCursor rule
- .cursor/rules/assess-impact.mdcCursor rule
- .cursor/rules/audit-code.mdcCursor rule
- .cursor/rules/audit-plan.mdcCursor rule
- .cursor/rules/build-epic.mdcCursor rule
- .cursor/rules/change-request.mdcCursor rule
- .cursor/rules/commit-message.mdcCursor rule
- .cursor/rules/compose-workflow.mdcCursor rule
- .cursor/rules/context7-mcp.mdcCursor rule
- .cursor/rules/craft-skill.mdcCursor rule
- .cursor/rules/deepen-architecture.mdcCursor rule
- .cursor/rules/define-language.mdcCursor rule
- .cursor/rules/define-success.mdcCursor rule
- .cursor/rules/delegate-task.mdcCursor rule
- .cursor/rules/deploy.mdcCursor rule
- .cursor/rules/design-interface.mdcCursor rule
- .cursor/rules/develop-tdd.mdcCursor rule
- .cursor/rules/diagnose-root.mdcCursor rule
- .cursor/rules/diagnose-stall.mdcCursor rule
- .cursor/rules/dispatch-agents.mdcCursor rule
- .cursor/rules/edit-document.mdcCursor rule
- .cursor/rules/elaborate-spec.mdcCursor rule
- .cursor/rules/enforce-first.mdcCursor rule
- .cursor/rules/evolve-skill.mdcCursor rule
- .cursor/rules/execute-plan.mdcCursor rule
- .cursor/rules/extract-design.mdcCursor rule
- .cursor/rules/find-way.mdcCursor rule
- .cursor/rules/fix-bug.mdcCursor rule
- .cursor/rules/generate-allure-report.mdcCursor rule
- .cursor/rules/grill-me.mdcCursor rule
- .cursor/rules/grill-with-docs.mdcCursor rule
- .cursor/rules/guard-git.mdcCursor rule
- .cursor/rules/harden-vps.mdcCursor rule
- .cursor/rules/hook-commits.mdcCursor rule
- .cursor/rules/inspect-quality.mdcCursor rule
- .cursor/rules/investigate-bug.mdcCursor rule
- .cursor/rules/kickoff-branch.mdcCursor rule
- .cursor/rules/maintain-wiki.mdcCursor rule
- .cursor/rules/map-codebase.mdcCursor rule
- .cursor/rules/migrate-spec.mdcCursor rule
- .cursor/rules/model-domain.mdcCursor rule
- .cursor/rules/orchestrate-project.mdcCursor rule
- .cursor/rules/organize-workspace.mdcCursor rule
- .cursor/rules/plan-refactor.mdcCursor rule
- .cursor/rules/plan-release.mdcCursor rule
- .cursor/rules/plan-tests.mdcCursor rule
- .cursor/rules/plan-work.mdcCursor rule
- .cursor/rules/publish-package.mdcCursor rule
- .cursor/rules/quick-fix.mdcCursor rule
- .cursor/rules/release-branch.mdcCursor rule
- .cursor/rules/request-review.mdcCursor rule
- .cursor/rules/research-first.mdcCursor rule
- .cursor/rules/reset-baseline.mdcCursor rule
- .cursor/rules/respond-review.mdcCursor rule
- .cursor/rules/run-benchmark.mdcCursor rule
- .cursor/rules/run-evals.mdcCursor rule
- The first 60 shown.
The file
We split this gate-trace.mdc into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Pre-flight: Ensure scripts/trace-stories.sh --json has been run (produces specs/traceability-matrix.json).
- Very specific: line 33
Ensure scripts/check-blind-spots.sh has been run (produces specs/blind-spots.json).
- Very specific: line 34
Read specs/traceability-matrix.json and specs/blind-spots.json.
- Very specific: line 37
Drift check (e39s03): If specs/drift-report.json exists and has suspect links, mark verdict as CONCERNS with note: "Drift detected — some …
- Very specific: line 47
Update specs/execution-status.yaml with gate-trace result.
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: "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." alwaysApply: false --- # 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: ```bash bash scripts/lib/completeness-critic.sh ``` Classify output as **BLOCKER / WARNING / FILLED**. **BLOCKER overrides any PASS verdict → FAIL.** Append critic summary to rationale. 10. Update `specs/execution-status.yaml` with gate-trace result. ## Verdict Semantics | Verdict | Meaning | Action | |---------|---------|--------| | PASS | All gates satisfied | Proceed with merge | | CONCERNS | Non-critical issues found | Requires explicit human override in `state.yaml` | | FAIL | Critical traceability gap | Block merge — fix gap first | | WAIVED | Cannot evaluate (missing inputs) | Skip gate — data not available | ## Output Format ```yaml gate_trace: verdict: PASS|CONCERNS|FAIL|WAIVED generated_at: "<ISO 8601>" rationale: "<human-readable explanation>" heuristic_ratio: <0.0–1.0> downgrade_applied: <true|false> ``` ## Integration Points - **release-branch SKILL.md** — pre-PR gate (FAIL blocks merge). - **sync-skills.yml** — runs `trace-stories.sh --strict` as its "Traceability gate" step (FAIL blocks pipeline), which shares this skill's coverage data (`traceability-matrix.json`) but does not invoke a gate-trace PASS/CONCERNS/FAIL/WAIVED verdict directly. - **verify-work SKILL.md** — runs blind-spot checks; gate-trace consumes the result. ## References - BMAD TEA traceability approach (market survey 2026-07-02). - scripts/trace-stories.sh (e38s01) — produces traceability-matrix.json. - scripts/check-blind-spots.sh (e38s04) — produces blind-spots.json. - specs/execution-status.yaml — output target for gate result. ## Handoff Gate: READY → next: release-branch (final step before merge) Writes: state.yaml handoff.next_skill = release-branch ## Verify → verify: `test -x scripts/run-gate-trace-verify.sh && bash scripts/run-gate-trace-verify.sh --self-test && echo OK`
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

