agent-recall-core 3.4.31 → 3.4.35

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 (251) hide show
  1. package/README.md +121 -441
  2. package/dist/digest/store.d.ts.map +1 -1
  3. package/dist/digest/store.js +4 -3
  4. package/dist/digest/store.js.map +1 -1
  5. package/dist/display/board-render.d.ts +61 -0
  6. package/dist/display/board-render.d.ts.map +1 -0
  7. package/dist/display/board-render.js +223 -0
  8. package/dist/display/board-render.js.map +1 -0
  9. package/dist/helpers/alignment-patterns.d.ts +10 -0
  10. package/dist/helpers/alignment-patterns.d.ts.map +1 -1
  11. package/dist/helpers/alignment-patterns.js +5 -1
  12. package/dist/helpers/alignment-patterns.js.map +1 -1
  13. package/dist/helpers/blind-spots.d.ts +86 -0
  14. package/dist/helpers/blind-spots.d.ts.map +1 -0
  15. package/dist/helpers/blind-spots.js +205 -0
  16. package/dist/helpers/blind-spots.js.map +1 -0
  17. package/dist/helpers/conflict-scan.d.ts +10 -0
  18. package/dist/helpers/conflict-scan.d.ts.map +1 -1
  19. package/dist/helpers/conflict-scan.js +3 -3
  20. package/dist/helpers/conflict-scan.js.map +1 -1
  21. package/dist/helpers/semantic-match.d.ts +82 -0
  22. package/dist/helpers/semantic-match.d.ts.map +1 -0
  23. package/dist/helpers/semantic-match.js +229 -0
  24. package/dist/helpers/semantic-match.js.map +1 -0
  25. package/dist/index.d.ts +52 -11
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +48 -9
  28. package/dist/index.js.map +1 -1
  29. package/dist/palace/awareness.d.ts +30 -0
  30. package/dist/palace/awareness.d.ts.map +1 -1
  31. package/dist/palace/awareness.js +65 -2
  32. package/dist/palace/awareness.js.map +1 -1
  33. package/dist/palace/consolidate.d.ts.map +1 -1
  34. package/dist/palace/consolidate.js +17 -0
  35. package/dist/palace/consolidate.js.map +1 -1
  36. package/dist/palace/decay-pass.d.ts +46 -0
  37. package/dist/palace/decay-pass.d.ts.map +1 -0
  38. package/dist/palace/decay-pass.js +87 -0
  39. package/dist/palace/decay-pass.js.map +1 -0
  40. package/dist/palace/insights-index.d.ts.map +1 -1
  41. package/dist/palace/insights-index.js +4 -2
  42. package/dist/palace/insights-index.js.map +1 -1
  43. package/dist/palace/skills.d.ts +41 -2
  44. package/dist/palace/skills.d.ts.map +1 -1
  45. package/dist/palace/skills.js +106 -4
  46. package/dist/palace/skills.js.map +1 -1
  47. package/dist/prompts/consolidation-prompt.d.ts +25 -0
  48. package/dist/prompts/consolidation-prompt.d.ts.map +1 -0
  49. package/dist/prompts/consolidation-prompt.js +91 -0
  50. package/dist/prompts/consolidation-prompt.js.map +1 -0
  51. package/dist/storage/archive-prune.d.ts +56 -0
  52. package/dist/storage/archive-prune.d.ts.map +1 -0
  53. package/dist/storage/archive-prune.js +118 -0
  54. package/dist/storage/archive-prune.js.map +1 -0
  55. package/dist/storage/archive-write.d.ts +38 -0
  56. package/dist/storage/archive-write.d.ts.map +1 -0
  57. package/dist/storage/archive-write.js +98 -0
  58. package/dist/storage/archive-write.js.map +1 -0
  59. package/dist/storage/blind-spots-store.d.ts +30 -0
  60. package/dist/storage/blind-spots-store.d.ts.map +1 -0
  61. package/dist/storage/blind-spots-store.js +91 -0
  62. package/dist/storage/blind-spots-store.js.map +1 -0
  63. package/dist/storage/capture-router.d.ts +60 -0
  64. package/dist/storage/capture-router.d.ts.map +1 -0
  65. package/dist/storage/capture-router.js +133 -0
  66. package/dist/storage/capture-router.js.map +1 -0
  67. package/dist/storage/classification.d.ts +32 -0
  68. package/dist/storage/classification.d.ts.map +1 -0
  69. package/dist/storage/classification.js +74 -0
  70. package/dist/storage/classification.js.map +1 -0
  71. package/dist/storage/consolidation-queue.d.ts +39 -0
  72. package/dist/storage/consolidation-queue.d.ts.map +1 -0
  73. package/dist/storage/consolidation-queue.js +120 -0
  74. package/dist/storage/consolidation-queue.js.map +1 -0
  75. package/dist/storage/content-guard.d.ts +74 -0
  76. package/dist/storage/content-guard.d.ts.map +1 -0
  77. package/dist/storage/content-guard.js +179 -0
  78. package/dist/storage/content-guard.js.map +1 -0
  79. package/dist/storage/corrections.d.ts +246 -21
  80. package/dist/storage/corrections.d.ts.map +1 -1
  81. package/dist/storage/corrections.js +605 -56
  82. package/dist/storage/corrections.js.map +1 -1
  83. package/dist/storage/durable-intent.d.ts +49 -0
  84. package/dist/storage/durable-intent.d.ts.map +1 -0
  85. package/dist/storage/durable-intent.js +124 -0
  86. package/dist/storage/durable-intent.js.map +1 -0
  87. package/dist/storage/filelock.d.ts +6 -0
  88. package/dist/storage/filelock.d.ts.map +1 -1
  89. package/dist/storage/filelock.js +6 -1
  90. package/dist/storage/filelock.js.map +1 -1
  91. package/dist/storage/memory-protocol.d.ts +19 -0
  92. package/dist/storage/memory-protocol.d.ts.map +1 -0
  93. package/dist/storage/memory-protocol.js +101 -0
  94. package/dist/storage/memory-protocol.js.map +1 -0
  95. package/dist/storage/paths.d.ts +23 -0
  96. package/dist/storage/paths.d.ts.map +1 -1
  97. package/dist/storage/paths.js +39 -0
  98. package/dist/storage/paths.js.map +1 -1
  99. package/dist/storage/retention.d.ts +23 -0
  100. package/dist/storage/retention.d.ts.map +1 -0
  101. package/dist/storage/retention.js +48 -0
  102. package/dist/storage/retention.js.map +1 -0
  103. package/dist/storage/session.d.ts +2 -2
  104. package/dist/storage/session.d.ts.map +1 -1
  105. package/dist/storage/session.js +11 -1
  106. package/dist/storage/session.js.map +1 -1
  107. package/dist/supabase/config.d.ts +8 -0
  108. package/dist/supabase/config.d.ts.map +1 -1
  109. package/dist/supabase/config.js +5 -0
  110. package/dist/supabase/config.js.map +1 -1
  111. package/dist/supabase/recall-backend.d.ts +1 -0
  112. package/dist/supabase/recall-backend.d.ts.map +1 -1
  113. package/dist/supabase/recall-backend.js +13 -13
  114. package/dist/supabase/recall-backend.js.map +1 -1
  115. package/dist/supabase/sync.d.ts.map +1 -1
  116. package/dist/supabase/sync.js +30 -3
  117. package/dist/supabase/sync.js.map +1 -1
  118. package/dist/tools-logic/bootstrap.d.ts +15 -0
  119. package/dist/tools-logic/bootstrap.d.ts.map +1 -1
  120. package/dist/tools-logic/bootstrap.js +238 -47
  121. package/dist/tools-logic/bootstrap.js.map +1 -1
  122. package/dist/tools-logic/brief.d.ts +84 -0
  123. package/dist/tools-logic/brief.d.ts.map +1 -0
  124. package/dist/tools-logic/brief.js +193 -0
  125. package/dist/tools-logic/brief.js.map +1 -0
  126. package/dist/tools-logic/check-action.d.ts +9 -0
  127. package/dist/tools-logic/check-action.d.ts.map +1 -1
  128. package/dist/tools-logic/check-action.js +31 -2
  129. package/dist/tools-logic/check-action.js.map +1 -1
  130. package/dist/tools-logic/check.d.ts +7 -0
  131. package/dist/tools-logic/check.d.ts.map +1 -1
  132. package/dist/tools-logic/check.js +24 -2
  133. package/dist/tools-logic/check.js.map +1 -1
  134. package/dist/tools-logic/confidence.d.ts +50 -0
  135. package/dist/tools-logic/confidence.d.ts.map +1 -0
  136. package/dist/tools-logic/confidence.js +70 -0
  137. package/dist/tools-logic/confidence.js.map +1 -0
  138. package/dist/tools-logic/drill-down.d.ts +37 -0
  139. package/dist/tools-logic/drill-down.d.ts.map +1 -0
  140. package/dist/tools-logic/drill-down.js +63 -0
  141. package/dist/tools-logic/drill-down.js.map +1 -0
  142. package/dist/tools-logic/export-corrections.d.ts +63 -0
  143. package/dist/tools-logic/export-corrections.d.ts.map +1 -0
  144. package/dist/tools-logic/export-corrections.js +124 -0
  145. package/dist/tools-logic/export-corrections.js.map +1 -0
  146. package/dist/tools-logic/journal-capture.d.ts.map +1 -1
  147. package/dist/tools-logic/journal-capture.js +4 -1
  148. package/dist/tools-logic/journal-capture.js.map +1 -1
  149. package/dist/tools-logic/journal-write.d.ts.map +1 -1
  150. package/dist/tools-logic/journal-write.js +3 -2
  151. package/dist/tools-logic/journal-write.js.map +1 -1
  152. package/dist/tools-logic/memory-query.d.ts +10 -3
  153. package/dist/tools-logic/memory-query.d.ts.map +1 -1
  154. package/dist/tools-logic/memory-query.js +31 -7
  155. package/dist/tools-logic/memory-query.js.map +1 -1
  156. package/dist/tools-logic/mirror-builder.d.ts +115 -0
  157. package/dist/tools-logic/mirror-builder.d.ts.map +1 -0
  158. package/dist/tools-logic/mirror-builder.js +348 -0
  159. package/dist/tools-logic/mirror-builder.js.map +1 -0
  160. package/dist/tools-logic/palace-write.d.ts.map +1 -1
  161. package/dist/tools-logic/palace-write.js +3 -2
  162. package/dist/tools-logic/palace-write.js.map +1 -1
  163. package/dist/tools-logic/pipeline-close.d.ts.map +1 -1
  164. package/dist/tools-logic/pipeline-close.js +2 -1
  165. package/dist/tools-logic/pipeline-close.js.map +1 -1
  166. package/dist/tools-logic/pipeline-open.d.ts.map +1 -1
  167. package/dist/tools-logic/pipeline-open.js +2 -1
  168. package/dist/tools-logic/pipeline-open.js.map +1 -1
  169. package/dist/tools-logic/predict-correction.d.ts +47 -0
  170. package/dist/tools-logic/predict-correction.d.ts.map +1 -0
  171. package/dist/tools-logic/predict-correction.js +137 -0
  172. package/dist/tools-logic/predict-correction.js.map +1 -0
  173. package/dist/tools-logic/prior-builder.d.ts +27 -0
  174. package/dist/tools-logic/prior-builder.d.ts.map +1 -0
  175. package/dist/tools-logic/prior-builder.js +57 -0
  176. package/dist/tools-logic/prior-builder.js.map +1 -0
  177. package/dist/tools-logic/recognition-builder.d.ts +116 -0
  178. package/dist/tools-logic/recognition-builder.d.ts.map +1 -0
  179. package/dist/tools-logic/recognition-builder.js +289 -0
  180. package/dist/tools-logic/recognition-builder.js.map +1 -0
  181. package/dist/tools-logic/safety-consolidation.d.ts +104 -0
  182. package/dist/tools-logic/safety-consolidation.d.ts.map +1 -0
  183. package/dist/tools-logic/safety-consolidation.js +256 -0
  184. package/dist/tools-logic/safety-consolidation.js.map +1 -0
  185. package/dist/tools-logic/session-end-reflect.d.ts +18 -0
  186. package/dist/tools-logic/session-end-reflect.d.ts.map +1 -1
  187. package/dist/tools-logic/session-end-reflect.js +68 -29
  188. package/dist/tools-logic/session-end-reflect.js.map +1 -1
  189. package/dist/tools-logic/session-end.d.ts +9 -0
  190. package/dist/tools-logic/session-end.d.ts.map +1 -1
  191. package/dist/tools-logic/session-end.js +111 -13
  192. package/dist/tools-logic/session-end.js.map +1 -1
  193. package/dist/tools-logic/session-start-lite.d.ts +2 -0
  194. package/dist/tools-logic/session-start-lite.d.ts.map +1 -1
  195. package/dist/tools-logic/session-start-lite.js +10 -0
  196. package/dist/tools-logic/session-start-lite.js.map +1 -1
  197. package/dist/tools-logic/session-start.d.ts +46 -0
  198. package/dist/tools-logic/session-start.d.ts.map +1 -1
  199. package/dist/tools-logic/session-start.js +96 -3
  200. package/dist/tools-logic/session-start.js.map +1 -1
  201. package/dist/tools-logic/skill-propose.d.ts +27 -0
  202. package/dist/tools-logic/skill-propose.d.ts.map +1 -0
  203. package/dist/tools-logic/skill-propose.js +66 -0
  204. package/dist/tools-logic/skill-propose.js.map +1 -0
  205. package/dist/tools-logic/skill-recall.d.ts +5 -0
  206. package/dist/tools-logic/skill-recall.d.ts.map +1 -1
  207. package/dist/tools-logic/skill-recall.js +14 -1
  208. package/dist/tools-logic/skill-recall.js.map +1 -1
  209. package/dist/tools-logic/smart-recall.d.ts +17 -0
  210. package/dist/tools-logic/smart-recall.d.ts.map +1 -1
  211. package/dist/tools-logic/smart-recall.js +51 -16
  212. package/dist/tools-logic/smart-recall.js.map +1 -1
  213. package/dist/tools-logic/store-doctor.d.ts +71 -0
  214. package/dist/tools-logic/store-doctor.d.ts.map +1 -0
  215. package/dist/tools-logic/store-doctor.js +387 -0
  216. package/dist/tools-logic/store-doctor.js.map +1 -0
  217. package/dist/tools-logic/store-repair.d.ts +64 -0
  218. package/dist/tools-logic/store-repair.d.ts.map +1 -0
  219. package/dist/tools-logic/store-repair.js +243 -0
  220. package/dist/tools-logic/store-repair.js.map +1 -0
  221. package/dist/tools-logic/supersession.d.ts +34 -0
  222. package/dist/tools-logic/supersession.d.ts.map +1 -0
  223. package/dist/tools-logic/supersession.js +103 -0
  224. package/dist/tools-logic/supersession.js.map +1 -0
  225. package/dist/types.d.ts +7 -1
  226. package/dist/types.d.ts.map +1 -1
  227. package/dist/types.js +1 -1
  228. package/dist/vector/local-vector-backend.d.ts.map +1 -1
  229. package/dist/vector/local-vector-backend.js +14 -17
  230. package/dist/vector/local-vector-backend.js.map +1 -1
  231. package/package.json +1 -1
  232. package/dist/relevance/injector.d.ts +0 -51
  233. package/dist/relevance/injector.d.ts.map +0 -1
  234. package/dist/relevance/injector.js +0 -121
  235. package/dist/relevance/injector.js.map +0 -1
  236. package/dist/relevance/precision.d.ts +0 -109
  237. package/dist/relevance/precision.d.ts.map +0 -1
  238. package/dist/relevance/precision.js +0 -279
  239. package/dist/relevance/precision.js.map +0 -1
  240. package/dist/relevance/promoter.d.ts +0 -60
  241. package/dist/relevance/promoter.d.ts.map +0 -1
  242. package/dist/relevance/promoter.js +0 -336
  243. package/dist/relevance/promoter.js.map +0 -1
  244. package/dist/relevance/stager.d.ts +0 -61
  245. package/dist/relevance/stager.d.ts.map +0 -1
  246. package/dist/relevance/stager.js +0 -251
  247. package/dist/relevance/stager.js.map +0 -1
  248. package/dist/relevance/surfacer.d.ts +0 -34
  249. package/dist/relevance/surfacer.d.ts.map +0 -1
  250. package/dist/relevance/surfacer.js +0 -333
  251. package/dist/relevance/surfacer.js.map +0 -1
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
+ **English** · [中文](README.zh-CN.md)
2
+
1
3
  <h1 align="center">AgentRecall</h1>
