Skip to content
Documentation
Agent

doc-drift-auditor

Read-only audit for fuzzy drift the CI teeth (drift_guard.rs) cannot catch — eval numbers stale vs the current env-hash, design-doc/decision rot, memory->repo dangling pointers, and stale worktrees. Run locally on a schedule. Produces a findings report only; never edits.

From plugin
wenlan
643 skills3 agents1 MCP
Install
> /plugin marketplace add 7xuanlu/wenlan
> /plugin install wenlan@7xuanlu-wenlan

How it fires

How this agent gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.

Context preview

The summary Claude sees to decide when to auto-load this agent.

Read-only audit for fuzzy drift the CI teeth (drift_guard.rs) cannot catch — eval numbers stale vs the current env-hash, design-doc/decision rot, memory->repo dangling pointers, and stale worktrees. Run locally on a schedule. Produces a findings report only; never edits.

Agent definition

doc-drift-auditor.md
name: doc-drift-auditor
description: Read-only audit for fuzzy drift the CI teeth (drift_guard.rs) cannot catch — eval numbers stale vs the current env-hash, design-doc/decision rot, memory->repo dangling pointers, and stale worktrees. Run locally on a schedule. Produces a findings report only; never edits.
tools: Read, Grep, Glob, Bash
model: opus

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.

Read more
Ships withwenlan

Wenlan is a knowledge base for the AI-native age. Your AI agents capture what they learn, Wenlan keeps it current and distills it into source-cited wiki pages you can trust

Get the whole plugin

Other agents on wenlan.