This commit is contained in:
jinli.yl 2026-06-22 10:05:20 +08:00
parent f1b54136d0
commit c389221b56
6 changed files with 180 additions and 172 deletions

101
README.md
View file

@ -31,7 +31,8 @@
## ✨ 核心创新
- **Memory as files**:以带 frontmatter 和 wikilink 的 Markdown 作为记忆节点,让人和 Agent 都能直接读写。
- **自进化知识库**:通过 Auto Memory、Auto Resource、Auto Dream 和 Auto Link,把对话与资料渐进加工、梦境整理为长期 Markdown 记忆,并自动构建 wikilink 关系。
- **自进化知识库**:通过 Auto Memory、Auto Resource、Auto Dream 和 Auto Link,把对话与资料渐进加工、梦境整理为长期 Markdown
记忆,并自动构建 wikilink 关系。
- **渐进式混合搜索**:构建 wikilink + BM25 + embedding 的渐进式混合搜索。
- **Agent 友好集成**:通过SKILL.md + CLI 接入,方便不同 Agent 维护和复用。
@ -49,9 +50,10 @@
> Memory as files, files as memory.
ReMe 将**记忆视为文件**,让原始对话和外部资料从 `reme_session/`、`resource/` 渐进加工到 `daily/`,再沉淀为 `digest/` 中可长期复用的知识节点。
ReMe 将**记忆视为文件**,让原始对话和外部资料从 `reme_session/`、`resource/` 渐进加工到 `daily/`,再沉淀为 `digest/`
中可长期复用的知识节点。
### Vault 目录结构
### 目录结构
```text
<vault_dir>/
@ -100,8 +102,6 @@ cd ReMe
pip install -e ".[core]"
```
`core` extra 建议安装:当前代码会导入 AgentScope wrapper,自进化记忆也依赖它。
### 环境变量
配置环境变量:
@ -137,38 +137,27 @@ curl -s http://127.0.0.1:23333/version -H 'Content-Type: application/json' -d '{
## 🔌 接入 ReMe
ReMe 不绑定具体 Agent 框架,启动服务后可以按三种方式接入:
ReMe 通过SKILL.md + cli + hook(可选)接入支持的 Agent 框架:
| 方式 | 适用场景 | 使用说明 |
|-----------------------|---------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `skill.md + cli` | 任意支持读取 skill/system prompt 的 Agent 框架 | 将 [reme_memory skill](reme/skills/reme_memory/SKILL.md) 加入 Agent,并允许 Agent 调用 `reme search/read/write/auto_memory/proactive` 等 CLI。 |
| `background` / `cron` | 索引更新、资源监听、定时 dream 等自动流程 | 执行 `reme start` 后自动运行,无需在 Agent 侧手动调用。 |
| `hook` | 需要把对话、资源或主动主题接入 Agent 生命周期的流程 | 在 Agent 框架中手动加入 `auto_memory`、`auto_resource`、`auto_dream`、`proactive` 调用点。 |
- 将 [reme_memory skill](reme/skills/reme_memory/SKILL.md) 加入 Agent,并允许 Agent 调用
`reme search/read/write/auto_memory/proactive` 等 CLI
- 在 Agent hook 加入 `auto_memory`(after reply) 调用点
QwenPaw 2.0 将会集成新版 ReMe;未来也会推出 Claude Code plugin,降低手动接入成本。
## 🧰 核心能力
## 🧰能力介绍
ReMe 的能力按运行方式分为 background、cron、hook 和 cli 四类:后台任务负责索引和监听,定时任务负责长期记忆沉淀,hook 用于接入
Agent 生命周期,cli 用于直接操作 vault。
理解 ReMe 的能力,自动记忆流程 + CLI 的方式看:
### 后台与定时任务
### 自动记忆流程
| 类型 | name | 描述 | 参数 |
|------------|-----------------------|---------------------------------------------------------------------|-----------------------------------|
| background | `index_update_loop` | 后台监听 `daily/`、`digest/`、`resource/` 中的 Markdown/JSONL 变化,并持续更新检索索引。 | 配置项:`watch_dirs`、`watch_suffixes` |
| background | `resource_watch_loop` | 后台监听 `resource/` 资料变化,更新 resource catalog,并触发资源解读。 | 配置项:`watch_dirs`、`watch_suffixes` |
| background | `digest_watch_loop` | 后台监听 `daily/` 与 `digest/` 的 Markdown 变化,更新 digest catalog 并记录变化。 | 配置项:`watch_dirs`、`watch_suffixes` |
| cron | `dream_cron` | 每天 23:00 定时执行 dream 流程:抽取长期记忆、整合 digest、生成兴趣主题并持久化 catalog。 | 配置项:`cron` |
### Agent Hook
| 类型 | name | 描述 | 参数 |
|------|---------------------------------------------|---------------------------------------------------------------|----------------------------------------------------|
| hook | [`auto_memory`](docs/zh/auto_memory.md) | 将对话消息记录并整理为 daily 记忆卡片。 | 必填:`messages`;可选:`session_id`、`memory_hint` |
| hook | [`auto_resource`](docs/zh/auto_resource.md) | 将 resource 文件变更批次解读为 daily 资源卡片。 | 必填:`changes`;每项可含 `path`、`file_path`、`change` |
| hook | [`auto_dream`](docs/zh/auto_dream.md) | 扫描当天 day-index 与 daily notes,抽取并整合长期记忆单元,写入 `interests.yaml`。 | `date`、`hint`、`topic_count`、`topic_diversity_days` |
| hook | [`proactive`](docs/zh/proactive.md) | 读取 `daily/<date>/interests.yaml`,向上层 Agent 暴露最新用户兴趣主题。 | `date`、`include_content` |
| 能力 | 运行方式 | 作用 | 主要参数 |
|---------------------------------------------|-------------------------------|---------------------------------------------------------------------------------------------------------|----------------------------------------------------|
| [`auto_index`](docs/zh/memory_search.md) | 后台维护;对应 `index_update_loop` | 启动时扫描并持续监听 `daily/`、`digest/`、`resource/` 中的 Markdown/JSONL 变化,更新 chunk、BM25、embedding 与 wikilink 图谱索引。 | 配置项:`watch_dirs`、`watch_suffixes` |
| [`auto_memory`](docs/zh/auto_memory.md) | Agent after-reply hook;也可按需调用 | 保存对话原文,并把有长期价值的信息整理成 `daily/<date>/<session_id>.md` 记忆卡片。 | 必填:`messages`;可选:`session_id`、`memory_hint` |
| [`auto_resource`](docs/zh/auto_resource.md) | 资源监听自动触发;也可按需调用 | 解读 `resource/<date>/` 下的资源变更,生成或更新同名 daily 资源卡片。 | 必填:`changes`;每项可含 `path`、`file_path`、`change` |
| [`auto_dream`](docs/zh/auto_dream.md) | 定时任务 `dream_cron`;也可按需调用 | 扫描指定日期的 daily 输入,抽取长期记忆单元并整合进 `digest/`,同时写入 `daily/<date>/interests.yaml`。 | `date`、`hint`、`topic_count`、`topic_diversity_days` |
| [`proactive`](docs/zh/proactive.md) | Agent 主动提醒前按需读取 | 读取 `auto_dream` 生成的 `interests.yaml`,把当天值得关注的主题暴露给上层 Agent;是否提醒用户由调用方决定。 | `date`、`include_content` |
<table>
<tr>
@ -181,39 +170,39 @@ Agent 生命周期,cli 用于直接操作 vault。
</tr>
<tr>
<td align="center" width="50%">
<img src="docs/figure/auto-dream.svg" alt="Auto Dream" width="100%">
<img src="docs/figure/auto-dream-and-proactive.svg" alt="Auto Dream and Proactive" width="100%">
</td>
<td align="center" width="50%">
<img src="docs/figure/memory-search.svg" alt="Memory Search" width="100%">
<img src="docs/figure/auto-index-and-memory-search.svg" alt="Auto Index and Memory Search" width="100%">
</td>
</tr>
</table>
### CLI 工具
### Vault 操作接口
| 类型 | name | 描述 | 参数 |
|-----|--------------------------------------|---------------------------------------------------------------------------|--------------------------------------------------------|
| cli | `version` | 返回 ReMe 包版本。 | 无 |
| cli | `health_check` | 返回 ReMe 组件健康检查摘要。 | 无 |
| cli | `help` | 列出已注册 jobs 及其 metadata。 | 无 |
| cli | [`search`](docs/zh/memory_search.md) | 在 vault 中执行混合检索,结合向量召回、BM25 和 RRF 融合。 | 必填:`query`;可选:`limit`、`min_score` |
| cli | `node_search` | 根据候选抽象的名称与描述,召回相似 digest 节点用于去重或关联。 | 必填:`query`;可选:`limit` |
| cli | `traverse` | 从指定路径出发遍历 wikilink 图谱。 | 必填:`path`;可选:`depth`、`direction` |
| cli | `reindex` | 清空 file store,并基于现有文件重建索引。 | 配置项:`watch_dirs`、`watch_suffixes` |
| cli | `daily_create` | 创建 daily session note:`daily/<date>/<session_id>.md` 或 `daily/<date>.md`。 | `session_id`、`date` |
| cli | `daily_list` | 列出某一天的 notes。 | `date` |
| cli | `daily_reindex` | 重建 day-index 页面 `daily/<date>.md`。 | `date` |
| cli | `frontmatter_read` | 读取文件 frontmatter。 | 必填:`path` |
| cli | `frontmatter_update` | 合并 key-values 到文件 frontmatter。 | 必填:`path`、`metadata` |
| cli | `frontmatter_delete` | 删除文件 frontmatter 中的指定 keys。 | 必填:`path`、`keys` |
| cli | `stat` | 获取 vault 路径状态,包括大小、mtime、是否存在、是否目录或文件。 | 必填:`path` |
| cli | `list` | 列出 vault 路径下的文件。 | `path`、`recursive`、`limit` |
| cli | `read` | 读取 vault 下的 Markdown 文件。 | 必填:`path`;可选:`start_line`、`end_line` |
| cli | `read_image` | 读取 vault 下的图片文件并返回 base64。 | 必填:`path` |
| cli | `write` | 创建或覆盖 Markdown 文件,并写入 name/description frontmatter。 | 必填:`path`、`name`、`description`、`content`;可选:`metadata` |
| cli | `edit` | 对 Markdown 文件执行全文 find-and-replace。 | 必填:`path`、`old`、`new` |
| cli | `move` | 移动或重命名 vault 文件,并默认重写入站 wikilink。 | 必填:`src_path`、`dst_path`;可选:`overwrite`、`retarget` |
| cli | `delete` | 删除 vault 文件或文件夹,并返回仍存在的入站 wikilink。 | 必填:`path` |
| 分类 | name | 描述 | 参数 |
|-------|--------------------------------------|---------------------------------------------------------------------------|--------------------------------------------------------|
| 系统状态 | `version` | 返回 ReMe 包版本。 | 无 |
| 系统状态 | `health_check` | 返回 ReMe 组件健康检查摘要。 | 无 |
| 系统状态 | `help` | 列出已注册 jobs 及其 metadata。 | 无 |
| 检索读取 | [`search`](docs/zh/memory_search.md) | 在 vault 中执行混合检索,结合向量召回、BM25 和 RRF 融合。 | 必填:`query`;可选:`limit`、`min_score` |
| 检索读取 | `node_search` | 根据候选抽象的名称与描述召回相似 digest 节点,主要用于 `auto_dream` 去重或关联。 | 必填:`query`;可选:`limit` |
| 检索读取 | `traverse` | 从指定路径出发遍历 wikilink 图谱。 | 必填:`path`;可选:`depth`、`direction` |
| 检索读取 | `read` | 读取 vault 下的 Markdown 文件。 | 必填:`path`;可选:`start_line`、`end_line` |
| 检索读取 | `read_image` | 读取 vault 下的图片文件并返回 base64。 | 必填:`path` |
| 索引维护 | `reindex` | 清空 file store,并基于现有文件重建索引。 | 配置项:`watch_dirs`、`watch_suffixes` |
| Daily | `daily_create` | 创建 daily session note:`daily/<date>/<session_id>.md` 或 `daily/<date>.md`。 | `session_id`、`date` |
| Daily | `daily_list` | 列出某一天的 notes。 | `date` |
| Daily | `daily_reindex` | 重建 day-index 页面 `daily/<date>.md`。 | `date` |
| 元数据 | `frontmatter_read` | 读取文件 frontmatter。 | 必填:`path` |
| 元数据 | `frontmatter_update` | 合并 key-values 到文件 frontmatter。 | 必填:`path`、`metadata` |
| 元数据 | `frontmatter_delete` | 删除文件 frontmatter 中的指定 keys。 | 必填:`path`、`keys` |
| 文件操作 | `stat` | 获取 vault 路径状态,包括大小、mtime、是否存在、是否目录或文件。 | 必填:`path` |
| 文件操作 | `list` | 列出 vault 路径下的文件。 | `path`、`recursive`、`limit` |
| 文件操作 | `write` | 创建或覆盖 Markdown 文件,并写入 name/description frontmatter。 | 必填:`path`、`name`、`description`、`content`;可选:`metadata` |
| 文件操作 | `edit` | 对 Markdown 文件执行全文 find-and-replace。 | 必填:`path`、`old`、`new` |
| 文件操作 | `move` | 移动或重命名 vault 文件,并默认重写入站 wikilink。 | 必填:`src_path`、`dst_path`;可选:`overwrite`、`retarget` |
| 文件操作 | `delete` | 删除 vault 文件或文件夹,并返回仍存在的入站 wikilink。 | 必填:`path` |
## 🤝 社区与支持

