agentic-qe 3.2.2 → 3.3.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 (381) hide show
  1. package/.claude/agents/v3/qe-accessibility-auditor.md +90 -0
  2. package/.claude/helpers/github-safe.js +10 -10
  3. package/README.md +43 -5
  4. package/package.json +4 -2
  5. package/scripts/cloud-db-config.json +37 -0
  6. package/scripts/cloud-db-connect.sh +37 -0
  7. package/scripts/cloud-db-tunnel.sh +23 -0
  8. package/v3/CHANGELOG.md +165 -0
  9. package/v3/README.md +59 -1
  10. package/v3/assets/agents/v3/qe-accessibility-auditor.md +90 -0
  11. package/v3/dist/adapters/claude-flow/index.d.ts +54 -0
  12. package/v3/dist/adapters/claude-flow/index.d.ts.map +1 -0
  13. package/v3/dist/adapters/claude-flow/index.js +79 -0
  14. package/v3/dist/adapters/claude-flow/index.js.map +1 -0
  15. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts +70 -0
  16. package/v3/dist/adapters/claude-flow/model-router-bridge.d.ts.map +1 -0
  17. package/v3/dist/adapters/claude-flow/model-router-bridge.js +203 -0
  18. package/v3/dist/adapters/claude-flow/model-router-bridge.js.map +1 -0
  19. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts +73 -0
  20. package/v3/dist/adapters/claude-flow/pretrain-bridge.d.ts.map +1 -0
  21. package/v3/dist/adapters/claude-flow/pretrain-bridge.js +276 -0
  22. package/v3/dist/adapters/claude-flow/pretrain-bridge.js.map +1 -0
  23. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts +70 -0
  24. package/v3/dist/adapters/claude-flow/trajectory-bridge.d.ts.map +1 -0
  25. package/v3/dist/adapters/claude-flow/trajectory-bridge.js +205 -0
  26. package/v3/dist/adapters/claude-flow/trajectory-bridge.js.map +1 -0
  27. package/v3/dist/adapters/claude-flow/types.d.ts +99 -0
  28. package/v3/dist/adapters/claude-flow/types.d.ts.map +1 -0
  29. package/v3/dist/adapters/claude-flow/types.js +6 -0
  30. package/v3/dist/adapters/claude-flow/types.js.map +1 -0
  31. package/v3/dist/causal-discovery/causal-graph.d.ts +80 -1
  32. package/v3/dist/causal-discovery/causal-graph.d.ts.map +1 -1
  33. package/v3/dist/causal-discovery/causal-graph.js +111 -1
  34. package/v3/dist/causal-discovery/causal-graph.js.map +1 -1
  35. package/v3/dist/cli/bundle.js +12486 -5503
  36. package/v3/dist/cli/commands/claude-flow-setup.d.ts +82 -0
  37. package/v3/dist/cli/commands/claude-flow-setup.d.ts.map +1 -0
  38. package/v3/dist/cli/commands/claude-flow-setup.js +334 -0
  39. package/v3/dist/cli/commands/claude-flow-setup.js.map +1 -0
  40. package/v3/dist/cli/commands/hooks.d.ts +2 -0
  41. package/v3/dist/cli/commands/hooks.d.ts.map +1 -1
  42. package/v3/dist/cli/commands/hooks.js +13 -2
  43. package/v3/dist/cli/commands/hooks.js.map +1 -1
  44. package/v3/dist/cli/commands/init.d.ts +19 -0
  45. package/v3/dist/cli/commands/init.d.ts.map +1 -0
  46. package/v3/dist/cli/commands/init.js +345 -0
  47. package/v3/dist/cli/commands/init.js.map +1 -0
  48. package/v3/dist/cli/index.js +110 -2
  49. package/v3/dist/cli/index.js.map +1 -1
  50. package/v3/dist/coordination/cross-domain-router.d.ts.map +1 -1
  51. package/v3/dist/coordination/cross-domain-router.js +2 -0
  52. package/v3/dist/coordination/cross-domain-router.js.map +1 -1
  53. package/v3/dist/coordination/mincut/interfaces.d.ts +8 -2
  54. package/v3/dist/coordination/mincut/interfaces.d.ts.map +1 -1
  55. package/v3/dist/coordination/mincut/interfaces.js.map +1 -1
  56. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts +5 -0
  57. package/v3/dist/coordination/mincut/mincut-health-monitor.d.ts.map +1 -1
  58. package/v3/dist/coordination/mincut/mincut-health-monitor.js +22 -4
  59. package/v3/dist/coordination/mincut/mincut-health-monitor.js.map +1 -1
  60. package/v3/dist/coordination/mincut/queen-integration.d.ts +4 -0
  61. package/v3/dist/coordination/mincut/queen-integration.d.ts.map +1 -1
  62. package/v3/dist/coordination/mincut/queen-integration.js +14 -1
  63. package/v3/dist/coordination/mincut/queen-integration.js.map +1 -1
  64. package/v3/dist/coordination/queen-coordinator.d.ts +5 -0
  65. package/v3/dist/coordination/queen-coordinator.d.ts.map +1 -1
  66. package/v3/dist/coordination/queen-coordinator.js +45 -7
  67. package/v3/dist/coordination/queen-coordinator.js.map +1 -1
  68. package/v3/dist/domains/learning-optimization/coordinator.d.ts +5 -0
  69. package/v3/dist/domains/learning-optimization/coordinator.d.ts.map +1 -1
  70. package/v3/dist/domains/learning-optimization/coordinator.js +79 -0
  71. package/v3/dist/domains/learning-optimization/coordinator.js.map +1 -1
  72. package/v3/dist/domains/security-compliance/services/semgrep-integration.d.ts.map +1 -1
  73. package/v3/dist/domains/security-compliance/services/semgrep-integration.js +16 -12
  74. package/v3/dist/domains/security-compliance/services/semgrep-integration.js.map +1 -1
  75. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts +1 -0
  76. package/v3/dist/domains/test-execution/services/e2e-runner.d.ts.map +1 -1
  77. package/v3/dist/domains/test-execution/services/e2e-runner.js +9 -12
  78. package/v3/dist/domains/test-execution/services/e2e-runner.js.map +1 -1
  79. package/v3/dist/domains/test-generation/coherence-gate.d.ts +245 -0
  80. package/v3/dist/domains/test-generation/coherence-gate.d.ts.map +1 -0
  81. package/v3/dist/domains/test-generation/coherence-gate.js +454 -0
  82. package/v3/dist/domains/test-generation/coherence-gate.js.map +1 -0
  83. package/v3/dist/domains/test-generation/coordinator.d.ts +32 -1
  84. package/v3/dist/domains/test-generation/coordinator.d.ts.map +1 -1
  85. package/v3/dist/domains/test-generation/coordinator.js +70 -1
  86. package/v3/dist/domains/test-generation/coordinator.js.map +1 -1
  87. package/v3/dist/domains/test-generation/index.d.ts +1 -0
  88. package/v3/dist/domains/test-generation/index.d.ts.map +1 -1
  89. package/v3/dist/domains/test-generation/index.js +4 -0
  90. package/v3/dist/domains/test-generation/index.js.map +1 -1
  91. package/v3/dist/domains/test-generation/services/index.d.ts +1 -0
  92. package/v3/dist/domains/test-generation/services/index.d.ts.map +1 -1
  93. package/v3/dist/domains/test-generation/services/index.js +2 -0
  94. package/v3/dist/domains/test-generation/services/index.js.map +1 -1
  95. package/v3/dist/domains/visual-accessibility/index.d.ts +2 -1
  96. package/v3/dist/domains/visual-accessibility/index.d.ts.map +1 -1
  97. package/v3/dist/domains/visual-accessibility/index.js +1 -0
  98. package/v3/dist/domains/visual-accessibility/index.js.map +1 -1
  99. package/v3/dist/domains/visual-accessibility/interfaces.d.ts +131 -0
  100. package/v3/dist/domains/visual-accessibility/interfaces.d.ts.map +1 -1
  101. package/v3/dist/domains/visual-accessibility/plugin.d.ts +26 -0
  102. package/v3/dist/domains/visual-accessibility/plugin.d.ts.map +1 -1
  103. package/v3/dist/domains/visual-accessibility/plugin.js +151 -0
  104. package/v3/dist/domains/visual-accessibility/plugin.js.map +1 -1
  105. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts +42 -1
  106. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.d.ts.map +1 -1
  107. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js +69 -0
  108. package/v3/dist/domains/visual-accessibility/services/accessibility-tester.js.map +1 -1
  109. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts +138 -0
  110. package/v3/dist/domains/visual-accessibility/services/eu-compliance.d.ts.map +1 -0
  111. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js +830 -0
  112. package/v3/dist/domains/visual-accessibility/services/eu-compliance.js.map +1 -0
  113. package/v3/dist/domains/visual-accessibility/services/index.d.ts +1 -0
  114. package/v3/dist/domains/visual-accessibility/services/index.d.ts.map +1 -1
  115. package/v3/dist/domains/visual-accessibility/services/index.js +1 -0
  116. package/v3/dist/domains/visual-accessibility/services/index.js.map +1 -1
  117. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts +84 -0
  118. package/v3/dist/init/enhancements/claude-flow-adapter.d.ts.map +1 -0
  119. package/v3/dist/init/enhancements/claude-flow-adapter.js +250 -0
  120. package/v3/dist/init/enhancements/claude-flow-adapter.js.map +1 -0
  121. package/v3/dist/init/enhancements/detector.d.ts +10 -0
  122. package/v3/dist/init/enhancements/detector.d.ts.map +1 -0
  123. package/v3/dist/init/enhancements/detector.js +87 -0
  124. package/v3/dist/init/enhancements/detector.js.map +1 -0
  125. package/v3/dist/init/enhancements/index.d.ts +13 -0
  126. package/v3/dist/init/enhancements/index.d.ts.map +1 -0
  127. package/v3/dist/init/enhancements/index.js +25 -0
  128. package/v3/dist/init/enhancements/index.js.map +1 -0
  129. package/v3/dist/init/enhancements/types.d.ts +93 -0
  130. package/v3/dist/init/enhancements/types.d.ts.map +1 -0
  131. package/v3/dist/init/enhancements/types.js +6 -0
  132. package/v3/dist/init/enhancements/types.js.map +1 -0
  133. package/v3/dist/init/index.d.ts +8 -0
  134. package/v3/dist/init/index.d.ts.map +1 -1
  135. package/v3/dist/init/index.js +4 -0
  136. package/v3/dist/init/index.js.map +1 -1
  137. package/v3/dist/init/migration/config-migrator.d.ts +31 -0
  138. package/v3/dist/init/migration/config-migrator.d.ts.map +1 -0
  139. package/v3/dist/init/migration/config-migrator.js +133 -0
  140. package/v3/dist/init/migration/config-migrator.js.map +1 -0
  141. package/v3/dist/init/migration/data-migrator.d.ts +72 -0
  142. package/v3/dist/init/migration/data-migrator.d.ts.map +1 -0
  143. package/v3/dist/init/migration/data-migrator.js +233 -0
  144. package/v3/dist/init/migration/data-migrator.js.map +1 -0
  145. package/v3/dist/init/migration/detector.d.ts +44 -0
  146. package/v3/dist/init/migration/detector.d.ts.map +1 -0
  147. package/v3/dist/init/migration/detector.js +106 -0
  148. package/v3/dist/init/migration/detector.js.map +1 -0
  149. package/v3/dist/init/migration/index.d.ts +8 -0
  150. package/v3/dist/init/migration/index.d.ts.map +1 -0
  151. package/v3/dist/init/migration/index.js +8 -0
  152. package/v3/dist/init/migration/index.js.map +1 -0
  153. package/v3/dist/init/orchestrator.d.ts +68 -0
  154. package/v3/dist/init/orchestrator.d.ts.map +1 -0
  155. package/v3/dist/init/orchestrator.js +239 -0
  156. package/v3/dist/init/orchestrator.js.map +1 -0
  157. package/v3/dist/init/phases/01-detection.d.ts +30 -0
  158. package/v3/dist/init/phases/01-detection.d.ts.map +1 -0
  159. package/v3/dist/init/phases/01-detection.js +143 -0
  160. package/v3/dist/init/phases/01-detection.js.map +1 -0
  161. package/v3/dist/init/phases/02-analysis.d.ts +18 -0
  162. package/v3/dist/init/phases/02-analysis.d.ts.map +1 -0
  163. package/v3/dist/init/phases/02-analysis.js +28 -0
  164. package/v3/dist/init/phases/02-analysis.js.map +1 -0
  165. package/v3/dist/init/phases/03-configuration.d.ts +26 -0
  166. package/v3/dist/init/phases/03-configuration.d.ts.map +1 -0
  167. package/v3/dist/init/phases/03-configuration.js +98 -0
  168. package/v3/dist/init/phases/03-configuration.js.map +1 -0
  169. package/v3/dist/init/phases/04-database.d.ts +22 -0
  170. package/v3/dist/init/phases/04-database.d.ts.map +1 -0
  171. package/v3/dist/init/phases/04-database.js +88 -0
  172. package/v3/dist/init/phases/04-database.js.map +1 -0
  173. package/v3/dist/init/phases/05-learning.d.ts +28 -0
  174. package/v3/dist/init/phases/05-learning.d.ts.map +1 -0
  175. package/v3/dist/init/phases/05-learning.js +98 -0
  176. package/v3/dist/init/phases/05-learning.js.map +1 -0
  177. package/v3/dist/init/phases/06-code-intelligence.d.ts +33 -0
  178. package/v3/dist/init/phases/06-code-intelligence.d.ts.map +1 -0
  179. package/v3/dist/init/phases/06-code-intelligence.js +115 -0
  180. package/v3/dist/init/phases/06-code-intelligence.js.map +1 -0
  181. package/v3/dist/init/phases/07-hooks.d.ts +27 -0
  182. package/v3/dist/init/phases/07-hooks.d.ts.map +1 -0
  183. package/v3/dist/init/phases/07-hooks.js +209 -0
  184. package/v3/dist/init/phases/07-hooks.js.map +1 -0
  185. package/v3/dist/init/phases/08-mcp.d.ts +22 -0
  186. package/v3/dist/init/phases/08-mcp.d.ts.map +1 -0
  187. package/v3/dist/init/phases/08-mcp.js +62 -0
  188. package/v3/dist/init/phases/08-mcp.js.map +1 -0
  189. package/v3/dist/init/phases/09-assets.d.ts +23 -0
  190. package/v3/dist/init/phases/09-assets.d.ts.map +1 -0
  191. package/v3/dist/init/phases/09-assets.js +82 -0
  192. package/v3/dist/init/phases/09-assets.js.map +1 -0
  193. package/v3/dist/init/phases/10-workers.d.ts +23 -0
  194. package/v3/dist/init/phases/10-workers.d.ts.map +1 -0
  195. package/v3/dist/init/phases/10-workers.js +111 -0
  196. package/v3/dist/init/phases/10-workers.js.map +1 -0
  197. package/v3/dist/init/phases/11-claude-md.d.ts +26 -0
  198. package/v3/dist/init/phases/11-claude-md.d.ts.map +1 -0
  199. package/v3/dist/init/phases/11-claude-md.js +121 -0
  200. package/v3/dist/init/phases/11-claude-md.js.map +1 -0
  201. package/v3/dist/init/phases/12-verification.d.ts +38 -0
  202. package/v3/dist/init/phases/12-verification.d.ts.map +1 -0
  203. package/v3/dist/init/phases/12-verification.js +187 -0
  204. package/v3/dist/init/phases/12-verification.js.map +1 -0
  205. package/v3/dist/init/phases/index.d.ts +46 -0
  206. package/v3/dist/init/phases/index.d.ts.map +1 -0
  207. package/v3/dist/init/phases/index.js +64 -0
  208. package/v3/dist/init/phases/index.js.map +1 -0
  209. package/v3/dist/init/phases/phase-interface.d.ts +193 -0
  210. package/v3/dist/init/phases/phase-interface.d.ts.map +1 -0
  211. package/v3/dist/init/phases/phase-interface.js +119 -0
  212. package/v3/dist/init/phases/phase-interface.js.map +1 -0
  213. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts +9 -3
  214. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.d.ts.map +1 -1
  215. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js +103 -26
  216. package/v3/dist/integrations/agentic-flow/reasoning-bank/experience-replay.js.map +1 -1
  217. package/v3/dist/integrations/coherence/coherence-service.d.ts +323 -0
  218. package/v3/dist/integrations/coherence/coherence-service.d.ts.map +1 -0
  219. package/v3/dist/integrations/coherence/coherence-service.js +799 -0
  220. package/v3/dist/integrations/coherence/coherence-service.js.map +1 -0
  221. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts +170 -0
  222. package/v3/dist/integrations/coherence/engines/category-adapter.d.ts.map +1 -0
  223. package/v3/dist/integrations/coherence/engines/category-adapter.js +403 -0
  224. package/v3/dist/integrations/coherence/engines/category-adapter.js.map +1 -0
  225. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts +159 -0
  226. package/v3/dist/integrations/coherence/engines/causal-adapter.d.ts.map +1 -0
  227. package/v3/dist/integrations/coherence/engines/causal-adapter.js +348 -0
  228. package/v3/dist/integrations/coherence/engines/causal-adapter.js.map +1 -0
  229. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts +174 -0
  230. package/v3/dist/integrations/coherence/engines/cohomology-adapter.d.ts.map +1 -0
  231. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js +401 -0
  232. package/v3/dist/integrations/coherence/engines/cohomology-adapter.js.map +1 -0
  233. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts +201 -0
  234. package/v3/dist/integrations/coherence/engines/homotopy-adapter.d.ts.map +1 -0
  235. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js +324 -0
  236. package/v3/dist/integrations/coherence/engines/homotopy-adapter.js.map +1 -0
  237. package/v3/dist/integrations/coherence/engines/index.d.ts +20 -0
  238. package/v3/dist/integrations/coherence/engines/index.d.ts.map +1 -0
  239. package/v3/dist/integrations/coherence/engines/index.js +26 -0
  240. package/v3/dist/integrations/coherence/engines/index.js.map +1 -0
  241. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts +193 -0
  242. package/v3/dist/integrations/coherence/engines/spectral-adapter.d.ts.map +1 -0
  243. package/v3/dist/integrations/coherence/engines/spectral-adapter.js +476 -0
  244. package/v3/dist/integrations/coherence/engines/spectral-adapter.js.map +1 -0
  245. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts +175 -0
  246. package/v3/dist/integrations/coherence/engines/witness-adapter.d.ts.map +1 -0
  247. package/v3/dist/integrations/coherence/engines/witness-adapter.js +377 -0
  248. package/v3/dist/integrations/coherence/engines/witness-adapter.js.map +1 -0
  249. package/v3/dist/integrations/coherence/index.d.ts +84 -0
  250. package/v3/dist/integrations/coherence/index.d.ts.map +1 -0
  251. package/v3/dist/integrations/coherence/index.js +114 -0
  252. package/v3/dist/integrations/coherence/index.js.map +1 -0
  253. package/v3/dist/integrations/coherence/threshold-tuner.d.ts +396 -0
  254. package/v3/dist/integrations/coherence/threshold-tuner.d.ts.map +1 -0
  255. package/v3/dist/integrations/coherence/threshold-tuner.js +538 -0
  256. package/v3/dist/integrations/coherence/threshold-tuner.js.map +1 -0
  257. package/v3/dist/integrations/coherence/types.d.ts +879 -0
  258. package/v3/dist/integrations/coherence/types.d.ts.map +1 -0
  259. package/v3/dist/integrations/coherence/types.js +134 -0
  260. package/v3/dist/integrations/coherence/types.js.map +1 -0
  261. package/v3/dist/integrations/coherence/wasm-loader.d.ts +351 -0
  262. package/v3/dist/integrations/coherence/wasm-loader.d.ts.map +1 -0
  263. package/v3/dist/integrations/coherence/wasm-loader.js +842 -0
  264. package/v3/dist/integrations/coherence/wasm-loader.js.map +1 -0
  265. package/v3/dist/integrations/embeddings/base/EmbeddingGenerator.d.ts.map +1 -1
  266. package/v3/dist/integrations/embeddings/base/EmbeddingGenerator.js +1 -0
  267. package/v3/dist/integrations/embeddings/base/EmbeddingGenerator.js.map +1 -1
  268. package/v3/dist/integrations/embeddings/base/types.d.ts +1 -1
  269. package/v3/dist/integrations/embeddings/base/types.d.ts.map +1 -1
  270. package/v3/dist/integrations/embeddings/cache/EmbeddingCache.d.ts.map +1 -1
  271. package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js +1 -0
  272. package/v3/dist/integrations/embeddings/cache/EmbeddingCache.js.map +1 -1
  273. package/v3/dist/integrations/embeddings/index/HNSWIndex.d.ts.map +1 -1
  274. package/v3/dist/integrations/embeddings/index/HNSWIndex.js +4 -1
  275. package/v3/dist/integrations/embeddings/index/HNSWIndex.js.map +1 -1
  276. package/v3/dist/kernel/interfaces.d.ts +8 -1
  277. package/v3/dist/kernel/interfaces.d.ts.map +1 -1
  278. package/v3/dist/learning/aqe-learning-engine.d.ts +272 -0
  279. package/v3/dist/learning/aqe-learning-engine.d.ts.map +1 -0
  280. package/v3/dist/learning/aqe-learning-engine.js +708 -0
  281. package/v3/dist/learning/aqe-learning-engine.js.map +1 -0
  282. package/v3/dist/learning/causal-verifier.d.ts +244 -0
  283. package/v3/dist/learning/causal-verifier.d.ts.map +1 -0
  284. package/v3/dist/learning/causal-verifier.js +300 -0
  285. package/v3/dist/learning/causal-verifier.js.map +1 -0
  286. package/v3/dist/learning/experience-capture.d.ts +266 -0
  287. package/v3/dist/learning/experience-capture.d.ts.map +1 -0
  288. package/v3/dist/learning/experience-capture.js +647 -0
  289. package/v3/dist/learning/experience-capture.js.map +1 -0
  290. package/v3/dist/learning/index.d.ts +8 -0
  291. package/v3/dist/learning/index.d.ts.map +1 -1
  292. package/v3/dist/learning/index.js +16 -0
  293. package/v3/dist/learning/index.js.map +1 -1
  294. package/v3/dist/learning/memory-auditor.d.ts +235 -0
  295. package/v3/dist/learning/memory-auditor.d.ts.map +1 -0
  296. package/v3/dist/learning/memory-auditor.js +478 -0
  297. package/v3/dist/learning/memory-auditor.js.map +1 -0
  298. package/v3/dist/learning/pattern-store.d.ts.map +1 -1
  299. package/v3/dist/learning/pattern-store.js +27 -6
  300. package/v3/dist/learning/pattern-store.js.map +1 -1
  301. package/v3/dist/learning/qe-patterns.d.ts +15 -1
  302. package/v3/dist/learning/qe-patterns.d.ts.map +1 -1
  303. package/v3/dist/learning/qe-patterns.js +26 -5
  304. package/v3/dist/learning/qe-patterns.js.map +1 -1
  305. package/v3/dist/learning/qe-reasoning-bank.d.ts +38 -2
  306. package/v3/dist/learning/qe-reasoning-bank.d.ts.map +1 -1
  307. package/v3/dist/learning/qe-reasoning-bank.js +86 -4
  308. package/v3/dist/learning/qe-reasoning-bank.js.map +1 -1
  309. package/v3/dist/learning/real-qe-reasoning-bank.d.ts +32 -2
  310. package/v3/dist/learning/real-qe-reasoning-bank.d.ts.map +1 -1
  311. package/v3/dist/learning/real-qe-reasoning-bank.js +61 -6
  312. package/v3/dist/learning/real-qe-reasoning-bank.js.map +1 -1
  313. package/v3/dist/learning/token-tracker.d.ts.map +1 -1
  314. package/v3/dist/learning/token-tracker.js +5 -2
  315. package/v3/dist/learning/token-tracker.js.map +1 -1
  316. package/v3/dist/mcp/bundle.js +6698 -303
  317. package/v3/dist/mcp/tools/coherence/audit.d.ts +107 -0
  318. package/v3/dist/mcp/tools/coherence/audit.d.ts.map +1 -0
  319. package/v3/dist/mcp/tools/coherence/audit.js +236 -0
  320. package/v3/dist/mcp/tools/coherence/audit.js.map +1 -0
  321. package/v3/dist/mcp/tools/coherence/check.d.ts +106 -0
  322. package/v3/dist/mcp/tools/coherence/check.d.ts.map +1 -0
  323. package/v3/dist/mcp/tools/coherence/check.js +205 -0
  324. package/v3/dist/mcp/tools/coherence/check.js.map +1 -0
  325. package/v3/dist/mcp/tools/coherence/collapse.d.ts +123 -0
  326. package/v3/dist/mcp/tools/coherence/collapse.d.ts.map +1 -0
  327. package/v3/dist/mcp/tools/coherence/collapse.js +279 -0
  328. package/v3/dist/mcp/tools/coherence/collapse.js.map +1 -0
  329. package/v3/dist/mcp/tools/coherence/consensus.d.ts +100 -0
  330. package/v3/dist/mcp/tools/coherence/consensus.d.ts.map +1 -0
  331. package/v3/dist/mcp/tools/coherence/consensus.js +201 -0
  332. package/v3/dist/mcp/tools/coherence/consensus.js.map +1 -0
  333. package/v3/dist/mcp/tools/coherence/index.d.ts +31 -0
  334. package/v3/dist/mcp/tools/coherence/index.d.ts.map +1 -0
  335. package/v3/dist/mcp/tools/coherence/index.js +42 -0
  336. package/v3/dist/mcp/tools/coherence/index.js.map +1 -0
  337. package/v3/dist/mcp/tools/contract-testing/validate.d.ts +1 -1
  338. package/v3/dist/mcp/tools/contract-testing/validate.d.ts.map +1 -1
  339. package/v3/dist/mcp/tools/contract-testing/validate.js +66 -0
  340. package/v3/dist/mcp/tools/contract-testing/validate.js.map +1 -1
  341. package/v3/dist/mcp/tools/index.d.ts +6 -1
  342. package/v3/dist/mcp/tools/index.d.ts.map +1 -1
  343. package/v3/dist/mcp/tools/index.js +9 -1
  344. package/v3/dist/mcp/tools/index.js.map +1 -1
  345. package/v3/dist/mcp/tools/mincut/index.d.ts +1 -1
  346. package/v3/dist/mcp/tools/mincut/index.d.ts.map +1 -1
  347. package/v3/dist/mcp/tools/mincut/index.js.map +1 -1
  348. package/v3/dist/mcp/tools/registry.d.ts +4 -0
  349. package/v3/dist/mcp/tools/registry.d.ts.map +1 -1
  350. package/v3/dist/mcp/tools/registry.js +5 -0
  351. package/v3/dist/mcp/tools/registry.js.map +1 -1
  352. package/v3/dist/mcp/types.d.ts +1 -1
  353. package/v3/dist/mcp/types.d.ts.map +1 -1
  354. package/v3/dist/shared/utils/safe-expression-evaluator.d.ts +61 -0
  355. package/v3/dist/shared/utils/safe-expression-evaluator.d.ts.map +1 -0
  356. package/v3/dist/shared/utils/safe-expression-evaluator.js +365 -0
  357. package/v3/dist/shared/utils/safe-expression-evaluator.js.map +1 -0
  358. package/v3/dist/strange-loop/belief-reconciler.d.ts +357 -0
  359. package/v3/dist/strange-loop/belief-reconciler.d.ts.map +1 -0
  360. package/v3/dist/strange-loop/belief-reconciler.js +696 -0
  361. package/v3/dist/strange-loop/belief-reconciler.js.map +1 -0
  362. package/v3/dist/strange-loop/index.d.ts +1 -0
  363. package/v3/dist/strange-loop/index.d.ts.map +1 -1
  364. package/v3/dist/strange-loop/index.js +2 -0
  365. package/v3/dist/strange-loop/index.js.map +1 -1
  366. package/v3/dist/strange-loop/strange-loop.d.ts +177 -5
  367. package/v3/dist/strange-loop/strange-loop.d.ts.map +1 -1
  368. package/v3/dist/strange-loop/strange-loop.js +452 -9
  369. package/v3/dist/strange-loop/strange-loop.js.map +1 -1
  370. package/v3/dist/strange-loop/types.d.ts +205 -1
  371. package/v3/dist/strange-loop/types.d.ts.map +1 -1
  372. package/v3/dist/strange-loop/types.js +5 -0
  373. package/v3/dist/strange-loop/types.js.map +1 -1
  374. package/v3/dist/test-scheduling/executors/vitest-executor.d.ts.map +1 -1
  375. package/v3/dist/test-scheduling/executors/vitest-executor.js +7 -2
  376. package/v3/dist/test-scheduling/executors/vitest-executor.js.map +1 -1
  377. package/v3/dist/workflows/browser/workflow-loader.d.ts +1 -0
  378. package/v3/dist/workflows/browser/workflow-loader.d.ts.map +1 -1
  379. package/v3/dist/workflows/browser/workflow-loader.js +11 -16
  380. package/v3/dist/workflows/browser/workflow-loader.js.map +1 -1
  381. package/v3/package.json +5 -1
