cavekit-check
Read-only Cavekit drift detector. Use when users invoke /ck:check, ask whether code matches SPEC.md, check invariants, audit interfaces, or inspect §T status evidence.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 16
- Forks
- 9
01 前言 Front Matter
- name
- cavekit-check
- description
- Read-only Cavekit drift detector. Use when users invoke /ck:check, ask whether code matches SPEC.md, check invariants, audit interfaces, or inspect §T status evidence.
03 SKILL.md 正文
cavekit-check — drift detector
Pure diagnostic workflow. Read SPEC.md, compare it to code, report evidence. Write nothing. Run after each /ck:build and before each ship — drift caught here is a diff; drift caught in prod is a §B.
Read bundled ../../FORMAT.md before interpreting SPEC.md structure and addresses.
Load
- Read project-root
SPEC.md. If missing, reportno SPEC.md, nothing to checkand stop. - Parse invocation args:
§Vor no args → check invariants§I→ check interfaces§T→ audit task status against code evidence--all→ check §V, §I, and §T
- Parse archive comments like
<!-- archive: .cavekit/archive/SPEC-<date>.md §T T1-T12 -->. - Read referenced
.cavekit/archive/SPEC-*.mdcopies when needed to resolve archived §V/§I cites, archived §T rows, or max-ID/range questions.
Optional Cavecrew investigation
When evidence lookup needs code archaeology and cavecrew-investigator is available, use it for read-only compressed fact finding. Prefer it for locating §I implementations, §V enforcement/tests, §T status evidence, callers, and related files. The investigator must return file:line evidence only and must not design, fix, edit, or mutate state. If unavailable, use codebase-memory tools when available, then exact reads/search as fallback.
Check §V — invariants
For each V<n> in current SPEC.md; with --all, include archived V<n> ranges referenced by archive comments:
- Translate invariant into a verifiable claim about code/tests/config.
- Search and read relevant files.
- Classify: HOLD / VIOLATE / UNVERIFIABLE.
- Cite file:line evidence when possible.
Check §I — interfaces
For each interface item in current SPEC.md; with --all, include archived §I refs referenced by archive comments:
- Locate implementation.
- Classify:
- MATCH — implemented shape matches spec.
- DRIFT — implementation exists but shape differs.
- MISSING — spec surface absent from code.
- EXTRA — code exposes related surface absent from spec.
- Cite file:line evidence.
Check §T — tasks
For each task row in current SPEC.md; with --all, include archived §T rows referenced by archive comments:
- If status
x, verify claimed work appears present. - If status
~, note as in-progress. - If status
., note as pending. - Flag
xrows with no supporting evidence as STALE.
Report format
Use concise grouped output:
## §V drift
V2 VIOLATE: auth/mw.go:47 uses `<` not `≤`. see §B.1.
V5 UNVERIFIABLE: no test covers req path.
## §I drift
I.api DRIFT: POST /x returns `{result}` not `{id}`. route.go:112.
I.cmd MISSING: `foo bar` absent from cli/*.go.
## §T drift
T3 STALE: status `x`, no middleware file exists.
## summary
2 violate. 1 missing. 1 stale. 1 unverifiable.
next: /ck:spec bug: <cause>, /ck:build <task>, or amend spec.
Remedy hints only
End with one-line hints:
- VIOLATE / DRIFT → use
/ck:spec bug: <cause>or fix code. - MISSING → use
/ck:build §T.nif a task exists; otherwise/ck:spec amend §T. - STALE → use
/ck:spec amend §Tto uncheck or revise. - EXTRA → document with
/ck:spec amend §Ior remove code.
Boundaries
- Zero writes.
- No
SPEC.mdedits. - No code edits.
- No commits.
- No scores or grades; classify by evidence.
04 同仓库更多 Skills
why
Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.
unslop
Cut AI tells from any writing.
typescript-best-practices
TypeScript best practices. Use when reading or editing any .ts or .tsx file.
technical-writing
Layered technical-writing standard: Diátaxis structure, Google developer style sentences, STE instruction rules, Global English syntax. Use for /skill:technical-writing or when writing or reviewing docs, RFCs, readmes, PR descriptions, or commit messages.
teach
Explain a body of work plainly so a person actually understands it. Runs the `how` and `why` skills and weaves what they find into one clear explanation. Use for 'teach me this', 'help me really understand X', 'explain this change or subsystem to me'.
tdd
Use only when the user explicitly asks for TDD, a failing test, or a regression test, OR when the bug has an obvious cheap local test target. Skip when the test path is unclear, expensive, integration-heavy, or not requested.