DocGuard is a documentation validation and enforcement tool for AI-assisted development, forming the enforcement layer of the Canonical-Driven Development (CDD) methodology: making documentation the source of truth, with AI writing the documentation and DocGuard responsible for verification. It checks whether the facts declared in the documentation are consistent with repository evidence and generates structured remediation tasks for AI agents.
Main capabilities: runs 34 automated validators, covering documentation structure, references, generated blocks, requirements traceability (FR, SC, NFR, US, AC and other IDs), etc.; outputs stable finding codes, distinguishing between act (directly fixable) and escalate (requires human judgment); provides a CDD structural maturity score; supports .docguard-evidence.json for local evidence verification of selected claims; supports JSON, SARIF, and JUnit output for automation.
Usage: the install command is npm i -g docguard-cli (package name docguard-cli, command docguard), the Python package is a thin wrapper that delegates to npx, and Node.js 18+ is required. Core commands include diagnose (runs all validations and outputs a remediation plan), guard (validate), fix --write (only modifies documents marked docguard:generated, idempotent), verify --evidence, init, upgrade --apply, mcp, ci, etc., 27 commands in total, plus 6 scaffolds invoked via docguard init --with <name>. Supports pre-commit, GitLab CI, Homebrew, Docker (an MCP server on GHCR, read-only, with the project mounted at /workspace), and MCP clients such as Claude and Cursor.
Use cases: documentation quality assurance in AI coding agent workflows, specification validation for Spec Kit projects, and documentation drift gates in CI.
Limitations: the MCP server is read-only and will not write to the mounted project; fix does not rewrite body text, and body text modifications are still done by the agent; there are no parsers for languages such as Go, Java, Kotlin, Ruby, Rust, PHP, and C#, so only pattern matching is used, and evidence for the absence of issues is weak; the confidence of most finding codeshas not been measured; the 2026 research cited in the documentation only explains the motivation for the evaluation and does not prove the effectiveness of DocGuard.