Docs Review
Cross-cutting documentation review that checks consistency, accuracy, and completeness across the entire documentation ecosystem. It verifies that docs agree with each other and with reality; installed per-repository audit or sync workflows can deepen the check but are not required.
When to Use
- After adding, removing, or renaming skills, hooks, agents, or rules
- After major infrastructure changes (consolidation, new repos, renamed components)
- Before publishing or sharing the public repo
- Periodic health check (monthly)
- When the user says "review docs", "check my docs", "are my docs consistent"
When NOT to Use
- For per-repo prose quality — use an installed repository-documentation audit if available
- For mechanical count/freshness sync — use the repository's documented sync command
- For code architecture — use an installed external/code audit workflow
Argument Parsing
Parse $ARGUMENTS for scope (optional, default all):
| Scope |
What it covers |
all |
All 5 checks below |
private |
Checks 1-3 on private docs only |
public |
Checks 1-3 on public docs only |
cross-check |
Check 4 only (public-private consistency) |
user-manual |
Check 5 only (user manual alignment) |
Checks
Check 1: Count Consistency
Count actual components on disk, then verify every document that states counts matches reality.
Disk counts (source of truth):
Skills: find skills -name SKILL.md -type f | wc -l # recurse — skills/{engineering,research}/ are nested; ls -d skills/*/SKILL.md MISSES them (undercounts by ~5)
Hooks: ls hooks/*.sh hooks/*.py hooks/*.mjs 2>/dev/null | wc -l # hooks are .sh + .py + .mjs, NOT just .sh (counting .sh-only undercounts by ~15)
Agents: ls .claude/agents/*.md | wc -l
Rules: ls rules/*.md | wc -l
Counting gotchas (these caused false-positive drift reports on 2026-06-06):
skills live in nested category dirs too (skills/engineering/, skills/research/) so you MUST find -name SKILL.md, not glob skills/*/; and hooks are written in shell, Python, and Node, so count all three extensions.
Documents to verify (private scope):
| File |
What to check |
README.md |
Skill category table totals, hook count in heading, agent count, rule count |
CLAUDE.md |
Skill count, hook count, agent count, rule count, file structure table |
docs/components/skills.md |
Total count in header, per-category counts, overview table row count |
docs/components/hooks.md |
Total count in header, hook table row count |
docs/components/agents.md |
Total count in header, agent table row count |
docs/components/rules.md |
Total count in header, rule table row count |
docs/system.md |
Component counts in overview section |
Documents to verify (public scope):
| File |
What to check |
public/public-repo/README.md |
Counts in auto-generated marker sections |
public/public-repo/CLAUDE.md |
Skill/hook/agent/rule counts |
Report format per file:
| File | Component | Stated | Actual | Status |
|------|-----------|--------|--------|--------|
| README.md | Skills | 129 | 130 | MISMATCH |
| README.md | Hooks | 21 | 21 | OK |
Check 2: Component Coverage
Every component on disk must appear in its catalogue file. Every entry in the catalogue must exist on disk.
| Component |
Catalogue file |
Disk location |
| Skills |
docs/components/skills.md |
find skills -name SKILL.md (incl. nested categories) |
| Hooks |
docs/components/hooks.md |
hooks/*.{sh,py,mjs} |
| Agents |
docs/components/agents.md |
.claude/agents/*.md |
| Rules |
docs/components/rules.md |
rules/*.md |
For each: list items on disk not in catalogue (undocumented) and items in catalogue not on disk (orphan entries).
Also check README.md skill category table — every skill on disk should appear in exactly one category row.
Check 3: Stale References
Grep documentation files for references to components that no longer exist on disk.
Scan these files:
README.md, CLAUDE.md
docs/*.md (all)
- the user-manual .tex source (in docs/reference/user-manual)
skills/shared/*.md
rules/*.md
What to look for:
- Skill names (
/skill-name or backtick-quoted) that don't match any skill on disk — resolve via find skills -name SKILL.md (a name like skill-latex is the MCP-tool form of the latex skill, NOT a separate/orphan skill — strip the skill- prefix before checking)
- Hook script names that don't match any
hooks/*.{sh,py,mjs} file
- Agent names that don't match any
.claude/agents/*.md file
- Broken relative links (markdown
[text](path) where path doesn't exist)
Exclude log/ and MEMORY.md — these are historical records, not active documentation.
Check 4: Public-Private Cross-Consistency
Verify that public and private docs agree on the same facts.
Count alignment: Compare counts in public/public-repo/README.md vs README.md. They should match (sync-to-public.sh propagates counts).
Section currency: For each synced section (Architecture, Workflows, Session Continuity, Design Principles, Credits), check that the public version matches what extract_section() would produce from the private README. Flag sections where content has diverged.
Marker freshness: Check auto-generated markers in public README (COMPONENT-TABLE, SKILLS-SUMMARY, AGENTS-TABLE, HOOKS-TABLE, RULES-TABLE, FILE-TREE, FILE-STRUCTURE). Run uv run python scripts/generate-public-docs.py --dry-run if available, or manually compare marker content against disk reality.
Leaked details: Grep public repo for personal details that should have been anonymised:
- Institutional names (your affiliations) outside of credits/attribution
- Personal names (other than in credits)
- vault file paths
- GitHub usernames (other than
user in attribution)
Check 5: User Manual Alignment
Check the user-manual .tex source (in docs/reference/user-manual) against current system state.
- Skill tables: Extract skill names from LaTeX tabular environments. Compare against actual skills on disk.
- Hook tables: Same for hooks.
- Agent/rule counts: Check any stated counts.
- Category structure: Verify skill categories in the manual match the categories in
docs/components/skills.md.
- Architecture diagram: If the manual contains a system diagram, check that component names match current naming.
Check 6: Package Coverage
Every packages/<name>/ directory (each is a package — nested git repo or local) must appear in docs/components/packages.md, and the stated package count must match disk.
When the repository declares a deterministic inventory checker, run it first.
For example:
uv run python scripts/check_inventory.py --check
- Discover the actual command from project guidance,
pyproject.toml, or the
repository's scripts; do not assume the example filename exists.
- If there is no checker, compare package directories, documented rows, and
stated counts directly.
- Count drift: stated package counts must equal the on-disk count.
- Coverage drift: every package directory must have a catalogue row, and
every catalogue row must resolve to a package or an explicit external item.
Any deterministic checker failure is FAIL (or WARN for 1–3 documentation
items when the repository's policy permits that severity).
Output
Write report to log/audits/docs-consistency-YYYY-MM-DD.md:
# Documentation Review — YYYY-MM-DD
## Scope: [all / private / public / cross-check / user-manual]
## Dashboard
| Check | Status | Issues |
|-------|--------|--------|
| Count Consistency | OK/WARN/FAIL | N |
| Component Coverage | OK/WARN/FAIL | N |
| Stale References | OK/WARN/FAIL | N |
| Public-Private Sync | OK/WARN/FAIL | N |
| User Manual | OK/WARN/FAIL | N |
| Package Coverage | OK/WARN/FAIL | N |
## Count Consistency
[Per-file table from Check 1]
## Component Coverage
### Undocumented (on disk, not in catalogue)
### Orphan Entries (in catalogue, not on disk)
## Stale References
[File, line, stale reference, suggested fix]
## Public-Private Cross-Consistency
[Divergences, leaked details]
## User Manual
[Mismatches]
## Recommended Fixes
### Quick (< 2 min each)
### Medium (2-10 min)
### Requires sync script run
Status thresholds:
- OK: 0 issues
- WARN: 1-3 issues
- FAIL: 4+ issues
After the Report
Present the dashboard + top-5 issues. Ask:
- Fix now — apply fixes (count updates, catalogue additions, stale reference removal)
- Run sync — use each repository's documented sync/render command to fix mechanical issues
- Done — report saved
Anti-Patterns
- Do NOT modify any files during the review — report only until explicitly asked to fix
- Do NOT check
log/, MEMORY.md, or .context/current-focus.md — these are session artifacts, not documentation
- Do not duplicate a separately requested per-repository prose audit; focus on cross-surface consistency
- Do NOT check code or configuration — this is documentation-only
Cross-References
| Skill |
Relationship |
| Installed repository-documentation audit |
Per-repo prose, structure, and audience quality. |
| Repository sync/render command |
Mechanical sync of counts, file trees, and generated artifacts. |
sync-public-repo |
Syncs private → public. Fixes cross-consistency issues. |
system-audit |
Broader infrastructure health. Sub-agent 4 overlaps on count checks. |
update-project-doc |
Updates project-level docs (CLAUDE.md, README). Different scope. |
1---2name: docs-consistency3description: "Review user-facing documentation for accuracy, consistency, and completeness across private, public, nested repos, and the user manual. Use when docs feel stale, after major changes, or before sharing. (Replaces `repo-doc-audit`)"4allowed-tools: Read, Glob, Grep, Bash(ls*), Bash(wc*), Bash(find*), Bash(git log*), Bash(diff*), Bash(cat*), Write5argument-hint: "[scope] — all (default), private, public, cross-check, user-manual"6---78# Docs Review910> Cross-cutting documentation review that checks **consistency, accuracy, and completeness** across the entire documentation ecosystem. It verifies that docs agree with each other and with reality; installed per-repository audit or sync workflows can deepen the check but are not required.1112## When to Use1314- After adding, removing, or renaming skills, hooks, agents, or rules15- After major infrastructure changes (consolidation, new repos, renamed components)16- Before publishing or sharing the public repo17- Periodic health check (monthly)18- When the user says "review docs", "check my docs", "are my docs consistent"1920## When NOT to Use2122- For per-repo prose quality — use an installed repository-documentation audit if available23- For mechanical count/freshness sync — use the repository's documented sync command24- For code architecture — use an installed external/code audit workflow2526## Argument Parsing2728Parse `$ARGUMENTS` for scope (optional, default `all`):2930| Scope | What it covers |31|-------|---------------|32| `all` | All 5 checks below |33| `private` | Checks 1-3 on private docs only |34| `public` | Checks 1-3 on public docs only |35| `cross-check` | Check 4 only (public-private consistency) |36| `user-manual` | Check 5 only (user manual alignment) |3738## Checks3940### Check 1: Count Consistency4142Count actual components on disk, then verify every document that states counts matches reality.4344**Disk counts** (source of truth):4546```47Skills: find skills -name SKILL.md -type f | wc -l # recurse — skills/{engineering,research}/ are nested; ls -d skills/*/SKILL.md MISSES them (undercounts by ~5)48Hooks: ls hooks/*.sh hooks/*.py hooks/*.mjs 2>/dev/null | wc -l # hooks are .sh + .py + .mjs, NOT just .sh (counting .sh-only undercounts by ~15)49Agents: ls .claude/agents/*.md | wc -l50Rules: ls rules/*.md | wc -l51```5253> Counting gotchas (these caused false-positive drift reports on 2026-06-06):54> skills live in nested category dirs too (`skills/engineering/`, `skills/research/`) so you MUST `find -name SKILL.md`, not glob `skills/*/`; and hooks are written in shell, Python, and Node, so count all three extensions.5556**Documents to verify** (private scope):5758| File | What to check |59|------|--------------|60| `README.md` | Skill category table totals, hook count in heading, agent count, rule count |61| `CLAUDE.md` | Skill count, hook count, agent count, rule count, file structure table |62| `docs/components/skills.md` | Total count in header, per-category counts, overview table row count |63| `docs/components/hooks.md` | Total count in header, hook table row count |64| `docs/components/agents.md` | Total count in header, agent table row count |65| `docs/components/rules.md` | Total count in header, rule table row count |66| `docs/system.md` | Component counts in overview section |6768**Documents to verify** (public scope):6970| File | What to check |71|------|--------------|72| `public/public-repo/README.md` | Counts in auto-generated marker sections |73| `public/public-repo/CLAUDE.md` | Skill/hook/agent/rule counts |7475**Report format** per file:7677```78| File | Component | Stated | Actual | Status |79|------|-----------|--------|--------|--------|80| README.md | Skills | 129 | 130 | MISMATCH |81| README.md | Hooks | 21 | 21 | OK |82```8384### Check 2: Component Coverage8586Every component on disk must appear in its catalogue file. Every entry in the catalogue must exist on disk.8788| Component | Catalogue file | Disk location |89|-----------|---------------|--------------|90| Skills | `docs/components/skills.md` | `find skills -name SKILL.md` (incl. nested categories) |91| Hooks | `docs/components/hooks.md` | `hooks/*.{sh,py,mjs}` |92| Agents | `docs/components/agents.md` | `.claude/agents/*.md` |93| Rules | `docs/components/rules.md` | `rules/*.md` |9495For each: list items on disk not in catalogue (**undocumented**) and items in catalogue not on disk (**orphan entries**).9697Also check `README.md` skill category table — every skill on disk should appear in exactly one category row.9899### Check 3: Stale References100101Grep documentation files for references to components that no longer exist on disk.102103**Scan these files:**104- `README.md`, `CLAUDE.md`105- `docs/*.md` (all)106- the user-manual .tex source (in docs/reference/user-manual)107- `skills/shared/*.md`108- `rules/*.md`109110**What to look for:**111- Skill names (`/skill-name` or backtick-quoted) that don't match any skill on disk — resolve via `find skills -name SKILL.md` (a name like `skill-latex` is the MCP-tool form of the `latex` skill, NOT a separate/orphan skill — strip the `skill-` prefix before checking)112- Hook script names that don't match any `hooks/*.{sh,py,mjs}` file113- Agent names that don't match any `.claude/agents/*.md` file114- Broken relative links (markdown `[text](path)` where path doesn't exist)115116Exclude `log/` and `MEMORY.md` — these are historical records, not active documentation.117118### Check 4: Public-Private Cross-Consistency119120Verify that public and private docs agree on the same facts.1211221. **Count alignment:** Compare counts in `public/public-repo/README.md` vs `README.md`. They should match (sync-to-public.sh propagates counts).1231242. **Section currency:** For each synced section (Architecture, Workflows, Session Continuity, Design Principles, Credits), check that the public version matches what `extract_section()` would produce from the private README. Flag sections where content has diverged.1251263. **Marker freshness:** Check auto-generated markers in public README (COMPONENT-TABLE, SKILLS-SUMMARY, AGENTS-TABLE, HOOKS-TABLE, RULES-TABLE, FILE-TREE, FILE-STRUCTURE). Run `uv run python scripts/generate-public-docs.py --dry-run` if available, or manually compare marker content against disk reality.1271284. **Leaked details:** Grep public repo for personal details that should have been anonymised:129 - Institutional names (your affiliations) outside of credits/attribution130 - Personal names (other than in credits)131 - vault file paths132 - GitHub usernames (other than `user` in attribution)133134### Check 5: User Manual Alignment135136Check the user-manual .tex source (in docs/reference/user-manual) against current system state.1371381. **Skill tables:** Extract skill names from LaTeX tabular environments. Compare against actual skills on disk.1392. **Hook tables:** Same for hooks.1403. **Agent/rule counts:** Check any stated counts.1414. **Category structure:** Verify skill categories in the manual match the categories in `docs/components/skills.md`.1425. **Architecture diagram:** If the manual contains a system diagram, check that component names match current naming.143144### Check 6: Package Coverage145146Every `packages/<name>/` directory (each is a package — nested git repo or local) must appear in `docs/components/packages.md`, and the stated package count must match disk.147148When the repository declares a deterministic inventory checker, run it first.149For example:150151```bash152uv run python scripts/check_inventory.py --check153```154155- Discover the actual command from project guidance, `pyproject.toml`, or the156 repository's scripts; do not assume the example filename exists.157- If there is no checker, compare package directories, documented rows, and158 stated counts directly.159- **Count drift:** stated package counts must equal the on-disk count.160- **Coverage drift:** every package directory must have a catalogue row, and161 every catalogue row must resolve to a package or an explicit external item.162163Any deterministic checker failure is **FAIL** (or WARN for 1–3 documentation164items when the repository's policy permits that severity).165166## Output167168Write report to `log/audits/docs-consistency-YYYY-MM-DD.md`:169170```markdown171# Documentation Review — YYYY-MM-DD172173## Scope: [all / private / public / cross-check / user-manual]174175## Dashboard176177| Check | Status | Issues |178|-------|--------|--------|179| Count Consistency | OK/WARN/FAIL | N |180| Component Coverage | OK/WARN/FAIL | N |181| Stale References | OK/WARN/FAIL | N |182| Public-Private Sync | OK/WARN/FAIL | N |183| User Manual | OK/WARN/FAIL | N |184| Package Coverage | OK/WARN/FAIL | N |185186## Count Consistency187[Per-file table from Check 1]188189## Component Coverage190### Undocumented (on disk, not in catalogue)191### Orphan Entries (in catalogue, not on disk)192193## Stale References194[File, line, stale reference, suggested fix]195196## Public-Private Cross-Consistency197[Divergences, leaked details]198199## User Manual200[Mismatches]201202## Recommended Fixes203### Quick (< 2 min each)204### Medium (2-10 min)205### Requires sync script run206```207208**Status thresholds:**209- **OK:** 0 issues210- **WARN:** 1-3 issues211- **FAIL:** 4+ issues212213## After the Report214215Present the dashboard + top-5 issues. Ask:216- **Fix now** — apply fixes (count updates, catalogue additions, stale reference removal)217- **Run sync** — use each repository's documented sync/render command to fix mechanical issues218- **Done** — report saved219220## Anti-Patterns221222- Do NOT modify any files during the review — report only until explicitly asked to fix223- Do NOT check `log/`, `MEMORY.md`, or `.context/current-focus.md` — these are session artifacts, not documentation224- Do not duplicate a separately requested per-repository prose audit; focus on cross-surface consistency225- Do NOT check code or configuration — this is documentation-only226227## Cross-References228229| Skill | Relationship |230|-------|-------------|231| Installed repository-documentation audit | Per-repo prose, structure, and audience quality. |232| Repository sync/render command | Mechanical sync of counts, file trees, and generated artifacts. |233| `sync-public-repo` | Syncs private → public. Fixes cross-consistency issues. |234| `system-audit` | Broader infrastructure health. Sub-agent 4 overlaps on count checks. |235| `update-project-doc` | Updates project-level docs (CLAUDE.md, README). Different scope. |