DocGuard
This is a read-only MCP server that checks, explains, and navigates a project's canonical documentation against its code.
Run all enabled DocGuard validators with
docguard_guard, returning status, findings, evidence, coverage, and per-validator results.Compute the project's CDD maturity score with grade and category breakdown.
Explain a stable finding code, including its validator and suppression guidance.
Verify declared evidence in
.docguard-evidence.jsonagainst bounded local sources.Extract semantic claims from canonical docs as a verification task list.
Generate a commit-stamped compliance-evidence bundle with guard verdict, score, ALCOA+ attributes, fix history, and integrity hash.
Find which documentation describes a given file, including sections, anchors, requirement tags, and open findings.
Outline a document's headings, section markers, fact markers, review date, and size.
Read one bounded section of a document by id, anchor, heading, or nearby line.
Produce a bounded task-context packet with linked requirements, code/test pointers, excerpts, and verification steps.
List code-to-requirement
@implements/@reqanchors with resolution tiers and problems.Diagnose what needs fixing by running guard and returning actionable findings and next steps.
Scope each tool to the served directory or a subdirectory via
projectDir.
Integrates with GitHub Spec Kit to validate specifications, plans, and tasks created by Spec Kit's AI-driven slash commands.
Provides a GitHub Action for continuous integration, enabling DocGuard validation to run as part of CI/CD pipelines.
Provides a GitLab CI component for integrating DocGuard validation into GitLab pipelines.
Provides a pre-commit hook to run DocGuard validation on changed files before committing.
🛡️ DocGuard
English · Português (BR) · Español
The enforcement layer for Spec-Driven Development. Validate. Score. Enforce. Ship documentation that AI agents can actually use.

▶️ Watch the 79-second explainer (sound on, with captions): what DocGuard checks, how it guards the merge, and how to start.
✨ See what DocGuard catches in 30 seconds — no install, no setup:
npx docguard-cli demoRuns against a built-in sample project with planted drift. It shows you the findings and how to fix them.

