memory-curate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Memory 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
undefined
Orphan Notes指与其他笔记无任何relations的笔记——它们是图谱中的“孤岛”。
python
undefined

List 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`关联
- **区分**:添加上下文以明确每篇笔记的独特关注点

```python

Point 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]]", )
undefined
edit_note( identifier="DB Schema v1", operation="append", section="Relations", content="- updates [[DB Schema v2]]", )
undefined

4. 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
move_note
— the permalink stays stable, so wiki-links keep resolving.
python
move_note(
    identifier="API Design Decisions",
    destination_path="architecture/api-design-decisions.md",
)
python
list_directory(dir_name="/", depth=3)
查找过度拥挤的文件夹、仅含单篇笔记的文件夹、命名不一致的情况,以及放错位置的笔记。建议将相关笔记分组到主题文件夹中,为大型分类添加子文件夹,并采用统一的命名规范。使用
move_note
移动放错位置的笔记——永久链接保持稳定,因此wiki链接仍可正常解析。
python
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]]""", )
undefined

7. 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_note
应用这些修改。

Curation Workflows

维护工作流

Quick Health Check

快速健康检查

A fast overview of knowledge base status:
  1. Count total notes
  2. Identify orphan count
  3. List recently modified (
    recent_activity
    )
  4. Check for obvious duplicates
  5. Report folder distribution
快速了解知识库状态:
  1. 统计笔记总数
  2. 统计孤立笔记数量
  3. 列出最近修改的笔记(
    recent_activity
  4. 查找明显的重复笔记
  5. 报告文件夹分布情况

Deep Organization Session

深度整理会话

Thorough review and improvement:
  1. Audit — catalog all notes, identify issues
  2. Orphans — address unlinked notes
  3. Relations — suggest new connections
  4. Duplicates — merge or differentiate similar notes
  5. Structure — reorganize folders if needed
  6. Index — create hub notes for major topics
全面审查与优化:
  1. 审核——记录所有笔记,识别问题
  2. 孤立笔记——处理未关联的笔记
  3. 关联关系——建议新的关联
  4. 重复笔记——合并或区分相似笔记
  5. 结构调整——必要时重新组织文件夹
  6. 索引创建——为主要主题创建hub notes

Topic-Focused Organization

主题聚焦式整理

Organize around a specific subject:
  1. Find all notes related to the topic (
    search_notes
    )
  2. Map existing relations with
    build_context(url="memory://...")
  3. Identify gaps in the topic graph
  4. Suggest new notes to fill them
  5. Create a topic index note
围绕特定主题进行整理:
  1. 查找所有与该主题相关的笔记(
    search_notes
  2. 使用
    build_context(url="memory://...")
    绘制现有关系图
  3. 识别主题图谱中的空白
  4. 建议创建新笔记填补空白
  5. 创建主题索引笔记

Best Practices

最佳实践

  1. Work incrementally. Don't reorganize everything at once.
  2. Confirm before changing. Always ask before moving, merging, or editing notes.
  3. Preserve permalinks. Moving a note is fine; changing its permalink breaks inbound links.
  4. Explain suggestions. Say why a relation or merge makes sense.
  5. Respect the existing system. Enhance the user's organization — don't impose a new taxonomy.
  6. Show the graph. Use
    build_context
    to help the user see how notes connect.
  1. 逐步推进。不要一次性重新整理所有内容。
  2. 修改前确认。移动、合并或编辑笔记前务必先询问用户。
  3. 保留永久链接。移动笔记没问题,但修改永久链接会破坏入站链接。
  4. 解释建议。说明为何建议添加某个关系或合并笔记。
  5. 尊重现有体系。优化用户的组织方式——不要强加新的分类体系。
  6. 展示图谱。使用
    build_context
    帮助用户查看笔记间的关联方式。

Example Conversations

对话示例

User: "Help me organize my notes"
The assistant:
  1. Runs a health check on the knowledge base
  2. Reports: "You have 47 notes. I found 12 orphans and 3 potential duplicates."
  3. 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:
  1. Reads the API design note
  2. Searches for related content
  3. Suggests: "5 notes could relate —
    • 'REST Best Practices' →
      relates_to
    • 'Authentication Flow' →
      implements
    • 'Rate Limiting Decision' →
      extends
      Should I add any of these relations?"
User: "Are there notes on similar topics?"
The assistant:
  1. Analyzes titles and content for clusters
  2. Reports: "Possible overlaps —
    • 'Auth Flow' and 'Authentication Design' cover similar ground
    • 'DB Schema v1' and 'DB Schema v2' likely want a
      supersedes
      relation Want to review either?"
用户: "帮我整理我的笔记"
助手:
  1. 对知识库进行健康检查
  2. 报告:"您共有47篇笔记。我发现了12篇orphan notes和3篇潜在重复笔记。"
  3. 询问:"您想先处理孤立笔记的关联,还是先查看重复笔记?"
用户: "查找应该与我的API设计笔记关联的内容"
助手:
  1. 读取API设计笔记
  2. 搜索相关内容
  3. 建议:"有5篇笔记可建立关联——
    • 'REST Best Practices' →
      relates_to
    • 'Authentication Flow' →
      implements
    • 'Rate Limiting Decision' →
      extends
      是否需要添加这些关联?"
用户: "有没有主题相似的笔记?"
助手:
  1. 分析标题和内容以找出聚类
  2. 报告:"可能存在内容重叠——
    • 'Auth Flow'与'Authentication Design'内容相似
    • 'DB Schema v1'与'DB Schema v2'可能需要建立
      supersedes
      关联 是否需要查看其中任意一组?"