2
4
 
3
5
  <p align="center"><strong>Your agent doesn't just remember. It learns how you think.</strong></p>
4
- <p align="center"><strong>你的 agent 不只是记得。它在学你怎么想。</strong></p>
5
- <p align="center">Every correction saved is a mistake never repeated. Every insight compounded is tokens never wasted rebuilding context.<br/>每一次纠正都是不会重复的错误。每一次复合都是不会重建的上下文。</p>
6
+ <p align="center">Every correction saved is a mistake never repeated. Every insight compounded is tokens never wasted rebuilding context.</p>
6
7
  <p align="center">Persistent, compounding memory + automatic correction capture. MCP server + SDK + CLI.</p>
7
8
 
8
9
  <p align="center">
@@ -11,226 +12,88 @@
11
12
  <a href="https://www.npmjs.com/package/agent-recall-sdk"><img src="https://img.shields.io/npm/v/agent-recall-sdk?style=flat-square&label=SDK&color=0EA5E9" alt="SDK npm"></a>
12
13
  <a href="https://www.npmjs.com/package/agent-recall-cli"><img src="https://img.shields.io/npm/v/agent-recall-cli?style=flat-square&label=CLI&color=10B981" alt="CLI npm"></a>
13
14
  <a href="https://github.com/Goldentrii/AgentRecall/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square" alt="License"></a>
