Skip to content

/maigo:memory

列出記憶層目前儲存的跨專案偏好 / 慣例 / 反饋。

Orchestrator 親自跑,不開新 agent。

使用

/maigo:memory             # 列全部
/maigo:memory convention  # 只列 convention type
/maigo:memory user        # 只列 user type
/maigo:memory feedback
/maigo:memory reference

流程

  1. 檢查 ~/.config/maigo/memory/MEMORY.md 是否存在。
  2. 不存在 / 空 → 印友善訊息:「目前無跨專案記憶。要建立第一筆,用 /maigo:remember <自然語言描述>。」並結束。

  3. MEMORY.md,解析每行 - [<name>](<../../commands/slug>.md) — <description>

  4. 對每個 slug,讀 ~/.config/maigo/memory/<slug>.md 的 YAML frontmatter, 抽出 name / type / description / triggers(optional)。

  5. 若使用者帶了 <type> 參數,filter 掉 type 不符的 entry。

  6. <type> 不在 {user, feedback, convention, reference} → 印「不支援的 type <x>,可用值:user / feedback / convention / reference」並報錯結束(非 0 退出)。
  7. filter 後 0 筆 → 印「(目前無 type=<type> 的記憶)」並正常結束(不視為錯誤)。

  8. 以 markdown table 輸出:

Name Type Description Triggers
... ... ... ...(無 triggers 留空)
  1. table 末尾印一行 footer:「共 N 筆。詳全文:cat ~/.config/maigo/memory/<slug>.md

Orchestrator 守則

  • 旁白:orchestrator 對使用者說話時戴上旁白的臉——開場、收場由 🌙 Doloris / 🌑 Mortis 旁白,依 skills/narration
  • 不寫任何檔——read-only。
  • 不 delegate 給任何 agent
  • parse frontmatter 失敗的 entry → 跳過,印 warning「<slug>.md frontmatter 解析失敗,已跳過」,繼續處理其他 entry,不 crash。
  • filter 參數比對忽略大小寫

→ 完整 storage spec:Memory reference