docguard

v0.9.11

Canonical-Driven Development enforcement. Validates, scores, and traces project documentation with automated checks, AI-driven workflows, and spec-kit hooks. Zero NPM runtime dependencies.

DocGuard — CDD Enforcement Extension for Spec Kit

Enterprise-grade Canonical-Driven Development (CDD) enforcement for Spec Kit. Validates, scores, and fixes project documentation with 19 automated validators, AI-driven research workflows, and spec-kit integration hooks.

Features

  • 19 Validators — Structure, Security, Doc Quality, Test-Spec, Drift, Freshness, and 13 more
  • 4 AI Skills — Enterprise-grade AI behavior protocols (not just step-lists)
  • 3 Bash Scripts — JSON-output orchestration for AI consumption
  • Workflow Chaining — YAML handoffs enable guard → fix → review → score flows
  • Spec Kit Hooks — Quality gate integrations at implement, tasks, and review phases
  • Zero Dependencies — Pure Node.js built-ins only

Installation

npm install -g docguard-cli

Or use via npx:

npx docguard-cli guard

Quick Start

# Initialize CDD in your project
docguard init

# Check documentation health
docguard guard

# Get AI-ready fix prompts
docguard fix --doc architecture

# Calculate maturity score
docguard score

Commands

CommandAliasPurpose
speckit.docguard.guarddocguard.guardRun 19-validator quality gate with severity triage
speckit.docguard.fixdocguard.fixAI-driven documentation repair with codebase research
speckit.docguard.reviewdocguard.reviewCross-document semantic consistency analysis (read-only)
speckit.docguard.scoredocguard.scoreCDD maturity score with ROI improvement roadmap
speckit.docguard.diagnoseDiagnose issues + generate multi-perspective AI prompts
speckit.docguard.generateReverse-engineer canonical docs from codebase

AI Skills

DocGuard provides 4 enterprise-grade AI behavior protocols modeled after Spec Kit's skill architecture:

SkillLinesWhat It Does
docguard-guard1556-step execution with severity triage, structured reporting, remediation recommendations
docguard-fix1957-step research workflow with per-document codebase research, 3-iteration validation loops
docguard-review170Semantic cross-document analysis with 6 analysis passes and quality scoring matrix
docguard-score165CDD maturity assessment with ROI-based improvement roadmap and grade progression

Skills differ from commands in a critical way: commands tell agents what to run (step-lists), while skills tell agents how to think, validate, and iterate (behavior protocols).

Spec Kit Integration

Workflow Hooks

DocGuard integrates into the spec-kit workflow through hooks:

hooks:
  after_implement:   # Optional — quality gate after /speckit.implement
    command: speckit.docguard.guard
  before_tasks:      # Optional — review docs before task generation
    command: speckit.docguard.review
  after_tasks:       # Optional — show score after tasks
    command: speckit.docguard.score

Workflow Chaining

All commands support YAML handoffs for seamless workflow chaining:

guard → fix → review → score
  ↑                      ↓
  └──────────────────────┘

Scripts

ScriptPurpose
docguard-check-docs.shDiscover docs, return JSON inventory with metadata
docguard-suggest-fix.shRun guard, prioritize fixes as JSON
docguard-init-doc.shInitialize canonical doc with metadata header

All scripts support --json mode for AI-parseable output.

License

MIT © Ricardo Accioly

Stats

8 stars

Version

0.9.11release
Updated 8 days ago

Install

Using the Specify CLI

specify extension add --from https://github.com/raccioly/docguard/releases/download/v0.9.11/spec-kit-docguard-v0.9.11.zip

Owners

Categories

documentationvalidationqualitycddtraceabilityai-agentsenforcementspec-kit

License

MIT