speckit.companion.living-coverage — Claude Code command
speckit.companion.living-coverage — a command that reports which living-spec requirements have mapped tests and which remain uncovered. It runs read-only and never halts your workflow.
MIT ★ 110 updated 2026-10-19
.claude/commands/speckit.companion.living-coverage.mdWhat speckit.companion.living-coverage does
The command scans your capability spec file (.spec.md) and its sibling coverage map (.coverage.md), extracts requirement IDs like FR-NNN or NFR-NNN, and checks whether each appears in the coverage file alongside a test reference (a .test.* or .spec.* path, a tests/... entry, or a file::TestCase nodeid). Covered requirements are flagged; uncovered ones stand out. Requires Python 3 — if it is not available, the command warns and exits cleanly.
Coverage is a signal, not a gate. For each uncovered requirement, you can add a test and update the map, or accept the gap for now. The command does not block your pipeline and runs independently of other checks.
What it helps with
- identify spec requirements without mapped tests
- update a capability's test coverage map
- audit a single component for coverage gaps
- export coverage data in machine-readable format
Example prompts for the agent
- Show requirement coverage across all capabilities
- Check which requirements in the billing component lack tests
- Output the coverage report as JSON
How to install speckit.companion.living-coverage
Manually: put the files in place
.claude/commands/speckit.companion.living-coverage.mdCall it with /speckit.companion.living-coverage. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/speckit.companion.living-coverage.mdCall it with /prompts:speckit.companion.living-coverage. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/speckit.companion.living-coverage.prompt.mdManually: put the files in place
.gemini/commands/speckit.companion.living-coverage.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about speckit.companion.living-coverage
How do I install speckit.companion.living-coverage in Claude Code?
Add speckit.companion.living-coverage.md to the .claude/commands/ directory in your repository.
What does speckit.companion.living-coverage do?
It checks each requirement in your living spec to see whether a test is mapped in the coverage file. It reports which requirements are covered and which are open.
What if a capability has no .coverage.md file?
All its requirements will show as uncovered. This is not an error — the command always succeeds. Either add tests and create the coverage map, or leave it for later.
Source text
speckit.companion.living-coverage.md · MIT
--- description: "Report living-spec requirement→test coverage — per requirement, whether its coverage tier maps a test (opt-in, read-only, never halts)" --- # Spec Coverage Show, for each living-spec capability, which of its requirements have a test mapped in the capability's coverage-tier sibling (the `*.coverage.md` next to its spec — `spec.coverage.md` for a centralized `capabilities/<name>/<name>.spec.md`, or `<base>.coverage.md` for a colocated spec) and which are still uncovered. A living spec's requirements file says **what** the area must do; its coverage tier says **which test proves each one**. This command reads both and reports the gap. **Read-only** — it never edits anything — and it **never fails** (always exits success). It's the conformance on-ramp, a signal you act on, not a gate that blocks you (the same contract as `speckit.companion.living-drift`). This is **opt-in**. With living specs disabled (or no config), it reports nothing and exits clean. A capability that ships only a `.spec.md` with no `.coverage.md` sibling reports every requirement uncovered — never an error. ## Prerequisites - Verify Python is available by running `python3 --version`. - If `python3` is not available, warn the user and skip: `[companion] Warning: python3 not detected; skipped coverage`. Do not fail the host command. ## Execution Run the coverage checker from the repository root: ```bash python3 .specify/extensions/companion/scripts/check-coverage.py ``` The script reads the capability registry (`living-specs.yml`), reuses the resolver for the capability and tier paths, extracts each requirement id (`FR-NNN` / `NFR-NNN`) from the capability's `.spec.md`, and looks each id up in its `.coverage.md` map. A requirement is **covered** when its id appears in the coverage file on a line that also names at least one test (a `.test.` / `.spec.` path, a `tests/...` reference, or a `file::TestCase` nodeid); otherwise it's **uncovered**. Restrict to one capability by name, or get a machine-readable object: ```bash python3 .specify/extensions/companion/scripts/check-coverage.py --capability billing python3 .specify/extensions/companion/scripts/check-coverage.py --json ``` ## What to do with the report Coverage is a signal, not an error. For each uncovered requirement, either add a test and map it in the capability's `.coverage.md`, or accept the gap for now. The command never blocks the pipeline on its own.
© alfredoperez · MIT · alfredoperez/speckit-companion