docs-cleaner
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseDocumentation 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:发现
- Identify all documentation files covering the topic
- Count total lines across files
- Map content overlap between documents
- 识别所有涵盖该主题的文档文件
- 统计所有文件的总行数
- 绘制文档间的内容重叠图谱
Phase 2: Value Analysis
阶段2:价值分析
For each document, create a section-by-section analysis table:
| Section | Lines | Value | Reason |
|---|---|---|---|
| API Reference | 25 | Keep | Unique endpoint documentation |
| Setup Steps | 40 | Condense | Verbose but essential |
| Test Results | 30 | Delete | One-time record, not reference |
Value categories:
- Keep: Unique, essential, frequently referenced
- Condense: Valuable but verbose
- Delete: Duplicate, one-time, self-evident, outdated
See for detailed criteria.
references/value_analysis_template.md针对每个文档,创建逐节分析表格:
| 章节 | 行数 | 处理方式 | 原因 |
|---|---|---|---|
| API参考 | 25 | 保留 | 独有的端点文档 |
| 设置步骤 | 40 | 精简 | 内容冗长但至关重要 |
| 测试结果 | 30 | 删除 | 一次性记录,非参考内容 |
价值分类:
- 保留:独特、必要、频繁引用的内容
- 精简:有价值但冗长的内容
- 删除:重复、一次性、不言自明、过时的内容
详见中的详细标准。
references/value_analysis_template.mdPhase 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:执行
- Create consolidated document with all valuable content
- Delete redundant source files
- Update references (CLAUDE.md, README, imports)
- Verify no broken links
- 创建包含所有有价值内容的整合文档
- 删除冗余源文件
- 更新引用(CLAUDE.md、README、导入链接)
- 验证无失效链接
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
反模式
| Pattern | Problem | Solution |
|---|---|---|
| Blind deletion | Loses valuable information | Section-by-section analysis first |
| Keeping everything | No reduction achieved | Apply value criteria strictly |
| Multiple sources of truth | Future divergence | Single authoritative location |
| Orphaned references | Broken links | Update all references after consolidation |
| 模式 | 问题 | 解决方案 |
|---|---|---|
| 盲目删除 | 丢失有价值信息 | 先进行逐节分析 |
| 全部保留 | 未实现精简 | 严格应用价值判断标准 |
| 多源真相 | 未来内容分歧 | 单一权威来源 |
| 孤立引用 | 失效链接 | 整合后更新所有引用 |
Output Artifacts
输出产物
A successful cleanup produces:
- Consolidated document - Single source of truth
- Value analysis - Section-by-section justification
- Before/after metrics - Lines reduced, value preserved
- Updated references - CLAUDE.md or README with pointer to new location
成功清理后将生成:
- 整合文档 - 单一权威来源
- 价值分析报告 - 逐节合理性说明
- 前后对比指标 - 精简行数、保留价值占比
- 更新后的引用 - CLAUDE.md或README中指向新位置的链接