@alan512/experienceengine 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (642) hide show
  1. package/.claude-plugin/marketplace.json +0 -0
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.env.example +0 -0
  4. package/.mcp.json +4 -8
  5. package/LICENSE +21 -0
  6. package/README.md +288 -95
  7. package/README.zh-CN.md +316 -65
  8. package/dist/adapters/claude-code/event-store.d.ts +0 -0
  9. package/dist/adapters/claude-code/event-store.js +0 -0
  10. package/dist/adapters/claude-code/event-store.js.map +0 -0
  11. package/dist/adapters/claude-code/hook-normalizer.d.ts +0 -0
  12. package/dist/adapters/claude-code/hook-normalizer.js +0 -0
  13. package/dist/adapters/claude-code/hook-normalizer.js.map +0 -0
  14. package/dist/adapters/claude-code/runtime-projection.d.ts +0 -0
  15. package/dist/adapters/claude-code/runtime-projection.js +0 -0
  16. package/dist/adapters/claude-code/runtime-projection.js.map +0 -0
  17. package/dist/adapters/claude-code/session-store.d.ts +1 -0
  18. package/dist/adapters/claude-code/session-store.js +24 -1
  19. package/dist/adapters/claude-code/session-store.js.map +1 -1
  20. package/dist/adapters/codex/action-registry.d.ts +84 -0
  21. package/dist/adapters/codex/action-registry.js +277 -0
  22. package/dist/adapters/codex/action-registry.js.map +1 -0
  23. package/dist/adapters/codex/broker-tools.d.ts +114 -0
  24. package/dist/adapters/codex/broker-tools.js +130 -0
  25. package/dist/adapters/codex/broker-tools.js.map +1 -0
  26. package/dist/adapters/codex/instruction-template.d.ts +3 -0
  27. package/dist/adapters/codex/instruction-template.js +12 -0
  28. package/dist/adapters/codex/instruction-template.js.map +1 -0
  29. package/dist/adapters/codex/mcp-server.d.ts +59 -41
  30. package/dist/adapters/codex/mcp-server.js +177 -728
  31. package/dist/adapters/codex/mcp-server.js.map +1 -1
  32. package/dist/analyzer/candidate-signals.d.ts +3 -1
  33. package/dist/analyzer/candidate-signals.js +159 -0
  34. package/dist/analyzer/candidate-signals.js.map +1 -1
  35. package/dist/analyzer/experience-analyzer.d.ts +0 -0
  36. package/dist/analyzer/experience-analyzer.js +0 -0
  37. package/dist/analyzer/experience-analyzer.js.map +0 -0
  38. package/dist/analyzer/extraction-evidence.d.ts +0 -0
  39. package/dist/analyzer/extraction-evidence.js +0 -0
  40. package/dist/analyzer/extraction-evidence.js.map +0 -0
  41. package/dist/analyzer/llm-learning-gate.d.ts +12 -1
  42. package/dist/analyzer/llm-learning-gate.js +672 -16
  43. package/dist/analyzer/llm-learning-gate.js.map +1 -1
  44. package/dist/analyzer/node-deduper.d.ts +0 -0
  45. package/dist/analyzer/node-deduper.js +0 -0
  46. package/dist/analyzer/node-deduper.js.map +0 -0
  47. package/dist/analyzer/node-normalizer.d.ts +0 -0
  48. package/dist/analyzer/node-normalizer.js +0 -0
  49. package/dist/analyzer/node-normalizer.js.map +0 -0
  50. package/dist/analyzer/storage-gate.d.ts +0 -0
  51. package/dist/analyzer/storage-gate.js +0 -0
  52. package/dist/analyzer/storage-gate.js.map +0 -0
  53. package/dist/analyzer/strategy-extractor.d.ts +0 -0
  54. package/dist/analyzer/strategy-extractor.js +0 -0
  55. package/dist/analyzer/strategy-extractor.js.map +0 -0
  56. package/dist/analyzer/warning-extractor.d.ts +0 -0
  57. package/dist/analyzer/warning-extractor.js +0 -0
  58. package/dist/analyzer/warning-extractor.js.map +0 -0
  59. package/dist/cli/commands/backup.d.ts +0 -0
  60. package/dist/cli/commands/backup.js +0 -0
  61. package/dist/cli/commands/backup.js.map +0 -0
  62. package/dist/cli/commands/claude-hook.d.ts +0 -0
  63. package/dist/cli/commands/claude-hook.js +23 -7
  64. package/dist/cli/commands/claude-hook.js.map +1 -1
  65. package/dist/cli/commands/codex-mcp-server.d.ts +0 -0
  66. package/dist/cli/commands/codex-mcp-server.js +0 -0
  67. package/dist/cli/commands/codex-mcp-server.js.map +0 -0
  68. package/dist/cli/commands/codex.d.ts +60 -0
  69. package/dist/cli/commands/codex.js +188 -0
  70. package/dist/cli/commands/codex.js.map +1 -0
  71. package/dist/cli/commands/config.d.ts +0 -0
  72. package/dist/cli/commands/config.js +88 -2
  73. package/dist/cli/commands/config.js.map +1 -1
  74. package/dist/cli/commands/cool.d.ts +0 -0
  75. package/dist/cli/commands/cool.js +0 -0
  76. package/dist/cli/commands/cool.js.map +0 -0
  77. package/dist/cli/commands/disable.d.ts +0 -0
  78. package/dist/cli/commands/disable.js +0 -0
  79. package/dist/cli/commands/disable.js.map +0 -0
  80. package/dist/cli/commands/doctor.d.ts +4 -28
  81. package/dist/cli/commands/doctor.js +156 -68
  82. package/dist/cli/commands/doctor.js.map +1 -1
  83. package/dist/cli/commands/enable.d.ts +0 -0
  84. package/dist/cli/commands/enable.js +0 -0
  85. package/dist/cli/commands/enable.js.map +0 -0
  86. package/dist/cli/commands/evaluate.d.ts +9 -3
  87. package/dist/cli/commands/evaluate.js +31 -5
  88. package/dist/cli/commands/evaluate.js.map +1 -1
  89. package/dist/cli/commands/export.d.ts +0 -0
  90. package/dist/cli/commands/export.js +0 -0
  91. package/dist/cli/commands/export.js.map +0 -0
  92. package/dist/cli/commands/feedback.d.ts +0 -0
  93. package/dist/cli/commands/feedback.js +4 -0
  94. package/dist/cli/commands/feedback.js.map +1 -1
  95. package/dist/cli/commands/import.d.ts +0 -0
  96. package/dist/cli/commands/import.js +0 -0
  97. package/dist/cli/commands/import.js.map +0 -0
  98. package/dist/cli/commands/init.d.ts +28 -0
  99. package/dist/cli/commands/init.js +432 -0
  100. package/dist/cli/commands/init.js.map +1 -0
  101. package/dist/cli/commands/inspect.d.ts +0 -0
  102. package/dist/cli/commands/inspect.js +271 -37
  103. package/dist/cli/commands/inspect.js.map +1 -1
  104. package/dist/cli/commands/install.d.ts +0 -0
  105. package/dist/cli/commands/install.js +9 -0
  106. package/dist/cli/commands/install.js.map +1 -1
  107. package/dist/cli/commands/maintenance.d.ts +0 -0
  108. package/dist/cli/commands/maintenance.js +1 -1
  109. package/dist/cli/commands/maintenance.js.map +1 -1
  110. package/dist/cli/commands/mcp-server.d.ts +0 -0
  111. package/dist/cli/commands/mcp-server.js +4 -0
  112. package/dist/cli/commands/mcp-server.js.map +1 -1
  113. package/dist/cli/commands/models.d.ts +0 -0
  114. package/dist/cli/commands/models.js +0 -0
  115. package/dist/cli/commands/models.js.map +0 -0
  116. package/dist/cli/commands/repair.d.ts +0 -0
  117. package/dist/cli/commands/repair.js +3 -3
  118. package/dist/cli/commands/repair.js.map +1 -1
  119. package/dist/cli/commands/retire.d.ts +0 -0
  120. package/dist/cli/commands/retire.js +0 -0
  121. package/dist/cli/commands/retire.js.map +0 -0
  122. package/dist/cli/commands/rollback.d.ts +0 -0
  123. package/dist/cli/commands/rollback.js +0 -0
  124. package/dist/cli/commands/rollback.js.map +0 -0
  125. package/dist/cli/commands/stats.d.ts +0 -0
  126. package/dist/cli/commands/stats.js +0 -0
  127. package/dist/cli/commands/stats.js.map +0 -0
  128. package/dist/cli/commands/status.d.ts +0 -0
  129. package/dist/cli/commands/status.js +89 -7
  130. package/dist/cli/commands/status.js.map +1 -1
  131. package/dist/cli/commands/upgrade.d.ts +0 -0
  132. package/dist/cli/commands/upgrade.js +0 -0
  133. package/dist/cli/commands/upgrade.js.map +0 -0
  134. package/dist/cli/dispatch.d.ts +0 -0
  135. package/dist/cli/dispatch.js +36 -9
  136. package/dist/cli/dispatch.js.map +1 -1
  137. package/dist/cli/index.d.ts +0 -0
  138. package/dist/cli/index.js.map +0 -0
  139. package/dist/cli/state-model.d.ts +14 -0
  140. package/dist/cli/state-model.js +23 -0
  141. package/dist/cli/state-model.js.map +1 -0
  142. package/dist/config/config-schema.d.ts +209 -0
  143. package/dist/config/config-schema.js +168 -1
  144. package/dist/config/config-schema.js.map +1 -1
  145. package/dist/config/default-config.d.ts +0 -0
  146. package/dist/config/default-config.js +22 -1
  147. package/dist/config/default-config.js.map +1 -1
  148. package/dist/config/load-config.d.ts +0 -0
  149. package/dist/config/load-config.js +91 -2
  150. package/dist/config/load-config.js.map +1 -1
  151. package/dist/config/path-resolver.d.ts +0 -1
  152. package/dist/config/path-resolver.js +0 -2
  153. package/dist/config/path-resolver.js.map +1 -1
  154. package/dist/config/runtime-env.d.ts +8 -0
  155. package/dist/config/runtime-env.js +14 -0
  156. package/dist/config/runtime-env.js.map +1 -0
  157. package/dist/config/secrets-store.d.ts +15 -0
  158. package/dist/config/secrets-store.js +56 -0
  159. package/dist/config/secrets-store.js.map +1 -0
  160. package/dist/config/settings-store.d.ts +29 -0
  161. package/dist/config/settings-store.js +55 -0
  162. package/dist/config/settings-store.js.map +1 -1
  163. package/dist/controller/candidate-retriever.d.ts +49 -2
  164. package/dist/controller/candidate-retriever.js +258 -125
  165. package/dist/controller/candidate-retriever.js.map +1 -1
  166. package/dist/controller/injection-renderer.d.ts +0 -0
  167. package/dist/controller/injection-renderer.js +52 -1
  168. package/dist/controller/injection-renderer.js.map +1 -1
  169. package/dist/controller/injection-scorecard.d.ts +2 -2
  170. package/dist/controller/injection-scorecard.js +47 -1
  171. package/dist/controller/injection-scorecard.js.map +1 -1
  172. package/dist/controller/inline-notice.d.ts +0 -0
  173. package/dist/controller/inline-notice.js +0 -0
  174. package/dist/controller/inline-notice.js.map +0 -0
  175. package/dist/controller/intervention-controller.d.ts +3 -2
  176. package/dist/controller/intervention-controller.js +339 -17
  177. package/dist/controller/intervention-controller.js.map +1 -1
  178. package/dist/controller/lexical-retriever.d.ts +14 -0
  179. package/dist/controller/lexical-retriever.js +117 -0
  180. package/dist/controller/lexical-retriever.js.map +1 -0
  181. package/dist/controller/model-reranker.d.ts +20 -0
  182. package/dist/controller/model-reranker.js +187 -0
  183. package/dist/controller/model-reranker.js.map +1 -0
  184. package/dist/controller/node-ranker.d.ts +0 -0
  185. package/dist/controller/node-ranker.js +1 -0
  186. package/dist/controller/node-ranker.js.map +1 -1
  187. package/dist/controller/policy-enricher.d.ts +10 -0
  188. package/dist/controller/policy-enricher.js +186 -0
  189. package/dist/controller/policy-enricher.js.map +1 -0
  190. package/dist/controller/query-rewrite.d.ts +8 -0
  191. package/dist/controller/query-rewrite.js +69 -0
  192. package/dist/controller/query-rewrite.js.map +1 -0
  193. package/dist/controller/retrieval-context.d.ts +3 -0
  194. package/dist/controller/retrieval-context.js +37 -0
  195. package/dist/controller/retrieval-context.js.map +1 -0
  196. package/dist/controller/second-opinion-gate.d.ts +41 -0
  197. package/dist/controller/second-opinion-gate.js +225 -0
  198. package/dist/controller/second-opinion-gate.js.map +1 -0
  199. package/dist/controller/trigger-evaluator.d.ts +27 -2
  200. package/dist/controller/trigger-evaluator.js +63 -3
  201. package/dist/controller/trigger-evaluator.js.map +1 -1
  202. package/dist/distillation/errors.d.ts +0 -0
  203. package/dist/distillation/errors.js +0 -0
  204. package/dist/distillation/errors.js.map +0 -0
  205. package/dist/distillation/experience-family.d.ts +4 -0
  206. package/dist/distillation/experience-family.js +14 -0
  207. package/dist/distillation/experience-family.js.map +1 -0
  208. package/dist/distillation/host-llm.d.ts +1 -0
  209. package/dist/distillation/host-llm.js +5 -1
  210. package/dist/distillation/host-llm.js.map +1 -1
  211. package/dist/distillation/llm-distiller.d.ts +0 -0
  212. package/dist/distillation/llm-distiller.js +4 -0
  213. package/dist/distillation/llm-distiller.js.map +1 -1
  214. package/dist/distillation/merge-decider.d.ts +0 -0
  215. package/dist/distillation/merge-decider.js +4 -0
  216. package/dist/distillation/merge-decider.js.map +1 -1
  217. package/dist/distillation/model-catalog.d.ts +0 -0
  218. package/dist/distillation/model-catalog.js +0 -0
  219. package/dist/distillation/model-catalog.js.map +0 -0
  220. package/dist/distillation/prompt-contract.d.ts +1 -1
  221. package/dist/distillation/prompt-contract.js +6 -1
  222. package/dist/distillation/prompt-contract.js.map +1 -1
  223. package/dist/distillation/providers/anthropic.d.ts +0 -0
  224. package/dist/distillation/providers/anthropic.js +0 -0
  225. package/dist/distillation/providers/anthropic.js.map +0 -0
  226. package/dist/distillation/providers/azure-openai.d.ts +0 -0
  227. package/dist/distillation/providers/azure-openai.js +0 -0
  228. package/dist/distillation/providers/azure-openai.js.map +0 -0
  229. package/dist/distillation/providers/baidu-qianfan.d.ts +0 -0
  230. package/dist/distillation/providers/baidu-qianfan.js +0 -0
  231. package/dist/distillation/providers/baidu-qianfan.js.map +0 -0
  232. package/dist/distillation/providers/bedrock.d.ts +0 -0
  233. package/dist/distillation/providers/bedrock.js +0 -0
  234. package/dist/distillation/providers/bedrock.js.map +0 -0
  235. package/dist/distillation/providers/dashscope.d.ts +0 -0
  236. package/dist/distillation/providers/dashscope.js +0 -0
  237. package/dist/distillation/providers/dashscope.js.map +0 -0
  238. package/dist/distillation/providers/deepseek.d.ts +0 -0
  239. package/dist/distillation/providers/deepseek.js +0 -0
  240. package/dist/distillation/providers/deepseek.js.map +0 -0
  241. package/dist/distillation/providers/gemini.d.ts +0 -0
  242. package/dist/distillation/providers/gemini.js +5 -1
  243. package/dist/distillation/providers/gemini.js.map +1 -1
  244. package/dist/distillation/providers/google-adc.d.ts +0 -0
  245. package/dist/distillation/providers/google-adc.js +0 -0
  246. package/dist/distillation/providers/google-adc.js.map +0 -0
  247. package/dist/distillation/providers/minimax.d.ts +0 -0
  248. package/dist/distillation/providers/minimax.js +0 -0
  249. package/dist/distillation/providers/minimax.js.map +0 -0
  250. package/dist/distillation/providers/moonshot.d.ts +0 -0
  251. package/dist/distillation/providers/moonshot.js +0 -0
  252. package/dist/distillation/providers/moonshot.js.map +0 -0
  253. package/dist/distillation/providers/openai-compatible-factory.d.ts +0 -0
  254. package/dist/distillation/providers/openai-compatible-factory.js +0 -0
  255. package/dist/distillation/providers/openai-compatible-factory.js.map +0 -0
  256. package/dist/distillation/providers/openai-compatible.d.ts +0 -0
  257. package/dist/distillation/providers/openai-compatible.js +0 -0
  258. package/dist/distillation/providers/openai-compatible.js.map +0 -0
  259. package/dist/distillation/providers/openai.d.ts +0 -0
  260. package/dist/distillation/providers/openai.js +0 -0
  261. package/dist/distillation/providers/openai.js.map +0 -0
  262. package/dist/distillation/providers/openrouter.d.ts +0 -0
  263. package/dist/distillation/providers/openrouter.js +0 -0
  264. package/dist/distillation/providers/openrouter.js.map +0 -0
  265. package/dist/distillation/providers/registry.d.ts +0 -0
  266. package/dist/distillation/providers/registry.js +0 -0
  267. package/dist/distillation/providers/registry.js.map +0 -0
  268. package/dist/distillation/providers/siliconflow.d.ts +0 -0
  269. package/dist/distillation/providers/siliconflow.js +0 -0
  270. package/dist/distillation/providers/siliconflow.js.map +0 -0
  271. package/dist/distillation/providers/tencent-hunyuan.d.ts +0 -0
  272. package/dist/distillation/providers/tencent-hunyuan.js +0 -0
  273. package/dist/distillation/providers/tencent-hunyuan.js.map +0 -0
  274. package/dist/distillation/providers/types.d.ts +0 -0
  275. package/dist/distillation/providers/types.js +0 -0
  276. package/dist/distillation/providers/types.js.map +0 -0
  277. package/dist/distillation/providers/volcengine-ark.d.ts +0 -0
  278. package/dist/distillation/providers/volcengine-ark.js +0 -0
  279. package/dist/distillation/providers/volcengine-ark.js.map +0 -0
  280. package/dist/distillation/providers/zhipu.d.ts +0 -0
  281. package/dist/distillation/providers/zhipu.js +0 -0
  282. package/dist/distillation/providers/zhipu.js.map +0 -0
  283. package/dist/distillation/queue-worker.d.ts +0 -0
  284. package/dist/distillation/queue-worker.js +78 -9
  285. package/dist/distillation/queue-worker.js.map +1 -1
  286. package/dist/distillation/types.d.ts +0 -0
  287. package/dist/distillation/types.js +0 -0
  288. package/dist/distillation/types.js.map +0 -0
  289. package/dist/evaluation/benchmark-report.d.ts +0 -0
  290. package/dist/evaluation/benchmark-report.js +0 -0
  291. package/dist/evaluation/benchmark-report.js.map +0 -0
  292. package/dist/evaluation/benchmark-summary.d.ts +0 -0
  293. package/dist/evaluation/benchmark-summary.js +0 -0
  294. package/dist/evaluation/benchmark-summary.js.map +0 -0
  295. package/dist/evaluation/codex-lifecycle-validation.d.ts +60 -0
  296. package/dist/evaluation/codex-lifecycle-validation.js +233 -0
  297. package/dist/evaluation/codex-lifecycle-validation.js.map +1 -0
  298. package/dist/evaluation/hybrid-phase1-rollout-summary.d.ts +63 -0
  299. package/dist/evaluation/hybrid-phase1-rollout-summary.js +108 -0
  300. package/dist/evaluation/hybrid-phase1-rollout-summary.js.map +1 -0
  301. package/dist/evaluation/hybrid-phase3-gate-metrics.d.ts +26 -0
  302. package/dist/evaluation/hybrid-phase3-gate-metrics.js +23 -0
  303. package/dist/evaluation/hybrid-phase3-gate-metrics.js.map +1 -0
  304. package/dist/evaluation/openclaw-baseline.d.ts +8 -0
  305. package/dist/evaluation/openclaw-baseline.js +27 -0
  306. package/dist/evaluation/openclaw-baseline.js.map +1 -1
  307. package/dist/evaluation/openclaw-scenarios.d.ts +0 -0
  308. package/dist/evaluation/openclaw-scenarios.js +0 -0
  309. package/dist/evaluation/openclaw-scenarios.js.map +0 -0
  310. package/dist/experience-management/governance-observability.d.ts +13 -0
  311. package/dist/experience-management/governance-observability.js +37 -0
  312. package/dist/experience-management/governance-observability.js.map +1 -0
  313. package/dist/experience-management/node-lifecycle-governance.d.ts +8 -0
  314. package/dist/experience-management/node-lifecycle-governance.js +80 -0
  315. package/dist/experience-management/node-lifecycle-governance.js.map +1 -0
  316. package/dist/experience-management/task-management-signals.d.ts +29 -0
  317. package/dist/experience-management/task-management-signals.js +148 -0
  318. package/dist/experience-management/task-management-signals.js.map +1 -0
  319. package/dist/feedback/automatic-attribution.d.ts +0 -0
  320. package/dist/feedback/automatic-attribution.js +0 -0
  321. package/dist/feedback/automatic-attribution.js.map +0 -0
  322. package/dist/feedback/feedback-manager.d.ts +4 -1
  323. package/dist/feedback/feedback-manager.js +11 -22
  324. package/dist/feedback/feedback-manager.js.map +1 -1
  325. package/dist/feedback/harm-detector.d.ts +0 -0
  326. package/dist/feedback/harm-detector.js +0 -0
  327. package/dist/feedback/harm-detector.js.map +0 -0
  328. package/dist/feedback/state-transition.d.ts +6 -1
  329. package/dist/feedback/state-transition.js +14 -2
  330. package/dist/feedback/state-transition.js.map +1 -1
  331. package/dist/feedback/stats-updater.d.ts +0 -0
  332. package/dist/feedback/stats-updater.js +0 -0
  333. package/dist/feedback/stats-updater.js.map +0 -0
  334. package/dist/hybrid/capsule-builder.d.ts +23 -0
  335. package/dist/hybrid/capsule-builder.js +114 -0
  336. package/dist/hybrid/capsule-builder.js.map +1 -0
  337. package/dist/hybrid/explain-provider-client.d.ts +19 -0
  338. package/dist/hybrid/explain-provider-client.js +34 -0
  339. package/dist/hybrid/explain-provider-client.js.map +1 -0
  340. package/dist/hybrid/postmortem-provider-client.d.ts +19 -0
  341. package/dist/hybrid/postmortem-provider-client.js +34 -0
  342. package/dist/hybrid/postmortem-provider-client.js.map +1 -0
  343. package/dist/hybrid/rollout.d.ts +9 -0
  344. package/dist/hybrid/rollout.js +49 -0
  345. package/dist/hybrid/rollout.js.map +1 -0
  346. package/dist/hybrid/router.d.ts +4 -0
  347. package/dist/hybrid/router.js +62 -0
  348. package/dist/hybrid/router.js.map +1 -0
  349. package/dist/hybrid/types.d.ts +140 -0
  350. package/dist/{compiler → hybrid}/types.js +0 -0
  351. package/dist/{packs → hybrid}/types.js.map +1 -1
  352. package/dist/hybrid/validators.d.ts +5 -0
  353. package/dist/hybrid/validators.js +94 -0
  354. package/dist/hybrid/validators.js.map +1 -0
  355. package/dist/hybrid/worker-client.d.ts +61 -0
  356. package/dist/hybrid/worker-client.js +196 -0
  357. package/dist/hybrid/worker-client.js.map +1 -0
  358. package/dist/hybrid/workers/explain-decision-llm.d.ts +8 -0
  359. package/dist/hybrid/workers/explain-decision-llm.js +152 -0
  360. package/dist/hybrid/workers/explain-decision-llm.js.map +1 -0
  361. package/dist/hybrid/workers/explain-decision.d.ts +2 -0
  362. package/dist/hybrid/workers/explain-decision.js +40 -0
  363. package/dist/hybrid/workers/explain-decision.js.map +1 -0
  364. package/dist/hybrid/workers/postmortem-review-llm.d.ts +8 -0
  365. package/dist/hybrid/workers/postmortem-review-llm.js +398 -0
  366. package/dist/hybrid/workers/postmortem-review-llm.js.map +1 -0
  367. package/dist/hybrid/workers/postmortem-review.d.ts +2 -0
  368. package/dist/hybrid/workers/postmortem-review.js +66 -0
  369. package/dist/hybrid/workers/postmortem-review.js.map +1 -0
  370. package/dist/index.d.ts +0 -0
  371. package/dist/index.js +0 -0
  372. package/dist/index.js.map +0 -0
  373. package/dist/input/context-summary-adapter.d.ts +0 -0
  374. package/dist/input/context-summary-adapter.js +0 -0
  375. package/dist/input/context-summary-adapter.js.map +0 -0
  376. package/dist/input/input-adapter.d.ts +0 -0
  377. package/dist/input/input-adapter.js +2 -1
  378. package/dist/input/input-adapter.js.map +1 -1
  379. package/dist/input/outcome-resolver.d.ts +0 -0
  380. package/dist/input/outcome-resolver.js +5 -5
  381. package/dist/input/outcome-resolver.js.map +1 -1
  382. package/dist/input/scope-resolver.d.ts +0 -0
  383. package/dist/input/scope-resolver.js +0 -0
  384. package/dist/input/scope-resolver.js.map +0 -0
  385. package/dist/input/tasktype-resolver.d.ts +0 -0
  386. package/dist/input/tasktype-resolver.js +2 -0
  387. package/dist/input/tasktype-resolver.js.map +1 -1
  388. package/dist/input/tool-event-significance.d.ts +5 -0
  389. package/dist/input/tool-event-significance.js +7 -0
  390. package/dist/input/tool-event-significance.js.map +1 -0
  391. package/dist/install/claude-cli.d.ts +0 -0
  392. package/dist/install/claude-cli.js +0 -0
  393. package/dist/install/claude-cli.js.map +0 -0
  394. package/dist/install/claude-code-doctor.d.ts +8 -2
  395. package/dist/install/claude-code-doctor.js +54 -9
  396. package/dist/install/claude-code-doctor.js.map +1 -1
  397. package/dist/install/claude-code-installer.d.ts +0 -0
  398. package/dist/install/claude-code-installer.js +50 -1
  399. package/dist/install/claude-code-installer.js.map +1 -1
  400. package/dist/install/claude-marketplace-state.d.ts +14 -0
  401. package/dist/install/claude-marketplace-state.js +47 -0
  402. package/dist/install/claude-marketplace-state.js.map +1 -0
  403. package/dist/install/claude-runtime-target.d.ts +0 -0
  404. package/dist/install/claude-runtime-target.js +0 -0
  405. package/dist/install/claude-runtime-target.js.map +0 -0
  406. package/dist/install/codex-cli.d.ts +15 -0
  407. package/dist/install/codex-cli.js +55 -3
  408. package/dist/install/codex-cli.js.map +1 -1
  409. package/dist/install/codex-installer.d.ts +18 -0
  410. package/dist/install/codex-installer.js +91 -1
  411. package/dist/install/codex-installer.js.map +1 -1
  412. package/dist/install/codex-runtime-target.d.ts +0 -0
  413. package/dist/install/codex-runtime-target.js +0 -0
  414. package/dist/install/codex-runtime-target.js.map +0 -0
  415. package/dist/install/host-detection.d.ts +0 -0
  416. package/dist/install/host-detection.js +0 -0
  417. package/dist/install/host-detection.js.map +0 -0
  418. package/dist/install/openclaw-cli.d.ts +11 -0
  419. package/dist/install/openclaw-cli.js +0 -0
  420. package/dist/install/openclaw-cli.js.map +1 -1
  421. package/dist/install/openclaw-installer.d.ts +12 -0
  422. package/dist/install/openclaw-installer.js +198 -31
  423. package/dist/install/openclaw-installer.js.map +1 -1
  424. package/dist/install/public-install.d.ts +14 -4
  425. package/dist/install/public-install.js +20 -7
  426. package/dist/install/public-install.js.map +1 -1
  427. package/dist/install/registry-health.d.ts +0 -0
  428. package/dist/install/registry-health.js +0 -0
  429. package/dist/install/registry-health.js.map +0 -0
  430. package/dist/interaction/operational-actions-service.d.ts +0 -0
  431. package/dist/interaction/operational-actions-service.js +0 -0
  432. package/dist/interaction/operational-actions-service.js.map +0 -0
  433. package/dist/interaction/operational-service.d.ts +0 -0
  434. package/dist/interaction/operational-service.js +0 -0
  435. package/dist/interaction/operational-service.js.map +0 -0
  436. package/dist/interaction/repo-summary.d.ts +3 -17
  437. package/dist/interaction/repo-summary.js +10 -27
  438. package/dist/interaction/repo-summary.js.map +1 -1
  439. package/dist/interaction/service.d.ts +59 -95
  440. package/dist/interaction/service.js +505 -266
  441. package/dist/interaction/service.js.map +1 -1
  442. package/dist/interaction/state-artifact-service.d.ts +0 -0
  443. package/dist/interaction/state-artifact-service.js +0 -0
  444. package/dist/interaction/state-artifact-service.js.map +0 -0
  445. package/dist/maintenance/claude-validate-print.d.ts +0 -0
  446. package/dist/maintenance/claude-validate-print.js +0 -0
  447. package/dist/maintenance/claude-validate-print.js.map +0 -0
  448. package/dist/maintenance/embedding-smoke.d.ts +0 -0
  449. package/dist/maintenance/embedding-smoke.js +0 -0
  450. package/dist/maintenance/embedding-smoke.js.map +0 -0
  451. package/dist/maintenance/redistill-rule-nodes.d.ts +0 -0
  452. package/dist/maintenance/redistill-rule-nodes.js +0 -0
  453. package/dist/maintenance/redistill-rule-nodes.js.map +0 -0
  454. package/dist/maintenance/scope-merge.d.ts +0 -1
  455. package/dist/maintenance/scope-merge.js +0 -20
  456. package/dist/maintenance/scope-merge.js.map +1 -1
  457. package/dist/maintenance/warning-variant-cleanup.d.ts +0 -0
  458. package/dist/maintenance/warning-variant-cleanup.js +0 -0
  459. package/dist/maintenance/warning-variant-cleanup.js.map +0 -0
  460. package/dist/plugin/fixture-sanitizer.d.ts +0 -0
  461. package/dist/plugin/fixture-sanitizer.js +0 -0
  462. package/dist/plugin/fixture-sanitizer.js.map +0 -0
  463. package/dist/plugin/hooks/before-prompt-build.d.ts +1 -0
  464. package/dist/plugin/hooks/before-prompt-build.js +4 -1
  465. package/dist/plugin/hooks/before-prompt-build.js.map +1 -1
  466. package/dist/plugin/hooks/message-sent.d.ts +0 -0
  467. package/dist/plugin/hooks/message-sent.js +0 -0
  468. package/dist/plugin/hooks/message-sent.js.map +0 -0
  469. package/dist/plugin/hooks/tool-result-persist.d.ts +0 -0
  470. package/dist/plugin/hooks/tool-result-persist.js +0 -0
  471. package/dist/plugin/hooks/tool-result-persist.js.map +0 -0
  472. package/dist/plugin/openclaw-install-state.d.ts +39 -0
  473. package/dist/plugin/openclaw-install-state.js +24 -0
  474. package/dist/plugin/openclaw-install-state.js.map +1 -0
  475. package/dist/plugin/openclaw-plugin.d.ts +148 -0
  476. package/dist/plugin/openclaw-plugin.js +98 -7
  477. package/dist/plugin/openclaw-plugin.js.map +1 -1
  478. package/dist/plugin/openclaw-routine-interaction.d.ts +7 -0
  479. package/dist/plugin/openclaw-routine-interaction.js +301 -0
  480. package/dist/plugin/openclaw-routine-interaction.js.map +1 -0
  481. package/dist/plugin/openclaw-runtime-defaults.d.ts +16 -0
  482. package/dist/plugin/openclaw-runtime-defaults.js +16 -0
  483. package/dist/plugin/openclaw-runtime-defaults.js.map +1 -0
  484. package/dist/plugin/runtime-capture.d.ts +0 -0
  485. package/dist/plugin/runtime-capture.js +0 -0
  486. package/dist/plugin/runtime-capture.js.map +0 -0
  487. package/dist/plugin/runtime-helpers.d.ts +0 -0
  488. package/dist/plugin/runtime-helpers.js +0 -0
  489. package/dist/plugin/runtime-helpers.js.map +0 -0
  490. package/dist/runtime/service.d.ts +33 -6
  491. package/dist/runtime/service.js +427 -50
  492. package/dist/runtime/service.js.map +1 -1
  493. package/dist/store/logs/jsonl-logger.d.ts +0 -0
  494. package/dist/store/logs/jsonl-logger.js +0 -0
  495. package/dist/store/logs/jsonl-logger.js.map +0 -0
  496. package/dist/store/sqlite/db.d.ts +0 -0
  497. package/dist/store/sqlite/db.js +37 -0
  498. package/dist/store/sqlite/db.js.map +1 -1
  499. package/dist/store/sqlite/migrations.d.ts +0 -0
  500. package/dist/store/sqlite/migrations.js +0 -0
  501. package/dist/store/sqlite/migrations.js.map +0 -0
  502. package/dist/store/sqlite/repositories/candidate-repo.d.ts +0 -0
  503. package/dist/store/sqlite/repositories/candidate-repo.js +8 -2
  504. package/dist/store/sqlite/repositories/candidate-repo.js.map +1 -1
  505. package/dist/store/sqlite/repositories/distillation-job-repo.d.ts +0 -0
  506. package/dist/store/sqlite/repositories/distillation-job-repo.js +0 -0
  507. package/dist/store/sqlite/repositories/distillation-job-repo.js.map +0 -0
  508. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.d.ts +11 -0
  509. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js +76 -0
  510. package/dist/store/sqlite/repositories/hybrid-invocation-trace-repo.js.map +1 -0
  511. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.d.ts +11 -0
  512. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js +73 -0
  513. package/dist/store/sqlite/repositories/hybrid-review-artifact-repo.js.map +1 -0
  514. package/dist/store/sqlite/repositories/injection-repo.d.ts +1 -0
  515. package/dist/store/sqlite/repositories/injection-repo.js +11 -0
  516. package/dist/store/sqlite/repositories/injection-repo.js.map +1 -1
  517. package/dist/store/sqlite/repositories/input-record-repo.d.ts +3 -0
  518. package/dist/store/sqlite/repositories/input-record-repo.js +35 -0
  519. package/dist/store/sqlite/repositories/input-record-repo.js.map +1 -1
  520. package/dist/store/sqlite/repositories/node-repo.d.ts +3 -0
  521. package/dist/store/sqlite/repositories/node-repo.js +62 -8
  522. package/dist/store/sqlite/repositories/node-repo.js.map +1 -1
  523. package/dist/store/sqlite/repositories/outcome-record-repo.d.ts +0 -0
  524. package/dist/store/sqlite/repositories/outcome-record-repo.js +0 -0
  525. package/dist/store/sqlite/repositories/outcome-record-repo.js.map +0 -0
  526. package/dist/store/sqlite/repositories/review-event-repo.d.ts +0 -0
  527. package/dist/store/sqlite/repositories/review-event-repo.js +0 -0
  528. package/dist/store/sqlite/repositories/review-event-repo.js.map +0 -0
  529. package/dist/store/sqlite/repositories/scope-repo.d.ts +0 -0
  530. package/dist/store/sqlite/repositories/scope-repo.js +0 -0
  531. package/dist/store/sqlite/repositories/scope-repo.js.map +0 -0
  532. package/dist/store/sqlite/repositories/stats-repo.d.ts +0 -0
  533. package/dist/store/sqlite/repositories/stats-repo.js +0 -0
  534. package/dist/store/sqlite/repositories/stats-repo.js.map +0 -0
  535. package/dist/store/sqlite/repositories/task-run-repo.d.ts +2 -0
  536. package/dist/store/sqlite/repositories/task-run-repo.js +18 -2
  537. package/dist/store/sqlite/repositories/task-run-repo.js.map +1 -1
  538. package/dist/store/sqlite/schema.sql +49 -49
  539. package/dist/store/vector/api-embedding-provider.d.ts +2 -0
  540. package/dist/store/vector/api-embedding-provider.js +23 -19
  541. package/dist/store/vector/api-embedding-provider.js.map +1 -1
  542. package/dist/store/vector/embeddings.d.ts +1 -1
  543. package/dist/store/vector/embeddings.js +26 -5
  544. package/dist/store/vector/embeddings.js.map +1 -1
  545. package/dist/store/vector/lancedb.d.ts +0 -0
  546. package/dist/store/vector/lancedb.js +0 -0
  547. package/dist/store/vector/lancedb.js.map +0 -0
  548. package/dist/store/vector/local-provider.d.ts +0 -0
  549. package/dist/store/vector/local-provider.js +0 -0
  550. package/dist/store/vector/local-provider.js.map +0 -0
  551. package/dist/store/vector/node-index.d.ts +0 -0
  552. package/dist/store/vector/node-index.js +0 -0
  553. package/dist/store/vector/node-index.js.map +0 -0
  554. package/dist/store/vector/provider-types.d.ts +0 -0
  555. package/dist/store/vector/provider-types.js +0 -0
  556. package/dist/store/vector/provider-types.js.map +0 -0
  557. package/dist/types/analyzer.d.ts +0 -0
  558. package/dist/types/analyzer.js +0 -0
  559. package/dist/types/analyzer.js.map +0 -0
  560. package/dist/types/domain.d.ts +166 -47
  561. package/dist/types/domain.js +0 -0
  562. package/dist/types/domain.js.map +0 -0
  563. package/dist/types/plugin.d.ts +3 -1
  564. package/dist/types/plugin.js +0 -0
  565. package/dist/types/plugin.js.map +0 -0
  566. package/dist/types/storage.d.ts +0 -0
  567. package/dist/types/storage.js +0 -0
  568. package/dist/types/storage.js.map +0 -0
  569. package/dist/utils/clock.d.ts +0 -0
  570. package/dist/utils/clock.js +0 -0
  571. package/dist/utils/clock.js.map +0 -0
  572. package/dist/utils/errors.d.ts +0 -0
  573. package/dist/utils/errors.js +0 -0
  574. package/dist/utils/errors.js.map +0 -0
  575. package/dist/utils/hashing.d.ts +0 -0
  576. package/dist/utils/hashing.js +0 -0
  577. package/dist/utils/hashing.js.map +0 -0
  578. package/dist/utils/ids.d.ts +0 -0
  579. package/dist/utils/ids.js +0 -0
  580. package/dist/utils/ids.js.map +0 -0
  581. package/dist/utils/text.d.ts +0 -0
  582. package/dist/utils/text.js +0 -0
  583. package/dist/utils/text.js.map +0 -0
  584. package/dist/version/package-version.d.ts +0 -0
  585. package/dist/version/package-version.js +0 -0
  586. package/dist/version/package-version.js.map +0 -0
  587. package/dist/version/remote-release.d.ts +0 -0
  588. package/dist/version/remote-release.js +0 -0
  589. package/dist/version/remote-release.js.map +0 -0
  590. package/docs/releases/v0.1.0.md +0 -0
  591. package/docs/releases/v0.1.1.md +0 -0
  592. package/docs/releases/v0.1.2.md +3 -3
  593. package/docs/releases/v0.1.3.md +95 -0
  594. package/docs/releases/v0.2.0.md +85 -0
  595. package/docs/user-guide.md +263 -133
  596. package/hooks/hooks.json +0 -0
  597. package/openclaw.plugin.json +81 -1
  598. package/package.json +25 -16
  599. package/plugins/claude-code-experienceengine/.claude-plugin/plugin.json +1 -1
  600. package/plugins/claude-code-experienceengine/.mcp.json +4 -3
  601. package/plugins/claude-code-experienceengine/hooks/hooks.json +0 -0
  602. package/plugins/claude-code-experienceengine/scripts/claude-hook.sh +30 -1
  603. package/plugins/claude-code-experienceengine/scripts/install-deps.sh +41 -6
  604. package/scripts/claude-plugin/claude-hook.sh +0 -0
  605. package/scripts/claude-plugin/install-deps.sh +0 -0
  606. package/dist/cli/commands/pack.d.ts +0 -1
  607. package/dist/cli/commands/pack.js +0 -321
  608. package/dist/cli/commands/pack.js.map +0 -1
  609. package/dist/compiler/agents-renderer.d.ts +0 -4
  610. package/dist/compiler/agents-renderer.js +0 -105
  611. package/dist/compiler/agents-renderer.js.map +0 -1
  612. package/dist/compiler/claude-renderer.d.ts +0 -2
  613. package/dist/compiler/claude-renderer.js +0 -40
  614. package/dist/compiler/claude-renderer.js.map +0 -1
  615. package/dist/compiler/codex-renderer.d.ts +0 -2
  616. package/dist/compiler/codex-renderer.js +0 -40
  617. package/dist/compiler/codex-renderer.js.map +0 -1
  618. package/dist/compiler/compiler.d.ts +0 -4
  619. package/dist/compiler/compiler.js +0 -87
  620. package/dist/compiler/compiler.js.map +0 -1
  621. package/dist/compiler/deployer.d.ts +0 -21
  622. package/dist/compiler/deployer.js +0 -64
  623. package/dist/compiler/deployer.js.map +0 -1
  624. package/dist/compiler/github-renderer.d.ts +0 -2
  625. package/dist/compiler/github-renderer.js +0 -63
  626. package/dist/compiler/github-renderer.js.map +0 -1
  627. package/dist/compiler/types.d.ts +0 -45
  628. package/dist/compiler/types.js.map +0 -1
  629. package/dist/interaction/pack-actions-service.d.ts +0 -59
  630. package/dist/interaction/pack-actions-service.js +0 -172
  631. package/dist/interaction/pack-actions-service.js.map +0 -1
  632. package/dist/packs/fs-registry.d.ts +0 -27
  633. package/dist/packs/fs-registry.js +0 -216
  634. package/dist/packs/fs-registry.js.map +0 -1
  635. package/dist/packs/index-sync.d.ts +0 -9
  636. package/dist/packs/index-sync.js +0 -54
  637. package/dist/packs/index-sync.js.map +0 -1
  638. package/dist/packs/types.d.ts +0 -55
  639. package/dist/packs/types.js +0 -2
  640. package/dist/store/sqlite/repositories/pack-repo.d.ts +0 -16
  641. package/dist/store/sqlite/repositories/pack-repo.js +0 -192
  642. package/dist/store/sqlite/repositories/pack-repo.js.map +0 -1
