agentic-qe 3.9.26 → 3.9.28

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 (301) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +94 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/bridge/captured-experience-bridge.d.ts +40 -0
  5. package/dist/bridge/captured-experience-bridge.js +232 -0
  6. package/dist/cli/bundle.js +5 -5
  7. package/dist/cli/chunks/adapter-EZP2PBUO.js +2 -0
  8. package/dist/cli/chunks/{agent-booster-wasm-ZOADSKRX.js → agent-booster-wasm-V5PG6GFO.js} +2 -2
  9. package/dist/cli/chunks/{agent-handler-SPLFCIHA.js → agent-handler-7ZQNRIZC.js} +2 -2
  10. package/dist/cli/chunks/{agent-memory-branch-R6ZVL2FT.js → agent-memory-branch-KGEYSKXW.js} +2 -2
  11. package/dist/cli/chunks/aqe-learning-engine-RM4YQPRF.js +2 -0
  12. package/dist/cli/chunks/{audit-6TQQFGQN.js → audit-5A4AC2NA.js} +2 -2
  13. package/dist/cli/chunks/base-2KYCMSPN.js +2 -0
  14. package/dist/cli/chunks/{hnswlib-node-TULXUZI4.js → better-sqlite3-RZZIAME7.js} +2 -2
  15. package/dist/cli/chunks/{brain-handler-6BQCTD3M.js → brain-handler-KNERI5RC.js} +3 -3
  16. package/dist/cli/chunks/{branch-enumerator-JTESSKID.js → branch-enumerator-DGR3U73T.js} +2 -2
  17. package/dist/cli/chunks/{browser-YDZLFZNH.js → browser-Y5DC6QCK.js} +2 -2
  18. package/dist/cli/chunks/browser-workflow-FZ2BRH4H.js +2 -0
  19. package/dist/cli/chunks/{chunk-IKRLPS4M.js → chunk-2RKR6KT5.js} +2 -2
  20. package/dist/cli/chunks/{chunk-SDD3XQ7X.js → chunk-33VVPBAK.js} +1 -1
  21. package/dist/cli/chunks/{chunk-QFXOKERO.js → chunk-3ZPK7HCD.js} +1 -1
  22. package/dist/cli/chunks/{chunk-SYRUG2T7.js → chunk-4MYXPDXX.js} +1 -1
  23. package/dist/cli/chunks/chunk-4R6DN7IO.js +2 -0
  24. package/dist/cli/chunks/{chunk-TZ73IAF5.js → chunk-5KOR5ZMG.js} +2 -2
  25. package/dist/cli/chunks/{chunk-SYQZPNHQ.js → chunk-5RZ26J4J.js} +2 -2
  26. package/dist/cli/chunks/{chunk-6UFMNYQV.js → chunk-5UHMNAK2.js} +1 -1
  27. package/dist/cli/chunks/{chunk-RLAXE5HU.js → chunk-6BJ6O7JZ.js} +2 -2
  28. package/dist/cli/chunks/{chunk-PJPNRDEF.js → chunk-6WKX2O66.js} +2 -2
  29. package/dist/cli/chunks/{chunk-MW4WEMLE.js → chunk-7GLCWLZL.js} +2 -2
  30. package/dist/cli/chunks/{chunk-7T2KT74O.js → chunk-7MLACLCT.js} +2 -2
  31. package/dist/cli/chunks/{chunk-MSPY7HMF.js → chunk-7MVFQGFZ.js} +2 -2
  32. package/dist/cli/chunks/{chunk-Y3YJMKXS.js → chunk-7NDBKLDK.js} +2 -2
  33. package/dist/cli/chunks/{chunk-HKHRIPXP.js → chunk-A77JCFFC.js} +9 -9
  34. package/dist/cli/chunks/{chunk-QXQWQRZA.js → chunk-AFSVRY7S.js} +1 -1
  35. package/dist/cli/chunks/{chunk-G3KTLF57.js → chunk-AL7LMXTA.js} +2 -2
  36. package/dist/cli/chunks/{chunk-2OFL5HSB.js → chunk-B5KYS65U.js} +2 -2
  37. package/dist/cli/chunks/{chunk-FWPV44HL.js → chunk-BRCWESMJ.js} +2 -2
  38. package/dist/cli/chunks/{chunk-EPCKRFMU.js → chunk-C5RA5PDV.js} +2 -2
  39. package/dist/cli/chunks/{chunk-3QPQZJUY.js → chunk-CAZ2CIU4.js} +2 -2
  40. package/dist/cli/chunks/{chunk-FRUDEEZH.js → chunk-CCZGT2HD.js} +1 -1
  41. package/dist/cli/chunks/{chunk-RNVXTNEB.js → chunk-CGQN4R76.js} +2 -2
  42. package/dist/cli/chunks/{chunk-OFAXQGU5.js → chunk-CKDW7YFV.js} +2 -2
  43. package/dist/cli/chunks/{chunk-6AH4SN6I.js → chunk-D4YJ3SDF.js} +1 -1
  44. package/dist/cli/chunks/{chunk-JWKNHSXP.js → chunk-DHLT7OCI.js} +2 -2
  45. package/dist/cli/chunks/{chunk-EYFL6QLX.js → chunk-DMMFUB3Z.js} +2 -2
  46. package/dist/cli/chunks/{chunk-CMFRBO4N.js → chunk-DQ3FERVR.js} +3 -3
  47. package/dist/cli/chunks/{chunk-F24XTOID.js → chunk-DTS3ZD7P.js} +2 -2
  48. package/dist/cli/chunks/{chunk-UJPERPQU.js → chunk-FI2JQJYJ.js} +1 -1
  49. package/dist/cli/chunks/{chunk-LPDPGCDC.js → chunk-FQJXLJ6G.js} +2 -2
  50. package/dist/cli/chunks/{chunk-EFAN5HUX.js → chunk-FTQXXYHG.js} +2 -2
  51. package/dist/cli/chunks/{chunk-A4U4DNPR.js → chunk-FUKWABUF.js} +1 -1
  52. package/dist/cli/chunks/{chunk-GHQ6QT47.js → chunk-G4YZWVOV.js} +2 -2
  53. package/dist/cli/chunks/{chunk-EQ4IZRD5.js → chunk-G6LGV6KD.js} +2 -2
  54. package/dist/cli/chunks/{chunk-RXQX6JNQ.js → chunk-GECEU6U3.js} +2 -2
  55. package/dist/cli/chunks/{chunk-4F6RPT7N.js → chunk-HEMQ4DEF.js} +3 -3
  56. package/dist/cli/chunks/{chunk-VBJ4UQ3X.js → chunk-HL26OBVJ.js} +2 -2
  57. package/dist/cli/chunks/{chunk-YYOKX7VH.js → chunk-HQFREWNC.js} +2 -2
  58. package/dist/cli/chunks/{chunk-HSQLB4GR.js → chunk-I4TSLBEZ.js} +2 -2
  59. package/dist/cli/chunks/{chunk-4GUVB7FG.js → chunk-IJNRJY2R.js} +2 -2
  60. package/dist/cli/chunks/{chunk-ARLHD5MG.js → chunk-IVRBWQBU.js} +1 -1
  61. package/dist/cli/chunks/{chunk-4U57VG6R.js → chunk-J62GSTYJ.js} +2 -2
  62. package/dist/cli/chunks/{chunk-QQMGUORN.js → chunk-JOSEPQIU.js} +2 -2
  63. package/dist/cli/chunks/{chunk-6VRKHHYI.js → chunk-JZ5TPG5T.js} +1 -1
  64. package/dist/cli/chunks/{chunk-XAA7ZBNG.js → chunk-KCP5CS4C.js} +1 -1
  65. package/dist/cli/chunks/{chunk-AOURUJFN.js → chunk-KYPNHW4G.js} +1 -1
  66. package/dist/cli/chunks/{chunk-CYPOU765.js → chunk-LCSDE5DQ.js} +1 -1
  67. package/dist/cli/chunks/{chunk-IVNZLESN.js → chunk-LE3V4QHG.js} +2 -2
  68. package/dist/cli/chunks/{chunk-XDEF6UFY.js → chunk-LG3F5F7B.js} +2 -2
  69. package/dist/cli/chunks/{chunk-RD3CNJWR.js → chunk-LKWJUZVH.js} +2 -2
  70. package/dist/cli/chunks/{chunk-K64UL5PA.js → chunk-LM624ZDD.js} +2 -2
  71. package/dist/cli/chunks/{chunk-PPP7KZQL.js → chunk-LQDKLJBO.js} +2 -2
  72. package/dist/cli/chunks/{chunk-ETBVBV2M.js → chunk-M3FFEZFJ.js} +2 -2
  73. package/dist/cli/chunks/{chunk-YUMVG55I.js → chunk-MDXIESNH.js} +2 -2
  74. package/dist/cli/chunks/{chunk-CU5Q46NR.js → chunk-MFKVWTIY.js} +4 -4
  75. package/dist/cli/chunks/{chunk-ONYCSOAR.js → chunk-ML2XD4RS.js} +1 -1
  76. package/dist/cli/chunks/{chunk-AH3IPNOJ.js → chunk-MWVZTQOR.js} +2 -2
  77. package/dist/cli/chunks/{chunk-VC2FHUOY.js → chunk-NIWTQURH.js} +2 -2
  78. package/dist/cli/chunks/{chunk-GW5T4BSO.js → chunk-NNYRIYEZ.js} +4 -4
  79. package/dist/cli/chunks/{chunk-4EBC7ATS.js → chunk-NUN7N7MB.js} +9 -9
  80. package/dist/cli/chunks/{chunk-VPPXZORB.js → chunk-O22BAOMU.js} +1 -1
  81. package/dist/cli/chunks/{chunk-LP7ILPFQ.js → chunk-O5AZETA7.js} +2 -2
  82. package/dist/cli/chunks/{chunk-XHENTAXI.js → chunk-OE7U5SX2.js} +2 -2
  83. package/dist/cli/chunks/{chunk-U5BMUXV2.js → chunk-OQWTTKJU.js} +2 -2
  84. package/dist/cli/chunks/{chunk-5TTQNRAP.js → chunk-OVOXPXPC.js} +1 -1
  85. package/dist/cli/chunks/{chunk-AGBIQXB4.js → chunk-PHPT6QTF.js} +2 -2
  86. package/dist/cli/chunks/{chunk-F77VZ4IY.js → chunk-PMWIZ7TC.js} +2 -2
  87. package/dist/cli/chunks/{chunk-4RFODPDS.js → chunk-PNLEMDLY.js} +2 -2
  88. package/dist/cli/chunks/{chunk-TLBP7EVX.js → chunk-POOFM7MT.js} +1 -1
  89. package/dist/cli/chunks/{chunk-QU7TNCUB.js → chunk-Q2GEEKE4.js} +1 -1
  90. package/dist/cli/chunks/{chunk-C77FS4ER.js → chunk-QGQ6XWFK.js} +2 -2
  91. package/dist/cli/chunks/{chunk-MTRA6I7Y.js → chunk-QKODMLPS.js} +1 -1
  92. package/dist/cli/chunks/{chunk-N2ET2TL5.js → chunk-QMCRT3AX.js} +2 -2
  93. package/dist/cli/chunks/{chunk-FDC2ANCP.js → chunk-QY4NWJET.js} +3 -3
  94. package/dist/cli/chunks/{chunk-VHHFSVR3.js → chunk-RB5T2HNT.js} +2 -2
  95. package/dist/cli/chunks/{chunk-YCZEXLKL.js → chunk-RJGSHAHW.js} +2 -2
  96. package/dist/cli/chunks/{chunk-XYMUYLHY.js → chunk-ROXQZJ6J.js} +1 -1
  97. package/dist/cli/chunks/{chunk-N3GLRFMH.js → chunk-RPNBVYWZ.js} +1 -1
  98. package/dist/cli/chunks/{chunk-PS7YB3IV.js → chunk-RUOWR53U.js} +3 -3
  99. package/dist/cli/chunks/{chunk-KQQPUHQD.js → chunk-RX3S6244.js} +1 -1
  100. package/dist/cli/chunks/{chunk-BBALCRJM.js → chunk-S5YTV4G3.js} +1 -1
  101. package/dist/cli/chunks/{chunk-MXZY5IJA.js → chunk-S7RGN5OC.js} +1 -1
  102. package/dist/cli/chunks/{chunk-TU2A5BGA.js → chunk-SH7IVDWV.js} +2 -2
  103. package/dist/cli/chunks/{chunk-EX7UGFWX.js → chunk-SQHCTVEH.js} +2 -2
  104. package/dist/cli/chunks/{chunk-BOV44F3Z.js → chunk-SVPX24HJ.js} +2 -2
  105. package/dist/cli/chunks/{chunk-ZFLD5ATZ.js → chunk-T5YDBTD6.js} +2 -2
  106. package/dist/cli/chunks/{chunk-P6M6LNSI.js → chunk-TYR7ZETY.js} +2 -2
  107. package/dist/cli/chunks/{chunk-PSOF6DZA.js → chunk-UCQ2AFAR.js} +129 -124
  108. package/dist/cli/chunks/{chunk-AUD45G7X.js → chunk-UEADBMAA.js} +2 -2
  109. package/dist/cli/chunks/{chunk-22YZRYG4.js → chunk-UJRYZ6TO.js} +3 -3
  110. package/dist/cli/chunks/{chunk-B3KHJQ34.js → chunk-UYTAAWAO.js} +2 -2
  111. package/dist/cli/chunks/{chunk-3K2QCWFD.js → chunk-V6GKWUCS.js} +1 -1
  112. package/dist/cli/chunks/{chunk-G42KXBBG.js → chunk-V7VCP42A.js} +2 -2
  113. package/dist/cli/chunks/{chunk-C5ZA6UBI.js → chunk-VGQYRIQ2.js} +1 -1
  114. package/dist/cli/chunks/{chunk-TQBP3YGG.js → chunk-VJ7OJ7I3.js} +1 -1
  115. package/dist/cli/chunks/{chunk-5JGFDJA6.js → chunk-VK3VXDNA.js} +2 -2
  116. package/dist/cli/chunks/{chunk-MAPQ2UZ5.js → chunk-VPF2RECU.js} +2 -2
  117. package/dist/cli/chunks/{chunk-7L3F76MS.js → chunk-VQA6GDNN.js} +3 -3
  118. package/dist/cli/chunks/{chunk-TRIA62JA.js → chunk-VZEKUY3G.js} +2 -2
  119. package/dist/cli/chunks/{chunk-WCI2FMWZ.js → chunk-WQIT7I46.js} +1 -1
  120. package/dist/cli/chunks/{chunk-BFSKBIAM.js → chunk-WT2IUWYG.js} +1 -1
  121. package/dist/cli/chunks/{chunk-CBBVUZFD.js → chunk-XCLG5FGQ.js} +4 -4
  122. package/dist/cli/chunks/{chunk-PLB75ASZ.js → chunk-XCMM2NLF.js} +1 -1
  123. package/dist/cli/chunks/{chunk-2XOIJE7J.js → chunk-XLNWSI7Y.js} +2 -2
  124. package/dist/cli/chunks/{chunk-EEWGVVKH.js → chunk-Y7EPJRQT.js} +2 -2
  125. package/dist/cli/chunks/{chunk-4QUKBJAS.js → chunk-YF5JCM45.js} +2 -2
  126. package/dist/cli/chunks/{chunk-SGGYSL7J.js → chunk-YG6ZRK5N.js} +1 -1
  127. package/dist/cli/chunks/{chunk-ZUUNOGHI.js → chunk-YJPNL6K4.js} +2 -2
  128. package/dist/cli/chunks/{chunk-4I6XGKSB.js → chunk-YLZZZRB7.js} +2 -2
  129. package/dist/cli/chunks/{chunk-QUHNBIUZ.js → chunk-YUV4EMRT.js} +1 -1
  130. package/dist/cli/chunks/{chunk-4ZAOHYFA.js → chunk-ZDM6AWU6.js} +2 -2
  131. package/dist/cli/chunks/{chunk-DBSEDJ7P.js → chunk-ZH2WOQP3.js} +2 -2
  132. package/dist/cli/chunks/{chunk-WND3EYCS.js → chunk-ZJEPVWBV.js} +2 -2
  133. package/dist/cli/chunks/{chunk-ANEIDNH7.js → chunk-ZKNO5AR4.js} +2 -2
  134. package/dist/cli/chunks/{ci-EAX5WWT6.js → ci-XTEXFMLT.js} +2 -2
  135. package/dist/cli/chunks/{ci-output-JCWHRJ2A.js → ci-output-5NU5WEOG.js} +2 -2
  136. package/dist/cli/chunks/{circuit-breaker-RAEDVT33.js → circuit-breaker-UBO4B3ER.js} +2 -2
  137. package/dist/cli/chunks/{claude-flow-setup-NJAY4WXY.js → claude-flow-setup-X7SVV2YA.js} +2 -2
  138. package/dist/cli/chunks/client-SRNILWCG.js +2 -0
  139. package/dist/cli/chunks/{cline-installer-X3GCUEWC.js → cline-installer-EBLJPYJW.js} +2 -2
  140. package/dist/cli/chunks/{code-GXJ6JC6O.js → code-WO52OOGB.js} +2 -2
  141. package/dist/cli/chunks/{code-index-extractor-TTA7HZEW.js → code-index-extractor-MVR5EQ4S.js} +2 -2
  142. package/dist/cli/chunks/{codex-installer-TXMSGJHK.js → codex-installer-LR2NDWTK.js} +2 -2
  143. package/dist/cli/chunks/{completions-RSFIDY22.js → completions-J5OYMQCR.js} +2 -2
  144. package/dist/cli/chunks/{complexity-analyzer-C6244ZOI.js → complexity-analyzer-GUFXAK6I.js} +2 -2
  145. package/dist/cli/chunks/{continuedev-installer-5WQIRQW4.js → continuedev-installer-45ZDPPTK.js} +2 -2
  146. package/dist/cli/chunks/{copilot-installer-5Q64SC52.js → copilot-installer-FIKML2UD.js} +2 -2
  147. package/dist/cli/chunks/{cost-tracker-6SBRULNN.js → cost-tracker-SSI3GZ5C.js} +2 -2
  148. package/dist/cli/chunks/{coverage-X2AG3K6E.js → coverage-GQSRYPVJ.js} +3 -3
  149. package/dist/cli/chunks/cross-domain-router-QCOROKUM.js +2 -0
  150. package/dist/cli/chunks/{cursor-installer-VHZ5LEPG.js → cursor-installer-WRIQ2MXB.js} +2 -2
  151. package/dist/cli/chunks/{daemon-CDQXWIV4.js → daemon-TKQOU66X.js} +3 -3
  152. package/dist/cli/chunks/{dag-attention-scheduler-33UWNTSB.js → dag-attention-scheduler-DZ4Y7G3P.js} +2 -2
  153. package/dist/cli/chunks/{detect-UDWTKRQL.js → detect-DLXIZ3JQ.js} +2 -2
  154. package/dist/cli/chunks/{dist-node-CKTPNPBG.js → dist-node-3QZ37HLE.js} +2 -2
  155. package/dist/cli/chunks/{domain-handler-5J4AH4XR.js → domain-handler-F2XFKJOG.js} +2 -2
  156. package/dist/cli/chunks/{domain-transfer-P6VPN56R.js → domain-transfer-NZNJ6O5Y.js} +2 -2
  157. package/dist/cli/chunks/dream-P5YCSXOG.js +2 -0
  158. package/dist/cli/chunks/{embed-and-insert-pattern-2YFFI7IN.js → embed-and-insert-pattern-IXQSPD2Q.js} +2 -2
  159. package/dist/cli/chunks/{eval-K7VFIO2T.js → eval-5VQNSHMZ.js} +2 -2
  160. package/dist/cli/chunks/{experience-capture-middleware-P4RQW7JV.js → experience-capture-middleware-SQQVSGWT.js} +3 -3
  161. package/dist/cli/chunks/{fast-paths-T27YLQWQ.js → fast-paths-XZ4PMW4T.js} +2 -2
  162. package/dist/cli/chunks/{feature-flags-YFPFETDZ.js → feature-flags-I3E33SWO.js} +2 -2
  163. package/dist/cli/chunks/{feature-flags-HHQNCU6V.js → feature-flags-VYNQQIWP.js} +2 -2
  164. package/dist/cli/chunks/{file-discovery-ZKNENDOJ.js → file-discovery-VBJYSQEB.js} +2 -2
  165. package/dist/cli/chunks/{fleet-N5OTMFIN.js → fleet-R24REKY3.js} +4 -4
  166. package/dist/cli/chunks/{gnn-wrapper-D6L4FIWY.js → gnn-wrapper-ZSS765OF.js} +2 -2
  167. package/dist/cli/chunks/{heartbeat-handler-5RDU3KKK.js → heartbeat-handler-DXMMYI3L.js} +4 -4
  168. package/dist/cli/chunks/{heartbeat-scheduler-FALV24GQ.js → heartbeat-scheduler-CAXANO7U.js} +2 -2
  169. package/dist/cli/chunks/hnsw-adapter-CR22XKGP.js +2 -0
  170. package/dist/cli/chunks/hnsw-index-BTN322XC.js +2 -0
  171. package/dist/cli/chunks/{hnsw-legacy-bridge-ARD7KA3G.js → hnsw-legacy-bridge-EU46A4HQ.js} +2 -2
  172. package/dist/cli/chunks/{better-sqlite3-QIKWKEGD.js → hnswlib-node-K5N5YEYS.js} +2 -2
  173. package/dist/cli/chunks/{hooks-6HA23JHQ.js → hooks-2AFKHPAH.js} +30 -30
  174. package/dist/cli/chunks/{hybrid-router-XUYQW7FJ.js → hybrid-router-TLHKB3V6.js} +2 -2
  175. package/dist/cli/chunks/{hypergraph-engine-OGGXYQAO.js → hypergraph-engine-QKIUFDJP.js} +2 -2
  176. package/dist/cli/chunks/{hypergraph-handler-UFV3XYVX.js → hypergraph-handler-CT77BGUK.js} +3 -3
  177. package/dist/cli/chunks/impact-analyzer-ZYIZG4GS.js +2 -0
  178. package/dist/cli/chunks/{init-handler-VUSXGONQ.js → init-handler-L5Y4EZPZ.js} +8 -8
  179. package/dist/cli/chunks/init-wizard-2GJYCDEQ.js +2 -0
  180. package/dist/cli/chunks/kernel-GR44AXQ6.js +2 -0
  181. package/dist/cli/chunks/{kilocode-installer-C2JMSYAU.js → kilocode-installer-5XLS62BE.js} +2 -2
  182. package/dist/cli/chunks/{kiro-installer-6LJFFEEZ.js → kiro-installer-YNGEFQJ6.js} +2 -2
  183. package/dist/cli/chunks/knowledge-graph-23VGRP7G.js +2 -0
  184. package/dist/cli/chunks/{learning-4B624JV3.js → learning-H4PJXEZT.js} +3 -3
  185. package/dist/cli/chunks/{llm-router-QUOLZECD.js → llm-router-5V7S4RBP.js} +4 -4
  186. package/dist/cli/chunks/{load-MIQWBMGE.js → load-MERCK5J7.js} +2 -2
  187. package/dist/cli/chunks/load-test-5O3AB7JK.js +2 -0
  188. package/dist/cli/chunks/{mcp-MBJWNXDM.js → mcp-AY3EW3M4.js} +2 -2
  189. package/dist/cli/chunks/{memory-WX3XHQZP.js → memory-L7QEPZ3O.js} +5 -5
  190. package/dist/cli/chunks/memory-backend-JMFE5AFK.js +2 -0
  191. package/dist/cli/chunks/{memory-handlers-Q3XCN5SC.js → memory-handlers-3MMKDYQH.js} +2 -2
  192. package/dist/cli/chunks/{multi-model-executor-RLY7OQOG.js → multi-model-executor-MCYVGMYJ.js} +2 -2
  193. package/dist/cli/chunks/{opencode-installer-JATQNZWA.js → opencode-installer-NSJCDEG7.js} +2 -2
  194. package/dist/cli/chunks/{orchestrator-7BNG32I2.js → orchestrator-PSFROJTM.js} +5 -5
  195. package/dist/cli/chunks/{pipeline-ORKGL7DP.js → pipeline-TXZZCEOG.js} +2 -2
  196. package/dist/cli/chunks/{platform-4SLJDRVL.js → platform-PUFZFG66.js} +2 -2
  197. package/dist/cli/chunks/{plugin-V6FRBF4W.js → plugin-ALNATTS7.js} +2 -2
  198. package/dist/cli/chunks/{prime-radiant-advanced-wasm-NA7AXKCA.js → prime-radiant-advanced-wasm-PZZRWJEK.js} +2 -2
  199. package/dist/cli/chunks/protocol-executor-J6KJRPXK.js +2 -0
  200. package/dist/cli/chunks/{protocol-handler-RSJOZ4XL.js → protocol-handler-WR4JQLSR.js} +2 -2
  201. package/dist/cli/chunks/{prove-2ZMKUODH.js → prove-AI7HVVJW.js} +2 -2
  202. package/dist/cli/chunks/{provider-manager-PSPAFCK7.js → provider-manager-XWDJJTRQ.js} +2 -2
  203. package/dist/cli/chunks/qe-reasoning-bank-A2Z7QLTV.js +2 -0
  204. package/dist/cli/chunks/{quality-6PZOOQSK.js → quality-W5K6U7NU.js} +2 -2
  205. package/dist/cli/chunks/queen-coordinator-RSASVM4O.js +2 -0
  206. package/dist/cli/chunks/{real-embeddings-BGNTSKHD.js → real-embeddings-Y65TLGVT.js} +2 -2
  207. package/dist/cli/chunks/{roocode-installer-NOHRQJIP.js → roocode-installer-2INES4NP.js} +2 -2
  208. package/dist/cli/chunks/router-LIO2DAHL.js +2 -0
  209. package/dist/cli/chunks/routing-feedback-WQ4XI7TT.js +2 -0
  210. package/dist/cli/chunks/{routing-handler-ZAOGNENU.js → routing-handler-IR4K3W3W.js} +2 -2
  211. package/dist/cli/chunks/{ruvector-commands-5K3Q4N5H.js → ruvector-commands-JGIJKLE5.js} +2 -2
  212. package/dist/cli/chunks/{rvf-dual-writer-NWFQC4KN.js → rvf-dual-writer-3RPYL6GB.js} +2 -2
  213. package/dist/cli/chunks/{rvf-migration-adapter-MS7QGBWK.js → rvf-migration-adapter-DZO5RSBU.js} +2 -2
  214. package/dist/cli/chunks/{rvf-migration-coordinator-YUBSSB6Z.js → rvf-migration-coordinator-5OIXOLND.js} +2 -2
  215. package/dist/cli/chunks/rvf-native-adapter-E7ODRU4B.js +2 -0
  216. package/dist/cli/chunks/safe-db-BW2OSAL7.js +2 -0
  217. package/dist/cli/chunks/schedule-JF75BBFQ.js +2 -0
  218. package/dist/cli/chunks/scheduler-EYCKXDGY.js +2 -0
  219. package/dist/cli/chunks/{security-BJWJWQRB.js → security-6I65LIPS.js} +3 -3
  220. package/dist/cli/chunks/shared-rvf-adapter-4Z3AKN2H.js +2 -0
  221. package/dist/cli/chunks/{shared-rvf-dual-writer-LEBD3EHA.js → shared-rvf-dual-writer-LEY65TEP.js} +2 -2
  222. package/dist/cli/chunks/sqlite-persistence-RUVPC4L5.js +2 -0
  223. package/dist/cli/chunks/{status-handler-XANOAVIB.js → status-handler-DOJ2JTXS.js} +2 -2
  224. package/dist/cli/chunks/{structural-health-TZA7PJ2T.js → structural-health-GSWBOWZR.js} +2 -2
  225. package/dist/cli/chunks/{sync-MKNYPUYP.js → sync-VJ7W4F4G.js} +2 -2
  226. package/dist/cli/chunks/{task-handler-KXSUKNQV.js → task-handler-AETQISNK.js} +2 -2
  227. package/dist/cli/chunks/{task-handlers-54MMRT3D.js → task-handlers-OQSZGWCK.js} +3 -3
  228. package/dist/cli/chunks/{test-AKS5AAT7.js → test-G57YV5WH.js} +4 -4
  229. package/dist/cli/chunks/{test-scheduling-OA7UPWQ5.js → test-scheduling-ONWDZENP.js} +3 -3
  230. package/dist/cli/chunks/{token-bootstrap-ZIUNRF3E.js → token-bootstrap-CTG7NE77.js} +2 -2
  231. package/dist/cli/chunks/{token-usage-IJENSXPQ.js → token-usage-YDHUAMJQ.js} +2 -2
  232. package/dist/cli/chunks/{transformers-CACTFP7H.js → transformers-W7SFGSLI.js} +2 -2
  233. package/dist/cli/chunks/{tree-sitter-wasm-parser-4H4UVHAQ.js → tree-sitter-wasm-parser-K7UHIIO2.js} +2 -2
  234. package/dist/cli/chunks/{types-AGACOWV3.js → types-EIZ5IMMV.js} +2 -2
  235. package/dist/cli/chunks/unified-memory-XE5LJO5T.js +2 -0
  236. package/dist/cli/chunks/unified-memory-hnsw-DB6HGWEU.js +2 -0
  237. package/dist/cli/chunks/unified-persistence-XGXZG42H.js +2 -0
  238. package/dist/cli/chunks/{upgrade-EKE25VPL.js → upgrade-TIQBZYJ7.js} +2 -2
  239. package/dist/cli/chunks/{validate-BZTYZQGP.js → validate-IIN2ODDK.js} +2 -2
  240. package/dist/cli/chunks/{validate-swarm-GZANKJ7M.js → validate-swarm-V6Y4I77Q.js} +2 -2
  241. package/dist/cli/chunks/{vibium-5X7QY25W.js → vibium-NMIWAEGL.js} +2 -2
  242. package/dist/cli/chunks/visual-security-NF4MBB32.js +2 -0
  243. package/dist/cli/chunks/{web-tree-sitter-KDFT6ZUY.js → web-tree-sitter-BGIECWPA.js} +2 -2
  244. package/dist/cli/chunks/{windsurf-installer-QFZJISMO.js → windsurf-installer-WTZG4PZD.js} +2 -2
  245. package/dist/cli/chunks/{witness-chain-ESSANJ4X.js → witness-chain-EQ2RE7CZ.js} +2 -2
  246. package/dist/cli/chunks/witness-chain-ZIE7GCJI.js +2 -0
  247. package/dist/cli/chunks/{workflow-EQFV2P66.js → workflow-3ZDRY6TE.js} +4 -4
  248. package/dist/cli/chunks/workflow-orchestrator-Z4KE75MK.js +2 -0
  249. package/dist/cli/chunks/{wrappers-RKJJDJLC.js → wrappers-FOP76K6J.js} +2 -2
  250. package/dist/cli/commands/fleet.js +2 -0
  251. package/dist/cli/commands/hooks-handlers/hooks-shared.js +39 -6
  252. package/dist/cli/handlers/init-handler.js +2 -0
  253. package/dist/cli/index.js +3 -0
  254. package/dist/kernel/interfaces.d.ts +14 -0
  255. package/dist/kernel/kernel.d.ts +1 -0
  256. package/dist/kernel/kernel.js +42 -0
  257. package/dist/learning/pattern-promotion.d.ts +6 -0
  258. package/dist/learning/pattern-promotion.js +5 -0
  259. package/dist/learning/qe-reasoning-bank-types.d.ts +12 -3
  260. package/dist/learning/qe-reasoning-bank.d.ts +10 -3
  261. package/dist/learning/qe-reasoning-bank.js +28 -7
  262. package/dist/mcp/bundle.js +323 -318
  263. package/dist/optimization/index.d.ts +0 -2
  264. package/dist/optimization/index.js +0 -2
  265. package/dist/workers/workers/learning-consolidation.js +9 -3
  266. package/package.json +1 -1
  267. package/dist/cli/chunks/adapter-LIPKRUFH.js +0 -2
  268. package/dist/cli/chunks/aqe-learning-engine-XJGJ6YS7.js +0 -2
  269. package/dist/cli/chunks/base-22RFSMJU.js +0 -2
  270. package/dist/cli/chunks/browser-workflow-ST7DX7KA.js +0 -2
  271. package/dist/cli/chunks/chunk-RSNZQ3MN.js +0 -2
  272. package/dist/cli/chunks/client-6463JNJR.js +0 -2
  273. package/dist/cli/chunks/cross-domain-router-OYUCD42M.js +0 -2
  274. package/dist/cli/chunks/dream-R76KD347.js +0 -2
  275. package/dist/cli/chunks/hnsw-adapter-CYWGI732.js +0 -2
  276. package/dist/cli/chunks/hnsw-index-UOYT3QKQ.js +0 -2
  277. package/dist/cli/chunks/impact-analyzer-PWV7CJUA.js +0 -2
  278. package/dist/cli/chunks/init-wizard-DKIFAPJJ.js +0 -2
  279. package/dist/cli/chunks/kernel-WQL2MUBH.js +0 -2
  280. package/dist/cli/chunks/knowledge-graph-U5OZDWGT.js +0 -2
  281. package/dist/cli/chunks/load-test-D2CQYRZQ.js +0 -2
  282. package/dist/cli/chunks/memory-backend-HFIGDCZE.js +0 -2
  283. package/dist/cli/chunks/protocol-executor-LTJIEFVG.js +0 -2
  284. package/dist/cli/chunks/qe-reasoning-bank-ZJ56AWO2.js +0 -2
  285. package/dist/cli/chunks/queen-coordinator-CZA7SS4O.js +0 -2
  286. package/dist/cli/chunks/router-N23IDBEQ.js +0 -2
  287. package/dist/cli/chunks/routing-feedback-IADXJ4RV.js +0 -2
  288. package/dist/cli/chunks/rvf-native-adapter-MOR7NUA5.js +0 -2
  289. package/dist/cli/chunks/safe-db-IRAUFZTC.js +0 -2
  290. package/dist/cli/chunks/schedule-PKUUCNCA.js +0 -2
  291. package/dist/cli/chunks/scheduler-NE4NP4W5.js +0 -2
  292. package/dist/cli/chunks/shared-rvf-adapter-OTON2BMV.js +0 -2
  293. package/dist/cli/chunks/sqlite-persistence-DXFBYN5L.js +0 -2
  294. package/dist/cli/chunks/unified-memory-4M3V7XL6.js +0 -2
  295. package/dist/cli/chunks/unified-memory-hnsw-6IKIDXEW.js +0 -2
  296. package/dist/cli/chunks/unified-persistence-XJ4D23TB.js +0 -2
  297. package/dist/cli/chunks/visual-security-2X63QHFJ.js +0 -2
  298. package/dist/cli/chunks/witness-chain-MWIG363M.js +0 -2
  299. package/dist/cli/chunks/workflow-orchestrator-B3ECPAFI.js +0 -2
  300. package/dist/optimization/qe-workers.d.ts +0 -193
  301. package/dist/optimization/qe-workers.js +0 -692
