Memory Reflect

basicmachines-co/basic-memory-skills/.agents/skills/memory-reflect

作者 basicmachines-co6d2b1d426d0dacf020aef45f029768c9d8c1e5e5無授權條款24 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫5 個月前更新

Sleep-time memory reflection: review recent conversations and daily notes, extract insights, and consolidate into long-term memory. Use when triggered by cron, heartbeat, or explicit request to reflect on recent activity. Runs as background processing to improve memory quality over time.

僅含說明AI & Agents
AI 產生的概覽

將近期的每日筆記與對話整理成經過篩選的長期記憶檔案。

功能
回顧最近幾天的每日筆記、對話紀錄以及近期修改過的記憶檔案,判斷哪些內容值得保留。它會把整理後的要點寫入 MEMORY.md,更新或移除過時項目,並在當天的每日筆記中附加一則簡短的反思紀錄。它也會檢查檔案系統問題,例如遞迴巢狀或孤立檔案。
適用情境
適合做為週期性背景工作執行,例如排程或心跳工作,以逐步提升記憶品質。也適用於隨需提出的反思、整理或回顧近期記憶的要求,以及上下文視窗壓縮事件之後。
執行需求
僅包含指示,不附帶指令碼。需要對記憶目錄的讀寫權限,其中包含每日筆記、MEMORY.md,以及可選的工作檔案與對話紀錄。

Memory Reflect

Review recent activity and consolidate valuable insights into long-term memory.

Inspired by sleep-time compute — the idea that memory formation happens best between active sessions, not during them.

When to Run

  • Cron/heartbeat: Schedule as a periodic background task (recommended: 1-2x daily)
  • On demand: User asks to reflect, consolidate, or review recent memory
  • Post-compaction: After context window compaction events

Process

1. Gather Recent Material

Read the last 2-3 days of daily notes from memory/YYYY-MM-DD.md. Also check:

  • Recent conversation transcripts (if accessible)
  • Any files modified in memory/ in the last 48 hours
  • Active tasks in memory/tasks/

2. Evaluate What Matters

For each piece of information, ask:

  • Is this a decision that affects future work? → Keep
  • Is this a lesson learned or mistake to avoid? → Keep
  • Is this a preference or working style insight? → Keep
  • Is this a relationship detail (who does what, contact info)? → Keep
  • Is this transient (weather checked, heartbeat ran, routine task)? → Skip
  • Is this already captured in MEMORY.md or another long-term file? → Skip

3. Update Long-Term Memory

Write consolidated insights to MEMORY.md following its existing structure:

  • Add new sections or update existing ones
  • Use concise, factual language
  • Include dates for temporal context
  • Remove or update outdated entries that the new information supersedes

4. Log the Reflection

Append a brief entry to today's daily note:

markdown
## Reflection (HH:MM)- Reviewed: [list of files reviewed]- Added to MEMORY.md: [brief summary of what was consolidated]- Removed/updated: [anything cleaned up]

Guidelines

  • Be selective. The goal is distillation, not duplication. MEMORY.md should be curated wisdom, not a copy of daily notes.
  • Preserve voice. If the agent has a personality/soul file, reflections should match that voice.
  • Don't delete daily notes. They're the raw record. Reflection extracts from them; it doesn't replace them.
  • Merge, don't append. If MEMORY.md already has a section about a topic, update it in place rather than adding a duplicate entry.
  • Flag uncertainty. If something seems important but you're not sure, add it with a note like "(needs confirmation)" rather than skipping it entirely.
  • Restructure over time. If MEMORY.md is a chronological dump, restructure it into topical sections during reflection. Curated knowledge > raw logs.
  • Check for filesystem issues. Look for recursive nesting (memory/memory/memory/...), orphaned files, or bloat while gathering material.

來源與署名

來源:basicmachines-co/basic-memory-skills位於.agents/skills/memory-reflect提交6d2b1d4

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架