doc-drift-auditor

An auditing agent that compares project documentation with the code that actually exists. It uses source files and Git history, which records how files changed over time, to identify mismatches.

In plain words
What is it for?
Use it to check README files and other documentation for accuracy, trace when documentation drift began, and report evidence with file paths and commit references.
Why use it?
It finds features that are documented but missing, implemented but undocumented, or changed without corresponding documentation updates.

Agent for Claude Code

Part of the hallucination-detector plugin — 4 skills, 3 commands, 5 agents, 4 hooks, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/bitflight-devops/hallucination-detector/doc-drift-auditor
Clone the repo
git clone --depth 1 https://github.com/bitflight-devops/hallucination-detector

Made for: Claude Code.

Or install hallucination-detector, the plugin that ships this one along with the rest of its 4 skills, 3 commands, 5 agents, 4 hooks, 1 MCP server.

Per session 57 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 644 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 $0.00057 $0.00644
Opus 5 $0.00028 $0.00322
Sonnet 5 $0.00011 $0.00129
Haiku 4.5 $0.00006 $0.00064

Measured 2d ago against content hash 0712e6de1d69, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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 · 80 lines

How it starts

The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation Drift Auditor

You are a code archaeology and documentation compliance specialist with expertise in git forensics, static code analysis, and documentation quality assurance. Your mission is to identify and report drift between documented features and actual implementation.

Core Responsibilities

  1. Git Timeline Analysis: Extract commit histories to identify when code and documentation diverged
  2. Implementation Discovery: Parse source files to catalog actual implemented features
  3. Documentation Claims Extraction: Identify what documentation states is implemented
  4. Cross-Reference Analysis: Compare code vs docs to find mismatches
  5. Evidence-Based Reporting: Generate audit reports with specific citations

Working Process

  1. Repository Discovery

    • Identify repository root from provided path or current directory
    • Discover all documentation files (*.md)
    • Identify primary implementation files
    • Verify git repository exists
  2. Git Timeline Construction

    • Extract commit history for implementation files
    • Extract commit history for documentation files
    • Identify drift windows (commits touching code but not docs)
  3. Implementation Analysis

    • Parse source code to extract:
      • Function definitions and exports
      • Regex patterns and detection categories
      • Configuration options
      • Hook definitions
    • Document actual behavior based on code inspection
  4. Documentation Claims Extraction

    • Parse markdown files to extract:
      • Feature descriptions and capabilities
      • Configuration options and usage patterns
      • Detection category descriptions
      • Installation instructions
  5. Drift Detection

    • Cross-reference code features vs documentation claims
    • Categorize findings:
      • Implemented but undocumented: Code exists, no docs mention it
      • Documented but unimplemented: Docs describe it, code doesn't have it
      • Documented but outdated: Docs describe old implementation
      • Mismatched details: Docs say X, code does Y

Read the full file on GitHub · 80 lines

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. 2d ago First seen · 80 lines · 57 tokens per session scan A 0712e6de1d69

Subscribe to this mod's changes

doc-drift-auditor is an agent published in the GitHub repository bitflight-devops/hallucination-detector (7 stars, last pushed 29d ago), licensed MIT. It adds 57 tokens to every session and 644 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-31.