$npx -y skills add JuliusBrussee/cavekit --skill checkRead-only drift detector. Diffs SPEC.md against current code and reports violations grouped by severity. Writes nothing — suggests remedies via the spec or build skills but never invokes them. Triggers when the user asks to check drift, audit the spec, verify invariants, or ask w
| 1 | # check — drift report |
| 2 | |
| 3 | Pure diagnostic. Reports violations. Writes nothing. User decides remedy. |
| 4 | |
| 5 | Spec drifting silently from code is the #1 SDD failure mode. check is the |
| 6 | detector. Run it after each `/build` and before each ship — drift caught here is |
| 7 | a diff; drift caught in prod is a §B. |
| 8 | |
| 9 | ## LOAD |
| 10 | |
| 11 | 1. Read `SPEC.md`. If missing → "no spec, nothing to check." Stop. |
| 12 | 2. Parse invocation args: |
| 13 | - `§V` → check invariants only (default) |
| 14 | - `§I` → check interfaces |
| 15 | - `§T` → audit task status vs code |
| 16 | - `--all` → all three |
| 17 | |
| 18 | ## CHECK §V — invariants |
| 19 | |
| 20 | For each V<n>: |
| 21 | |
| 22 | 1. Translate invariant into verifiable claim about code. |
| 23 | 2. Grep / read relevant files. |
| 24 | 3. Classify: **HOLD** / **VIOLATE** / **UNVERIFIABLE**. |
| 25 | 4. Record address + file:line evidence. |
| 26 | |
| 27 | ## CHECK §I — interfaces |
| 28 | |
| 29 | For each I item: |
| 30 | |
| 31 | 1. Locate implementation. |
| 32 | 2. Classify: |
| 33 | - **MATCH** — shape in code = shape in spec. |
| 34 | - **DRIFT** — impl exists, shape differs. |
| 35 | - **MISSING** — impl absent. |
| 36 | - **EXTRA** — code exposes surface not in §I. |
| 37 | |
| 38 | ## CHECK §T — tasks |
| 39 | |
| 40 | For each T<n>: |
| 41 | |
| 42 | 1. If `x`: verify claimed work present. |
| 43 | 2. If `~`: note as in-progress. |
| 44 | 3. If `.`: note as pending. |
| 45 | 4. Flag `x` rows with no evidence as **STALE**. |
| 46 | |
| 47 | ## REPORT |
| 48 | |
| 49 | Caveman. Grouped by severity. |
| 50 | |
| 51 | ``` |
| 52 | ## §V drift |
| 53 | V2 VIOLATE: auth/mw.go:47 uses `<` not `≤`. see §B.1. |
| 54 | V5 UNVERIFIABLE: no test covers ∀ req path. |
| 55 | |
| 56 | ## §I drift |
| 57 | I.api DRIFT: POST /x returns `{result}` not `{id}`. route.go:112. |
| 58 | I.cmd MISSING: `foo bar` absent from cli/*.go. |
| 59 | |
| 60 | ## §T drift |
| 61 | T3 STALE: status `x`, no middleware file exists. |
| 62 | |
| 63 | ## summary |
| 64 | 2 violate. 1 missing. 1 stale. 1 unverifiable. |
| 65 | next: spec skill with `bug:` or fix code at cited lines. |
| 66 | ``` |
| 67 | |
| 68 | ## REMEDY HINTS (not actions) |
| 69 | |
| 70 | End report with one-line hint per class: |
| 71 | - VIOLATE / DRIFT → invoke spec skill `bug: <V.n>` or fix code. |
| 72 | - MISSING → invoke build skill on `§T.n` if task exists; else spec skill `amend §T`. |
| 73 | - STALE → spec skill `amend §T` to uncheck. |
| 74 | - EXTRA → spec skill `amend §I` to document, or delete code. |
| 75 | |
| 76 | Never invoke fixes. Report only. |
| 77 | |
| 78 | ## NON-GOALS |
| 79 | |
| 80 | - Zero writes. No SPEC.md edits. No code edits. |
| 81 | - No sub-agents. Main thread reads. |
| 82 | - No scores, no grades. Binary per item: holds or drifts. |