agentic-qe 3.10.2 → 3.10.4

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 (418) hide show
  1. package/.claude/skills/release/SKILL.md +10 -10
  2. package/.claude/skills/skills-manifest.json +1 -1
  3. package/CHANGELOG.md +88 -0
  4. package/assets/grammars/tree-sitter-c_sharp.wasm +0 -0
  5. package/assets/grammars/tree-sitter-java.wasm +0 -0
  6. package/assets/grammars/tree-sitter-javascript.wasm +0 -0
  7. package/assets/grammars/tree-sitter-python.wasm +0 -0
  8. package/assets/grammars/tree-sitter-rust.wasm +0 -0
  9. package/assets/grammars/tree-sitter-swift.wasm +0 -0
  10. package/assets/grammars/tree-sitter-tsx.wasm +0 -0
  11. package/assets/grammars/tree-sitter-typescript.wasm +0 -0
  12. package/assets/skills/skills-manifest.json +1 -1
  13. package/dist/agents/claim-verifier/claim-verifier-service.js +4 -2
  14. package/dist/agents/claim-verifier/verifiers/test-verifier.js +31 -23
  15. package/dist/agents/devils-advocate/agent.js +1 -1
  16. package/dist/cli/bundle.js +5 -5
  17. package/dist/cli/chunks/adapter-A62ETL5C.js +2 -0
  18. package/dist/cli/chunks/{agent-booster-wasm-DHSIPFTH.js → agent-booster-wasm-EJPDSWON.js} +2 -2
  19. package/dist/cli/chunks/{agent-handler-FPQVHGGT.js → agent-handler-2DZB7LGI.js} +2 -2
  20. package/dist/cli/chunks/{agent-memory-branch-OLOF5ZHV.js → agent-memory-branch-SSFYAVIK.js} +2 -2
  21. package/dist/cli/chunks/aqe-learning-engine-MTCRAV6N.js +2 -0
  22. package/dist/cli/chunks/audit-42XG5JFB.js +3 -0
  23. package/dist/cli/chunks/base-KKEBUHZC.js +2 -0
  24. package/dist/cli/chunks/{hnswlib-node-ZGSUMHDC.js → better-sqlite3-PX5JM3DG.js} +2 -2
  25. package/dist/cli/chunks/{brain-handler-ROZUHCOT.js → brain-handler-LFHX2TYP.js} +3 -3
  26. package/dist/cli/chunks/{branch-enumerator-VK7G4NKJ.js → branch-enumerator-AX7DKGV7.js} +2 -2
  27. package/dist/cli/chunks/{browser-Q2S75M2F.js → browser-4NYLZ7FA.js} +2 -2
  28. package/dist/cli/chunks/browser-workflow-XHYAJUB6.js +2 -0
  29. package/dist/cli/chunks/{chunk-XPCNUX2U.js → chunk-2B6ETC7C.js} +2 -2
  30. package/dist/cli/chunks/{chunk-YI6GNRQM.js → chunk-2G2PVVQG.js} +2 -2
  31. package/dist/cli/chunks/{chunk-2244IFZA.js → chunk-2L5VFVCG.js} +1 -1
  32. package/dist/cli/chunks/{chunk-EVCOCGVJ.js → chunk-2TYO4VZH.js} +4 -4
  33. package/dist/cli/chunks/{chunk-U3EUH6LX.js → chunk-3ISX5B77.js} +2 -2
  34. package/dist/cli/chunks/{chunk-WZJUMJ2S.js → chunk-3UGUX34A.js} +1 -1
  35. package/dist/cli/chunks/{chunk-6ZFHIKQG.js → chunk-4BX72XG4.js} +3 -3
  36. package/dist/cli/chunks/{chunk-UUFOHMUG.js → chunk-4FTLYIMW.js} +2 -2
  37. package/dist/cli/chunks/{chunk-XDU624HU.js → chunk-5FNNCVXR.js} +1 -1
  38. package/dist/cli/chunks/{chunk-7Z46RDDV.js → chunk-5Q3L4QEE.js} +3 -3
  39. package/dist/cli/chunks/{chunk-AH7FXNFE.js → chunk-5T2HDET6.js} +3 -3
  40. package/dist/cli/chunks/{chunk-24LUQICS.js → chunk-5T4J3IPG.js} +2 -2
  41. package/dist/cli/chunks/{chunk-HHCYSAH3.js → chunk-6OLHPWSN.js} +2 -2
  42. package/dist/cli/chunks/{chunk-5PRFFHFV.js → chunk-6SCIX2W2.js} +2 -2
  43. package/dist/cli/chunks/{chunk-2JDLQWSV.js → chunk-6WF2MOQB.js} +2 -2
  44. package/dist/cli/chunks/{chunk-YNNOY3XN.js → chunk-7BQXEYRV.js} +2 -2
  45. package/dist/cli/chunks/{chunk-MMIQ5DMA.js → chunk-7VO5IEJ2.js} +2 -2
  46. package/dist/cli/chunks/{chunk-XDSA7YUQ.js → chunk-AIBE3J4A.js} +1 -1
  47. package/dist/cli/chunks/{chunk-AV7KYE5P.js → chunk-AMW27FSS.js} +5 -5
  48. package/dist/cli/chunks/{chunk-22D6VBPD.js → chunk-AZJYDM2K.js} +2 -2
  49. package/dist/cli/chunks/{chunk-PYIHZXCI.js → chunk-B6CT4ILU.js} +4 -4
  50. package/dist/cli/chunks/{chunk-ZK2BH23O.js → chunk-BEFRQOLH.js} +2 -2
  51. package/dist/cli/chunks/{chunk-CIRPP7RQ.js → chunk-C2446H7G.js} +2 -2
  52. package/dist/cli/chunks/{chunk-ON4D4TJ4.js → chunk-D7IWGQTW.js} +2 -2
  53. package/dist/cli/chunks/{chunk-6KSCXPPL.js → chunk-D7PI4CYZ.js} +2 -2
  54. package/dist/cli/chunks/{chunk-BQCSCAUC.js → chunk-DAIM72HV.js} +2 -2
  55. package/dist/cli/chunks/{chunk-XMJTTF5N.js → chunk-DPKECIKN.js} +3 -3
  56. package/dist/cli/chunks/{chunk-DZZEHPSJ.js → chunk-E6CGBOZY.js} +3 -3
  57. package/dist/cli/chunks/{chunk-OIRZJCZY.js → chunk-EGTOSQZK.js} +2 -2
  58. package/dist/cli/chunks/{chunk-WDMPJ2M2.js → chunk-EMZ3DXMG.js} +2 -2
  59. package/dist/cli/chunks/{chunk-QBRHKTFT.js → chunk-EWI37TJA.js} +1 -1
  60. package/dist/cli/chunks/{chunk-A5RMQG4N.js → chunk-F34OO2Q7.js} +3 -3
  61. package/dist/cli/chunks/{chunk-7SWD3D6Y.js → chunk-F6QPAVWS.js} +2 -2
  62. package/dist/cli/chunks/chunk-F77X5DAF.js +2 -0
  63. package/dist/cli/chunks/{chunk-Y63MBMOV.js → chunk-FDFJJFQT.js} +2 -2
  64. package/dist/cli/chunks/{chunk-YWZHMXTO.js → chunk-FQ7I4JBQ.js} +2 -2
  65. package/dist/cli/chunks/{chunk-S3ZO7JXS.js → chunk-G5FPWH5O.js} +4 -4
  66. package/dist/cli/chunks/{chunk-QSE67XJO.js → chunk-GDMH7NPV.js} +2 -2
  67. package/dist/cli/chunks/{chunk-MEY43PIQ.js → chunk-GILL32E2.js} +2 -2
  68. package/dist/cli/chunks/{chunk-LQTWPSYL.js → chunk-GLMDRGJD.js} +1 -1
  69. package/dist/cli/chunks/{chunk-MNV3E5KY.js → chunk-GS33ZRJH.js} +4 -4
  70. package/dist/cli/chunks/chunk-HPYGMKZF.js +2 -0
  71. package/dist/cli/chunks/{chunk-EQBEGDTG.js → chunk-HTLAPMTK.js} +1 -1
  72. package/dist/cli/chunks/{chunk-C2M74HCN.js → chunk-IAK76TIZ.js} +1 -1
  73. package/dist/cli/chunks/{chunk-2EDWGHDA.js → chunk-ICF5RPQU.js} +2 -2
  74. package/dist/cli/chunks/{chunk-ZXTO4C7R.js → chunk-IPAQ4HVX.js} +2 -2
  75. package/dist/cli/chunks/{chunk-RLXTBL3H.js → chunk-ISRTT4I7.js} +22 -22
  76. package/dist/cli/chunks/{chunk-SW4OKUTC.js → chunk-IYFMDIYZ.js} +2 -2
  77. package/dist/cli/chunks/{chunk-7IZ2OPC2.js → chunk-JRBGHWAM.js} +2 -2
  78. package/dist/cli/chunks/{chunk-QJ2EHLJ2.js → chunk-JYR3X4OC.js} +1 -1
  79. package/dist/cli/chunks/{chunk-5QHSLWLP.js → chunk-K72J52JO.js} +2 -2
  80. package/dist/cli/chunks/{chunk-PIZYRPMT.js → chunk-K7CW2X6U.js} +2 -2
  81. package/dist/cli/chunks/{chunk-3Z4FHA2E.js → chunk-K7K4TFJM.js} +4 -4
  82. package/dist/cli/chunks/{chunk-5HB54RUS.js → chunk-KCXE2LZU.js} +2 -2
  83. package/dist/cli/chunks/{chunk-THRTUW4Z.js → chunk-KGPAWNNR.js} +1 -1
  84. package/dist/cli/chunks/{chunk-MYWQTCS4.js → chunk-KJ56OXH4.js} +1 -1
  85. package/dist/cli/chunks/{chunk-ZDHMZPSL.js → chunk-KUFC4DBX.js} +1 -1
  86. package/dist/cli/chunks/{chunk-CV2SBMBW.js → chunk-KWZEBHAP.js} +2 -2
  87. package/dist/cli/chunks/{chunk-X2VAOIUY.js → chunk-L6VNEEN6.js} +1 -1
  88. package/dist/cli/chunks/{chunk-S3OZ7XSY.js → chunk-LHPR7ROV.js} +1 -1
  89. package/dist/cli/chunks/{chunk-HO37VP4O.js → chunk-LKK3NIHC.js} +1 -1
  90. package/dist/cli/chunks/{chunk-XRJECWZE.js → chunk-LOFA3U4X.js} +1 -1
  91. package/dist/cli/chunks/{chunk-AWFIEGR3.js → chunk-LYKSIOOT.js} +2 -2
  92. package/dist/cli/chunks/chunk-M2PSXKTG.js +2 -0
  93. package/dist/cli/chunks/{chunk-CMACGG4Z.js → chunk-M3MKP5VN.js} +1 -1
  94. package/dist/cli/chunks/{chunk-UYYBPWU3.js → chunk-M4ARHDY4.js} +1 -1
  95. package/dist/cli/chunks/chunk-M5DBKHM4.js +2 -0
  96. package/dist/cli/chunks/{chunk-7IVQ6OVR.js → chunk-MDWJXSBA.js} +2 -2
  97. package/dist/cli/chunks/{chunk-IICTTDAA.js → chunk-MFWWPRBV.js} +2 -2
  98. package/dist/cli/chunks/{chunk-4BXGVM2C.js → chunk-MHWYQHGN.js} +1 -1
  99. package/dist/cli/chunks/{chunk-HJME6G5M.js → chunk-MIQBRVK2.js} +1 -1
  100. package/dist/cli/chunks/{chunk-FY3CUPNN.js → chunk-MKZQBBCU.js} +2 -2
  101. package/dist/cli/chunks/{chunk-MCOFJHSJ.js → chunk-MQ5WMWUK.js} +5 -5
  102. package/dist/cli/chunks/chunk-MQIAN57O.js +2 -0
  103. package/dist/cli/chunks/{chunk-6NZHEM4V.js → chunk-MU4P4P4E.js} +3 -3
  104. package/dist/cli/chunks/{chunk-ETN5563K.js → chunk-MWV4KPOB.js} +2 -2
  105. package/dist/cli/chunks/{chunk-XTCUN36Z.js → chunk-N244P4MM.js} +2 -2
  106. package/dist/cli/chunks/{chunk-DRWGK3YO.js → chunk-N3MM4Z33.js} +2 -2
  107. package/dist/cli/chunks/{chunk-QQNCSEZG.js → chunk-N4CXUGXE.js} +2 -2
  108. package/dist/cli/chunks/{chunk-PEK6NGVJ.js → chunk-ND6YSW5N.js} +1 -1
  109. package/dist/cli/chunks/{chunk-7V5UHLNY.js → chunk-NJYI7HX7.js} +3 -3
  110. package/dist/cli/chunks/{chunk-YACT5WFC.js → chunk-NSRDP7RD.js} +2 -2
  111. package/dist/cli/chunks/{chunk-L7VIX22Y.js → chunk-NZGLDOU4.js} +15 -15
  112. package/dist/cli/chunks/{chunk-MNUTRAUV.js → chunk-O3SG32PS.js} +1 -1
  113. package/dist/cli/chunks/{chunk-ZGNZJJFF.js → chunk-OIFJH7TF.js} +1 -1
  114. package/dist/cli/chunks/{chunk-LZCBSFAU.js → chunk-OKKTDHHF.js} +6 -6
  115. package/dist/cli/chunks/{chunk-3RHHKYUR.js → chunk-OO7KJ34Y.js} +2 -2
  116. package/dist/cli/chunks/{chunk-STEGWLH5.js → chunk-OV4BLIKJ.js} +2 -2
  117. package/dist/cli/chunks/{chunk-AOI67HA3.js → chunk-PISW5HUX.js} +1 -1
  118. package/dist/cli/chunks/{chunk-SJH3HYNC.js → chunk-PLD4IGDL.js} +2 -2
  119. package/dist/cli/chunks/{chunk-2OH3ALYB.js → chunk-PMWWWYUM.js} +1 -1
  120. package/dist/cli/chunks/{chunk-EA7ZSN3V.js → chunk-PWJZZCHJ.js} +1 -1
  121. package/dist/cli/chunks/{chunk-HA63NBFK.js → chunk-PZ4PRZXN.js} +37 -37
  122. package/dist/cli/chunks/chunk-PZCSJZVJ.js +2 -0
  123. package/dist/cli/chunks/{chunk-CTDLI2ON.js → chunk-Q53M4LI7.js} +1 -1
  124. package/dist/cli/chunks/{chunk-WSVUSIAZ.js → chunk-QPMAXDJ2.js} +2 -2
  125. package/dist/cli/chunks/{chunk-MCZHKXB4.js → chunk-RJKYPWFD.js} +2 -2
  126. package/dist/cli/chunks/{chunk-7QRMARM7.js → chunk-RUC3FCRK.js} +2 -2
  127. package/dist/cli/chunks/{chunk-5PL7WTCU.js → chunk-SC6UFGJ6.js} +2 -2
  128. package/dist/cli/chunks/{chunk-FO43SQXP.js → chunk-SJC7OKF3.js} +2 -2
  129. package/dist/cli/chunks/{chunk-R2O6OKT2.js → chunk-STMMZXS6.js} +1 -1
  130. package/dist/cli/chunks/{chunk-ORF2UKQH.js → chunk-SVILIQQQ.js} +1 -1
  131. package/dist/cli/chunks/{chunk-UVU7XLJY.js → chunk-SXMGNMFL.js} +5 -5
  132. package/dist/cli/chunks/{chunk-OIEQF7PG.js → chunk-SZKFT6CD.js} +2 -2
  133. package/dist/cli/chunks/{chunk-G5U6Q42D.js → chunk-TBJ566KV.js} +2 -2
  134. package/dist/cli/chunks/{chunk-SVYTN2GT.js → chunk-TCV5DASI.js} +2 -2
  135. package/dist/cli/chunks/chunk-TWAWEP4X.js +59 -0
  136. package/dist/cli/chunks/chunk-U27GVYXA.js +2 -0
  137. package/dist/cli/chunks/{chunk-FPAW77XV.js → chunk-UFKVKNAA.js} +1 -1
  138. package/dist/cli/chunks/{chunk-HJORBNXW.js → chunk-USB7GCIC.js} +1 -1
  139. package/dist/cli/chunks/{chunk-4GTDW2XL.js → chunk-UW3ZSFFB.js} +2 -2
  140. package/dist/cli/chunks/{chunk-OXCEUR5F.js → chunk-UWAUYDW4.js} +2 -2
  141. package/dist/cli/chunks/{chunk-4F3ZTXHP.js → chunk-UXJVR323.js} +2 -2
  142. package/dist/cli/chunks/{chunk-AIUSZC6K.js → chunk-V5G3SMAJ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-DMQPO43S.js → chunk-VDKMBOUK.js} +1 -1
  144. package/dist/cli/chunks/{chunk-5WJ3FWL4.js → chunk-VJ2D6FST.js} +24 -24
  145. package/dist/cli/chunks/chunk-VJOPNK2L.js +2 -0
  146. package/dist/cli/chunks/{chunk-JF53LRBL.js → chunk-VRE2EBFI.js} +2 -2
  147. package/dist/cli/chunks/{chunk-WNR2KAUH.js → chunk-WI5WXYIS.js} +2 -2
  148. package/dist/cli/chunks/{chunk-OWQ6HEYI.js → chunk-WIYWDON4.js} +2 -2
  149. package/dist/cli/chunks/{chunk-KB5L5TTF.js → chunk-WYMQ6FZR.js} +5 -5
  150. package/dist/cli/chunks/{chunk-TJKDATEU.js → chunk-XBFEHVBO.js} +2 -2
  151. package/dist/cli/chunks/{chunk-7SJX4CFK.js → chunk-XDZXLEJK.js} +1 -1
  152. package/dist/cli/chunks/{chunk-QEPFXY6G.js → chunk-XJXCSCCP.js} +1 -1
  153. package/dist/cli/chunks/{chunk-OPFN5LFT.js → chunk-XVA56PXZ.js} +4 -4
  154. package/dist/cli/chunks/{chunk-PXTDEO65.js → chunk-Y2EDDV5U.js} +2 -2
  155. package/dist/cli/chunks/{chunk-VSUTI4G6.js → chunk-YSLE6NNG.js} +2 -2
  156. package/dist/cli/chunks/{chunk-XGBAHAGC.js → chunk-Z4BTPQLG.js} +4 -4
  157. package/dist/cli/chunks/{chunk-NZO4WUSO.js → chunk-ZM4QGYGK.js} +3 -3
  158. package/dist/cli/chunks/{ci-PYCRCL7G.js → ci-2BLMQNX3.js} +6 -6
  159. package/dist/cli/chunks/{ci-output-EKQQFE2D.js → ci-output-XK4PPSN7.js} +2 -2
  160. package/dist/cli/chunks/{circuit-breaker-RH3Q2MJO.js → circuit-breaker-W7X4NPFE.js} +2 -2
  161. package/dist/cli/chunks/{claude-flow-setup-DUDXB4VV.js → claude-flow-setup-GLBLSYNJ.js} +2 -2
  162. package/dist/cli/chunks/client-C6CJOCRN.js +2 -0
  163. package/dist/cli/chunks/{cline-installer-3Q4WIWUG.js → cline-installer-7WX7DBGI.js} +2 -2
  164. package/dist/cli/chunks/{code-E4Q6DGOO.js → code-SP3HAQWG.js} +20 -19
  165. package/dist/cli/chunks/{code-index-extractor-2PCISUOW.js → code-index-extractor-44HH36UG.js} +2 -2
  166. package/dist/cli/chunks/{codex-installer-YNNNOLJ6.js → codex-installer-LMXRWLPU.js} +2 -2
  167. package/dist/cli/chunks/{completions-2F7TUFBD.js → completions-GL5FTZAN.js} +2 -2
  168. package/dist/cli/chunks/{complexity-analyzer-2B6MHO7W.js → complexity-analyzer-CQMYGETL.js} +2 -2
  169. package/dist/cli/chunks/{continuedev-installer-ENOKRU5M.js → continuedev-installer-CYVYS5B7.js} +2 -2
  170. package/dist/cli/chunks/{copilot-installer-6YD2KM5F.js → copilot-installer-M7XVII2A.js} +2 -2
  171. package/dist/cli/chunks/{cost-tracker-FCH4QOEA.js → cost-tracker-S4ET4FH3.js} +2 -2
  172. package/dist/cli/chunks/{coverage-JTOXZE3T.js → coverage-DFVSSQ4A.js} +3 -3
  173. package/dist/cli/chunks/cross-domain-router-I3GEA5G6.js +2 -0
  174. package/dist/cli/chunks/{cursor-installer-QZFBUGLQ.js → cursor-installer-KWDSQPQC.js} +2 -2
  175. package/dist/cli/chunks/{daemon-K4QFB5FQ.js → daemon-2HD54QVO.js} +3 -3
  176. package/dist/cli/chunks/daemon-CRX46BBO.js +10 -0
  177. package/dist/cli/chunks/{dag-attention-scheduler-BXAAW33V.js → dag-attention-scheduler-SCP6WPZB.js} +2 -2
  178. package/dist/cli/chunks/{detect-UGSWIOAD.js → detect-XS2GDCEX.js} +2 -2
  179. package/dist/cli/chunks/{dist-node-FN3HX3OK.js → dist-node-U43MVQ3F.js} +2 -2
  180. package/dist/cli/chunks/{domain-handler-7PP7VYA7.js → domain-handler-HITMDULH.js} +2 -2
  181. package/dist/cli/chunks/{domain-transfer-XZM44W7I.js → domain-transfer-TJF7DNI4.js} +2 -2
  182. package/dist/cli/chunks/dream-JCQMG2RL.js +2 -0
  183. package/dist/cli/chunks/{embed-and-insert-pattern-JZVERJ5L.js → embed-and-insert-pattern-JKG33YZK.js} +2 -2
  184. package/dist/cli/chunks/{eval-466NFF2D.js → eval-NF5Y4W37.js} +3 -3
  185. package/dist/cli/chunks/{experience-capture-middleware-I7IQCC7V.js → experience-capture-middleware-VMMFYJ4D.js} +3 -3
  186. package/dist/cli/chunks/{fast-paths-34OICNZA.js → fast-paths-W2Q53IR2.js} +2 -2
  187. package/dist/cli/chunks/{feature-flags-6UBIVTAD.js → feature-flags-B4PBMQJO.js} +2 -2
  188. package/dist/cli/chunks/{feature-flags-X5WBBWSO.js → feature-flags-PVI7A4RE.js} +2 -2
  189. package/dist/cli/chunks/{file-discovery-NLMDBWXX.js → file-discovery-E4L3I33I.js} +2 -2
  190. package/dist/cli/chunks/{fleet-W7CYCHDI.js → fleet-LE5SHVLK.js} +3 -3
  191. package/dist/cli/chunks/{gnn-wrapper-K4VTAG5X.js → gnn-wrapper-MWWJBLOH.js} +2 -2
  192. package/dist/cli/chunks/{heartbeat-handler-ZGKF2Z6T.js → heartbeat-handler-XOUVNPQK.js} +4 -4
  193. package/dist/cli/chunks/heartbeat-scheduler-FBHE4ZWH.js +2 -0
  194. package/dist/cli/chunks/hnsw-adapter-EOOA4WXD.js +2 -0
  195. package/dist/cli/chunks/hnsw-index-TD3KRPND.js +2 -0
  196. package/dist/cli/chunks/{hnsw-legacy-bridge-ELDRLKK5.js → hnsw-legacy-bridge-W3T5ZDDP.js} +2 -2
  197. package/dist/cli/chunks/{better-sqlite3-5BT5FO64.js → hnswlib-node-3TZFES5I.js} +2 -2
  198. package/dist/cli/chunks/hooks-RUPQVIUM.js +250 -0
  199. package/dist/cli/chunks/hybrid-router-64O6PXZ2.js +2 -0
  200. package/dist/cli/chunks/{hypergraph-engine-UWFW3XP5.js → hypergraph-engine-VDFK3JYH.js} +2 -2
  201. package/dist/cli/chunks/{hypergraph-handler-PK2BI46K.js → hypergraph-handler-EUDGEF25.js} +3 -3
  202. package/dist/cli/chunks/impact-analyzer-ITQHXGTM.js +2 -0
  203. package/dist/cli/chunks/{init-handler-HNG6KJOU.js → init-handler-MZEAJOZK.js} +6 -6
  204. package/dist/cli/chunks/init-wizard-DZ4IKGQI.js +2 -0
  205. package/dist/cli/chunks/kernel-HSVY4ZYK.js +2 -0
  206. package/dist/cli/chunks/{kilocode-installer-25V7FEJ4.js → kilocode-installer-ECBYWT6M.js} +2 -2
  207. package/dist/cli/chunks/{kiro-installer-7RMTTCQB.js → kiro-installer-KYFCSYTG.js} +2 -2
  208. package/dist/cli/chunks/knowledge-graph-H32TXXX4.js +2 -0
  209. package/dist/cli/chunks/{learning-XQC2MG2R.js → learning-4RAFMDSB.js} +3 -3
  210. package/dist/cli/chunks/{llm-router-6KTTONH4.js → llm-router-JHBNLYP3.js} +12 -12
  211. package/dist/cli/chunks/llm-router-service-3FKESBUX.js +2 -0
  212. package/dist/cli/chunks/{load-BV64P3AL.js → load-4DVQML7P.js} +2 -2
  213. package/dist/cli/chunks/load-test-LKHURZGZ.js +2 -0
  214. package/dist/cli/chunks/{mcp-U5ZN77TA.js → mcp-LCWMU4GZ.js} +2 -2
  215. package/dist/cli/chunks/{memory-WB5BNBK7.js → memory-3DTJAURT.js} +5 -5
  216. package/dist/cli/chunks/memory-backend-XRJRZ6CK.js +2 -0
  217. package/dist/cli/chunks/memory-handlers-BL6E3XAK.js +2 -0
  218. package/dist/cli/chunks/{multi-model-executor-3X3W3UTY.js → multi-model-executor-AVR5SZOO.js} +2 -2
  219. package/dist/cli/chunks/{opencode-installer-TTTMG7ZZ.js → opencode-installer-DW2426QM.js} +3 -3
  220. package/dist/cli/chunks/{orchestrator-BLCGSHMZ.js → orchestrator-AHF4W5GS.js} +8 -8
  221. package/dist/cli/chunks/{pipeline-DZPGMRG7.js → pipeline-N6THEWYE.js} +2 -2
  222. package/dist/cli/chunks/{platform-EVMZAUNV.js → platform-MRCFQF7X.js} +2 -2
  223. package/dist/cli/chunks/{plugin-OR55K4HT.js → plugin-6YKUN5QM.js} +2 -2
  224. package/dist/cli/chunks/{prime-radiant-advanced-wasm-4ODV27HD.js → prime-radiant-advanced-wasm-2YPAHSVS.js} +2 -2
  225. package/dist/cli/chunks/protocol-executor-KABPB6PQ.js +2 -0
  226. package/dist/cli/chunks/{protocol-handler-ZOTI5PID.js → protocol-handler-Y2NMUKWQ.js} +2 -2
  227. package/dist/cli/chunks/{prove-DIMBYJ7V.js → prove-DZUNWBFD.js} +2 -2
  228. package/dist/cli/chunks/provider-manager-U7EBM3FA.js +2 -0
  229. package/dist/cli/chunks/qe-reasoning-bank-64O2OQIW.js +2 -0
  230. package/dist/cli/chunks/{quality-7MX4VL6M.js → quality-AIFQMGUV.js} +2 -2
  231. package/dist/cli/chunks/queen-coordinator-SV3COGIL.js +2 -0
  232. package/dist/cli/chunks/{real-embeddings-YPUHWRN2.js → real-embeddings-5XL4LOG2.js} +2 -2
  233. package/dist/cli/chunks/{roocode-installer-WG5AU4QM.js → roocode-installer-LV3WONT5.js} +2 -2
  234. package/dist/cli/chunks/router-QARRPMED.js +2 -0
  235. package/dist/cli/chunks/routing-feedback-KD2JFTPK.js +2 -0
  236. package/dist/cli/chunks/{routing-handler-LZB4MN2K.js → routing-handler-WSMUILGD.js} +2 -2
  237. package/dist/cli/chunks/{ruvector-commands-YE4ADBMC.js → ruvector-commands-BCEIDTW3.js} +2 -2
  238. package/dist/cli/chunks/{rvf-dual-writer-QS5ATW4C.js → rvf-dual-writer-LRSPC6H3.js} +2 -2
  239. package/dist/cli/chunks/{rvf-migration-adapter-YIGKSBD3.js → rvf-migration-adapter-QHNX6353.js} +2 -2
  240. package/dist/cli/chunks/{rvf-migration-coordinator-2NDCWP7F.js → rvf-migration-coordinator-SLNB3XPW.js} +2 -2
  241. package/dist/cli/chunks/rvf-native-adapter-4LLGF5AY.js +2 -0
  242. package/dist/cli/chunks/safe-db-RAX3H2P7.js +2 -0
  243. package/dist/cli/chunks/schedule-RQZGLLUY.js +2 -0
  244. package/dist/cli/chunks/scheduler-ACWTN4LN.js +2 -0
  245. package/dist/cli/chunks/{security-HT4SUT24.js → security-CYY6TECQ.js} +3 -3
  246. package/dist/cli/chunks/shared-rvf-adapter-U6JE4O6A.js +2 -0
  247. package/dist/cli/chunks/{shared-rvf-dual-writer-ZKFO7CBY.js → shared-rvf-dual-writer-PJBSNBRV.js} +2 -2
  248. package/dist/cli/chunks/sqlite-persistence-SWNBO257.js +2 -0
  249. package/dist/cli/chunks/{status-handler-AMEMKBI4.js → status-handler-W723LXX5.js} +2 -2
  250. package/dist/cli/chunks/{structural-health-RBADRLC3.js → structural-health-WZUPZBB5.js} +2 -2
  251. package/dist/cli/chunks/{sync-PCB23M4K.js → sync-UA22CKUS.js} +2 -2
  252. package/dist/cli/chunks/sync-ZLMF53TB.js +2 -0
  253. package/dist/cli/chunks/{task-handler-J26FSCH5.js → task-handler-SENTEEXZ.js} +2 -2
  254. package/dist/cli/chunks/{task-handlers-AQRLR6BL.js → task-handlers-FGVUZOCC.js} +3 -3
  255. package/dist/cli/chunks/{test-YXWSIOSB.js → test-Q37C3WI2.js} +4 -4
  256. package/dist/cli/chunks/{test-scheduling-XY532GI4.js → test-scheduling-E6SPIBTH.js} +4 -4
  257. package/dist/cli/chunks/token-bootstrap-HQFFMZUF.js +2 -0
  258. package/dist/cli/chunks/{token-usage-2MJVE4DT.js → token-usage-JHNWTZ7L.js} +3 -3
  259. package/dist/cli/chunks/{transformers-QSNTOD2Z.js → transformers-TEXDUVNI.js} +2 -2
  260. package/dist/cli/chunks/tree-sitter-wasm-parser-MWSS52H6.js +2 -0
  261. package/dist/cli/chunks/{types-RNKRSYMO.js → types-YQRKHYH3.js} +2 -2
  262. package/dist/cli/chunks/unified-memory-QG3FDRKR.js +2 -0
  263. package/dist/cli/chunks/unified-memory-hnsw-KOR4EOIG.js +2 -0
  264. package/dist/cli/chunks/unified-persistence-J6NIRYKM.js +2 -0
  265. package/dist/cli/chunks/{upgrade-EKJHIFWP.js → upgrade-JKMEDURI.js} +2 -2
  266. package/dist/cli/chunks/{validate-KS4T7LWC.js → validate-URO7G6OE.js} +4 -4
  267. package/dist/cli/chunks/validate-swarm-VZVJ56Z5.js +14 -0
  268. package/dist/cli/chunks/{vibium-FLUQO4IF.js → vibium-G5WZILL6.js} +2 -2
  269. package/dist/cli/chunks/visual-security-RAWV6YLN.js +2 -0
  270. package/dist/cli/chunks/{web-tree-sitter-UMC63DWD.js → web-tree-sitter-LECH5T6H.js} +2 -2
  271. package/dist/cli/chunks/{windsurf-installer-V3FQGJIQ.js → windsurf-installer-2NPLC2YW.js} +2 -2
  272. package/dist/cli/chunks/{witness-chain-GE74TLSO.js → witness-chain-X347C36A.js} +2 -2
  273. package/dist/cli/chunks/witness-chain-ZO7FIM35.js +2 -0
  274. package/dist/cli/chunks/{workflow-4YZ2RPWA.js → workflow-V4ALYZ73.js} +4 -4
  275. package/dist/cli/chunks/workflow-orchestrator-7SKITNIJ.js +2 -0
  276. package/dist/cli/chunks/wrappers-QXOPRPR4.js +2 -0
  277. package/dist/cli/commands/code.js +6 -0
  278. package/dist/cli/commands/hooks-handlers/task-hooks.js +50 -0
  279. package/dist/cli/commands/learning.js +5 -5
  280. package/dist/cli/commands/llm-router.js +1 -1
  281. package/dist/cli/commands/workflow.js +1 -0
  282. package/dist/coordination/consensus/providers/native-learning-provider.d.ts +1 -1
  283. package/dist/coordination/consensus/providers/ollama-provider.d.ts +1 -1
  284. package/dist/coordination/consensus/providers/openrouter-provider.d.ts +1 -1
  285. package/dist/coordination/handlers/code-intelligence-handlers.js +6 -0
  286. package/dist/coordination/mincut/neural-goap.js +24 -20
  287. package/dist/coordination/protocols/code-intelligence-index.js +31 -25
  288. package/dist/coordination/queen-coordinator.js +4 -0
  289. package/dist/coordination/queen-work-stealing.js +1 -2
  290. package/dist/domains/chaos-resilience/coordinator.js +19 -15
  291. package/dist/domains/chaos-resilience/services/chaos-engineer.js +5 -2
  292. package/dist/domains/chaos-resilience/services/load-tester.js +15 -11
  293. package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
  294. package/dist/domains/code-intelligence/services/c4-model/index.js +12 -6
  295. package/dist/domains/code-intelligence/services/impact-analyzer.js +6 -2
  296. package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +42 -0
  297. package/dist/domains/code-intelligence/services/knowledge-graph.js +278 -93
  298. package/dist/domains/code-intelligence/services/semantic-analyzer.js +8 -2
  299. package/dist/domains/contract-testing/coordinator.js +1 -1
  300. package/dist/domains/coverage-analysis/coordinator.js +4 -2
  301. package/dist/domains/learning-optimization/coordinator.js +1 -0
  302. package/dist/domains/quality-assessment/coherence/gate-controller.js +32 -26
  303. package/dist/domains/requirements-validation/coordinator.js +1 -0
  304. package/dist/domains/test-execution/services/e2e/wait-condition-handler.js +1 -1
  305. package/dist/domains/test-execution/services/retry-handler.js +18 -12
  306. package/dist/domains/test-generation/coordinator.js +1 -1
  307. package/dist/domains/test-generation/services/pattern-matcher.js +7 -5
  308. package/dist/domains/test-generation/services/test-generator.js +3 -2
  309. package/dist/domains/visual-accessibility/coordinator.js +24 -20
  310. package/dist/index.d.ts +2 -2
  311. package/dist/index.js +2 -2
  312. package/dist/init/phases/12-verification.js +3 -3
  313. package/dist/integrations/agentic-flow/model-router/router.js +1 -1
  314. package/dist/integrations/embeddings/base/EmbeddingGenerator.js +11 -7
  315. package/dist/integrations/ruvector/hypergraph-engine.js +2 -2
  316. package/dist/integrations/ruvector/shared-rvf-adapter.js +12 -1
  317. package/dist/integrations/ruvector/shared-rvf-dual-writer.js +6 -2
  318. package/dist/integrations/ruvector/spectral-math.js +2 -2
  319. package/dist/integrations/ruvector/spectral-sparsifier.js +1 -1
  320. package/dist/kernel/kernel.js +1 -1
  321. package/dist/kernel/project-root.d.ts +33 -0
  322. package/dist/kernel/project-root.js +86 -0
  323. package/dist/kernel/unified-memory-hnsw.js +1 -0
  324. package/dist/kernel/unified-memory.d.ts +2 -19
  325. package/dist/kernel/unified-memory.js +8 -64
  326. package/dist/learning/experience-capture.js +1 -1
  327. package/dist/learning/local-judge-client.d.ts +55 -0
  328. package/dist/learning/local-judge-client.js +127 -0
  329. package/dist/learning/nagual-client.d.ts +73 -0
  330. package/dist/learning/nagual-client.js +150 -0
  331. package/dist/learning/pattern-store.js +10 -3
  332. package/dist/learning/qe-reasoning-bank.js +9 -1
  333. package/dist/learning/qe-unified-memory.js +8 -6
  334. package/dist/mcp/bundle.js +405 -403
  335. package/dist/mcp/entry.js +44 -33
  336. package/dist/mcp/handlers/core-handlers.js +2 -2
  337. package/dist/mcp/handlers/cross-phase-handlers.js +5 -3
  338. package/dist/mcp/handlers/handler-factory.d.ts +5 -0
  339. package/dist/mcp/handlers/handler-factory.js +44 -4
  340. package/dist/mcp/http-server.js +1 -0
  341. package/dist/mcp/protocol-server.js +2 -2
  342. package/dist/mcp/tools/code-intelligence/analyze.js +1 -1
  343. package/dist/mcp/tools/learning-optimization/optimize.js +1 -1
  344. package/dist/mcp/tools/qx-analysis/heuristics-engine.js +195 -173
  345. package/dist/mcp/tools/visual-accessibility/index.js +1 -1
  346. package/dist/mcp/transport/stdio.d.ts +7 -0
  347. package/dist/mcp/transport/stdio.js +39 -2
  348. package/dist/mcp/transport/websocket/websocket-transport.js +1 -0
  349. package/dist/optimization/auto-tuner.js +1 -1
  350. package/dist/planning/goap-planner.js +1 -0
  351. package/dist/routing/agent-dependency-graph.js +4 -1
  352. package/dist/shared/llm/router/config-store.js +1 -1
  353. package/dist/shared/metrics/system-metrics.js +6 -4
  354. package/dist/shared/parsers/tree-sitter-wasm-parser.d.ts +12 -0
  355. package/dist/shared/parsers/tree-sitter-wasm-parser.js +35 -0
  356. package/dist/shared/parsers/treesitter-ts-extractor.d.ts +39 -0
  357. package/dist/shared/parsers/treesitter-ts-extractor.js +196 -0
  358. package/dist/shared/utils/safe-expression-evaluator.js +8 -5
  359. package/dist/sync/cloud/postgres-writer.js +2 -0
  360. package/dist/sync/readers/json-reader.js +1 -1
  361. package/dist/test-scheduling/git-aware/test-selector.js +1 -1
  362. package/dist/workers/daemon.js +2 -0
  363. package/dist/workers/quality-daemon/git-watcher.js +2 -0
  364. package/dist/workers/quality-daemon/index.js +28 -24
  365. package/dist/workers/worker-manager.js +4 -0
  366. package/package.json +5 -4
  367. package/dist/cli/chunks/adapter-CR6J5C76.js +0 -2
  368. package/dist/cli/chunks/aqe-learning-engine-2MNTHMB6.js +0 -2
  369. package/dist/cli/chunks/audit-ALRYPHGP.js +0 -3
  370. package/dist/cli/chunks/base-AOQNGMTL.js +0 -2
  371. package/dist/cli/chunks/browser-workflow-UJ4A2ZXO.js +0 -2
  372. package/dist/cli/chunks/chunk-7DKYCVJI.js +0 -2
  373. package/dist/cli/chunks/chunk-FO73PZVU.js +0 -2
  374. package/dist/cli/chunks/chunk-I677W5BT.js +0 -59
  375. package/dist/cli/chunks/chunk-IAZEDWRX.js +0 -2
  376. package/dist/cli/chunks/chunk-RNREAOY4.js +0 -2
  377. package/dist/cli/chunks/chunk-UWXH2UQK.js +0 -2
  378. package/dist/cli/chunks/chunk-ZQUXNG5X.js +0 -2
  379. package/dist/cli/chunks/client-RDPWGOSA.js +0 -2
  380. package/dist/cli/chunks/cross-domain-router-4K5ZVZEZ.js +0 -2
  381. package/dist/cli/chunks/daemon-M422U3ZA.js +0 -10
  382. package/dist/cli/chunks/dream-RPNWM7VS.js +0 -2
  383. package/dist/cli/chunks/heartbeat-scheduler-JBCXMMZO.js +0 -2
  384. package/dist/cli/chunks/hnsw-adapter-3SC2HZIG.js +0 -2
  385. package/dist/cli/chunks/hnsw-index-FQORAR6K.js +0 -2
  386. package/dist/cli/chunks/hooks-T4CBINAV.js +0 -248
  387. package/dist/cli/chunks/hybrid-router-6CBFDXPR.js +0 -2
  388. package/dist/cli/chunks/impact-analyzer-SOEFVZWG.js +0 -2
  389. package/dist/cli/chunks/init-wizard-3E4IU5M4.js +0 -2
  390. package/dist/cli/chunks/kernel-GFZP4G5J.js +0 -2
  391. package/dist/cli/chunks/knowledge-graph-BKRKBU26.js +0 -2
  392. package/dist/cli/chunks/llm-router-service-KE4IGZPP.js +0 -2
  393. package/dist/cli/chunks/load-test-VSYJV2AO.js +0 -2
  394. package/dist/cli/chunks/memory-backend-B72RGHRF.js +0 -2
  395. package/dist/cli/chunks/memory-handlers-NWCH7AUO.js +0 -2
  396. package/dist/cli/chunks/protocol-executor-V3F37FPO.js +0 -2
  397. package/dist/cli/chunks/provider-manager-2PN72TT6.js +0 -2
  398. package/dist/cli/chunks/qe-reasoning-bank-P665QNIR.js +0 -2
  399. package/dist/cli/chunks/queen-coordinator-XD4F7BGB.js +0 -2
  400. package/dist/cli/chunks/router-4SSNWDJC.js +0 -2
  401. package/dist/cli/chunks/routing-feedback-O2JSIBW6.js +0 -2
  402. package/dist/cli/chunks/rvf-native-adapter-WIUHYXRB.js +0 -2
  403. package/dist/cli/chunks/safe-db-WL5Y7ZNS.js +0 -2
  404. package/dist/cli/chunks/schedule-U7QDGU5A.js +0 -2
  405. package/dist/cli/chunks/scheduler-LXKGQYXA.js +0 -2
  406. package/dist/cli/chunks/shared-rvf-adapter-4IZOJL33.js +0 -2
  407. package/dist/cli/chunks/sqlite-persistence-4KFO3SEB.js +0 -2
  408. package/dist/cli/chunks/sync-ARDDLQBS.js +0 -2
  409. package/dist/cli/chunks/token-bootstrap-KL2QIQ36.js +0 -2
  410. package/dist/cli/chunks/tree-sitter-wasm-parser-QJOKHOIW.js +0 -2
  411. package/dist/cli/chunks/unified-memory-7AS4LIEF.js +0 -2
  412. package/dist/cli/chunks/unified-memory-hnsw-GREESNJX.js +0 -2
  413. package/dist/cli/chunks/unified-persistence-BPJOMZOA.js +0 -2
  414. package/dist/cli/chunks/validate-swarm-SKKWRP2H.js +0 -14
  415. package/dist/cli/chunks/visual-security-BW662FHQ.js +0 -2
  416. package/dist/cli/chunks/witness-chain-OXVDLNVT.js +0 -2
  417. package/dist/cli/chunks/workflow-orchestrator-KKNR46XV.js +0 -2
  418. package/dist/cli/chunks/wrappers-37NLMKPE.js +0 -2