@@ -11,6 +11,19 @@ In practice, this means:
11
11
  - noisy or harmful prior patterns can be cooled or retired
12
12
  - the system gradually learns which guidance is actually useful
13
13
 
14
+ It also means ExperienceEngine separates:
15
+
16
+ - `task history`
17
+ - broad runtime records of what happened
18
+ - `reusable experience`
19
+ - only the subset of tasks that produced transferable decision guidance
20
+
21
+ So a task can be recorded without being promoted into learning.
22
+
23
+ For a focused explanation of what ExperienceEngine stores and how an experience node is governed, see:
24
+
25
+ - [docs/development/experience-model.md](development/experience-model.md)
26
+
14
27
  For a practical end-to-end workflow on a real repository, see:
15
28
 
16
29
  - [docs/development/real-repo-playbook.md](development/real-repo-playbook.md)
@@ -48,6 +61,24 @@ When it injects guidance, you will usually see a lightweight notice like:
48
61
 
49
62
  If there is no intervention, it stays silent.
50
63
 
64
+ When ExperienceEngine is less certain but still sees a credible same-family match, it may choose a conservative injection instead of skipping entirely. In that case the injected block stays smaller by default, but mature low-risk nodes can still include a short `Goal / Steps / Avoid` structure when that makes the guidance more actionable.
65
+
66
+ When you inspect the latest turn, you may also see a learning decision such as:
67
+
68
+ ```text
69
+ Learning status: captured
70
+ Learning reason: provider routing debugging exposed a reusable configuration pattern
71
+ ```
72
+
73
+ or:
74
+
75
+ ```text
76
+ Learning status: rejected
77
+ Learning reason: task stayed in expression-layer refinement: wording, copy, or presentation changes are recorded but not learned
78
+ ```
79
+
80
+ This is intentional. ExperienceEngine now records broad task history, but it only promotes tasks with transferable decision value into the reusable experience pool.
81
+
51
82
  When the host surfaces task-finalization metadata, ExperienceEngine can also show a lightweight feedback reminder after an injected turn so the user can quickly mark whether the hint helped or harmed.
