feat: add doc-guardian plugin for documentation lifecycle management
Adds automatic documentation drift detection and synchronization: - PostToolUse hook detects when code changes affect docs - Stop hook reminds of pending updates before session ends - /doc-audit command for full project documentation scan - /doc-sync command to batch apply pending updates - doc-analyzer agent for cross-reference analysis - doc-patterns skill for documentation structure knowledge Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
50
plugins/doc-guardian/commands/doc-audit.md
Normal file
50
plugins/doc-guardian/commands/doc-audit.md
Normal file
@@ -0,0 +1,50 @@
|
||||
---
|
||||
description: Full documentation audit - scans entire project for doc drift without making changes
|
||||
---
|
||||
|
||||
# Documentation Audit
|
||||
|
||||
Perform a comprehensive documentation drift analysis.
|
||||
|
||||
## Process
|
||||
|
||||
1. **Inventory Documentation Files**
|
||||
- README.md (root and subdirectories)
|
||||
- CLAUDE.md
|
||||
- API documentation
|
||||
- Docstrings in code files
|
||||
- Configuration references
|
||||
|
||||
2. **Cross-Reference Analysis**
|
||||
For each documentation file:
|
||||
- Extract referenced functions, classes, endpoints, configs
|
||||
- Verify each reference exists in codebase
|
||||
- Check signatures/types match documentation
|
||||
- Flag deprecated or renamed items still in docs
|
||||
|
||||
3. **Completeness Check**
|
||||
- Public functions without docstrings
|
||||
- Exported modules without README coverage
|
||||
- Environment variables used but not documented
|
||||
- CLI commands not in help text
|
||||
|
||||
4. **Output Format**
|
||||
```
|
||||
## Documentation Drift Report
|
||||
|
||||
### Critical (Broken References)
|
||||
- [ ] README.md:45 references `calculate_total()` - function renamed to `compute_total()`
|
||||
|
||||
### Stale (Outdated Info)
|
||||
- [ ] CLAUDE.md:23 lists Python 3.9 - project uses 3.11
|
||||
|
||||
### Missing (Undocumented)
|
||||
- [ ] api/handlers.py:`create_order()` - no docstring
|
||||
|
||||
### Summary
|
||||
- Critical: X items
|
||||
- Stale: X items
|
||||
- Missing: X items
|
||||
```
|
||||
|
||||
5. **Do NOT make changes** - audit only, report findings
|
||||
Reference in New Issue
Block a user