coverage-ratchet
Skill1 starsChanged 2 months agoMITView on GitHub
Use coverage as a one-way ratchet on changed lines instead of a vanity percentage — measure, set the floor at today's number, block regressions, and target uncovered risk rather than uncovered files. Use when asked to improve coverage or when a coverage gate is being configured.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- nfeuer/project-foundation-kittheir own version, first seen Jul 5, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- nfeuer/project-foundation-kit★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository34 other files it gives its agents.
- a11y-auditSkill
- api-contract-testingSkill
- autonomous-explorationSkill
- bug-reproSkill
- chaos-resilienceSkill
- ci-wiringSkill
- contract-testing-pactSkill
- database-testingSkill
- e2e-authoringSkill
- environment-paritySkill
- exploratory-chartersSkill
- false-positive-hunterSkill
- flake-forensicsSkill
- i18n-l10n-testingSkill
- load-and-stressSkill
- mutation-proofSkill
- never-break-prodSkill
- payment-testingSkill
- perf-budgetSkill
- qa-triageSkill
- regression-curationSkill
- release-gateSkill
- responsive-mobile-testingSkill
- risk-mapSkill
- root-cause-protocolSkill
- security-regressionSkill
- smoke-and-sanitySkill
- state-machine-testingSkill
- test-data-managementSkill
- test-strategySkill
- tracking-testingSkill
- transactional-email-testingSkill
- unit-test-authoringSkill
- visual-regressionSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
Never write a test whose purpose is to touch a line.
- Very specific: line 44
Never chase 100%. The last 8% is generated code, error plumbing, and defensive branches.
- Distinctive: line 46
Never report coverage as quality.
- Very specific: line 50
Before/after numbers for changed lines, the new floor committed to the config, and the list of still-uncovered P0 lines carried into …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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
Coverage Ratchet
Coverage measures execution, not verification. A 95% suite of false positives is 95%
theater (see false-positive-hunter). Used correctly it is still the cheapest map of what
was never even run.
The ratchet
- Measure today's number. That is the floor — do not negotiate a target with the team.
- Gate on changed lines, not on the global percentage: new code must be covered at a high bar (90%+), legacy code is grandfathered.
- The floor only moves up. A PR that lowers it fails, with the specific uncovered lines named in the CI output.
# JS/TS
npx vitest run --coverage.enabled --coverage.thresholds.autoUpdate=false
# Python
pytest --cov=src --cov-report=term-missing --cov-fail-under=<floor>
# Go
go test ./... -coverprofile=c.out && go tool cover -func=c.out | tail -1Diff coverage tools: diff-cover (Python), nyc + codecov patch status, or
git diff --name-only origin/main | xargs piped into the reporter.
Reading the report correctly
- Branch coverage over line coverage. A ternary counts as one line and two behaviors.
- Sort uncovered lines by the risk tier from
risk-map, then work top-down. An uncoveredcatchblock in the payment path outranks an uncovered UI helper file entirely. - Uncovered
catchanddefaultbranches are the classic production incident: they run exactly once, at the worst moment, and have never been executed.
What not to do
- Never write a test whose purpose is to touch a line. It will be a
FP-01/FP-14and it will make the suite worse while making the number better. - Never chase 100%. The last 8% is generated code, error plumbing, and defensive branches;
the effort belongs in
mutation-proofon the first 30%. - Never report coverage as quality. Report it as "code we know at least ran".
Done means
Before/after numbers for changed lines, the new floor committed to the config, and the list
of still-uncovered P0 lines carried into .qa-supreme/state.md as explicit debt.
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.

