/kit:doc-driftfrom kit
Audits every living doc (README, AGENTS, architecture, patterns) against the live repo, verdicts each claim with evidence, and ships fixes as a PR. Catches drift that diff-scoped sync misses.
Ships in kit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Enumerates every LIVING doc (README, MANUAL, AGENTS, WORKFLOW, architecture, patterns), verdicts each against the live repo with evidence, fixes drift on a branch, gates through a PR. An audit-loop instance (docs/patterns/audit-loop.md). Dated records like specs, research, retros describe their moment and never drift.
Audit every living doc against the live repo and ship the fixes as a PR. This is the doc-drift
instance of docs/patterns/audit-loop.md: enumerate, verdict with evidence, apply on a branch,
gate through a PR the operator approves. /kit:docs syncs docs against ONE diff during a build
cycle. This skill audits the WHOLE estate on a cadence, and catches what diff-scoped sync
structurally misses: drift from merged-but-undocumented work, inventory rot, dead pointers,
stale counts. PR #306 (hand-fixing the README inventories) is the proven need.
| Slot | This instance |
|---|---|
| Item set | living docs only: git ls-files README.md AGENTS.md CLAUDE.md CONTRIBUTING.md ':(glob)docs/*.md' ':(glob)docs/reference/*.md' ':(glob)docs/guides/*.md' ':(glob)docs/patterns/*.md' (the :(glob) magic is required: a bare docs/*.md pathspec matches recursively and pulls in every dated record) |
| Contract | every checkable claim matches the live repo: referenced paths exist, inventory tables match the live dirs, counts match derived counts, named verbs and flags exist, cross-doc pointers resolve |
| Evidence class | Tier 1: the repo itself via grep/ls/diff. Tier 2: a model reads the doc's described behavior against the actual command or script |
| Apply mechanics | FIX in place on an isolated branch; REMOVE only with a named successor; PR body lists every verdict; UNSURE never auto-resolved |
Dated records (docs/specs, docs/research, docs/retro, docs/handoff, docs/decisions, docs/absorption, and CHANGELOG.md's per-release entries) are OUT of the item set. They describe their moment. Flagging a 2026-05 spec for describing 2026-05 reality is noise, not a finding.
At the start of the pass (after any refusal guard below passes), run bin/audit start doc-drift, so a crashed or abandoned pass leaves a trace: bin/audit due shows it running or abandoned.
Branch first. All edits ride an isolated branch. Auditing on master is the failure this skill exists to prevent.
Enumerate. Run the item-set command above. Write the list down before judging anything. The list is the queue; a resumed or scheduled run picks up where the last one stopped.
Tier 1, mechanical pass, zero model cost, every file. For each doc, extract and check the mechanical claims:
bash lib/docdrift/refcheck.sh scan --repo <dir> (TSV of dead refs; it judges only refs whose first segment is a top-level entry of the repo, plus relative links),diff the table names against the dir
listing, both directions: rows with no file, files with no row),ls | wc -l),--help.test -e <path> for a path, grep -n <symbol> <path> for a symbol. A diagram node
that names a path is a claim and gets checked like prose (source: archify's
validated-IR contract, a diagram node cites a source and a check verifies the
citation still holds). A missing target is a Tier 1 FIX, quoting the node text.
A Tier 1 failure is a finding with evidence attached, severity FIX (or REMOVE when the whole
doc's referent is gone). bash tests/test-meta.sh overlaps part of this pass; run it first
and treat its failures as pre-confirmed findings, do not re-derive them.Tier 2, judgment pass, model-read, only where it earns its cost. Dispatch the shared
read-only scanner kit:audit-scanner (preferred: its tools roster physically cannot write,
so an unattended cadence run keeps the propose/apply split mechanical; fall back to a
general-purpose subagent only where the kit agent roster is unavailable, e.g. a frozen
plugin snapshot). Dispatch only for: files Tier 1 flagged (the drift is confirmed, judge
how deep it goes), plus the high-traffic operator surfaces (README, QUICKSTART, AGENTS)
whose prose describes behavior no grep can check. Hand it the target files, this
instance's contract and evidence class (the four-slots table above): does the described
flow still match what the command actually does? It quotes both sides for any mismatch
and returns findings; every fix is applied HERE, on the branch, never by the scanner.
Skip Tier 2 entirely for files Tier 1 cleared that only carry mechanical claims.
Verdict each item with the audit-loop grammar: OK / FIX / REMOVE / UNSURE / DANGER. A verdict with no checkable evidence downgrades to UNSURE. UNSURE items are never auto-fixed; list them in the PR body. DANGER (a doc that tells the operator to do something now wrong) gets quoted, folded into the policy-carrying doc, then removed or marked superseded.
Apply. Fix in place. Prefer deriving over restating: a count becomes "every X" prose or a derived assertion, never a fresh literal (the no-hardcoded-counts rule). Before removing any doc, grep the estate for pointers to it and rewrite them.
Verify. Re-run the Tier 1 pass on every touched file: it must come back clean. Run
bash tests/test-meta.sh: green, or the run is not done.
Ship. Commit, push, open a PR whose body lists every FIX/REMOVE with its evidence and every UNSURE for the operator. If nothing needed changing, create no branch and report CLEAN with the enumeration list.
Run after any batch of merges that skipped /kit:docs, before a release tag, or on a schedule
(/loop or a cron per the audit-loop driver ladder). One pass per invocation, bounded by the
enumeration list.
This instance has a declared cadence in the ## Cadence table of docs/patterns/audit-loop.md.
Record a finished pass with bin/audit ran doc-drift "<one line>", including a CLEAN one, so
bin/audit due stops naming it. The kit ships no scheduler: due is what a human or a job reads.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub consolelabs/devkit --plugin kit14 skills in this plugin
/backlog-reconcileUse to audit a repo's `_meta/BACKLOG.md` Active queue against reality, "audit the backlog", "reconcile the board", "is the board still true", "dọn backlog", "rà soát backlog", or a scheduled backlog-reconcile run. NOT for filing new items onto the board, NOT for a single known-stale row (just fix it), NOT for the kit's own FEATURES/workflow-paths pair (topology-drift)./ci-driftUse for the whole-estate CI audit, "audit the CI", "are the runners clean", "check the release pipeline", "ci drift", "stale workflows / secrets / runners", or a scheduled CI-audit cadence run. NOT for one failing run (/kit:debug), NOT for doc prose (doc-drift)./gauntlet-proof-auditUse to audit the gauntlet records, "are the ROUNDS.md records honest", "verify the proof corpus", "check each run record against its evidence", "audit the gauntlet corpus", "is the gauntlet proof trustworthy", or a scheduled run. NOT for re-running probes or rounds (`/kit:gauntlet` itself), NOT for the corpus-level stats projection (`lib/gauntlet/stats.sh`), NOT for non-gauntlet records./get-api-docsFetch curated API documentation using Context Hub (chub) before coding against any external API. Use when the task involves calling a third-party API (Stripe, OpenAI, Airwallex, Notion, etc.) to prevent hallucinated parameters and deprecated endpoints./loop-engineeringUse to design or add a new bounded loop to the kit's SDLC orchestration ("design a new loop", "is this worth a loop"), or mentions the Karpathy loop / autoresearch / hill-climb / search-and-select prompt or parameter tuning. NOT for a one-off in-session Stop-hook goal (use goal-craft), NOT for the debug loop (already exists, use /kit:debug), NOT for building the loop's actual code./memory-tidyUse when auditing, consolidating, or cleaning a repo's .claude/memory store, "dọn memory", "memory tidy", the biweekly memory audit, duplicate or stale memory notes, MEMORY.md index drift, or a scheduled memory-tidy audit. NOT for the built-in machine-local auto-memory under ~/.claude/projects, NOT for editing a single note (just edit it).Other plugins' skills for the same job