52
83
 
53
84
  You can also turn inline notices off:
@@ -58,76 +89,209 @@ ee config set notices.inline false
58
89
 
59
90
  ## Install And First Run
60
91
 
61
- ExperienceEngine installation is now host-native.
92
+ ExperienceEngine installation now starts from the host you want to use.
62
93
 
63
94
  That means the first installation step belongs to the host you want to use, not to the `ee` CLI.
64
95
 
65
- Install ExperienceEngine through the host-specific flow for:
96
+ Install ExperienceEngine through the host setup flow for:
66
97
 
67
98
  - `OpenClaw`
68
- - planned one-step command:
99
+ - host-native plugin install:
69
100
  - `openclaw plugins install @alan512/experienceengine`
70
- - current status:
71
- - blocked until the public npm package `@alan512/experienceengine` is published
101
+ - after installing, restart the gateway before the first real task:
102
+ - `openclaw gateway restart`
72
103
  - `Codex`
73
- - planned one-step command:
104
+ - EE-managed Codex setup:
105
+ - `ee install codex`
106
+ - native/manual fallback:
74
107
  - `codex mcp add experienceengine --env EXPERIENCE_ENGINE_HOME=$HOME/.experienceengine -- npx -y @alan512/experienceengine codex-mcp-server`
75
- - current status:
76
- - blocked until the public npm package `@alan512/experienceengine` is published
108
+ - after either path, start a new Codex session in this repo so the MCP wiring and `AGENTS.md` instruction block are picked up
77
109
  - `Claude Code`
