catalog-repair

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Purpose

目的

Check and fix consistency of the topics.md index against actual
.memory/
files.
检查并修复topics.md索引与实际
.memory/
文件之间的一致性。

Checks

检查项

  1. Dead links → topics.md references non-existent files → auto-delete (
    fixed
    )
  2. Missing registration → bucket files not indexed in topics.md →
    ai_actions
  3. Duplicate topics → same topic header appears multiple times →
    manual_actions
  4. Invalid anchors →
    #anchor
    not found in target file →
    ai_actions
    (if close match) or
    manual_actions
  1. 无效链接 → topics.md引用了不存在的文件 → 自动删除(标记为
    fixed
  2. 缺失注册 → 存储桶文件未在topics.md中索引 → 标记为
    ai_actions
  3. 重复主题 → 同一主题标题多次出现 → 标记为
    manual_actions
  4. 无效锚点 → 目标文件中未找到
    #anchor
    → 若存在近似匹配则标记为
    ai_actions
    ,否则标记为
    manual_actions

Required Flow

必要流程

bash
memory-hub catalog-repair
bash
memory-hub catalog-repair

Output

输出结果

JSON envelope with:
  • data.fixed
    : auto-fixed items
  • data.ai_actions
    : items AI should self-heal
  • data.manual_actions
    : items requiring human confirmation
包含以下内容的JSON包:
  • data.fixed
    :自动修复的项
  • data.ai_actions
    :AI应自行修复的项
  • data.manual_actions
    :需要人工确认的项

Post-Processing

后处理

After receiving results:
  • ai_actions
    non-empty → AI executes self-healing (register missing files via
    memory.write
    , fix anchors), then runs
    catalog-repair
    again to confirm cleared
  • manual_actions
    non-empty → report to user before task ends
接收结果后:
  • ai_actions
    非空 → AI执行自我修复(通过
    memory.write
    注册缺失文件、修复锚点),然后再次运行
    catalog-repair
    确认问题已解决
  • manual_actions
    非空 → 在任务结束前向用户报告