skills/requirements/requirement-coverage-checker/SKILL.md
Checks whether an implementation covers a set of requirements by tracing each requirement to code, tests, or both — and flagging gaps where a requirement has no evidence of implementation. Use when auditing for compliance, when answering "is this spec implemented", or before claiming a standard is supported.
npx skillsauth add santosomar/general-secure-coding-agent-skills requirement-coverage-checkerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Every requirement should trace to at least one of: code that implements it, or a test that verifies it. Preferably both. A requirement with neither is either unimplemented or undocumented — both are problems.
| Level | Evidence | Confidence | | ------------------ | ------------------------------------------------ | ------------------------------------ | | Tested | A test asserts the required behavior | High — behavior is checked | | Implemented | Code exists that (claims to) satisfy it | Medium — no automated check | | Documented | A comment/doc references the requirement | Low — intent, not evidence | | Uncovered | No trace anywhere | Zero — gap |
A requirement like "The API MUST validate input and return 400 on invalid data" is two claims:
Trace each separately. The code might validate (1) but return 500 on failure (2 uncovered).
For each atomic claim, search the codebase in order:
| Search | Evidence type | | ---------------------------------------------- | ---------------- | | Test name/docstring mentions the requirement ID | Tested (explicit trace) | | Test asserts the specific behavior | Tested (implicit) | | Code comment references the requirement | Documented | | Code structure matches the requirement | Implemented | | Nothing | Uncovered |
Use → code-search-assistant tactics: grep for requirement IDs, grep for key domain terms, structural search for the code pattern.
Not all traces are equal:
| Trace | Strength |
| ------------------------------------------------------------- | -------- |
| def test_req_4_2_rejects_oversized_payload(): ... assert resp.status == 413 | Strong — ID + behavior |
| def test_payload_limit(): ... assert resp.status == 413 | Good — behavior matches |
| # Implements REQ-4.2 above a function | Weak — claim, not check |
| Function named validate_payload_size | Weak — name suggests, body might differ |
| A constant MAX_PAYLOAD = 10 * 1024 * 1024 | Circumstantial |
Requirements (subset):
Search results:
| Req | Evidence found | Level |
| ------ | --------------------------------------------------------------- | ----------- |
| REQ-3.1 | auth/hash.py: bcrypt.hashpw(pw, bcrypt.gensalt(rounds=12)). test_hash.py::test_bcrypt_cost_12 asserts rounds >= 12. | Tested ✓ |
| REQ-3.2 | auth/login.py: @ratelimit(key="account", rate="5/m") decorator. No test exercises the 6th attempt. | Implemented — untested |
| REQ-3.3 | settings.py: SESSION_COOKIE_AGE = 1800. That's 30 min — but it's absolute expiry, not inactivity expiry. | PARTIAL / WRONG — implements a different requirement |
Report:
SESSION_COOKIE_AGE is time-since-creation, not time-since-last-activity. The requirement says "inactivity." Need SESSION_SAVE_EVERY_REQUEST = True or a sliding-window middleware. Flag as a compliance bug.| Trap | How to catch |
| --------------------------------------- | ------------------------------------------------------ |
| Right behavior, wrong condition | Req says "on timeout"; code does it "on any error." Test the timeout case specifically. |
| Implemented but dead code | The validating function exists but is never called. Check the call graph. |
| Configured but overridable | MAX_RETRIES = 3 — but an env var overrides it to 0 in prod. |
| Test exists but is skipped | @pytest.mark.skip — it's there but not running. |
| Test asserts implementation, not requirement | Test checks bcrypt.hashpw was called; doesn't check cost ≥ 12. |
# TODO: implement REQ-4.2 traces to the requirement and means the opposite of covered.validate_input() might not validate anything. Read the body.## Requirements audited
<count> requirements, <count> atomic claims
## Coverage summary
| Level | Count | % |
| ------------ | ----- | - |
| Tested | | |
| Implemented | | |
| Documented | | |
| Uncovered | | |
| Miscovered | | |
## Per-requirement trace
| Req ID | Claim | Evidence (file:line) | Level | Notes |
| ------ | ----- | -------------------- | ----- | ----- |
## Gaps (actionable)
### Uncovered
<req → what's missing → suggested test or implementation>
### Miscovered
<req → what's there → why it doesn't satisfy the req → fix>
### Untested
<req → code exists → suggested test>
development
Extracts human-readable pseudocode from a verified formal artifact (Dafny, Lean, TLA+) while preserving the verified properties as annotations, so the proof-carrying logic can be reimplemented in a production language. Use when porting verified code to an unverified target, when documenting what a formal spec actually does, or when handing a verified algorithm to an implementer.
development
Translates natural-language or pseudocode descriptions of concurrent and distributed systems into TLA+ specifications ready for the TLC model checker. Identifies state variables, actions, type invariants, safety properties, and liveness properties from the description. Use when formalizing a protocol, when the user describes a distributed algorithm to verify, when designing a consensus or locking scheme, or when starting formal verification of a concurrent system.
testing
Reduces a TLA+ model so TLC can actually check it — shrinks constants, adds state constraints, abstracts data, or applies symmetry — when the state space is too large to enumerate. Use when TLC runs out of memory, when checking takes hours, or when a spec works at N=2 and you need confidence at larger scale.
development
TLA+-specific instance of model-guided repair — reads a TLC error trace, identifies the enabling condition that should have been false, strengthens the corresponding action, and maps the fix to source code. Use when TLC reports an invariant violation or deadlock and you have the code-to-TLA+ mapping from extraction.