open-memex 0.4.0-alpha.7 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md CHANGED
@@ -31,6 +31,11 @@ npm run typecheck # tsc --noEmit — the only
31
31
  npm run cli -- where | list | search "q" | add ... | forget <id> | reindex
32
32
  npm run cli -- <command> --help # per-command help (AI assistants discover flags this way)
33
33
  npm run cli -- sync-status # last sync time/kind + outbox drafts + repo review states + uncommitted files
34
+ npm run cli -- pull # fetch + fast-forward only (explicit; diverged = clean failure, never force-merge)
35
+ npm run cli -- push # push current branch to remote (explicit only; open-memex never auto-pushes)
36
+ npm run cli -- export [--scope project|personal|both] [--all] [-o <file>] # portable .tar.gz bundle (markdown + manifest); private excluded unless --all
37
+ npm run cli -- import <bundle.tar.gz> [--dry-run] # restore: personal → personal dir, project → outbox re-keyed; conflicts reported, never overwritten
38
+ npm run cli -- distill-agents [--type t1,t2] [-o <file>] # propose an AGENTS.md snippet from project memories (assist only; you merge by hand)
34
39
  npm run cli -- submit <id...> [--branch <name>] [--base <branch>] # drafts → .ai/open-memex/ (current branch + local commit; never auto-branches)
35
40
  npm run cli -- propose <id...> --to project [--local-approve] # copy personal → project outbox (batch OK)
36
41
  npm run cli -- promote <id> [--reject] [--resubmit] [--note "..."] # proposed → approved → published (audit trail appended)