78
- - add the bundled marketplace from GitHub:
110
+ - host-native marketplace install:
111
+ - add the bundled marketplace from GitHub:
79
112
  - `/plugin marketplace add https://github.com/Alan-512/ExperienceEngine.git`
80
113
  - install the bundled plugin:
81
114
  - `/plugin install experienceengine@experienceengine`
82
115
  - `ee install claude-code` remains the explicit operator fallback when you need direct hooks + MCP wiring outside the marketplace flow
116
+ - after installation, start a new Claude Code session so the plugin hooks and bundled MCP config are loaded
117
+
118
+ Across all three hosts, the intended product journey is the same:
119
+
120
+ 1. install ExperienceEngine through the host-specific setup path
121
+ 2. initialize shared ExperienceEngine state with `ee init`
122
+ 3. restart or open a fresh host session until the repo is `Ready`
123
+ 4. keep routine review and feedback inside the host agent when the host supports it cleanly
124
+ 5. use `ee` as the operator fallback for validation, repair, and deeper inspection
83
125
 
84
- Then use the `ee` CLI for validation and operations:
126
+ The host-specific differences are real, but they sit underneath one shared model:
127
+
128
+ - installation mechanics differ by host
129
+ - routine interaction should feel similar wherever the host supports it
130
+ - CLI remains the explicit fallback and operator surface
131
+
132
+ Then continue using your host agent normally.
133
+
134
+ For most users, ExperienceEngine should stay in the background and be inspected through the host agent itself. Typical prompts are:
135
+
136
+ - "What did ExperienceEngine just inject?"
137
+ - "Why did that ExperienceEngine hint match?"
138
+ - "Mark the last ExperienceEngine intervention as helpful or harmful."
139
+
140
+ OpenClaw also supports these additional phase-2 routine questions in-session:
141
+
142
+ - "Is ExperienceEngine ready here?"
143
+ - "Is ExperienceEngine still warming up in this repo?"
144
+ - "Why didn't ExperienceEngine inject anything just now?"
145
+
146
+ For `OpenClaw`, `Codex`, and `Claude Code`, these routine follow-ups should stay in the host session first.
147
+
148
+ Use the `ee` CLI only when you need explicit validation, repair, or operator-style troubleshooting:
85
149
 