@@ -46,70 +46,14 @@ import { createCRDTStore, } from '../memory/crdt/index.js';
46
46
  // ============================================================================
47
47
  // Project Root Detection
48
48
  // ============================================================================
49
- /** Module-level cache for findProjectRoot result. */
50
- let _cachedProjectRoot = null;
51
- /**
52
- * Clear the cached project root. Useful for testing or when the
53
- * environment changes at runtime.
54
- */
55
- export function clearProjectRootCache() {
56
- _cachedProjectRoot = null;
57
- }
58
- /**
59
- * Find the project root by walking up the directory tree.
60
- *
61
- * Priority order:
62
- * 1. AQE_PROJECT_ROOT environment variable (set by MCP config or init)
63
- * 2. Walk up looking for .agentic-qe directory (existing AQE project)
64
- * 3. Walk up looking for .git directory (git repo root)
65
- * 4. Walk up looking for package.json WITHOUT node_modules sibling (monorepo root)
66
- * 5. Fallback to current working directory
67
- *
68
- * Optimized: single upward walk checks all markers in one pass,
69
- * and the result is cached at module level for subsequent calls.
70
- */
71
- export function findProjectRoot(startDir = process.cwd()) {
72
- if (_cachedProjectRoot) {
73
- return _cachedProjectRoot;
74
- }
75
- if (process.env.AQE_PROJECT_ROOT) {
76
- _cachedProjectRoot = process.env.AQE_PROJECT_ROOT;
77
- return _cachedProjectRoot;
78
- }
79
- const dir = startDir;
80
- const root = path.parse(dir).root;
81
- let checkDir = dir;
82
- let topmostAqeDir = null;
83
- let lowestGitDir = null;
84
- let topmostPackageJson = null;
85
- while (checkDir !== root) {
86
- if (fs.existsSync(path.join(checkDir, '.agentic-qe'))) {
87
- topmostAqeDir = checkDir;
88
- }
89
- if (fs.existsSync(path.join(checkDir, '.git'))) {
90
- if (lowestGitDir === null) {
91
- lowestGitDir = checkDir;
92
- }
93
- }
94
- if (fs.existsSync(path.join(checkDir, 'package.json'))) {
95
- topmostPackageJson = checkDir;
96
- }
97
- checkDir = path.dirname(checkDir);
98
- }
99
- if (topmostAqeDir) {
100
- _cachedProjectRoot = topmostAqeDir;
101
- }
102
- else if (lowestGitDir) {
103
- _cachedProjectRoot = lowestGitDir;
104
- }
105
- else if (topmostPackageJson) {
106
- _cachedProjectRoot = topmostPackageJson;
107
- }
108
- else {
109
- _cachedProjectRoot = process.cwd();
110
- }
111
- return _cachedProjectRoot;
112
- }
49
+ // Issue #516: findProjectRoot / clearProjectRootCache live in a lightweight,
50
+ // sqlite-free module so RVF hot paths can import them statically without
51
+ // pulling in this sqlite-heavy module. Re-exported here for backward compat —
52
+ // existing `import { findProjectRoot } from '.../unified-memory.js'` sites keep
53
+ // working unchanged. Imported (not bare re-exported) so internal callers below
54
+ // have a usable local binding.
55
+ import { findProjectRoot, clearProjectRootCache } from './project-root.js';
56
+ export { findProjectRoot, clearProjectRootCache };
113
57
  /**
114
58
  * Get the default database path using project root detection.
115
59
  * Always resolves to {project_root}/.agentic-qe/memory.db
@@ -418,7 +418,7 @@ export class ExperienceCaptureService {
418
418
  * plus new { consolidated, archived } fields.
419
419
  */
