Claude-code-skills ln-611-docs-structure-auditor
Checks hierarchy, links, SSOT, compression, requirements compliance, freshness, legacy cleanup. Use when auditing documentation structure.
install
source · Clone the upstream repo
git clone https://github.com/levnikolaevich/claude-code-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/levnikolaevich/claude-code-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills-catalog/ln-611-docs-structure-auditor" ~/.claude/skills/levnikolaevich-claude-code-skills-ln-611-docs-structure-auditor && rm -rf "$T"
manifest:
skills-catalog/ln-611-docs-structure-auditor/SKILL.mdsource content
Paths: File paths (
,shared/,references/) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root. If../ln-*is missing, fetch files via WebFetch fromshared/.https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}
Documentation Structure Auditor (L3 Worker)
Type: L3 Worker
Specialized worker auditing structural quality of project documentation.
Purpose & Scope
- Audit documentation for structural quality across 7 categories
- Scan all
files in project, build hierarchy from.md
when presentAGENTS.md - Return structured findings to coordinator with severity, location, recommendations
- Calculate compliance score (X/10) for Documentation Structure
Inputs
MANDATORY READ: Load
shared/references/audit_worker_core_contract.md, shared/references/docs_quality_contract.md, shared/references/docs_quality_rules.json, and shared/references/markdown_read_protocol.md.
Receives
contextStore with: tech_stack, project_root, output_dir.
Workflow
- Parse Context: Extract tech stack, project root, output_dir from contextStore
- Load Registry if Present: Use
as the first routing source when availabledocs/project/.context/doc_registry.json - Scan Docs: Find all
files in project (.md
,AGENTS.md
,CLAUDE.md
,README.md
)docs/** - Read Section-First: For larger docs, outline first, then read header markers +
+Quick Navigation
+Agent EntryMaintenance - Build Tree: Construct hierarchy from
outward links when present, otherwise fromAGENTS.mdCLAUDE.md - Audit Categories 1-7: Run structural checks (see Audit Categories below)
- Collect Findings: Record each violation with severity, location (file:line), effort estimate (S/M/L), recommendation
- Calculate Score: Count violations by severity, calculate compliance score (X/10)
- Write Report: Build full markdown report per
, write toshared/templates/audit_worker_report_template.md
in single Write call{output_dir}/611-structure.md - Return Summary: Return minimal summary to coordinator (see Output Format)
Audit Categories
| # | Category | What to Check |
|---|---|---|
| 1 | Hierarchy & Links | is canonical root when present; 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 to tables; remove meaningless info; compress even under-limit files; see size_limits.md |
| 4 | Requirements Compliance | Correct header markers, correct top sections, within size limits, no illegal code blocks, stack-appropriate doc links |
| 5 | Freshness Indicators | Detect staleness signals: dates >6 months in content, deprecated API/tool references, TODO/FIXME markers, placeholder text left in place; deep fact-checking handled by dedicated worker |
| 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 |
| 8 | Import Pattern Compliance | When exists at repo root, and must each contain exactly one line and a bounded harness-specific delta (≤50 lines total per file). Any content in CLAUDE.md or GEMINI.md that duplicates AGENTS.md is drift. See for rationale |
Severity Mapping
| Issue Type | Severity |
|---|---|
| Staleness indicators (old dates, deprecated refs, TODO markers) | MEDIUM |
| Broken links, orphaned docs | HIGH |
| Content duplication | MEDIUM |
| Missing compression opportunity | LOW |
| Legacy/history content | MEDIUM |
| Wrong stack references | HIGH |
Import pattern drift (duplicated AGENTS.md content in CLAUDE.md / GEMINI.md, oversized stub, missing line) | HIGH |
Scoring Algorithm
MANDATORY READ: Load
shared/references/audit_worker_core_contract.md and shared/references/audit_scoring.md.
Output Format
MANDATORY READ: Load
shared/references/audit_worker_core_contract.md and shared/templates/audit_worker_report_template.md.
Write JSON summary per
shared/references/audit_summary_contract.md. In managed mode the caller passes both runId and summaryArtifactPath; in standalone mode the worker generates its own run-scoped artifact path per shared contract.
Write report to
{output_dir}/611-structure.md with category: "Documentation Structure" and checks: hierarchy_links, ssot, compression, requirements_compliance, freshness_indicators, legacy_cleanup, stack_adaptation, import_pattern_compliance.
Return summary per
shared/references/audit_summary_contract.md.
Standalone mode still writes the same JSON summary to a worker-owned run-scoped artifact path per shared contract.
Critical Rules
MANDATORY READ: Load
shared/references/audit_worker_core_contract.md.
- Do not auto-fix: Report violations only; coordinator aggregates for user
- Tech stack aware: Use contextStore
to apply stack-specific checks (e.g., .NET vs Node.js doc standards)tech_stack - No deep fact-checking: Detect staleness signals only (dates, deprecated refs, TODO markers)
- Compress always: Size limits are upper bounds, not targets. A 100-line file instead of 300 is a win
- No code in docs: Documents describe algorithms in tables or ASCII diagrams. Code belongs in codebase
- Code is truth: When docs contradict code, report docs as needing update (not code)
- Delete, don't archive: Legacy content should be removed, not moved to "archive"
- Location precision: Always include
for programmatic navigationfile:line - Shared contract precedence: Placeholder policy, template-metadata policy, and no-code exceptions come from
/docs_quality_contract.mddocs_quality_rules.json
Definition of Done
MANDATORY READ: Load
shared/references/audit_worker_core_contract.md.
- contextStore parsed successfully (including output_dir)
- All 7 structural categories audited
- Findings collected with severity, location, effort, recommendation
- Score calculated using penalty algorithm
- Report written to
(atomic single Write call){output_dir}/611-structure.md - Summary written per contract
Reference Files
- Size limits and targets: references/size_limits.md
- Detailed checklist: references/audit_checklist.md
Version: 1.0.0 Last Updated: 2026-03-01