---
name: ctxfr-coverage
description: Analyze ctxfr spec coverage, orphan source files, and directories lacking documentation. Use when the user asks for ctxfr coverage, undocumented code, orphan files, or the equivalent of /ctxfr-coverage.
---

# ctxfr Coverage

Run these commands:

```bash
ctxfr sources --count
ctxfr sources --orphans
ctxfr sources --grouped
ctxfr specs --coverage
```

If `ctxfr` is not found, tell the user: `The ctxfr binary is not installed. Run cmake --build build && cmake --install build from the ctxfr repo.`

Report:

```text
SPEC COVERAGE REPORT

Coverage: X / Y source files (Z%)

COVERED DIRECTORIES:
  path/ — N/M files covered by docs/name.md

ORPHAN DIRECTORIES (no spec coverage):
  path/ — N files, no covering spec

ORPHAN FILES:
  path/file
```

For each orphan directory, assess significance rather than file count alone. Recommend a new spec when the area has substantial logic, public APIs, a distinct domain concern, or non-obvious behavior. Do not add ctxfr jump tables to `CLAUDE.md` or `AGENTS.md`; improve spec coverage and ctxfr indexability through clear spec titles, File Coverage rows, ADR links, and agent metadata.
