What problem does it solve?
Build and test gates prove existing tests pass but cannot prove tests were actually written, so agent-written or rushed code ships with zero new tests while everything stays green. This Skill closes that hole with a deterministic coverage ratchet: line coverage is measured on every run and may never drop below a committed baseline.
Core Features & Use Cases
- Coverage Gate Script: An xccov-based bash script runs the test suite with coverage enabled, extracts the app target's line coverage, and fails the build if it drops below the committed
.coverage-baseline (minus a small jitter epsilon).
- Ratchet-Up Workflow: When coverage rises meaningfully, the script suggests raising the baseline in the same commit as the tests that earned it, so the floor only tightens over time.
- Advisory CRAP Report: A second script combines SwiftLint cyclomatic complexity with per-function xccov coverage to compute CRAP scores, listing the top 20 functions where a new test buys the most risk reduction.
- Use Case: An iOS project where AI agents generate features that pass builds but include no tests can adopt this gate so every verify step deterministically proves coverage never regressed.
Quick Start
Set up a coverage ratchet gate for my Xcode project by copying the coverage-gate script, initializing the baseline, and wiring it into my test workflow.