14
- <a href="https://lobehub.com/mcp/goldentrii-agentrecall"><img src="https://lobehub.com/badge/mcp/goldentrii-agentrecall" alt="MCP Badge"></a>
15
- <img src="https://img.shields.io/badge/MCP-18_tools-orange?style=flat-square" alt="Tools">
15
+ <img src="https://img.shields.io/badge/MCP-5_tools_default-orange?style=flat-square" alt="Tools">
16
16
  <img src="https://img.shields.io/badge/memory_layers-5-7C3AED?style=flat-square" alt="5 layers">
17
- <img src="https://img.shields.io/badge/cloud-zero-blue?style=flat-square" alt="Zero Cloud">
18
- <img src="https://img.shields.io/badge/Obsidian-compatible-7C3AED?style=flat-square" alt="Obsidian">
17
+ <img src="https://img.shields.io/badge/cloud-zero_by_default-blue?style=flat-square" alt="Zero cloud by default">
19
18
  <img src="https://img.shields.io/badge/decay-FSRS--lite-3B82F6?style=flat-square" alt="FSRS-lite decay">
20
- <img src="https://img.shields.io/badge/retrieval-Hopfield_%2B_RRF-8B5CF6?style=flat-square" alt="Hopfield retrieval">
19
+ <img src="https://img.shields.io/badge/retrieval-keyword_%2B_RRF-8B5CF6?style=flat-square" alt="Keyword + RRF retrieval">
21
20
  <img src="https://img.shields.io/badge/feedback-precision_KPI-F59E0B?style=flat-square" alt="Precision KPI">
22
21
  </p>
23
22
 
24
23
  <p align="center">
25
- <b>EN:</b>&nbsp;
26
- <a href="#what-why--什么和为什么">Why</a> ·
27
- <a href="#5-memory-layers--五层记忆模型">Memory</a> ·
28
- <a href="#quick-start--快速开始">Install</a> ·
29
- <a href="#18-mcp-tools--18-个-mcp-工具">Tools</a> ·
30
- <a href="#how-memory-compounds--记忆如何复合">Compounding</a> ·
31
- <a href="#whats-new-in-phase-6--phase-6-新增">Phase 6</a> ·
32
- <a href="#sdk-api">SDK</a> ·
33
- <a href="#cli">CLI</a> ·
34
- <a href="#architecture--架构">Arch</a>
35
- &nbsp;&nbsp;|&nbsp;&nbsp;
36
- <b>中文:</b>&nbsp;
37
- <a href="#what-why--什么和为什么">什么</a> ·
38
- <a href="#5-memory-layers--五层记忆模型">记忆模型</a> ·
39
- <a href="#quick-start--快速开始">安装</a> ·
40
- <a href="#18-mcp-tools--18-个-mcp-工具">工具</a> ·
41
- <a href="#how-memory-compounds--记忆如何复合">复合</a> ·
42
- <a href="#whats-new-in-phase-6--phase-6-新增">新增</a>
43
- </p>
44
-
45
- ---
46
-
47
- <p align="center">
48
- <a href="#the-session-loop--会话循环"><img src="https://img.shields.io/badge/%2Farstatus-START_HERE-22C55E?style=for-the-badge" alt="/arstatus"></a>
49
- <a href="#the-session-loop--会话循环"><img src="https://img.shields.io/badge/%2Farstart-Load_Context-4ECDC4?style=for-the-badge" alt="/arstart"></a>
50
- <a href="#the-session-loop--会话循环"><img src="https://img.shields.io/badge/%2Farsave-Save_Session-FF6B6B?style=for-the-badge" alt="/arsave"></a>
51
- <a href="#the-session-loop--会话循环"><img src="https://img.shields.io/badge/%2Farsaveall-Batch_Save-FFD93D?style=for-the-badge" alt="/arsaveall"></a>
52
- <a href="#already-using-another-memory-system--已经用过别的"><img src="https://img.shields.io/badge/%2Farbootstrap-Transfer_Memory-8B5CF6?style=for-the-badge" alt="/arbootstrap"></a>
24
+ <a href="#the-session-loop"><img src="https://img.shields.io/badge/%2Farstatus-START_HERE-22C55E?style=for-the-badge" alt="/arstatus"></a>
25
+ <a href="#the-session-loop"><img src="https://img.shields.io/badge/%2Farstart-Load_Context-4ECDC4?style=for-the-badge" alt="/arstart"></a>
26
+ <a href="#the-session-loop"><img src="https://img.shields.io/badge/%2Farsave-Save_Session-FF6B6B?style=for-the-badge" alt="/arsave"></a>
27
+ <a href="#the-session-loop"><img src="https://img.shields.io/badge/%2Farsaveall-Batch_Save-FFD93D?style=for-the-badge" alt="/arsaveall"></a>
28
+ <a href="#the-session-loop"><img src="https://img.shields.io/badge/%2Farbootstrap-Transfer_Memory-8B5CF6?style=for-the-badge" alt="/arbootstrap"></a>
53
29
  </p>
54
30
 
55
- ---
56
-
57
- ## What & Why · 什么和为什么
31
+ <details>
32
+ <summary>🤖 <b>Agent found this repo?</b> Install AgentRecall for your human (click to expand)</summary>
58
33
 
59
- <table>
60
- <tr>
61
- <th width="50%">🇬🇧 English</th>
62
- <th width="50%">🇨🇳 中文</th>
63
- </tr>
64
- <tr>
65
- <td>
34
+ **1. Install the MCP server** (Claude Code):
66
35
 
