docs-audit

A documentation-checking command that compares the files in `docs/` with the code and recent project history.

In plain words
What is it for?
Use it to review data models, screens, routes, workflows, and other documented parts of a project, then create a task for each significant mismatch.
Why use it?
It finds places where the documentation no longer matches how the software works, so outdated information can be tracked instead of overlooked.

Command for Claude Code

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 commands/alifanov/darkflow/docs-audit
Clone the repo
git clone --depth 1 https://github.com/alifanov/darkflow

Made for: Claude Code.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,506 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.00018 $0.01506
Opus 5 $0.00009 $0.00753
Sonnet 5 $0.00004 $0.00301
Haiku 4.5 $0.00002 $0.00151

Measured 2d ago against content hash e8d4ea894008, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs-audit 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.

templates/.claude/commands/darkflow/docs-audit.md · 129 lines

How it starts

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

Audit the docs/ knowledge base against the actual code and recent history — find drift between what the docs claim and what the code does — then create tasks for each significant mismatch.

This is a verification check: it answers "are the docs still true?" It does not rewrite docs (that is a human/fix-issues decision) and it does not produce a product narrative (that is /darkflow:product-overview).

Step 1 — Read project config

Load the project config (contract in .darkflow.d/claude.mdProject config). Uses: language.

Step 2 — Audit docs against code

Read docs/README.md and docs/agent-workflow.md first to learn the layer map, then check each layer against reality. Skip files that are missing or still placeholder stubs — note them as "not yet written", not as drift.

Check, layer by layer:

  • state/spec/data-model.md vs the real schema — compare the documented data model against the ORM schema (prisma/schema.prisma, models.py, migrations, etc.). Flag entities/fields/relations that exist in code but not in docs, or vice versa.
  • state/spec/screens.md vs routes/pages — compare the documented screen list against actual routes/pages/views in the code. Flag screens added or removed in code but not reflected.
  • state/spec/flows/*.md vs implemented flows — for documented flows (auth, checkout, onboarding…), check the steps still match the code.
  • state/product/metrics.md vs instrumented events — compare documented analytics event/metric definitions against event names actually fired in the code. Flag events in code that aren't documented, and documented events with no callsite.
  • state/product/pricing.md vs billing code/config — if pricing/plans are encoded in code or config, flag mismatches.
  • CLAUDE.md / README.md commands — verify documented commands (build, test, dev, lint) exist in package.json / Makefile / pyproject.toml.
  • state/arch.md ## Decisions vs current code — flag any recorded decision the code now contradicts and that has no successor line saying it was replaced.
  • README.md manifest vs the actual files — compare the file manifest in docs/README.md against what really exists under docs/. Flag a file that exists on disk but is not listed in the manifest (undocumented doc), and a manifest entry that names a wrong path. Do not flag a manifest on demand entry that simply isn't written yet — that's expected, not drift.

Read the full file on GitHub · 129 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 · 129 lines · 18 tokens per session scan A e8d4ea894008

Subscribe to this mod's changes

docs-audit is a command published in the GitHub repository alifanov/darkflow (2 stars, last pushed 3d ago), licensed MIT. It adds 18 tokens to every session and 1,506 once invoked, about $0.0001 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.