Server data from the Official MCP Registry
Deterministic doc-drift detection and exact doc navigation as read-only MCP tools.
About
Deterministic doc-drift detection and exact doc navigation as read-only MCP tools.
Security Report
Valid MCP server (0 strong, 2 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry.
12 files analyzed ยท 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"docguard-cli": {
"command": "npx",
"args": [
"-y",
"docguard-cli@0.51.0"
]
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
๐ก๏ธ 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
- What is DocGuard?
- Why DocGuard?
- Quick Start
- Spec Kit Integration
- Usage
- Validators
- Reading a finding
- Templates
- AI Agent Support
- Slash Commands
- Examples
- Testing
- Enterprise Adoption
- CI/CD Integration
- What's New
- File Structure
- Docs in another language
- Configuration
- Research Credits
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:#fff
Distribution: 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 diagnose
Strict 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 diagnose
Note: 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:latest
The 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.9
The 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.51.0 hooks: [{ id: docguard-guard }] # docguard-guard-full for pre-push - MCP (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 score
The 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 API-REFERENCE.md that the OpenAPI spec shows is gone | docguard fix --write deletes the row + detail block itself โ no AI |
| Agent (needs judgment) | Rewriting an X-Ray prose section as CloudWatch; writing a new endpoint's request/response | Sent to an agent through diagnose / fix --doc prompts |
docguard fix --write changes only docs marked `` (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 | specify init | Creates .specify/ directory and templates |
| 2. Write specs | /speckit.specify | AI creates spec.md with FR-IDs, user stories |
| 3. Validate | docguard guard | Checks spec quality (mandatory sections, FR/SC IDs) |
| 4. Plan | /speckit.plan | AI creates plan.md with technical context |
| 5. Validate | docguard guard | Checks plan quality (sections, structure) |
| 6. Tasks | /speckit.tasks | AI creates tasks.md with phased breakdown |
| 7. Validate | docguard guard | Checks task quality (phases, T-IDs) |
| 8. Implement | /speckit.implement | AI writes code |
| 9. Enforce | docguard guard | 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 root - Requirement 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 --dev
See 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 |
|---|---|
init | Set up a project (--wizard for interactive ยท --with <name> for scaffolders) |
guard | Check against canonical docs โ 37 validators |
diff | Show gaps between docs and code (--since <ref> for impact mode) |
sync | Refresh the doc sections that come from code, including the module-graph and entity-diagram mermaid diagrams drawn from code. This keeps memory up to date |
score | CDD maturity score for the doc structure (0-100; not a guard verdict; --diff shows the change between refs; --dora shows DORA documentation-quality and AI-capability evidence) |
Tools (situational, but day-to-day useful):
| Command | Purpose |
|---|---|
demo | Zero-install demo โ runs guard on a built-in sample project that has drift (npx docguard-cli demo) |
diagnose | Runs guard and prints fix prompts for an agent, in one command |
fix | Print fix instructions for an agent, for specific docs (--doc <name> --format prompt) |
fix --write | Apply deterministic fixes (no AI โ version bumps, counts, anchors, sections) |
fix --history | Log of every mechanical fix applied (from .docguard/fixed.json) |
generate | Write docs from your existing code (--plan for an agent scan). It also draws Mermaid ER diagrams in DATA-MODEL.md from the schemas it detects (Prisma/Drizzle/TypeORM/Sequelize/Django/Rails). --spec <area> writes an as-built Spec Kit spec for one code area. The spec has one requirement candidate for each route, exported symbol, env var or entity found there. The agent writes every statement. DocGuard registers the spec as origin: as_built. Guard then reports new or vanished facts (SPR007) |
agent | One-shot agent task graph, or a size-limited packet of current evidence for one task (--task <text>, --format json) |
explain <warning|CODE> | Paste any warning, or a finding code like SEC001. You get the validator's docstring, the fix, and how to suppress it |
verify --evidence | 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. |
verify --semantic | 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 |
verify --instructions | 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 |
feedback | 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. |
retire | Find planning material that is finished or replaced (--plan/--check; --fail-on-warning fails on advisory candidates). Then, when you ask, remove clean tracked docs from the active agent context. .docguard-archive.json records the data needed to recover them and the identities of retired requirements. --retention-ref proves that the source revision is still reachable. This is separate from the Spec Kit Archive extension, which consolidates feature documents. |
reconcile | 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. --write applies only mechanical refreshes of generated sections. |
review | Lists doc sections whose covered code changed since their last review (--accept <doc>#<id> --reason, --prune, --suggest) |
anchors | Lists every @implements/@req tag, the requirement it resolves to, and the symbol, statement, route or file it anchors to. It also shows the tier that resolved the tag (--spec <id>, --file <path>, --format json) |
ignore | Lists every suppression in the project (.docguardignore entries with their # reason and expires: date, .docguard.json ignore arrays, inline pragmas, N/A markers, the baseline) with its state. --format claimspec exports the .docguardignore entries that have a reason as a claimspec ignore document, and reports what it left out |
rules | Shows which agent instruction files each harness (Codex, Claude Code, Cursor, Copilot, OpenHands) loads for a path, why, and how many bytes (--for <path>, --harness) |
specs | 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. specs require is the spec-first gate: a change to governed paths must name its spec or declare Spec-Exempt: <kind> โ <reason>. |
specs --check / specs --write | Check or refresh .docguard-specs.json. This file is the byte-stable index of immutable spec IDs, reviewed lifecycle, lineage and scope, artifact digests, task state, test evidence with an explicit scope, and archive tombstones. A refresh keeps the reviewed block. |
specs preflight [--path <spec>] | 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. |
specs approve --id <spec-id> | Record a person's approval of a spec in the registry. With --delivery, record its planned, in_progress or implemented state. By default the command only shows its plan, and --write records it. --persistence and a repeatable --canonical-doc record the reviewed scope. specs complete does the verification. |
mcp | 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). docguard_guard returns each fact once, unless you call it with detail: "full". Stdio: claude mcp add docguard -- npx docguard-cli mcp. Team-shared HTTP: docguard mcp --transport http --port 8585 (loopback by default; a bind to another address needs --api-key) |
report | 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 (--format json, --out <file>). It is evidence, not a gate: it always exits 0 |
ci | 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 .docguard/history.jsonl (opt out: --no-history). --threshold <n> fails below a score, --fail-on-warning is strict mode, --format json is for parsers |
score --trend | Score history from recorded ci runs: sparkline, change, and the last 10 runs with their commits |
memory | Accuracy summary for each domain (endpoints / entities / env / tech) |
memory --diff | Shows which claims do not match the code |
policy | The enforcement ladder: which advisory finding codes, judging by CI history, are ready to become warnings or errors |
sensor --aidlc | 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. --help does not list it, because it is for machines |
memory --pack | Write .docguard/context-pack.md โ short session-start context for agents, stamped with code truth |
score --diff | Shows which checks pulled each category down |
trace / trace --reverse <file> | Requirements traceability โ forward AND reverse |
trace --features | Spec-adherence score for each feature (requirement coverage, task completion, task evidence, artifacts), worst first, with fix hints |
upgrade [--apply] [--pr] | Check npm for a newer CLI (the only command that contacts a registry) and migrate the .docguard.json schema; --pr opens a PR. When the installed release is over 14 days old, guard's text output, the MCP server and the context pack suggest running docguard upgrade. Nothing upgrades by itself (DOCGUARD_NO_UPDATE_HINT=1 hides the note) |
watch | Live mode: runs guard again when files change |
init --with <name> scaffolders โ picked at init time:
| Scaffolder | What It Generates |
|---|---|
agents | AGENTS.md, CLAUDE.md, .cursor/rules/, .github/copilot-instructions.md |
hooks | Git pre-commit / pre-push hooks |
ci | GitHub Actions / pipeline YAML |
badge | Shields.io score badges for README |
llms | llms.txt (AI-friendly summary) |
publish | 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 |
|---|---|---|
--dir <path> | Project directory (default: .). If you set it, DocGuard does not suggest a parent root | All |
--verbose | Show detailed output | All |
--quiet / -q | Hide the banner, for hooks, CI loops and scripts | All |
--format json | Output for machines (clean JSON, no ANSI codes) | guard, score, diff, trace, diagnose, memory, impact, explain, verify, reconcile, retire, specs, ignore |
--format claimspec | claimspec v1 ignore document on stdout, checked against the bundled schema; anything that could not be exported goes to stderr | ignore |
--format sarif | SARIF 2.1.0 output โ findings as rules/results for GitHub Code Scanning and SARIF dashboards | guard |
--format junit | JUnit XML output โ one testcase per validator, for GitLab CI (artifacts:reports:junit), Jenkins, Azure DevOps, CircleCI | guard |
--update-baseline | Adopt DocGuard on a legacy repo with no red build on day one. It saves today's findings in a committed .docguard.baseline.json. Guard and ci then fail only on NEW drift. DocGuard always shows what it hides ("N pre-existing finding(s) suppressed"), and --no-baseline shows everything | guard |
--full | Generate llms-full.txt (full doc text included) instead of the llms.txt link index | llms |
--compact | With --format json: each fact once. The MCP guard tool returns this form by default | guard |
--pack | Write .docguard/context-pack.md: session-start context for agents | memory |
--symbols | With --pack: add a symbol map (the most central files and their exported names, within memory.symbolMap.maxBytes). It is off by default, because the frozen agent-context benchmark (protocol v3) found no regression and no benefit | memory |
--sync | Regenerate the agent files (CLAUDE.md, Copilot, Cursor, โฆ) from AGENTS.md. Each file carries a hash marker. DocGuard never changes hand-written files without --force | agents |
--check | CI check for the synced agent files. It exits 2 when one is stale | agents |
--force | Overwrite existing files (creates .bak backups) | generate, agents, init |
--force-redo | Bypass ping-pong suppression in .docguard/fixed.json | fix --write |
--profile <name> | Starter / standard / enterprise | init |
--no-spec-kit | Skip Spec Kit: no specify call and no .specify/; DocGuard's own agent skills still install | init |
--spec-kit | With --profile starter, initialize Spec Kit too (starter skips it by default) | init |
--changed-only [--since <ref>] | Light pre-commit mode: runs the fast validators (including covered-doc dependencies) on changed files only | guard |
--timings | Run time of each validator, slowest first | guard |
--show-failing | Show warnings/errors even when status is PASS | guard |
--pin | Save the running CLI version in .docguard.json, so results can be reproduced | guard |
--diff | Detail for each category | score, memory |
--check-only | Exit 1 if behind (for CI) | upgrade |
--apply | Actually run the migration | upgrade |
--pr | Open a PR with the migration | upgrade |
--reverse <file> | Reverse traceability (code โ docs) | trace |
--no-indirect | Skip the reverse-import-graph analysis (docs about modules that import a changed file) | impact, diff --since |
--prs | Doc-conflict analysis of open PRs. Two PRs that affect the same canonical doc risk a merge-order problem (needs the gh CLI) | impact |
--transport http --port --host --api-key --path | Serve MCP over Streamable HTTP instead of stdio (a server for the team; loopback only unless you set an api-key) | mcp |
--root <dir> | Serve another directory tree. Tool calls can pass a projectDir inside it (repeatable). Without this flag, projectDir must stay inside the served directory | mcp |
--history | 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.
Documentation truncated โ see the full README on GitHub.
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto ยท Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai ยท Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci ยท Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol ยท Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno ยท Developer Tools
Toleno Network MCP Server โ Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace ยท Developer Tools
Search and install MCP servers from inside your AI client.

