ln-611-docs-structure-auditor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePaths: 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.../ln-*
路径说明: 文件路径(、shared/、references/)均相对于技能仓库根目录。若在当前工作目录(CWD)未找到,请定位到当前SKILL.md所在目录,再向上一级即为仓库根目录。../ln-*
Documentation Structure Auditor (L3 Worker)
文档结构审核器(L3 Worker)
Specialized worker auditing structural quality of project documentation.
专门用于审核项目文档结构质量的Worker。
Purpose & Scope
目标与范围
- Worker in ln-610 coordinator pipeline - invoked by ln-610-docs-auditor
- Audit documentation for structural quality across 7 categories
- Scan all files in project, build hierarchy from CLAUDE.md
.md - Return structured findings to coordinator with severity, location, recommendations
- Calculate compliance score (X/10) for Documentation Structure
- 作为ln-610协调器流水线中的Worker - 由ln-610-docs-auditor调用
- 从7个维度审核文档的结构质量
- 扫描项目中所有文件,基于CLAUDE.md构建文档层级
.md - 向协调器返回包含问题严重程度、位置及改进建议的结构化检测结果
- 计算文档结构的合规性得分(X/10)
Inputs (from Coordinator)
输入参数(来自协调器)
MANDATORY READ: Load .
shared/references/audit_worker_core_contract.mdReceives with: , , .
contextStoretech_stackproject_rootoutput_dir必读要求: 加载文件。
shared/references/audit_worker_core_contract.md接收包含以下内容的:、、。
contextStoretech_stackproject_rootoutput_dirWorkflow
工作流程
- Parse Context: Extract tech stack, project root, output_dir from contextStore
- Scan Docs: Find all files in project (CLAUDE.md, README.md, docs/**)
.md - Build Tree: Construct hierarchy from CLAUDE.md outward links
- 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 to
shared/templates/audit_worker_report_template.mdin single Write call{output_dir}/611-structure.md - Return Summary: Return minimal summary to coordinator (see Output Format)
- 解析上下文: 从contextStore中提取技术栈、项目根目录、输出目录信息
- 扫描文档: 查找项目中所有文件(包括CLAUDE.md、README.md、docs/**下的文件)
.md - 构建层级树: 基于CLAUDE.md的外部链接构建文档层级结构
- 审核7个维度: 执行结构检查(详见下方「审核维度」)
- 收集检测结果: 记录每个问题的严重程度、位置(文件:行号)、修复工作量预估(S/M/L)及改进建议
- 计算得分: 根据问题严重程度统计,计算合规性得分(X/10)
- 生成报告: 按照模板构建完整的Markdown报告,通过单次写入操作保存至
shared/templates/audit_worker_report_template.md{output_dir}/611-structure.md - 返回摘要: 向协调器返回精简的结果摘要(详见「输出格式」)
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 to 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 | 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 |
| 序号 | 维度 | 检查内容 |
|---|---|---|
| 1 | 层级与链接 | CLAUDE.md为根文档;所有文档均可通过链接访问;无孤立文件;无失效链接 |
| 2 | 单一信息源(SSOT) | 无内容重复;重复内容已替换为指向源文件的链接;明确内容归属 |
| 3 | 主动压缩 | 删除冗长/冗余内容;将叙述性文本转为表格;移除无意义信息;即使文件未超限也需压缩;参考size_limits.md |
| 4 | 需求合规性 | 章节设置正确;文件大小符合限制;无代码块(仅允许表格/ASCII图/纯文本);文档链接与技术栈匹配 |
| 5 | 新鲜度指标 | 检测过时信号:内容中存在超过6个月的日期、已废弃的API/工具引用、TODO/FIXME标记、遗留占位文本;深度事实核查由专用Worker处理 |
| 6 | 遗留内容清理 | 无历史章节;无「已修改」类注释;无已废弃信息;仅保留当前状态内容 |
| 7 | 技术栈适配 | 链接/引用与项目技术栈匹配;.NET项目中无Python示例;使用对应平台的官方文档链接 |
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 |
| 问题类型 | 严重程度 |
|---|---|
| 过时信号(旧日期、已废弃引用、TODO标记) | 中(MEDIUM) |
| 失效链接、孤立文档 | 高(HIGH) |
| 内容重复 | 中(MEDIUM) |
| 未利用压缩机会 | 低(LOW) |
| 遗留/历史内容 | 中(MEDIUM) |
| 技术栈引用错误 | 高(HIGH) |
Scoring Algorithm
评分算法
MANDATORY READ: Load and .
shared/references/audit_worker_core_contract.mdshared/references/audit_scoring.md必读要求: 加载和文件。
shared/references/audit_worker_core_contract.mdshared/references/audit_scoring.mdOutput Format
输出格式
MANDATORY READ: Load and .
shared/references/audit_worker_core_contract.mdshared/templates/audit_worker_report_template.mdWrite report to with and checks: hierarchy_links, ssot, compression, requirements_compliance, freshness_indicators, legacy_cleanup, stack_adaptation.
{output_dir}/611-structure.mdcategory: "Documentation Structure"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)必读要求: 加载和文件。
shared/references/audit_worker_core_contract.mdshared/templates/audit_worker_report_template.md将报告写入,需包含及检查项:hierarchy_links、ssot、compression、requirements_compliance、freshness_indicators、legacy_cleanup、stack_adaptation。
{output_dir}/611-structure.mdcategory: "Documentation Structure"向协调器返回如下摘要:
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
核心规则
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 navigation
file:line
必读要求: 加载文件。
shared/references/audit_worker_core_contract.md- 禁止自动修复: 仅报告问题;由协调器汇总后提交给用户处理
- 技术栈感知: 利用contextStore中的执行技术栈专属检查(如.NET与Node.js的文档标准差异)
tech_stack - 不做深度事实核查: 仅检测过时信号(日期、已废弃引用、TODO标记)
- 始终压缩内容: 大小限制为上限而非目标。100行的文件比300行更优
- 文档中禁止代码: 文档需通过表格或ASCII图描述算法;代码应存放在代码库中
- 代码为事实标准: 当文档与代码冲突时,报告文档需更新(而非修改代码)
- 直接删除,而非归档: 遗留内容应直接删除,而非移至「归档」目录
- 位置精准: 必须包含信息,支持程序化导航
文件:行号
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 returned to coordinator
必读要求: 加载文件。
shared/references/audit_worker_core_contract.md- 成功解析contextStore(包括output_dir)
- 已完成全部7个结构维度的审核
- 已收集包含严重程度、位置、工作量、改进建议的检测结果
- 已通过惩罚算法计算得分
- 已将报告写入(原子化单次写入操作)
{output_dir}/611-structure.md - 已向协调器返回结果摘要
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
- 大小限制与目标:size_limits.md
- 详细检查清单:references/audit_checklist.md
版本: 1.0.0
最后更新日期: 2026-03-01