/living-docs:living-docs-driftfrom living-docs
Checks whether living-docs bundle records (architecture views, constitution, ADRs, open issues) still match the code they cite, producing an advisory drift report using a configurable LLM judge.
Ships in living-docs. 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.
Read when SKILL.md points to them; scripts run unread.
Doc-to-code drift is a record that cites code that is gone, or describes behavior the code no longer has. living-docs check validates doc-to-doc invariants only; this skill covers the other half. The judgment comes from a model run outside the living-docs binary through a command you configure.
The owner asks whether the docs still match the code, or wants a drift review before relying on a view, the constitution or an open issue. Never run it from a hook, pre-commit or CI job: the report is advisory only, never a gate.
From the repository root, with bash and jq 1.6 or newer on the PATH:
bash <skill dir>/scripts/drift.sh [--docs-dir DIR] [--root DIR] [--out DIR] [--records PATH[,PATH...]]
--docs-dir: the bundle (default <root>/docs).--root: the repository root that code anchors resolve under (default .).--records: judge only the named records, given as paths relative to the bundle (adr/0007-x.md), comma-separated or repeated. Each must be in scope; a name that is missing or out of scope exits 2 before any judge call. Records stay in sorted order whatever the order named.--out: where the report goes (default <root>/.living-docs/drift, outside the bundle so check never sees it; the driver puts a .gitignore containing * in that default directory when it has none, so git never lists a report).LIVING_DOCS_DRIFT_JUDGE: the judge command line, run through the shell's own word splitting and quoting. Default claude -p --tools ""; codex exec, pi or any script that reads the prompt and payload on stdin and prints the answer on stdout also works. Set it only to commands you trust: it runs with your permissions.LIVING_DOCS_DRIFT_TIMEOUT: seconds allowed per judge call (default 300). A judge past it is killed with its child processes.One judge call per in-scope record, found by reading the bundle's files directly:
Every record is judged in one mode, anchors: the record is kept in place and must describe the code as it is now. The report lists each cited anchor's result.
architecture/*.md), the constitution, ADRs in force (status Accepted or Proposed; an Accepted ADR is a living record, edited in place) and issues whose status: is not closed or done.An anchor is a backticked repository path, optionally followed by › and a backticked symbol, outside fenced code blocks (at most 20 per record). Results:
present: the path exists under the root (and, with a symbol, the whole word is in the file).name_absent: the file exists but the symbol is not in it as a whole word. A word search cannot tell a definition from a mention, so present never claims the symbol is defined.path_missing: nothing at that path.unresolvable: an absolute path, a .. path or a symlink leaving the root. It is never read.Each readable cited file contributes its first 200 lines to the payload (truncated: true past that).
0: a report was written, whatever it found.2: no report. Bad usage, a missing or pre-1.6 jq, docs directory or judge command, a judge that exits non-zero or times out. The stderr line names the cause. An absent judgment is never read as a clean one.<out>/<YYYY-MM-DD>-drift-report.md; a second run the same day replaces it. The header records the full judge command line, so never put a token or secret in that command; pass it through the environment instead. Each record section gives the record path (relative to the bundle), the SHA-256 of the exact payload sent, the anchor results and the verdict:
no_drift: the judge found nothing.drift: findings, each of kind missing_feature, incomplete_model, logic_shortcut or architectural_divergence, with a summary and a cited path.invalid answer: the judge's reply failed the answer schema. It is not a clean result: rerun, or fix the judge.A finding is a lead, not a verdict. Open the record and the cited code before acting on it; judgment is not reproducible between runs.
prompt.md (opens in a new tab)scripts/drift.sh (opens in a new tab)tests/fixtures/answers/drift_fenced.txt (opens in a new tab)tests/fixtures/answers/drift_fenced_crlf.txt (opens in a new tab)tests/fixtures/answers/drift_four.json (opens in a new tab)tests/fixtures/answers/drift_no_findings.json (opens in a new tab)tests/fixtures/answers/empty.txt (opens in a new tab)tests/fixtures/answers/empty_path.json (opens in a new tab)tests/fixtures/answers/empty_summary.json (opens in a new tab)tests/fixtures/answers/no_drift.json (opens in a new tab)tests/fixtures/answers/no_drift_crlf.json (opens in a new tab)tests/fixtures/answers/no_drift_with_finding.json (opens in a new tab)tests/fixtures/answers/prose_before.txt (opens in a new tab)tests/fixtures/answers/prose_before_crlf.txt (opens in a new tab)tests/fixtures/answers/schema_two.json (opens in a new tab)tests/fixtures/answers/two_fences.txt (opens in a new tab)tests/fixtures/answers/two_fences_crlf.txt (opens in a new tab)tests/fixtures/answers/unknown_kind.json (opens in a new tab)tests/fixtures/bundle/adr/0001-superseded-choice.md (opens in a new tab)tests/fixtures/bundle/adr/0002-deprecated-choice.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/living-docsRun a project's engineering decisions as a living log — MADR-lite ADRs (edited in place, retired with Deprecated, never deleted) for decisions expensive to reverse, issues for the work (and its cheap-to-reverse choices), research artifacts, an optional PRD, a project constitution, and living Mermaid architecture views, where every record has exactly one home, indexes never drift, and a record is earned by materiality, not written per layer. Use when setting up or maintaining project docs, writing an ADR/PRD/constitution/issue/research note, drawing or updating an architecture diagram, or enforcing the no-drift maintenance rule./okf-knowledge-formatAuthor and validate knowledge as OKF (Open Knowledge Format) bundles — a directory of markdown files with YAML frontmatter, where every concept is one .md file with a REQUIRED `type` field, reserved index.md/log.md files, relative cross-links, and a permissive conformance model. Use when standing up or maintaining a knowledge bundle/catalog, writing or normalizing a concept document's frontmatter, deciding how to structure markdown knowledge for agents to consume, or checking a corpus against OKF conformance. The canonical spec is vendored under reference/SPEC.md and refreshed from GitHub via scripts/update-spec.sh.npx claudepluginhub ejklock/living-docs-skill --plugin living-docsOther plugins' skills for the same job