86
150
  ```bash
151
+ ee init
87
152
  ee doctor <openclaw|claude-code|codex>
88
153
  ee status
89
154
  ```
90
155
 
156
+ Use `ee init` once to initialize ExperienceEngine's shared distillation, embedding, and secret state. New host installations should reuse that same shared EE state instead of asking you to re-enter the same API key per host window.
157
+
158
+ In practical terms, the routine loop currently looks like this:
159
+
160
+ - `Codex`
161
+ - ask the host agent first for recent injections, matching reasons, and helped / harmed feedback
162
+ - `Claude Code`
163
+ - ask the host agent first for recent injections, matching reasons, and helped / harmed feedback
164
+ - `OpenClaw`
165
+ - ask the host agent first for recent injections, matching reasons, readiness, warm-up progress, recent silence, and helped / harmed feedback
166
+ - keep CLI/operator fallback for deeper inspection, repair, and advanced management
167
+
168
+ For onboarding and first value, ExperienceEngine now uses a two-layer product model:
169
+
170
+ - `Setup state`
171
+ - `Installed`
172
+ - `Initialized`
173
+ - `Ready`
174
+ - `Value state`
175
+ - `Warming up`
176
+ - `First value reached`
177
+
178
+ These are not one linear state machine.
179
+
180
+ Examples:
181
+
182
+ - a repo can already be `Ready` while still `Warming up`
183
+ - a repo can be `Ready` and already have reached first value
184
+
185
+ In practice:
186
+
187
+ - installation into a host gets you to `Installed`
188
+ - `ee init` moves the shared product state toward `Initialized`
189
+ - a restart or new host session usually completes `Ready`
190
+ - real task activity moves the value layer from `Warming up` toward `First value reached`
191
+
192
+ `First value reached` must be tied to visible output from real work, such as:
193
+
194
+ - a visible real task record
195
+ - a visible learning decision
196
+ - a visible intervention
197
+
198
+ These do **not** count by themselves:
199
+
200
+ - a static onboarding message
201
+ - a generic warm-up explanation
202
+ - a recommendation not tied to a real observed task run
203
+
91
204
  You do **not** need to clone the repository or run `pnpm build` for normal user installation.
