Files
leo-claude-mktplace/plugins/doc-guardian
lmiranda 29fb8be0fd fix(doc-guardian): make hook silent by default
- Remove all output by default to prevent workflow interruption
- Queue changes silently to .doc-guardian-queue
- Add file+type deduplication (same file won't be queued twice)
- Add DOC_GUARDIAN_VERBOSE=1 env var for opt-in notifications
- Users run /doc-sync or /doc-audit to process queue

Fixes #312 (partial - addresses issues 1, 2, 3)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:09:45 -05:00
..

doc-guardian

Automatic documentation drift detection and synchronization for Claude Code projects.

Problem Solved

Documentation gets outdated. Functions get renamed, configs change, versions bump—but docs lag behind. This creates:

  • Multiple review cycles finding stale references
  • Unnecessary commits fixing docs piecemeal
  • User confusion from outdated instructions

Solution

doc-guardian monitors your code changes via hooks:

  1. Detects when changes might affect documentation
  2. Alerts you to potential drift (doesn't interrupt your flow)
  3. Provides commands to audit and sync docs when ready

Commands

Command Description
/doc-audit Full project scan - reports all drift without changing anything
/doc-sync Apply all pending documentation updates in one commit
/changelog-gen Generate changelog from conventional commits in Keep-a-Changelog format
/doc-coverage Calculate documentation coverage percentage for functions and classes
/stale-docs Detect documentation files that are stale relative to their associated code

Hooks

  • PostToolUse (Write|Edit): Silently checks if code changes affect docs

What It Detects

  • Broken References: Function/class renamed but docs still use old name
  • Version Drift: Python 3.9 in docs but 3.11 in pyproject.toml
  • Missing Docs: Public functions without docstrings
  • Stale Examples: CLI examples that no longer work
  • Low Coverage: Undocumented functions and classes
  • Stale Files: Documentation that hasn't been updated alongside code changes

Installation

This plugin is part of the Leo Claude Marketplace.

/plugin marketplace add https://gitea.hotserv.cloud/personal-projects/leo-claude-mktplace.git
/plugin install doc-guardian

Integration

See claude-md-integration.md for CLAUDE.md additions.