registry-doctorlisted
Install: claude install-skill roomi-fields/paper-trail
# Skill : registry-doctor
## Purpose
Wraps the paper-trail worker B's invariant doctor. Runs all 19 checks
(I1-I19) on the registry, reports violations classified by severity
(ERROR / WARN / INFO), and offers auto-fix for safe cases.
The doctor is **read-only by default**. Auto-fixes (`--fix`) only apply
to invariants whose semantic is mechanically safe : I4 (path prefix
strip), I6 (sha256 recompute), I9 (attempt renumber), I5/I7 semi
(state → `needs_reacquisition` when PDF missing or page1 log broken).
Never decides anything semantic — that's `sota-auditor`.
## When to invoke
- User asks to audit the registry, run doctor, fix drift
- User runs `/paper-trail:doctor` or `/paper-trail:doctor --fix`
- Hooks trigger it post-edit on a ref or at session end (cf.
`hooks/hooks.json`)
- `sota-writer` validates that all proposed refs are coherent before
using them in a SOTA
## How it works
The skill delegates to the worker B Python CLI:
```bash
# Run all 19 invariants, severity ≥ info, no fix
python -m pipeline doctor
# Filter to errors only
python -m pipeline doctor --severity error
# Auto-fix safe invariants (I4, I6, I9, I5 semi, I7 semi)
python -m pipeline doctor --fix --severity warn
# JSON output for machine processing
python -m pipeline doctor --json
# Couche 5 — correlate with RTFM indexing failures
python -m pipeline doctor --correlate-rtfm
# Couche 5 (slow) — recompute sha256 on all PDFs to detect drift
python -m pipeline doctor --check-sha
```
## Invariants