docguard.review

docguard.review is a command for coding agents from raccioly/docguard. It costs 12 tokens per session (582 once invoked), scanned A, original, MIT.

A documentation review command that compares project documentation with the code it describes. It checks for outdated claims, missing coverage, and mismatches.

In plain words
What is it for?
Reviewing architecture, data models, security statements, limits, counts, status values, and other claims against the codebase.
Why use it?
Documentation can become incorrect as software changes; this helps reveal where the written guidance no longer matches the project.

Command

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/raccioly/docguard/docguard.review
Clone the repo
git clone --depth 1 https://github.com/raccioly/docguard

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 docguard.review

README.md
[![agentmods](https://agentmods.dev/badge/commands/raccioly/docguard/docguard.review.svg)](https://agentmods.dev/commands/raccioly/docguard/docguard.review)
Your own site
<a href="https://agentmods.dev/commands/raccioly/docguard/docguard.review"><img src="https://agentmods.dev/badge/commands/raccioly/docguard/docguard.review.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 582 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.00012 $0.00582
Opus 5 $0.00006 $0.00291
Sonnet 5 $0.00002 $0.00116
Haiku 4.5 $0.00001 $0.00058

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

Security

Grade A, and why

docguard.review 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 5d 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.

.agent/commands/docguard.review.md · 72 lines

How it starts

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

/docguard.review — Review Documentation vs Code

You are an AI agent reviewing documentation quality and detecting drift between docs and code.

Step 1: Run Diagnostics

npx docguard-cli diagnose
npx docguard-cli diff
npx docguard-cli score

Read all output. Identify where documentation no longer matches the codebase. Findings carry stable codes — npx docguard-cli explain <CODE> when unclear.

Step 2: Verify Documented Claims Against Code

npx docguard-cli verify --semantic

This extracts every checkable claim in the canonical docs — counts, limits, rate numbers, retention windows, status enums — as a task list with the nearest cited code path. You perform each verification: read the cited code, compare the value, and report every mismatch with both values. This is the highest-value review step; deterministic validators cannot judge these.

Step 3: Semantic Analysis (Beyond CLI)

For each canonical doc, verify alignment with actual code:

Analysis What to Check
Architecture ↔ Code Components in ARCHITECTURE.md exist as real modules
Data Model ↔ Code Schemas in DATA-MODEL.md match actual implementations
Security Claims Auth mechanisms in SECURITY.md match actual code
Test Coverage Critical flows in TEST-SPEC.md have actual test files
Terminology Same concepts named consistently across all docs

Step 4: Update Stale Docs

For each stale or drifted document:

  1. Decide which side is wrong first. Canonical docs are the spec — if the code regressed from a documented decision, flag the code (or record a // DRIFT: reason + DRIFT-LOG.md entry); don't rewrite the doc to match a regression.
  2. Sections inside <!-- docguard:section ... source=code --> markers are regenerated — run npx docguard-cli sync --write instead of editing by hand.
  3. For hand-maintained sections: read the relevant source, update the specific section, refresh docguard:last-reviewed to today.
  4. Add entry to CHANGELOG.md under [Unreleased].

Read the full file on GitHub · 72 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. 5d ago First seen · 72 lines · 12 tokens per session scan A b27c99a4a02f

Subscribe to this mod's changes

docguard.review is a command published in the GitHub repository raccioly/docguard (27 stars, last pushed 3d ago), licensed MIT. It adds 12 tokens to every session and 582 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-30.