package/README.md CHANGED
@@ -1,15 +1,77 @@
1
1
  # open-memex
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/open-memex.svg)](https://www.npmjs.com/package/open-memex)
4
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
5
+
3
6
  [中文文档](./README.zh-CN.md)
4
7
 
5
8
  Local-first persistent memory for AI coding agents: an [opencode](https://opencode.ai) plugin
6
9
  plus a generic MCP server (VS Code Copilot, Cursor, Claude Code, Visual Studio, …).
7
10
 
11
+ ## Why open-memex?
12
+
13
+ Engineering knowledge lives in two places: the code, and people's heads.
14
+ Every new AI coding session starts from zero — the same project context gets
15
+ explained again, the same gotchas get rediscovered, the same incident lessons
16
+ fade when the chat ends.
17
+
18
+ open-memex captures the part worth remembering — the decision, the constraint,
19
+ the lesson — as reviewable Markdown, and injects it back into the next session
20
+ automatically.
21
+
22
+ > No capture, nothing to inherit.
23
+
24
+ It also complements agentic development workflows (spec-driven development,
25
+ plan/implement/verify loops): plans produce decisions, verification produces
26
+ rules — open-memex is the memory layer that keeps them across sessions instead
27
+ of re-deriving them on every run.
28
+
29
+ ## How it compares
30
+
31
+ | | open-memex | Cloud memory services | Wiki / docs portal | Chat history |
32
+ |---|---|---|---|---|
33
+ | Data location | Your machine + your repos | Vendor servers | Central server | Gone when the chat ends |
34
+ | Review before sharing | Yes — outbox + PR | Varies | Yes | No |
35
+ | Agent recall | Session-start injection + search | API calls | Manual lookup | No |
36
+ | Human-readable | Plain Markdown files | Dashboard / API | Yes | No |
37
+
8
38
  - **Markdown files** as the source of truth (human-editable, git-friendly)
9
39
  - **SQLite FTS5** as a rebuildable index (BM25 keyword search, via `better-sqlite3`)
10
40
  - **Zero cloud**, zero account, zero third-party API
11
41
  - Loads directly under opencode's embedded Bun runtime; CLI and MCP server run under Node — no build step in development (the published npm package ships pre-compiled JS), no Bun install
12
42
 
43
+ ## Architecture
44
+
45
+ ```text
46
+ ┌──────────────────┐
47
+ │ AI agent │
48
+ │ Copilot / Cursor │
49
+ │ Claude / opencode│
50
+ └────────┬─────────┘
51
+ │ MCP (stdio) — 11 tools
52
+ │ session-start injection
53
+ ┌────────▼─────────┐
54
+ │ open-memex │
55
+ │ MCP server │
56
+ └──┬────────────┬──┘
57
+ │ │
58
+ ┌────────────▼───┐ ┌─────▼──────────┐
59
+ │ Markdown files │ │ SQLite FTS5 │
60
+ │ source of truth│ │ rebuildable │
61
+ │ local-first │ │ index (BM25) │
62
+ └─────────────┬──┘ └────────────────┘
63
+ │ submit (explicit,
64
+ │ local commit)
65
+ ┌───────▼────────┐
66
+ │ Git repo │
67
+ │ .ai/open-memex/│
68
+ │ PR-reviewed │
69
+ │ team memory │
70
+ └────────────────┘
71
+
72
+ personal scope: this machine only — never synced, never enters a repo.
73
+ ```
74
+
13
75
  ## Installation
14
76
 
15
77
  ### Requirements
@@ -18,18 +80,36 @@ plus a generic MCP server (VS Code Copilot, Cursor, Claude Code, Visual Studio,
18
80
 
19
81
  ### Step 1 — Install the CLI
20
82
 
21
- **npm (recommended):**
83
+ #### Stable vs alpha
84
+
85
+ **Stable** (recommended for most users) — the `latest` tag:
22
86
 
23
87
  ```sh
24
88
  npm install -g open-memex
25
89
  ```
26
90
 
27
- This installs the `0.3.0` stable release.
91
+ This installs the `0.4.0` stable release.
92
+
93
+ **Alpha** (bleeding edge, for testers) — the `alpha` tag:
94
+
95
+ ```sh
96
+ npm install -g open-memex@alpha
97
+ ```
98
+
99
+ See what's published:
100
+
101
+ ```sh
102
+ npm view open-memex version # latest stable
103
+ npm view open-memex@alpha version # latest alpha
104
+ ```
105
+
106
+ Alpha builds may have rough edges — bug reports are welcome.
28
107
 
29
108
  **No install — run via npx:**
30
109
 
31
110
  ```sh
32
- npx -y open-memex <command> # e.g. npx -y open-memex init --client vscode
111
+ npx -y open-memex <command> # e.g. npx -y open-memex init --client vscode
112
+ npx -y open-memex@alpha <command> # alpha line, no install
33
113
  ```
34
114
 
35
115
  **From source** (bleeding edge, `V2-dev-p2` branch):
@@ -185,6 +265,62 @@ storage writability, then boots a real MCP server and runs `initialize` +
185
265
  4 characters kept, the rest replaced with `x` — and the memory is saved.
186
266
  Preview what a message would capture with `open-memex capture --dry-run "…"`.
187
267
 
268
+ ## Memory types
269
+
270
+ Eleven types — `type` says what the memory is, `tags` say what it's about:
271
+
272
+ | Type | Captures |
273
+ |---|---|
274
+ | `fact` | A stable true statement about the project or world |
275
+ | `preference` | How someone likes things done |
276
+ | `decision` | A choice that was made — the why and the trade-off |
277
+ | `constraint` | A rule that must not be violated |
278
+ | `todo` | A commitment to do something later |
279
+ | `knowledge` | Durable domain or architecture knowledge |
280
+ | `howto` | A procedure that worked |
281
+ | `gotcha` | A trap to avoid |
282
+ | `lesson` | What an incident or mistake taught us |
283
+ | `observation` | Something noticed, not yet a conclusion |
284
+ | `reference` | A pointer to the authoritative doc (no copying) |
285
+
286
+ ## Team memory workflow
287
+
288
+ Personal notes stay private. Project knowledge follows an explicit, reviewable
289
+ pipeline — nothing is shared automatically:
290
+
291
+ ```
292
+ capture → outbox (draft, local) → submit → repo (.ai/open-memex/) → PR review → published → recall
293
+ ```
294
+
295
+ 1. **Capture** — save decisions, gotchas, lessons as drafts during normal work.
296
+ 2. **Review** — drafts wait in a local outbox; `sync-status` (or saying
297
+ "sync memory" in chat) shows what's pending.
298
+ 3. **Submit** — you name the memories; they move into `<repo>/.ai/open-memex/`
299
+ with a local commit. open-memex never auto-pushes.
300
+ 4. **PR review** — memories are plain Markdown; reviewers approve, request
301
+ changes, or reject through the normal branch/PR process (`promote`,
302
+ `pr-status`, `resolve`).
303
+ 5. **Recall** — published memories are injected at session start and searchable
304
+ on demand, for humans and agents alike.
305
+
306
+ Reviewer convention: [docs/CURATOR.md](./docs/CURATOR.md).
307
+
308
+ ## Security & data
309
+
310
+ - **Local-first:** everything lives on your machine (`%APPDATA%\open-memex` /
311
+ `~/.local/share/open-memex`) plus the repos you choose. Zero cloud calls,
312
+ zero accounts, zero third-party APIs, zero telemetry.
313
+ - **Secrets stay out:** `<private>…</private>` spans are stripped; detected API
314
+ keys/tokens are masked in place before saving. Preview with
315
+ `open-memex capture --dry-run "…"`.
316
+ - **Personal never syncs:** the `personal` scope is this machine only — excluded
317
+ from export by default and can never enter a repo.
318
+ - **Auditable sharing:** team memories move only by explicit `submit`, travel
319
+ through branch/PR review, and every `promote` transition is appended to the
320
+ memory's `review_history` (who / when / why).
321
+ - **You own the files:** Markdown is the source of truth — inspect, edit, or
322
+ delete anything by hand; the SQLite index rebuilds from the files.
323
+
188
324
  ## Scopes
189
325
 
190
326
  - **project** — scoped to the current repo (keyed off the git origin URL hash, or the cwd if no remote). Default for new memories.
@@ -312,6 +448,37 @@ open-memex pr-status [--apply]
312
448
  # changes-requested → suggestion only. Report by default; --apply performs
313
449
  # the mapped transitions locally (no push).
314
450
 
451
+ open-memex pull
452
+ # pull shared memories from the git remote: fetch + fast-forward ONLY.
453
+ # A diverged branch fails with a clear message — open-memex never
454
+ # force-merges; resolve it by hand, then pull again. On success the
455
+ # local index re-syncs. Pulls are explicit by default; set
456
+ # `open-memex config set sync.autoPull true` for a best-effort pull
457
+ # at MCP session start (a failed pull never blocks the session).
458
+
459
+ open-memex push
460
+ # push the current branch (with its submitted memories) to the git remote.
461
+ # Explicit only — open-memex never pushes on its own.
462
+
463
+ open-memex export [--scope project|personal|both] [--type T] [--tag t] [--all] [-o <file>]
464
+ # bundle memories into a portable .tar.gz (markdown + manifest.json) for
465
+ # moving to another machine or another app. Excludes visibility:private
466
+ # memories by default; --all / -a includes everything (full migration).
467
+
468
+ open-memex import <bundle.tar.gz> [--dry-run]
469
+ # restore a bundle: personal memories go to the personal dir; project
470
+ # memories are re-keyed to the current project and land in the outbox as
471
+ # drafts. Identical ids are skipped; conflicting ids are reported,
472
+ # never overwritten.
473
+
474
+ open-memex distill-agents [--scope project|personal] [--type t1,t2] [--limit N] [-o <file>]
475
+ # propose an AGENTS.md snippet distilled from project memories
476
+ # (decisions, constraints, lessons, gotchas, howtos). Prints markdown;
477
+ # -o writes it to a file. You review and merge by hand — open-memex
478
+ # never rewrites your AGENTS.md on its own. The snippet ends with a
479
+ # "memory hygiene" section (§3.5 checkpoint guidance) so agents reading
480
+ # AGENTS.md learn to propose distilled captures at checkpoints.
481
+
315
482
  open-memex propose <id...> --to project [--local-approve]
316
483
  # propose one or several personal memories at once (one branch, one PR);
317
484
  # each is copied with its own new id. All-or-nothing: a bad id aborts the
@@ -330,6 +497,10 @@ open-memex resolve [id-or-path]
330
497
  # Semantic conflicts are reported, never auto-resolved.
331
498
  ```
332
499
 
500
+ Whoever tends the shared memory follows the curator convention —
501
+ `docs/CURATOR.md`: what to approve, what to send back, and the hygiene
502
+ rules that keep shared memory from rotting.
503
+
333
504
  Maintenance:
334
505
 
335
506
  ```sh
@@ -368,28 +539,27 @@ server with cwd set to your project root (`init` handles this for you).
368
539
 
369
540
  ## Roadmap
370
541
 
371
- **`0.3.0` (this release):** generic MCP server, `open-memex` bin/CLI, one-command
542
+ **`0.3.0` (stable):** generic MCP server, `open-memex` bin/CLI, one-command
372
543
  `init` setup, Chinese keyword capture with personal/project routing, `config` /
373
544
  `capture --dry-run` / `doctor` helpers, Visual Studio support.
374
545
 
375
- **In progress — `0.4.0`:** team sync — shared memory via git: appdata draft
546
+ **`0.4.0` (stable):** team sync — shared memory via git: appdata draft
376
547
  outbox → `sync-status` → `submit` (local branch+commit, push/PR on your Yes)
377
- → `promote` / `resolve` review workflow, in-repo `.ai/open-memex/` dir, 1–2
378
- colleague pilot; capture — §3.5 checkpoint distillation in MCP handshake +
379
- init instructions (agent proposes 1–3 captures, human decides).
380
-
381
- **Coming — `0.3.0` (stable):** org layer — org memory repo, curator convention,
382
- distill-to-AGENTS.md assist, `export`/`import` archive for user portability
383
- (Markdown + manifest, no walled garden; private excluded by default,
384
- `-a`/`--all` for full migration).
385
-
386
- **Future (signal-gated, no version committed):** native agent plugins (Claude Code /
387
- Codex hooks as enhancement paths over the same MCP tools); local embeddings as a
388
- benchmark-gated experiment (no embedding model is ever downloaded without explicit
389
- opt-in); cloud `RemoteProvider` customization only if multi-repo sharing, ACL, or
390
- compliance needs demand it.
391
-
392
- Design details: [docs/V2-DESIGN.md](./docs/V2-DESIGN.md) (append-only decision log D1–D20).
548
+ → `promote` / `resolve` review workflow, in-repo `.ai/open-memex/` dir;
549
+ `export` / `import` archive for user portability (Markdown + manifest, no walled
550
+ garden; private excluded by default, `-a` / `--all` for full migration);
551
+ distill-to-AGENTS.md assist (`distill-agents`, propose-only — you merge by hand);
552
+ §3.5 checkpoint distillation in the MCP handshake + init instructions (the agent
553
+ proposes 1–3 captures at checkpoints, the human decides); 1–2 colleague pilot.
554
+
555
+ **Future (signal-gated, no version committed):** org layer — org memory repo,
556
+ curator convention; native agent plugins (Claude Code / Codex hooks as
557
+ enhancement paths over the same MCP tools); local embeddings as a
558
+ benchmark-gated experiment (no embedding model is ever downloaded without
559
+ explicit opt-in); cloud `RemoteProvider` customization only if multi-repo
560
+ sharing, ACL, or compliance needs demand it.
561
+
562
+ Design details: [docs/V2-DESIGN.md](./docs/V2-DESIGN.md) (append-only decision log).
393
563
 
394
564
  ## License
395
565
 
package/README.zh-CN.md CHANGED
@@ -1,15 +1,74 @@
1
1
  # open-memex
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/open-memex.svg)](https://www.npmjs.com/package/open-memex)
4
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
5
+
3
6
  [English](./README.md)
4
7
 
5
8
  给 AI 编程助手的本地优先持久记忆:一个 [opencode](https://opencode.ai) 插件,
6
9
  加上一个通用 MCP server(VS Code Copilot、Cursor、Claude Code、Visual Studio 等)。
7
10
 
11
+ ## 为什么需要 open-memex?
12
+
13
+ 工程知识只存在于两个地方:代码里,和人的脑子里。
14
+ 每个新的 AI 编程会话都从零开始——同样的项目背景要反复讲,同样的坑要反复踩,
15
+ 同样的事故教训在聊天结束时就消失了。
16
+
17
+ open-memex 把值得记住的部分——决策、约束、教训——存成可 review 的 Markdown,
18
+ 并在下一次会话开始时自动注入回去。
19
+
20
+ > No capture, nothing to inherit.(不记录,就无从传承。)
21
+
22
+ 它也补齐了 agentic 开发工作流(spec 驱动开发、plan/implement/verify 循环)缺的那一块:
23
+ plan 产出决策,verify 产出规则——open-memex 是让它们跨会话留存的记忆层,
24
+ 而不是每次从头重新推导。
25
+
26
+ ## 和其它方案的对比
27
+
28
+ | | open-memex | 云端记忆服务 | Wiki / 文档平台 | 聊天记录 |
29
+ |---|---|---|---|---|
30
+ | 数据在哪 | 你的机器 + 你的仓库 | 服务商服务器 | 中心服务器 | 聊天结束就没了 |
31
+ | 分享前 review | 有——outbox + PR | 不一定 | 有 | 没有 |
32
+ | Agent 回忆 | 会话开始注入 + 搜索 | 调 API | 人工去查 | 没有 |
33
+ | 人类可读 | 纯 Markdown 文件 | 后台 / API | 有 | 没有 |
34
+
8
35
  - **Markdown 文件**是 source of truth(人类可读、git 友好)
9
36
  - **SQLite FTS5** 做可重建索引(BM25 关键词检索,`better-sqlite3`)
10
37
  - **零云端**、零账号、零第三方 API
11
38
  - 直接跑在 opencode 内嵌的 Bun 运行时里;CLI 和 MCP server 跑在 Node 下——开发时无需构建(发布的 npm 包带预编译好的 JS)、无需安装 Bun
12
39
 
40
+ ## 架构
41
+
42
+ ```text
43
+ ┌──────────────────┐
44
+ │ AI agent │
45
+ │ Copilot / Cursor │
46
+ │ Claude / opencode│
47
+ └────────┬─────────┘
48
+ │ MCP (stdio) — 11 tools
49
+ │ session-start injection
50
+ ┌────────▼─────────┐
51
+ │ open-memex │
52
+ │ MCP server │
53
+ └──┬────────────┬──┘
54
+ │ │
55
+ ┌────────────▼───┐ ┌─────▼──────────┐
56
+ │ Markdown files │ │ SQLite FTS5 │
57
+ │ source of truth│ │ rebuildable │
58
+ │ local-first │ │ index (BM25) │
59
+ └─────────────┬──┘ └────────────────┘
60
+ │ submit (explicit,
61
+ │ local commit)
62
+ ┌───────▼────────┐
63
+ │ Git repo │
64
+ │ .ai/open-memex/│
65
+ │ PR-reviewed │
66
+ │ team memory │
67
+ └────────────────┘
68
+
69
+ personal scope:只属于这台机器——永不同步,永远进不了仓库。
70
+ ```
71
+
13
72
  ## 安装
14
73
 
15
74
  ### 前置要求
@@ -18,18 +77,36 @@
18
77
 
19
78
  ### 第一步——安装 CLI
20
79
 
21
- **npm(推荐):**
80
+ #### 稳定版 vs Alpha 版
81
+
82
+ **稳定版**(推荐大多数用户)——`latest` 标签:
22
83
 
23
84
  ```sh
24
85
  npm install -g open-memex
25
86
  ```
26
87
 
27
- 安装的是 `0.3.0` 正式版。
88
+ 安装的是 `0.4.0` 正式版。
89
+
90
+ **Alpha 版**(最新开发版,给测试者)——`alpha` 标签:
91
+
92
+ ```sh
93
+ npm install -g open-memex@alpha
94
+ ```
95
+
96
+ 查看已发布版本:
97
+
98
+ ```sh
99
+ npm view open-memex version # 最新稳定版
100
+ npm view open-memex@alpha version # 最新 alpha 版
101
+ ```
102
+
103
+ Alpha 版可能有毛边——欢迎报 bug。
28
104
 
29
105
  **免安装——用 npx 直接跑:**
30
106
 
31
107
  ```sh
32
- npx -y open-memex <命令> # 例如 npx -y open-memex init --client vscode
108
+ npx -y open-memex <命令> # 例如 npx -y open-memex init --client vscode
109
+ npx -y open-memex@alpha <命令> # alpha 线,免安装
33
110
  ```
34
111
 
35
112
  **从源码安装**(最新开发版,`V2-dev-p2` 分支):
@@ -180,6 +257,48 @@ open-memex doctor
180
257
  (API key、token、高熵凭据)就地打码——保留前 4 个字符,其余替换为 `x`——
181
258
  然后照常保存。用 `open-memex capture --dry-run "…"` 预览一条消息会被如何捕获。
182
259
 
260
+ ## 记忆类型(Memory types)
261
+
262
+ 11 种类型——`type` 说明这条记忆是什么,`tags` 说明它和什么有关:
263
+
264
+ | 类型 | 记录什么 |
265
+ |---|---|
266
+ | `fact` | 关于项目或世界的稳定事实 |
267
+ | `preference` | 某人做事的偏好 |
268
+ | `decision` | 做过的选择——为什么、权衡了什么 |
269
+ | `constraint` | 不能违反的规则 |
270
+ | `todo` | 以后要做的承诺 |
271
+ | `knowledge` | 持久的领域或架构知识 |
272
+ | `howto` | 验证过的做法 |
273
+ | `gotcha` | 要避开的坑 |
274
+ | `lesson` | 事故或错误教会我们的东西 |
275
+ | `observation` | 注意到的现象,还不是结论 |
276
+ | `reference` | 指向权威文档的指针(不复制内容) |
277
+
278
+ ## 团队记忆工作流
279
+
280
+ 个人笔记永远私有。项目知识走一条显式、可 review 的流水线——没有任何东西会自动分享:
281
+
282
+ ```
283
+ capture → outbox(本地草稿)→ submit → 仓库(.ai/open-memex/)→ PR review → published → recall
284
+ ```
285
+
286
+ 1. **Capture**——正常工作中把决策、坑、教训存成草稿。
287
+ 2. **Review**——草稿在本地 outbox 里等着;`sync-status`(或在聊天里说"同步记忆")查看待处理项。
288
+ 3. **Submit**——你点名要分享的记忆才会进 `<repo>/.ai/open-memex/`,并做本地 commit。open-memex 永远不会自动 push。
289
+ 4. **PR review**——记忆就是纯 Markdown;reviewer 走正常的分支/PR 流程批准、要求修改或拒绝(`promote`、`pr-status`、`resolve`)。
290
+ 5. **Recall**——已发布的记忆在会话开始时自动注入,也可随时搜索,人和 agent 都能用。
291
+
292
+ Reviewer 守则:[docs/CURATOR.md](./docs/CURATOR.md)。
293
+
294
+ ## 安全与数据
295
+
296
+ - **本地优先:** 所有东西都在你的机器上(`%APPDATA%\open-memex` / `~/.local/share/open-memex`),加上你选择的仓库。零云端调用、零账号、零第三方 API、零遥测。
297
+ - **密钥进不来:** `<private>…</private>` 包裹的内容会被剥离;检测到的 API key / token 在保存前就地打码。先用 `open-memex capture --dry-run "…"` 预览。
298
+ - **个人 scope 永不同步:** `personal` 只属于这台机器——export 默认排除,也永远进不了仓库。
299
+ - **分享可审计:** 团队记忆只能靠显式的 `submit` 移动,走分支/PR review,每次 `promote` 状态流转都会追加到记忆的 `review_history`(谁/何时/为什么)。
300
+ - **文件是你的:** Markdown 是 source of truth——随手看、随手改、随手删;SQLite 索引可以从文件重建。
301
+
183
302
  ## Scope
184
303
 
185
304
  - **project** — 绑定当前仓库(用 git origin URL 哈希做 key,无 remote 则用 cwd)。新记忆默认进这里。
@@ -305,6 +424,33 @@ open-memex pr-status [--apply]
305
424
  # PR merged → published,PR approved → approved(approved_by = reviewer),
306
425
  # changes requested 只给建议。默认只报告;--apply 在本地执行映射的流转(不 push)。
307
426
 
427
+ open-memex pull
428
+ # 从 git 远端拉共享记忆:fetch + 只允许 fast-forward。
429
+ # 分支 diverged 时直接报错退出——open-memex 永不强行 merge;
430
+ # 手工解决(rebase 或 merge)后再 pull。成功后本地索引重新同步。
431
+ # pull 默认只显式触发;`open-memex config set sync.autoPull true`
432
+ # 可在 MCP session start 时尝试自动 pull(失败永不阻塞 session)。
433
+
434
+ open-memex push
435
+ # 把当前分支(含已 submit 的记忆)push 到 git 远端。
436
+ # 只显式触发——open-memex 永不自动 push。
437
+
438
+ open-memex export [--scope project|personal|both] [--type T] [--tag t] [--all] [-o <file>]
439
+ # 把记忆打包成可携带的 .tar.gz(markdown 原件 + manifest.json),
440
+ # 用于搬到另一台机器或导入别的工具。默认排除 visibility:private 的记忆;
441
+ # --all / -a 全量包含(完整迁移)。
442
+
443
+ open-memex import <bundle.tar.gz> [--dry-run]
444
+ # 恢复 export 的包:personal 记忆进 personal 目录;project 记忆按当前
445
+ # 项目重新编号 scope_key,进 outbox 当草稿。内容相同的 id 跳过;
446
+ # 内容冲突的 id 只报告,永不覆盖。
447
+
448
+ open-memex distill-agents [--scope project|personal] [--type t1,t2] [--limit N] [-o <file>]
449
+ # 把项目记忆(decision/constraint/lesson/gotcha/howto)提炼成
450
+ # AGENTS.md 片段。默认打印到 stdout;-o 写文件。人工审阅后手工合并——
451
+ # open-memex 永不自动改写你的 AGENTS.md。片段末尾带一段"记忆卫生"
452
+ # (§3.5 检查点指引),让读 AGENTS.md 的 agent 学会在检查点提议蒸馏捕获。
453
+
308
454
  open-memex propose <id...> --to project [--local-approve]
309
455
  # 一次 propose 一条或多条(一个分支、一个 PR),每条独立新 id。
310
456
  # 全有或全无:id 有错整批回滚,不会留半截。
@@ -320,6 +466,9 @@ open-memex resolve [id-or-path]
320
466
  # 语义冲突只报告、不自动解决。
321
467
  ```
322
468
 
469
+ 打理共享记忆的人遵循 curator 公约——`docs/CURATOR.md`:
470
+ 批什么、退回什么,以及防止共享记忆腐烂的卫生规则。
471
+
323
472
  维护:
324
473
 
325
474
  ```sh
@@ -358,28 +507,26 @@ project scope 从进程工作目录解析,所以配置 server 时 cwd 要指
358
507
 
359
508
  ## 路线图(Roadmap)
360
509
 
361
- **`0.3.0`(本版):** 通用 MCP server、`open-memex` bin/CLI、
510
+ **`0.3.0`(稳定版):** 通用 MCP server、`open-memex` bin/CLI、
362
511
  一键 `init` 配置、中文关键词捕获(含 personal/project 路由)、
363
512
  `config` / `capture --dry-run` / `doctor` 助手命令、Visual Studio 支持。
364
513
 
365
- **进行中 —— `0.4.0`:** 团队同步——用 git 做共享记忆:appdata 草稿箱 →
514
+ **`0.4.0`(稳定版):** 团队同步——用 git 做共享记忆:appdata 草稿箱 →
366
515
  `sync-status` → `submit`(本地分支+commit,push/PR 拿你的 Yes 才做)
367
- → `promote` / `resolve` 评审工作流、仓库内 `.ai/open-memex/` 目录,
368
- 找 1–2 个同事做 pilot;捕获——§3.5 检查点蒸馏写进 MCP 握手指令和
369
- init 指令文件(agent 提议 1–3 条,人来定)。
370
-
371
- **Coming —— `0.3.0`(稳定版):** 组织层——组织记忆仓库、
372
- curator 约定、distill-to-AGENTS.md 辅助、`export`/`import` 归档
373
- (Markdown + manifest,不造围墙花园,用户可带走;
374
- private 默认不导出,`-a`/`--all` 全量迁移)。
375
-
376
- **未来(看信号再定,不承诺版本):** 原生 agent 插件
377
- (Claude Code / Codex hooks,作为同一套 MCP tools 的增强路径);
516
+ → `promote` / `resolve` 评审工作流、仓库内 `.ai/open-memex/` 目录;
517
+ `export` / `import` 归档做用户可携带(Markdown + manifest,不造围墙花园;
518
+ private 默认不导出,`-a` / `--all` 全量迁移);
519
+ distill-to-AGENTS.md 辅助(`distill-agents`,只提议不改写——人工合并);
520
+ §3.5 检查点蒸馏写进 MCP 握手指令和 init 指令文件
521
+ (agent 在检查点提议 1–3 条捕获,人来定);找 1–2 个同事做 pilot。
522
+
523
+ **未来(看信号再定,不承诺版本):** 组织层——组织记忆仓库、curator 约定;
524
+ 原生 agent 插件(Claude Code / Codex hooks,作为同一套 MCP tools 的增强路径);
378
525
  本地 embedding 做基准测试门控的实验(**未经明确 opt-in 绝不下载
379
526
  embedding 模型**);云端 `RemoteProvider` 定制只在多仓库共享、
380
527
  ACL 或合规需求出现时才做。
381
528
 
382
- 设计细节:[docs/V2-DESIGN.md](./docs/V2-DESIGN.md)(append-only 决策日志 D1–D20)。
529
+ 设计细节:[docs/V2-DESIGN.md](./docs/V2-DESIGN.md)(append-only 决策日志)。
383
530
 
384
531
  ## 许可证
385
532