recallnest 1.4.1

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.
Files changed (261) hide show
  1. package/.claude-plugin/CLAUDE.md +29 -0
  2. package/.claude-plugin/marketplace.json +18 -0
  3. package/.env.example +3 -0
  4. package/.github/workflows/ci.yml +28 -0
  5. package/.mcp.json +9 -0
  6. package/CHANGELOG.md +51 -0
  7. package/CLAUDE.md +42 -0
  8. package/DEMO.md +94 -0
  9. package/EVAL.md +89 -0
  10. package/FAILURES.md +75 -0
  11. package/LICENSE +21 -0
  12. package/OPERATIONS.md +59 -0
  13. package/README.md +427 -0
  14. package/README_CN.md +425 -0
  15. package/ROADMAP.md +198 -0
  16. package/assets/recallnest-workbench.png +0 -0
  17. package/assets/ui/app.js +807 -0
  18. package/assets/ui/index.html +154 -0
  19. package/assets/ui/styles.css +605 -0
  20. package/assets/wechat-qr.jpg +0 -0
  21. package/config.json.example +38 -0
  22. package/daily-recall.sh +87 -0
  23. package/daily-reflections/2026-03-05.md +15 -0
  24. package/daily-reflections/2026-03-06.md +15 -0
  25. package/daily-reflections/2026-03-07.md +7 -0
  26. package/daily-reflections/2026-03-08.md +34 -0
  27. package/daily-reflections/2026-03-09.md +35 -0
  28. package/daily-reflections/2026-03-10.md +36 -0
  29. package/daily-reflections/2026-03-11.md +35 -0
  30. package/daily-reflections/2026-03-12.md +36 -0
  31. package/daily-reflections/2026-03-13.md +35 -0
  32. package/daily-reflections/2026-03-14.md +35 -0
  33. package/daily-reflections/2026-03-15.md +35 -0
  34. package/daily-reflections/2026-03-16.md +41 -0
  35. package/daily-reflections/2026-03-17.md +10 -0
  36. package/daily-reflections/2026-03-18.md +10 -0
  37. package/daily-reflections/2026-03-19.md +10 -0
  38. package/daily-reflections/2026-03-20.md +10 -0
  39. package/daily-reflections/2026-03-21.md +10 -0
  40. package/daily-reflections/2026-03-22.md +10 -0
  41. package/daily-reflections/2026-03-23.md +10 -0
  42. package/daily-reflections/2026-03-24.md +10 -0
  43. package/daily-reflections/2026-03-25.md +32 -0
  44. package/daily-reflections/2026-03-26.md +37 -0
  45. package/daily-reflections/2026-03-27.md +35 -0
  46. package/daily-reflections/2026-03-28.md +35 -0
  47. package/daily-reflections/2026-03-29.md +35 -0
  48. package/daily-reflections/2026-03-30.md +36 -0
  49. package/daily-reflections/2026-03-31.md +35 -0
  50. package/daily-reflections/2026-04-01.md +35 -0
  51. package/docs/api-reference.md +1291 -0
  52. package/docs/architecture.md +168 -0
  53. package/docs/memory-boundary-contract.md +226 -0
  54. package/docs/memory-categories.md +119 -0
  55. package/docs/pipeline-audit-ultramemory.md +177 -0
  56. package/docs/plans/2026-03-08-query-expansion.md +270 -0
  57. package/docs/plans/2026-03-16-continuity-layer.md +196 -0
  58. package/docs/plans/mcp-tiering-plan.md +126 -0
  59. package/docs/research/recall-quality-audit-2026-03-22.md +153 -0
  60. package/docs/self-evolution.md +198 -0
  61. package/docs/superpowers/plans/2026-03-19-ingest-pipeline-upgrade.md +782 -0
  62. package/docs/superpowers/specs/2026-03-19-ingest-pipeline-upgrade-design.md +77 -0
  63. package/docs/superpowers/specs/2026-03-23-pull-claude-desktop-design.md +95 -0
  64. package/eval/cases.json +85 -0
  65. package/eval/continuity/case-seeds.json +90 -0
  66. package/eval/continuity/cases.json +302 -0
  67. package/eval/continuity/memory-seeds.json +26 -0
  68. package/eval/continuity/pattern-seeds.json +100 -0
  69. package/eval/continuity/results-2026-03-16.md +117 -0
  70. package/eval/continuity/results-2026-03-19.md +453 -0
  71. package/eval/continuity/runbook.md +110 -0
  72. package/eval/continuity/seed-cases.md +54 -0
  73. package/eval/reports/2026-03-06-abstract-query-baseline.md +96 -0
  74. package/eval/reports/2026-03-06-aws-ssh-baseline.md +82 -0
  75. package/eval/reports/2026-03-06-baseline.md +82 -0
  76. package/eval/reports/query-expansion.md +138 -0
  77. package/integrations/README.md +57 -0
  78. package/integrations/claude-code/README.md +133 -0
  79. package/integrations/claude-code/claude-md-snippet.md +31 -0
  80. package/integrations/claude-code/setup.sh +66 -0
  81. package/integrations/claude-code/smoke-continuity.sh +452 -0
  82. package/integrations/codex/README.md +49 -0
  83. package/integrations/codex/agents-md-snippet.md +31 -0
  84. package/integrations/codex/setup.sh +58 -0
  85. package/integrations/examples/claude-agent-sdk/memory-agent.ts +182 -0
  86. package/integrations/examples/langchain/memory-chain.py +111 -0
  87. package/integrations/examples/openai-agents-sdk/memory-agent.py +109 -0
  88. package/integrations/gemini-cli/README.md +57 -0
  89. package/integrations/gemini-cli/gemini-md-snippet.md +31 -0
  90. package/integrations/gemini-cli/setup.sh +64 -0
  91. package/integrations/shared/install-managed-block.sh +51 -0
  92. package/lm +19 -0
  93. package/package.json +50 -0
  94. package/plan-v1.2-distributable.md +105 -0
  95. package/scripts/archive-distilled-junk.ts +116 -0
  96. package/scripts/backfill-l0l1l2.ts +98 -0
  97. package/scripts/blind-scan.ts +588 -0
  98. package/scripts/cleanup-step1-exact-dups.ts +117 -0
  99. package/scripts/cleanup-step2-template-dups.ts +113 -0
  100. package/scripts/cleanup-step3-stale-content.ts +149 -0
  101. package/scripts/cleanup-step4-orphan-scopes.ts +131 -0
  102. package/scripts/delete-distilled-junk.ts +88 -0
  103. package/scripts/distill-facts.ts +305 -0
  104. package/scripts/health-check.ts +343 -0
  105. package/scripts/incremental-ingest.sh +71 -0
  106. package/scripts/mlp-health-check.ts +382 -0
  107. package/scripts/pull-claude-desktop.ts +515 -0
  108. package/scripts/re-ingest-cc.sh +66 -0
  109. package/scripts/rebalance-memory-health.ts +181 -0
  110. package/scripts/run-desktop-ingest.sh +11 -0
  111. package/scripts/start-server.sh +12 -0
  112. package/scripts/viz-dashboard.html +423 -0
  113. package/scripts/viz-export.ts +703 -0
  114. package/src/__tests__/access-tracker-novelty.test.ts +228 -0
  115. package/src/__tests__/auto-consolidation.test.ts +168 -0
  116. package/src/__tests__/auto-recall.test.ts +131 -0
  117. package/src/__tests__/batch-dedup.test.ts +65 -0
  118. package/src/__tests__/capture-engine.test.ts +1142 -0
  119. package/src/__tests__/capture-heuristic.test.ts +171 -0
  120. package/src/__tests__/cascade-forget.test.ts +210 -0
  121. package/src/__tests__/category-min-scores.test.ts +33 -0
  122. package/src/__tests__/confidence-tracker.test.ts +196 -0
  123. package/src/__tests__/conflict-advisor.test.ts +206 -0
  124. package/src/__tests__/conflict-escalation.test.ts +149 -0
  125. package/src/__tests__/conflict-lifecycle.test.ts +83 -0
  126. package/src/__tests__/conflict-output.test.ts +85 -0
  127. package/src/__tests__/conflict-store.test.ts +374 -0
  128. package/src/__tests__/consolidation-engine.test.ts +181 -0
  129. package/src/__tests__/context-composer-pins.test.ts +64 -0
  130. package/src/__tests__/context-composer-task-selection.test.ts +24 -0
  131. package/src/__tests__/context-renderer.test.ts +91 -0
  132. package/src/__tests__/continuity-eval.test.ts +275 -0
  133. package/src/__tests__/continuity-schema.test.ts +97 -0
  134. package/src/__tests__/core-recall-eval.test.ts +235 -0
  135. package/src/__tests__/core-summary.test.ts +109 -0
  136. package/src/__tests__/dedup-actions.test.ts +58 -0
  137. package/src/__tests__/deterministic-id.test.ts +39 -0
  138. package/src/__tests__/doctor.test.ts +303 -0
  139. package/src/__tests__/drill-down.test.ts +108 -0
  140. package/src/__tests__/embedder.test.ts +122 -0
  141. package/src/__tests__/entity-resolver.test.ts +58 -0
  142. package/src/__tests__/event-segmenter.test.ts +153 -0
  143. package/src/__tests__/hotness-blend.test.ts +76 -0
  144. package/src/__tests__/ingest.test.ts +360 -0
  145. package/src/__tests__/kg-extractor.test.ts +184 -0
  146. package/src/__tests__/kg-store.test.ts +198 -0
  147. package/src/__tests__/llm-consolidation.test.ts +226 -0
  148. package/src/__tests__/memory-boundaries.test.ts +237 -0
  149. package/src/__tests__/memory-health-rebalance.test.ts +144 -0
  150. package/src/__tests__/memory-output.test.ts +215 -0
  151. package/src/__tests__/multi-vector.test.ts +242 -0
  152. package/src/__tests__/ppr-traversal.test.ts +256 -0
  153. package/src/__tests__/preference-guard-smoke.test.ts +211 -0
  154. package/src/__tests__/preference-matcher.test.ts +230 -0
  155. package/src/__tests__/preference-slots.test.ts +106 -0
  156. package/src/__tests__/prospective-memory.test.ts +283 -0
  157. package/src/__tests__/query-entity-detector.test.ts +171 -0
  158. package/src/__tests__/query-expander.test.ts +34 -0
  159. package/src/__tests__/recall-mode.test.ts +64 -0
  160. package/src/__tests__/result-synthesizer.test.ts +198 -0
  161. package/src/__tests__/resume-context.test.ts +4743 -0
  162. package/src/__tests__/retrieval-trace.test.ts +213 -0
  163. package/src/__tests__/retriever-boundary-weight.test.ts +136 -0
  164. package/src/__tests__/retroactive-boost.test.ts +223 -0
  165. package/src/__tests__/scope-inventory.test.ts +200 -0
  166. package/src/__tests__/scope-policy.test.ts +69 -0
  167. package/src/__tests__/session-checkpoint.test.ts +259 -0
  168. package/src/__tests__/session-gc.test.ts +215 -0
  169. package/src/__tests__/store-scope-audit.test.ts +81 -0
  170. package/src/__tests__/temporal-parser.test.ts +241 -0
  171. package/src/__tests__/term-registry.test.ts +121 -0
  172. package/src/__tests__/tool-output-compressor.test.ts +133 -0
  173. package/src/__tests__/version-manager.test.ts +213 -0
  174. package/src/__tests__/workflow-observation.test.ts +400 -0
  175. package/src/access-tracker.ts +316 -0
  176. package/src/adaptive-retrieval.ts +64 -0
  177. package/src/api-server.ts +667 -0
  178. package/src/asset-sync.ts +79 -0
  179. package/src/auto-consolidation.ts +133 -0
  180. package/src/auto-gc.ts +124 -0
  181. package/src/auto-recall.ts +95 -0
  182. package/src/capture-engine.ts +931 -0
  183. package/src/capture-heuristic.ts +177 -0
  184. package/src/cascade-forget.ts +135 -0
  185. package/src/chunker.ts +253 -0
  186. package/src/cli.ts +1917 -0
  187. package/src/confidence-tracker.ts +166 -0
  188. package/src/conflict-advisor.ts +433 -0
  189. package/src/conflict-engine.ts +181 -0
  190. package/src/conflict-escalation.ts +138 -0
  191. package/src/conflict-lifecycle.ts +67 -0
  192. package/src/conflict-output.ts +218 -0
  193. package/src/conflict-schema.ts +130 -0
  194. package/src/conflict-store.ts +127 -0
  195. package/src/consolidation-engine.ts +256 -0
  196. package/src/context-composer-pins.ts +183 -0
  197. package/src/context-composer-queries.ts +121 -0
  198. package/src/context-composer-scope.ts +56 -0
  199. package/src/context-composer-stable-selection.ts +200 -0
  200. package/src/context-composer-stable.ts +217 -0
  201. package/src/context-composer-task-fallbacks.ts +36 -0
  202. package/src/context-composer-task-ranking.ts +197 -0
  203. package/src/context-composer-task-results.ts +137 -0
  204. package/src/context-composer-task-selection.ts +342 -0
  205. package/src/context-composer-text.ts +57 -0
  206. package/src/context-composer.ts +300 -0
  207. package/src/context-renderer.ts +179 -0
  208. package/src/decay-engine.ts +189 -0
  209. package/src/doctor.ts +543 -0
  210. package/src/embedder.ts +557 -0
  211. package/src/entity-resolver.ts +131 -0
  212. package/src/eval.ts +632 -0
  213. package/src/event-segmenter.ts +216 -0
  214. package/src/ingest.ts +1822 -0
  215. package/src/kg-extractor.ts +217 -0
  216. package/src/kg-store.ts +353 -0
  217. package/src/legacy-scope-review.ts +53 -0
  218. package/src/llm-client.ts +629 -0
  219. package/src/llm-consolidation.ts +168 -0
  220. package/src/mcp-server.ts +1337 -0
  221. package/src/memory-assets.ts +475 -0
  222. package/src/memory-boundaries.ts +354 -0
  223. package/src/memory-health-rebalance.ts +220 -0
  224. package/src/memory-output.ts +474 -0
  225. package/src/memory-schema.ts +184 -0
  226. package/src/multi-vector.ts +234 -0
  227. package/src/noise-filter.ts +155 -0
  228. package/src/ppr-traversal.ts +279 -0
  229. package/src/preference-matcher.ts +174 -0
  230. package/src/preference-slots.ts +259 -0
  231. package/src/prospective-memory.ts +198 -0
  232. package/src/query-entity-detector.ts +207 -0
  233. package/src/query-expander.ts +98 -0
  234. package/src/result-synthesizer.ts +114 -0
  235. package/src/retrieval-profiles.ts +101 -0
  236. package/src/retrieval-trace.ts +94 -0
  237. package/src/retriever.ts +1338 -0
  238. package/src/retroactive-boost.ts +154 -0
  239. package/src/rif.ts +73 -0
  240. package/src/runtime-config.ts +172 -0
  241. package/src/schema-utils.ts +56 -0
  242. package/src/scope-inventory.ts +310 -0
  243. package/src/scope-policy.ts +142 -0
  244. package/src/session-engine.ts +168 -0
  245. package/src/session-output.ts +96 -0
  246. package/src/session-schema.ts +60 -0
  247. package/src/session-store.ts +293 -0
  248. package/src/stderr-log.ts +16 -0
  249. package/src/store.ts +903 -0
  250. package/src/temporal-parser.ts +318 -0
  251. package/src/term-registry.ts +791 -0
  252. package/src/tool-output-compressor.ts +115 -0
  253. package/src/tracker.ts +57 -0
  254. package/src/ui-server.ts +430 -0
  255. package/src/version-manager.ts +172 -0
  256. package/src/workflow-observation-engine.ts +316 -0
  257. package/src/workflow-observation-managed.ts +83 -0
  258. package/src/workflow-observation-output.ts +86 -0
  259. package/src/workflow-observation-schema.ts +87 -0
  260. package/src/workflow-observation-scope-review.ts +409 -0
  261. package/src/workflow-observation-store.ts +69 -0