View file

@ -0,0 +1,129 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="680" viewBox="0 0 1200 680" role="img" aria-labelledby="title desc">
<title id="title">ReMe auto dream and proactive flow</title>
<desc id="desc">A left-to-right flow from changed daily notes to digest integration, interest topic writing, catalog checkpointing, and proactive reads.</desc>
<defs>
<style>
.bg { fill: #f7f8fb; }
.title { font: 700 28px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #172033; }
.subtitle { font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #607086; }
.step-num { font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #ffffff; }
.step-title { font: 700 18px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #172033; }
.step-subtitle { font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #607086; }
.chip-title { font: 700 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #253246; }
.chip-text { font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #627087; }
.note { font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #5d6a7d; }
.panel { fill: #ffffff; stroke: #d7dde7; stroke-width: 1.2; rx: 10; ry: 10; }
.chip { fill: #f9fafc; stroke: #dfe5ee; stroke-width: 1; rx: 8; ry: 8; }
.badge { fill: #44546a; }
.arrow { stroke: #8794a8; stroke-width: 2; fill: none; marker-end: url(#arrow); }
.soft-arrow { stroke: #a3adbd; stroke-width: 1.6; stroke-dasharray: 5 5; fill: none; marker-end: url(#arrow-soft); }
.line { stroke: #e1e6ee; stroke-width: 1; }
</style>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L8,3 z" fill="#8794a8"/>
</marker>
<marker id="arrow-soft" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L8,3 z" fill="#a3adbd"/>
</marker>
</defs>
<rect class="bg" x="0" y="0" width="1200" height="680"/>
<text class="title" x="600" y="54" text-anchor="middle">Auto Dream and Proactive</text>
<text class="subtitle" x="600" y="80" text-anchor="middle">Scan changed daily memory, integrate reusable units into digest, then expose proactive topics.</text>
<rect class="panel" x="38" y="132" width="196" height="300"/>
<circle class="badge" cx="72" cy="170" r="15"/>
<text class="step-num" x="72" y="174" text-anchor="middle">1</text>
<text class="step-title" x="100" y="176">Extract</text>
<text class="step-subtitle" x="66" y="206">dream_extract_step</text>
<rect class="chip" x="66" y="232" width="140" height="44"/>
<text class="chip-title" x="136" y="251" text-anchor="middle">refresh index</text>
<text class="chip-text" x="136" y="269" text-anchor="middle">daily/&lt;date&gt;.md</text>
<rect class="chip" x="66" y="296" width="140" height="44"/>
<text class="chip-title" x="136" y="315" text-anchor="middle">compare catalog</text>
<text class="chip-text" x="136" y="333" text-anchor="middle">changed daily</text>
<rect class="chip" x="66" y="360" width="140" height="44"/>
<text class="chip-title" x="136" y="379" text-anchor="middle">LLM extract</text>
<text class="chip-text" x="136" y="397" text-anchor="middle">units + topics</text>
<rect class="panel" x="270" y="132" width="196" height="300"/>
<circle class="badge" cx="304" cy="170" r="15"/>
<text class="step-num" x="304" y="174" text-anchor="middle">2</text>
<text class="step-title" x="332" y="176">Integrate</text>
<text class="step-subtitle" x="298" y="206">dream_integrate_step</text>
<rect class="chip" x="298" y="232" width="140" height="44"/>
<text class="chip-title" x="368" y="251" text-anchor="middle">node_search</text>
<text class="chip-text" x="368" y="269" text-anchor="middle">recall digest</text>
<rect class="chip" x="298" y="296" width="140" height="44"/>
<text class="chip-title" x="368" y="315" text-anchor="middle">auto link</text>
<text class="chip-text" x="368" y="333" text-anchor="middle">dedup + links</text>
<rect class="chip" x="298" y="360" width="140" height="44"/>
<text class="chip-title" x="368" y="379" text-anchor="middle">write digest</text>
<text class="chip-text" x="368" y="397" text-anchor="middle">create / update</text>
<rect class="panel" x="502" y="132" width="196" height="300"/>
<circle class="badge" cx="536" cy="170" r="15"/>
<text class="step-num" x="536" y="174" text-anchor="middle">3</text>
<text class="step-title" x="564" y="176">Topics</text>
<text class="step-subtitle" x="530" y="206">dream_topics_step</text>
<rect class="chip" x="530" y="232" width="140" height="44"/>
<text class="chip-title" x="600" y="251" text-anchor="middle">merge topics</text>
<text class="chip-text" x="600" y="269" text-anchor="middle">same day kept</text>
<rect class="chip" x="530" y="296" width="140" height="44"/>
<text class="chip-title" x="600" y="315" text-anchor="middle">avoid repeats</text>
<text class="chip-text" x="600" y="333" text-anchor="middle">last 7 days</text>
<rect class="chip" x="530" y="360" width="140" height="44"/>
<text class="chip-title" x="600" y="379" text-anchor="middle">write YAML</text>
<text class="chip-text" x="600" y="397" text-anchor="middle">interests.yaml</text>
<rect class="panel" x="734" y="132" width="196" height="300"/>
<circle class="badge" cx="768" cy="170" r="15"/>
<text class="step-num" x="768" y="174" text-anchor="middle">4</text>
<text class="step-title" x="796" y="176">Finish</text>
<text class="step-subtitle" x="762" y="206">dream_finish_step</text>
<rect class="chip" x="762" y="232" width="140" height="44"/>
<text class="chip-title" x="832" y="251" text-anchor="middle">checkpoint</text>
<text class="chip-text" x="832" y="269" text-anchor="middle">skip failures</text>
<rect class="chip" x="762" y="296" width="140" height="44"/>
<text class="chip-title" x="832" y="315" text-anchor="middle">persist catalog</text>
<text class="chip-text" x="832" y="333" text-anchor="middle">file_catalog</text>
<rect class="chip" x="762" y="360" width="140" height="44"/>
<text class="chip-title" x="832" y="379" text-anchor="middle">return summary</text>
<text class="chip-text" x="832" y="397" text-anchor="middle">counts + errors</text>
<rect class="panel" x="966" y="132" width="196" height="300"/>
<circle class="badge" cx="1000" cy="170" r="15"/>
<text class="step-num" x="1000" y="174" text-anchor="middle">5</text>
<text class="step-title" x="1028" y="176">Proactive</text>
<text class="step-subtitle" x="994" y="206">proactive_step</text>
<rect class="chip" x="994" y="232" width="140" height="44"/>
<text class="chip-title" x="1064" y="251" text-anchor="middle">read YAML</text>
<text class="chip-text" x="1064" y="269" text-anchor="middle">interests.yaml</text>
<rect class="chip" x="994" y="296" width="140" height="44"/>
<text class="chip-title" x="1064" y="315" text-anchor="middle">return topics</text>
<text class="chip-text" x="1064" y="333" text-anchor="middle">metadata</text>
<rect class="chip" x="994" y="360" width="140" height="44"/>
<text class="chip-title" x="1064" y="379" text-anchor="middle">agent decides</text>
<text class="chip-text" x="1064" y="397" text-anchor="middle">whether to notify</text>
<path class="arrow" d="M234 282 H270"/>
<path class="arrow" d="M466 282 H502"/>
<path class="arrow" d="M698 282 H734"/>
<path class="arrow" d="M930 282 H966"/>
<rect class="panel" x="80" y="502" width="1040" height="82"/>
<text class="note" x="126" y="532">Inputs</text>
<text class="chip-text" x="126" y="554">daily/&lt;date&gt;.md and daily/&lt;date&gt;/**/*.md</text>
<line class="line" x1="358" y1="518" x2="358" y2="566"/>
<text class="chip-title" x="402" y="532">Long-term memory</text>
<text class="chip-text" x="402" y="554">digest/procedure, digest/personal, digest/wiki</text>
<line class="line" x1="704" y1="518" x2="704" y2="566"/>
<text class="chip-title" x="748" y="532">Proactive material</text>
<text class="chip-text" x="748" y="554">daily/&lt;date&gt;/interests.yaml</text>
<line class="line" x1="942" y1="518" x2="942" y2="566"/>
<text class="chip-title" x="986" y="532">Boundary</text>
<text class="chip-text" x="986" y="554">Read only; caller decides.</text>
<path class="soft-arrow" d="M1064 432 C1064 476 600 472 600 432"/>
<text class="note" x="834" y="474" text-anchor="middle">proactive reads interests.yaml after auto_dream writes it</text>
</svg>

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

@ -1,110 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="680" viewBox="0 0 1200 680" role="img" aria-labelledby="title desc">
<title id="title">ReMe auto dream flow</title>
<desc id="desc">A left-to-right auto dream flow from changed daily notes to digest integration, interest topic writing, catalog checkpointing, and proactive reads.</desc>
<defs>
<style>
.bg { fill: #f7f8fb; }
.title { font: 700 28px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #172033; }
.subtitle { font: 14px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #607086; }
.step-num { font: 700 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #ffffff; }
.step-title { font: 700 18px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #172033; }
.step-subtitle { font: 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #607086; }
.chip-title { font: 700 13px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #253246; }
.chip-text { font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #627087; }
.note { font: 12px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; fill: #5d6a7d; }
.panel { fill: #ffffff; stroke: #d7dde7; stroke-width: 1.2; rx: 10; ry: 10; }
.chip { fill: #f9fafc; stroke: #dfe5ee; stroke-width: 1; rx: 8; ry: 8; }
.badge { fill: #44546a; }
.arrow { stroke: #8794a8; stroke-width: 2; fill: none; marker-end: url(#arrow); }
.soft-arrow { stroke: #a3adbd; stroke-width: 1.6; stroke-dasharray: 5 5; fill: none; marker-end: url(#arrow-soft); }
.line { stroke: #e1e6ee; stroke-width: 1; }
</style>
<marker id="arrow" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L8,3 z" fill="#8794a8"/>
</marker>
<marker id="arrow-soft" markerWidth="10" markerHeight="10" refX="8" refY="3" orient="auto" markerUnits="strokeWidth">
<path d="M0,0 L0,6 L8,3 z" fill="#a3adbd"/>
</marker>
</defs>
<rect class="bg" x="0" y="0" width="1200" height="680"/>
<text class="title" x="600" y="54" text-anchor="middle">Auto Dream</text>
<text class="subtitle" x="600" y="80" text-anchor="middle">Scan changed daily memory, integrate reusable units into digest, then expose fresh proactive topics.</text>
<rect class="panel" x="54" y="132" width="224" height="300"/>
<circle class="badge" cx="88" cy="170" r="15"/>
<text class="step-num" x="88" y="174" text-anchor="middle">1</text>
<text class="step-title" x="116" y="176">Extract</text>
<text class="step-subtitle" x="82" y="206">dream_extract_step</text>
<rect class="chip" x="82" y="232" width="168" height="44"/>
<text class="chip-title" x="166" y="251" text-anchor="middle">refresh day index</text>
<text class="chip-text" x="166" y="269" text-anchor="middle">daily/&lt;date&gt;.md</text>
<rect class="chip" x="82" y="296" width="168" height="44"/>
<text class="chip-title" x="166" y="315" text-anchor="middle">compare catalog</text>
<text class="chip-text" x="166" y="333" text-anchor="middle">changed daily markdown</text>
<rect class="chip" x="82" y="360" width="168" height="44"/>
<text class="chip-title" x="166" y="379" text-anchor="middle">LLM extract</text>
<text class="chip-text" x="166" y="397" text-anchor="middle">units + topic candidates</text>
<rect class="panel" x="326" y="132" width="224" height="300"/>
<circle class="badge" cx="360" cy="170" r="15"/>
<text class="step-num" x="360" y="174" text-anchor="middle">2</text>
<text class="step-title" x="388" y="176">Integrate</text>
<text class="step-subtitle" x="354" y="206">dream_integrate_step</text>
<rect class="chip" x="354" y="232" width="168" height="44"/>
<text class="chip-title" x="438" y="251" text-anchor="middle">node_search</text>
<text class="chip-text" x="438" y="269" text-anchor="middle">recall digest nodes</text>
<rect class="chip" x="354" y="296" width="168" height="44"/>
<text class="chip-title" x="438" y="315" text-anchor="middle">auto link</text>
<text class="chip-text" x="438" y="333" text-anchor="middle">dedup + wikilinks</text>
<rect class="chip" x="354" y="360" width="168" height="44"/>
<text class="chip-title" x="438" y="379" text-anchor="middle">write digest</text>
<text class="chip-text" x="438" y="397" text-anchor="middle">create / update nodes</text>
<rect class="panel" x="598" y="132" width="224" height="300"/>
<circle class="badge" cx="632" cy="170" r="15"/>
<text class="step-num" x="632" y="174" text-anchor="middle">3</text>
<text class="step-title" x="660" y="176">Topics</text>
<text class="step-subtitle" x="626" y="206">dream_topics_step</text>
<rect class="chip" x="626" y="232" width="168" height="44"/>
<text class="chip-title" x="710" y="251" text-anchor="middle">merge candidates</text>
<text class="chip-text" x="710" y="269" text-anchor="middle">same-day topics kept</text>
<rect class="chip" x="626" y="296" width="168" height="44"/>
<text class="chip-title" x="710" y="315" text-anchor="middle">avoid repeats</text>
<text class="chip-text" x="710" y="333" text-anchor="middle">last 7 days by default</text>
<rect class="chip" x="626" y="360" width="168" height="44"/>
<text class="chip-title" x="710" y="379" text-anchor="middle">write interests.yaml</text>
<text class="chip-text" x="710" y="397" text-anchor="middle">top 3 by default</text>
<rect class="panel" x="870" y="132" width="224" height="300"/>
<circle class="badge" cx="904" cy="170" r="15"/>
<text class="step-num" x="904" y="174" text-anchor="middle">4</text>
<text class="step-title" x="932" y="176">Finish</text>
<text class="step-subtitle" x="898" y="206">dream_finish_step</text>
<rect class="chip" x="898" y="232" width="168" height="44"/>
<text class="chip-title" x="982" y="251" text-anchor="middle">checkpoint paths</text>
<text class="chip-text" x="982" y="269" text-anchor="middle">skip failed inputs</text>
<rect class="chip" x="898" y="296" width="168" height="44"/>
<text class="chip-title" x="982" y="315" text-anchor="middle">persist catalog</text>
<text class="chip-text" x="982" y="333" text-anchor="middle">file_catalog: dream</text>
<rect class="chip" x="898" y="360" width="168" height="44"/>
<text class="chip-title" x="982" y="379" text-anchor="middle">return summary</text>
<text class="chip-text" x="982" y="397" text-anchor="middle">counts + errors</text>
<path class="arrow" d="M278 282 H326"/>
<path class="arrow" d="M550 282 H598"/>
<path class="arrow" d="M822 282 H870"/>
<rect class="panel" x="126" y="502" width="948" height="82"/>
<text class="note" x="176" y="532">Inputs</text>
<text class="chip-text" x="176" y="554">daily/&lt;date&gt;.md and daily/&lt;date&gt;/**/*.md</text>
<line class="line" x1="404" y1="518" x2="404" y2="566"/>
<text class="chip-title" x="448" y="532">Long-term memory</text>
<text class="chip-text" x="448" y="554">digest/procedure, digest/personal, digest/wiki</text>
<line class="line" x1="744" y1="518" x2="744" y2="566"/>
<text class="chip-title" x="786" y="532">Proactive output</text>
<text class="chip-text" x="786" y="554">daily/&lt;date&gt;/interests.yaml</text>
<path class="soft-arrow" d="M982 432 C982 476 710 472 710 432"/>
<text class="note" x="850" y="474" text-anchor="middle">proactive reads interests.yaml after auto_dream writes it</text>
</svg>

Before

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -1,6 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="640" viewBox="0 0 1200 640" role="img" aria-labelledby="title desc">
<title id="title">ReMe memory search flow</title>
<desc id="desc">A concise left-to-right memory search flow from watched vault files to progressive link expansion.</desc>
<title id="title">ReMe auto index and memory search flow</title>
<desc id="desc">A concise left-to-right flow from automatic vault indexing to memory search and progressive link expansion.</desc>
<defs>
<style>
.bg { fill: #f7f8fb; }
@ -28,8 +28,8 @@
</defs>
<rect class="bg" x="0" y="0" width="1200" height="640"/>
<text class="title" x="600" y="54" text-anchor="middle">Memory Search</text>
<text class="subtitle" x="600" y="80" text-anchor="middle">Index file changes continuously, recall relevant chunks, then expand nearby wikilink context.</text>
<text class="title" x="600" y="54" text-anchor="middle">Auto Index and Memory Search</text>
<text class="subtitle" x="600" y="80" text-anchor="middle">Keep vault indexes fresh, recall relevant chunks, then expand nearby wikilink context.</text>
<rect class="panel" x="64" y="150" width="232" height="260"/>
<circle class="badge" cx="100" cy="188" r="15"/>

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

@ -4,7 +4,7 @@
发生变化的文件,把值得长期保留的内容抽取成 memory units,整合进 `digest/`,再生成当天可供主动提醒使用的 `interests.yaml`。
<p align="center">
<img src="../figure/auto-dream.svg" alt="ReMe Auto Dream 从 daily 到 digest 的长期记忆沉淀流程" width="92%">
<img src="../figure/auto-dream-and-proactive.svg" alt="ReMe Auto Dream and Proactive 从 daily 到 digest 再到 proactive 的流程" width="92%">
</p>
它消费的 daily 输入通常来自 [Auto Memory](./auto_memory.md) 和 [Auto Resource](./auto_resource.md)。`digest/`、`derived_from::`

View file

@ -4,7 +4,7 @@ Memory Search 是 ReMe 的记忆检索入口。它先把 `daily/`、`digest/`、
wikilink 图谱;查询时先召回最相关的片段,再沿着片段所在文件的双向链接展开上下文。
<p align="center">
<img src="../figure/memory-search.svg" alt="ReMe Memory Search 索引、召回、融合与链接展开流程" width="92%">
<img src="../figure/auto-index-and-memory-search.svg" alt="ReMe Auto Index and Memory Search 索引、召回、融合与链接展开流程" width="92%">
</p>
文件分层、frontmatter、wikilink 和 chunking 的通用语义见 [Memory as File](./memory_as_file.md)。这里重点说明索引维护和查询执行。