Documentation Auditor
Audit project documentation quality. Universal for any tech stack.
Purpose
- Proactively compress - find all opportunities to reduce size while preserving value
- Eliminate meaningless, redundant, and verbose content
- Convert prose to structured formats (tables, lists)
- Verify documentation hierarchy with CLAUDE.md as root
- Detect duplication and enforce Single Source of Truth
- Ensure docs match current code state
Invocation
- Direct: User invokes for documentation quality review
- Pipeline: Called by ln-100-documents-pipeline (Phase 5, if auditDocs=true)
Workflow
- Scan: Find all .md files in project (CLAUDE.md, README.md, docs/**)
- Build Tree: Construct hierarchy from CLAUDE.md outward links
- Audit: Run 6 category checks (see Audit Categories below)
- Score: Calculate X/10 per category
- Report: Output findings and recommended actions
Audit Categories
| # |
Category |
What to Check |
| 1 |
Hierarchy & Links |
CLAUDE.md is root; all docs reachable via links; no orphaned files; no broken links |
| 2 |
Single Source of Truth |
No content duplication; duplicates replaced with links to source; clear ownership |
| 3 |
Proactive Compression |
Eliminate verbose/redundant content; prose→tables; remove meaningless info; compress even under-limit files; see size_limits.md |
| 4 |
Requirements Compliance |
Correct sections; within size limits; no code blocks (tables/ASCII diagrams/text only); stack-appropriate doc links |
| 5 |
Actuality (CRITICAL) |
Verify facts against code: paths exist, functions match, APIs work, configs valid; outdated docs are worse than none |
| 6 |
Legacy Cleanup |
No history sections; no "was changed" notes; no deprecated info; current state only |
| 7 |
Stack Adaptation |
Links/refs match project stack; no Python examples in .NET project; official docs for correct platform |
Output Format
## Documentation Audit Report - [DATE]
### Compliance Score
| Category | Score | Issues |
|----------|-------|--------|
| Hierarchy & Links | X/10 | N issues found |
| Single Source of Truth | X/10 | N duplications |
| Proactive Compression | X/10 | N compression opportunities |
| Requirements Compliance | X/10 | N violations |
| Actuality | X/10 | N mismatches with code |
| Legacy Cleanup | X/10 | N legacy items |
| Stack Adaptation | X/10 | N stack mismatches |
| **Overall** | **X/10** | |
### Critical Findings
- [ ] **[Category]** `path/file.md:line` - Issue description. **Action:** Fix suggestion.
### Recommended Actions
| Priority | Action | Location | Category |
|----------|--------|----------|----------|
| High | Remove duplicate section | docs/X.md | SSOT |
| Medium | Add link to CLAUDE.md | docs/Y.md | Hierarchy |
Scoring Rules
| Score |
Meaning |
| 10/10 |
No issues |
| 8-9/10 |
Minor issues (formatting, small redundancies) |
| 6-7/10 |
Moderate issues (some duplication, missing links) |
| 4-5/10 |
Significant issues (orphaned docs, outdated content) |
| 1-3/10 |
Critical issues (major mismatches, broken hierarchy) |
Reference Files
- Size limits and targets: references/size_limits.md
- Detailed checklist: references/audit_checklist.md
Critical Notes
- Fix content, not rules: NEVER modify standards/rules files (*_standards.md, *_rules.md, *_limits.md) to make violations pass. Always fix the violating files instead.
- Verify facts against code: Actively check every path, function name, API, config mentioned in docs. Run commands. Outdated docs mislead - they're worse than no docs.
- Compress always: Size limits are upper bounds, not targets. A 100-line file instead of 300 is a win. Always look for compression opportunities.
- Meaningless content: Remove filler words, obvious statements, over-explanations. If it doesn't add value, delete it.
- No code in docs: Documents describe algorithms in tables or ASCII diagrams. Code belongs in codebase.
- Forbidden: Code blocks, implementation snippets
- Allowed: Tables, ASCII diagrams, Mermaid, method signatures (1 line)
- Instead of code: "See Official docs" or "See src/file.cs:42"
- Format Priority: Tables/ASCII > Lists (enumerations only) > Text (last resort)
- Stack adaptation: Verify all documentation references match project stack. .NET project must not have Python examples. Check official doc links point to correct platform (Microsoft docs for C#, MDN for JS, etc.)
- Code is truth: When docs contradict code, always update docs. Never "fix" code to match documentation.
- Delete, don't archive: Legacy content should be removed, not moved to "archive"
- No history: Documents describe current state only; git tracks history
Version: 3.0.0
Last Updated: 2025-12-23
1---2name: ln-600-docs-auditor3description: Audit project documentation quality across 6 categories (Hierarchy, SSOT, Compactness, Requirements, Actuality, Legacy). Use when documentation needs quality review, after major doc updates, or as part of ln-100-documents-pipeline. Outputs Compliance Score X/10 per category + Findings + Recommended Actions.4---5
6# Documentation Auditor
7
8Audit project documentation quality. Universal for any tech stack.
9
10## Purpose
11
12- **Proactively compress** - find all opportunities to reduce size while preserving value
13- Eliminate meaningless, redundant, and verbose content
14- Convert prose to structured formats (tables, lists)
15- Verify documentation hierarchy with CLAUDE.md as root
16- Detect duplication and enforce Single Source of Truth
17- Ensure docs match current code state
18
19## Invocation
20
21- **Direct:** User invokes for documentation quality review
22- **Pipeline:** Called by ln-100-documents-pipeline (Phase 5, if auditDocs=true)
23
24## Workflow
25
261. **Scan:** Find all .md files in project (CLAUDE.md, README.md, docs/**)
272. **Build Tree:** Construct hierarchy from CLAUDE.md outward links
283. **Audit:** Run 6 category checks (see Audit Categories below)
294. **Score:** Calculate X/10 per category
305. **Report:** Output findings and recommended actions
31
32## Audit Categories
33
34| # | Category | What to Check |
35|---|----------|---------------|
36| 1 | **Hierarchy & Links** | CLAUDE.md is root; all docs reachable via links; no orphaned files; no broken links |
37| 2 | **Single Source of Truth** | No content duplication; duplicates replaced with links to source; clear ownership |
38| 3 | **Proactive Compression** | Eliminate verbose/redundant content; prose→tables; remove meaningless info; compress even under-limit files; see [size_limits.md](references/size_limits.md) |
39| 4 | **Requirements Compliance** | Correct sections; within size limits; **no code blocks** (tables/ASCII diagrams/text only); stack-appropriate doc links |
40| 5 | **Actuality (CRITICAL)** | **Verify facts against code:** paths exist, functions match, APIs work, configs valid; outdated docs are worse than none |
41| 6 | **Legacy Cleanup** | No history sections; no "was changed" notes; no deprecated info; current state only |
42| 7 | **Stack Adaptation** | Links/refs match project stack; no Python examples in .NET project; official docs for correct platform |
43
44## Output Format
45
46```markdown
47## Documentation Audit Report - [DATE]
48
49### Compliance Score
50
51| Category | Score | Issues |
52|----------|-------|--------|
53| Hierarchy & Links | X/10 | N issues found |
54| Single Source of Truth | X/10 | N duplications |
55| Proactive Compression | X/10 | N compression opportunities |
56| Requirements Compliance | X/10 | N violations |
57| Actuality | X/10 | N mismatches with code |
58| Legacy Cleanup | X/10 | N legacy items |
59| Stack Adaptation | X/10 | N stack mismatches |
60| **Overall** | **X/10** | |
61
62### Critical Findings
63
64- [ ] **[Category]** `path/file.md:line` - Issue description. **Action:** Fix suggestion.
65
66### Recommended Actions
67
68| Priority | Action | Location | Category |
69|----------|--------|----------|----------|
70| High | Remove duplicate section | docs/X.md | SSOT |
71| Medium | Add link to CLAUDE.md | docs/Y.md | Hierarchy |
72```
73
74## Scoring Rules
75
76| Score | Meaning |
77|-------|---------|
78| 10/10 | No issues |
79| 8-9/10 | Minor issues (formatting, small redundancies) |
80| 6-7/10 | Moderate issues (some duplication, missing links) |
81| 4-5/10 | Significant issues (orphaned docs, outdated content) |
82| 1-3/10 | Critical issues (major mismatches, broken hierarchy) |
83
84## Reference Files
85
86- Size limits and targets: [references/size_limits.md](references/size_limits.md)
87- Detailed checklist: [references/audit_checklist.md](references/audit_checklist.md)
88
89## Critical Notes
90
91- **Fix content, not rules:** NEVER modify standards/rules files (*_standards.md, *_rules.md, *_limits.md) to make violations pass. Always fix the violating files instead.
92- **Verify facts against code:** Actively check every path, function name, API, config mentioned in docs. Run commands. Outdated docs mislead - they're worse than no docs.
93- **Compress always:** Size limits are upper bounds, not targets. A 100-line file instead of 300 is a win. Always look for compression opportunities.
94- **Meaningless content:** Remove filler words, obvious statements, over-explanations. If it doesn't add value, delete it.
95- **No code in docs:** Documents describe algorithms in tables or ASCII diagrams. Code belongs in codebase.
96 - **Forbidden:** Code blocks, implementation snippets
97 - **Allowed:** Tables, ASCII diagrams, Mermaid, method signatures (1 line)
98 - **Instead of code:** "See [Official docs](url)" or "See [src/file.cs:42](path#L42)"
99- **Format Priority:** Tables/ASCII > Lists (enumerations only) > Text (last resort)
100- **Stack adaptation:** Verify all documentation references match project stack. .NET project must not have Python examples. Check official doc links point to correct platform (Microsoft docs for C#, MDN for JS, etc.)
101- **Code is truth:** When docs contradict code, always update docs. Never "fix" code to match documentation.
102- **Delete, don't archive:** Legacy content should be removed, not moved to "archive"
103- **No history:** Documents describe current state only; git tracks history
104
105---
106**Version:** 3.0.0
107**Last Updated:** 2025-12-23