ln-21-documentation-auditor
Audits documentation and code comments for structure, coverage, factual accuracy, and maintainability. Use for documentation trust reviews; not code, test, or architecture audits.
git clone --depth 1 https://github.com/levnikolaevich/claude-code-skills /tmp/ln-21-documentation-auditor && cp -r /tmp/ln-21-documentation-auditor/plugins/codebase-audit-suite/skills/ln-21-documentation-auditor ~/.claude/skills/ln-21-documentation-auditorSKILL.md
# Documentation Auditor **Goal:** Audit documentation as a read-only evidence system: can a new contributor, operator, user, or coding agent find the right source, trust its claims, and act without hidden context? Review both standalone documents and code comments where they carry public or operational knowledge. **Execution contract:** Treat the ordered checkbox workflow below as this skill's Definition of Done. Track every checkbox as `PENDING`, then resolve it to `PROVEN` with concrete evidence, `CLEARED` with evidence that its conditional trigger is absent, or `UNPROVEN`; reading, mentioning, delegating, skipping, or tool failure is not proof. Before returning, resolve every `PENDING`, count only `PROVEN` and `CLEARED` items as complete, apply this skill's verdict, decision, and approval rules to every `UNPROVEN`, and prepend **Checklist: X/Y complete**<br>**Incomplete: None | section/item — reason; outcome impact; exact next action**; list every `UNPROVEN` item. ## Tool Routing | Need | Preferred tool | Use it when | Fallback | |---|---|---|---| | Document inventory and hierarchy | Native file listing with narrow patterns | Establishing documentation surfaces, generated areas, and navigation structure | Repository tree and known entry documents | | Links, repeated terms, claims, and contradictions | Native text search, then focused reads | Finding references, stale names, duplicated guidance, paths, commands, and configuration keys | Manual cross-document comparison | | Code and configuration truth | Native code search, manifests, schemas, and direct file reads | A document claims that a path, option, endpoint, behavior, or default exists | Execute a safe inspection command when text is insufficient | | Freshness and ownership | Git log, blame, and diff | Determining when a claim changed, whether a document tracks active code, or who owns a convention | Current code and explicit ownership files | | Commands and examples | Shell in non-mutating or dry-run mode | Verifying help text, command existence, config parsing, generated output, or example syntax | Inspect command registration and tests; mark runtime proof unavailable | | External facts | Official documentation, specifications, and release notes | A current external API, version, standard, or platform behavior affects correctness | Primary-source web research; otherwise mark `UNVERIFIED` | Do not run commands that publish, migrate, deploy, write production state, or rewrite documentation. Generated caches are acceptable only when permitted and disclosed. ## Evidence Rules | Claim type | Required evidence | |---|---| | Repository path, symbol, command, configuration, endpoint, or default | Current repository or safe command output | | External API, version, standard, or compatibility statement | Official source matching the relevant version | | Count or coverage statement | Reproducible query with scope and exclusions | | Historical rationale | Current decision record or history that still matches implementation | | Recommendation | A demonstrated reader failure, contradiction, maintenance cost, or operational risk | Absence of documentation is a finding only when a real audience needs the missing knowledge. A stale claim is more serious than a missing optional explanation because it directs readers toward incorrect action. ## Checklist ### 1. Establish Scope and Audiences - [ ] Identify documentation entrypoints, public docs, maintainer docs, operational runbooks, generated references, examples, and code-comment surfaces in scope. - [ ] Identify intended audiences and their concrete tasks: understand, install, configure, operate, troubleshoot, extend, or verify the system. - [ ] Read applicable repository instructions and detect documentation ownership, generation commands, language policy, and source-of-truth conventions. - [ ] Separate authored documents from generated, vendored, archived, temporary, and example content before scoring defects. - [ ] Classify each target as entrypoint/index, reference, how-to, explanation, decision record, generated output, or example; prioritize canonical and claim-dense documents before navigation-only files. - [ ] Define which code, configuration, schemas, tests, and external contracts can verify documentation claims. - [ ] Keep the audit read-only and record any unavailable source, command, or environment as a limitation. ### 2. Check Structure and Discoverability - [ ] Verify that the root entry document explains purpose, supported use, prerequisites, installation path, and navigation appropriate to its audience. - [ ] Check hierarchy, headings, table of contents, local navigation, cross-links, anchors, and predictable placement of related material. - [ ] Find broken, redirected, case-sensitive, or repository-relative links and verify that linked files and headings exist. - [ ] Identify orphan documents, duplicate entrypoints, circular navigation, deep chains, and important content reachable only by repository search. - [ ] Check that concepts have one canonical owner and that secondary documents link rather than fork rules, thresholds, or procedures. - [ ] Verify that generated documentation names its generator and does not invite hand editing that will be overwritten. - [ ] Check whether large documents can be split or compressed without hiding the sequence or context needed to act safely. ### 3. Check Relevance, Coverage, and Consistency - [ ] Compare each document's title, scope statement, and intended audience with its actual content. - [ ] Judge content by document kind: indexes route without duplicating detail, references optimize exact lookup, how-to guides are safely sequenced, explanations build the right mental model, and decision records preserve context, decision, alternatives, and consequences. - [ ] Flag filler, repeated summaries, speculative narration, generic generated prose, and ceremonial sections that do not help the intended audience decide or act. -
Reviews implementation plans against repository evidence and current authoritative guidance. Use before execution to expose gaps and risks; not for completed delivery review.
Reviews a completed scoped change and its affected runtime and contract paths. Use to find change-caused defects and verify readiness; not for codebase audit, implementation, or repair.
Audits cross-cutting code health across security, delivery, maintainability, dependencies, diagnosability, concurrency, and lifecycle. Use when no specialist audit is primary.
Audits whether an existing test suite proves important behavior as a sustainable portfolio. Use when test confidence or lifecycle control is uncertain; not to implement tests or review one delivery.
Audits implemented architecture fitness, boundaries, contracts, dependencies, and configuration ownership. Use for system structure; not for current-state documentation, diagrams, or plan review.
Audits queries, transactions, data-path performance, and persistence resource lifecycle. Use when data correctness or scalability is at risk; not for general performance tuning.
Optimizes a measured latency, throughput, memory, CPU, or I/O problem through profiling and keep-or-discard experiments. Use for a known bottleneck; not unbiased A/B comparison.
Upgrades dependencies across package managers with breaking-change research and rollback-safe verification. Use for dependency maintenance; not general code modernization.