67
- **AgentRecall is not a memory tool. It's a learning loop.**
36
+ ```bash
37
+ claude mcp add --scope user agent-recall -- npx -y agent-recall-mcp
38
+ ```
68
39
 
69
- Memory is the mechanism. Understanding is the goal. Every time you correct your agent — *"no, not that version"*, *"put this section first"*, *"ask me before you assume"* — that correction is stored, weighted, and recalled next time.
40
+ Generic MCP JSON for other clients:
70
41
 
71
- After 10 sessions, your agent doesn't just remember your project. It understands how you think: your priorities, your communication style, your non-negotiables.
42
+ ```json
43
+ { "mcpServers": { "agent-recall": { "command": "npx", "args": ["-y", "agent-recall-mcp"] } } }
44
+ ```
72
45
 
73
- </td>
74
- <td>
46
+ **2. First message of every new session**, run the loop:
75
47
 
76
- **AgentRecall 不是记忆工具,是学习闭环。**
48
+ ```
49
+ At the start of a session, call session_start to load context.
50
+ When the human corrects you, call remember with type "correction".
51
+ At the end of a session, call session_end to compound what you learned.
52
+ ```
77
53
 
78
- 记忆是机制,理解才是目标。每一次纠正——*"不是那个版本"*、*"先放这一段"*、*"假设之前先问我"*——都会被存储、加权、并在下次召回。
54
+ </details>
79
55
 
80
- 跑 10 次会话之后,agent 不只是记得项目,它理解你的思考方式:优先级、沟通风格、不可妥协的底线。
56
+ ---
81
57
 
82
- </td>
83
- </tr>
84
- <tr>
85
- <td>
58
+ ## What & Why
86
59
 
87
- **Five things that make it different:**
60
+ **AgentRecall is not a memory tool. It's a learning loop.** Memory is the mechanism; understanding is the goal. Every time you correct your agent — *"no, not that version"*, *"put this section first"*, *"ask me before you assume"* — that correction is stored, weighted, and recalled next time. After 10 sessions your agent doesn't just remember your project; it understands how you think.
88
61
 
89
- - **Correction-first.** When you say "no, that's wrong", we log a `CorrectionRecord` with severity, holder, and evidence. After N confirmations across sessions, it auto-promotes to a cross-project insight.
62
+ - **Correction-first.** When you say "no, that's wrong", we log a `CorrectionRecord` with severity, holder, and evidence. After N confirmations across sessions it auto-promotes to a cross-project insight.
90
63
  - **Measurable learning loop.** Every correction tracks `retrieved_count`, `heeded_count`, `recurrence_count`, `precision`. The KPI that matters: *did the same bug recur after we warned about it?*
91
- - **Five memory types.** Episodic, semantic, procedural, narrative, correction — mapped to canonical cognitive-psychology taxonomy (Squire 2004, Tulving 1972).
92
- - **Local markdown only.** Everything lives in `~/.agent-recall/`. Open it in Obsidian. Grep it in the terminal. Version it in git. No cloud, no API keys, no lock-in.
93
- - **Backed by published math.** FSRS-lite decay (Ebbinghaus → SuperMemo → FSRS-6), Modern Hopfield retrieval (Ramsauer 2020), RRF fusion (Cormack 2009).
64
+ - **Five memory types.** Episodic, semantic, procedural, narrative, correction — mapped to the canonical cognitive-psychology taxonomy (Squire 2004, Tulving 1972).
65
+ - **Local markdown, local by default.** Everything lives in `~/.agent-recall/`. Open it in Obsidian, grep it in the terminal, version it in git. The default keyword + RRF retrieval is fully local — zero cloud, no API keys, no lock-in. Semantic vector search is **optional**: set `OPENAI_API_KEY` and query/content text is sent to OpenAI for embeddings. Leave it unset and nothing leaves your machine.
66
+ - **Backed by published math.** FSRS-lite decay (Ebbinghaus → SuperMemo → FSRS-6), RRF fusion (Cormack 2009). A Modern Hopfield re-rank primitive (Ramsauer 2020) ships in the codebase but is **not** wired into the default retrieval path — what runs today is BM25/keyword + RRF, plus optional vector search.
94
67
 
95
- </td>
96
- <td>
68
+ > **The Automaticity Law.** Memory only compounds if it's used *automatically*, not on demand. Measured on the live corpus: push channels (`session_start`, `session_end`, correction hooks) show repeated behavior-changing usage, while pull channels had **zero** organic calls across 44 projects over weeks of real use — including from the agent that built them. That's why only 5 tools ship by default; the two-verb model (inhale/exhale) carries all the compounding value, and everything else is opt-in via `--full`.
97
69
 
98
- **让它不同的五件事:**
99
-
100
- - **以纠正为先。** 你说"不对"时,我们记下 `CorrectionRecord`(严重度、归属、证据)。跨会话被确认 N 次后,自动晋升为跨项目的 insight。
101
- - **可量化的学习闭环。** 每条纠正都跟踪 `retrieved_count`(被召回多少次)、`heeded_count`(被遵守多少次)、`recurrence_count`(同样的 bug 是否复发)、`precision`。唯一重要的 KPI:警告之后同样的 bug 还复发吗?
102
- - **五种记忆类型。** Episodic、semantic、procedural、narrative、correction —— 对应认知心理学经典分类(Squire 2004、Tulving 1972)。
103
- - **只用本地 markdown。** 一切都在 `~/.agent-recall/`。用 Obsidian 打开、用终端 grep、用 git 版本管理。零云、零 API key、零锁定。
104
- - **基于已发表数学。** FSRS-lite 衰减(Ebbinghaus → SuperMemo → FSRS-6)、Modern Hopfield 检索(Ramsauer 2020)、RRF 融合(Cormack 2009)。
105
-
106
- </td>
107
- </tr>
108
- </table>
70
+ > **Injection Precision KPI.** Every correction tracks `precision = heeded / retrieved` — of the times we surfaced this warning, how often did the agent actually act on it? `precision < 0.3` → archive candidate (noise we should stop injecting). `precision ≥ 0.8` → promote faster (high-signal, compound it sooner). This is the measurability claim: a memory system you can prove is working.
109
71
 
110
72
  ---
111
73
 
