Memory Lifecycle
Manage how entities move through status stages in Basic Memory. The core principle: archive, never delete. Completed work is valuable context — move it out of the active view, but keep it in the knowledge graph.
When to Use
- - User says something is "done", "finished", "completed", "submitted", "missed", or "cancelled"
- Moving entities between status folders (active → archive, pipeline → active, etc.)
- Reverting a mistaken completion
- Periodic cleanup of stale active items
Core Principle: Archive, Never Delete
Deleting a note removes it from the knowledge graph — all its observations, relations, and history disappear. Archiving preserves everything while signaling the entity is no longer active.
CODEBLOCK0
The only exception: notes created by mistake (typos, true duplicates) can be deleted.
Folder Conventions
Organize entities by status using folders. The exact folder names depend on your domain, but follow a consistent pattern:
CODEBLOCK1
For tasks specifically:
CODEBLOCK2
For any entity type with a clear lifecycle:
CODEBLOCK3
Pick folder names that match your domain. The pattern matters more than the specific names.
Status Detection
When the user mentions completion or status change, extract the intent:
| Signal | Status | Action |
|---|
| "finished", "done", "completed", "shipped" | Complete | Move to archive/completed folder |
| "submitted", "sent", "delivered" |
Complete | Move to archive/completed folder |
| "missed", "passed", "skipped", "expired" | Missed | Move to archive or missed folder |
| "cancelled", "abandoned", "killed" | Cancelled | Move to archive folder |
| "paused", "on hold", "deferred" | Paused | Update frontmatter status, keep in place |
| "restarting", "reopening", "reviving" | Reactivate | Move back to active folder |
Workflow
1. Find the Entity
Search Basic Memory with multiple variations to locate the entity:
CODEBLOCK4
If multiple matches come back, present options and ask which one.
If no match is found, ask for clarification — don't guess.
2. Move the File
Use move_note to relocate the entity to the appropriate status folder:
CODEBLOCK5
The permalink stays the same, so all existing [[wiki-links]] and memory:// URLs continue to resolve.
3. Update Frontmatter
After moving, update the status in frontmatter to match:
CODEBLOCK6
If there's a completion date field, set it:
CODEBLOCK7
4. Confirm
Report what was done concisely:
CODEBLOCK8
Edge Cases
Already Archived
If the entity is already in an archive/completed folder, notify the user:
"Quarterly Report is already in tasks/completed/. Want me to update anything on it?"
Partial Completion
Sometimes only part of an entity is done. Don't move it — instead, update observations or status notes within the entity to reflect partial progress.
Revert / Reactivate
If something was archived by mistake, move it back:
CODEBLOCK9
Status Without Movement
Some status changes don't require a folder move — "paused" or "blocked" items often stay in active/ with just a frontmatter update. Reserve folder moves for terminal or major state transitions.
Relationship to Other Skills
- - memory-tasks: Tasks are a specific lifecycle case. This skill covers the general pattern; memory-tasks covers task-specific fields (steps, current_step, context).
- memory-notes: Use search-before-create (from memory-notes) to find the entity before transitioning it.
- memory-defrag: Periodic defrag can identify stale active items that should be archived.
Guidelines
- - Archive, never delete. The knowledge graph benefits from historical context.
- Move first, then update frontmatter. This order ensures the file is in the right place even if the edit step fails.
- Permalinks survive moves. Links to the entity keep working after a
move_note. - Be concise in confirmations. The user knows their system — just report what changed.
- Ask when ambiguous. If multiple entities match or the target folder isn't clear, ask rather than guess.
- Batch operations are fine. If the user says "archive all completed tasks", find them all, confirm the list, then move them in sequence.
内存生命周期
管理实体在基础内存中如何经历状态阶段。核心原则:归档,永不删除。 已完成的工作是有价值的上下文——将其移出活动视图,但保留在知识图谱中。
何时使用
- - 用户说某件事已完成、结束、完成、已提交、错过或已取消
- 在状态文件夹之间移动实体(活动→归档,管道→活动等)
- 撤销错误的完成操作
- 定期清理过期的活动项目
核心原则:归档,永不删除
删除笔记会将其从知识图谱中移除——所有观察、关系和历史都会消失。归档则保留一切,同时表明该实体不再处于活动状态。
好——实体保留在知识图谱中
move_note → active/ to archive/
坏——知识丢失
delete_note
唯一的例外:因错误创建的笔记(拼写错误、真正的重复项)可以删除。
文件夹规范
使用文件夹按状态组织实体。确切的文件夹名称取决于你的领域,但遵循一致的模式:
entities/
active/ # 当前相关、进行中
archive/ # 已完成、不再活动但值得保留
pipeline/ # 未来项目、尚未开始
对于任务而言:
tasks/
active/ # 进行中的工作
completed/ # 已完成的工作
对于任何具有明确生命周期的实体类型:
[type]/
active/ # 当前
[end-state]/ # 该类型完成的含义
选择与你领域匹配的文件夹名称。模式比具体名称更重要。
状态检测
当用户提到完成或状态变更时,提取意图:
| 信号 | 状态 | 操作 |
|---|
| 完成、结束、已完成、已发货 | 完成 | 移动到归档/已完成文件夹 |
| 已提交、已发送、已交付 |
完成 | 移动到归档/已完成文件夹 |
| 错过、通过、跳过、过期 | 错过 | 移动到归档或错过文件夹 |
| 已取消、已放弃、已终止 | 已取消 | 移动到归档文件夹 |
| 暂停、搁置、推迟 | 暂停 | 更新前置元数据状态,保留在原位 |
| 重新开始、重新打开、恢复 | 重新激活 | 移回活动文件夹 |
工作流程
1. 查找实体
使用多种变体搜索基础内存以定位实体:
python
search_notes(query=季度报告)
search_notes(query=Q1报告)
如果返回多个匹配项,呈现选项并询问用户选择哪一个。
如果未找到匹配项,要求澄清——不要猜测。
2. 移动文件
使用 move_note 将实体重新定位到适当的状态文件夹:
python
move_note(
identifier=tasks/active/quarterly-report,
destination_path=tasks/completed/quarterly-report.md
)
永久链接保持不变,因此所有现有的 [[wiki-links]] 和 memory:// URL 继续有效。
3. 更新前置元数据
移动后,更新前置元数据中的状态以匹配:
python
edit_note(
identifier=quarterly-report,
operation=find_replace,
find_text=status: active,
content=status: completed
)
如果有完成日期字段,设置它:
python
edit_note(
identifier=quarterly-report,
operation=find_replace,
find_text=completed:,
content=completed: 2026-02-22
)
4. 确认
简洁地报告已完成的操作:
标记完成:季度报告
移动到:tasks/completed/quarterly-report.md
状态:已完成
边界情况
已归档
如果实体已在归档/已完成文件夹中,通知用户:
季度报告已在 tasks/completed/ 中。需要我更新它的任何内容吗?
部分完成
有时只有实体的部分内容完成。不要移动它——而是在实体内部更新观察或状态说明以反映部分进展。
撤销 / 重新激活
如果某内容被错误归档,将其移回:
python
move_note(
identifier=tasks/completed/quarterly-report,
destination_path=tasks/active/quarterly-report.md
)
edit_note(
identifier=quarterly-report,
operation=find_replace,
find_text=status: completed,
content=status: active
)
状态变更但不移动
某些状态变更不需要移动文件夹——暂停或受阻的项目通常保留在 active/ 中,仅更新前置元数据。仅对终端或主要状态转换保留文件夹移动。
与其他技能的关系
- - memory-tasks:任务是特定的生命周期案例。此技能涵盖通用模式;memory-tasks 涵盖任务特定字段(步骤、当前步骤、上下文)。
- memory-notes:在转换实体之前,使用搜索-先创建(来自 memory-notes)来查找实体。
- memory-defrag:定期碎片整理可以识别应归档的过期活动项目。
指南
- - 归档,永不删除。 知识图谱受益于历史上下文。
- 先移动,再更新前置元数据。 此顺序确保即使编辑步骤失败,文件也在正确位置。
- 永久链接在移动后仍然有效。 指向实体的链接在 move_note 后继续工作。
- 确认时保持简洁。 用户了解他们的系统——只需报告更改了什么。
- 有歧义时询问。 如果多个实体匹配或目标文件夹不明确,询问而不是猜测。
- 批量操作没问题。 如果用户说归档所有已完成的任务,找到它们全部,确认列表,然后依次移动。