92
205
 
93
206
  ### Operational CLI
94
207
 
95
- After a host-native installation succeeds, `ee` becomes the shared operational surface.
208
+ After the host setup succeeds, the host agent remains the primary interaction surface.
96
209
 
97
- Use it for:
210
+ Use `ee` for:
98
211
 
212
+ - one-time shared initialization after the first host setup
99
213
  - installation validation
100
214
  - repair guidance
101
215
  - runtime status checks
102
216
  - learning and intervention inspection
103
217
  - quick helped / harmed feedback
104
218
 
219
+ `ee status` and `ee doctor` now also summarize recent retrieval health in product language. They still show the raw counters, but they additionally explain whether ExperienceEngine is mostly injecting, mostly staying conservative, or still skipping too many close-match tasks in the current repo.
220
+
221
+ Their roles are intentionally different:
222
+
223
+ - `ee status`
224
+ - daily progress view
225
+ - current setup/value state
226
+ - next practical step
227
+ - `ee doctor <host>`
228
+ - explicit validation and troubleshooting
229
+ - install and wiring verification
230
+ - repair-oriented next steps
231
+
232
+ The most useful inspection command during product debugging is still:
233
+
234
+ ```bash
235
+ ee inspect --last
236
+ ```
237
+
238
+ That output now tells you both:
239
+
240
+ - what was injected
241
+ - whether the finalized task was learned, rejected from learning, or only kept as runtime history
242
+ - whether the intervention was a normal injection or a conservative one
243
+ - why ExperienceEngine acted that way in plain language instead of only raw gate fields
244
+ - how trustworthy the selected guidance currently is
245
+
246
+ When you inspect a specific node, ExperienceEngine now also shows a lightweight quality judgment layer:
247
+
248
+ - a `quality band` (`strong`, `building`, or `risky`)
249
+ - the short drivers behind that judgment
250
+ - a compact applicability profile covering best fit, scope validity, confidence, risk, and when to avoid reuse
251
+
105
252
  ## How MCP Interaction Works
106
253
 
107
- For `Codex` and `Claude Code`, ExperienceEngine is designed to work mainly through MCP.
254
+ For `Codex` and `Claude Code`, ExperienceEngine is designed to keep routine review and management inside the host session first.
255
+
256
+ That means after installation, you usually do not leave the agent session to manage ExperienceEngine. Instead, you ask the agent naturally and the host uses its native EE wiring for routine interaction.
257
+
258
+ This is one host-specific implementation of the same shared product model described above:
108
259
 
