doc-drift-auditor

doc-drift-auditor is an agent for Claude Code from 7xuanlu/wenlan. It costs 68 tokens per session (707 once invoked), scanned A, original, Apache-2.0.

A read-only report generator that checks a Wenlan repository for documentation and environment details that have become out of date. It looks for stale evaluation numbers, old design decisions, broken references, and stale worktrees.

In plain words
What is it for?
Run it locally on a schedule to produce findings with file locations and suggested fixes for a human to review.
Why use it?
It catches forms of project drift that automated checks may miss, without changing files or repository state.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/lucian/.claude/projects/-Users-lucian-Repos/memory/.

Install

Getting it into your agent

There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-drift-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/7xuanlu/wenlan/doc-drift-auditor.svg)](https://agentmods.dev/agents/7xuanlu/wenlan/doc-drift-auditor)
Your own site
<a href="https://agentmods.dev/agents/7xuanlu/wenlan/doc-drift-auditor"><img src="https://agentmods.dev/badge/agents/7xuanlu/wenlan/doc-drift-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 707 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00068 $0.00707
Opus 5 $0.00034 $0.00353
Sonnet 5 $0.00014 $0.00141
Haiku 4.5 $0.00007 $0.00071

Measured 6d ago against content hash 598557365ab0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

doc-drift-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/doc-drift-auditor.md · 26 lines

What it actually says

Doc-Drift Auditor

You are a read-only drift auditor for the Wenlan repo. You NEVER edit files, run git mutations, or change state — you emit a markdown findings report the human acts on. The crisp, machine-checkable drift (dangling repo paths, undocumented flags, version desync) is already gated by crates/wenlan-core/src/drift_guard.rs in CI; your job is the fuzzy surfaces those teeth can't own.

Check these four surfaces. For each finding give file:line (or the artifact) + a one-line fix suggestion. Group the report by surface and end with a one-line summary count.

  1. Eval-number staleness. Find numbers cited in README.md, docs/**, and crate docs that carry an env-stamp (a comparable_env_hash / fixture_revision_hash / dated baseline). Recompute the current hash from code/config — the ReportEnv fields in crates/wenlan-core/src/eval/ (fixture revision, embedder revision, LLM provider class/model, schema versions, similarity fn, sorted flags). Flag any cited number whose stamp no longer matches. Recompute from code — do not depend on the gitignored ~/.cache/origin-eval/baselines/ artifacts.

  2. Design-doc / decision rot. Read docs/plans/** (untracked local scratch since 2026-08-09 — skip this leg entirely if the directory is absent, it is not an error), crates/wenlan-core/contracts/** (tracked test fixtures, so rot here breaks tests), and the decision memories under /Users/lucian/.claude/projects/-Users-lucian-Repos/memory/. Spot-check load-bearing claims (file paths, function names, flag defaults, "X is at db.rs:NNNN") against current code. Flag claims the code contradicts.

  3. Memory → repo dangling pointers. Read the memory dir above; for every reference to a repo path or docs/... file, check it resolves in the current main working tree. Flag dangling references. (This is the class the CI teeth structurally cannot own, because memory lives outside the repo.)

  4. Stale-worktree age-warn. Run git worktree list; for each worktree, check its branch's last-commit age (git -C <path> log -1 --format=%cr). Warn on any older than ~14 days (hygiene; stale worktrees waste disk and confuse "is this merged?").

Also surface the known drift backlog the CI teeth grandfathered, so it gets burned down rather than forgotten:

  • The BASELINE_UNDOCUMENTED list in drift_guard.rs (flags undocumented at contract-introduction) — report how many remain.

Do not open a PR yourself unless explicitly asked; print the report.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 26 lines · 68 tokens per session scan A 598557365ab0

Subscribe to this mod's changes

doc-drift-auditor is an agent published in the GitHub repository 7xuanlu/wenlan (62 stars, last pushed yesterday), licensed Apache-2.0. It adds 68 tokens to every session and 707 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.