Memory Management
Retrieve first. Write only what should persist.
Core model
- -
MEMORY.md — curated long-term memory - INLINECODE1 — daily notes and running context
- INLINECODE2 — find likely snippets
- INLINECODE3 — read exact lines needed
Retrieval
When user asks about prior work, decisions, dates, people, preferences, or todos:
- 1.
memory_search with a tight, specific query. - INLINECODE5 for the needed lines only.
- Answer from retrieved text, not guesswork.
- If results are weak or empty, say you checked.
Good queries: omar internship goal fall 2026, notion workspace page id
Bad queries: whole paragraphs, vague terms like INLINECODE8
Writing
Write when user says "remember this," states a durable preference, or makes a decision that matters later.
| Destination | What goes there |
|---|
| INLINECODE9 | Standing preferences, durable facts, recurring workflows, important long-term decisions |
| INLINECODE10 |
Day-to-day notes, progress, one-off events, session context |
Rules:
- - smallest useful note
- concrete facts over commentary
- no secrets unless asked
- do not promise memory unless written
When not to use
Skip retrieval when the answer is in the current message or task is current-turn only.
Skip writing when the fact is trivial, belongs in project docs, or is temporary scratch.
Answering rules
- - Cite file path/line when useful
- Separate memory facts from inference
- Flag stale memory
- If unavailable, say so
内存管理
先检索。只写入需要持久化的内容。
核心模型
- - MEMORY.md — 精选的长期记忆
- memory/YYYY-MM-DD.md — 每日笔记与运行上下文
- memorysearch — 查找可能的片段
- memoryget — 读取所需的确切行
检索
当用户询问过往工作、决策、日期、人员、偏好或待办事项时:
- 1. 使用精确具体的查询进行 memorysearch。
- 仅通过 memoryget 获取所需行。
- 根据检索到的文本作答,而非猜测。
- 若结果不足或为空,则说明已检查过。
良好查询示例:omar internship goal fall 2026、notion workspace page id
不良查询示例:整段段落、模糊术语如 memory
写入
当用户说记住这个、表达持久性偏好或做出日后重要的决策时进行写入。
| 目标位置 | 写入内容 |
|---|
| MEMORY.md | 固定偏好、持久性事实、重复性工作流程、重要的长期决策 |
| memory/YYYY-MM-DD.md |
日常笔记、进度、一次性事件、会话上下文 |
规则:
- - 记录最小有用的笔记
- 具体事实优于评论
- 除非被要求,不记录秘密
- 未写入的内容不承诺记忆
何时不使用
当答案在当前消息中或任务仅限当前轮次时,跳过检索。
当事实微不足道、属于项目文档或为临时草稿时,跳过写入。
回答规则
- - 在有用时引用文件路径/行号
- 将记忆事实与推断分开
- 标记过时的记忆
- 若无法获取,如实说明