Check

juliusbrussee/cavekit/skills/check

作者 juliusbrussee7421e87d5b51無授權條款1.1K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 週前更新

Read-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 whether code still matches the spec. Phrasings: "check drift", "audit the spec", "does the code still match §V", "check invariants", "spec vs code".

AI 產生的概覽

唯讀漂移偵測器,將 SPEC.md 與程式碼比對並依嚴重程度回報違規。

功能
讀取 SPEC.md 並與目前程式碼庫比對,檢查不變量(§V)、介面(§I)與任務狀態(§T)。每個項目會被歸類為保持、違規、漂移、缺失、多餘、過期或無法驗證,並附上檔案與行號證據。輸出依嚴重程度分組的報告,含彙總計數與一行式修復提示,不寫入任何內容。
適用情境
適用於建置步驟之後或發布之前,需要確認程式碼是否仍與規格一致時。也適合檢查漂移、稽核規格、驗證不變量或比對規格與程式碼的要求。
執行需求
需要工作情境中的 SPEC.md 檔案以及對程式碼庫的讀取權限。僅為指示,不含指令碼,無需憑證或網路存取。

check — drift report

Pure diagnostic. Reports violations. Writes nothing. User decides remedy.

Spec drifting silently from code is the #1 SDD failure mode. check is the detector. Run it after each /build and before each ship — drift caught here is a diff; drift caught in prod is a §B.

LOAD

  1. Read SPEC.md. If missing → "no spec, nothing to check." Stop.
  2. Parse invocation args:
    • §V → check invariants only (default)
    • §I → check interfaces
    • §T → audit task status vs code
    • --all → all three

CHECK §V — invariants

For each V<n>:

  1. Translate invariant into verifiable claim about code.
  2. Grep / read relevant files.
  3. Classify: HOLD / VIOLATE / UNVERIFIABLE.
  4. Record address + file:line evidence.

CHECK §I — interfaces

For each I item:

  1. Locate implementation.
  2. Classify:
    • MATCH — shape in code = shape in spec.
    • DRIFT — impl exists, shape differs.
    • MISSING — impl absent.
    • EXTRA — code exposes surface not in §I.

CHECK §T — tasks

For each T<n>:

  1. If x: verify claimed work present.
  2. If ~: note as in-progress.
  3. If .: note as pending.
  4. Flag x rows with no evidence as STALE.

REPORT

Caveman. Grouped by severity.

## §V driftV2 VIOLATE: auth/mw.go:47 uses `<` not `≤`. see §B.1.V5 UNVERIFIABLE: no test covers ∀ req path.
## §I driftI.api DRIFT: POST /x returns `{result}` not `{id}`. route.go:112.I.cmd MISSING: `foo bar` absent from cli/*.go.
## §T driftT3 STALE: status `x`, no middleware file exists.
## summary2 violate. 1 missing. 1 stale. 1 unverifiable.next: spec skill with `bug:` or fix code at cited lines.

REMEDY HINTS (not actions)

End report with one-line hint per class:

  • VIOLATE / DRIFT → invoke spec skill bug: <V.n> or fix code.
  • MISSING → invoke build skill on §T.n if task exists; else spec skill amend §T.
  • STALE → spec skill amend §T to uncheck.
  • EXTRA → spec skill amend §I to document, or delete code.

Never invoke fixes. Report only.

NON-GOALS

  • Zero writes. No SPEC.md edits. No code edits.
  • No sub-agents. Main thread reads.
  • No scores, no grades. Binary per item: holds or drifts.

來源與署名

來源:juliusbrussee/cavekit位於skills/check提交7421e87

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架