介绍
# PARA Second Brain
您的代理(Agent)刚刚获得了一次巨大的内存升级。它可以对整个知识库进行完整的语义搜索——而不仅仅是 MEMORY.md。
## v2.0 的新功能
**v2.0 之前:** `memory_search` 只能找到 MEMORY.md 和每日日志中的内容。您的整个 `notes/` 文件夹对搜索来说是不可见的。您必须手动知道去哪里查找。
**v2.0 之后:** 只需一个符号链接命令,就能让您整个 PARA 知识库变得可搜索。询问关于笔记中的任何内容——它都能找到。此外,还有会话转录记录和内存刷新协议,以防止上下文丢失。
| 之前 | 之后 | |--------|-------| | 仅搜索 MEMORY.md + 每日日志 | 搜索所有内容 | | “我没有该信息” | 瞬间找到 | | 上下文压缩 = 信息丢失 | 刷新协议保存关键上下文 | | 对话被遗忘 | 会话转录记录被索引 |
## 此功能的作用
创建一个“第二大脑”结构,将以下内容区分开来: - **原始捕捉**(每日日志)与**精选知识**(MEMORY.md) - **当前工作**(项目)与**持续职责**(领域) - **参考资料**(资源)与**已完成的工作**(归档)
## 它与其他第二大脑技能的区别
还有另一个流行的由 Ensue 驱动的 [second-brain skill](https://clawdhub.com/christinetyip/second-brain)。两者都很棒——它们解决的问题不同:
| | **PARA 第二大脑**(本技能) | **Ensue 第二大脑** | |---|---|---| | **存储** | 工作区中的本地文件 | 云 API (Ensue) | | **成本** | 免费,自托管 | 需要 Ensue API 密钥 | | **最适合** | 工作上下文、代理连续性、项目跟踪 | 常青知识库、语义查询 | | **搜索** | Clawdbot 的 `memory_search` | Ensue 的向量搜索 | | **结构** | PARA (项目/领域/资源/归档) | 命名空间 (concepts/toolbox/patterns) | | **用例** | “昨天我们决定了什么?” | “递归是如何工作的?” |
**如果您:** 想要基于文件的内存,可以离线工作,零成本,并跟踪正在进行的工作上下文,请使用此技能。
**如果您:** 想要一个针对语义“关于 X 我知道什么”查询优化的云端知识库,请使用 Ensue 的技能。
**如果您:** 想要将 PARA 用于工作上下文,将 Ensue 用于常青知识,请两者都使用。它们相辅相成。
## 快速设置
### 1. 创建目录结构
``` workspace/ ├── MEMORY.md # Curated long-term memory ├── memory/ │ └── YYYY-MM-DD.md # Daily raw logs └── notes/ ├── projects/ # Active work with end dates ├── areas/ # Ongoing life responsibilities ├── resources/ # Reference material │ └── templates/ # Content templates └── archive/ # Completed/inactive items ```
运行此命令以搭建脚手架: ```bash mkdir -p memory notes/projects notes/areas notes/resources/templates notes/archive ```
### 2. 使笔记可搜索(符号链接技巧)
默认情况下,`memory_search` 仅索引 `MEMORY.md` 和 `memory/*.md`。您的整个 `notes/` 文件夹对语义搜索是不可见的!
**用一条命令修复此问题:** ```bash ln -s /path/to/your/workspace/notes /path/to/your/workspace/memory/notes ```
示例: ```bash ln -s /Users/yourname/clawd/notes /Users/yourname/clawd/memory/notes ```
**作用:** 创建一个符号链接,使 `memory/notes/` 指向您实际的 `notes/` 文件夹。现在 Clawdbot 的 memory_search 可以看到您所有的 PARA 笔记。
**验证是否有效:** ```bash ls -la memory/notes # Should show: memory/notes -> /path/to/notes ```
**测试搜索:** 问您的代理一个存在于笔记中但不存在于 MEMORY.md 中的问题。如果它找到了,说明符号链接正在工作。
**为什么这很重要:** | 之前 | 之后 | |--------|-------| | 搜索只能找到 MEMORY.md + 每日日志 | 搜索能找到您的所有笔记 | | 必须手动知道去哪里查找 | 对所有内容进行语义搜索 | | “我没有该信息” | 找到您忘记存在的联系 |
### 3. 启用会话转录记录索引
让您过去的对话也可搜索。将此添加到您的 Clawdbot 配置中:
```json "memorySearch": { "sources": ["memory", "sessions"], "query": { "minScore": 0.3, "maxResults": 20 } } ```
**作用:** 将您的对话转录记录与笔记一起索引。现在,当您问“上周我们关于 X 讨论了什么?”时——它实际上可以找到它。
### 4. 初始化 MEMORY.md
在工作区根目录创建 `MEMORY.md`——这是您精选的长期记忆:
```markdown # MEMORY.md — Long-Term Memory
## About [Human's Name] - Role/occupation - Key goals and motivations - Communication preferences - Important relationships
## Active Context - Current focus areas - Ongoing projects (summaries, not details) - Deadlines or time-sensitive items
## Preferences & Patterns - Tools and workflows they prefer - Decision-making style - Pet peeves and likes
## Lessons Learned - What worked - What didn't - Principles discovered
## Key Dates - Birthdays, anniversaries - Recurring events - Important milestones ```
### 5. 添加到 AGENTS.md
将这些说明添加到您的 AGENTS.md:
```markdown ## Memory
You wake up fresh each session. These files are your continuity: - **Daily notes:** `memory/YYYY-MM-DD.md` — raw logs of what happened - **Long-term:** `MEMORY.md` — curated memories (like human long-term memory) - **Topic notes:** `notes/` — organized by PARA structure (all searchable via memory_search)
### Writing Rules - If it has future value, write it down NOW - Don't rely on "mental notes" — they don't survive restarts - Text > Brain 📝
### PARA Structure - **Projects** (`notes/projects/`) — Active work with end dates - **Areas** (`notes/areas/`) — Ongoing responsibilities (health, finances, relationships) - **Resources** (`notes/resources/`) — Reference material, how-tos, research - **Archive** (`notes/archive/`) — Completed or inactive items
### Memory Flush Protocol Monitor your context usage with `session_status`. Before compaction wipes your memory, flush important context to files:
| Context % | Action | |-----------|--------| | < 50% | Normal operation | | 50-70% | Write key points after substantial exchanges | | 70-85% | Active flushing — write everything important NOW | | > 85% | Emergency flush — full summary before next response | | After compaction | Note what context may have been lost |
**The rule:** Act on thresholds, not vibes. If it's important, write it down NOW. ```
## 内存刷新协议(关键!)
您代理的上下文窗口是有限的。当它填满时,旧的上下文会被压缩或丢失。**不要丢失重要信息。**
### 如何监控
定期运行 `session_status`。查找: ``` 📚 Context: 36k/200k (18%) · 🧹 Compactions: 0 ```
### 基于阈值的操作
| 上下文 % | 操作 | |-----------|------------| | **< 50%** | 正常操作。实时记录决策。 | | **50-70%** | 提高警惕。每次实质性交流后记录关键点。 | | **70-85%** | 主动刷新。立即将所有重要内容写入每日笔记。 | | **> 85%** | 紧急刷新。停止并在回复前编写完整的上下文摘要。 | | **压缩后** | 立即记录可能丢失了哪些上下文。检查连续性。 |
### 刷新什么 1. **做出的决策**——决定了什么以及为什么 2. **行动项**——谁在做什么 3. **开放线索**——任何未完成的内容 → `notes/areas/open-loops.md` 4. **工作变更**——如果您讨论了文件的更改,立即执行
### 内存刷新检查清单
在长会话结束或上下文变高之前: - [ ] 关键决策已记录? - [ ] 行动项已捕捉? - [ ] 新学到的知识已写入相应文件? - [ ] 开放线索已记录以便跟进? - [ ] 未来的我能仅凭笔记继续此对话吗?
## 知识质量
**核心问题:**“未来的我会因此感谢我吗?”
### 保存什么 - 您真正理解的概念(不是一知半解的想法) - 您实际使用过的工具(不仅仅是听说的) - 行之有效的模式(附带具体示例) - 从错误中吸取的教训
### 不保存什么 - 一知半解的概念(先学习,后保存) - 您尚未尝试过的工具(书签 ≠ 知识) - 没有“为什么”的浅显条目 - 现有笔记的重复
### 质量关卡 在保存任何精选笔记之前: 1. 是否为忘记上下文的未来自己所写? 2. 是否包含“为什么”,而不仅仅是“是什么”? 3. 是否有具体示例或关键洞察? 4. 是否结构化以便于检索(易于扫读)?
## 内容模板
使用这些模板在 `notes/resources/` 中创建结构化、高质量的条目:
### 概念模板 ```markdown # [CONCEPT NAME]
## What It Is [One-line definition]
## Why It Matters [What problem it solves, when you'd need it]
## How It Works [Explanation with examples]
## Key Insight [The "aha" moment — what makes this click] ```
### 工具模板 ```markdown # [TOOL NAME]
**Category:** [devtools | productivity | etc.]
## What It Does [Brief description]
## Why I Use It [What problem it solved for YOU]
## When to Reach For It [Scenarios where this is the right choice]
## Gotchas - [Things that tripped you up] ```
### 模式模板 ```markdown # [PATTERN NAME]
## Problem [What situation triggers this pattern]
## Solution [The approach]
## Trade-offs **Pros:** [Why this works] **Cons:** [When NOT to use it] ```
## PARA 解释
PARA 是由《打造第二大脑》作者 [Tiago Forte](https://fortelabs.com/) 创建的知识组织系统。它根据可操作性将所有内容组织为四个类别:
### 项目 **是什么:** 有截止日期或结束状态的工作 **示例:** “上线网站”、“计划日本之旅”、“完成客户提案” **归档为:** `notes/projects/website-launch.md`
### 领域 **是什么:** 没有结束日期的持续职责 **示例:** 健康、财务、人际关系、职业发展 **归档为:** `notes/areas/health.md`、`notes/areas/dating.md`
### 资源 **是什么:** 供将来使用的参考资料 **示例:** 研究、教程、模板、有趣的文章 **归档为:** `notes/resources/tax-guide.md`、`notes/resources/api-docs.md`
### 归档 **是什么:** 来自其他类别的非活动项目 **示例:** 已完成的项目、过时的资源、暂停的领域 **移动到:** 完成后移至 `notes/archive/`
## 每日日志格式
为每天创建 `memory/YYYY-MM-DD.md`:
```markdown # YYYY-MM-DD
## Key Events - [What happened, decisions made]
## Learnings - [What worked, what didn't]
## Open Threads - [Carry-forward items] ```
## 精选工作流
### 每日(5 分钟) - 将值得注意的事件记录到 `memory/YYYY-MM-DD.md` - 将特定主题的笔记归档到相应的 `notes/` 文件夹
### 每周(15 分钟) - 回顾本周的每日日志 - 提取模式和学习内容到 MEMORY.md - 将已完成的项目移至归档
### 每月(30 分钟) - 检查 MEMORY.md 中的过时信息 - 合并或归档旧的项目笔记 - 确保“领域”反映当前的优先事项
## 决策树:这该放哪里?
``` Is it about today specifically? → memory/YYYY-MM-DD.md
Is it a task with an end date? → notes/projects/
Is it an ongoing responsibility? → notes/areas/
Is it reference material for later? → notes/resources/
Is it done or no longer relevant? → notes/archive/
Is it a distilled lesson or preference? → MEMORY.md ```
## 为什么需要两个记忆层?
| 每日日志 | MEMORY.md | |------------|-----------| | 原始,带时间戳 | 精选,有条理 | | 捕捉一切 | 仅重要内容 | | 按时间顺序 | 按主题 | | 高量级 | 精简 | | “发生了什么” | “我学到了什么” |
每日日志是您的日记。MEMORY.md 是您的智慧。
## 原则
1. **质量胜于数量**——精选笔记胜过囤积笔记 2. **快速捕捉,深思熟虑地精选**——每日日志是松散的;精选笔记是高质量的 3. **文字 > 大脑**——如果重要,就写下来 4. **未来的我测试**——“未来的我会因此感谢我吗?” 5. **每项物品一个家**——不要重复;改为链接 6. **包含“为什么”**——没有上下文的事实是无用的 7. **在丢失之前刷新**——监控上下文,在压缩之前写入
---
*此技能与用于技术配置的 [memory-setup](https://clawdhub.com/jrbobbyhansen-pixel/memory-setup) 以及用于行为模式的 [proactive-agent](https://clawdhub.com/halthelobster/proactive-agent) 搭配使用效果更佳。*