109
- That means after installation, you usually do not leave the agent session to manage ExperienceEngine. Instead, you ask the agent naturally and the agent can call ExperienceEngine MCP resources, prompts, and tools for you.
260
+ - host-native install or wiring gets the repo to `Installed`
261
+ - shared `ee init` state gets the product to `Initialized`
262
+ - a fresh host session gets the repo to `Ready`
263
+ - routine inspection and feedback stay inside the host when the host supports them cleanly
264
+ - CLI remains the explicit fallback and operator path
110
265
 
111
266
  Typical examples:
112
267
  - "What did ExperienceEngine just inject?"
268
+ - "Why did that ExperienceEngine hint match?"
113
269
  - "Show the recent injected turns."
114
270
  - "List active warning nodes."
115
271
  - "Pause ExperienceEngine for this project."
116
- - "Mark the last ExperienceEngine intervention as harmful."
117
- - "Record quick feedback for the last ExperienceEngine intervention."
272
+ - "Mark the last ExperienceEngine intervention as helpful or harmful."
118
273
  - "Create a backup of ExperienceEngine state."
119
274
  - "Rollback ExperienceEngine to backup `<id>`."
120
275
 
121
276
  ### MCP Interaction Model
122
277
 
123
- ExperienceEngine exposes three MCP categories:
278
+ `Codex` exposes a layered MCP surface:
124
279
 
125
- - `Resources`
126
- - read-only state like last interaction, recent history, nodes, doctor output, update state, and backups
127
- - `Prompts`
128
- - reusable workflows that guide the agent to inspect or manage ExperienceEngine safely
129
- - `Tools`
130
- - executable actions like feedback, scope toggles, node lifecycle changes, and high-impact operations
280
+ - `Direct tools`
281
+ - core loop actions like lookup, recording important tool outcomes, finalize, last-feedback, capabilities, and doctor
282
+ - `Routine read resources`
283
+ - read-only state like last interaction, recent history, repo summary, and routine node views
284
+ - `Brokered advanced actions`
285
+ - lower-frequency inspect, admin, maintenance, and high-impact plan/execute flows exposed through a small broker tool surface instead of many direct schemas
286
+
287
+ For `Codex`, this means routine host-native interaction stays discoverable, while long-tail admin and maintenance actions are reached through brokered actions rather than public prompts or one-tool-per-action registration.
288
+
289
+ `Claude Code` still uses both `hooks` and `MCP`:
290
+
291
+ - hooks drive runtime capture and injection
292
+ - MCP drives inspect, control, and operational interaction
293
+
294
+ So the two hosts share the same product model, but they do not expose the exact same interaction shape.
131
295
 
132
296
  For high-impact actions, ExperienceEngine does not execute immediately. It uses a:
133
297
 
@@ -155,104 +319,17 @@ Today, ExperienceEngine's minimal governance surface is:
155
319
 
156
320
  A dedicated standalone review UI is still deferred. The current product shape is intentionally CLI/MCP-first rather than UI-first.
157
321
 
158
- ## Experience Pack v1
159
-
160
- Experience Pack v1 is a **local shared-directory registry** for reusable experience assets.
322
+ That does not mean every host surface is identical today:
161
323
 
162
- It lets you take a group of already-validated nodes and move them through a minimal lifecycle:
163
-
164
- ```text
165
- draft -> review -> publish -> rollback
166
- ```
167
-
168
- Pack v1 is intentionally local-first:
169
-
170
- - packs live under `~/.experienceengine/packs`
171
- - packs are host-agnostic assets, not host-specific config fragments
172
- - multiple local repos can reuse the same published pack
173
- - there is no team sync, remote distribution, or UI workflow in v1
174
-
175
- Current CLI surface:
176
-
177
- ```bash
178
- ee pack list
179
- ee pack inspect <pack-id>
180
- ee pack status <pack-id> [version] [agents|codex|github|claude] [repo-path]
181
- ee pack draft create <pack-id> <node-id[,node-id...]> [name...]
182
- ee pack review <pack-id> <description...>
183
- ee pack publish <pack-id>
184
- ee pack compile <pack-id> [version]
185
- ee pack compile <pack-id> [version] codex
186
- ee pack compile <pack-id> [version] github
187
- ee pack compile <pack-id> [version] claude
188
- ee pack deploy <pack-id> [version] [agents|codex|github|claude] [repo-path] [--dry-run] [--force] [--status-only]
189
- ee pack rollback <pack-id> <version>
190
- ```
191
-
192
- Use this when you want to turn a set of proven nodes into a managed local asset instead of leaving them only in SQLite state.
193
-
194
- ### Compiler v1
195
-
196
- Compiler v1 turns a published or rolled-back Experience Pack into host-friendly static artifacts.
197
-
198
- It is intentionally conservative:
199
-
200
- - it only reads Pack files that already exist in the local registry
201
- - it only exports a static artifact
202
- - it does **not** auto-write into your repo root
203
-
204
- Example:
205
-
206
- ```bash
207
- ee pack compile auth-debug-pack
208
- ee pack compile auth-debug-pack codex
209
- ee pack compile auth-debug-pack github
210
- ee pack compile auth-debug-pack claude
211
- ee pack deploy auth-debug-pack agents /path/to/repo --dry-run
212
- ee pack deploy auth-debug-pack codex /path/to/repo
213
- ee pack deploy github-pack github /path/to/repo --force
214
- ee pack deploy auth-debug-pack claude /path/to/repo
215
- ee pack deploy auth-debug-pack agents /path/to/repo --status-only
216
- ee pack status auth-debug-pack agents /path/to/repo
217
- ```
218
-
219
- Default output location:
220
-
221
- ```text
222
- ~/.experienceengine/packs/<pack-id>/compiled/<target>/<version>/
223
- ```
224
-
225
- Artifacts produced:
226
-
227
- - `AGENTS.md` for `agents` target
228
- - `CODEX.md` for `codex` target
229
- - `CLAUDE.md` for `claude` target
230
- - `<pack-id>.agent.md` for `github` target
231
- - `compile-report.json`
232
-
233
- Deploying compiled artifacts:
234
-
235
- - `agents` target writes to `<repo>/AGENTS.md`
236
- - `codex` target writes to `<repo>/CODEX.md`
237
- - `claude` target writes to `<repo>/CLAUDE.md`
238
- - `github` target writes to `<repo>/.github/agents/<pack-id>.md`
239
-
240
- Use `--dry-run` to preview the destination without writing files. Existing files are protected by default; use `--force` only when you intentionally want to overwrite the destination. Use `--status-only` to inspect whether the destination is `missing`, `up_to_date`, or `drifted` without writing anything.
241
-
242
- If you only want the deployment state without invoking the deploy command shape, use:
243
-
244
- ```bash
245
- ee pack status <pack-id> [version] [agents|codex|github|claude] [repo-path]
246
- ```
247
-
248
- Compiler visibility is also exposed through:
249
-
250
- - `ee pack list`
251
- - `ee pack inspect <pack-id>`
252
- - `ee inspect learning`
253
- - `ee doctor <adapter>`
254
-
255
- These surfaces show which targets the current Pack version has already compiled, whether a published Pack is stale, and the latest compile target/time.
324
+ - `Codex` and `Claude Code` use MCP-native host interaction for routine use
325
+ - `OpenClaw` now supports six in-session routine interaction families through the plugin path:
326
+ - what was injected
327
+ - why it matched
328
+ - helped / harmed feedback
329
+ - readiness in the current repo
330
+ - warm-up / first-value progress
331
+ - recent silence on the latest turn
332
+ - advanced operator actions still remain more explicit in CLI across all hosts
256
333
 
257
334
  ## Host-Specific Setup
258
335
 
@@ -264,6 +341,14 @@ Before installing ExperienceEngine into any host, make sure the host CLI itself
264
341
 
265
342
  ExperienceEngine wires itself into an existing host environment. It does not install the host CLI for you.
266
343
 
344
+ If you are installing ExperienceEngine into a repo for the first time, prefer:
345
+
346
+ ```bash
347
+ ee install codex
348
+ ```
349
+
350
+ That command wires the shared MCP server and writes the local `AGENTS.md` instruction block for the current repo.
351
+
267
352
  If you are operating or debugging the product directly, the explicit fallback commands still exist:
268
353
 