@@ -0,0 +1,647 @@
1
+ /**
2
+ * AQE Experience Capture Module
3
+ * Phase 4: Self-Learning Features
4
+ *
5
+ * Captures task execution experiences for pattern learning.
6
+ * Works standalone and integrates with Claude Flow trajectories when available.
7
+ *
8
+ * Features:
9
+ * - Task execution recording
10
+ * - Outcome capture with quality metrics
11
+ * - Pattern extraction from successful tasks
12
+ * - Pattern promotion after threshold uses
13
+ * - Cross-domain experience sharing
14
+ */
15
+ import { v4 as uuidv4 } from 'uuid';
16
+ import { ok, err } from '../shared/types/index.js';
17
+ /**
18
+ * Default experience capture configuration
19
+ */
20
+ export const DEFAULT_EXPERIENCE_CONFIG = {
21
+ namespace: 'qe-experiences',
22
+ minQualityForPatternExtraction: 0.7,
23
+ similarityThreshold: 0.85,
24
+ promotionThreshold: 3,
25
+ maxExperiencesPerDomain: 1000,
26
+ enableCrossDomainSharing: true,
27
+ autoCleanup: true,
28
+ cleanupIntervalMs: 86400000, // 24 hours
29
+ };
30
+ // ============================================================================
31
+ // Experience Capture Service
32
+ // ============================================================================
33
+ /**
34
+ * Experience Capture Service
35
+ *
36
+ * Captures and processes task execution experiences for pattern learning.
37
+ */
38
+ export class ExperienceCaptureService {
39
+ memory;
40
+ patternStore;
41
+ eventBus;
42
+ config;
43
+ initialized = false;
44
+ cleanupTimer;
45
+ // In-memory cache for active experiences
46
+ activeExperiences = new Map();
47
+ // Statistics
48
+ stats = {
49
+ totalCaptured: 0,
50
+ successfulCaptures: 0,
51
+ patternsExtracted: 0,
52
+ patternsPromoted: 0,
53
+ byDomain: new Map(),
54
+ };
55
+ constructor(memory, patternStore, eventBus, config = {}) {
56
+ this.memory = memory;
57
+ this.patternStore = patternStore;
58
+ this.eventBus = eventBus;
59
+ this.config = { ...DEFAULT_EXPERIENCE_CONFIG, ...config };
60
+ }
61
+ /**
62
+ * Initialize the experience capture service
63
+ */
64
+ async initialize() {
65
+ if (this.initialized)
66
+ return;
67
+ // Load existing stats
68
+ await this.loadStats();
69
+ // Start cleanup timer if enabled
70
+ if (this.config.autoCleanup) {
71
+ this.cleanupTimer = setInterval(() => this.cleanup(), this.config.cleanupIntervalMs);
72
+ }
73
+ this.initialized = true;
74
+ console.log('[ExperienceCapture] Initialized');
75
+ }
76
+ /**
77
+ * Start capturing a task experience
78
+ */
79
+ startCapture(task, options) {
80
+ const id = `exp-${Date.now()}-${uuidv4().slice(0, 8)}`;
81
+ const experience = {
82
+ id,
83
+ task,
84
+ agent: options?.agent,
85
+ domain: options?.domain,
86
+ model: options?.model,
87
+ startedAt: Date.now(),
88
+ completedAt: 0,
89
+ durationMs: 0,
90
+ steps: [],
91
+ success: false,
92
+ quality: 0,
93
+ trajectoryId: options?.trajectoryId,
94
+ metadata: options?.metadata,
95
+ };
96
+ this.activeExperiences.set(id, experience);
97
+ return id;
98
+ }
99
+ /**
100
+ * Record a step in the experience
101
+ */
102
+ recordStep(experienceId, step) {
103
+ const experience = this.activeExperiences.get(experienceId);
104
+ if (!experience) {
105
+ console.warn(`[ExperienceCapture] Experience not found: ${experienceId}`);
106
+ return;
107
+ }
108
+ experience.steps.push({
109
+ ...step,
110
+ timestamp: Date.now(),
111
+ });
112
+ }
113
+ /**
114
+ * Complete and capture the experience
115
+ */
116
+ async completeCapture(experienceId, outcome) {
117
+ const experience = this.activeExperiences.get(experienceId);
118
+ if (!experience) {
119
+ return err(new Error(`Experience not found: ${experienceId}`));
120
+ }
121
+ // Complete the experience
122
+ const now = Date.now();
123
+ experience.completedAt = now;
124
+ experience.durationMs = now - experience.startedAt;
125
+ experience.success = outcome.success;
126
+ experience.feedback = outcome.feedback;
127
+ // Calculate quality from steps if not provided
128
+ if (outcome.quality !== undefined) {
129
+ experience.quality = outcome.quality;
130
+ }
131
+ else {
132
+ experience.quality = this.calculateQuality(experience);
133
+ }
134
+ // Remove from active
135
+ this.activeExperiences.delete(experienceId);
136
+ // Store experience
137
+ await this.storeExperience(experience);
138
+ // Update stats
139
+ this.updateStats(experience);
140
+ // Extract patterns if quality is high enough
141
+ if (experience.success &&
142
+ experience.quality >= this.config.minQualityForPatternExtraction) {
143
+ const extractionResult = await this.extractPattern(experience);
144
+ if (extractionResult.newPattern || extractionResult.reinforced) {
145
+ experience.patterns = [extractionResult.patternId];
146
+ }
147
+ }
148
+ // Emit event
149
+ this.emitExperienceCaptured(experience);
150
+ return ok(experience);
151
+ }
152
+ /**
153
+ * Get an active experience
154
+ */
155
+ getActiveExperience(experienceId) {
156
+ return this.activeExperiences.get(experienceId);
157
+ }
158
+ /**
159
+ * Get experience by ID
160
+ */
161
+ async getExperience(experienceId) {
162
+ const key = `${this.config.namespace}:experience:${experienceId}`;
163
+ const result = await this.memory.get(key);
164
+ return result ?? null;
165
+ }
166
+ /**
167
+ * Search experiences
168
+ */
169
+ async searchExperiences(options = {}) {
170
+ const limit = options.limit || 100;
171
+ const experiences = [];
172
+ // Search by domain if specified
173
+ let keys;
174
+ if (options.domain) {
175
+ keys = await this.memory.search(`${this.config.namespace}:index:domain:${options.domain}:*`, limit * 2);
176
+ }
177
+ else {
178
+ keys = await this.memory.search(`${this.config.namespace}:experience:*`, limit * 2);
179
+ }
180
+ for (const key of keys) {
181
+ if (experiences.length >= limit)
182
+ break;
183
+ // Get experience ID from index key or use full key
184
+ const experienceId = key.includes(':index:')
185
+ ? await this.memory.get(key)
186
+ : null;
187
+ const experience = experienceId
188
+ ? await this.getExperience(experienceId)
189
+ : await this.memory.get(key);
190
+ if (!experience)
191
+ continue;
192
+ // Apply filters
193
+ if (options.agent && experience.agent !== options.agent)
194
+ continue;
195
+ if (options.success !== undefined && experience.success !== options.success)
196
+ continue;
197
+ if (options.minQuality !== undefined && experience.quality < options.minQuality)
198
+ continue;
199
+ experiences.push(experience);
200
+ }
201
+ return experiences;
202
+ }
203
+ /**
204
+ * Get experience capture statistics
205
+ */
206
+ async getStats() {
207
+ const byDomain = {};
208
+ for (const [domain, count] of this.stats.byDomain) {
209
+ byDomain[domain] = count;
210
+ }
211
+ return {
212
+ totalExperiences: this.stats.totalCaptured,
213
+ byDomain,
214
+ successRate: this.stats.totalCaptured > 0
215
+ ? this.stats.successfulCaptures / this.stats.totalCaptured
216
+ : 0,
217
+ avgQuality: await this.calculateAvgQuality(),
218
+ patternsExtracted: this.stats.patternsExtracted,
219
+ patternsPromoted: this.stats.patternsPromoted,
220
+ };
221
+ }
222
+ /**
223
+ * Extract pattern from experience
224
+ */
225
+ async extractPattern(experience) {
226
+ if (!this.patternStore) {
227
+ return { newPattern: false, reinforced: false, promoted: false };
228
+ }
229
+ // Search for similar existing patterns
230
+ const searchResult = await this.patternStore.search(experience.task, {
231
+ limit: 1,
232
+ domain: experience.domain,
233
+ useVectorSearch: true,
234
+ });
235
+ if (searchResult.success && searchResult.value.length > 0) {
236
+ const existing = searchResult.value[0];
237
+ // If similarity is high enough, reinforce existing pattern
238
+ if (existing.similarity >= this.config.similarityThreshold) {
239
+ const usageResult = await this.patternStore.recordUsage(existing.pattern.id, experience.success);
240
+ // Check if pattern should be promoted (short-term → long-term)
241
+ const pattern = await this.patternStore.get(existing.pattern.id);
242
+ let promoted = false;
243
+ if (pattern &&
244
+ pattern.tier === 'short-term' &&
245
+ pattern.usageCount >= this.config.promotionThreshold) {
246
+ // Actually promote the pattern
247
+ const promoteResult = await this.patternStore.promote(existing.pattern.id);
248
+ if (promoteResult.success) {
249
+ promoted = true;
250
+ this.stats.patternsPromoted++;
251
+ console.log(`[ExperienceCapture] Pattern promoted: ${existing.pattern.id} (${pattern.usageCount} uses)`);
252
+ }
253
+ }
254
+ return {
255
+ newPattern: false,
256
+ patternId: existing.pattern.id,
257
+ reinforced: usageResult.success,
258
+ promoted,
259
+ };
260
+ }
261
+ }
262
+ // Create new pattern from experience
263
+ const patternOptions = this.experienceToPatternOptions(experience);
264
+ const createResult = await this.patternStore.create(patternOptions);
265
+ if (createResult.success) {
266
+ this.stats.patternsExtracted++;
267
+ // Record the initial usage (the experience that created this pattern)
268
+ await this.patternStore.recordUsage(createResult.value.id, experience.success);
269
+ return {
270
+ newPattern: true,
271
+ patternId: createResult.value.id,
272
+ reinforced: false,
273
+ promoted: false,
274
+ };
275
+ }
276
+ return { newPattern: false, reinforced: false, promoted: false };
277
+ }
278
+ /**
279
+ * Share experience across domains
280
+ */
281
+ async shareAcrossDomains(experience) {
282
+ if (!this.config.enableCrossDomainSharing)
283
+ return;
284
+ if (!experience.domain)
285
+ return;
286
+ // Get related domains
287
+ const relatedDomains = this.getRelatedDomains(experience.domain);
288
+ for (const targetDomain of relatedDomains) {
289
+ // Store a reference in the target domain
290
+ const key = `${this.config.namespace}:shared:${targetDomain}:${experience.id}`;
291
+ await this.memory.set(key, {
292
+ sourceExperience: experience.id,
293
+ sourceDomain: experience.domain,
294
+ sharedAt: Date.now(),
295
+ }, { persist: true });
296
+ }
297
+ }
298
+ /**
299
+ * Cleanup old experiences
300
+ */
301
+ async cleanup() {
302
+ let removed = 0;
303
+ for (const domain of this.stats.byDomain.keys()) {
304
+ const count = this.stats.byDomain.get(domain) || 0;
305
+ if (count > this.config.maxExperiencesPerDomain) {
306
+ // Get oldest experiences for this domain
307
+ const experiences = await this.searchExperiences({
308
+ domain,
309
+ limit: count,
310
+ });
311
+ // Sort by timestamp (oldest first)
312
+ experiences.sort((a, b) => a.startedAt - b.startedAt);
313
+ // Remove excess (keeping most recent)
314
+ const toRemove = count - this.config.maxExperiencesPerDomain;
315
+ for (let i = 0; i < Math.min(toRemove, experiences.length); i++) {
316
+ const exp = experiences[i];
317
+ await this.deleteExperience(exp.id);
318
+ removed++;
319
+ }
320
+ }
321
+ }
322
+ console.log(`[ExperienceCapture] Cleanup: removed ${removed} experiences`);
323
+ return { removed };
324
+ }
325
+ /**
326
+ * Dispose the service
327
+ */
328
+ async dispose() {
329
+ if (this.cleanupTimer) {
330
+ clearInterval(this.cleanupTimer);
331
+ this.cleanupTimer = undefined;
332
+ }
333
+ // Save stats
334
+ await this.saveStats();
335
+ this.activeExperiences.clear();
336
+ this.initialized = false;
337
+ }
338
+ // ============================================================================
339
+ // Private Methods
340
+ // ============================================================================
341
+ /**
342
+ * Store experience in memory
343
+ */
344
+ async storeExperience(experience) {
345
+ const key = `${this.config.namespace}:experience:${experience.id}`;
346
+ await this.memory.set(key, experience, { persist: true });
347
+ // Create domain index
348
+ if (experience.domain) {
349
+ const indexKey = `${this.config.namespace}:index:domain:${experience.domain}:${experience.id}`;
350
+ await this.memory.set(indexKey, experience.id, { persist: true });
351
+ }
352
+ // Create agent index
353
+ if (experience.agent) {
354
+ const agentKey = `${this.config.namespace}:index:agent:${experience.agent}:${experience.id}`;
355
+ await this.memory.set(agentKey, experience.id, { persist: true });
356
+ }
357
+ }
358
+ /**
359
+ * Delete experience
360
+ */
361
+ async deleteExperience(experienceId) {
362
+ const experience = await this.getExperience(experienceId);
363
+ if (!experience)
364
+ return;
365
+ // Delete main record
366
+ const key = `${this.config.namespace}:experience:${experienceId}`;
367
+ await this.memory.delete(key);
368
+ // Delete indices
369
+ if (experience.domain) {
370
+ const indexKey = `${this.config.namespace}:index:domain:${experience.domain}:${experienceId}`;
371
+ await this.memory.delete(indexKey);
372
+ }
373
+ if (experience.agent) {
374
+ const agentKey = `${this.config.namespace}:index:agent:${experience.agent}:${experienceId}`;
375
+ await this.memory.delete(agentKey);
376
+ }
377
+ // Update stats
378
+ if (experience.domain) {
379
+ const current = this.stats.byDomain.get(experience.domain) || 0;
380
+ if (current > 0) {
381
+ this.stats.byDomain.set(experience.domain, current - 1);
382
+ }
383
+ }
384
+ this.stats.totalCaptured = Math.max(0, this.stats.totalCaptured - 1);
385
+ if (experience.success) {
386
+ this.stats.successfulCaptures = Math.max(0, this.stats.successfulCaptures - 1);
387
+ }
388
+ }
389
+ /**
390
+ * Calculate quality from experience steps
391
+ */
392
+ calculateQuality(experience) {
393
+ if (experience.steps.length === 0) {
394
+ return experience.success ? 0.5 : 0.2;
395
+ }
396
+ // Calculate average quality from steps with quality scores
397
+ const qualitySteps = experience.steps.filter((s) => s.quality !== undefined);
398
+ if (qualitySteps.length === 0) {
399
+ return experience.success ? 0.6 : 0.3;
400
+ }
401
+ const avgQuality = qualitySteps.reduce((sum, s) => sum + (s.quality || 0), 0) / qualitySteps.length;
402
+ // Adjust for success/failure
403
+ return experience.success ? Math.min(1, avgQuality + 0.1) : Math.max(0, avgQuality - 0.2);
404
+ }
405
+ /**
406
+ * Update statistics
407
+ */
408
+ updateStats(experience) {
409
+ this.stats.totalCaptured++;
410
+ if (experience.success) {
411
+ this.stats.successfulCaptures++;
412
+ }
413
+ if (experience.domain) {
414
+ const current = this.stats.byDomain.get(experience.domain) || 0;
415
+ this.stats.byDomain.set(experience.domain, current + 1);
416
+ }
417
+ }
418
+ /**
419
+ * Calculate average quality across all experiences
420
+ */
421
+ async calculateAvgQuality() {
422
+ const experiences = await this.searchExperiences({ limit: 100 });
423
+ if (experiences.length === 0)
424
+ return 0;
425
+ const totalQuality = experiences.reduce((sum, e) => sum + e.quality, 0);
426
+ return totalQuality / experiences.length;
427
+ }
428
+ /**
429
+ * Convert experience to pattern options
430
+ */
431
+ experienceToPatternOptions(experience) {
432
+ // Detect pattern type from task
433
+ const patternType = this.detectPatternType(experience.task);
434
+ // Build template content from experience steps
435
+ const stepDescriptions = experience.steps
436
+ .map((s, i) => `${i + 1}. ${s.action}${s.result ? ` → ${s.result}` : ''}`)
437
+ .join('\n');
438
+ const templateContent = `Task: {{task}}
439
+
440
+ Steps:
441
+ ${stepDescriptions}
442
+
443
+ Duration: ${experience.durationMs}ms`;
444
+ return {
445
+ patternType,
446
+ name: this.generatePatternName(experience),
447
+ description: `Pattern extracted from: ${experience.task}`,
448
+ context: {
449
+ tags: this.extractTags(experience),
450
+ testType: this.detectTestType(experience.task),
451
+ },
452
+ template: {
453
+ type: 'workflow',
454
+ content: templateContent,
455
+ variables: [
456
+ {
457
+ name: 'task',
458
+ type: 'string',
459
+ description: 'The task to execute',
460
+ required: true,
461
+ },
462
+ ],
463
+ },
464
+ };
465
+ }
466
+ /**
467
+ * Detect pattern type from task description
468
+ */
469
+ detectPatternType(task) {
470
+ const taskLower = task.toLowerCase();
471
+ if (taskLower.includes('test') || taskLower.includes('spec')) {
472
+ if (taskLower.includes('unit'))
473
+ return 'test-template';
474
+ if (taskLower.includes('integration'))
475
+ return 'test-template';
476
+ if (taskLower.includes('e2e'))
477
+ return 'test-template';
478
+ return 'test-template';
479
+ }
480
+ if (taskLower.includes('mock') || taskLower.includes('stub')) {
481
+ return 'mock-pattern';
482
+ }
483
+ if (taskLower.includes('assert') || taskLower.includes('expect')) {
484
+ return 'assertion-pattern';
485
+ }
486
+ if (taskLower.includes('coverage')) {
487
+ return 'coverage-strategy';
488
+ }
489
+ if (taskLower.includes('api') || taskLower.includes('contract')) {
490
+ return 'api-contract';
491
+ }
492
+ if (taskLower.includes('visual') || taskLower.includes('screenshot')) {
493
+ return 'visual-baseline';
494
+ }
495
+ if (taskLower.includes('accessibility') || taskLower.includes('a11y')) {
496
+ return 'a11y-check';
497
+ }
498
+ if (taskLower.includes('performance') || taskLower.includes('perf')) {
499
+ return 'perf-benchmark';
500
+ }
501
+ if (taskLower.includes('flaky')) {
502
+ return 'flaky-fix';
503
+ }
504
+ if (taskLower.includes('refactor')) {
505
+ return 'refactor-safe';
506
+ }
507
+ if (taskLower.includes('error') || taskLower.includes('exception')) {
508
+ return 'error-handling';
509
+ }
510
+ return 'test-template'; // Default
511
+ }
512
+ /**
513
+ * Generate pattern name from experience
514
+ */
515
+ generatePatternName(experience) {
516
+ // Take first 50 chars of task, sanitize
517
+ const sanitized = experience.task
518
+ .replace(/[^a-zA-Z0-9\s-]/g, '')
519
+ .slice(0, 50)
520
+ .trim();
521
+ const domain = experience.domain ? `[${experience.domain}] ` : '';
522
+ return `${domain}${sanitized}`;
523
+ }
524
+ /**
525
+ * Extract tags from experience
526
+ */
527
+ extractTags(experience) {
528
+ const tags = [];
529
+ if (experience.domain) {
530
+ tags.push(experience.domain);
531
+ }
532
+ if (experience.agent) {
533
+ tags.push(experience.agent);
534
+ }
535
+ if (experience.model) {
536
+ tags.push(`model:${experience.model}`);
537
+ }
538
+ // Extract keywords from task
539
+ const taskWords = experience.task.toLowerCase().split(/\s+/);
540
+ const keywords = ['unit', 'integration', 'e2e', 'api', 'mock', 'coverage', 'security'];
541
+ for (const keyword of keywords) {
542
+ if (taskWords.some((w) => w.includes(keyword))) {
543
+ tags.push(keyword);
544
+ }
545
+ }
546
+ return tags;
547
+ }
548
+ /**
549
+ * Detect test type from task
550
+ */
551
+ detectTestType(task) {
552
+ const taskLower = task.toLowerCase();
553
+ if (taskLower.includes('unit'))
554
+ return 'unit';
555
+ if (taskLower.includes('integration'))
556
+ return 'integration';
557
+ if (taskLower.includes('e2e') || taskLower.includes('end-to-end'))
558
+ return 'e2e';
559
+ if (taskLower.includes('contract') || taskLower.includes('api'))
560
+ return 'contract';
561
+ if (taskLower.includes('smoke'))
562
+ return 'smoke';
563
+ return undefined;
564
+ }
565
+ /**
566
+ * Get related domains for cross-domain sharing
567
+ */
568
+ getRelatedDomains(domain) {
569
+ const relationships = {
570
+ 'test-generation': ['test-execution', 'coverage-analysis'],
571
+ 'test-execution': ['test-generation', 'coverage-analysis', 'quality-assessment'],
572
+ 'coverage-analysis': ['test-generation', 'test-execution'],
573
+ 'quality-assessment': ['test-execution', 'defect-intelligence'],
574
+ 'defect-intelligence': ['quality-assessment', 'code-intelligence'],
575
+ 'requirements-validation': ['test-generation', 'quality-assessment'],
576
+ 'code-intelligence': ['defect-intelligence', 'security-compliance'],
577
+ 'security-compliance': ['code-intelligence', 'quality-assessment'],
578
+ 'contract-testing': ['test-generation', 'test-execution'],
579
+ 'visual-accessibility': ['quality-assessment', 'test-execution'],
580
+ 'chaos-resilience': ['test-execution', 'quality-assessment'],
581
+ 'learning-optimization': [],
582
+ };
583
+ return relationships[domain] || [];
584
+ }
585
+ /**
586
+ * Emit experience captured event
587
+ */
588
+ emitExperienceCaptured(experience) {
589
+ if (!this.eventBus)
590
+ return;
591
+ // Emit the full experience for coordinator integration
592
+ this.eventBus.publish({
593
+ id: `exp-captured-${experience.id}`,
594
+ type: 'learning.ExperienceCaptured',
595
+ source: 'learning-optimization', // Use valid DomainName
596
+ timestamp: new Date(),
597
+ payload: {
598
+ experience, // Full experience for cross-domain learning
599
+ },
600
+ });
601
+ }
602
+ /**
603
+ * Load stats from persistence
604
+ */
605
+ async loadStats() {
606
+ try {
607
+ const savedStats = await this.memory.get(`${this.config.namespace}:stats`);
608
+ if (savedStats) {
609
+ this.stats.totalCaptured = savedStats.totalCaptured;
610
+ this.stats.successfulCaptures = savedStats.successfulCaptures;
611
+ this.stats.patternsExtracted = savedStats.patternsExtracted;
612
+ this.stats.patternsPromoted = savedStats.patternsPromoted;
613
+ this.stats.byDomain = new Map(savedStats.byDomain);
614
+ }
615
+ }
616
+ catch {
617
+ // Start fresh
618
+ }
619
+ }
620
+ /**
621
+ * Save stats to persistence
622
+ */
623
+ async saveStats() {
624
+ try {
625
+ await this.memory.set(`${this.config.namespace}:stats`, {
626
+ totalCaptured: this.stats.totalCaptured,
627
+ successfulCaptures: this.stats.successfulCaptures,
628
+ patternsExtracted: this.stats.patternsExtracted,
629
+ patternsPromoted: this.stats.patternsPromoted,
630
+ byDomain: Array.from(this.stats.byDomain.entries()),
631
+ }, { persist: true });
632
+ }
633
+ catch (error) {
634
+ console.error('[ExperienceCapture] Failed to save stats:', error);
635
+ }
636
+ }
637
+ }
638
+ // ============================================================================
639
+ // Factory Functions
640
+ // ============================================================================
641
+ /**
642
+ * Create experience capture service
643
+ */
644
+ export function createExperienceCaptureService(memory, patternStore, eventBus, config) {
645
+ return new ExperienceCaptureService(memory, patternStore, eventBus, config);
646
+ }
647
+ //# sourceMappingURL=experience-capture.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"experience-capture.js","sourceRoot":"","sources":["../../src/learning/experience-capture.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAIpC,OAAO,EAAE,EAAE,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAgHnD;;GAEG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA4B;IAChE,SAAS,EAAE,gBAAgB;IAC3B,8BAA8B,EAAE,GAAG;IACnC,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,CAAC;IACrB,uBAAuB,EAAE,IAAI;IAC7B,wBAAwB,EAAE,IAAI;IAC9B,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,QAAQ,EAAE,WAAW;CACzC,CAAC;AA0CF,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,OAAO,wBAAwB;IAkBhB;IACA;IACA;IAnBF,MAAM,CAA0B;IACzC,WAAW,GAAG,KAAK,CAAC;IACpB,YAAY,CAAkB;IAEtC,yCAAyC;IACjC,iBAAiB,GAAgC,IAAI,GAAG,EAAE,CAAC;IAEnE,aAAa;IACL,KAAK,GAAG;QACd,aAAa,EAAE,CAAC;QAChB,kBAAkB,EAAE,CAAC;QACrB,iBAAiB,EAAE,CAAC;QAC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