memory-curate
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMemory Curate
Memory Curate
Maintain a healthy, well-connected knowledge graph. As notes accumulate, it pays to periodically organize, link, and curate the knowledge base so isolated notes become a connected graph.
This skill curates the knowledge graph — the notes, relations, and tags that make up the knowledge base. (For hygiene on an agent's own memory files — splitting bloated files, pruning stale entries — see memory-defrag.)
维护一个健康、关联紧密的knowledge graph。随着笔记不断积累,定期整理、关联并维护知识库十分必要,这样孤立的笔记就能形成一个相互关联的图谱。
该技能用于维护knowledge graph——即构成知识库的笔记、relations和标签。(如需清理Agent自身的内存文件——拆分臃肿文件、剔除过期条目——请查看memory-defrag。)
When to Use
使用场景
- Asked to organize, clean up, or improve the knowledge base
- Asked to find connections between notes, or what isn't linked yet
- Orphan or unlinked notes are mentioned
- Asked about duplicate or similar notes
- Asked for help with folder organization or tag consistency
- Phrases like "help me organize", "find related notes", "what's not linked", "clean up my notes"
- 被要求整理、清理或优化知识库时
- 被要求查找笔记间的关联,或找出未关联的内容时
- 提及orphan notes或未关联笔记时
- 被询问重复或相似笔记时
- 寻求文件夹整理或标签一致性方面的帮助时
- 出现类似“帮我整理一下”“查找相关笔记”“哪些内容未关联”“清理我的笔记”等表述时
Curation Capabilities
维护能力
1. Find Orphan Notes
1. 查找Orphan Notes
Orphans have no relations to other notes — they're islands in the graph.
python
undefinedOrphan Notes指与其他笔记无任何relations的笔记——它们是图谱中的“孤岛”。
python
undefinedList notes, then read each to inspect its Relations section
List notes, then read each to inspect its Relations section
search_notes(query="*", page_size=50)
read_note(identifier="note-to-check")
search_notes(query="*", page_size=50)
read_note(identifier="note-to-check")
Orphans have an empty (or missing) Relations section
Orphans have an empty (or missing) Relations section
**What to do with orphans:**
- Suggest relations based on content similarity
- Ask whether they should connect to existing topics
- Propose hub notes to gather related orphans (see capability 6)
**处理Orphan Notes的方法:**
- 根据内容相似度推荐relations
- 询问是否应将其与现有主题关联
- 建议创建hub notes来整合相关的Orphan Notes(详见第6项能力)2. Suggest Typed Relations
2. 推荐Typed Relations
Analyze a note's content and propose meaningful connections.
python
read_note(identifier="note-to-analyze")分析笔记内容并提出有意义的关联建议。
python
read_note(identifier="note-to-analyze")Pull out key terms, then search for related notes
Pull out key terms, then search for related notes
search_notes(query="key terms from the note")
Suggest relations based on shared topics, complementary content (problem/solution,
question/answer), sequence (part 1 → part 2), or hierarchy (parent concept → detail).
**Relation-type vocabulary:**
- `relates_to` — general topical connection
- `extends` — builds upon or elaborates
- `implements` — realizes a concept or spec
- `depends_on` — requires understanding of
- `part_of` — hierarchy or composition
- `contrasts_with` — presents an alternative view
- `inspired_by` — source of insight
- `enables` — makes something possible
Custom relation types are fine — use whatever verb is descriptive.
Add a confirmed relation with `edit_note`:
```python
edit_note(
identifier="API Design Decisions",
operation="append",
section="Relations",
content="- depends_on [[Rate Limiter]]",
)search_notes(query="key terms from the note")
基于共享主题、互补内容(问题/解决方案、问答)、序列关系(第一部分→第二部分)或层级关系(父概念→细节)来推荐relations。
**关系类型词汇:**
- `relates_to` —— 通用主题关联
- `extends` —— 拓展或详述
- `implements` —— 实现某个概念或规范
- `depends_on` —— 需要先理解
- `part_of` —— 层级或组成关系
- `contrasts_with` —— 呈现替代观点
- `inspired_by` —— 灵感来源
- `enables` —— 使某事成为可能
自定义关系类型也是可行的——使用任何具有描述性的动词即可。
通过`edit_note`添加已确认的关系:
```python
edit_note(
identifier="API Design Decisions",
operation="append",
section="Relations",
content="- depends_on [[Rate Limiter]]",
)3. Identify Similar / Duplicate Notes
3. 识别相似/重复笔记
Find notes that may cover the same ground.
python
search_notes(query="topic keywords")查找可能涵盖相同内容的笔记。
python
search_notes(query="topic keywords")Compare results for: similar titles, overlapping observations,
Compare results for: similar titles, overlapping observations,
shared tags, close-together timestamps
shared tags, close-together timestamps
**Actions for duplicates:**
- **Merge** into a single comprehensive note, then redirect the loser with a relation
- Link with `supersedes` / `updates` when one revises the other
- **Differentiate** by adding context that clarifies each note's distinct focus
```python
**重复笔记的处理动作:**
- **合并**为一篇全面的笔记,然后通过relation将旧笔记重定向到新笔记
- 当一篇笔记修订另一篇时,使用`supersedes`/`updates`关联
- **区分**:添加上下文以明确每篇笔记的独特关注点
```pythonPoint an older note at the one that replaces it
Point an older note at the one that replaces it
edit_note(
identifier="DB Schema v1",
operation="append",
section="Relations",
content="- updates [[DB Schema v2]]",
)
undefinededit_note(
identifier="DB Schema v1",
operation="append",
section="Relations",
content="- updates [[DB Schema v2]]",
)
undefined4. Folder Organization Review
4. 文件夹组织审核
python
list_directory(dir_name="/", depth=3)Look for overcrowded folders, single-note folders, inconsistent naming, and notes
that belong elsewhere. Suggest grouping related notes into topic folders, adding
subfolders for large categories, and a consistent naming convention. Move misplaced
notes with — the permalink stays stable, so wiki-links keep resolving.
move_notepython
move_note(
identifier="API Design Decisions",
destination_path="architecture/api-design-decisions.md",
)python
list_directory(dir_name="/", depth=3)查找过度拥挤的文件夹、仅含单篇笔记的文件夹、命名不一致的情况,以及放错位置的笔记。建议将相关笔记分组到主题文件夹中,为大型分类添加子文件夹,并采用统一的命名规范。使用移动放错位置的笔记——永久链接保持稳定,因此wiki链接仍可正常解析。
move_notepython
move_note(
identifier="API Design Decisions",
destination_path="architecture/api-design-decisions.md",
)5. Tag Consistency
5. 标签一致性
python
search_notes(query="*", page_size=100)python
search_notes(query="*", page_size=100)Inspect tag patterns across results
Inspect tag patterns across results
Look for:
- **Variant tags** — `architecture` vs `arch`; pick one and standardize
- **Unused tags** — present on a single note, no longer carrying weight
- **Over-used generic tags** — so broad they don't aid discovery
- **Missing tags** — relevant notes lacking an obvious tag
查找以下情况:
- **变体标签**——`architecture`与`arch`;选择其一并标准化
- **未使用标签**——仅在单篇笔记中出现,已无实际作用
- **过度使用的通用标签**——范围过广,对内容发现无帮助
- **缺失标签**——相关笔记缺少明显应有的标签6. Create Index / Hub Notes
6. 创建索引/Hub Notes
After finding a cluster of related notes, build a navigation hub.
python
write_note(
title="Architecture Decisions Index",
directory="indexes",
tags=["architecture", "index"],
note_type="index",
content="""# Architecture Decisions Index
A hub linking architecture-related decisions and patterns.找到一组相关笔记后,构建导航枢纽。
python
write_note(
title="Architecture Decisions Index",
directory="indexes",
tags=["architecture", "index"],
note_type="index",
content="""# Architecture Decisions Index
A hub linking architecture-related decisions and patterns.Decisions
Decisions
- [[Database Selection Decision]]
- [[API Design Patterns]]
- [[Authentication Architecture]]
- [[Database Selection Decision]]
- [[API Design Patterns]]
- [[Authentication Architecture]]
Patterns
Patterns
- [[Repository Pattern]]
- [[Async Client Pattern]]
- [[Repository Pattern]]
- [[Async Client Pattern]]
Observations
Observations
- [index] Central hub for architecture knowledge #navigation
- [index] Central hub for architecture knowledge #navigation
Relations
Relations
- indexes [[Architecture]]""", )
undefined- indexes [[Architecture]]""", )
undefined7. Enrich Sparse Notes
7. 补充内容稀疏的笔记
Find notes lacking structure and fill them in.
python
read_note(identifier="sparse-note")If the note is missing an Observations section, suggest categories. If it has no
Relations, suggest links. If it has no tags, suggest relevant ones. If it lacks
context, suggest adding background. Apply with .
edit_note查找结构不完善的笔记并补充内容。
python
read_note(identifier="sparse-note")如果笔记缺少Observations部分,建议添加分类。如果没有Relations,建议添加链接。如果没有标签,建议添加相关标签。如果缺少上下文,建议添加背景信息。通过应用这些修改。
edit_noteCuration Workflows
维护工作流
Quick Health Check
快速健康检查
A fast overview of knowledge base status:
- Count total notes
- Identify orphan count
- List recently modified ()
recent_activity - Check for obvious duplicates
- Report folder distribution
快速了解知识库状态:
- 统计笔记总数
- 统计孤立笔记数量
- 列出最近修改的笔记()
recent_activity - 查找明显的重复笔记
- 报告文件夹分布情况
Deep Organization Session
深度整理会话
Thorough review and improvement:
- Audit — catalog all notes, identify issues
- Orphans — address unlinked notes
- Relations — suggest new connections
- Duplicates — merge or differentiate similar notes
- Structure — reorganize folders if needed
- Index — create hub notes for major topics
全面审查与优化:
- 审核——记录所有笔记,识别问题
- 孤立笔记——处理未关联的笔记
- 关联关系——建议新的关联
- 重复笔记——合并或区分相似笔记
- 结构调整——必要时重新组织文件夹
- 索引创建——为主要主题创建hub notes
Topic-Focused Organization
主题聚焦式整理
Organize around a specific subject:
- Find all notes related to the topic ()
search_notes - Map existing relations with
build_context(url="memory://...") - Identify gaps in the topic graph
- Suggest new notes to fill them
- Create a topic index note
围绕特定主题进行整理:
- 查找所有与该主题相关的笔记()
search_notes - 使用绘制现有关系图
build_context(url="memory://...") - 识别主题图谱中的空白
- 建议创建新笔记填补空白
- 创建主题索引笔记
Best Practices
最佳实践
- Work incrementally. Don't reorganize everything at once.
- Confirm before changing. Always ask before moving, merging, or editing notes.
- Preserve permalinks. Moving a note is fine; changing its permalink breaks inbound links.
- Explain suggestions. Say why a relation or merge makes sense.
- Respect the existing system. Enhance the user's organization — don't impose a new taxonomy.
- Show the graph. Use to help the user see how notes connect.
build_context
- 逐步推进。不要一次性重新整理所有内容。
- 修改前确认。移动、合并或编辑笔记前务必先询问用户。
- 保留永久链接。移动笔记没问题,但修改永久链接会破坏入站链接。
- 解释建议。说明为何建议添加某个关系或合并笔记。
- 尊重现有体系。优化用户的组织方式——不要强加新的分类体系。
- 展示图谱。使用帮助用户查看笔记间的关联方式。
build_context
Example Conversations
对话示例
User: "Help me organize my notes"
The assistant:
- Runs a health check on the knowledge base
- Reports: "You have 47 notes. I found 12 orphans and 3 potential duplicates."
- Asks: "Want to start by connecting the orphans, or review the duplicates first?"
User: "Find notes that should link to my API design note"
The assistant:
- Reads the API design note
- Searches for related content
- Suggests: "5 notes could relate —
- 'REST Best Practices' →
relates_to - 'Authentication Flow' →
implements - 'Rate Limiting Decision' → Should I add any of these relations?"
extends
- 'REST Best Practices' →
User: "Are there notes on similar topics?"
The assistant:
- Analyzes titles and content for clusters
- Reports: "Possible overlaps —
- 'Auth Flow' and 'Authentication Design' cover similar ground
- 'DB Schema v1' and 'DB Schema v2' likely want a relation Want to review either?"
supersedes
用户: "帮我整理我的笔记"
助手:
- 对知识库进行健康检查
- 报告:"您共有47篇笔记。我发现了12篇orphan notes和3篇潜在重复笔记。"
- 询问:"您想先处理孤立笔记的关联,还是先查看重复笔记?"
用户: "查找应该与我的API设计笔记关联的内容"
助手:
- 读取API设计笔记
- 搜索相关内容
- 建议:"有5篇笔记可建立关联——
- 'REST Best Practices' →
relates_to - 'Authentication Flow' →
implements - 'Rate Limiting Decision' → 是否需要添加这些关联?"
extends
- 'REST Best Practices' →
用户: "有没有主题相似的笔记?"
助手:
- 分析标题和内容以找出聚类
- 报告:"可能存在内容重叠——
- 'Auth Flow'与'Authentication Design'内容相似
- 'DB Schema v1'与'DB Schema v2'可能需要建立关联 是否需要查看其中任意一组?"
supersedes