catalog-repair
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePurpose
目的
Check and fix consistency of the topics.md index against actual files.
.memory/检查并修复topics.md索引与实际文件之间的一致性。
.memory/Checks
检查项
- Dead links → topics.md references non-existent files → auto-delete ()
fixed - Missing registration → bucket files not indexed in topics.md →
ai_actions - Duplicate topics → same topic header appears multiple times →
manual_actions - Invalid anchors → not found in target file →
#anchor(if close match) orai_actionsmanual_actions
- 无效链接 → topics.md引用了不存在的文件 → 自动删除(标记为)
fixed - 缺失注册 → 存储桶文件未在topics.md中索引 → 标记为
ai_actions - 重复主题 → 同一主题标题多次出现 → 标记为
manual_actions - 无效锚点 → 目标文件中未找到→ 若存在近似匹配则标记为
#anchor,否则标记为ai_actionsmanual_actions
Required Flow
必要流程
bash
memory-hub catalog-repairbash
memory-hub catalog-repairOutput
输出结果
JSON envelope with:
- : auto-fixed items
data.fixed - : items AI should self-heal
data.ai_actions - : items requiring human confirmation
data.manual_actions
包含以下内容的JSON包:
- :自动修复的项
data.fixed - :AI应自行修复的项
data.ai_actions - :需要人工确认的项
data.manual_actions
Post-Processing
后处理
After receiving results:
- non-empty → AI executes self-healing (register missing files via
ai_actions, fix anchors), then runsmemory.writeagain to confirm clearedcatalog-repair - non-empty → report to user before task ends
manual_actions
接收结果后:
- 若非空 → AI执行自我修复(通过
ai_actions注册缺失文件、修复锚点),然后再次运行memory.write确认问题已解决catalog-repair - 若非空 → 在任务结束前向用户报告
manual_actions