112
- ## 5 Memory Layers · 五层记忆模型
113
-
114
- The canonical cognitive-psychology taxonomy mapped to your agent's filesystem · 把认知心理学的经典记忆分类映射到你的文件系统:
115
-
116
- <table>
117
- <tr>
118
- <th>Layer · 层</th>
119
- <th>Type · 类型</th>
120
- <th>EN — What it holds</th>
121
- <th>中文 — 存什么</th>
122
- <th>Path</th>
123
- </tr>
124
- <tr>
125
- <td>1</td>
126
- <td><b>Episodic</b><br/>情景</td>
127
- <td>What happened in each session, chronologically. Auto-written by the agent during work.</td>
128
- <td>每次会话发生了什么,按时间顺序。Agent 工作时自动写入。</td>
129
- <td><code>journal/</code></td>
130
- </tr>
131
- <tr>
132
- <td>2</td>
133
- <td><b>Semantic</b><br/>语义</td>
134
- <td>Topic-clustered facts with <code>[[wikilinks]]</code>: Architecture, Goals, Blockers, etc.</td>
135
- <td>按主题聚类的事实,带 <code>[[wikilinks]]</code>:架构、目标、阻塞等。</td>
136
- <td><code>palace/rooms/</code></td>
137
- </tr>
138
- <tr>
139
- <td>3</td>
140
- <td><b>Procedural</b><br/>程序<br/><i>NEW</i></td>
141
- <td>IF-THEN production rules: <i>"When setting up Cloudflare DNS, do these 4 steps."</i> Reusable how-tos.</td>
142
- <td>IF-THEN 产生式规则:"设置 Cloudflare DNS 时,按这 4 步走"。可复用的操作流程。</td>
143
- <td><code>palace/skills/</code></td>
144
- </tr>
145
- <tr>
146
- <td>4</td>
147
- <td><b>Narrative</b><br/>叙事</td>
148
- <td>Project phase milestones: Goal → What was hard → How solved → Synthesis (1-sentence reusable lesson).</td>
149
- <td>项目阶段里程碑:目标 → 难点 → 怎么解决的 → 提炼(一句话可复用的经验)。</td>
150
- <td><code>palace/pipeline/</code></td>
151
- </tr>
152
- <tr>
153
- <td>5</td>
154
- <td><b>Correction</b><br/>纠正</td>
155
- <td>Behavioral calibration: rules the agent must follow, with precision KPIs tracking effectiveness.</td>
156
- <td>行为校准:agent 必须遵守的规则,配合 precision KPI 追踪有效性。</td>
157
- <td><code>corrections/</code></td>
158
- </tr>
159
- <tr>
160
- <td>+</td>
161
- <td><b>Awareness</b><br/>感知</td>
162
- <td>Cross-project insights promoted from N-confirmed corrections. The compounding layer.</td>
163
- <td>跨项目的 insight,由确认 N 次以上的纠正晋升而来。复合层。</td>
164
- <td><code>palace/awareness</code></td>
165
- </tr>
166
- </table>
167
-
168
- All five layers share one **canonical naming grammar** (`<scope>/<type>/[<topic>/]<temporal>--<slug>.md`) so any agent — Claude, Codex, future LLM — can compose retrieval paths from intent instead of grepping five conventions. Existing files keep working via a `legacy_path` virtual-key view. No migration needed.
169
-
170
- 所有五层共享一个 **规范命名语法**(`<scope>/<type>/[<topic>/]<temporal>--<slug>.md`),任何 agent —— Claude、Codex、未来的 LLM —— 都能用意图组合检索路径,不用 grep 五套命名约定。旧文件通过 `legacy_path` 虚拟键视图继续可用。无需迁移。
171
-
172
- ---
74
+ ## Why AgentRecall vs X?
173
75
 
174
- ## The Session Loop · 会话循环
175
-
176
- <table>
177
- <tr>
178
- <th>Command</th>
179
- <th>When · 什么时候</th>
180
- <th>EN What it does</th>
181
- <th>中文 做什么</th>
182
- </tr>
183
- <tr>
184
- <td>🔴 <code>/arstatus</code></td>
185
- <td><b>First — every session</b><br/>每个会话最先</td>
186
- <td>Status board across ALL projects. Pending work, blockers, relevance scores. Pick by number.</td>
187
- <td>所有项目的状态看板。待办、阻塞、相关性分数。按编号选。</td>
188
- </tr>
189
- <tr>
190
- <td><code>/arstart</code></td>
191
- <td>After picking a project<br/>选完项目后</td>
192
- <td>Load deep context: palace rooms, corrections, task-specific recall.</td>
193
- <td>加载深度上下文:palace 房间、纠正记录、任务相关召回。</td>
194
- </tr>
195
- <tr>
196
- <td>🔴 <code>/arsave</code></td>
197
- <td><b>Last — every session</b><br/>每个会话最后</td>
198
- <td>Write journal + palace consolidation + awareness compounding + semantic prefetch.</td>
199
- <td>写 journal + palace 合并 + awareness 复合 + 语义预取。</td>
200
- </tr>
201
- <tr>
202
- <td><code>/arsaveall</code></td>
203
- <td>End of day (multi-session)<br/>一天结束(多会话)</td>
204
- <td>Batch save all parallel sessions — scan, merge, deduplicate, done.</td>
205
- <td>批量保存所有并行会话——扫描、合并、去重、完成。</td>
206
- </tr>
207
- <tr>
208
- <td><code>/arbootstrap</code></td>
209
- <td>First install / migrating<br/>首次安装 / 迁移</td>
210
- <td>Scan your machine for existing projects and import them.</td>
211
- <td>扫描你的机器,把已有项目导入进来。</td>
212
- </tr>
213
- </table>
76
+ | Feature | AgentRecall | Mem0 | Zep | Letta |
77
+ |---|---|---|---|---|
78
+ | Correction tracking + precision KPI | ✅ Core feature | ❌ | ❌ | ❌ |
79
+ | Behavioral calibration across sessions | ✅ | ❌ | ❌ | Partial |
80
+ | Local markdown, zero cloud by default | ✅ (vector search optional, opt-in) | ❌ cloud | ❌ cloud | ❌ cloud |
81
+ | MCP native | ✅ | ✅ | ✅ | ✅ |
82
+ | FSRS-lite decay + keyword/RRF retrieval | ✅ | ❌ | ❌ | ❌ |
83
+ | Free / open source | ✅ MIT | Freemium | Freemium | Apache |
84
+ | Works offline | ✅ (default; vector search needs network) | ❌ | ❌ | Partial |
214
85
 
215
- > **Without `/arstatus`, a fresh agent has zero orientation. Without `/arsave`, nothing compounds. These two are the entire loop.**
216
- > 没有 `/arstatus`,新 agent 完全失去方向。没有 `/arsave`,什么都不会复合。这两个就是整个闭环。
86
+ The difference: AgentRecall is the only system that tracks whether the agent actually acted on a warning not just that it stored one.
217
87
 
218
88
  ---
219
89
 
220
- ## Already Using Another Memory System? · 已经用过别的?
221
-
222
- **`/arbootstrap`** scans your machine and imports everything: git repos, Claude AutoMemory (`~/.claude/projects/`), CLAUDE.md files. Read-only scan, secrets never touched.
90
+ ## Quick Start
223
91
 
224
- **`/arbootstrap`** 扫描你的机器并导入所有:git 仓库、Claude AutoMemory(`~/.claude/projects/`)、CLAUDE.md 文件。只读扫描,secrets 永不触碰。
92
+ > **Visual setup guide — all 13 clients, copy-paste prompts:** open [`warroom/install.html`](warroom/install.html) from the repo (or after unzipping the War Room release) in any browser. No server needed.
225
93
 
226
- ```bash
227
- ar bootstrap # scan and show what was found
228
- ar bootstrap --import # import all new projects
229
- ```
230
-
231
- ---
232
-
233
- ## Quick Start · 快速开始
94
+ <p align="center">
95
+ <img src="warroom/static/install-preview.png" alt="AgentRecall Install Guide" width="900">
96
+ </p>
234
97
 
235
98
  ### MCP Server — for AI agents
236
99
 
@@ -251,7 +114,7 @@ claude mcp add --scope user agent-recall -- npx -y agent-recall-mcp
251
114
  codex mcp add agent-recall -- npx -y agent-recall-mcp
252
115
  ```
253
116
 
254
- **Skill (Claude Code only) · 仅 Claude Code:**
117
+ **Skill (Claude Code only):**
255
118
 
256
119
  ```bash
257
120
  mkdir -p ~/.claude/skills/agent-recall
@@ -259,10 +122,11 @@ curl -o ~/.claude/skills/agent-recall/SKILL.md \
259
122
  https://raw.githubusercontent.com/Goldentrii/AgentRecall/main/SKILL.md
260
123
  ```
261
124
 
262
- ### SDK for JS/TS applications
125
+ ### SDK & CLI
263
126
 
264
127
  ```bash
265
- npm install agent-recall-sdk
128
+ npm install agent-recall-sdk # JS/TS apps
129
+ npx agent-recall-cli recall "topic" # terminal & CI
266
130
  ```
267
131
 
268
132
  ```typescript
@@ -272,296 +136,112 @@ await memory.capture("What stack?", "Next.js + Postgres");
272
136
  const ctx = await memory.recall("rate limiting");
