open-memex 0.4.0-alpha.11 → 0.4.0-alpha.12
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/README.md +3 -1
- package/README.zh-CN.md +2 -1
- package/dist/distill-agents.js +7 -0
- package/docs/V2-DESIGN.md +7 -0
- package/package.json +1 -1
- package/src/distill-agents.ts +15 -0
package/README.md
CHANGED
|
@@ -475,7 +475,9 @@ open-memex distill-agents [--scope project|personal] [--type t1,t2] [--limit N]
|
|
|
475
475
|
# propose an AGENTS.md snippet distilled from project memories
|
|
476
476
|
# (decisions, constraints, lessons, gotchas, howtos). Prints markdown;
|
|
477
477
|
# -o writes it to a file. You review and merge by hand — open-memex
|
|
478
|
-
# never rewrites your AGENTS.md on its own.
|
|
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.
|
|
479
481
|
|
|
480
482
|
open-memex propose <id...> --to project [--local-approve]
|
|
481
483
|
# propose one or several personal memories at once (one branch, one PR);
|
package/README.zh-CN.md
CHANGED
|
@@ -448,7 +448,8 @@ open-memex import <bundle.tar.gz> [--dry-run]
|
|
|
448
448
|
open-memex distill-agents [--scope project|personal] [--type t1,t2] [--limit N] [-o <file>]
|
|
449
449
|
# 把项目记忆(decision/constraint/lesson/gotcha/howto)提炼成
|
|
450
450
|
# AGENTS.md 片段。默认打印到 stdout;-o 写文件。人工审阅后手工合并——
|
|
451
|
-
# open-memex 永不自动改写你的 AGENTS.md
|
|
451
|
+
# open-memex 永不自动改写你的 AGENTS.md。片段末尾带一段"记忆卫生"
|
|
452
|
+
# (§3.5 检查点指引),让读 AGENTS.md 的 agent 学会在检查点提议蒸馏捕获。
|
|
452
453
|
|
|
453
454
|
open-memex propose <id...> --to project [--local-approve]
|
|
454
455
|
# 一次 propose 一条或多条(一个分支、一个 PR),每条独立新 id。
|
package/dist/distill-agents.js
CHANGED
|
@@ -51,5 +51,12 @@ export function distillAgentsMarkdown(opts) {
|
|
|
51
51
|
}
|
|
52
52
|
lines.push(``);
|
|
53
53
|
}
|
|
54
|
+
// D43 — §3.5 memory-hygiene footer (double insurance for opencode users,
|
|
55
|
+
// who never see the MCP handshake / init instructions): teach the agent
|
|
56
|
+
// reading this AGENTS.md to propose distilled captures at checkpoints.
|
|
57
|
+
lines.push(`### Memory hygiene (open-memex)`);
|
|
58
|
+
lines.push(``);
|
|
59
|
+
lines.push(`- At checkpoints (session start, end of a work chunk, after the user commits),`, ` distill the session: propose 1–3 short memories capturing the useful`, ` conclusion — what was learned or decided, how an issue was resolved, what`, ` to avoid, where the authoritative doc lives — not the raw transcript.`, ` Save nothing without user approval.`, `- If the knowledge already lives in project docs, save a \`reference\` memory`, ` pointing at the doc instead of copying it.`);
|
|
60
|
+
lines.push(``);
|
|
54
61
|
return lines.join("\n");
|
|
55
62
|
}
|
package/docs/V2-DESIGN.md
CHANGED
|
@@ -860,6 +860,13 @@ requirement: personal data never touches third-party services). Benchmarks to tr
|
|
|
860
860
|
saved via `memory_add` with the new optional `source` param set to
|
|
861
861
|
`"inference"` (default `"tool"`). *Rationale: closes the 0.4.0 TODO from D41 —
|
|
862
862
|
the design's capture loop now reaches the agent. Implemented 2026-09-29.*
|
|
863
|
+
- **D43** — `distill-agents` output gains a "Memory hygiene (open-memex)"
|
|
864
|
+
footer carrying the §3.5 checkpoint guidance (propose 1–3 distilled captures
|
|
865
|
+
at checkpoints; save nothing without approval; prefer `reference` over
|
|
866
|
+
copying). *Rationale: double insurance for opencode users, who never see the
|
|
867
|
+
MCP handshake instructions or the `init`-written instruction files — but
|
|
868
|
+
opencode reads AGENTS.md natively, so the distilled snippet teaches the
|
|
869
|
+
checkpoint habit wherever it lands. Approved 2026-09-29.*
|
|
863
870
|
- **D41** — The type taxonomy is reconciled to 11 types with one-line definitions
|
|
864
871
|
(§3.1): `fact` `preference` `decision` `constraint` `todo` `knowledge` `howto`
|
|
865
872
|
`gotcha` `lesson` `observation` `reference`. Merged away: `warning`→`gotcha`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "open-memex",
|
|
3
|
-
"version": "0.4.0-alpha.
|
|
3
|
+
"version": "0.4.0-alpha.12",
|
|
4
4
|
"description": "Local-first memory layer and protocol for AI coding agents. Markdown source of truth, SQLite FTS5 index, zero cloud.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
package/src/distill-agents.ts
CHANGED
|
@@ -66,5 +66,20 @@ export function distillAgentsMarkdown(opts: DistillAgentsOptions): string {
|
|
|
66
66
|
}
|
|
67
67
|
lines.push(``);
|
|
68
68
|
}
|
|
69
|
+
// D43 — §3.5 memory-hygiene footer (double insurance for opencode users,
|
|
70
|
+
// who never see the MCP handshake / init instructions): teach the agent
|
|
71
|
+
// reading this AGENTS.md to propose distilled captures at checkpoints.
|
|
72
|
+
lines.push(`### Memory hygiene (open-memex)`);
|
|
73
|
+
lines.push(``);
|
|
74
|
+
lines.push(
|
|
75
|
+
`- At checkpoints (session start, end of a work chunk, after the user commits),`,
|
|
76
|
+
` distill the session: propose 1–3 short memories capturing the useful`,
|
|
77
|
+
` conclusion — what was learned or decided, how an issue was resolved, what`,
|
|
78
|
+
` to avoid, where the authoritative doc lives — not the raw transcript.`,
|
|
79
|
+
` Save nothing without user approval.`,
|
|
80
|
+
`- If the knowledge already lives in project docs, save a \`reference\` memory`,
|
|
81
|
+
` pointing at the doc instead of copying it.`,
|
|
82
|
+
);
|
|
83
|
+
lines.push(``);
|
|
69
84
|
return lines.join("\n");
|
|
70
85
|
}
|