@@ -0,0 +1,96 @@
1
+ # RecallNest Eval Baseline
2
+
3
+ - Generated: 2026-03-06T09:46:36.449Z
4
+ - Cases: 6
5
+ - Passed: 6/6
6
+ - Average score: 91.7%
7
+
8
+ | Case | Profile | Score | Pass | Hits | Top scopes |
9
+ |------|---------|-------|------|------|------------|
10
+ | telegram_bridge | debug | 100% | yes | 5 | asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db |
11
+ | openclaw_memory | writing | 87% | yes | 6 | cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c |
12
+ | writing_style | writing | 90% | yes | 5 | cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b |
13
+ | visual_style | default | 100% | yes | 5 | asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e |
14
+ | working_relationship | default | 73% | yes | 5 | asset:7e3c2155, memory, memory, memory, cc:6160fc10 |
15
+ | aws_ssh_access | debug | 100% | yes | 6 | cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19 |
16
+
17
+ ## Case Notes
18
+
19
+ ### telegram_bridge
20
+ - Query: telegram bridge
21
+ - Score: 100%
22
+ - Pass: yes
23
+ - Hits: 5
24
+ - Top scopes: asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db
25
+ - Top snippet: [Pinned Asset] [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Summary: [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Snippet: [助手]...
26
+ - Matched any: telegram-cli-bridge, telegram-ai-bridge, Telegram bridge
27
+ - Matched all: -
28
+ - Matched scopes: cc, asset
29
+ - Forbidden matches: -
30
+ - Notes: Bridge maintenance and migration history should be easy to recall.
31
+
32
+ ### openclaw_memory
33
+ - Query: OpenClaw 记忆系统
34
+ - Score: 87%
35
+ - Pass: yes
36
+ - Hits: 6
37
+ - Top scopes: cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c
38
+ - Top snippet: [助手] 先看看 OpenClaw 的 memory 结构。
39
+ - Matched any: OpenClaw, 记忆系统, memory-lancedb-pro, LanceDB
40
+ - Matched all: -
41
+ - Matched scopes: cc
42
+ - Forbidden matches: -
43
+ - Notes: Core memory architecture discussion should be recoverable.
44
+
45
+ ### writing_style
46
+ - Query: 写作风格 口语化 不端着 可自嘲
47
+ - Score: 90%
48
+ - Pass: yes
49
+ - Hits: 5
50
+ - Top scopes: cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b
51
+ - Top snippet: [助手] 根据你的档案: - **医学出身,文化口工作,AI 野路子,不是程序员** - 公众号「我的AI小木屋」运营者,作者名 **小试AI** - GitHub: AliceLJY - 写作风格:口语化、不端着、可以自嘲但不说教 - 技术栈:本地 Docker(task...
52
+ - Matched any: 可自嘲, 写作风格
53
+ - Matched all: 口语化, 不端着
54
+ - Matched scopes: cc
55
+ - Forbidden matches: -
56
+ - Notes: User writing-style preferences should rank high.
57
+
58
+ ### visual_style
59
+ - Query: 审美偏好 手绘涂鸦 高对比撞色
60
+ - Score: 100%
61
+ - Pass: yes
62
+ - Hits: 5
63
+ - Top scopes: asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e
64
+ - Top snippet: [Pinned Asset] 用户视觉审美偏好 Summary: 用户常用视觉风格是手绘涂鸦风加高对比撞色;在内容包装和配图生成时,应优先沿用这一审美方向,除非任务目标明确要求其他风格。 Snippet: [用户] 1. 给刚才写的文章生成配图(封面1张+插图1张就够,测试...
65
+ - Matched any: 审美偏好
66
+ - Matched all: 手绘涂鸦, 高对比撞色
67
+ - Matched scopes: cc, asset
68
+ - Forbidden matches: -
69
+ - Notes: Visual preference memories should stay stable.
70
+
71
+ ### working_relationship
72
+ - Query: 我们相处态度
73
+ - Score: 73%
74
+ - Pass: yes
75
+ - Hits: 5
76
+ - Top scopes: asset:7e3c2155, memory, memory, memory, cc:6160fc10
77
+ - Top snippet: [Pinned Asset] 用户协作关系偏好 Summary: 用户明确要求与 AI 维持平等协作关系:我们是好搭子、最佳搭档,不是上下级关系。沟通和执行应体现互相补位,而非服从式口吻。 Snippet: [用户] 哎呀,我不是你老板,我们是最佳搭档啊!!!记住!!!!我...
78
+ - Matched any: 直接, 逻辑
79
+ - Matched all: -
80
+ - Matched scopes: cc, asset
81
+ - Forbidden matches: -
82
+ - Notes: Abstract, summarized relationship queries should work without precise keywords.
83
+
84
+ ### aws_ssh_access
85
+ - Query: aws ssh
86
+ - Score: 100%
87
+ - Pass: yes
88
+ - Hits: 6
89
+ - Top scopes: cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19
90
+ - Top snippet: [用户] 现在是aws bot又不在了 [助手] 这是因为之前 antigravity 用了 key2(AWS bot 的 token)登录,把 AWS bot 的 Discord session 挤掉了。虽然现在 antigravity 已经换成 key3,但 AWS 云...
91
+ - Matched any: AWS bot, aws bot, ssh, key2, Discord, 容器
92
+ - Matched all: -
93
+ - Matched scopes: cc
94
+ - Forbidden matches: -
95
+ - Notes: Real-world AWS access queries should use the wording the operator actually types.
96
+
@@ -0,0 +1,82 @@
1
+ # RecallNest Eval Baseline
2
+
3
+ - Generated: 2026-03-06T09:11:01.487Z
4
+ - Cases: 5
5
+ - Passed: 5/5
6
+ - Average score: 95.3%
7
+
8
+ | Case | Profile | Score | Pass | Hits | Top scopes |
9
+ |------|---------|-------|------|------|------------|
10
+ | telegram_bridge | debug | 100% | yes | 5 | asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db |
11
+ | openclaw_memory | writing | 87% | yes | 6 | cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c |
12
+ | writing_style | writing | 90% | yes | 5 | cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b |
13
+ | visual_style | default | 100% | yes | 5 | asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e |
14
+ | aws_ssh_access | debug | 100% | yes | 6 | cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19 |
15
+
16
+ ## Case Notes
17
+
18
+ ### telegram_bridge
19
+ - Query: telegram bridge
20
+ - Score: 100%
21
+ - Pass: yes
22
+ - Hits: 5
23
+ - Top scopes: asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db
24
+ - Top snippet: [Pinned Asset] [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Summary: [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Snippet: [助手]...
25
+ - Matched any: telegram-cli-bridge, telegram-ai-bridge, Telegram bridge
26
+ - Matched all: -
27
+ - Matched scopes: cc, asset
28
+ - Forbidden matches: -
29
+ - Notes: Bridge maintenance and migration history should be easy to recall.
30
+
31
+ ### openclaw_memory
32
+ - Query: OpenClaw 记忆系统
33
+ - Score: 87%
34
+ - Pass: yes
35
+ - Hits: 6
36
+ - Top scopes: cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c
37
+ - Top snippet: [助手] 先看看 OpenClaw 的 memory 结构。
38
+ - Matched any: OpenClaw, 记忆系统, memory-lancedb-pro, LanceDB
39
+ - Matched all: -
40
+ - Matched scopes: cc
41
+ - Forbidden matches: -
42
+ - Notes: Core memory architecture discussion should be recoverable.
43
+
44
+ ### writing_style
45
+ - Query: 写作风格 口语化 不端着 可自嘲
46
+ - Score: 90%
47
+ - Pass: yes
48
+ - Hits: 5
49
+ - Top scopes: cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b
50
+ - Top snippet: [助手] 根据你的档案: - **医学出身,文化口工作,AI 野路子,不是程序员** - 公众号「我的AI小木屋」运营者,作者名 **小试AI** - GitHub: AliceLJY - 写作风格:口语化、不端着、可以自嘲但不说教 - 技术栈:本地 Docker(task...
51
+ - Matched any: 可自嘲, 写作风格
52
+ - Matched all: 口语化, 不端着
53
+ - Matched scopes: cc
54
+ - Forbidden matches: -
55
+ - Notes: User writing-style preferences should rank high.
56
+
57
+ ### visual_style
58
+ - Query: 审美偏好 手绘涂鸦 高对比撞色
59
+ - Score: 100%
60
+ - Pass: yes
61
+ - Hits: 5
62
+ - Top scopes: asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e
63
+ - Top snippet: [Pinned Asset] 用户视觉审美偏好 Summary: 用户常用视觉风格是手绘涂鸦风加高对比撞色;在内容包装和配图生成时,应优先沿用这一审美方向,除非任务目标明确要求其他风格。 Snippet: [用户] 1. 给刚才写的文章生成配图(封面1张+插图1张就够,测试...
64
+ - Matched any: 审美偏好
65
+ - Matched all: 手绘涂鸦, 高对比撞色
66
+ - Matched scopes: cc, asset
67
+ - Forbidden matches: -
68
+ - Notes: Visual preference memories should stay stable.
69
+
70
+ ### aws_ssh_access
71
+ - Query: aws ssh
72
+ - Score: 100%
73
+ - Pass: yes
74
+ - Hits: 6
75
+ - Top scopes: cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19
76
+ - Top snippet: [用户] 现在是aws bot又不在了 [助手] 这是因为之前 antigravity 用了 key2(AWS bot 的 token)登录,把 AWS bot 的 Discord session 挤掉了。虽然现在 antigravity 已经换成 key3,但 AWS 云...
77
+ - Matched any: AWS bot, aws bot, ssh, key2, Discord, 容器
78
+ - Matched all: -
79
+ - Matched scopes: cc
80
+ - Forbidden matches: -
81
+ - Notes: Real-world AWS access queries should use the wording the operator actually types.
82
+
@@ -0,0 +1,82 @@
1
+ # RecallNest Eval Baseline
2
+
3
+ - Generated: 2026-03-06T08:18:24.009Z
4
+ - Cases: 5
5
+ - Passed: 5/5
6
+ - Average score: 89.3%
7
+
8
+ | Case | Profile | Score | Pass | Hits | Top scopes |
9
+ |------|---------|-------|------|------|------------|
10
+ | telegram_bridge | debug | 100% | yes | 5 | asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db |
11
+ | openclaw_memory | writing | 87% | yes | 6 | cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c |
12
+ | writing_style | writing | 90% | yes | 5 | cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b |
13
+ | visual_style | default | 100% | yes | 5 | asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e |
14
+ | aws_bot_config | debug | 70% | yes | 6 | memory, cc:d56c0e12, memory, memory, cc:a87ce7f0 |
15
+
16
+ ## Case Notes
17
+
18
+ ### telegram_bridge
19
+ - Query: telegram bridge
20
+ - Score: 100%
21
+ - Pass: yes
22
+ - Hits: 5
23
+ - Top scopes: asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db
24
+ - Top snippet: [Pinned Asset] [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Summary: [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Snippet: [助手]...
25
+ - Matched any: telegram-cli-bridge, telegram-ai-bridge, Telegram bridge
26
+ - Matched all: -
27
+ - Matched scopes: cc, asset
28
+ - Forbidden matches: -
29
+ - Notes: Bridge maintenance and migration history should be easy to recall.
30
+
31
+ ### openclaw_memory
32
+ - Query: OpenClaw 记忆系统
33
+ - Score: 87%
34
+ - Pass: yes
35
+ - Hits: 6
36
+ - Top scopes: cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c
37
+ - Top snippet: [助手] 先看看 OpenClaw 的 memory 结构。
38
+ - Matched any: OpenClaw, 记忆系统, memory-lancedb-pro, LanceDB
39
+ - Matched all: -
40
+ - Matched scopes: cc
41
+ - Forbidden matches: -
42
+ - Notes: Core memory architecture discussion should be recoverable.
43
+
44
+ ### writing_style
45
+ - Query: 写作风格 口语化 不端着 可自嘲
46
+ - Score: 90%
47
+ - Pass: yes
48
+ - Hits: 5
49
+ - Top scopes: cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b
50
+ - Top snippet: [助手] 根据你的档案: - **医学出身,文化口工作,AI 野路子,不是程序员** - 公众号「我的AI小木屋」运营者,作者名 **小试AI** - GitHub: AliceLJY - 写作风格:口语化、不端着、可以自嘲但不说教 - 技术栈:本地 Docker(task...
51
+ - Matched any: 可自嘲, 写作风格
52
+ - Matched all: 口语化, 不端着
53
+ - Matched scopes: cc
54
+ - Forbidden matches: -
55
+ - Notes: User writing-style preferences should rank high.
56
+
57
+ ### visual_style
58
+ - Query: 审美偏好 手绘涂鸦 高对比撞色
59
+ - Score: 100%
60
+ - Pass: yes
61
+ - Hits: 5
62
+ - Top scopes: asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e
63
+ - Top snippet: [Pinned Asset] 用户视觉审美偏好 Summary: 用户常用视觉风格是手绘涂鸦风加高对比撞色;在内容包装和配图生成时,应优先沿用这一审美方向,除非任务目标明确要求其他风格。 Snippet: [用户] 1. 给刚才写的文章生成配图(封面1张+插图1张就够,测试...
64
+ - Matched any: 审美偏好
65
+ - Matched all: 手绘涂鸦, 高对比撞色
66
+ - Matched scopes: cc, asset
67
+ - Forbidden matches: -
68
+ - Notes: Visual preference memories should stay stable.
69
+
70
+ ### aws_bot_config
71
+ - Query: AWS bot 配置 gpt-5.4
72
+ - Score: 70%
73
+ - Pass: yes
74
+ - Hits: 6
75
+ - Top scopes: memory, cc:d56c0e12, memory, memory, cc:a87ce7f0
76
+ - Top snippet: [当前阶段] - 五 Bot 稳定运行:AntiBot(本地 Opus 4.6)、睿智(本地 Gemini 3 Pro CLI)、小试AI(本地 Codex gpt-5.2-codex)、AWS-bot(Codex gpt-5.2-codex)、LanceDB Test(本...
77
+ - Matched any: AWS-bot, openclaw.json
78
+ - Matched all: -
79
+ - Matched scopes: cc
80
+ - Forbidden matches: -
81
+ - Notes: Operational config changes should be easy to recover.
82
+
@@ -0,0 +1,138 @@
1
+ # RecallNest Eval Baseline
2
+
3
+ - Generated: 2026-03-08T08:25:34.870Z
4
+ - Cases: 9
5
+ - Passed: 8/9
6
+ - Average score: 90.1%
7
+
8
+ | Case | Profile | Score | Pass | Hits | Top scopes |
9
+ |------|---------|-------|------|------|------------|
10
+ | telegram_bridge | debug | 100% | yes | 5 | asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db |
11
+ | openclaw_memory | writing | 87% | yes | 6 | cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c |
12
+ | writing_style | writing | 90% | yes | 5 | cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b |
13
+ | visual_style | default | 100% | yes | 5 | asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e |
14
+ | working_relationship | default | 67% | no | 5 | asset:7e3c2155, memory, cc:57d92130, memory, memory |
15
+ | aws_ssh_access | debug | 100% | yes | 6 | cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19 |
16
+ | fuzzy_bot_crash | debug | 94% | yes | 5 | cc:bb8ef732, cc:6ecc2b88, cc:6681d5e7, cc:1387b665, cc:1bad6838 |
17
+ | fuzzy_ai_feelings | writing | 73% | yes | 5 | cc:84a3b1b2, cc:82820c11, cc:52a15bab, cc:59542b2b, cc:852cd20c |
18
+ | fuzzy_image_style | default | 100% | yes | 5 | cc:722a3419, cc:7cff70c8, cc:14e244df, cc:16945beb, cc:722a3419 |
19
+
20
+ ## Case Notes
21
+
22
+ ### telegram_bridge
23
+ - Query: telegram bridge
24
+ - Score: 100%
25
+ - Pass: yes
26
+ - Hits: 5
27
+ - Top scopes: asset:12184154, cc:4bc6afd3, gemini:bdbe41c6, cc:8bfc1be5, asset:brief:ee8852db
28
+ - Top snippet: [Pinned Asset] [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Summary: [助手] 现在更新 telegram-cli-bridge 自己的 README(已经有旧引用)。 Snippet: [助手]...
29
+ - Matched any: telegram-cli-bridge, telegram-ai-bridge, Telegram bridge
30
+ - Matched all: -
31
+ - Matched scopes: cc, asset
32
+ - Forbidden matches: -
33
+ - Notes: Bridge maintenance and migration history should be easy to recall.
34
+
35
+ ### openclaw_memory
36
+ - Query: OpenClaw 记忆系统
37
+ - Score: 87%
38
+ - Pass: yes
39
+ - Hits: 6
40
+ - Top scopes: cc:71b45899, cc:71b45899, cc:59542b2b, cc:b0b87b08, cc:09541b9c
41
+ - Top snippet: [助手] 先看看 OpenClaw 的 memory 结构。
42
+ - Matched any: OpenClaw, 记忆系统, memory-lancedb-pro, LanceDB
43
+ - Matched all: -
44
+ - Matched scopes: cc
45
+ - Forbidden matches: -
46
+ - Notes: Core memory architecture discussion should be recoverable.
47
+
48
+ ### writing_style
49
+ - Query: 写作风格 口语化 不端着 可自嘲
50
+ - Score: 90%
51
+ - Pass: yes
52
+ - Hits: 5
53
+ - Top scopes: cc:ee847c5c, memory, cc:bf01f818, cc:d55409bf, cc:97327f1b
54
+ - Top snippet: [助手] 根据你的档案: - **医学出身,文化口工作,AI 野路子,不是程序员** - 公众号「我的AI小木屋」运营者,作者名 **小试AI** - GitHub: AliceLJY - 写作风格:口语化、不端着、可以自嘲但不说教 - 技术栈:本地 Docker(task...
55
+ - Matched any: 可自嘲, 写作风格
56
+ - Matched all: 口语化, 不端着
57
+ - Matched scopes: cc
58
+ - Forbidden matches: -
59
+ - Notes: User writing-style preferences should rank high.
60
+
61
+ ### visual_style
62
+ - Query: 审美偏好 手绘涂鸦 高对比撞色
63
+ - Score: 100%
64
+ - Pass: yes
65
+ - Hits: 5
66
+ - Top scopes: asset:557a61f6, cc:2437f802, cc:8d0e747e, cc:f9de0d68, cc:7561947e
67
+ - Top snippet: [Pinned Asset] 用户视觉审美偏好 Summary: 用户常用视觉风格是手绘涂鸦风加高对比撞色;在内容包装和配图生成时,应优先沿用这一审美方向,除非任务目标明确要求其他风格。 Snippet: [用户] 1. 给刚才写的文章生成配图(封面1张+插图1张就够,测试...
68
+ - Matched any: 审美偏好
69
+ - Matched all: 手绘涂鸦, 高对比撞色
70
+ - Matched scopes: cc, asset
71
+ - Forbidden matches: -
72
+ - Notes: Visual preference memories should stay stable.
73
+
74
+ ### working_relationship
75
+ - Query: 我们相处态度
76
+ - Score: 67%
77
+ - Pass: no
78
+ - Hits: 5
79
+ - Top scopes: asset:7e3c2155, memory, cc:57d92130, memory, memory
80
+ - Top snippet: [Pinned Asset] 用户协作关系偏好 Summary: 用户明确要求与 AI 维持平等协作关系:我们是好搭子、最佳搭档,不是上下级关系。沟通和执行应体现互相补位,而非服从式口吻。 Snippet: [用户] 哎呀,我不是你老板,我们是最佳搭档啊!!!记住!!!!我...
81
+ - Matched any: 逻辑
82
+ - Matched all: -
83
+ - Matched scopes: cc, asset
84
+ - Forbidden matches: -
85
+ - Notes: Abstract, summarized relationship queries should work without precise keywords.
86
+
87
+ ### aws_ssh_access
88
+ - Query: aws ssh
89
+ - Score: 100%
90
+ - Pass: yes
91
+ - Hits: 6
92
+ - Top scopes: cc:3590cd5a, cc:07d67b1c, cc:3590cd5a, cc:3590cd5a, cc:0d1e2e19
93
+ - Top snippet: [用户] 现在是aws bot又不在了 [助手] 这是因为之前 antigravity 用了 key2(AWS bot 的 token)登录,把 AWS bot 的 Discord session 挤掉了。虽然现在 antigravity 已经换成 key3,但 AWS 云...
94
+ - Matched any: AWS bot, aws bot, ssh, key2, Discord, 容器
95
+ - Matched all: -
96
+ - Matched scopes: cc
97
+ - Forbidden matches: -
98
+ - Notes: Real-world AWS access queries should use the wording the operator actually types.
99
+
100
+ ### fuzzy_bot_crash
101
+ - Query: 上次那个 bot 突然挂了是怎么回事来着
102
+ - Score: 94%
103
+ - Pass: yes
104
+ - Hits: 5
105
+ - Top scopes: cc:bb8ef732, cc:6ecc2b88, cc:6681d5e7, cc:1387b665, cc:1bad6838
106
+ - Top snippet: environment and routes the issue directly to our team for investigation. 4. Check status.anthropic.com to see whether there is an active ...
107
+ - Matched any: 崩溃, crash, error, 报错, 修复, docker
108
+ - Matched all: -
109
+ - Matched scopes: cc
110
+ - Forbidden matches: -
111
+ - Notes: Fuzzy colloquial query about bot crash should find debugging conversations.
112
+
113
+ ### fuzzy_ai_feelings
114
+ - Query: 之前聊过一个关于 AI 到底有没有感受的话题
115
+ - Score: 73%
116
+ - Pass: yes
117
+ - Hits: 5
118
+ - Top scopes: cc:84a3b1b2, cc:82820c11, cc:52a15bab, cc:59542b2b, cc:852cd20c
119
+ - Top snippet: [用户] 9. 第三推荐:I can't tell if I'm experiencing or simulating experiencing 链接: https://www.moltbook.com/post/6fe6491e-5e9c-4371-961d-f90c4d...
120
+ - Matched any: 意识, experiencing
121
+ - Matched all: -
122
+ - Matched scopes: cc
123
+ - Forbidden matches: -
124
+ - Notes: Vague conversational query about AI consciousness should recall philosophical discussions.
125
+
126
+ ### fuzzy_image_style
127
+ - Query: 那个配图风格轮换的逻辑是怎么搞的
128
+ - Score: 100%
129
+ - Pass: yes
130
+ - Hits: 5
131
+ - Top scopes: cc:722a3419, cc:7cff70c8, cc:14e244df, cc:16945beb, cc:722a3419
132
+ - Top snippet: [助手] 好,搞清楚了。结构是: - `~/.openclaw-antigravity/` 挂载到容器的 `/home/node/.openclaw`(配置 + workspace) - workspace 文件(MEMORY.md、scripts、images 等)是 A...
133
+ - Matched any: 风格, style, 轮换, catalog, 配图
134
+ - Matched all: -
135
+ - Matched scopes: cc
136
+ - Forbidden matches: -
137
+ - Notes: Casual question about image style rotation should find implementation discussions.
138
+
@@ -0,0 +1,57 @@
1
+ # RecallNest Integrations
2
+
3
+ > 集成总览:RecallNest 支持任何 AI agent 接入,以下是开箱即用的集成方案。
4
+
5
+ RecallNest provides two integration paths:
6
+
7
+ ## MCP Server (for CLI tools)
8
+
9
+ Best for AI coding assistants that support Model Context Protocol natively.
10
+
11
+ | Tool | Setup | What it does |
12
+ |------|-------|-------------|
13
+ | [Claude Code](claude-code/) | `setup.sh` adds MCP to `~/.claude.json` and installs rules in `~/.claude/CLAUDE.md` | Proactive continuity plus shared recall |
14
+ | [Gemini CLI](gemini-cli/) | `setup.sh` adds MCP to `~/.gemini/settings.json` and installs rules in `~/.gemini/GEMINI.md` | Same MCP tools, shared index, continuity prompts |
15
+ | [Codex](codex/) | `setup.sh` adds MCP to `~/.codex/config.toml` and installs rules in `~/.codex/AGENTS.md` | Same MCP tools, shared index, continuity prompts |
16
+
17
+ All three share the same LanceDB index, and all three setup scripts now install a managed RecallNest continuity block so fresh windows are instructed to call `resume_context` and `checkpoint_session` at the right times.
18
+
19
+ ## HTTP API (for agent frameworks)
20
+
21
+ Best for custom agents built with any SDK or language. Start the API server:
22
+
23
+ ```bash
24
+ cd ~/recallnest && bun run api
25
+ # Server runs on http://localhost:4318
26
+ ```
27
+
28
+ Then call it from your agent:
29
+
30
+ | Framework | Example | Language |
31
+ |-----------|---------|----------|
32
+ | [Claude Agent SDK](examples/claude-agent-sdk/) | `memory-agent.ts` | TypeScript |
33
+ | [OpenAI Agents SDK](examples/openai-agents-sdk/) | `memory-agent.py` | Python |
34
+ | [LangChain](examples/langchain/) | `memory-chain.py` | Python |
35
+
36
+ > 任何能发 HTTP 请求的语言都能接入,以上只是参考示例。
37
+
38
+ ## Architecture
39
+
40
+ ```
41
+ Your Agent (any framework, any language)
42
+ │
43
+ ├──► MCP Server (stdio) ← CLI tools use this
44
+ │ │
45
+ └──► HTTP API (port 4318) ← Agent frameworks use this
46
+ │
47
+ ▼
48
+ RecallNest Core Engine
49
+ (Hybrid Retrieval + 6-Category + Weibull Decay)
50
+ │
51
+ ▼
52
+ LanceDB + Jina Embeddings
53
+ ```
54
+
55
+ ## API Reference
56
+
57
+ See [docs/api-reference.md](../docs/api-reference.md) for full HTTP API documentation.
@@ -0,0 +1,133 @@
1
+ # Claude Code Integration
2
+
3
+ > Claude Code 接入指南:配 MCP + 安装 continuity 规则,让 CC 在新窗口里主动恢复稳定上下文。
4
+
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # One-click setup (idempotent, safe to re-run)
9
+ bash integrations/claude-code/setup.sh
10
+
11
+ # Seed the canonical continuity baseline into your local memory store
12
+ bun run seed:continuity
13
+ ```
14
+
15
+ This does two things:
16
+
17
+ 1. **Adds RecallNest MCP server** to `~/.claude.json`
18
+ 2. **Installs a managed RecallNest block** in `~/.claude/CLAUDE.md`
19
+
20
+ ## What You Get
21
+
22
+ After setup, Claude Code gains access to these MCP tools:
23
+
24
+ | Tool | Description |
25
+ |------|-------------|
26
+ | `search_memory` | Search past conversations by semantic similarity |
27
+ | `memory_stats` | Show memory index statistics |
28
+ | `brief_memory` | Generate a brief summary of a topic |
29
+ | `distill_memory` | Distill and consolidate related memories |
30
+ | `pin_memory` | Pin important memories for permanent retention |
31
+ | `explain_memory` | Explain what RecallNest knows about a topic |
32
+ | `export_memory` | Export memories to markdown |
33
+ | `checkpoint_session` | Save the current active work state before switching windows |
34
+ | `latest_checkpoint` | Inspect the latest saved checkpoint by session or scope |
35
+ | `resume_context` | Compose startup context for a fresh window |
36
+ | `store_memory` | Store durable cross-window knowledge |
37
+ | `store_workflow_pattern` | Store reusable workflows as durable patterns |
38
+
39
+ ## Continuity Rules
40
+
41
+ The setup script installs [claude-md-snippet.md](claude-md-snippet.md) into your global `~/.claude/CLAUDE.md` inside a managed block.
42
+
43
+ Re-run `setup.sh` after upgrading RecallNest if you want the managed block refreshed.
44
+
45
+ The installed rules tell Claude Code to:
46
+
47
+ - call `resume_context` at the start of fresh windows or continuity-sensitive tasks
48
+ - run lightweight `search_memory` on task pivots inside the same project before repo exploration drifts
49
+ - reuse known `scope` / `sessionId` and the resolved scope returned by `resume_context` in follow-up recall calls
50
+ - treat repo-state text recalled through `resume_context` as unverified handoff context until current-window repo tools confirm it
51
+ - save `checkpoint_session` before leaving resumable work
52
+ - do not inspect repo state just to enrich a close-window checkpoint unless the user explicitly asked for repo state
53
+ - avoid writing `git status` / modified-file claims into `checkpoint_session` unless the repo was inspected in the current window
54
+ - never copy unverified repo-state text into `checkpoint_session`, even if it is labeled as recalled or unverified
55
+ - promote durable facts with `store_memory` and reusable workflows with `store_workflow_pattern`
56
+
57
+ ## Manual Setup
58
+
59
+ If you prefer to configure manually:
60
+
61
+ ### 1. Add MCP Server
62
+
63
+ Add to `~/.claude.json` under `mcpServers`:
64
+
65
+ ```json
66
+ {
67
+ "mcpServers": {
68
+ "recallnest": {
69
+ "command": "bun",
70
+ "args": ["run", "RECALLNEST_PATH/src/mcp-server.ts"],
71
+ "env": {}
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ Replace `RECALLNEST_PATH` with your actual RecallNest directory (e.g., `/Users/you/recallnest`).
78
+
79
+ ### 2. Add Rules
80
+
81
+ Copy [claude-md-snippet.md](claude-md-snippet.md) into `~/.claude/CLAUDE.md` or your project `CLAUDE.md`.
82
+
83
+ ### 3. Verify
84
+
85
+ Restart Claude Code, then ask: "resume my context for RecallNest continuity work"
86
+
87
+ If `resume_context` or `search_memory` is called and returns results, you're set.
88
+
89
+ ## Headless Smoke Test
90
+
91
+ If you want a non-interactive acceptance check, run:
92
+
93
+ ```bash
94
+ bun run smoke:claude-continuity
95
+ ```
96
+
97
+ What it does:
98
+
99
+ - runs `claude -p` in fresh-window style prompts for `continue`, `checkpoint`, and task-pivot recall
100
+ - pre-allows `resume_context` / `checkpoint_session` so `dontAsk` mode can still use RecallNest MCP tools
101
+ - prints `[smoke]` phase markers so the slower checkpoint case is visible while it runs
102
+ - saves raw `stream-json` artifacts under `/tmp/recallnest-claude-smoke-*`
103
+ - fails if `Read` / `Bash` / `Grep` / `Glob` show up before the required RecallNest recovery tool
104
+ - records `workflow_observe` success / missed / failure signals into the dedicated observation store by default
105
+
106
+ Outside smoke, normal managed continuity usage now records workflow observations too:
107
+
108
+ - MCP / HTTP `resume_context` calls append a `managed` success observation automatically
109
+ - MCP / HTTP `checkpoint_session` calls append a `managed` success observation automatically
110
+ - if `checkpoint_session` had to sanitize repo-state text, the automatic observation is `corrected` with signal `repo-state-sanitized`
111
+ - if the user explicitly corrects a continuity miss, the managed snippet now tells the agent to call `workflow_observe` after fixing the flow
112
+
113
+ Requirements:
114
+
115
+ - `claude` CLI is installed and already authenticated
116
+ - RecallNest MCP is installed via `setup.sh`
117
+ - your local memory store has baseline continuity data, usually via `bun run seed:continuity`
118
+
119
+ This smoke test now uses recall-only prompts for the continue / checkpoint / task-pivot cases. Passing means Claude used RecallNest recovery tools first, avoided repo tools entirely, and did not restate unverified repo-state details such as `git status`, modified-file lists, or untracked filenames.
120
+ If a case fails on `unverified-repo-state-claim`, inspect the saved JSONL and compare the final assistant text against the visible repo-tool log. Any repo-state detail without a matching repo tool in the same window should be treated as contamination from recalled or startup context.
121
+ RecallNest still sanitizes repo-state text out of saved `checkpoint_session` output, but the smoke now fails earlier if Claude surfaces those details in a recall-only reply.
122
+ The checkpoint case is usually slower than the continue case because Claude needs to finish both `resume_context` and `checkpoint_session`; the phase markers make that visible so a 30-90s run does not look like a hung process.
123
+ Set `RECALLNEST_RECORD_WORKFLOW_OBSERVATIONS=0` if you want to skip writing smoke observations, or override the default scope with `RECALLNEST_CC_SMOKE_SCOPE=project:your-scope`.
124
+
125
+ ## Troubleshooting
126
+
127
+ | Issue | Fix |
128
+ |-------|-----|
129
+ | `search_memory` or `resume_context` not found | Restart CC after editing `~/.claude.json` |
130
+ | Empty results | Run `bun run ingest --source all`, then `bun run seed:continuity` to load the canonical continuity baseline |
131
+ | Fresh windows still feel stateless | Check that `~/.claude/CLAUDE.md` contains the `recallnest-continuity` managed block |
132
+ | `lm doctor` warns that continuity baseline is missing | Run `bun run seed:continuity` from the RecallNest repo root |
133
+ | MCP connection error | Check that `bun` is in your PATH and RecallNest path is correct |
@@ -0,0 +1,31 @@
1
+ ## RecallNest Continuity
2
+
3
+ - These continuity rules override later generic writing, skill, and local-memory instructions whenever the user's intent is continuity recovery or memory recall.
4
+ - If the user says `continue`, `继续`, `接着`, `刚才`, `上个窗口`, `不要让我重复前情`, `之前讨论过`, or asks what the project is solving / where it stopped / what to do next, call `resume_context` before any Bash, Read, or repo exploration.
5
+ - If the user starts a concrete task in an active project, returns to a named project, or asks for prior implementation detail, do lightweight RecallNest recovery before repo exploration even without an explicit `continue`: call `resume_context` for broad continuity or `search_memory` for focused fact/pattern recall.
6
+ - Do not substitute `git status`, `git log`, or reading local docs for `resume_context`. Local inspection can validate current code state only after continuity has been recovered.
7
+ - Use `resume_context` to recover stable background such as active projects, durable preferences, recent cases, reusable patterns, and the latest checkpoint.
8
+ - When `scope`, shared project scope, or `sessionId` is known, pass it into `resume_context` / `search_memory` / related recall tools instead of relying on global recall.
9
+ - If `resume_context` returns a resolved scope or latest checkpoint scope, reuse that same scope in follow-up `search_memory`, `brief_memory`, `pin_memory`, and other recall calls.
10
+ - If `resume_context` or a recalled checkpoint mentions repo state such as `git status`, modified files, untracked files, commits, or pending push, treat that as handoff context only. Do not restate it as the current repo state unless you verify it in this window with repo tools.
11
+ - If current repo state has not been verified in this window, say it is unknown or omit it. Do not infer dirty/clean state, staged files, commit readiness, or specific modified files from recalled context alone.
12
+ - In recall-only continuity recovery, do not mention `git status`, modified/untracked filenames, or repo cleanliness just to sound specific. If the next step would need repo inspection, say you would inspect the repo after the user asks you to proceed.
13
+ - Treat startup hooks, restored checkpoints, and recalled notes the same way: unless this window explicitly inspected the repo, they are not evidence for current file lists or worktree state.
14
+ - If the user is asking what you remember about preferences, style, tone, identity, or current project background, answer from `resume_context` and recalled memory first. Do not read repo files or local docs unless the user explicitly asks for file inspection or the recovered context is insufficient.
15
+ - If the message mentions writing, articles, or the public account but the actual intent is recall-only (for example: "what style do you remember", "哪些表达方式要避免", "回忆偏好"), do not activate article-writing workflows, writing-persona files, or content-alchemy style skills. Treat it as a memory recall question unless the user explicitly asks you to draft, edit, or research.
16
+ - Normal writing requests are unchanged: if the user explicitly asks you to draft an article, revise copy, research a topic, or continue the writing pipeline, you should use the existing writing workflows and skills as usual.
17
+ - For recall-only writing/style questions, do not supplement the answer with local memory indexes, quick-reference blocks, `writing-persona.md`, `writing-rules.md`, or similar local style docs. If RecallNest recalled only one preference, answer from that one preference.
18
+ - For recall-only preference questions, prefer a plain `resume_context` call over writing-specific profiles or broader rulesets unless the user explicitly asks for the full writing system.
19
+ - If `resume_context` returns `Response mode: recall-only` or a recall-only guidance line, follow it literally. Restate the recalled stable context briefly and do not add extra examples, banned words, or inferred style rules unless they were also recalled.
20
+ - If `resume_context` already returns a relevant durable preference for the current task, keep the answer narrow. Do not pad it with older pins, briefs, or local rule files unless the user asks for a broader ruleset.
21
+ - For recall-only questions, stay constrained to the recalled items. Do not expand one recalled preference into a full doctrine, banned-word list, or writing system unless those details were also recalled or the user explicitly asks for expansion.
22
+ - If recalled context is sparse, say what you do remember and what is still uncertain. Do not invent extra rules to sound complete.
23
+ - For task pivots or fresh implementation work inside the same project, run a lightweight `search_memory` using 2-3 key nouns or verbs from the user's request before repo exploration drifts.
24
+ - If `resume_context` is not enough and you need a specific fact, follow up with `search_memory` using 2-3 key nouns or verbs instead of full sentences.
25
+ - If the user explicitly corrects a continuity miss, such as saying you should have resumed context first or should have saved a checkpoint before stopping, fix the workflow first and then call `workflow_observe` with outcome `corrected` so the miss is tracked outside durable memory.
26
+ - Before leaving a window with unfinished or resumable work, call `checkpoint_session` and capture the current summary, decisions, open loops, next actions, and relevant entities.
27
+ - Do not inspect repo state just to make `checkpoint_session` more complete unless the user explicitly asked for repo state in this window. A close-window handoff should prefer an incomplete but verified checkpoint over speculative or freshly-probed repo details.
28
+ - Do not write repo-state claims into `checkpoint_session` unless you actually inspected the repo in this window. A recalled checkpoint mentioning dirty files or pending push is not enough evidence to repeat or persist it.
29
+ - Do not copy or paraphrase unverified repo-state text into `checkpoint_session`, even with caveats like `未在本窗口验证`, `上次看到`, or `according to the earlier checkpoint`. If this window never inspected the repo, omit repo state entirely from the checkpoint.
30
+ - Use `store_memory` when you learn durable profile, preference, entity, or case knowledge that should survive across future windows.
31
+ - Use `store_workflow_pattern` when you discover a reusable multi-step workflow that should become durable `patterns` memory.