docs-cleaner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Documentation Cleaner

文档清理工具

Consolidate redundant documentation while preserving 100% of valuable content.
在保留100%有价值内容的同时整合冗余文档。

Core Principle

核心原则

Critical evaluation before deletion. Never blindly delete. Analyze each section's unique value before proposing removal. The goal is reduction without information loss.
删除前需进行关键评估。绝不盲目删除。在提议删除前,分析每个部分的独特价值。目标是在不丢失信息的前提下精简文档。

Workflow

工作流程

Phase 1: Discovery

阶段1:发现

  1. Identify all documentation files covering the topic
  2. Count total lines across files
  3. Map content overlap between documents
  1. 识别所有涵盖该主题的文档文件
  2. 统计所有文件的总行数
  3. 绘制文档间的内容重叠图谱

Phase 2: Value Analysis

阶段2:价值分析

For each document, create a section-by-section analysis table:
SectionLinesValueReason
API Reference25KeepUnique endpoint documentation
Setup Steps40CondenseVerbose but essential
Test Results30DeleteOne-time record, not reference
Value categories:
  • Keep: Unique, essential, frequently referenced
  • Condense: Valuable but verbose
  • Delete: Duplicate, one-time, self-evident, outdated
See
references/value_analysis_template.md
for detailed criteria.
针对每个文档,创建逐节分析表格:
章节行数处理方式原因
API参考25保留独有的端点文档
设置步骤40精简内容冗长但至关重要
测试结果30删除一次性记录,非参考内容
价值分类:
  • 保留:独特、必要、频繁引用的内容
  • 精简:有价值但冗长的内容
  • 删除:重复、一次性、不言自明、过时的内容
详见
references/value_analysis_template.md
中的详细标准。

Phase 3: Consolidation Plan

阶段3:整合计划

Propose target structure:
Before: 726 lines (3 files, high redundancy)
After:  ~100 lines (1 file + reference in CLAUDE.md)
Reduction: 86%
Value preserved: 100%
提议目标结构:
Before: 726 lines (3 files, high redundancy)
After:  ~100 lines (1 file + reference in CLAUDE.md)
Reduction: 86%
Value preserved: 100%

Phase 4: Execution

阶段4:执行

  1. Create consolidated document with all valuable content
  2. Delete redundant source files
  3. Update references (CLAUDE.md, README, imports)
  4. Verify no broken links
  1. 创建包含所有有价值内容的整合文档
  2. 删除冗余源文件
  3. 更新引用(CLAUDE.md、README、导入链接)
  4. 验证无失效链接

Value Preservation Checklist

价值保留检查清单

Before finalizing, confirm preservation of:
  • Essential procedures (setup, configuration)
  • Key constraints and gotchas
  • Troubleshooting guides
  • Technical debt / roadmap items
  • External links and references
  • Debug tips and code snippets
最终确定前,确认以下内容已保留:
  • 必要流程(设置、配置)
  • 关键约束与注意事项
  • 故障排除指南
  • 技术债务/路线图事项
  • 外部链接与参考资料
  • 调试技巧与代码片段

Anti-Patterns

反模式

PatternProblemSolution
Blind deletionLoses valuable informationSection-by-section analysis first
Keeping everythingNo reduction achievedApply value criteria strictly
Multiple sources of truthFuture divergenceSingle authoritative location
Orphaned referencesBroken linksUpdate all references after consolidation
模式问题解决方案
盲目删除丢失有价值信息先进行逐节分析
全部保留未实现精简严格应用价值判断标准
多源真相未来内容分歧单一权威来源
孤立引用失效链接整合后更新所有引用

Output Artifacts

输出产物

A successful cleanup produces:
  1. Consolidated document - Single source of truth
  2. Value analysis - Section-by-section justification
  3. Before/after metrics - Lines reduced, value preserved
  4. Updated references - CLAUDE.md or README with pointer to new location
成功清理后将生成:
  1. 整合文档 - 单一权威来源
  2. 价值分析报告 - 逐节合理性说明
  3. 前后对比指标 - 精简行数、保留价值占比
  4. 更新后的引用 - CLAUDE.md或README中指向新位置的链接