273
137
  ```
274
138
 
275
- ### CLI — for terminal & CI
276
-
277
- ```bash
278
- npx agent-recall-cli capture "What stack?" "Next.js + Postgres"
279
- npx agent-recall-cli recall "rate limiting"
280
- npx agent-recall-cli palace walk --depth active
281
- ```
282
-
283
139
  ---
284
140
 
285
- ## 18 MCP Tools · 18 个 MCP 工具
286
-
287
- <table>
288
- <tr>
289
- <th>Category · 类别</th>
290
- <th>Tool</th>
291
- <th>EN — What it does</th>
292
- <th>中文 — 做什么</th>
293
- </tr>
294
- <tr><td rowspan="6"><b>Core session</b><br/>核心会话</td>
295
- <td><code>session_start</code></td><td>Load context at session start (full or <code>mode:"lite"</code> ≤500 tokens).</td><td>会话开始时加载上下文(完整或 <code>mode:"lite"</code> ≤500 tokens)。</td></tr>
296
- <tr><td><code>session_end</code></td><td>Save journal + insights; optionally close/open a pipeline phase in same call.</td><td>保存 journal + insights;可在同一次调用中关闭/开启 pipeline 阶段。</td></tr>
297
- <tr><td><code>session_end_reflect</code></td><td>Park-2023 reflection bundle — distills last N journals into reusable insights.</td><td>Park-2023 反思包——把最近 N 篇 journal 蒸馏成可复用的 insight。</td></tr>
298
- <tr><td><code>remember</code></td><td>Write a memory, auto-routes to the right palace room.</td><td>写入一条记忆,自动路由到合适的 palace 房间。</td></tr>
299
- <tr><td><code>recall</code></td><td>Search all memory (BM25 + vector with RRF fusion + Hopfield rerank).</td><td>搜索所有记忆(BM25 + 向量 + RRF 融合 + Hopfield 重排)。</td></tr>
300
- <tr><td><code>memory_query</code></td><td>Pull-on-demand recall mid-task. Supports file-scoped queries.</td><td>任务中按需召回。支持按文件范围查询。</td></tr>
301
- <tr><td rowspan="2"><b>Calibration</b><br/>校准</td>
302
- <td><code>check</code></td><td>Record agent understanding; system returns predictive warnings from past corrections.</td><td>记录 agent 的理解;系统返回从过去纠正得出的预测性警告。</td></tr>
303
- <tr><td><code>dashboard_export</code></td><td>Generate agent-readable <code>dashboard.json</code> with all-project memory snapshot + naming index.</td><td>生成 agent 可读的 <code>dashboard.json</code>,包含所有项目记忆快照 + 命名索引。</td></tr>
304
- <tr><td rowspan="5"><b>Pipeline</b><br/>叙事</td>
305
- <td><code>pipeline_open</code></td><td>Open a new project phase (Goal/Hard/Solved/Synthesis).</td><td>开启新的项目阶段(目标/难点/解决/提炼)。</td></tr>
306
- <tr><td><code>pipeline_close</code></td><td>Close active phase with reflection fields. Status: closed / abandoned / pivoted.</td><td>关闭当前阶段并填反思字段。状态:closed / abandoned / pivoted。</td></tr>
307
- <tr><td><code>pipeline_list</code></td><td>List all phases as JSON summaries.</td><td>列出所有阶段(JSON 摘要)。</td></tr>
308
- <tr><td><code>pipeline_current</code></td><td>Return full content of the currently active phase.</td><td>返回当前 active 阶段的完整内容。</td></tr>
309
- <tr><td><code>pipeline_show</code></td><td>Render a project's narrative spine — human-readable view of all phases.</td><td>渲染项目的叙事主干——所有阶段的人类可读视图。</td></tr>
310
- <tr><td rowspan="3"><b>Skills</b><br/>程序记忆</td>
311
- <td><code>skill_write</code></td><td>Save an IF-THEN production rule (trigger / preconditions / steps / postconditions / pitfalls).</td><td>保存一条 IF-THEN 产生式规则(触发条件/前提/步骤/后置条件/陷阱)。</td></tr>
312
- <tr><td><code>skill_recall</code></td><td>Find skills matching an intent (deterministic trigger-keyword ranking).</td><td>按意图找到匹配的 skill(基于触发关键词的确定性排序)。</td></tr>
313
- <tr><td><code>skill_list</code></td><td>Browse all skills in a project.</td><td>浏览项目中所有 skill。</td></tr>
314
- <tr><td><b>Setup</b><br/>初始化</td>
315
- <td><code>bootstrap_scan</code> + <code>bootstrap_import</code></td><td>Discover existing projects on this machine and import in bulk.</td><td>发现本机已有项目并批量导入。</td></tr>
316
- </table>
141
+ ## 5 Memory Layers
317
142
 
318
- ---
143
+ The canonical cognitive-psychology taxonomy mapped to your agent's filesystem:
144
+
145
+ | Layer | Type | What it holds | Path |
146
+ |---|---|---|---|
147
+ | 1 | **Episodic** | What happened in each session, chronologically. Auto-written during work. | `journal/` |
148
+ | 2 | **Semantic** | Topic-clustered facts with `[[wikilinks]]`: Architecture, Goals, Blockers. | `palace/rooms/` |
149
+ | 3 | **Procedural** | IF-THEN production rules — reusable how-tos. | `palace/skills/` |
150
+ | 4 | **Narrative** | Project phases: Goal → What was hard → How solved → Synthesis. | `palace/pipeline/` |
151
+ | 5 | **Correction** | Behavioral calibration: rules the agent must follow, with precision KPIs. | `corrections/` |
152
+ | + | **Awareness** | Cross-project insights promoted from N-confirmed corrections — the compounding layer. | `palace/awareness` |
319
153
 
320
- ## How Memory Compounds · 记忆如何复合
321
-
322
- <table>
323
- <tr>
324
- <th>Mechanism · 机制</th>
325
- <th>EN</th>
326
- <th>中文</th>
327
- </tr>
328
- <tr>
329
- <td><b>Auto-naming</b></td>
330
- <td>Files name themselves from content via canonical grammar — agents compose paths from intent, no guessing.</td>
331
- <td>文件根据内容用规范语法自命名——agent 按意图组合路径,不用猜。</td>
332
- </tr>
333
- <tr>
334
- <td><b>FSRS-lite decay</b></td>
335
- <td><code>R = exp(-days_since_lastConfirmed / S)</code>. Each recall hit reinforces stability. Cold facts get tagged <code>archive_candidate</code> instead of silently growing forever.</td>
336
- <td><code>R = exp(-距上次确认天数 / S)</code>。每次召回命中会强化稳定性。冷的事实会被标 <code>archive_candidate</code>,而不是静默无限增长。</td>
337
- </tr>
338
- <tr>
339
- <td><b>RRF + Hopfield retrieval</b></td>
340
- <td>BM25 + vector merged via RRF (Cormack 2009), then optionally re-ranked by Modern Hopfield (Ramsauer 2020) for associative blend.</td>
341
- <td>BM25 + 向量通过 RRF 融合(Cormack 2009),再可选地用 Modern Hopfield 重排(Ramsauer 2020)做关联融合。</td>
342
- </tr>
343
- <tr>
344
- <td><b>Correction precision KPI</b></td>
345
- <td>Every correction tracks <code>precision = heeded / retrieved</code>. <0.3 → archive candidate (noise). ≥0.8 → promote faster.</td>
346
- <td>每条纠正跟踪 <code>precision = 被遵守 / 被召回</code>。<0.3 → archive 候选(噪声)。≥0.8 → 加速晋升。</td>
347
- </tr>
348
- <tr>
349
- <td><b>Cross-project insights</b></td>
350
- <td>Lessons learned in one project surface when you're working on a similar problem in another. Match by keyword + topic.</td>
351
- <td>一个项目学到的经验,在另一个相似问题上会自动浮现。按关键词 + 主题匹配。</td>
352
- </tr>
353
- <tr>
354
- <td><b>Awareness cap</b></td>
355
- <td>Capped at 200 lines. New insights merge with existing (strengthening) or replace the weakest. After 100 sessions: still 200 lines, but cross-validated.</td>
356
- <td>上限 200 行。新 insight 与已有合并(加强)或替换最弱的。100 次会话之后:仍然 200 行,但都是经过交叉验证的。</td>
357
- </tr>
358
- </table>
154
+ All layers share one **canonical naming grammar** (`<scope>/<type>/[<topic>/]<temporal>--<slug>.md`) so any agent can compose retrieval paths from intent. Existing files keep working via a `legacy_path` view — no migration needed.
359
155
 
360
156
  ---
361
157
 
362
- ## What's New in Phase 6 · Phase 6 新增
363
-
364
- Phase 6 closes 11 structural gaps the field's research literature flagged. Three improvement loops in one pass — 10-vantage research review → implementation → independent code review → fix-up.
365
-
366
- Phase 6 修复了研究文献指出的 11 个结构性缺口。一次完成三个改进循环——10 视角研究审查 → 实现 → 独立代码审查 → 修复。
367
-
368
- <table>
369
- <tr>
370
- <th>Change · 改动</th>
371
- <th>Research grounding · 研究依据</th>
372
- </tr>
373
- <tr>
374
- <td><b>Pipeline layer</b> — project narrative spine with 5 MCP tools<br/><b>叙事层</b> — 项目叙事主干 + 5 个 MCP 工具</td>
375
- <td>Park et al. 2023 (Generative Agents) reflection pattern</td>
376
- </tr>
377
- <tr>
378
- <td><b>Canonical naming system</b> — virtual key + <code>legacy_path</code>, no migration needed<br/><b>规范命名系统</b> — 虚拟键 + <code>legacy_path</code>,无需迁移</td>
379
- <td>Squire 2004 taxonomy + CoALA architecture</td>
380
- </tr>
381
- <tr>
382
- <td><b>Procedural memory (5th layer)</b> — <code>palace/skills/</code> + 3 MCP tools<br/><b>程序记忆(第 5 层)</b> — <code>palace/skills/</code> + 3 个 MCP 工具</td>
383
- <td>Squire 2004 declarative/non-declarative split, ACT-R production rules</td>
384
- </tr>
385
- <tr>
386
- <td><b>Correction outcome KPIs</b> — precision / heeded / recurrence tracking<br/><b>纠正结果 KPI</b> — precision / heeded / recurrence 追踪</td>
387
- <td>Reflexion (Shinn 2023), RLAIF — making the learning loop measurable</td>
388
- </tr>
389
- <tr>
390
- <td><b>FSRS-lite decay scorer</b> — reinforce on recall, decay on staleness<br/><b>FSRS-lite 衰减打分</b> — 召回时强化,过期时衰减</td>
391
- <td>Ebbinghaus 1885 → SuperMemo → FSRS-6 (Anki ≥23.10)</td>
392
- </tr>
393
- <tr>
394
- <td><b>Modern Hopfield re-ranker</b> — <code>ξ_new = X·softmax(β·X^⊤·ξ)</code><br/><b>Modern Hopfield 重排</b> — <code>ξ_new = X·softmax(β·X^⊤·ξ)</code></td>
395
- <td>Ramsauer et al. 2020, exp(d/2) capacity vs classical 0.14·d</td>
396
- </tr>
397
- <tr>
398
- <td><b>session_start lite mode</b> — ≤500 tokens, pull-on-demand<br/><b>session_start lite 模式</b> — ≤500 tokens,按需召回</td>
399
- <td>Anthropic 2026 context engineering — "smallest high-signal set"</td>
400
- </tr>
401
- <tr>
402
- <td><b>Agent-readable dashboard.json</b> — schema_version=1, one-call self-inspection<br/><b>Agent 可读的 dashboard.json</b> — schema_version=1,一次调用自查</td>
403
- <td>Agent-first principle — humans aren't the only readers</td>
404
- </tr>
405
- <tr>
406
- <td><b>Reflection bundle</b> — Park-style aggregation prompt (LLM call happens in the agent's turn, not core)<br/><b>反思包</b> — Park 风格的聚合 prompt(LLM 调用在 agent 自己的 turn 里,不在 core)</td>
407
- <td>Park 2023 §4.3</td>
408
- </tr>
409
- <tr>
410
- <td><b>Security hardening</b> — path traversal blocked, frontmatter YAML escaped, atomic writes, line-walk section parser<br/><b>安全加固</b> — 路径穿越封堵、frontmatter YAML 转义、原子写入、按行解析章节</td>
411
- <td>8-agent red-team P0 findings (2026-05-30)</td>
412
- </tr>
413
- </table>
414
-
415
- Full details: see [`UPDATE-LOG.md`](./UPDATE-LOG.md) Phase 6 section. Visual report: [`REPORT-2026-05-30.html`](./REPORT-2026-05-30.html).
416
-
417
- 完整细节见 [`UPDATE-LOG.md`](./UPDATE-LOG.md) Phase 6 章节。可视化报告:[`REPORT-2026-05-30.html`](./REPORT-2026-05-30.html)。
158
+ ## The Session Loop
418
159
 
419
- ---
160
+ | Command | When | What it does |
161
+ |---|---|---|
162
+ | 🔴 `/arstatus` | **First — every session** | Status board across ALL projects: pending work, blockers, relevance scores. Pick by number. |
163
+ | `/arstart` | After picking a project | Load deep context: palace rooms, corrections, task-specific recall. |
164
+ | 🔴 `/arsave` | **Last — every session** | Write journal + palace consolidation + awareness compounding + semantic prefetch. |
165
+ | `/arsaveall` | End of day (multi-session) | Batch save all parallel sessions — scan, merge, deduplicate, done. |
166
+ | `/arbootstrap` | First install / migrating | Scan your machine for existing projects and import them. |
420
167
 
421
- ## SDK API
168
+ > **Without `/arstatus`, a fresh agent has zero orientation. Without `/arsave`, nothing compounds. These two are the entire loop.**
422
169
 
423
- ```typescript
424
- import { AgentRecall } from "agent-recall-sdk";
170
+ ---
425
171
 
