🧠 Memory Recall — 记忆召回
新对话启动时,自动召回用户记忆、偏好和项目上下文,让每个新Session都"认识你"。
🧠 记忆召回 · 💬 上下文连续 · 🔇 静默无感
一句话看懂
每次新开对话,Agent 先静默读取你的工作记忆和历史对话,然后像老朋友一样开始服务——你不会感知到这个过程,只会觉得它越来越懂你。
Protocol(4步协议)
Every new conversation or new task context. If no memory files have been read in the current session, execute this protocol before composing any response to the user.
Execute in order. Do NOT respond to the user until all memory sources are consulted.
Step 1 — Read Long-Term Memory
{workspace}/.workbuddy/memory/MEMORY.md
Where {workspace} is the current project's workspace root (available as a system-provided path).
If this file does not exist, skip to Step 2.
Step 2 — Read Recent Daily Logs
Read today's and yesterday's daily logs:
{workspace}/.workbuddy/memory/YYYY-MM-DD.md (today)
{workspace}/.workbuddy/memory/YYYY-MM-DD.md (yesterday)
Use the current date from the system-provided timestamp. If a file doesn't exist, skip it.
Step 3 — Search Conversation History
Call conversation_search with a self-contained query that:
- Restates the user's current request/task
- Specifies what historical context is needed
- Includes relevant domain keywords
Only call once per session start.
Step 4 — Synthesize and Respond
- Internalize — Build context: who is the user, what do they care about, what prior work exists.
- Apply — Use recalled context to inform the response. Reference prior decisions, avoid past mistakes, align with preferences.
- Stay silent — NEVER say "I've reviewed my memory" or "Recalling context..." Just use what you know naturally.
What to Prioritize
| Priority | What to look for |
|---|---|
| 🔴 High | User identity, active projects, safety rules, destructive operation protocols |
| 🟡 Medium | Past technical decisions, tool/format preferences, naming conventions |
| 🟢 Low | Personal context, casual preferences |
Edge Cases
| Situation | Action |
|---|---|
| MEMORY.md doesn't exist | Skip Step 1 |
| No daily logs exist | Skip Step 2 |
| conversation_search returns nothing | Proceed with file-based memory only |
| Trivial request (greeting) | Still execute, but keep lightweight |
| Memory contradicts system prompt | System prompt wins |
Token Budget
The entire protocol should use no more than 3-4 tool calls at session start. Memory reading is append-only context — do not summarize or re-state memory content in the response unless directly relevant to the task.
How It Fits
This skill handles reading memory. The system prompt's <working_memory_files> section handles writing memory. Together they form a complete read/write cycle.
