coverage-thresholds

coverage-thresholds is a cursor rule for Cursor from brendadeeznuts1111/betting-brain-v3. It costs 0 tokens per session (780 once invoked), scanned A, original, MIT.

Rules for measuring how much of the code tests cover. Code coverage shows which parts of the program are exercised by tests.

In plain words
What is it for?
Use it to configure Bun test commands, generate coverage reports, and make CI fail when production coverage falls below the required level.
Why use it?
It keeps production code held to an 80% coverage threshold while allowing analytics tests to use a separate, more flexible standard.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to configure Bun test commands, generate coverage reports, and make CI fail when production coverage falls below the required level.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds
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/brendadeeznuts1111/betting-brain-v3

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 coverage-thresholds

README.md
[![agentmods](https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds/github.svg)](https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds)
Your own site
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coverage-thresholds

Your own site · 80×15
<a href="https://agentmods.dev/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds"><img src="https://agentmods.dev/badge/rules/brendadeeznuts1111/betting-brain-v3/coverage-thresholds.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 780 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.00780
Opus 5 $0.00000 $0.00390
Sonnet 5 $0.00000 $0.00156
Haiku 4.5 $0.00000 $0.00078

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

Security

Grade A, and why

coverage-thresholds 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/coverage-thresholds.mdc · 119 lines

How it starts

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

Coverage Threshold Rules

Dual Threshold System

This codebase uses dual coverage thresholds to balance:

  • Strict production standards
  • Flexible analytics testing

Main Suite: 80% Coverage (Strict)


# bunfig.toml
coverage = false  # coverage off by default
coverageThreshold = 0.8   # 80% for production code

Analytics Suite: 0% Coverage (Flexible)


# bunfig.analytics.toml
coverage = true
coverageThreshold = 0  # No threshold for analytics tests

Package.json Scripts

Main Suite Commands


{
  "test": "bun test --randomize",
  "test:coverage": "bun test --coverage --randomize"
}

Analytics Suite Commands


{
  "analytics:test": "bun test tests/unit/analytics-testing-example.test.ts --randomize",
  "analytics:test:coverage": "bun test --coverage --randomize tests/unit/analytics-testing-example.test.ts --config bunfig.analytics.toml",
  "analytics:ci": "CI=true bun run analytics:test:coverage"
}

Why Dual Thresholds?

Production Code (80% threshold)

  • Purpose: Ensure high-quality, well-tested production code
  • Scope: All business logic, API endpoints, core functionality
  • Enforcement: CI fails if coverage < 80%

Analytics Code (0% threshold)

  • Purpose: Allow rapid iteration on analytics utilities
  • Scope: Test helpers, stubs, analytics-specific utilities
  • Enforcement: No coverage requirement, focus on functionality

Configuration Hierarchy

bunfig.toml (root)
    ↓ (always takes precedence for critical settings)
--config flag
    ↓ (limited override capability)
Environment variables
    ↓ (minimal support)

Best Practices

✅ Do These

  • Keep main threshold at 80% for production quality
  • Use analytics config only for analytics tests
  • Document threshold rationale in commit messages
  • Test both thresholds in CI

❌ Don't Do These

  • Lower main threshold below 80%
  • Use analytics config for production code
  • Mix threshold configurations
  • Ignore coverage failures in main suite

Read the full file on GitHub · 119 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 · 119 lines · 0 tokens per session scan A d4a42222041e

Subscribe to this mod's changes

coverage-thresholds is a cursor rule published in the GitHub repository brendadeeznuts1111/betting-brain-v3 (8 stars, last pushed 11mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 780 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-31.