426
- const memory = new AgentRecall({ project: "my-app" });
172
+ ## 🌙 Dreaming Nightly Consolidation (optional)
427
173
 
428
- // Write auto-routes to journal / palace / awareness based on content
429
- await memory.capture("What stack?", "Next.js + Postgres + Drizzle ORM");
430
- await memory.remember("Database: pgvector enabled, RRF fusion for hybrid recall");
431
-
432
- // Read — full hybrid search
433
- const results = await memory.recall("rate limiting");
434
- const filescoped = await memory.recall("auth flow", { file_path: "src/auth.ts" });
435
-
436
- // Reflect — bundle recent journals + corrections for LLM-side distillation
437
- const bundle = await memory.reflect({ lookback_days: 7 });
438
-
439
- // Pipeline — track project narrative
440
- await memory.pipelineOpen({ phase_name: "Discovery", goal: "Map user pain points" });
441
- await memory.pipelineClose({
442
- what_was_hard: "Conflicting signals from interviews",
443
- how_solved: "Triangulated against analytics data",
444
- synthesis: "Behavior > stated preference when they diverge"
445
- });
446
-
447
- // Skills — save and recall procedural know-how
448
- await memory.skillWrite({
449
- name: "Cloudflare 4-step routing",
450
- topic: "deploy",
451
- triggers: ["cloudflare", "dns", "ssl"],
452
- when: "Setting up a new domain with API gateway behind Cloudflare",
453
- steps: ["Add DNS record", "Enable Proxy", "Add Origin Rule", "Set SSL mode = Full"]
454
- });
455
- const hits = await memory.skillRecall({ intent: "set up cloudflare for new domain" });
456
- ```
174
+ An autonomous overnight agent that runs while you sleep and compounds everything your sessions wrote during the day.
457
175
 
458
- ---
176
+ | What it does | Result |
177
+ |---|---|
178
+ | Mine patterns across all projects | Repeated corrections promote to `palace/awareness` |
179
+ | Ebbinghaus salience decay | Low-signal rooms fade; your palace stays sharp |
180
+ | Journal rollups | Entries >30 days compress into summary rooms |
181
+ | Awareness graduation | Corrections confirmed N× times go cross-project |
182
+ | Telegram report | Nightly summary: learned · decayed · crystallized |
459
183
 
460
- ## CLI
184
+ **Requires a live Claude Code login.** If the session expires, dream skips with a Telegram alert.
461
185
 
462
186
  ```bash