420
420
  async cleanup() {
421
- let consolidated = 0;
421
+ const consolidated = 0;
422
422
  let archived = 0;
423
423
  for (const domain of this.stats.byDomain.keys()) {
424
424
  const count = this.stats.byDomain.get(domain) || 0;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Agentic QE v3 - Local LLM Judge Client
3
+ *
4
+ * Scores QE patterns for coherence, specificity, and reusability using a
5
+ * locally running Ollama-compatible LLM (OpenAI chat completions API).
6
+ *
7
+ * Reward blending: final_reward = 0.7 * outcome_reward + 0.3 * judge_score
8
+ * Escalation: score in [0.4, 0.6] → logged for human review (ambiguous zone)
9
+ *
10
+ * Env vars (all optional — client is disabled if none set):
11
+ * NAGUAL_JUDGE_URL — base URL of Ollama server (default: http://localhost:11434)
12
+ * NAGUAL_JUDGE_MODEL — model to use (default: qwen3:8b)
13
+ *
14
+ * Supported models (in preference order for M-series Macs):
15
+ * gemma4:12b-mlx — 10GB, MLX-optimised, best quality on Apple Silicon
16
+ * qwen3:8b — 5.2GB, strong reasoning, already installed
17
+ * qwen3:30b-a3b — 18GB, highest quality, use only if RAM permits
18
+ */
19
+ /** Output of a judge evaluation. */
20
+ export interface JudgeResult {
21
+ /** Quality score in [0, 1]. */
22
+ score: number;
23
+ /** One-sentence reasoning from the model. */
24
+ reason: string;
25
+ /** Model that produced the score. */
26
+ model: string;
27
+ /** True if score falls in the ambiguous zone [0.4, 0.6]. */
28
+ needsReview: boolean;
29
+ }
30
+ /**
31
+ * Blend an outcome reward with a judge score.
32
+ * final = 0.7 * outcomeReward + 0.3 * judgeScore
33
+ * Falls back to outcomeReward if judgeResult is null (judge unavailable).
34
+ */
35
+ export declare function blendReward(outcomeReward: number, judgeResult: JudgeResult | null): number;
36
+ /**
37
+ * Local LLM judge using OpenAI-compatible chat completions.
38
+ * Disabled automatically when NAGUAL_JUDGE_URL and NAGUAL_JUDGE_MODEL are both unset.
39
+ */
40
+ export declare class LocalJudgeClient {
41
+ readonly baseUrl: string;
42
+ readonly model: string;
43
+ readonly enabled: boolean;
44
+ constructor(opts?: {
45
+ url?: string;
46
+ model?: string;
47
+ });
48
+ /**
49
+ * Score a piece of text (pattern problem+solution) for QE quality.
50
+ * Returns null if judge is disabled or unavailable — callers use outcomeReward as-is.
51
+ */
52
+ score(text: string): Promise<JudgeResult | null>;
53
+ }
54
+ export declare function getLocalJudgeClient(): LocalJudgeClient;
55
+ //# sourceMappingURL=local-judge-client.d.ts.map
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Agentic QE v3 - Local LLM Judge Client
3
+ *
4
+ * Scores QE patterns for coherence, specificity, and reusability using a
5
+ * locally running Ollama-compatible LLM (OpenAI chat completions API).
6
+ *
7
+ * Reward blending: final_reward = 0.7 * outcome_reward + 0.3 * judge_score
8
+ * Escalation: score in [0.4, 0.6] → logged for human review (ambiguous zone)
9
+ *
10
+ * Env vars (all optional — client is disabled if none set):
11
+ * NAGUAL_JUDGE_URL — base URL of Ollama server (default: http://localhost:11434)
12
+ * NAGUAL_JUDGE_MODEL — model to use (default: qwen3:8b)
13
+ *
14
+ * Supported models (in preference order for M-series Macs):
15
+ * gemma4:12b-mlx — 10GB, MLX-optimised, best quality on Apple Silicon
16
+ * qwen3:8b — 5.2GB, strong reasoning, already installed
17
+ * qwen3:30b-a3b — 18GB, highest quality, use only if RAM permits
18
+ */
19
+ import { LoggerFactory } from '../logging/index.js';
20
+ const logger = LoggerFactory.create('local-judge');
21
+ const DEFAULT_URL = 'http://localhost:11434';
22
+ const DEFAULT_MODEL = 'qwen3:8b';
23
+ const JUDGE_TIMEOUT_MS = 30_000;
24
+ const MAX_TEXT_LENGTH = 600;
25
+ // Thinking models (gemma4, qwen3) need extra tokens to finish reasoning before output
26
+ const MAX_TOKENS = 600;
27
+ /** Score in this range is ambiguous — flagged for human review. */
28
+ const AMBIGUOUS_LOW = 0.4;
29
+ const AMBIGUOUS_HIGH = 0.6;
30
+ /**
31
+ * Blend an outcome reward with a judge score.
32
+ * final = 0.7 * outcomeReward + 0.3 * judgeScore
33
+ * Falls back to outcomeReward if judgeResult is null (judge unavailable).
34
+ */
35
+ export function blendReward(outcomeReward, judgeResult) {
36
+ if (judgeResult === null)
37
+ return outcomeReward;
38
+ return 0.7 * outcomeReward + 0.3 * judgeResult.score;
39
+ }
40
+ /**
41
+ * Local LLM judge using OpenAI-compatible chat completions.
42
+ * Disabled automatically when NAGUAL_JUDGE_URL and NAGUAL_JUDGE_MODEL are both unset.
43
+ */
44
+ export class LocalJudgeClient {
45
+ baseUrl;
46
+ model;
47
+ enabled;
48
+ constructor(opts) {
49
+ this.baseUrl = opts?.url ?? process.env['NAGUAL_JUDGE_URL'] ?? DEFAULT_URL;
50
+ this.model = opts?.model ?? process.env['NAGUAL_JUDGE_MODEL'] ?? DEFAULT_MODEL;
51
+ // Only active when explicitly configured via env or constructor options
52
+ this.enabled = Boolean(opts?.url ?? opts?.model ??
53
+ process.env['NAGUAL_JUDGE_URL'] ??
54
+ process.env['NAGUAL_JUDGE_MODEL']);
55
+ }
56
+ /**
57
+ * Score a piece of text (pattern problem+solution) for QE quality.
58
+ * Returns null if judge is disabled or unavailable — callers use outcomeReward as-is.
59
+ */
60
+ async score(text) {
61
+ if (!this.enabled)
62
+ return null;
63
+ const truncated = text.slice(0, MAX_TEXT_LENGTH);
64
+ const prompt = [
65
+ 'You are a QE pattern quality judge.',
66
+ 'Rate the following pattern for: coherence, specificity, and reusability in a software quality engineering context.',
67
+ 'Reply with valid JSON only, no other text: {"score": <float 0.0-1.0>, "reason": "<one sentence>"}',
68
+ '',
69
+ `Pattern:\n${truncated}`,
70
+ ].join('\n');
71
+ try {
72
+ const response = await fetch(`${this.baseUrl}/v1/chat/completions`, {
73
+ method: 'POST',
74
+ headers: { 'Content-Type': 'application/json' },
75
+ body: JSON.stringify({
76
+ model: this.model,
77
+ messages: [{ role: 'user', content: prompt }],
78
+ temperature: 0.1,
79
+ max_tokens: MAX_TOKENS,
80
+ }),
81
+ signal: AbortSignal.timeout(JUDGE_TIMEOUT_MS),
82
+ });
83
+ if (!response.ok) {
84
+ logger.debug('judge request failed', { status: response.status, model: this.model });
85
+ return null;
86
+ }
87
+ const data = await response.json();
88
+ const msg = data.choices?.[0]?.message;
89
+ // Thinking models (gemma4, qwen3) emit final answer in content; reasoning
90
+ // holds the internal chain-of-thought. Fall back to reasoning if content empty.
91
+ const rawText = (msg?.content ?? '') || (msg?.reasoning ?? '');
92
+ // Strip markdown code fences before parsing
93
+ const cleaned = rawText.replace(/```[\w]*\n?/g, '').replace(/```/g, '');
94
+ // Extract first JSON object — handles multiline values via [\s\S] inside quotes
95
+ const jsonMatch = cleaned.match(/\{[\s\S]*?"score"[\s\S]*?\}/);
96
+ if (!jsonMatch) {
97
+ logger.debug('judge response had no JSON', { rawText: rawText.slice(0, 150) });
98
+ return null;
99
+ }
100
+ const parsed = JSON.parse(jsonMatch[0]);
101
+ if (typeof parsed.score !== 'number')
102
+ return null;
103
+ const score = Math.max(0, Math.min(1, parsed.score));
104
+ const reason = typeof parsed.reason === 'string' ? parsed.reason : '';
105
+ const needsReview = score >= AMBIGUOUS_LOW && score <= AMBIGUOUS_HIGH;
106
+ if (needsReview) {
107
+ logger.info('[SurpriseReview] ambiguous judge score — flag for human review', {
108
+ score,
109
+ reason,
110
+ model: this.model,
111
+ });
112
+ }
113
+ return { score, reason, model: this.model, needsReview };
114
+ }
115
+ catch (err) {
116
+ logger.debug('judge unavailable (non-fatal)', { err, model: this.model });
117
+ return null;
118
+ }
119
+ }
120
+ }
121
+ let _instance;
122
+ export function getLocalJudgeClient() {
123
+ if (!_instance)
124
+ _instance = new LocalJudgeClient();
125
+ return _instance;
126
+ }
127
+ //# sourceMappingURL=local-judge-client.js.map
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Agentic QE v3 - Nagual Client
3
+ *
4
+ * REST client for a nagual self-learning pattern hub.
5
+ * Defaults to a locally running nagual serve instance.
6
+ *
7
+ * Setup: run your own nagual instance from
8
+ * https://github.com/proffesor-for-testing/nagual-qe
9
+ * then: nagual serve --port 3333
10
+ *
11
+ * Env vars:
12
+ * NAGUAL_URL — base URL of your nagual instance (default: http://localhost:3333)
13
+ * NAGUAL_API_TOKEN — API token if your instance requires one
14
+ * NAGUAL_CLOUD_KEY — alias for NAGUAL_API_TOKEN, loaded from ~/.nagual/cloud-hooks.env
15
+ */
16
+ export interface NagualPattern {
17
+ id: string;
18
+ problem: string;
19
+ solution: string;
20
+ domain: string;
21
+ reward: number;
22
+ tags: string[];
23
+ use_count?: number;
24
+ success_rate?: number;
25
+ embedding_method?: string;
26
+ }
27
+ export type NagualOutcomeType = 'success' | 'partial_success' | 'failure';
28
+ export interface NagualOutcome {
29
+ outcome: NagualOutcomeType;
30
+ reward: number;
31
+ feedback?: string;
32
+ }
33
+ export interface NagualPromotePayload {
34
+ problem: string;
35
+ solution: string;
36
+ domain: string;
37
+ reward: number;
38
+ tags?: string[];
39
+ source_project?: string;
40
+ }
41
+ /** Map AQE TestOutcome → nagual outcome + reward. */
42
+ export declare function mapTestOutcomeToNagual(testOutcome: string): {
43
+ outcome: NagualOutcomeType;
44
+ reward: number;
45
+ };
46
+ /**
47
+ * Thin REST client for the nagual pattern hub.
48
+ * All methods are fire-and-forget safe — they never throw.
49
+ */
50
+ export declare class NagualClient {
51
+ private readonly baseUrl;
52
+ private readonly token;
53
+ readonly enabled: boolean;
54
+ constructor();
55
+ /**
56
+ * Search nagual for patterns relevant to a task.
57
+ * Returns empty array on any error — callers must not depend on results.
58
+ */
59
+ search(query: string, domain?: string, limit?: number): Promise<NagualPattern[]>;
60
+ /**
61
+ * Record an outcome for a nagual pattern that was used in a task.
62
+ * Fire-and-forget — never awaited by callers in the hot path.
63
+ */
64
+ recordOutcome(patternId: string, outcome: NagualOutcome): Promise<void>;
65
+ /**
66
+ * Promote an AQE long-term pattern up to nagual as the cross-project hub.
67
+ * Applies 0.8 confidence decay on the reward before storing.
68
+ */
69
+ promotePattern(payload: NagualPromotePayload): Promise<void>;
70
+ private headers;
71
+ }
72
+ export declare function getNagualClient(): NagualClient;
73
+ //# sourceMappingURL=nagual-client.d.ts.map
@@ -0,0 +1,150 @@
1
+ /**
2
+ * Agentic QE v3 - Nagual Client
3
+ *
4
+ * REST client for a nagual self-learning pattern hub.
5
+ * Defaults to a locally running nagual serve instance.
6
+ *
7
+ * Setup: run your own nagual instance from
8
+ * https://github.com/proffesor-for-testing/nagual-qe
9
+ * then: nagual serve --port 3333
10
+ *
11
+ * Env vars:
12
+ * NAGUAL_URL — base URL of your nagual instance (default: http://localhost:3333)
13
+ * NAGUAL_API_TOKEN — API token if your instance requires one
14
+ * NAGUAL_CLOUD_KEY — alias for NAGUAL_API_TOKEN, loaded from ~/.nagual/cloud-hooks.env
15
+ */
16
+ import { readFileSync } from 'node:fs';
17
+ import { homedir } from 'node:os';
18
+ import { LoggerFactory } from '../logging/index.js';
19
+ const logger = LoggerFactory.create('nagual-client');
20
+ /** Load NAGUAL_CLOUD_KEY from ~/.nagual/cloud-hooks.env when not in process.env. */
21
+ function loadCloudKeyFromFile() {
22
+ try {
23
+ const envFile = readFileSync(`${homedir()}/.nagual/cloud-hooks.env`, 'utf8');
24
+ for (const line of envFile.split('\n')) {
25
+ const m = line.match(/^(?:export\s+)?NAGUAL_CLOUD_KEY=(.+)/);
26
+ if (m)
27
+ return m[1].trim().replace(/^['"]|['"]$/g, '');
28
+ }
29
+ }
30
+ catch { /* file may not exist */ }
31
+ return undefined;
32
+ }
33
+ const DEFAULT_URL = 'http://localhost:3333';
34
+ const REQUEST_TIMEOUT_MS = 3000;
35
+ const PROMOTE_TIMEOUT_MS = 5000;
36
+ /** Map AQE TestOutcome → nagual outcome + reward. */
37
+ export function mapTestOutcomeToNagual(testOutcome) {
38
+ switch (testOutcome) {
39
+ case 'catches-bug': return { outcome: 'success', reward: 0.9 };
40
+ case 'new-coverage': return { outcome: 'partial_success', reward: 0.7 };
41
+ case 'neutral': return { outcome: 'partial_success', reward: 0.5 };
42
+ case 'redundant': return { outcome: 'partial_success', reward: 0.3 };
43
+ case 'code-smell': return { outcome: 'failure', reward: 0.2 };
44
+ case 'flaky': return { outcome: 'failure', reward: 0.2 };
45
+ case 'false-positive': return { outcome: 'failure', reward: 0.1 };
46
+ default: return { outcome: 'partial_success', reward: 0.5 };
47
+ }
48
+ }
49
+ /**
50
+ * Thin REST client for the nagual pattern hub.
51
+ * All methods are fire-and-forget safe — they never throw.
52
+ */
53
+ export class NagualClient {
54
+ baseUrl;
55
+ token;
56
+ enabled;
57
+ constructor() {
58
+ this.baseUrl = process.env['NAGUAL_URL'] ?? DEFAULT_URL;
59
+ this.token =
60
+ process.env['NAGUAL_CLOUD_KEY'] ??
61
+ process.env['NAGUAL_API_TOKEN'] ??
62
+ loadCloudKeyFromFile();
63
+ this.enabled = true; // always attempt; errors are swallowed
64
+ }
65
+ /**
66
+ * Search nagual for patterns relevant to a task.
67
+ * Returns empty array on any error — callers must not depend on results.
68
+ */
69
+ async search(query, domain, limit = 5) {
70
+ try {
71
+ const response = await fetch(`${this.baseUrl}/api/patterns/search`, {
72
+ method: 'POST',
73
+ headers: this.headers(),
74
+ body: JSON.stringify({ query, domain, limit }),
75
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
76
+ });
77
+ if (!response.ok)
78
+ return [];
79
+ const data = await response.json();
80
+ return data.patterns ?? [];
81
+ }
82
+ catch {
83
+ return [];
84
+ }
85
+ }
86
+ /**
87
+ * Record an outcome for a nagual pattern that was used in a task.
88
+ * Fire-and-forget — never awaited by callers in the hot path.
89
+ */
90
+ async recordOutcome(patternId, outcome) {
91
+ try {
92
+ const response = await fetch(`${this.baseUrl}/api/patterns/${encodeURIComponent(patternId)}/outcome`, {
93
+ method: 'POST',
94
+ headers: this.headers(),
95
+ body: JSON.stringify(outcome),
96
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
97
+ });
98
+ if (!response.ok) {
99
+ logger.debug('nagual recordOutcome non-OK', { patternId, status: response.status });
100
+ }
101
+ }
102
+ catch (err) {
103
+ logger.debug('nagual recordOutcome failed (non-fatal)', { patternId, err });
104
+ }
105
+ }
106
+ /**
107
+ * Promote an AQE long-term pattern up to nagual as the cross-project hub.
108
+ * Applies 0.8 confidence decay on the reward before storing.
109
+ */
110
+ async promotePattern(payload) {
111
+ const body = {
112
+ problem: payload.problem,
113
+ solution: payload.solution,
114
+ domain: payload.domain,
115
+ reward: payload.reward * 0.8, // cross-domain confidence decay
116
+ tags: [
117
+ ...(payload.tags ?? []),
118
+ 'source:aqe',
119
+ payload.source_project ? `project:${payload.source_project}` : null,
120
+ ].filter((t) => t !== null),
121
+ };
122
+ try {
123
+ const response = await fetch(`${this.baseUrl}/api/patterns`, {
124
+ method: 'POST',
125
+ headers: this.headers(),
126
+ body: JSON.stringify(body),
127
+ signal: AbortSignal.timeout(PROMOTE_TIMEOUT_MS),
128
+ });
129
+ if (!response.ok) {
130
+ logger.debug('nagual promotePattern non-OK', { status: response.status });
131
+ }
132
+ }
133
+ catch (err) {
134
+ logger.debug('nagual promotePattern failed (non-fatal)', { err });
135
+ }
136
+ }
137
+ headers() {
138
+ const h = { 'Content-Type': 'application/json' };
139
+ if (this.token)
140
+ h['Authorization'] = `Bearer ${this.token}`;
141
+ return h;
142
+ }
143
+ }
144
+ let _instance;
145
+ export function getNagualClient() {
146
+ if (!_instance)
147
+ _instance = new NagualClient();
148
+ return _instance;
149
+ }
150
+ //# sourceMappingURL=nagual-client.js.map
@@ -6,6 +6,9 @@
6
6
  * O(log n) approximate nearest neighbor search.
7
7
  */
8
8
  import { v4 as uuidv4 } from 'uuid';
9
+ // Issue #516: lightweight, sqlite-free project-root resolver (static import so it
10
+ // resolves under the test runner; avoids pulling unified-memory's sqlite graph).
11
+ import { findProjectRoot } from '../kernel/project-root.js';
9
12
  import { ok, err } from '../shared/types/index.js';
10
13
  import { RvfPatternStore } from './rvf-pattern-store.js';
11
14
  import { createRvfStore as _createRvfStore, isRvfNativeAvailable } from '../integrations/ruvector/rvf-native-adapter.js';
@@ -1364,10 +1367,14 @@ export function createPatternStore(memory, config) {
1364
1367
  try {
1365
1368
  const flags = getRuVectorFeatureFlags();
1366
1369
  if (flags.useRVFPatternStore && isRvfNativeAvailable()) {
1367
- // Only use RVF if the data directory exists (created by kernel init)
1370
+ // Only use RVF if the data directory exists (created by kernel init).
1371
+ // Issue #516: anchor to the project root so a subfolder cwd reads/writes
1372
+ // the project's own .agentic-qe/ rather than a cwd-relative stray store.
1368
1373
  const { existsSync } = require('fs');
1369
- const rvfPath = '.agentic-qe/patterns.rvf';
1370
- const rvfDir = require('path').dirname(rvfPath);
1374
+ const { join: joinPath } = require('path');
1375
+ const projectRoot = process.env.AQE_PROJECT_ROOT ?? findProjectRoot();
1376
+ const rvfDir = joinPath(projectRoot, '.agentic-qe');
1377
+ const rvfPath = joinPath(rvfDir, 'patterns.rvf');
1371
1378
  if (existsSync(rvfDir)) {
1372
1379
  const mergedConfig = { ...DEFAULT_PATTERN_STORE_CONFIG, ...config };
1373
1380
  // FIX: Route through getSharedRvfAdapter() singleton to avoid
@@ -132,10 +132,18 @@ export class QEReasoningBank {
132
132
  logger.warn('Failed to wire SQLitePatternStore into PatternStore', { error: toErrorMessage(e) });
133
133
  }
134
134
  signal?.throwIfAborted();
135
+ // Mark initialized BEFORE seeding patterns. Pattern seeding goes through
136
+ // storePattern(), which ensure-inits via `if (!this.initialized) await
137
+ // this.initialize()`. The core stores (patternStore + SQLite) are already up
138
+ // at this point, so the bank is functionally ready — setting the flag here
139
+ // stops storePattern() from recursively re-entering initialize(). With the
140
+ // flag set only AFTER seeding, that re-entry recursed without bound and hung
141
+ // every MCP domain tool on a fresh install the first time patterns were
142
+ // seeded (CPU spin via async self-recursion).
143
+ this.initialized = true;
135
144
  // Load any pre-trained patterns
136
145
  await this.loadPretrainedPatterns(signal);
137
146
  signal?.throwIfAborted();
138
- this.initialized = true;
139
147
  // Run cross-domain transfer ONCE per DB lifetime (not every init)
140
148
  // IMPORTANT: Set the flag BEFORE the transfer so that even if the transfer
141
149
  // times out (hooks.ts has a 10s timeout on initialize()), the flag persists
@@ -378,7 +378,7 @@ export class QEUnifiedMemory {
378
378
  let totalEntries = 0;
379
379
  let totalVectors = 0;
380
380
  let totalIndexSize = 0;
381
- let hnswHealthy = true;
381
+ const hnswHealthy = true;
382
382
  for (const domain of QE_MEMORY_DOMAINS) {
383
383
  let vectorCount = 0;
384
384
  let indexSize = 0;
@@ -469,7 +469,7 @@ export class QEUnifiedMemory {
469
469
  };
470
470
  }
471
471
  let itemsMigrated = 0;
472
- let itemsSkipped = 0;
472
+ const itemsSkipped = 0;
473
473
  const errors = [];
474
474
  try {
475
475
  switch (config.source) {
@@ -576,10 +576,12 @@ export class QEUnifiedMemory {
576
576
  extractRiskScore(domain, metadata) {
577
577
  switch (domain) {
578
578
  case 'defects':
579
- const defectMeta = metadata;
580
- // Map severity to risk score
581
- const severityMap = { critical: 1, high: 0.75, medium: 0.5, low: 0.25 };
582
- return severityMap[defectMeta.severity] * defectMeta.confidence;
579
+ {
580
+ const defectMeta = metadata;
581
+ // Map severity to risk score
582
+ const severityMap = { critical: 1, high: 0.75, medium: 0.5, low: 0.25 };
583
+ return severityMap[defectMeta.severity] * defectMeta.confidence;
584
+ }
583
585
  case 'quality':
584
586
  return 1 - metadata.qualityScore;
585
587
  case 'learning':