269
354
  ```bash
@@ -276,7 +361,14 @@ These are operator-facing controls, not the preferred public onboarding path.
276
361
 
277
362
  ## Embedding Retrieval
278
363
 
279
- ExperienceEngine now supports a multi-provider embedding stack for semantic retrieval.
364
+ ExperienceEngine now supports a multi-provider embedding stack inside a staged hybrid retrieval pipeline.
365
+
366
+ Retrieval is now hybrid by default:
367
+
368
+ - query normalization and rewrite happen first so retrieval keeps engineering intent when prompt wording shifts
369
+ - lexical and semantic retrieval are fused into one candidate shortlist instead of treating semantic retrieval as the unquestioned main path
370
+ - policy enrichment stays separate from retrieval scoring, so maturity and governance signals do not replace retrieval evidence
371
+ - reranking can promote a better-matching candidate above older score advantages, especially when an external reranker is configured
280
372
 
281
373
  Default behavior (`embeddingProvider = "api"`):
282
374
 
@@ -287,6 +379,12 @@ Default behavior (`embeddingProvider = "api"`):
287
379
  - if the API provider fails, ExperienceEngine falls back to the managed local model
288
380
  - if the local model fails, ExperienceEngine falls back to legacy hash-based retrieval
289
381
 
382
+ Prompt-time behavior:
383
+
384
+ - first-turn or prompt-only retrieval may not have any tool names or failure signatures yet
385
+ - ExperienceEngine treats those fields as opportunistic evidence, not required retrieval inputs
386
+ - when prompt-only evidence is sparse, lexical, semantic, and policy stages still run with the task summary and context summary alone
387
+
290
388
  Offline behavior (`embeddingProvider = "local"`):
291
389
 
292
390
  - the default local model is `Xenova/multilingual-e5-small`
@@ -332,6 +430,8 @@ ee install openclaw
332
430
  What happens:
333
431
  - ExperienceEngine installs as an OpenClaw plugin/runtime integration (not `src/adapters/`)
334
432
  - OpenClaw runtime events are used for intervention and persistence
433
+ - OpenClaw uses the shared background learning loop by default
434
+ - async hybrid posttask review stays disabled by default unless the runtime is explicitly overridden
335
435
  - management remains mostly through CLI fallback today
336
436
  - install ends with a short cold-start note so users know capture is active before the first formal hint appears
337
437
 
@@ -429,6 +529,9 @@ Useful commands:
429
529
  ```bash
430
530
  ee doctor codex
431
531
  ee upgrade codex
532
+ ee codex exec -C /path/to/repo -s read-only "Say ok and exit."
533
+ printf "Say ok and exit." | ee codex exec -C /path/to/repo -s read-only -
534
+ ee codex exec --ee-session-id ci-smoke-1 -C /path/to/repo -s read-only "Say ok and exit."
432
535
  ```
433
536
 
434
537
  First validation:
@@ -447,6 +550,12 @@ Host note:
447
550
  - ExperienceEngine installs a longer `startup_timeout_sec` for Codex automatically
448
551
  - this avoids MCP handshake failures on slower local startups
449
552
  - if Codex still cannot see ExperienceEngine in new sessions, re-run `ee install codex`
553
+ - `ee codex exec` is a deterministic wrapper for non-interactive runs
554
+ - the wrapper owns `lookup -> child codex exec -> record -> finalize` outside the child process
555
+ - for wrapped runs, ExperienceEngine removes the nested `experienceengine` MCP server from the child Codex config temporarily so lifecycle evidence is not double-written
556
+ - use prompt `-` when you want the wrapper to read task instructions from stdin; child Codex still receives a wrapped prompt argument and does not inherit stdin
557
+ - use `--ee-session-id <id>` when CI or debugging needs a stable ExperienceEngine session id
558
+ - `codex exec review` is not wrapped yet; keep using native Codex review or the MCP/CLI surfaces for review workflows
450
559
 
451
560
  Developer validation docs:
452
561
 
@@ -463,6 +572,11 @@ Even though MCP is the main user interaction model for Claude/Codex, the `ee` CL
463
572
 
464
573
  Use MCP first for normal day-to-day interaction inside Claude/Codex.
465
574
 
575
+ For the common routine loop, keep these actions in the host session first:
576
+ - ask what ExperienceEngine just injected
577
+ - ask why it matched
578
+ - mark the last intervention as helped or harmed
579
+
466
580
  Use `ee` directly when:
467
581
  - the host session cannot currently access MCP
468
582
  - you are scripting or automating locally
@@ -494,7 +608,11 @@ ee rollback <backup-id>
494
608
 
495
609
  ## Doctor, Repair, and Upgrade
496
610
 
497
- Use doctor first if something looks wrong:
611
+ If something feels wrong in normal use, ask the host agent to inspect ExperienceEngine first.
612
+
613
+ Use the `ee` CLI when you need explicit local validation or the host cannot currently surface enough state.
614
+
615
+ CLI fallback:
498
616
 
499
617
  ```bash
500
618
  ee doctor openclaw
@@ -511,7 +629,7 @@ What doctor tells you:
511
629
  - how many raw task records / task runs / pending candidates / formal nodes exist today
512
630
  - the next step to reach first durable value when the system is still warming up
513
631
 
514
- Use repair when host wiring drifted:
632
+ Use repair when host wiring drifted and you need an explicit local recovery step:
515
633
 
516
634
  ```bash
517
635
  ee repair openclaw
@@ -558,7 +676,7 @@ Managed artifacts live under:
558
676
 
559
677
  Use backup when you want a restorable checkpoint of current ExperienceEngine state.
560
678
 
561
- In an MCP-capable host, ask the agent to create a backup. The agent should first show you a plan and only execute after you confirm.
679
+ In an MCP-capable host, ask the agent to create a backup first. The agent should show a plan and only execute after you confirm.
562
680
 
563
681
  CLI fallback:
564
682
 
@@ -587,6 +705,8 @@ Import restores a valid ExperienceEngine snapshot directory.
587
705
 
588
706
  Before import overwrites current ExperienceEngine state, the system creates a safeguard backup automatically.
589
707
 
708
+ In MCP-capable hosts, prefer asking the agent to plan the import first.
709
+
590
710
  CLI fallback:
591
711
 
592
712
  ```bash
@@ -599,6 +719,8 @@ Rollback restores one of the managed backups.
599
719
 
600
720
  Before rollback overwrites current ExperienceEngine state, the system also creates a safeguard backup automatically.
601
721
 
722
+ In MCP-capable hosts, prefer asking the agent to plan the rollback first.
723
+
602
724
  CLI fallback:
603
725
 
604
726
  ```bash
@@ -618,6 +740,11 @@ For risky changes:
618
740
 
619
741
  ### Review what happened last
620
742
 
743
+ For normal day-to-day usage in Claude Code or Codex, ask the host agent first:
744
+
745
+ - "What did ExperienceEngine just inject?"
746
+ - "Why did that ExperienceEngine hint match?"
747
+
621
748
  Fallback CLI:
622
749
 
623
750
  ```bash
@@ -629,11 +756,11 @@ This view now also shows:
629
756
  - origin record ids when they exist
630
757
  - the node evidence summary attached to each injected hint
631
758
 
632
- In MCP-capable hosts, ask:
759
+ ### Review recent injected turns
633
760
 
634
- - "What did ExperienceEngine just inject?"
761
+ In MCP-capable hosts, ask:
635
762
 
636
- ### Review recent injected turns
763
+ - "Show the recent injected ExperienceEngine turns."
637
764
 
638
765
  Fallback CLI:
639
766
 
@@ -641,12 +768,10 @@ Fallback CLI:
641
768
  ee inspect recent injected 10
642
769
  ```
643
770
 
644
- In MCP-capable hosts, ask:
645
-
646
- - "Show the recent injected ExperienceEngine turns."
647
-
648
771
  ### Review current node inventory
649
772
 
773
+ In MCP-capable hosts, ask for the current active strategies or warnings first.
774
+
650
775
  Fallback CLI:
651
776
 
652
777
  ```bash
@@ -658,6 +783,8 @@ ee inspect node <id>
658
783
 
659
784
  ### Manually correct feedback
660
785
 
786
+ In MCP-capable hosts, prefer asking the agent to mark the last intervention as helpful or harmful.
787
+
661
788
  Fallback CLI:
662
789
 
663
790
  ```bash
@@ -673,6 +800,8 @@ ee feedback node <id> harmed
673
800
 
674
801
  ### Temporarily pause interventions
675
802
 
803
+ In MCP-capable hosts, prefer asking the agent to pause or resume ExperienceEngine for the current scope.
804
+
676
805
  Fallback CLI:
677
806
 
678
807
  ```bash
@@ -687,12 +816,13 @@ What is already mature enough to use:
687
816
  - real runtime integration on Claude Code
688
817
  - real runtime integration on Codex
689
818
  - MCP-native inspect/control workflows on Claude/Codex
819
+ - in-session routine review and feedback workflows on OpenClaw
690
820
  - managed state backup and restore over MCP `plan + confirm`
691
821
 
692
822
  What is still intentionally simpler:
693
- - OpenClaw does not yet have the same MCP-native user interaction layer as Claude/Codex
823
+ - OpenClaw does not use the same MCP-native interaction shape as Claude/Codex
694
824
  - user-facing docs are lighter than a full product site
695
- - CLI fallback is still more complete than some host-native surfaces
825
+ - CLI fallback is still more complete than some host-side surfaces
696
826
 
697
827
  ## If Something Feels Wrong
698
828
 
package/hooks/hooks.json CHANGED
File without changes