Get the FREE Ultimate OpenClaw Setup Guide →

ln-611-docs-structure-auditor

Scanned
npx machina-cli add skill levnikolaevich/claude-code-skills/ln-611-docs-structure-auditor --openclaw
Files (1)
SKILL.md
5.5 KB

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

Documentation Structure Auditor (L3 Worker)

Specialized worker auditing structural quality of project documentation.

Purpose & Scope

  • Worker in ln-610 coordinator pipeline - invoked by ln-610-docs-auditor
  • Audit documentation for structural quality across 7 categories
  • Scan all .md files in project, build hierarchy from CLAUDE.md
  • Return structured findings to coordinator with severity, location, recommendations
  • Calculate compliance score (X/10) for Documentation Structure

Inputs (from Coordinator)

MANDATORY READ: Load shared/references/task_delegation_pattern.md#audit-coordinator--worker-contract for contextStore structure.

Receives contextStore with: tech_stack, project_root, output_dir.

Workflow

  1. Parse Context: Extract tech stack, project root, output_dir from contextStore
  2. Scan Docs: Find all .md files in project (CLAUDE.md, README.md, docs/**)
  3. Build Tree: Construct hierarchy from CLAUDE.md outward links
  4. Audit Categories 1-7: Run structural checks (see Audit Categories below)
  5. Collect Findings: Record each violation with severity, location (file:line), effort estimate (S/M/L), recommendation
  6. Calculate Score: Count violations by severity, calculate compliance score (X/10)
  7. Write Report: Build full markdown report per shared/templates/audit_worker_report_template.md, write to {output_dir}/611-structure.md in single Write call
  8. Return Summary: Return minimal summary to coordinator (see Output Format)

Audit Categories

#CategoryWhat to Check
1Hierarchy & LinksCLAUDE.md is root; all docs reachable via links; no orphaned files; no broken links
2Single Source of TruthNo content duplication; duplicates replaced with links to source; clear ownership
3Proactive CompressionEliminate verbose/redundant content; prose to tables; remove meaningless info; compress even under-limit files; see size_limits.md
4Requirements ComplianceCorrect sections; within size limits; no code blocks (tables/ASCII diagrams/text only); stack-appropriate doc links
5Actuality (CRITICAL)Verify facts against code: paths exist, functions match, APIs work, configs valid; outdated docs are worse than none
6Legacy CleanupNo history sections; no "was changed" notes; no deprecated info; current state only
7Stack AdaptationLinks/refs match project stack; no Python examples in .NET project; official docs for correct platform

Severity Mapping

Issue TypeSeverity
Outdated content (code mismatch)CRITICAL
Broken links, orphaned docsHIGH
Content duplicationMEDIUM
Missing compression opportunityLOW
Legacy/history contentMEDIUM
Wrong stack referencesHIGH

Scoring Algorithm

MANDATORY READ: Load shared/references/audit_scoring.md for unified scoring formula.

Output Format

MANDATORY READ: Load shared/templates/audit_worker_report_template.md for file format.

Write report to {output_dir}/611-structure.md with category: "Documentation Structure" and checks: hierarchy_links, ssot, compression, requirements_compliance, actuality, legacy_cleanup, stack_adaptation.

Return summary to coordinator:

Report written: docs/project/.audit/ln-610/{YYYY-MM-DD}/611-structure.md
Score: X.X/10 | Issues: N (C:N H:N M:N L:N)

Critical Rules

  • Do not auto-fix: Report violations only; coordinator aggregates for user
  • Tech stack aware: Use contextStore tech_stack to apply stack-specific checks (e.g., .NET vs Node.js doc standards)
  • Verify facts against code: Actively check every path, function name, API, config mentioned in docs
  • 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 file:line for programmatic navigation

Definition of Done

  • 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 {output_dir}/611-structure.md (atomic single Write call)
  • Summary returned to coordinator

Reference Files

  • Worker report template: shared/templates/audit_worker_report_template.md
  • Audit scoring formula: shared/references/audit_scoring.md
  • Audit output schema: shared/references/audit_output_schema.md
  • Size limits and targets: references/size_limits.md
  • Detailed checklist: references/audit_checklist.md

Version: 1.0.0 Last Updated: 2026-03-01

Source

git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-611-docs-structure-auditor/SKILL.mdView on GitHub

Overview

The Documentation Structure Auditor is an L3 worker in the Claude-based pipeline. It scans all Markdown files, builds a hierarchy from CLAUDE.md outward links, checks seven structural categories, and returns findings with severity, location, and recommendations, plus a compliance score.

How This Skill Works

The agent loads contextStore, discovers the project root, and scans all Markdown files (CLAUDE.md, README.md, docs/**). It builds a hierarchical tree from CLAUDE.md via outward links, runs seven structural checks, records findings with severity, location, and effort, computes a score, and writes a single report to {output_dir}/611-structure.md using the audit worker template, then returns a summary to the coordinator.

When to Use It

  • When validating documentation hierarchy and link integrity in a CLAUDE-based project
  • When enforcing a single source of truth and avoiding content duplication
  • When cleaning up legacy or deprecated content and removing outdated notes
  • When ensuring stack-appropriate references and avoiding wrong platform examples
  • When preparing a formal Documentation Structure score for audits

Quick Start

  1. Step 1: Load contextStore from shared/references/task_delegation_pattern.md and locate repo root
  2. Step 2: Run the auditor over all Markdown files (CLAUDE.md, README.md, docs/**) using Read/Grep/Glob/Bash
  3. Step 3: Open {output_dir}/611-structure.md to review checks and the computed Score, then report to the coordinator

Best Practices

  • - Treat CLAUDE.md as the root and ensure all docs are reachable via links
  • - Replace content duplication with links to the source and assign clear ownership
  • - Apply proactive compression to verbose sections per size_limits.md guidelines
  • - Ensure requirements sections are present, free of code blocks where required, and contain valid links
  • - Run audits regularly and update the 611-structure.md report in the designated output_dir

Example Use Cases

  • Audit a CLAUDE-based repository to surface orphaned docs and broken links
  • Identify duplicated content and replace with proper source-linked references
  • Compress verbose sections by converting to concise tables or summaries
  • Verify code-related paths and APIs align with documented references
  • Generate and publish the 611-structure.md report for ln-610 coordination

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers