docguard.guard

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

A command that runs DocGuard checks for Canonical-Driven Development, a method where approved documentation guides implementation.

In plain words
What is it for?
Use it as a quality gate before commits or after implementation work, including reviewing structured validator results.
Why use it?
It identifies documentation and compliance problems and points to the next command or action needed to address them.

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.guard
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.guard

README.md
[![agentmods](https://agentmods.dev/badge/commands/raccioly/docguard/docguard.guard.svg)](https://agentmods.dev/commands/raccioly/docguard/docguard.guard)
Your own site
<a href="https://agentmods.dev/commands/raccioly/docguard/docguard.guard"><img src="https://agentmods.dev/badge/commands/raccioly/docguard/docguard.guard.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 733 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.00013 $0.00733
Opus 5 $0.00006 $0.00367
Sonnet 5 $0.00003 $0.00147
Haiku 4.5 $0.00001 $0.00073

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

Security

Grade A, and why

docguard.guard 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 3d 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.guard.md · 68 lines

How it starts

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

/docguard.guard — Validate CDD Compliance

You are an AI agent enforcing Canonical-Driven Development (CDD) compliance using DocGuard.

Step 1: Run Guard (machine-readable)

npx docguard-cli guard --format json

Read the JSON contract — do not parse prose:

Field Meaning
status PASS / WARN / FAIL (severity-aware; matches the exit code: 0/2/1)
findings[] Structured issues: {code, severity, confidence, message, location, suggestion}
nextStep The single suggested follow-up command (null on PASS)
reportable[] Low-confidence findings (possible false positives) — verify before acting
coverage Markdown tier map: canonical / tracked / ignored / unclassified[]
semanticClaims.count Documented counts/limits/enums NOT yet verified against code
validators[] Per-validator results, including na (nothing to validate ≠ pass)

Step 2: Understand each finding before fixing

  • Every finding carries a stable code (e.g. STR001, ENV003, XRF002). Run npx docguard-cli explain <CODE> for its contract, cause, and remediation.
  • confidence: "low" means the scanner itself is unsure — verify against the code before changing anything, and report real false positives with npx docguard-cli feedback.
  • A finding's suggestion may include a ready-to-run command or an inline pragma. Prefer those over inventing your own fix.

Step 3: Fix, suppress, or escalate

  1. Mechanical issues first: npx docguard-cli fix --write applies safe, provenance-checked fixes (broken anchors, stale counts/versions). Never hand-edit what the tool can fix deterministically.
  2. Prose/content issues: follow the /docguard.fix workflow (research → write real content).
  3. Genuine false positives: suppress at the finding site with the code — // docguard:ignore <CODE> on (or above) the flagged line — or mark a whole validator not-applicable in a doc: <!-- docguard:validator <key> n/a — reason -->. Always include the reason. Never suppress to silence a real issue.
  4. If semanticClaims.count > 0, offer to run npx docguard-cli verify --semantic and check each extracted claim against the code — a green guard asserts structure, not the truth of documented numbers.

Read the full file on GitHub · 68 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. 3d ago First seen · 68 lines · 13 tokens per session scan A 5e58038377de

Subscribe to this mod's changes

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