Validate documentation coverage across codebase, identify gaps, and generate comprehensive coverage reports with actionable recommendations
Analyzes documentation coverage across your codebase and generates actionable gap reports with fix suggestions.
/plugin marketplace add greyhaven-ai/claude-code-config/plugin install developer-experience@grey-haven-pluginsAnalyze documentation completeness across your codebase and generate actionable coverage reports.
Scans your entire codebase to:
# Basic coverage check
/doc-coverage
# CI/CD enforcement (fail if < 80%)
/doc-coverage --threshold 80 --fail-below true
# API-only coverage
/doc-coverage --scope api --format html
# With historical trends
/doc-coverage --trend true
| Option | Description | Default |
|---|---|---|
--threshold | Minimum coverage percentage (0-100) | 80 |
--fail-below | Exit with error if below threshold | false |
--format | Output: markdown, json, html, console | markdown |
--output | Output file path | docs/coverage-report.md |
--scope | Scope: all, api, functions, types | all |
--ignore | Patterns to ignore (glob) | [] |
--trend | Include historical trend analysis | false |
--fix-suggestions | Generate auto-fix suggestions | true |
The command calculates coverage across 5 categories:
Formula: (Documented Functions / Total Functions) × 100
Checks for JSDoc (TypeScript) or docstrings (Python) with required tags:
@param for each parameter@returns for return value@throws for exceptionsChecks for class-level documentation describing:
Requires documentation for:
Checks for:
Requires at least one working code example per public function/endpoint demonstrating realistic usage.
See examples/coverage-metrics-examples.md for detailed examples of documented vs. undocumented code.
The command generates reports in 4 formats:
Formatted table with coverage percentages, visual indicators (✅ ⚠️ ❌), and module breakdown.
Comprehensive report with summary table, gaps by module, critical gaps list, recommendations, and historical trends.
Machine-readable format with all metrics, gaps, and auto-fix suggestions. Perfect for CI/CD integration.
Interactive report with charts, filtering, and drill-down capabilities (requires --format html).
See reference/report-formats.md for complete report format specifications and examples.
Integrate documentation coverage into your development workflow:
Add coverage checks to pull requests with automatic PR comments showing coverage metrics.
Prevent commits with documentation coverage below threshold.
See reference/ci-cd-patterns.md for complete GitHub Actions workflows and configuration examples.
Store historical data in .claude/coverage-history.json to track trends over time. The command automatically:
Format: JSON with timestamps, commit hashes, and coverage breakdowns by category.
The command can generate documentation for:
See examples/auto-fix-examples.md for before/after examples of generated documentation.
Set Realistic Thresholds
Focus on Public APIs First
Quality Over Quantity
Automate Where Possible
Regular Audits
Issue: Coverage lower than expected
/doc-coverage --format jsonIssue: False positives
.claude/doc-coverage-config.jsonIssue: Inconsistent calculation
--strict true (requires all tags)--strict false (lenient mode)Works with:
All supporting files are under 500 lines per Anthropic best practices:
examples/ - Complete coverage examples
reference/ - Coverage standards
templates/ - Copy-paste ready templates
checklists/ - Documentation checklists
Pro Tip: Run /doc-coverage --trend true monthly to track documentation health over time. Set a coverage threshold in CI/CD to prevent documentation debt from accumulating.