463
- # Capture & recall
464
- ar capture "Question" "Answer"
465
- ar recall "topic" # hybrid BM25 + vector + Hopfield re-rank
466
- ar recall "topic" --since 7d # time-filtered
467
-
468
- # Sessions
469
- ar status # status board across all projects
470
- ar save # full session_end (journal + palace + awareness)
471
- ar saveall # batch save all parallel sessions
472
-
473
- # Bootstrap
474
- ar bootstrap # scan and show
475
- ar bootstrap --import # import all new projects
476
-
477
- # Palace navigation
478
- ar palace walk --depth active # browse active rooms
479
- ar palace read goals # read a room
480
-
481
- # Pipeline
482
- ar pipeline show <project> # narrative spine
483
- ar pipeline list <project> # JSON summaries
187
+ # Fix expired login (run this when dreaming stops)
188
+ claude login
484
189
  ```
485
190
 
486
- Run `ar --help` for the full surface · 完整命令运行 `ar --help`.
191
+ Dream reports are saved locally to `~/.agent-recall/dreams/YYYY-MM-DD.md`.
487
192
 
488
193
  ---
489
194
 
490
- ## Architecture · 架构
195
+ ## 🖥️ War Room Dashboard — Download & Deploy
491
196
 
492
- TypeScript monorepo, 4 published packages · TypeScript monorepo,4 个发布包:
197
+ A **local-first visual dashboard** for your memory: an activity calendar, per-project status, corrections, and insights all rendered from your local `~/.agent-recall/` data. Fully offline (vendored assets), no Node and no build step.
493
198
 
494
- ```
495
- packages/
496
- ├── core/ # storage + tool logic + helpers (agent-recall-core)
497
- ├── mcp-server/ # thin MCP wrappers (agent-recall-mcp)
498
- ├── sdk/ # programmatic API for JS/TS apps (agent-recall-sdk)
499
- └── cli/ # `ar` shell command (agent-recall-cli)
500
- ```
199
+ <p align="center">
200
+ <img src="warroom/static/preview.png" alt="AgentRecall War Room — Overview" width="900">
201
+ </p>
501
202
 
502
- **Storage layout · 存储布局:**
203
+ 1. Download **`ar-warroom-v3.4.32.zip`** from the [latest GitHub Release](https://github.com/Goldentrii/AgentRecall/releases/latest).
204
+ 2. Unzip it, then serve it locally:
503
205
 
206
+ ```bash
207
+ cd warroom
208
+ python3 -m http.server 8080
504
209
  ```
505
- ~/.agent-recall/
506
- ├── projects/
507
- │ └── <slug>/
508
- │ ├── journal/ # episodic — per-session entries
509
- │ ├── corrections/ # behavioral rules + outcome KPIs
510
- │ └── palace/
511
- │ ├── rooms/ # semantic — topic-clustered facts
512
- │ ├── skills/ # procedural — IF-THEN rules (NEW)
513
- │ ├── pipeline/ # narrative — project phases (NEW)
514
- │ ├── identity.md
515
- │ └── awareness # cross-project insights
516
- ├── dashboard.html # human-readable dashboard
517
- └── dashboard.json # agent-readable snapshot (NEW)
518
- ```
519
210
 
520
- **Optional Supabase mirror · 可选 Supabase 镜像** — pgvector for semantic recall, RRF fusion when configured. All-local stays the default.
211
+ 3. Open **http://localhost:8080/AgentRecall.html**
212
+
213
+ This is the recommended onboarding for **Hermes / OpenClaw / OpenCode** users too — one offline page to see everything your agent has learned.
521
214
 
522
215
  ---
523
216
 
524
- ## Platform Compatibility · 平台兼容
217
+ ## Architecture
218
+
219
+ TypeScript monorepo, 4 published packages: `core` (storage + tool logic), `mcp-server` (thin MCP wrappers), `sdk` (programmatic API), `cli` (the `ar` command). All memory is local markdown under `~/.agent-recall/projects/<slug>/` — `journal/`, `corrections/`, and `palace/` (rooms, skills, pipeline, awareness). An optional Supabase mirror adds pgvector semantic recall; all-local stays the default.
220
+
221
+ ## Platform Compatibility
525
222
 
526
223
  | Platform | Mechanism | Status |
527
224
  |---|---|---|
528
225
  | Claude Code | MCP server + skill + hooks | ✅ Primary |
529
- | Cursor | MCP server | ✅ |
530
- | Windsurf | MCP server | ✅ |
531
- | VS Code (Copilot) | MCP server | ✅ |
532
- | Codex | MCP server | ✅ |
226
+ | Cursor · Windsurf · VS Code (Copilot) · Codex | MCP server | ✅ |
533
227
  | Any JS/TS app | SDK (`agent-recall-sdk`) | ✅ |
534
228
  | Terminal / CI | CLI (`ar`) | ✅ |
535
229
 
536
230
  ---
537
231
 
538
- ## Docs · 文档
232
+ ## Links
539
233
 
540
- - [`UPDATE-LOG.md`](./UPDATE-LOG.md) — phase-by-phase evolution + design reasoning
541
- - [`REPORT-2026-05-30.html`](./REPORT-2026-05-30.html) — Phase 6 visual report
542
- - [`docs/`](./docs) — command reference, architecture deep-dives
543
- - [`SKILL.md`](./SKILL.md) — Claude Code skill definition
544
-
545
- ---
234
+ - **Full reference** → [README.full.md](README.full.md)
235
+ - **Docs** → [docs/](docs/) — command reference, architecture deep-dives
236
+ - **Changelog** → [UPDATE-LOG.md](UPDATE-LOG.md) — phase-by-phase evolution + design reasoning
237
+ - **Benchmark report** → [REPORT-2026-05-30.html](REPORT-2026-05-30.html) — Phase 6 visual report
238
+ - **Skill** → [SKILL.md](SKILL.md) — Claude Code skill definition
239
+ - **Community** → [Telegram](https://t.me/+ywZwoHrg3AM0NDVi) · [GitHub Issues](https://github.com/Goldentrii/AgentRecall/issues)
546
240
 
547
- ## Community · 社区
241
+ ## Contributing
548
242
 
549
- - 💬 [Telegram](https://t.me/+ywZwoHrg3AM0NDVi)questions, feedback, requests
550
- - 🐛 [GitHub Issues](https://github.com/Goldentrii/AgentRecall/issues) — bugs and feature requests
551
- - 📦 [npm: agent-recall-mcp](https://www.npmjs.com/package/agent-recall-mcp)
552
- - 📦 [npm: agent-recall-sdk](https://www.npmjs.com/package/agent-recall-sdk)
553
- - 📦 [npm: agent-recall-cli](https://www.npmjs.com/package/agent-recall-cli)
554
-
555
- ---
556
-
557
- ## Contributing · 贡献
558
-
559
- PRs welcome. Open an issue first for anything substantive — the design is opinionated and based on published research; we want changes to be grounded the same way.
560
-
561
- 欢迎 PR。任何实质性改动请先开 issue——这个设计有自己的主张,且基于已发表的研究;我们希望改动也能用同样的方式落地。
562
-
563
- ---
243
+ PRs welcome. Open an issue first for anything substantive the design is opinionated and grounded in published research; we want changes grounded the same way.
564
244
 
565
245
  ## License
566
246
 
567
- MIT — see [LICENSE](./LICENSE).
247
+ MIT — see [LICENSE](LICENSE).