/review:docs-driftfrom review
Detect documentation drift in a repo's docs/ folder — ADRs, glossaries, API specs (OpenAPI), rendered artifacts, READMEs, code comments, runbooks, and caller-migration notes — that has fallen out of sync with the code a PR changes, and flag documentation-completeness gaps (missing CHANGELOG/README/ docstring updates). Use when reviewing a PR to verify docs still describe the CURRENT model: stale comments describing a removed mechanism, docs asserting a superseded design, a rendered file lagging its source, ADR index rows that don't reflect an amendment or supersede, env/config docs that name the wrong app or variable, missing runbooks for ops-facing changes, or missing caller migration notes for breaking APIs. Use even when the PR doesn't obviously touch docs — code changes silently invalidate docs elsewhere in the tree.
Ships in review. 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.
Two facets, one skill:
The generative insight (from real multi-round PR reviews): most doc findings
surface one commit at a time because each is a cross-file claim — a sentence
in docs/ asserting a code fact that a later commit quietly falsified. Catch
them by extracting every doc claim that references a code fact, then verifying
each claim against the post-change code in ONE pass.
mktemp -d.<OUTPUT_DIR>/pr-analysis-<PR_NUMBER>.json from the
analyze skill, if present (gives changed files + languages).Write findings to <OUTPUT_DIR>/docs-drift-<PR_NUMBER>.json. Use the template
in assets/docs-drift.output.json verbatim as the shape. Findings that map to
a specific doc line carry path + line so the orchestrator posts them
inline; cross-file/architectural findings omit both and go in the section body.
A stale line you can rewrite outright also carries suggested_change — the
corrected text for lines start_line..line, which posts as a committable
GitHub suggestion. doc_says already quotes the line verbatim, so a
stale-comment, env-mismatch or adr-index finding usually qualifies. A
rendered-lag finding never does: the fix is regenerating the artifact, not
patching the rendered line.
Build the JSON with jq -n and --arg/--argjson so doc text is escaped —
never heredoc untrusted strings.
Progress:
scripts/docs_inventory.py)PR_URL="$1"
OUTPUT_DIR="${2:-$(mktemp -d -t pr-review-XXXXXX)}"
PR_NUMBER=$(echo "$PR_URL" | grep -oE 'pull/[0-9]+' | grep -oE '[0-9]+')
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo .)"
python3 scripts/docs_inventory.py --repo-root "$REPO_ROOT" > "$OUTPUT_DIR/docs-inventory.json"
if [ ! -s "$OUTPUT_DIR/pr.diff" ]; then # standalone; /review:review captures these
gh pr diff "$PR_URL" > "$OUTPUT_DIR/pr.diff"
gh pr diff "$PR_URL" --name-only > "$OUTPUT_DIR/pr.files"
fi
pr.diff and pr.files are shared with the passes running beside this one.
Read them; never write to them.
Read references/drift-patterns.md — authoritative catalog of drift
classes. Work through it; do not improvise categories.
A claim is any doc sentence, table row, code comment, or config comment asserting a checkable code fact. Collect claims from every doc the inventory found — not only docs in the PR diff.
For every claim, locate the code fact in the post-change tree and decide
intact | drifted | uncertain. Prefer grepping the repo at HEAD over memory.
A claim is drifted when the asserted fact is absent, renamed, or replaced.
Record doc line AND contradicting code location in the finding body.
If docs/adrs/ exists, verify ADR bookkeeping the inventory extracted (status
reflected in index, supersede links bidirectional, model changes retire old docs).
For each source→rendered pair: if source changed but rendered did not (or still contains old strings), flag it. Prefer "regenerate" when CI/hooks own the artifact.
dot-env entry.When the PR changes behavior that operators or callers must know about, also check:
Keep this light: only flag when the gap would mislead a teammate or on-call. Do not invent a docs policy the repo does not hold.
Severity: high = a doc actively misleads; medium = stale but not dangerous; low = cosmetic/index bookkeeping. Emit JSON per the asset template.
For each finding: (1) quotes the doc line, (2) names contradicting code or missing artifact, (3) severity matches rubric. Drop unverifiable claims.
Then drop every finding whose remedy is a confirmation. fix works this
list to completion, so a finding with nothing to edit becomes a deferral that
costs a routing decision and a report line and changes no file. Drop it when:
Keep the finding when a reader of the current doc would act wrongly.
Then write docs-drift-<PR_NUMBER>.json.
When analyze set uses_mac_ui: true, resolve docs live. Read
references/mac-ui-docs.md for the fetch recipe.
docs/ tree.uncertain when greps are inconclusive.references/drift-patterns.md — drift-class catalog (read in Step 2).references/mac-ui-docs.md — how to fetch mac-ui's live docs.assets/docs-drift.output.json — output JSON template.scripts/docs_inventory.py — docs/ADR/rendered inventory (--help).evals/evals.json — trigger + output evals.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ozzycodes2/claudellum --plugin reviewOther plugins' skills for the same job
11 skills in this plugin
/analyzeAnalyze PR changes to detect languages, frameworks, test setup, impact areas, and risk classes. Use when starting a PR review and you need to understand what changed before deeper analysis./change-evolutionReviews PR diffs for CD readiness, reversibility, and design-quality risks such as YAGNI, deep modules, and complexity budget. Use when a PR is large, mixes refactor with behavior, or introduces flags/migrations/stranglers./codegenGenerates simple tests, docstrings, and documentation updates for PR changes. Use when reviewing a PR and you want draft tests, docstrings, or CHANGELOG entries to fill the gaps it surfaced (human review required before committing).