📚 Documentation: Installation · Existing projects · Spec Kit · CI · Languages and frameworks · Coding agents · Finding codes · Troubleshooting
Table of Contents
Related MCP server: DocuGenerate MCP Server
What is DocGuard?
DocGuard enforces Canonical-Driven Development (CDD). In CDD, the documentation is the source of truth, not an afterthought. An agent writes the docs, and DocGuard checks them.
Traditional Development | Canonical-Driven Development |
Code first, docs maybe | Docs first, code conforms |
Docs rot silently | Drift is tracked and enforced |
Docs are optional | Docs are required and validated |
One agent, one context | Any agent, with shared context from canonical docs |
DocGuard is an official GitHub Spec Kit community extension. It checks the files that Spec Kit creates. Your specs stay in good shape from the start to the end of the project.
🧭 How it works (10-page brief) (PDF) · 📖 Philosophy · 📋 CDD Standard · ⚖️ Comparisons · 🔬 Validation · 🗺️ Roadmap
Architecture
graph TD
CLI["CLI Entry<br/>docguard.mjs"] --> Commands["Commands (28)"]
Commands --> guard["guard"]
Commands --> generate["generate"]
Commands --> score["score"]
Commands --> diagnose["diagnose"]
Commands --> setup["setup wizard"]
Commands --> other["diff · init · fix · trace · impact · sync · reconcile · retire · specs · ignore<br/>explain · memory · upgrade · agents · hooks · badge · ci · watch"]
guard --> Validators["Validators (37)"]
generate --> Scanners["Scanners (4)<br/>routes · schemas · doc-tools · speckit"]
score --> Scoring["Weighted Scoring<br/>8 categories"]
diagnose --> Validators
diagnose --> AIPrompts["AI-Ready<br/>Fix Prompts"]
Validators --> Output["Output"]
Scanners --> Output
Scoring --> Output
Output --> Terminal["Terminal"]
Output --> JSON["JSON"]
Output --> Badge["Badge"]
style CLI fill:#2d5016,color:#fff
style Validators fill:#1a3a5c,color:#fff
style Scanners fill:#1a3a5c,color:#fff
style Output fill:#5c3a1a,color:#fffDistribution: Node.js core (npm) · Python wrapper (PyPI) · GitHub Action (
action.yml) · Spec Kit Extension (ZIP)
Why DocGuard?
DocGuard reads what your documentation says and checks it against your code. When a statement is wrong, DocGuard gives your agent a repair task with the file and the line. The checks are deterministic. They cover supported facts, references and generated sections.
DocGuard never changes a requirement or a decision that a person wrote. When the code differs from such a document, DocGuard reports the difference, and a person decides.
DocGuard checks only what it can prove. Each guard result lists the checks that ran. The CDD grade shows how complete your documentation structure is. It does not show whether the statements are true.
To check an exact statement, declare it in .docguard-evidence.json. DocGuard then compares that statement with current local evidence. A statement that DocGuard cannot check stays marked as unchecked. Coverage gaps and open claims stay visible, so your team can choose how strictly to enforce.
A 2026 study found that repository context files did not usually make agents more successful, and each run cost more, in the settings it tested. The same study found that agents follow the instructions they get. So keep the context short and correct, and measure the results. The study does not prove that DocGuard works. Evaluating AGENTS.md, revised June 2026.
The current roadmap puts four things first: accurate detection, reproducible evidence, document lifecycle management, and regression cases from contributors. DocGuard removes released plans and superseded specs from the active agent context. You can recover them from Git.
⚡ Quick Start
Package names: the repository is
raccioly/docguard. The package isdocguard-clion both npm and PyPI. The command you run isdocguard. All three are the same project. The-clisuffix is only the registry name. The package runs no install scripts, sonpm i -g docguard-cli --ignore-scriptsdoes the same thing.
Node.js (npm)
# No install needed — run directly
npx docguard-cli diagnose
# Or install globally
npm i -g docguard-cli
docguard diagnoseStrict is the default.
docguard guardexits 4 when a check that applies to your project examined nothing. For example, you have routes but no API reference. DocGuard then prints what to add. DocGuard skips a check that does not apply. It reports a layout that it cannot read, and the run does not fail. Did a red build appear after you upgraded? Read Upgrading to Strict (also indocs/upgrading-to-strict.md). To keep the earlier behavior, set"enforcement": "standard"in.docguard.json. Under strict, a"validators": { "<key>": false }entry no longer switches a check off.
Python (PyPI)
pip install docguard-cli
docguard diagnoseNote: The Python package is a thin wrapper that runs
npx. You need Node.js 18+ on the system.
Docker (MCP server)
The MCP server is a container image on GHCR. You do not need Node.js. The image is public, so you do not need to sign in to pull it:
# Run the MCP server against the current directory
docker run -i --rm -v "$PWD":/workspace ghcr.io/raccioly/docguard:latestThe entrypoint uses the stdio MCP transport. Stdout carries the JSON-RPC messages, so keep every other output off it. Mount the project you want checked at /workspace. The tools check it by default. A projectDir in a tool call must be /workspace or a directory inside it. To serve another mounted tree, add --root <dir> after the image name.
In CI, pin a version instead of using latest:
docker run -i --rm -v "$PWD":/workspace ghcr.io/raccioly/docguard:0.34.9The server is read-only: it only reads the mounted project.
More ways to integrate
pre-commit — runs guard on the changed files at every commit:
repos: - repo: https://github.com/raccioly/docguard rev: v0.50.0 hooks: [{ id: docguard-guard }] # docguard-guard-full for pre-pushMCP (Claude, Cursor, any MCP client) —
claude mcp add docguard -- npx -y docguard-cli mcp; read-only tools that check docs (guard, score, diagnose, …) and that read them one section at a time. The full list is in docs/ai-integration.md. The registry manifest is in the repository (server.json, ready for Smithery).GitLab CI — a component at
templates/ci/gitlab-component.yml(a guard, score or ci job with a SARIF artifact).Homebrew —
brew install raccioly/tap/docguard. The release workflow builds the formula from the template inpackaging/homebrew/and the published npm tarball. It then pushes the formula to the tap.
Core Workflow
# 1. Initialize docs for your project
npx docguard-cli init
# 2. Or reverse-engineer docs from existing code
npx docguard-cli generate
# 3. AI diagnoses issues and generates fix prompts
npx docguard-cli diagnose
# 4. Validate — use as CI gate
npx docguard-cli guard
# 5. Check maturity score
npx docguard-cli scoreThe AI Loop
diagnose → AI reads prompts → AI fixes docs → guard verifies
↑ ↓
└───────────────── issues found? ←──────────────────────┘diagnose is the main command. It runs all validators and turns every failure into a fix prompt for an agent. It prints a plan to fix them. Your agent runs it, fixes the docs, and runs guard to check the fixes.
Mechanical vs. agent fixes
DocGuard splits drift into two kinds and labels each one:
Kind | Example | How it's fixed |
Mechanical (deterministic) | An endpoint documented in |
|
Agent (needs judgment) | Rewriting an X-Ray prose section as CloudWatch; writing a new endpoint's request/response | Sent to an agent through |
docguard fix --write changes only docs marked <!-- docguard:generated true --> (override with --force). Running it again has no extra effect. It prints exactly what it changed. The agent handles prose.
Continuous documentation workflow
guard ──▶ fix --write (mechanical, auto) ──▶ guard ──▶ diagnose (agent prompts for the rest)CI / pre-commit:
docguard hooks --type pre-commit --auto-fixinstalls a hook. The hook applies mechanical fixes, stages the docs again, and runsguard. DocGuard shows anything left as agent prompts.Agent-driven:
docguard diagnose --autocreates missing docs and applies mechanical fixes. It then prints prompts for the rewrites that remain.JSON for automation:
guard/diagnose --format jsoninclude amechanicalFixesarray and tag each findingmechanicaloragent. An agent can then apply the fix or hand it off.
☁️ AWS AI-DLC Integration
DocGuard reads AWS AI-DLC workspaces directly. It reports traceability targets that no longer exist, gaps left in completed stages, deliverables removed after a unit, and agent memory that names something that is gone (AID001–AID004, MEM001–MEM002). DocGuard also ships as an AI-DLC plugin. Its docguard-guard sensor fails a construction gate when the stage introduced drift. See the AI-DLC guide.
🌱 Spec Kit Integration
DocGuard is a community extension for GitHub's Spec Kit framework. Spec Kit creates specs with slash commands such as /speckit.specify and /speckit.plan. DocGuard checks their quality.
How They Work Together
┌─────────────────┐ ┌──────────────────┐
│ Spec Kit │ │ DocGuard │
│ │ │ │
│ /speckit.specify│ ──────→ │ docguard guard │
│ Creates specs │ │ Validates specs │
│ (AI-driven) │ │ (automated) │
└─────────────────┘ └──────────────────┘Phase | Tool | What happens |
1. Initialize |
| Creates |
2. Write specs |
| AI creates |
3. Validate |
| Checks spec quality (mandatory sections, FR/SC IDs) |
4. Plan |
| AI creates |
5. Validate |
| Checks plan quality (sections, structure) |
6. Tasks |
| AI creates |
7. Validate |
| Checks task quality (phases, T-IDs) |
8. Implement |
| AI writes code |
9. Enforce |
| Final check in CI/CD |
What DocGuard Validates in Spec Kit Projects
spec.md — Mandatory sections (User Scenarios, Requirements, Success Criteria), FR-xxx IDs, SC-xxx IDs
plan.md — Summary, Technical Context, Project Structure sections
tasks.md — Phased task breakdown (Phase 1, 2, 3+), T-xxx task IDs
constitution.md — Detected at
.specify/memory/constitution.mdor project rootRequirement traceability — FR, SC, NFR, US, AC, UC, SYS, ARCH, MOD, T IDs
Installing as a Spec Kit Extension
docguard init does this for you. It needs the specify CLI on your PATH (Spec Kit ≥ 0.11.2, the
minimum version the extension declares). init sets up Spec Kit for the coding agent that the
repository already uses. Then it registers the DocGuard extension that ships inside the installed
package. The registration downloads nothing.
If the registered extension comes from another DocGuard release,
init re-registers it when the versions differ, and it keeps the priority. docguard upgrade --apply does the same. init says the
workflow hooks are active only when each mandatory hook resolves to a command file that your agent
can run. The mandatory hooks are speckit.docguard.brief (before specify),
speckit.docguard.preflight (before tasks) and speckit.docguard.guard (after implement). If a hook
does not resolve, init names the missing one.
Spec Kit registers no extension commands for its generic integration. For generic, DocGuard
writes them next to Spec Kit's own commands (.agent/commands/ by default). DocGuard prints every
failure with Spec Kit's own error and the command to run by hand. Only init and upgrade --apply
change Spec Kit. Other commands print a one-line hint at most.
DocGuard puts its own skills where your agent reads them: in .claude/skills/ for Claude Code (or in
the skills directory of another skills-based integration), and in .agent/ for the generic
integration or for an agent that DocGuard cannot place. A commands-only integration such as Gemini
gets Spec Kit's speckit.docguard.* commands and no extra copies. The command and skill files run
docguard from your PATH when it is installed. Otherwise they run npx --yes docguard-cli@<version>,
pinned to the release they shipped with. They never fetch @latest.
DocGuard prints suggestions (Next: …, Fix: …). A suggestion names a slash command only when the
command file exists for your agent. It uses the form your agent uses: /speckit-docguard-guard in
Claude Code, /speckit.docguard.guard for generic. Otherwise it prints the CLI command.
docguard init registers the copy of the extension inside the installed package. To register
it yourself, use a release ZIP or a local checkout. A bare specify extension add docguard does
not work on a default Spec Kit setup. DocGuard is in Spec Kit's community catalog, and Spec Kit uses
that catalog only to find extensions.
specify extension add docguard --from https://github.com/raccioly/docguard/releases/download/vX.Y.Z/spec-kit-docguard-vX.Y.Z.zip
specify extension add ./node_modules/docguard-cli/extensions/spec-kit-docguard --devSee the Spec Kit guide for the hooks, the spec lifecycle registry and an end-to-end flow.
The registration adds the speckit.docguard.* commands listed in
extension.yml and the workflow hooks that run them.
Skills-based agents such as Claude Code invoke the commands as /speckit-docguard-guard and so on.
Usage
DocGuard ships 28 commands: the "Daily 5" and 23 situational tools. The tools include lifecycle reconciliation, doc dependency review, requirement anchors, agent-rule resolution, the suppression listing, retirement and spec tracking, the zero-install demo, the mcp server, and the ci pipeline gate. Six more one-shot scaffolders are available with docguard init --with <name>. Legacy command forms still work until v1.0 and print their replacements.
The Daily 5 — what you use 95% of the time:
Command | What It Does |
| Set up a project ( |
| Check against canonical docs — 37 validators |
| Show gaps between docs and code ( |
| Refresh the doc sections that come from code, including the |
| CDD maturity score for the doc structure (0-100; not a guard verdict; |
Tools (situational, but day-to-day useful):
Command | Purpose |
| Zero-install demo — runs guard on a built-in sample project that has drift ( |
| Runs guard and prints fix prompts for an agent, in one command |
| Print fix instructions for an agent, for specific docs ( |
| Apply deterministic fixes (no AI — version bumps, counts, anchors, sections) |
| Log of every mechanical fix applied (from |
| Write docs from your existing code ( |
| One-shot agent task graph, or a size-limited packet of current evidence for one task ( |
| Paste any warning, or a finding code like |
| Check exact declarations that link a statement to its source. The sources can be typed JSON values, counts of bounded collections, saved oasdiff JSON, and saved Buf JSON Lines. The result tells apart these cases: verified within scope, contradiction, stale inputs, inconclusive evidence, and unsupported formats. |
| List the documented numbers, limits and enums (retention days, rate limits, GSI/role counts, status enums) as tasks for an agent to check against the code. Regex and AST checks cannot see this kind of drift |
| Check AGENTS.md and CLAUDE.md for drift: duplicate rules, never-versus-always contradictions, stale file pointers and unknown commands. It also gives clustered rule pairs to an agent as tasks to judge |
| Review any finding, or a synthetic false-positive, false-negative or unsupported fixture. The command checks its opposite control, reduces it the same way every time, searches open and closed duplicates, and can write a test-only contribution. Nothing is submitted automatically. |
| Find planning material that is finished or replaced ( |
| Build a read-only code↔spec review graph since a Git ref. It sorts changes into mechanical facts, approved intent, decisions, unrelated changes and unsupported evidence. |
| Lists doc sections whose covered code changed since their last review ( |
| Lists every |
| Lists every suppression in the project ( |
| Shows which agent instruction files each harness (Codex, Claude Code, Cursor, Copilot, OpenHands) loads for a path, why, and how many bytes ( |
| Keep the versioned spec registry, run preflight on new specs, and complete specs through transactions that need evidence, with bounded outcomes and a regenerated active context. A verified living spec can record later reviewed maintenance, and you do not reopen it or copy it. |
| Check or refresh |
| Before you write a spec, print the current spec lifecycle and evidence. Before planning, check the generated draft for structural blockers, and report overlap in meaning as evidence for review only. |
| Record a person's approval of a spec in the registry. With |
| MCP server. It gives Claude, Cursor and any MCP client native tools for checking (guard, score, explain, verify, report, diagnose) and for exact doc navigation (docs for a file, document outline, one section, task context). |
| Compliance evidence bundle for audits: combined readiness, guard verdict, structural maturity, ALCOA+ attributes and fix history. It carries the git commit and a sha256 integrity hash that shows tampering ( |
| Pipeline gate: guard and structural maturity in one command, with a READY/ATTENTION/BLOCKED assessment. It never creates files or changes your source. It writes only its own |
| Score history from recorded |
| Accuracy summary for each domain (endpoints / entities / env / tech) |
| Shows which claims do not match the code |
| The enforcement ladder: which advisory finding codes, judging by CI history, are ready to become warnings or errors |
| AWS AI-DLC's sensor contract, in one JSON line. It passes when the work in progress added no drift since HEAD. The DocGuard AI-DLC plugin runs it at construction gates. |
| Write |
| Shows which checks pulled each category down |
| Requirements traceability — forward AND reverse |
| Spec-adherence score for each feature (requirement coverage, task completion, task evidence, artifacts), worst first, with fix hints |
| Check npm for a newer CLI (the only command that contacts a registry) and migrate the |
| Live mode: runs guard again when files change |
init --with <name> scaffolders — picked at init time:
Scaffolder | What It Generates |
|
|
| Git pre-commit / pre-push hooks |
| GitHub Actions / pipeline YAML |
| Shields.io score badges for README |
|
|
| External doc-site config (Mintlify) — experimental |
Run one (docguard init --with hooks) or several together (docguard init --with agents,hooks,badge,ci).
To declare an exact fact, copy templates/evidence-manifest.json to
.docguard-evidence.json. Point its literal Markdown template at one unique
statement. Then link that value to a supported local source. Run
docguard verify --evidence --format json before you turn on the guard in CI.
External compatibility declarations read saved oasdiff or Buf output. They need
a current SHA-256 identity for every declared repository input.
Deprecation aliases — setup · agents · hooks · badge · llms · publish · impact still work until v1.0 and print a yellow warning on stderr. audit → guard is permanent and silent. ci is a current command for pipelines.
CLI Flags
Flag | Description | Commands |
| Project directory (default: | All |
| Show detailed output | All |
| Hide the banner, for hooks, CI loops and scripts | All |
| Output for machines (clean JSON, no ANSI codes) | guard, score, diff, trace, diagnose, memory, impact, explain, verify, reconcile, retire, specs, ignore |
| claimspec v1 | ignore |
| SARIF 2.1.0 output — findings as rules/results for GitHub Code Scanning and SARIF dashboards | guard |
| JUnit XML output — one testcase per validator, for GitLab CI ( | guard |
| Adopt DocGuard on a legacy repo with no red build on day one. It saves today's findings in a committed | guard |
| Generate | llms |
| With | guard |
| Write | memory |
| With | memory |
| Regenerate the agent files (CLAUDE.md, Copilot, Cursor, …) from AGENTS.md. Each file carries a hash marker. DocGuard never changes hand-written files without | agents |
| CI check for the synced agent files. It exits 2 when one is stale | agents |
| Overwrite existing files (creates | generate, agents, init |
| Bypass ping-pong suppression in | fix --write |
| Starter / standard / enterprise | init |
| Skip Spec Kit: no | init |
| With | init |
| Light pre-commit mode: runs the fast validators (including covered-doc dependencies) on changed files only | guard |
| Run time of each validator, slowest first | guard |
| Show warnings/errors even when status is PASS | guard |
| Save the running CLI version in | guard |
| Detail for each category | score, memory |
| Exit 1 if behind (for CI) | upgrade |
| Actually run the migration | upgrade |
| Open a PR with the migration | upgrade |
| Reverse traceability (code → docs) | trace |
| Skip the reverse-import-graph analysis (docs about modules that import a changed file) | impact, diff --since |
| Doc-conflict analysis of open PRs. Two PRs that affect the same canonical doc risk a merge-order problem (needs the | impact |
| Serve MCP over Streamable HTTP instead of stdio (a server for the team; loopback only unless you set an api-key) | mcp |
| Serve another directory tree. Tool calls can pass a | mcp |
| Show fix audit log | fix |
When you run DocGuard from a nested package without --dir, it checks only that
directory. DocGuard scans the parent directories up to a limit. If it finds a
.docguard.json or an npm/pnpm workspace declaration that owns the package, it
prints on stderr the exact command that reruns the check for the whole repository.
DocGuard never changes the scope by itself. JSON, SARIF and JUnit output on stdout
stay valid. Machine runs get one typed docguard.repository-root-guidance JSON
diagnostic on stderr. DocGuard prints no suggestion when there is a local config,
an explicit --dir, an unmatched workspace, or a nested Git boundary.
Example Output
$ npx docguard-cli generate
🔮 DocGuard Generate — my-project
Scanning codebase to generate canonical documentation...
Detected Stack:
language: TypeScript ^5.0
framework: Next.js ^14.0
database: PostgreSQL
orm: Drizzle 0.33
testing: Vitest
hosting: AWS Amplify
✅ ARCHITECTURE.md (4 components, 6 tech)
✅ DATA-MODEL.md (12 entities detected)
✅ ENVIRONMENT.md (18 env vars detected)
✅ TEST-SPEC.md (45 tests, 8/10 services mapped)
✅ SECURITY.md (auth: NextAuth.js)
✅ REQUIREMENTS.md (spec-kit aligned)
✅ AGENTS.md
✅ CHANGELOG.md
✅ DRIFT-LOG.md
Generated: 9 Skipped: 0🔍 Validators
DocGuard runs 37 automated validators on every guard run. Validators that read source code know the language where their evidence model applies. Validators for the repository and for documents work with any source language.
Counting note:
guardprints one row for each check.Structureproduces a second check (Doc Sections) under the same validator key, so the table below has one row more than there are validators. The published number is the count of shippedcli/validators/*.mjsmodules, and tests enforce it. Count those modules, not output rows.
# | Validator | What It Checks | Default |
1 | Structure | Required CDD files exist; each | ✅ On |
2 | Doc Sections | Canonical docs have required sections (or N/A markers) | ✅ On |
3 | Docs-Sync | Routes/services referenced in docs + OpenAPI cross-check | ✅ On |
4 | Drift-Comments |
| ✅ On |
5 | Changelog | CHANGELOG.md has [Unreleased] section | ✅ On |
6 | Test-Spec | Tests exist per TEST-SPEC.md rules | ✅ On |
7 | Environment | Env vars documented, | ✅ On |
8 | Security | No hardcoded secrets in source code | ✅ On |
9 | Architecture | Imports follow layer boundaries (honors | ✅ On |
10 | Freshness | Docs not stale relative to code changes (rename-aware via | ✅ On |
11 | Traceability | Requirement IDs (FR, SC, NFR, US, AC, T) trace to tests | ✅ On |
12 | Docs-Diff | Code artifacts match documented entities | ✅ On |
13 | API-Surface | API-REFERENCE.md endpoints match real routes (OpenAPI cross-check) | ✅ On |
14 | Metadata-Sync | Version refs consistent across docs | ✅ On |
15 | Docs-Coverage | Code features referenced in documentation | ✅ On |
16 | Doc-Quality | Writing quality (readability, passive voice, atomicity, IEEE 830), and ASD STE100 plain writing: each sentence within 25 words, 20 in a numbered step (DQ009), and numbered steps that start with a verb (DQ010, English, informational) | ✅ On |
17 | TODO-Tracking | Untracked TODOs/FIXMEs and skipped tests (skips test files by default) | ✅ On |
18 | Schema-Sync | Database models documented in DATA-MODEL.md | ✅ On |
19 | Spec-Kit | Spec quality validation (FR-IDs, mandatory sections, phased tasks, unique spec numbers) | ✅ On |
20 | Document-Lifecycle | Exact terminal states, advisory completion signals, incomplete coverage, and manifest/working-tree inconsistencies | ✅ On |
21 | Spec-Registry | Immutable spec identities, byte-stable evidence projection, reviewed lifecycle preservation, and archive/storage consistency | ✅ On |
22 | Evidence | Exact declared Markdown statements match current typed JSON, bounded collections, or saved compatibility reports; unsupported and missing evidence stays visible | ✅ On |
23 | Cross-Reference | Internal markdown links + anchors resolve (with "did you mean?" hints); Obsidian wikilinks validated when the repo uses them as file links ( | ✅ On |
24 | Generated-Staleness |
| ✅ On |
25 | Canonical-Sync | DocGuard's own README count claims match the code (DocGuard repo only; N/A elsewhere) | ✅ On |
26 | Metrics-Consistency | Hardcoded numbers match actual counts, including runtime-dependency claims against | ✅ On |
27 | Surface-Sync | Drift in listed items: names in doc tables and lists (commands, checks, etc.) match the code (opt-in via | ✅ On |
28 | Diff-Suspicion | Driven by changes: DocGuard flags a doc or agent-instruction file for review when it references code that changed since the ref AND shares removed domain symbols with it (arXiv 2010.01625, F1 74.7) | ✅ On |
29 | Reference-Existence | Two-revision check: DocGuard flags a doc as outdated when it names a backticked code symbol that existed at the last doc update but is gone at HEAD (arXiv 2212.01479) | ✅ On |
30 | API-Doc-Smells | Bloated (≥300 words) / Lazy (≤6 prose words) API documentation units, keyed on signature-headed sections (F1 0.90/0.95) | ✅ On |
31 | Doc-Dependency | DocGuard reports a doc section that declares | ✅ On |
32 | Path-Scoped-Rules | Agent instruction files per harness (nested AGENTS.md/CLAUDE.md, Claude Code rules and skills, Cursor | ✅ On |
33 | Doc-Ownership | With an | ✅ On |
34 | Suppressions | Suppressions of any kind whose | ✅ On |
35 | Requirement-Anchors | With | ✅ On |
36 | Decision-Records | ADR status, one-way or dangling supersession, index/record mismatches, and unanswered clarifications or | ✅ On |
37 | AIDLC | AWS AI-DLC workspaces ( | ✅ On |
38 | Glossary | One term for one concept: documents that use a term the project glossary ( | ✅ On |
Per-validator controls (in .docguard.json):
{
"validators": {
"test-spec": false, // disable (kebab-case OR camelCase both accepted)
"freshness": true
},
"severity": {
"todoTracking": "high", // warnings fail CI
"freshness": "low" // warnings ignored for exit code
},
"findingSeverity": {
"TRC004": "low", // only this finding becomes informational
"SEC001": "high" // this exact code always blocks
}
}An exact findingSeverity entry overrides the validator severity. Guard
JSON, SARIF and JUnit keep the severity that the detector assigned, and add the
effective severity and the policy source. An error from the detector keeps
blocking, unless you configure its exact stable code.
🎚️ Reading a Finding
A finding used to answer one question, "how worried should you be?", with one
confidence field. That field did three different jobs at once. DocGuard now
separates them. These fields are independent. A blocking error can be an
escalation. A high-confidence finding can still need a person's judgment.
Field | The question it answers | Values |
| Does CI block? |
|
| Who decides — the tool or you? |
|
| How sure is the detector of its observation? |
|
| Has the reviewed corpus ever measured this code? |
|
| Which analyzer produced it? |
|
act — DocGuard says there is a defect and names the fix. It is safe to
apply, also through docguard fix or an agent.
escalate — DocGuard saw a signal, and you decide what it means. Freshness
FRS002 ("13 code commits since the document was reviewed") is the typical
case. The count comes from git log, so it is exact and confidence: high.
It shows only that a review is due. It never shows that the document is
wrong. If you edit a document only to make an escalation stop printing, you
destroy the signal and fix nothing. It is a correct result when you judge an
escalation and leave the document as it is.
evidence.status tells you how much a confidence label is worth. measured
quotes the reviewed precision corpus with n and a Wilson lower bound.
not-measured means the label is only a maintainer's estimate. Most
codes are not measured. This does not make their findings wrong. It means nobody
has verified them, and docguard feedback samples them for that reason.
parserTier tells you what the detector could see. js-ast and py-ast
mean it read a syntax tree. regex-fallback means the language has a parser
(JS/TS, Python), but the parser was not available for that file.
fallback-language means DocGuard has no parser for the language at all
(Go, Java, Kotlin, Ruby, Rust, PHP, C#). DocGuard then matches routes and env reads
by pattern. In both cases, if there is no finding, that is weak evidence. The
validator reports applicability: partial with a reason that names the language
and the file count. DocGuard matches environment variables by pattern in every
supported language. For a source language with no env patterns (Swift, Scala,
…), the Environment check is partial, not a silent pass.
Every field appears on every finding in guard --format json, in SARIF
result.properties, and on each finding in diagnose --format json (which also
prints a dispositionCounts summary). guard, diagnose, ci and report
print the act/escalate split next to the verdict. report adds a column for each
field to its findings table. Run docguard explain <CODE> to see the evidence
for one code.
📄 Templates
DocGuard ships 18 templates with metadata, badges and revision history:
Template | Type | Purpose |
ARCHITECTURE.md | Canonical | System design, components, layer boundaries |
DATA-MODEL.md | Canonical | Schemas, entities, relationships |
SECURITY.md | Canonical | Auth, permissions, secrets management |
TEST-SPEC.md | Canonical | Test strategy, coverage requirements |
ENVIRONMENT.md | Canonical | Environment variables, deployment config |
REQUIREMENTS.md | Canonical | Spec-kit aligned FR/SC IDs, user stories |
DEPLOYMENT.md | Canonical | Infrastructure, CI/CD, DNS |
ADR.md | Canonical | Architecture Decision Records |
ROADMAP.md | Canonical | Project phases, feature tracking |
KNOWN-GOTCHAS.md | Implementation | Symptom → gotcha → fix entries |
TROUBLESHOOTING.md | Implementation | Error diagnosis guides |
RUNBOOKS.md | Implementation | Operational procedures |
VENDOR-BUGS.md | Implementation | Third-party issue tracker |
CURRENT-STATE.md | Implementation | Deployment status, tech debt |
AGENTS.md | Agent | AI agent behavior rules |
CHANGELOG.md | Tracking | Change log |
DRIFT-LOG.md | Tracking | Deviation tracking |
llms.txt | Generated | AI-friendly project summary (llmstxt.org) |
🤖 AI Agent Support
One-click MCP install
Claude Code:
claude mcp add docguard -- npx docguard-cli mcpClaude Desktop: download
docguard-v<version>.mcpbfrom the latest release and drag it into Settings → Extensions — it asks which project folder to check. You do not need npm or JSON editing.Anything MCP: DocGuard is a verified namespace on the official MCP registry (
io.github.raccioly/docguard).
DocGuard works with every major coding agent. All canonical docs are plain markdown, so an agent from any vendor can read them.
Agent | Compatibility | Auto-Generate Config |
Claude Code | ✅ |
|
GitHub Copilot | ✅ |
|
Cursor | ✅ |
|
Windsurf | ✅ |
|
Cline | ✅ |
|
Google Gemini CLI | ✅ |
|
Kiro (AWS) | ✅ | — |
Always-on nudge hook (Claude Code)
docguard hooks --claude # install (remove: docguard hooks --claude --remove)This registers a PostToolUse hook in the project's .claude/settings.json. After the
agent edits a canonical doc, the hook reminds it to run docguard guard --changed-only.
After the agent edits a code file that the docs reference, the hook reminds it to run
docguard impact. The hook is safe to merge: DocGuard adds or removes only its own entry.
It sends at most one reminder per file every 30 minutes. The hook cannot break a session,
because it hides its errors by design. You must opt in. init never installs it for you.
⚡ Slash Commands
DocGuard ships four slash commands (commands/ in this repository):
Command | What It Does |
| Run every validator |
| Analyze doc quality and suggest improvements |
| Generate targeted fix prompts for specific findings |
| CDD maturity score with an improvement roadmap |
Where the files go depends on your agent. If your Spec Kit integration uses skills (Claude Code,
Codex, Cursor, Copilot), DocGuard installs its skills instead, and Spec Kit installs the
speckit.docguard.* extension commands. DocGuard writes the /docguard.* files to .agent/commands/
only for Spec Kit's generic integration, or when no Spec Kit integration is present. The
Coding Agents reference lists the
exact paths for each agent.
🧠 AI Skills (Enterprise)
Besides slash commands, DocGuard provides 5 enterprise-grade AI skills. A skill is a detailed protocol that tells an agent what to run, and also how to think, check and repeat. The skills follow the design of Spec Kit's skills.
Skill | What It Does |
| 6-step quality gate with severity triage (CRITICAL→LOW), structured reporting, remediation |
| 7-step research workflow with per-document codebase research and 3-iteration validation loops |
| Read-only semantic cross-document analysis with 6 analysis passes and quality scoring |
| CDD maturity assessment with ROI-based improvement roadmap and grade progression |
| Refreshes code-truth doc sections in place and flags the prose sections to review when code changes |
Workflow Hooks
DocGuard adds automatic checks to the Spec Kit workflow:
Hook | When | Behavior |
| Before | Mandatory — briefs the agent on existing specs ( |
| Before | Mandatory — preflight check of the generated spec ( |
| After | Mandatory — runs DocGuard guard; then optionally records completion |
| After | Optional — records spec completion ( |
| After | Optional — shows CDD maturity score |
Orchestration Scripts
For advanced users and CI/CD pipelines, DocGuard includes bash scripts with --json output:
Script | Purpose |
| Find project docs and return a JSON list with metadata |
| Run guard, read the results and print fixes in priority order |
| Create a canonical doc with a metadata header |
📁 Examples
Three real-world projects to see DocGuard in action:
Example | Scenario | What You'll See |
Node.js API with zero docs | Cold-start: | |
Python app with drifted docs | Drift detection: catch when docs lie | |
Full CDD + Spec Kit | Gold standard: what maturity looks like |
See examples/README.md for step-by-step instructions.
🧪 Testing
Test Suite
npm test # 4,334 tests (node:test, zero test dependencies)The tests cover all 28 commands, every validator, project type detection, compliance profiles, JSON/SARIF/JUnit output, the packed npm tarball, and downstream field reports replayed as regression cases. This number is at least as high as the count of test cases that the test files declare statically. Metrics-Consistency flags this line if the number falls below that count.
CI Matrix
Node.js | OS | Status |
18 | ubuntu-latest | ✅ |
20 | ubuntu-latest | ✅ |
22 | ubuntu-latest | ✅ |
24 | ubuntu-latest | ✅ |
Self-Validation (Dogfooding)
In CI, DocGuard runs its own guard, score, diff, diagnose and badge commands on itself. This makes sure the tool passes its own checks.
🏢 Enterprise Adoption
Everything runs on your machine or in your CI, and your data stays in your own infrastructure. These parts matter at company scale:
Need | DocGuard answer |
Adopt on a legacy repo without a red pipeline on day one |
|
Audit trail for compliance reviews |
|
Every CI system, not just GitHub |
|
Trajectory, not snapshots |
|
AI agents on the team | The MCP server (stdio or team-shared HTTP) offers guard, score, verify, report, doc navigation and task context as read-only tools. |
Data-integrity framing auditors know | ALCOA+ scoring (FDA 21 CFR Part 11 / EMA Annex 11 vocabulary) built into |
⚙️ CI/CD Integration
Full recipes: see
docs-canonical/CI-RECIPES.mdfor guard, auto-fix (commits mechanical fixes back to PRs), nightly sync, score-on-PR, and pre-commit configs.
GitHub Actions — Guard (most common)
name: DocGuard Guard
on: [pull_request, push]
permissions: { pull-requests: write } # for the sticky PR comment (optional)
jobs:
docguard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: raccioly/docguard@v0.50.0
with:
command: guardThe action installs the docguard-cli version it was released with, so pinning
the action also pins the CLI. To override this, set docguard-version: latest (or
an exact x.y.z).
On pull requests, guard mode also gives feedback in the PR (both are on by default):
Input | Default | Description |
|
| Inline |
|
| A PR comment that stays in place, with the guard verdict, the top findings (by code), and the canonical docs that the PR's changed files affect ( |
Both run even when guard fails, because that is when you need the feedback. Do you
prefer GitHub's own code scanning? The output of docguard guard --format sarif
uploads straight to GitHub Code Scanning with github/codeql-action/upload-sarif.
GitHub Actions — Auto-Fix (commits mechanical fixes back)
name: DocGuard Auto-Fix
on: { pull_request: { types: [opened, synchronize, reopened] } }
permissions: { contents: write, pull-requests: write }
jobs:
autofix:
runs-on: ubuntu-latest
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0
- uses: raccioly/docguard@v0.50.0
with: { command: fix, auto-commit: 'true', comment-on-pr: 'true' }Pre-commit Hook
npx docguard-cli hooks --type pre-commitWorkflow starters (copy directly)
Two ready-to-use templates ship with the Spec Kit extension and as standalone files:
extensions/spec-kit-docguard/templates/github-workflows/docguard-guard.yml— mandatory CI gateextensions/spec-kit-docguard/templates/github-workflows/docguard-autofix.yml— PR auto-fix
✨ What's New
Highlights from recent releases:
Calibrated finding channels —
disposition,evidence.statusandparserTiernow sit next toseverityandconfidenceon every finding. Five questions now have five fields: "does CI block", "who decides", "how sure is the detector", "has this code ever been measured" and "which analyzer saw it". Before, one overloaded field answered all of them. See Reading a Finding.Adoption baseline —
guard --update-baselinefreezes a legacy repo's existing findings in a committed.docguard.baseline.json; guard and ci then fail only on NEW drift, and DocGuard always shows what it hides. Adopt it today, and fix the old findings at your own pace.docguard report— a compliance evidence bundle with the git commit (guard verdict, findings by code, CDD score, ALCOA+ attributes, fix history) and a sha256 integrity hash that shows tampering. Thedocguard_reportMCP tool also offers it.Score history +
score --trend—docguard cirecords every run to.docguard/history.jsonl; the trend view shows the sparkline and the change over time.Three machine formats for guard —
--format json,--format sarif(GitHub Code Scanning), and--format junit(GitLab, Jenkins, Azure DevOps, CircleCI).MCP server, stdio + team HTTP — guard, score, verify, report, doc navigation and task context as read-only agent tools:
claude mcp add docguard -- npx docguard-cli mcp.Agent-file family sync —
agents --syncuses AGENTS.md as the source and regenerates the CLAUDE.md,.cursor/rules, Copilot and Gemini versions. Source-hash markers show when a file drifts.verify --evidence,verify --semantic, andverify --instructions— check exact local evidence declarations first, list the remaining numbers, limits and enums as tasks for an agent, and check agent-instruction files for contradictions and stale pointers.docguard agent— an ordered task graph in one call, with the code facts already filled in. It replaces about 10 agent round trips with one call.docguard agent --task <text>— task context from approved current specs and canonical docs (you opt in). It has hashed excerpts, source and test pointers, and strict size limits. It abstains when it has no evidence to answer. In the frozen 27-run evaluation, every tested behavior stayed the same. Compared with the context pack, median steps fell by 50% and latency by 17%, but uncached input tokens rose by 80%.
See CHANGELOG.md for the full history.
📁 File Structure
your-project/
├── .specify/ # Spec Kit (if using specify init)
│ ├── specs/
│ │ └── 001-feature/
│ │ ├── spec.md # Requirements (FR-IDs, user stories)
│ │ ├── plan.md # Implementation plan
│ │ └── tasks.md # Task breakdown
│ ├── memory/
│ │ └── constitution.md # Project principles
│ └── templates/
│
├── docs-canonical/ # CDD canonical docs (the "blueprint")
│ ├── ARCHITECTURE.md # System design, components
│ ├── DATA-MODEL.md # Database schemas
│ ├── SECURITY.md # Auth, permissions, secrets
│ ├── TEST-SPEC.md # Required tests, coverage
│ ├── ENVIRONMENT.md # Environment variables
│ └── REQUIREMENTS.md # Spec-kit aligned FR/SC IDs
│
├── docs-implementation/ # Current state (optional)
│ ├── KNOWN-GOTCHAS.md
│ ├── TROUBLESHOOTING.md
│ ├── RUNBOOKS.md
│ └── CURRENT-STATE.md
│
├── AGENTS.md # AI agent behavior rules
├── CHANGELOG.md # Change tracking
├── DRIFT-LOG.md # Documented deviations
├── llms.txt # AI-friendly summary
└── .docguard.json # DocGuard configuration🌐 Writing your docs in another language
DocGuard reads documentation written in any language. It looks for structural labels: the required headings of the canonical documents, the changelog's unreleased section, the README sections, the Spec Kit section names and the decision-record status words. It matches them by id, not by English text. So a Portuguese or Spanish project needs no English headings. You can say which heading is which in three ways. DocGuard tries them in this order:
A marker. Put
<!-- docguard:heading system-overview -->on the line directly under your heading. It works in every language and needs no configuration. The fixed list of ids is in Documents in other languages;docguard explain STR009prints it too.docs.language. Set a BCP 47 tag in.docguard.json. DocGuard then accepts the built-in headings and words for that language. This release includes Portuguese (pt, which coverspt-BRandpt-PT) and Spanish (es). DocGuard ignores case, accents and a leading section number. It always accepts English too, so mixed documents work.docs.labelAliases. Your own wording, by id. It adds to the built-in set. It never replaces the set.
{
"docs": {
"language": "pt-BR",
"labelAliases": { "requirements": ["Requisitos do sistema"] }
}
}The example is a team's own wording, added to the built-in set; it is not a built-in translation.
A language with no built-in set ("de", for example) works too. DocGuard does not report a required heading as missing if it has no marker and no alias, because DocGuard cannot tell a missing section from one written in German. The document appears under "DocGuard could not read", with the cause language-not-supported and what to add. The exit code does not change. When docs.language is set, DocGuard reads a document in that language if the document is named <name>.<lang>.md or is under i18n/<lang>/ or locales/<lang>/. DocGuard never guesses the language from the text.
Text-quality numbers. DocGuard skips passive voice, Flesch readability and the metrics that rely on English word lists for every language but English. It reports each skip with its reason, and it gives no number. The sentence length check still runs.
New documents. docguard init and docguard generate write the marker under each required heading they generate. If docs.language is pt or es, they also write the heading in that language (the changelog as ## [Não lançado] or ## [Sin publicar]). They never rewrite a document that already exists.
To mark a required section that does not apply to your project, use <!-- docguard:section <slug> n/a — reason -->. Here <slug> is the section's id (for example system-overview). The reason must begin with a letter or digit from A-Z, a-z or 0-9. Full guide: Documents in other languages.
⚙️ Configuration
Create .docguard.json in your project root (docguard init creates it for you):
{
"projectName": "my-project",
"version": "0.4",
"profile": "standard",
"projectType": "webapp",
"validators": {
"structure": true,
"docsSync": true,
"drift": true,
"changelog": true,
"testSpec": true,
"security": true,
"environment": true,
"docQuality": true,
"specKit": true
}
}See Configuration Guide for all options.
🔬 Research Credits
DocGuard's quality evaluation and documentation generation use ideas from peer-reviewed research by the University of Arizona and the Joint Interoperability Test Command (JITC), U.S. Department of Defense:
AITPG — AI-driven Test Plan Generator using Multi-Agent Debate and RAG (Lopez et al., IEEE TSE 2026)
TRACE — Telecom Root Cause Analysis through Calibrated Explainability (Lopez et al., IEEE TMLCN 2026)
Lead researcher: Martin Manuel Lopez · ORCID 0009-0002-7652-2385
See CONTRIBUTING.md for full citations.
What the labels measure. DocGuard borrows TRACE's HIGH/MEDIUM/LOW words as fixed strata (a validator's ratio of passed checks). The quantity that DocGuard really measures is detector precision. It measures it on a labeled, deliberately balanced benchmark corpus. The sample sizes and Wilson 95% bounds are published in benchmarks/baseline.json (contract: schemas/docguard-benchmark-baseline.schema.json). Every number there has a caveat: precision on a balanced benchmark differs from the base rate of stale claims in your repository. See VALIDATION.md.
⭐ Star History
🔒 Privacy & Supply Chain
DocGuard runs locally. It sends no telemetry, no analytics and no phone-home calls. The full (short) policy is in PRIVACY.md. DocGuard publishes npm releases with provenance attestation. You can use it to verify that GitHub Actions built each tarball from this repository.
📄 License
MIT — Free to use, modify, and distribute.
Made with ❤️ by Ricardo Accioly
Available Tools
12 toolsdocguard_anchorsCode→requirement anchorsARead-onlyIdempotent
The same listing as docguard anchors --format json: each @implements/@req tag, the requirement it resolves to, and the file, symbol, statement or route it anchors to with the tier that resolved it, plus problems. Read-only; bounded to 200 links.
Inputs: file, spec, projectDir.
docguard_diagnoseDiagnose what to fixARead-onlyIdempotent
Run guard and return only what needs fixing: failing/warning validators with their messages, structured findings, and suggested next actions — shaped for an agent to act on.
Inputs: projectDir.
docguard_docs_for_pathDocs that describe a fileARead-onlyIdempotent
Exact answer to "which documentation describes this file?": canonical doc lines that name it (with heading, anchor and section), AGENTS.md/CLAUDE.md/GEMINI.md lines, the @implements/@req IDs it declares, its @doc annotations, doc sections whose covers= includes it with their review state, the referencing docs that are not active (superseded, retired) under docs.lifecycle, and, when a guard run for this exact tree state is cached, the open finding codes of each doc under docs.openFindings. Deterministic, bounded, no model.
Inputs: path (required), projectDir.
docguard_doc_structureOutline of one documentARead-onlyIdempotent
A document's headings (level, text, anchor, line range, bytes), docguard:section markers (id, source, pinned, covers), fact markers, marker issues, last-reviewed date and size — so an agent can read one section instead of the whole file.
Inputs: doc (required), projectDir.
docguard_explainExplain a finding codeARead-onlyIdempotent
Explain a stable DocGuard finding code (e.g. STR001, ENV003): what it means, which validator emits it, and the inline suppression to use if it's a confirmed false positive.
Inputs: code (required).
docguard_guardGuard docs against codeARead-onlyIdempotent
Run every enabled DocGuard validator against the project's canonical docs. Returns status (PASS/WARN/FAIL), every finding once with its stable code and suggestion, each code's evidence once, nextStep, doc coverage, semantic-claim count, and per-validator status and counts. Pass detail "full" for the complete guard JSON contract (per-validator finding copies, the reportable subset, raw benchmark statistics per code).
Inputs: detail, projectDir.
docguard_read_sectionRead one section of a documentARead-onlyIdempotent
Return one section's text, resolved by docguard:section id, then heading anchor, then exact heading text — or, with line, just the lines around one reference from docguard_docs_for_path (the cheapest read for a table row). Bounded: 8192 bytes by default, 32768 at most; a truncated result carries nextOffset. An ambiguous match fails with the candidates.
Inputs: doc (required), id, line, anchor, +5 more.
docguard_reportCompliance-evidence bundleARead-onlyIdempotent
Generate the commit-stamped compliance-evidence bundle: guard verdict per validator, findings grouped by stable code, CDD score, ALCOA+ data-integrity attributes, fix history, and a tamper-evident sha256 integrity hash. Evidence, not a gate — it reports state without failing.
Inputs: projectDir.
docguard_scoreCDD maturity scoreARead-onlyIdempotent
Compute the project's CDD maturity score (0-100) with letter grade and per-category breakdown.
Inputs: projectDir.
docguard_task_contextBounded context packet for a taskARead-onlyIdempotent
The same deterministic packet as docguard agent --task <text> --format json: current task-linked requirements, pointers to implementing code and tests, excerpts, and verification steps; abstains when relevance is weak.
Inputs: task (required), projectDir.
docguard_verify_claimsExtract claims to verifyARead-onlyIdempotent
Extract the semantic claims in the project's canonical docs — documented numbers, limits, and enums — as a verification task list. Deterministic discovery, LLM judgment — the caller verifies each claim against the code.
Inputs: projectDir.
docguard_verify_evidenceVerify declared evidenceARead-onlyIdempotent
Evaluate .docguard-evidence.json against bounded local sources. Returns explicit verified-within-scope, contradicted, stale, inconclusive, and unsupported states; verification applies only to each selected statement.
Inputs: projectDir.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Most tools target clearly distinct resources (structure, section read, path lookup, anchors, task context, explain), but docguard_guard, docguard_diagnose, docguard_report, and docguard_score form an overlapping cluster — diagnose re-runs guard and returns a filtered subset, report bundles guard verdicts plus score, and score duplicates a report component. The verify_claims vs verify_evidence pair shares a verb but targets different artifacts, which descriptions clarify but still risk misselection. Descriptions mitigate most confusion, but the guard/diagnose/report/score quartet has genuinely blurred boundaries.
All twelve tools use a docguard_ prefix with snake_case suffixes, giving a predictable and readable pattern throughout. There is minor inconsistency in that some names are nouns (report, score, anchors) while others are verb_noun (verify_claims, read_section, verify_evidence), but the convention remains recognizable and unambiguous.
Twelve tools sits squarely in the well-scoped 3-15 range for a documentation-compliance server. Each tool covers a distinct capability area (read, verify, report, explain), so the count is earned rather than padded.
The surface covers the full read/verify/report/explain lifecycle: structure and section reads, path-to-doc resolution, guard running, diagnostics, scoring, evidence reporting, claim and evidence verification, anchor listing, and code explanation. Minor gaps exist — there is no tool to apply fixes or manage inline suppressions despite report/explain referencing fix history and suppression — but agents can work around these.
Maintenance
Related MCP Connectors
Guarded MCP server for agent-readable business truth, provenance, readiness, and discovery.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server that indexes Markdown, Word, HTML, and PDF documents into a SQLite knowledge graph with CJK+Latin full-text search and cross-document reference tracking. Runs drift audits to surface stale policies, conflicting research claims, superseded ADRs, and undocumented code exports.109MIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that wraps the DocuGenerate API to generate documents (invoices, contracts, letters) from templates via natural language commands.MIT
- AlicenseNot gradedqualityCmaintenanceA stateless MCP server for composing, validating, auditing, and rendering consequential documents from a small semantic model.MIT
- FlicenseNot gradedqualityCmaintenanceLocal documentation search server for AI models using hybrid retrieval (phrase, keyword, vector). Provides MCP tools to search and fetch documentation from bundled or custom doc sets without any external API keys.-