@@ -1,692 +0,0 @@
1
- /**
2
- * QE Optimization Workers
3
- * ADR-024: Self-Optimization Engine
4
- * ADR-046: V2 Feature Integration (Dream Cycles)
5
- *
6
- * Background workers for QE-specific optimization tasks:
7
- * - Pattern consolidation
8
- * - Dream cycle consolidation (ADR-046)
9
- * - Coverage gap scanning
10
- * - Flaky test detection
11
- * - Routing accuracy monitoring
12
- */
13
- import { BaseWorker } from '../workers/base-worker.js';
14
- import { toErrorMessage } from '../shared/error-utils.js';
15
- // ============================================================================
16
- // Worker Configurations
17
- // ============================================================================
18
- /**
19
- * QE optimization worker configurations
20
- */
21
- export const QE_OPTIMIZATION_WORKER_CONFIGS = {
22
- 'pattern-consolidator': {
23
- name: 'Pattern Consolidator',
24
- description: 'Consolidates and prunes patterns in the ReasoningBank for optimal memory usage',
25
- intervalMs: 30 * 60 * 1000, // 30 minutes
26
- priority: 'normal',
27
- targetDomains: ['learning-optimization'],
28
- enabled: true,
29
- timeoutMs: 60 * 1000, // 1 minute
30
- retryCount: 2,
31
- retryDelayMs: 5000,
32
- },
33
- 'dream-consolidator': {
34
- name: 'Dream Cycle Consolidator',
35
- description: 'Runs dream cycles to discover novel pattern associations (ADR-046)',
36
- intervalMs: 60 * 60 * 1000, // 1 hour (dreams need time to consolidate)
37
- priority: 'low', // Dreams run during idle time
38
- targetDomains: ['learning-optimization'],
39
- enabled: true,
40
- timeoutMs: 45 * 1000, // 45 seconds (dream cycle max is 30s + buffer)
41
- retryCount: 1,
42
- retryDelayMs: 30000, // Wait 30s before retry
43
- },
44
- 'coverage-gap-scanner': {
45
- name: 'Coverage Gap Scanner',
46
- description: 'Scans codebase for coverage gaps and identifies untested code',
47
- intervalMs: 60 * 60 * 1000, // 1 hour
48
- priority: 'high',
49
- targetDomains: ['coverage-analysis', 'test-generation'],
50
- enabled: true,
51
- timeoutMs: 120 * 1000, // 2 minutes
52
- retryCount: 2,
53
- retryDelayMs: 10000,
54
- },
55
- 'flaky-test-detector': {
56
- name: 'Flaky Test Detector',
57
- description: 'Detects flaky tests by analyzing test execution history and patterns',
58
- intervalMs: 2 * 60 * 60 * 1000, // 2 hours
59
- priority: 'high',
60
- targetDomains: ['test-execution', 'defect-intelligence'],
61
- enabled: true,
62
- timeoutMs: 180 * 1000, // 3 minutes
63
- retryCount: 1,
64
- retryDelayMs: 15000,
65
- },
66
- 'routing-accuracy-monitor': {
67
- name: 'Routing Accuracy Monitor',
68
- description: 'Monitors agent routing accuracy and provides improvement recommendations',
69
- intervalMs: 15 * 60 * 1000, // 15 minutes
70
- priority: 'critical',
71
- targetDomains: ['learning-optimization', 'quality-assessment'],
72
- enabled: true,
73
- timeoutMs: 30 * 1000, // 30 seconds
74
- retryCount: 3,
75
- retryDelayMs: 3000,
76
- },
77
- };
78
- /**
79
- * Worker that consolidates and prunes patterns in the ReasoningBank
80
- */
81
- export class PatternConsolidatorWorker extends BaseWorker {
82
- deps;
83
- constructor(deps) {
84
- super({
85
- id: 'pattern-consolidator',
86
- ...QE_OPTIMIZATION_WORKER_CONFIGS['pattern-consolidator'],
87
- });
88
- this.deps = deps;
89
- }
90
- async doExecute(context) {
91
- const startTime = Date.now();
92
- const findings = [];
93
- const recommendations = [];
94
- try {
95
- // Get current pattern stats
96
- const beforeStats = await this.deps.getPatternStats();
97
- context.logger.info(`Pattern stats before: ${JSON.stringify(beforeStats)}`);
98
- // Run consolidation
99
- const result = await this.deps.consolidatePatterns();
100
- // Get stats after consolidation
101
- const afterStats = await this.deps.getPatternStats();
102
- // Record findings
103
- if (result.merged > 0) {
104
- findings.push({
105
- type: 'pattern-merged',
106
- severity: 'info',
107
- domain: 'learning-optimization',
108
- title: 'Patterns Merged',
109
- description: `Merged ${result.merged} duplicate pattern groups`,
110
- resource: 'ReasoningBank',
111
- });
112
- }
113
- if (result.pruned > 0) {
114
- findings.push({
115
- type: 'pattern-pruned',
116
- severity: 'info',
117
- domain: 'learning-optimization',
118
- title: 'Patterns Pruned',
119
- description: `Pruned ${result.pruned} low-quality patterns`,
120
- resource: 'ReasoningBank',
121
- });
122
- }
123
- // Generate recommendations
124
- if (afterStats.duplicateGroups > 10) {
125
- recommendations.push({
126
- priority: 'p2',
127
- domain: 'learning-optimization',
128
- action: 'Review patterns with similar embeddings',
129
- description: `${afterStats.duplicateGroups} potential duplicate groups remain. Consider manual review.`,
130
- estimatedImpact: 'medium',
131
- effort: 'medium',
132
- autoFixable: false,
133
- });
134
- }
135
- if (afterStats.lowQuality > afterStats.total * 0.2) {
136
- recommendations.push({
137
- priority: 'p1',
138
- domain: 'learning-optimization',
139
- action: 'Review pattern quality thresholds',
140
- description: `${afterStats.lowQuality} low-quality patterns (${((afterStats.lowQuality / afterStats.total) * 100).toFixed(1)}% of total)`,
141
- estimatedImpact: 'high',
142
- effort: 'low',
143
- autoFixable: true,
144
- });
145
- }
146
- const durationMs = Date.now() - startTime;
147
- return this.createResult(durationMs, {
148
- itemsAnalyzed: beforeStats.total,
149
- issuesFound: result.merged + result.pruned,
150
- healthScore: Math.max(0, 100 - afterStats.duplicateGroups - afterStats.lowQuality),
151
- trend: result.merged + result.pruned > 0 ? 'improving' : 'stable',
152
- domainMetrics: {
153
- patternsMerged: result.merged,
154
- patternsPruned: result.pruned,
155
- patternsUpdated: result.updated,
156
- totalPatterns: afterStats.total,
157
- },
158
- }, findings, recommendations);
159
- }
160
- catch (error) {
161
- throw error;
162
- }
163
- }
164
- }
165
- /**
166
- * Worker that runs dream cycles to discover novel pattern associations.
167
- *
168
- * ADR-046: V2 Feature Integration - Dream Cycles
169
- *
170
- * The dream cycle simulates the consolidation process that occurs during sleep,
171
- * where the brain strengthens important associations and discovers new connections.
172
- *
173
- * This worker:
174
- * 1. Loads current patterns into the ConceptGraph
175
- * 2. Runs spreading activation (the "dreaming")
176
- * 3. Finds novel associations from co-activated concepts
177
- * 4. Generates insights from activation patterns
178
- * 5. Applies high-confidence insights as new patterns
179
- */
180
- export class DreamConsolidatorWorker extends BaseWorker {
181
- deps;
182
- dreamDurationMs = 30000; // 30 second dream cycles
183
- minConfidenceToApply = 0.7;
184
- maxInsightsToApply = 5;
185
- constructor(deps) {
186
- super({
187
- id: 'dream-consolidator',
188
- ...QE_OPTIMIZATION_WORKER_CONFIGS['dream-consolidator'],
189
- });
190
- this.deps = deps;
191
- }
192
- async doExecute(context) {
193
- const startTime = Date.now();
194
- const findings = [];
195
- const recommendations = [];
196
- try {
197
- // 1. Check if we have enough patterns to dream about
198
- const patternCount = await this.deps.getPatternCount();
199
- context.logger.info(`Current pattern count: ${patternCount}`);
200
- if (patternCount < 10) {
201
- context.logger.info('Insufficient patterns for dreaming, skipping cycle');
202
- return this.createResult(Date.now() - startTime, {
203
- itemsAnalyzed: 0,
204
- issuesFound: 0,
205
- healthScore: 50,
206
- trend: 'stable',
207
- domainMetrics: {
208
- patternsLoaded: 0,
209
- dreamCycleRan: 0,
210
- insightsGenerated: 0,
211
- insightsApplied: 0,
212
- reason: 'insufficient-patterns',
213
- },
214
- }, findings, recommendations);
215
- }
216
- // 2. Load patterns into dream engine
217
- const patternsLoaded = await this.deps.loadPatternsForDreaming();
218
- context.logger.info(`Loaded ${patternsLoaded} patterns for dreaming`);
219
- // 3. Run the dream cycle
220
- context.logger.info(`Starting dream cycle (${this.dreamDurationMs}ms)`);
221
- const dreamResult = await this.deps.runDreamCycle(this.dreamDurationMs);
222
- // Record dream cycle finding
223
- findings.push({
224
- type: 'dream-cycle-completed',
225
- severity: 'info',
226
- domain: 'learning-optimization',
227
- title: 'Dream Cycle Completed',
228
- description: `Processed ${dreamResult.activationStats.nodesActivated} concepts, ` +
229
- `found ${dreamResult.cycle.associationsFound} associations, ` +
230
- `generated ${dreamResult.insights.length} insights`,
231
- resource: 'DreamEngine',
232
- context: {
233
- durationMs: dreamResult.cycle.durationMs,
234
- iterations: dreamResult.activationStats.totalIterations,
235
- peakActivation: dreamResult.activationStats.peakActivation,
236
- },
237
- });
238
- // 4. Apply high-confidence insights
239
- let appliedCount = 0;
240
- const highConfidenceInsights = dreamResult.insights
241
- .filter(i => i.confidenceScore >= this.minConfidenceToApply && i.actionable)
242
- .slice(0, this.maxInsightsToApply);
243
- for (const insight of highConfidenceInsights) {
244
- const applyResult = await this.deps.applyInsight(insight.id);
245
- if (applyResult.success && applyResult.patternId) {
246
- appliedCount++;
247
- findings.push({
248
- type: 'insight-applied',
249
- severity: 'info',
250
- domain: 'learning-optimization',
251
- title: `Dream Insight Applied: ${insight.type}`,
252
- description: insight.description,
253
- resource: applyResult.patternId,
254
- context: {
255
- noveltyScore: insight.noveltyScore,
256
- confidenceScore: insight.confidenceScore,
257
- },
258
- });
259
- }
260
- }
261
- // 5. Check for pending insights
262
- const pendingInsights = await this.deps.getPendingInsights(20);
263
- if (pendingInsights.length > 10) {
264
- recommendations.push({
265
- priority: 'p2',
266
- domain: 'learning-optimization',
267
- action: 'Review pending dream insights',
268
- description: `${pendingInsights.length} insights awaiting review. ` +
269
- 'Consider lowering confidence threshold or manual review.',
270
- estimatedImpact: 'medium',
271
- effort: 'low',
272
- autoFixable: false,
273
- });
274
- }
275
- // 6. Check dream health
276
- if (dreamResult.insights.length === 0 && patternsLoaded >= 20) {
277
- recommendations.push({
278
- priority: 'p3',
279
- domain: 'learning-optimization',
280
- action: 'Review dream configuration',
281
- description: 'No insights generated despite sufficient patterns. ' +
282
- 'Consider adjusting novelty threshold or spread factor.',
283
- estimatedImpact: 'low',
284
- effort: 'low',
285
- autoFixable: false,
286
- });
287
- }
288
- const durationMs = Date.now() - startTime;
289
- const healthScore = Math.min(100, 50 + (dreamResult.insights.length * 5) + (appliedCount * 10));
290
- return this.createResult(durationMs, {
291
- itemsAnalyzed: patternsLoaded,
292
- issuesFound: 0,
293
- healthScore,
294
- trend: appliedCount > 0 ? 'improving' : 'stable',
295
- domainMetrics: {
296
- patternsLoaded,
297
- dreamCycleRan: 1,
298
- conceptsProcessed: dreamResult.activationStats.nodesActivated,
299
- associationsFound: dreamResult.cycle.associationsFound,
300
- insightsGenerated: dreamResult.insights.length,
301
- insightsApplied: appliedCount,
302
- pendingInsights: pendingInsights.length,
303
- durationMs: dreamResult.cycle.durationMs ?? 0,
304
- },
305
- }, findings, recommendations);
306
- }
307
- catch (error) {
308
- const errorMsg = toErrorMessage(error);
309
- // Handle expected errors gracefully
310
- if (errorMsg.includes('Insufficient concepts')) {
311
- context.logger.info('Dream cycle skipped: insufficient concepts');
312
- return this.createResult(Date.now() - startTime, {
313
- itemsAnalyzed: 0,
314
- issuesFound: 0,
315
- healthScore: 50,
316
- trend: 'stable',
317
- domainMetrics: {
318
- dreamCycleRan: 0,
319
- reason: 'insufficient-concepts',
320
- },
321
- }, [], []);
322
- }
323
- throw error;
324
- }
325
- }
326
- }
327
- /**
328
- * Worker that scans for coverage gaps and queues improvement tasks
329
- */
330
- export class CoverageGapScannerWorker extends BaseWorker {
331
- deps;
332
- constructor(deps) {
333
- super({
334
- id: 'coverage-gap-scanner',
335
- ...QE_OPTIMIZATION_WORKER_CONFIGS['coverage-gap-scanner'],
336
- });
337
- this.deps = deps;
338
- }
339
- async doExecute(context) {
340
- const startTime = Date.now();
341
- const findings = [];
342
- const recommendations = [];
343
- try {
344
- // Find all coverage gaps
345
- const gaps = await this.deps.findCoverageGaps();
346
- context.logger.info(`Found ${gaps.length} coverage gaps`);
347
- // Prioritize gaps
348
- const prioritized = await this.deps.prioritizeGaps(gaps.map(g => ({ file: g.file, riskScore: g.riskScore })));
349
- // Group gaps by file
350
- const gapsByFile = new Map();
351
- for (const gap of gaps) {
352
- const existing = gapsByFile.get(gap.file) || [];
353
- existing.push(gap);
354
- gapsByFile.set(gap.file, existing);
355
- }
356
- // Create findings for high-risk gaps
357
- const highRiskGaps = gaps.filter(g => g.riskScore > 0.7);
358
- for (const gap of highRiskGaps.slice(0, 10)) {
359
- findings.push({
360
- type: 'coverage-gap',
361
- severity: gap.riskScore > 0.9 ? 'critical' : 'high',
362
- domain: 'coverage-analysis',
363
- title: `High-Risk Coverage Gap: ${gap.file}`,
364
- description: `${gap.type} at lines ${gap.startLine}-${gap.endLine} (risk: ${(gap.riskScore * 100).toFixed(0)}%)`,
365
- resource: `${gap.file}:${gap.startLine}`,
366
- });
367
- }
368
- // Queue top priority tasks
369
- const topPriority = prioritized.slice(0, 5);
370
- for (const task of topPriority) {
371
- await this.deps.queueCoverageTask({
372
- file: task.file,
373
- priority: task.priority,
374
- });
375
- }
376
- // Generate recommendations
377
- if (highRiskGaps.length > 20) {
378
- recommendations.push({
379
- priority: 'p0',
380
- domain: 'coverage-analysis',
381
- action: 'Dedicate sprint time to coverage improvement',
382
- description: `${highRiskGaps.length} high-risk coverage gaps detected`,
383
- estimatedImpact: 'high',
384
- effort: 'high',
385
- autoFixable: false,
386
- });
387
- }
388
- const uncoveredFunctions = gaps.filter(g => g.type === 'uncovered-functions');
389
- if (uncoveredFunctions.length > 10) {
390
- recommendations.push({
391
- priority: 'p1',
392
- domain: 'test-generation',
393
- action: 'Generate unit tests for untested functions',
394
- description: `${uncoveredFunctions.length} functions have no test coverage`,
395
- estimatedImpact: 'high',
396
- effort: 'medium',
397
- autoFixable: true,
398
- });
399
- }
400
- const durationMs = Date.now() - startTime;
401
- return this.createResult(durationMs, {
402
- itemsAnalyzed: gapsByFile.size,
403
- issuesFound: gaps.length,
404
- healthScore: Math.max(0, 100 - (highRiskGaps.length * 2)),
405
- trend: gaps.length > 50 ? 'degrading' : 'stable',
406
- domainMetrics: {
407
- totalGaps: gaps.length,
408
- highRiskGaps: highRiskGaps.length,
409
- filesAffected: gapsByFile.size,
410
- tasksQueued: topPriority.length,
411
- },
412
- }, findings, recommendations);
413
- }
414
- catch (error) {
415
- throw error;
416
- }
417
- }
418
- }
419
- /**
420
- * Worker that detects flaky tests and queues fix tasks
421
- */
422
- export class FlakyTestDetectorWorker extends BaseWorker {
423
- deps;
424
- constructor(deps) {
425
- super({
426
- id: 'flaky-test-detector',
427
- ...QE_OPTIMIZATION_WORKER_CONFIGS['flaky-test-detector'],
428
- });
429
- this.deps = deps;
430
- }
431
- async doExecute(context) {
432
- const startTime = Date.now();
433
- const findings = [];
434
- const recommendations = [];
435
- try {
436
- // Get test history
437
- const testHistory = await this.deps.getTestHistory();
438
- context.logger.info(`Analyzing ${testHistory.length} tests for flakiness`);
439
- // Detect flaky tests
440
- const flakyTests = [];
441
- for (const test of testHistory) {
442
- if (test.runs < 5)
443
- continue; // Need enough data
444
- const passRate = test.passes / test.runs;
445
- const durationCoefficient = Math.sqrt(test.durationVariance) / test.avgDuration;
446
- // Flakiness indicators
447
- let flakinessScore = 0;
448
- const reasons = [];
449
- // Inconsistent pass/fail rate (not 100% pass or 100% fail)
450
- if (passRate > 0.05 && passRate < 0.95) {
451
- flakinessScore += (1 - Math.abs(passRate - 0.5) * 2) * 0.5;
452
- reasons.push(`Inconsistent pass rate: ${(passRate * 100).toFixed(1)}%`);
453
- }
454
- // High duration variance
455
- if (durationCoefficient > 0.5) {
456
- flakinessScore += Math.min(durationCoefficient * 0.3, 0.3);
457
- reasons.push(`High duration variance: ${(durationCoefficient * 100).toFixed(0)}%`);
458
- }
459
- // Recent failures after passing
460
- if (test.failures > 0 && test.passes > 0) {
461
- flakinessScore += 0.2;
462
- reasons.push('Mix of passes and failures');
463
- }
464
- if (flakinessScore > 0.3) {
465
- flakyTests.push({
466
- testId: test.testId,
467
- testName: test.testName,
468
- filePath: test.filePath,
469
- flakinessScore: Math.min(flakinessScore, 1),
470
- reason: reasons.join('; '),
471
- });
472
- }
473
- }
474
- // Sort by flakiness score
475
- flakyTests.sort((a, b) => b.flakinessScore - a.flakinessScore);
476
- // Create findings
477
- for (const test of flakyTests.slice(0, 15)) {
478
- findings.push({
479
- type: 'flaky-test',
480
- severity: test.flakinessScore > 0.7 ? 'high' : 'medium',
481
- domain: 'test-execution',
482
- title: `Flaky Test: ${test.testName}`,
483
- description: test.reason,
484
- resource: test.filePath,
485
- context: {
486
- testId: test.testId,
487
- flakinessScore: test.flakinessScore,
488
- },
489
- });
490
- }
491
- // Queue fix tasks for worst offenders
492
- for (const test of flakyTests.slice(0, 5)) {
493
- await this.deps.queueFlakyTestFix({
494
- testId: test.testId,
495
- flakinessScore: test.flakinessScore,
496
- reason: test.reason,
497
- });
498
- }
499
- // Generate recommendations
500
- if (flakyTests.length > 10) {
501
- recommendations.push({
502
- priority: 'p1',
503
- domain: 'test-execution',
504
- action: 'Implement test quarantine and systematic fixes',
505
- description: `${flakyTests.length} flaky tests detected. CI reliability at risk.`,
506
- estimatedImpact: 'high',
507
- effort: 'medium',
508
- autoFixable: false,
509
- });
510
- }
511
- const highVarianceTests = testHistory.filter(t => Math.sqrt(t.durationVariance) / t.avgDuration > 0.8);
512
- if (highVarianceTests.length > 5) {
513
- recommendations.push({
514
- priority: 'p2',
515
- domain: 'test-execution',
516
- action: 'Review tests for timing-dependent code or resource contention',
517
- description: `${highVarianceTests.length} tests have inconsistent execution times`,
518
- estimatedImpact: 'medium',
519
- effort: 'medium',
520
- autoFixable: false,
521
- });
522
- }
523
- const durationMs = Date.now() - startTime;
524
- return this.createResult(durationMs, {
525
- itemsAnalyzed: testHistory.length,
526
- issuesFound: flakyTests.length,
527
- healthScore: Math.max(0, 100 - (flakyTests.length * 3)),
528
- trend: flakyTests.length > 20 ? 'degrading' : 'stable',
529
- domainMetrics: {
530
- testsAnalyzed: testHistory.length,
531
- flakyTests: flakyTests.length,
532
- highFlakinessTests: flakyTests.filter(t => t.flakinessScore > 0.7).length,
533
- tasksQueued: Math.min(5, flakyTests.length),
534
- },
535
- }, findings, recommendations);
536
- }
537
- catch (error) {
538
- throw error;
539
- }
540
- }
541
- }
542
- /**
543
- * Worker that monitors routing accuracy and triggers retraining
544
- */
545
- export class RoutingAccuracyMonitorWorker extends BaseWorker {
546
- deps;
547
- accuracyThreshold = 0.8;
548
- constructor(deps) {
549
- super({
550
- id: 'routing-accuracy-monitor',
551
- ...QE_OPTIMIZATION_WORKER_CONFIGS['routing-accuracy-monitor'],
552
- });
553
- this.deps = deps;
554
- }
555
- async doExecute(context) {
556
- const startTime = Date.now();
557
- const findings = [];
558
- const recommendations = [];
559
- try {
560
- // Get routing stats for the last hour
561
- const stats = await this.deps.getRoutingStats(60 * 60 * 1000);
562
- context.logger.info(`Routing stats: ${JSON.stringify(stats)}`);
563
- // Calculate accuracy
564
- const followRate = stats.totalDecisions > 0
565
- ? stats.followedRecommendations / stats.totalDecisions
566
- : 0;
567
- const accuracy = stats.followedRecommendations > 0
568
- ? stats.successWhenFollowed / stats.followedRecommendations
569
- : 0;
570
- // Check if retraining is needed
571
- let retrainResult = null;
572
- if (accuracy < this.accuracyThreshold && stats.totalDecisions > 10) {
573
- context.logger.info(`Accuracy ${accuracy.toFixed(2)} below threshold ${this.accuracyThreshold}, triggering retrain`);
574
- retrainResult = await this.deps.retrainRouter();
575
- findings.push({
576
- type: 'router-retrained',
577
- severity: 'medium',
578
- domain: 'learning-optimization',
579
- title: 'Router Retrained',
580
- description: `Retrained with ${retrainResult.patternsUsed} patterns. New accuracy: ${(retrainResult.accuracy * 100).toFixed(1)}%`,
581
- resource: 'QERouter',
582
- });
583
- }
584
- // Generate findings for concerning patterns
585
- if (followRate < 0.5 && stats.totalDecisions > 20) {
586
- findings.push({
587
- type: 'low-follow-rate',
588
- severity: 'high',
589
- domain: 'learning-optimization',
590
- title: 'Low Recommendation Follow Rate',
591
- description: `Only ${(followRate * 100).toFixed(1)}% of recommendations are being followed`,
592
- resource: 'QERouter',
593
- });
594
- }
595
- if (stats.successWhenOverridden > stats.successWhenFollowed && stats.totalDecisions > 20) {
596
- findings.push({
597
- type: 'override-better',
598
- severity: 'critical',
599
- domain: 'learning-optimization',
600
- title: 'Override Success Higher Than Follow',
601
- description: 'Overriding recommendations leads to better outcomes than following them',
602
- resource: 'QERouter',
603
- });
604
- }
605
- if (stats.confidenceCorrelation < 0.3 && stats.totalDecisions > 30) {
606
- findings.push({
607
- type: 'low-correlation',
608
- severity: 'medium',
609
- domain: 'learning-optimization',
610
- title: 'Low Confidence-Success Correlation',
611
- description: `Confidence scores poorly predict success (correlation: ${stats.confidenceCorrelation.toFixed(2)})`,
612
- resource: 'QERouter',
613
- });
614
- }
615
- // Generate recommendations
616
- if (accuracy < this.accuracyThreshold) {
617
- recommendations.push({
618
- priority: 'p1',
619
- domain: 'learning-optimization',
620
- action: 'Review and augment training patterns',
621
- description: `Current accuracy ${(accuracy * 100).toFixed(1)}% is below ${(this.accuracyThreshold * 100).toFixed(0)}% threshold`,
622
- estimatedImpact: 'high',
623
- effort: 'medium',
624
- autoFixable: false,
625
- });
626
- }
627
- if (followRate < 0.7) {
628
- recommendations.push({
629
- priority: 'p2',
630
- domain: 'learning-optimization',
631
- action: 'Analyze override patterns to improve routing logic',
632
- description: 'Users frequently override recommendations',
633
- estimatedImpact: 'medium',
634
- effort: 'low',
635
- autoFixable: false,
636
- });
637
- }
638
- const durationMs = Date.now() - startTime;
639
- const healthScore = Math.round((accuracy * 50) + (followRate * 30) + (stats.confidenceCorrelation * 20));
640
- return this.createResult(durationMs, {
641
- itemsAnalyzed: stats.totalDecisions,
642
- issuesFound: findings.filter(f => f.type === 'issue' || f.type === 'warning').length,
643
- healthScore: Math.max(0, Math.min(100, healthScore)),
644
- trend: accuracy < this.accuracyThreshold ? 'degrading' : 'stable',
645
- domainMetrics: {
646
- totalDecisions: stats.totalDecisions,
647
- accuracy: Math.round(accuracy * 100),
648
- followRate: Math.round(followRate * 100),
649
- confidenceCorrelation: stats.confidenceCorrelation,
650
- retrainTriggered: retrainResult !== null ? 1 : 0,
651
- },
652
- }, findings, recommendations);
653
- }
654
- catch (error) {
655
- throw error;
656
- }
657
- }
658
- }
659
- // ============================================================================
660
- // Factory Functions
661
- // ============================================================================
662
- /**
663
- * Create pattern consolidator worker
664
- */
665
- export function createPatternConsolidatorWorker(deps) {
666
- return new PatternConsolidatorWorker(deps);
667
- }
668
- /**
669
- * Create dream consolidator worker (ADR-046)
670
- */
671
- export function createDreamConsolidatorWorker(deps) {
672
- return new DreamConsolidatorWorker(deps);
673
- }
674
- /**
675
- * Create coverage gap scanner worker
676
- */
677
- export function createCoverageGapScannerWorker(deps) {
678
- return new CoverageGapScannerWorker(deps);
679
- }
680
- /**
681
- * Create flaky test detector worker
682
- */
683
- export function createFlakyTestDetectorWorker(deps) {
684
- return new FlakyTestDetectorWorker(deps);
685
- }
686
- /**
687
- * Create routing accuracy monitor worker
688
- */
689
- export function createRoutingAccuracyMonitorWorker(deps) {
690
- return new RoutingAccuracyMonitorWorker(deps);
691
- }
692
- //# sourceMappingURL=qe-workers.js.map