agentic-qe 3.15.4 → 3.15.6

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 (556) hide show
  1. package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
  2. package/.claude/skills/qe-court/evals/qe-court.yaml +3 -2
  3. package/.claude/skills/qe-quality-assessment/schemas/output.json +12 -2
  4. package/.claude/skills/skills-manifest.json +1 -1
  5. package/CHANGELOG.md +191 -0
  6. package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/README.md +9 -2
  7. package/assets/skills/qe-court/evals/qe-court.yaml +3 -2
  8. package/assets/skills/qe-quality-assessment/schemas/output.json +12 -2
  9. package/assets/skills/skills-manifest.json +1 -1
  10. package/dist/bridge/captured-experience-bridge.js +7 -9
  11. package/dist/cli/bundle.js +5 -5
  12. package/dist/cli/chunks/adapter-PP3XIXDV.js +2 -0
  13. package/dist/cli/chunks/{agent-booster-wasm-MHJBRXMK.js → agent-booster-wasm-SY7UCLBL.js} +2 -2
  14. package/dist/cli/chunks/{agent-handler-G64SD7J2.js → agent-handler-KAMYBU3S.js} +2 -2
  15. package/dist/cli/chunks/{agent-memory-branch-G4UXFPKH.js → agent-memory-branch-2CAW3KUM.js} +2 -2
  16. package/dist/cli/chunks/aqe-learning-engine-VDUQJKKY.js +2 -0
  17. package/dist/cli/chunks/{arena-63M3M6EW.js → arena-4OFLJ3R2.js} +2 -2
  18. package/dist/cli/chunks/{arena-QJMKYPHS.js → arena-QCCVIOAH.js} +4 -4
  19. package/dist/cli/chunks/{audit-UDFVTWSX.js → audit-RBDQJQJB.js} +3 -3
  20. package/dist/cli/chunks/base-QSYWWPCE.js +2 -0
  21. package/dist/cli/chunks/{better-sqlite3-JLX2G56I.js → better-sqlite3-5JRACCDQ.js} +2 -2
  22. package/dist/cli/chunks/{brain-handler-PWF32LLW.js → brain-handler-W4QIIRT4.js} +3 -3
  23. package/dist/cli/chunks/{branch-enumerator-PB7QWXDP.js → branch-enumerator-IBNGI572.js} +2 -2
  24. package/dist/cli/chunks/{browser-CYNV2F3U.js → browser-GMSCVAOI.js} +2 -2
  25. package/dist/cli/chunks/browser-workflow-WXXPBSCM.js +2 -0
  26. package/dist/cli/chunks/{chunk-S5D3HCGN.js → chunk-22OZIJAD.js} +2 -2
  27. package/dist/cli/chunks/{chunk-NBMQOP2R.js → chunk-24ZSGYC6.js} +1 -1
  28. package/dist/cli/chunks/{chunk-HFSBONCS.js → chunk-2CIDFR2H.js} +3 -3
  29. package/dist/cli/chunks/{chunk-A4OPQJ4A.js → chunk-2IWPJUVV.js} +5 -5
  30. package/dist/cli/chunks/{chunk-RI4JPBZD.js → chunk-2ZTWPMTK.js} +2 -2
  31. package/dist/cli/chunks/{chunk-ZURYZEHX.js → chunk-34MDMFET.js} +2 -2
  32. package/dist/cli/chunks/chunk-3DJNKNBR.js +742 -0
  33. package/dist/cli/chunks/{chunk-GJVRQBLI.js → chunk-3NJ7O3OH.js} +2 -2
  34. package/dist/cli/chunks/chunk-45MVRQG4.js +2 -0
  35. package/dist/cli/chunks/chunk-46HBVDMU.js +2 -0
  36. package/dist/cli/chunks/{chunk-SCL2OYN7.js → chunk-47Q7JL3V.js} +2 -2
  37. package/dist/cli/chunks/chunk-4CLDYT36.js +2 -0
  38. package/dist/cli/chunks/{chunk-3ZIVBTX6.js → chunk-4KOVHQXK.js} +2 -2
  39. package/dist/cli/chunks/{chunk-BBKLVHDQ.js → chunk-4POOJYXA.js} +1 -1
  40. package/dist/cli/chunks/{chunk-DAYMT7TH.js → chunk-5DH5QI7G.js} +26 -26
  41. package/dist/cli/chunks/{chunk-2534PXIV.js → chunk-5GIJU2ZY.js} +2 -2
  42. package/dist/cli/chunks/{chunk-MBV57LKC.js → chunk-5HAPS6VD.js} +2 -2
  43. package/dist/cli/chunks/{chunk-NIJMLEAX.js → chunk-5LST62QR.js} +2 -2
  44. package/dist/cli/chunks/{chunk-33IUCP34.js → chunk-5MT7DMD7.js} +2 -2
  45. package/dist/cli/chunks/{chunk-LRTF5RMG.js → chunk-5NC7QEJ6.js} +4 -4
  46. package/dist/cli/chunks/{chunk-SJB4KMZS.js → chunk-5UPIL62W.js} +3 -3
  47. package/dist/cli/chunks/{chunk-76PRW2KY.js → chunk-5VUIXDY2.js} +2 -2
  48. package/dist/cli/chunks/chunk-5VZVMO7B.js +3 -0
  49. package/dist/cli/chunks/{chunk-J3RNVHDH.js → chunk-624QRKQX.js} +1 -1
  50. package/dist/cli/chunks/{chunk-N6CRIUTO.js → chunk-66NW3ZB4.js} +2 -2
  51. package/dist/cli/chunks/{chunk-PCWZCXBD.js → chunk-6HWARQWV.js} +2 -2
  52. package/dist/cli/chunks/{chunk-VAXQUD5G.js → chunk-6MXAJBEA.js} +1 -1
  53. package/dist/cli/chunks/{chunk-LOLAEDZD.js → chunk-6R3FBFCJ.js} +2 -2
  54. package/dist/cli/chunks/{chunk-ASKPTGUU.js → chunk-6RDVY26I.js} +2 -2
  55. package/dist/cli/chunks/{chunk-35A22AUL.js → chunk-6T6AHVLF.js} +1 -1
  56. package/dist/cli/chunks/{chunk-IKWAPHJA.js → chunk-6WOZUSSN.js} +2 -2
  57. package/dist/cli/chunks/chunk-72MQCZSM.js +2 -0
  58. package/dist/cli/chunks/chunk-7QVPMH25.js +3 -0
  59. package/dist/cli/chunks/{chunk-5H7MR6HP.js → chunk-7SAMMQVS.js} +1 -1
  60. package/dist/cli/chunks/{chunk-B7J3O2WM.js → chunk-7TJZDRDU.js} +1 -1
  61. package/dist/cli/chunks/{chunk-OFQDM73J.js → chunk-7TVIX4WL.js} +2 -2
  62. package/dist/cli/chunks/{chunk-SZWXUG36.js → chunk-7VTKR44N.js} +2 -2
  63. package/dist/cli/chunks/{chunk-5B5D5KCV.js → chunk-7XTANLTN.js} +1 -1
  64. package/dist/cli/chunks/chunk-7XUB7U6Z.js +4 -0
  65. package/dist/cli/chunks/{chunk-GAXTPQCZ.js → chunk-A74J23QB.js} +2 -2
  66. package/dist/cli/chunks/{chunk-K2VUYRMG.js → chunk-A7ANPS4E.js} +2 -2
  67. package/dist/cli/chunks/{chunk-WO4NSPLX.js → chunk-AJT3XDRD.js} +2 -2
  68. package/dist/cli/chunks/{chunk-LPSE6DOQ.js → chunk-ALCIUWFC.js} +1 -1
  69. package/dist/cli/chunks/{chunk-UK5HY6LC.js → chunk-AUN4FG7V.js} +1 -1
  70. package/dist/cli/chunks/{chunk-MGH4XIHH.js → chunk-AUOSHM63.js} +2 -2
  71. package/dist/cli/chunks/{chunk-HX5KQK7I.js → chunk-AX26QJ6T.js} +2 -2
  72. package/dist/cli/chunks/{chunk-BZWZTGMF.js → chunk-B7RHBKHL.js} +2 -2
  73. package/dist/cli/chunks/{chunk-I5A3HGO6.js → chunk-BAYGQRNP.js} +2 -2
  74. package/dist/cli/chunks/{chunk-3C2BFLYC.js → chunk-BIXRTOH3.js} +18 -18
  75. package/dist/cli/chunks/{chunk-EWUFVWRT.js → chunk-BO7UFNYV.js} +2 -2
  76. package/dist/cli/chunks/{chunk-6TMUZGM2.js → chunk-BUTGIVKW.js} +1 -1
  77. package/dist/cli/chunks/{chunk-2MU4WCMQ.js → chunk-BXATKI5S.js} +2 -2
  78. package/dist/cli/chunks/{chunk-HEDLZWPM.js → chunk-CCL436IU.js} +44 -33
  79. package/dist/cli/chunks/{chunk-6EHVPFHW.js → chunk-CEXNW5TR.js} +1 -1
  80. package/dist/cli/chunks/{chunk-2ICC4H6K.js → chunk-CLAMMGY3.js} +2 -2
  81. package/dist/cli/chunks/{chunk-BPGFCUDO.js → chunk-CR66HNAE.js} +1 -1
  82. package/dist/cli/chunks/{chunk-CFXFGQEN.js → chunk-CZBIREL5.js} +2 -2
  83. package/dist/cli/chunks/{chunk-Z56QTRRB.js → chunk-D5N2O5EH.js} +2 -2
  84. package/dist/cli/chunks/{chunk-M6SJALLA.js → chunk-DA7DGDTI.js} +2 -2
  85. package/dist/cli/chunks/{chunk-R47LNH5W.js → chunk-DLSFT6PO.js} +2 -2
  86. package/dist/cli/chunks/{chunk-6HTO4BLV.js → chunk-DQNUPEY5.js} +2 -2
  87. package/dist/cli/chunks/{chunk-XZ5Z56OP.js → chunk-EECF4CMA.js} +1 -1
  88. package/dist/cli/chunks/{chunk-DFJGXXCL.js → chunk-EF5UHDCG.js} +1 -1
  89. package/dist/cli/chunks/{chunk-PJAXWCFC.js → chunk-EJ4KZFZN.js} +1 -1
  90. package/dist/cli/chunks/{chunk-RA3MI5WK.js → chunk-ELI4GDQO.js} +2 -2
  91. package/dist/cli/chunks/{chunk-BND6M2JX.js → chunk-F3KS3TAB.js} +2 -2
  92. package/dist/cli/chunks/{chunk-RB2SL5GD.js → chunk-F7A2UBZO.js} +2 -2
  93. package/dist/cli/chunks/{chunk-X5S5UEM6.js → chunk-FOJRPEIP.js} +2 -2
  94. package/dist/cli/chunks/{chunk-ZP6ANUP7.js → chunk-FQ5N666N.js} +1 -1
  95. package/dist/cli/chunks/{chunk-LZSLJJII.js → chunk-FU7LNUD7.js} +2 -2
  96. package/dist/cli/chunks/{chunk-FDK2GF4G.js → chunk-GFB6BZWU.js} +2 -2
  97. package/dist/cli/chunks/{chunk-C5EN5WB6.js → chunk-GI5HWS4H.js} +1 -1
  98. package/dist/cli/chunks/{chunk-SIUUAKCE.js → chunk-GNYOHZVV.js} +1 -1
  99. package/dist/cli/chunks/{chunk-OOK6GPJR.js → chunk-GVRFSXY6.js} +2 -2
  100. package/dist/cli/chunks/{chunk-6QPW4OVH.js → chunk-GWM4M5NF.js} +1 -1
  101. package/dist/cli/chunks/{chunk-PMXWDTDK.js → chunk-HAN4MS5T.js} +2 -2
  102. package/dist/cli/chunks/{chunk-WW6WUMS7.js → chunk-HEGGV2PT.js} +2 -2
  103. package/dist/cli/chunks/{chunk-4GLR2S2M.js → chunk-HOEWMEF2.js} +2 -2
  104. package/dist/cli/chunks/{chunk-BY3IL56R.js → chunk-HZFK2Z2Z.js} +1 -1
  105. package/dist/cli/chunks/chunk-I7WAW7TM.js +2 -0
  106. package/dist/cli/chunks/{chunk-LXYTC62V.js → chunk-IEPWO4XP.js} +2 -2
  107. package/dist/cli/chunks/{chunk-3MSBVOYW.js → chunk-ITIJ23K2.js} +2 -2
  108. package/dist/cli/chunks/{chunk-PEA4DVXW.js → chunk-IVJIHZSM.js} +1 -1
  109. package/dist/cli/chunks/{chunk-P7GM3EE7.js → chunk-JAPBSSFY.js} +1 -1
  110. package/dist/cli/chunks/{chunk-SOSJFEFB.js → chunk-JCE76MPP.js} +2 -2
  111. package/dist/cli/chunks/{chunk-YZ2AGC7O.js → chunk-JPJEAK4G.js} +1 -1
  112. package/dist/cli/chunks/{chunk-RG67RZIX.js → chunk-JYKQVYX2.js} +2 -2
  113. package/dist/cli/chunks/{chunk-W6TJXK5Y.js → chunk-K55EAWZ5.js} +2 -2
  114. package/dist/cli/chunks/chunk-KCB6P463.js +3 -0
  115. package/dist/cli/chunks/{chunk-W3PPYNHF.js → chunk-KIDOBLUO.js} +2 -2
  116. package/dist/cli/chunks/{chunk-JL3TI43V.js → chunk-KYVIOC3C.js} +2 -2
  117. package/dist/cli/chunks/{chunk-WEDVLKRB.js → chunk-L2TDHJR3.js} +2 -2
  118. package/dist/cli/chunks/{chunk-5GWTJJEO.js → chunk-L4D3TPFP.js} +1 -1
  119. package/dist/cli/chunks/{chunk-PB2WSCBW.js → chunk-LAY7NCQK.js} +3 -3
  120. package/dist/cli/chunks/{chunk-T3BMCEQR.js → chunk-LCCTJ2PC.js} +2 -2
  121. package/dist/cli/chunks/{chunk-7INP6HZH.js → chunk-LJCEDTUM.js} +3 -3
  122. package/dist/cli/chunks/{chunk-DEJM2P5K.js → chunk-LMAEMVPA.js} +1 -1
  123. package/dist/cli/chunks/{chunk-HCDTLV5J.js → chunk-LZWJ5BMP.js} +2 -2
  124. package/dist/cli/chunks/{chunk-D7RVZ5C2.js → chunk-MP3FSUNB.js} +2 -2
  125. package/dist/cli/chunks/{chunk-ADF6LGHZ.js → chunk-MQCTLTGE.js} +2 -2
  126. package/dist/cli/chunks/{chunk-OHH6BUZK.js → chunk-MQTA6KIO.js} +1 -1
  127. package/dist/cli/chunks/{chunk-ISASRHZP.js → chunk-NBUXM5X6.js} +10 -6
  128. package/dist/cli/chunks/{chunk-KOLHZSEC.js → chunk-NHRF3V4B.js} +2 -2
  129. package/dist/cli/chunks/chunk-NMY4KTWA.js +16 -0
  130. package/dist/cli/chunks/chunk-NYS2GUNO.js +2 -0
  131. package/dist/cli/chunks/{chunk-EGHK6NMH.js → chunk-ONPPBLRB.js} +2 -2
  132. package/dist/cli/chunks/{chunk-YQ6BK7QC.js → chunk-OPDZBRIL.js} +2 -2
  133. package/dist/cli/chunks/{chunk-DPL4ZXTE.js → chunk-OQ4S6B7P.js} +1 -1
  134. package/dist/cli/chunks/{chunk-6HO3XRXE.js → chunk-ORBODZSO.js} +2 -2
  135. package/dist/cli/chunks/{chunk-GLKLEHK3.js → chunk-ORFL3YXB.js} +2 -2
  136. package/dist/cli/chunks/{chunk-I43QRLLB.js → chunk-P7DXVL2S.js} +2 -2
  137. package/dist/cli/chunks/chunk-PEMSXSP2.js +4 -0
  138. package/dist/cli/chunks/chunk-PS6WFCA4.js +6 -0
  139. package/dist/cli/chunks/{chunk-HEKCN5XQ.js → chunk-Q2RBOC7V.js} +2 -2
  140. package/dist/cli/chunks/{chunk-54XTJBHV.js → chunk-QLKUCMZC.js} +1 -1
  141. package/dist/cli/chunks/{chunk-3BDDOFYW.js → chunk-QLYO3H7E.js} +9 -9
  142. package/dist/cli/chunks/{chunk-VMSO6DMF.js → chunk-QS5KZYUZ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-JFQDWAU3.js → chunk-R363XXGH.js} +2 -2
  144. package/dist/cli/chunks/chunk-RD5BYLN7.js +2 -0
  145. package/dist/cli/chunks/{chunk-73PCVMGA.js → chunk-RFDFET3O.js} +2 -2
  146. package/dist/cli/chunks/{chunk-LJRZAALA.js → chunk-RHIQ6QO5.js} +357 -351
  147. package/dist/cli/chunks/chunk-RLB7K7QP.js +2 -0
  148. package/dist/cli/chunks/{chunk-RJ5CZ7B6.js → chunk-RUTO67PT.js} +2 -2
  149. package/dist/cli/chunks/{chunk-DF4Y3HPO.js → chunk-RV6HSMKJ.js} +1 -1
  150. package/dist/cli/chunks/{chunk-54ITMOFM.js → chunk-SOSJWM3E.js} +4 -4
  151. package/dist/cli/chunks/{chunk-5SS2Z7JC.js → chunk-SV5BUYHH.js} +2 -2
  152. package/dist/cli/chunks/{chunk-XHCCH7UC.js → chunk-TL5GV3PR.js} +8 -8
  153. package/dist/cli/chunks/{chunk-ZKXZTIVF.js → chunk-TLUIO37P.js} +2 -2
  154. package/dist/cli/chunks/{chunk-2LL35V3A.js → chunk-TUDENMAE.js} +2 -2
  155. package/dist/cli/chunks/chunk-TVLOED6O.js +2 -0
  156. package/dist/cli/chunks/{chunk-2DRMTRBM.js → chunk-UB6DQGWM.js} +2 -2
  157. package/dist/cli/chunks/chunk-UHHMAKPE.js +3 -0
  158. package/dist/cli/chunks/{chunk-DBIK4OFX.js → chunk-ULCHPPW2.js} +1 -1
  159. package/dist/cli/chunks/chunk-V3OLS2NG.js +2 -0
  160. package/dist/cli/chunks/{chunk-I6E4X3L3.js → chunk-VAYZ5QIE.js} +1 -1
  161. package/dist/cli/chunks/{chunk-G3ZUB3HD.js → chunk-VCONCVSY.js} +3 -3
  162. package/dist/cli/chunks/{chunk-7X2IVMXN.js → chunk-VVF337SV.js} +2 -2
  163. package/dist/cli/chunks/{chunk-EY5IUF7U.js → chunk-WKDWRRDT.js} +2 -2
  164. package/dist/cli/chunks/{chunk-FRBCX46J.js → chunk-X2DR27AY.js} +2 -2
  165. package/dist/cli/chunks/{chunk-I53365HG.js → chunk-X33F7NXH.js} +3 -3
  166. package/dist/cli/chunks/{chunk-MVTUFPM2.js → chunk-XBEI2JBA.js} +2 -2
  167. package/dist/cli/chunks/{chunk-OG4KHX7S.js → chunk-XBFQJZWX.js} +2 -2
  168. package/dist/cli/chunks/{chunk-DVE5SM5G.js → chunk-XFPQIWEH.js} +3 -3
  169. package/dist/cli/chunks/{chunk-RWZ4F44Y.js → chunk-XPB5BVU6.js} +2 -2
  170. package/dist/cli/chunks/{chunk-TVQPYP2Z.js → chunk-XQ53PZEF.js} +3 -3
  171. package/dist/cli/chunks/{chunk-73MTUM6F.js → chunk-XZ46CI35.js} +2 -2
  172. package/dist/cli/chunks/chunk-YLNYPQDR.js +2 -0
  173. package/dist/cli/chunks/{chunk-BY5PLEPZ.js → chunk-YNG7E26C.js} +2 -2
  174. package/dist/cli/chunks/{chunk-YUWUFYHK.js → chunk-YXU35GGD.js} +1 -1
  175. package/dist/cli/chunks/{chunk-B7GJXQD2.js → chunk-ZCP4P6O2.js} +2 -2
  176. package/dist/cli/chunks/{chunk-LGA6J4I4.js → chunk-ZL5LJT7D.js} +2 -2
  177. package/dist/cli/chunks/{chunk-TB22Y3WW.js → chunk-ZOUEQ6DL.js} +1 -1
  178. package/dist/cli/chunks/{chunk-U2E5F3VZ.js → chunk-ZSBD4FUX.js} +2 -2
  179. package/dist/cli/chunks/chunk-ZTB32K5N.js +5 -0
  180. package/dist/cli/chunks/{chunk-WYO5VN2L.js → chunk-ZUTFHGEO.js} +1 -1
  181. package/dist/cli/chunks/ci-GEJCXMBK.js +81 -0
  182. package/dist/cli/chunks/ci-config-2ZVV4OXL.js +2 -0
  183. package/dist/cli/chunks/{ci-output-BMJABAEX.js → ci-output-E45OGVPR.js} +2 -2
  184. package/dist/cli/chunks/{circuit-breaker-GYD5CMJQ.js → circuit-breaker-X73ITYZC.js} +2 -2
  185. package/dist/cli/chunks/{claude-flow-setup-MMOYVBVD.js → claude-flow-setup-W4PPH46C.js} +2 -2
  186. package/dist/cli/chunks/client-6XKSQ4JT.js +2 -0
  187. package/dist/cli/chunks/{cline-installer-B2SOZ44R.js → cline-installer-NUEPMWDE.js} +2 -2
  188. package/dist/cli/chunks/{code-V3FIRAXD.js → code-6WQHBS7G.js} +4 -4
  189. package/dist/cli/chunks/{code-index-extractor-CV6A756Z.js → code-index-extractor-BXQIFIFT.js} +2 -2
  190. package/dist/cli/chunks/{codex-installer-EUC6J47Y.js → codex-installer-Z337R2KH.js} +2 -2
  191. package/dist/cli/chunks/{completions-DQQIBAHR.js → completions-F5DMYFHV.js} +2 -2
  192. package/dist/cli/chunks/{complexity-analyzer-HPXMXP5I.js → complexity-analyzer-W2SYPZDI.js} +2 -2
  193. package/dist/cli/chunks/{continuedev-installer-RCIYXH6V.js → continuedev-installer-ZCHUIFTN.js} +2 -2
  194. package/dist/cli/chunks/{copilot-installer-VUH32SHF.js → copilot-installer-M5JNODXF.js} +2 -2
  195. package/dist/cli/chunks/core-handlers-OJYW4Y6M.js +2 -0
  196. package/dist/cli/chunks/{cost-tracker-YLCKLOAL.js → cost-tracker-LSYTHBHV.js} +2 -2
  197. package/dist/cli/chunks/coverage-PGMRS5SS.js +49 -0
  198. package/dist/cli/chunks/cross-domain-router-QVUPQ2SC.js +2 -0
  199. package/dist/cli/chunks/{cursor-installer-B42FN62K.js → cursor-installer-XPUA73UW.js} +2 -2
  200. package/dist/cli/chunks/{daemon-DECQRQII.js → daemon-ITKDIYMW.js} +5 -5
  201. package/dist/cli/chunks/daemon-QBYTCIMH.js +10 -0
  202. package/dist/cli/chunks/{dag-attention-scheduler-RY7CDYSC.js → dag-attention-scheduler-T55AXLD6.js} +2 -2
  203. package/dist/cli/chunks/{detect-NW53BMJN.js → detect-DR7J6K4O.js} +2 -2
  204. package/dist/cli/chunks/{dist-node-LE6KHXAB.js → dist-node-LAJJBOUT.js} +2 -2
  205. package/dist/cli/chunks/{domain-handler-JGXFT4LW.js → domain-handler-OMSHCRMK.js} +2 -2
  206. package/dist/cli/chunks/{domain-plugins-GY3RYKKK.js → domain-plugins-EQXSKC5K.js} +2 -2
  207. package/dist/cli/chunks/{domain-transfer-CGBRXNTC.js → domain-transfer-FKRAGVSW.js} +2 -2
  208. package/dist/cli/chunks/dream-3UABDRZJ.js +2 -0
  209. package/dist/cli/chunks/embed-and-insert-pattern-JZFPCNL3.js +3 -0
  210. package/dist/cli/chunks/{eval-YPYIZQUR.js → eval-JSNNASBW.js} +2 -2
  211. package/dist/cli/chunks/experience-capture-middleware-UPD3IZBK.js +40 -0
  212. package/dist/cli/chunks/{fast-paths-HYQTAF2S.js → fast-paths-YNMIBS2E.js} +2 -2
  213. package/dist/cli/chunks/{feature-flags-HNSAFFX2.js → feature-flags-SRLXDKBI.js} +2 -2
  214. package/dist/cli/chunks/{feature-flags-YACUH6OW.js → feature-flags-VIR7O4L7.js} +2 -2
  215. package/dist/cli/chunks/file-discovery-ZFGZTKZ4.js +2 -0
  216. package/dist/cli/chunks/{fleet-6M3BP4OO.js → fleet-K2ED46EL.js} +3 -3
  217. package/dist/cli/chunks/{gnn-wrapper-QLD7KHXV.js → gnn-wrapper-QCU4ZRYW.js} +2 -2
  218. package/dist/cli/chunks/{heartbeat-handler-EZP333X4.js → heartbeat-handler-YYQI4WZM.js} +4 -4
  219. package/dist/cli/chunks/heartbeat-scheduler-MJ6MTPDF.js +2 -0
  220. package/dist/cli/chunks/hnsw-adapter-FQWJCFVW.js +2 -0
  221. package/dist/cli/chunks/hnsw-index-NJYKJUHC.js +2 -0
  222. package/dist/cli/chunks/{hnsw-legacy-bridge-47CUCSAU.js → hnsw-legacy-bridge-C5TJSWTZ.js} +2 -2
  223. package/dist/cli/chunks/{hnswlib-node-SVNYDJZH.js → hnswlib-node-SE3MJJYS.js} +2 -2
  224. package/dist/cli/chunks/{hooks-6V5LMWP6.js → hooks-C572SRDH.js} +43 -43
  225. package/dist/cli/chunks/hybrid-backend-SL7RFID7.js +2 -0
  226. package/dist/cli/chunks/{hypergraph-engine-L2FOBIFF.js → hypergraph-engine-35A6G3M5.js} +2 -2
  227. package/dist/cli/chunks/{hypergraph-handler-DU6Z57EE.js → hypergraph-handler-U2756CWI.js} +3 -3
  228. package/dist/cli/chunks/impact-analyzer-5ZJTXPVC.js +2 -0
  229. package/dist/cli/chunks/init-handler-PCLYQUSB.js +88 -0
  230. package/dist/cli/chunks/init-wizard-MQMDSIOF.js +2 -0
  231. package/dist/cli/chunks/kernel-MEJ5GMRH.js +2 -0
  232. package/dist/cli/chunks/{kilocode-installer-NHKYGJ7Q.js → kilocode-installer-32PX5YH7.js} +2 -2
  233. package/dist/cli/chunks/{kiro-installer-24UK6GGR.js → kiro-installer-C4ROMMUS.js} +2 -2
  234. package/dist/cli/chunks/knowledge-graph-XUBZSEZE.js +2 -0
  235. package/dist/cli/chunks/learning-GEPVZGJQ.js +122 -0
  236. package/dist/cli/chunks/{llm-router-XRMI2VMG.js → llm-router-XRKTTJTX.js} +4 -4
  237. package/dist/cli/chunks/llm-router-service-QZAPAEPX.js +2 -0
  238. package/dist/cli/chunks/{load-W5UWL5C7.js → load-XVH6HW7E.js} +2 -2
  239. package/dist/cli/chunks/load-test-OVXIQ3AF.js +2 -0
  240. package/dist/cli/chunks/{mcp-N7ALQ4BL.js → mcp-IULSTM4Z.js} +2 -2
  241. package/dist/cli/chunks/{memory-WV52DLSA.js → memory-6K7IAU4T.js} +5 -5
  242. package/dist/cli/chunks/memory-backend-TRPOMPK4.js +2 -0
  243. package/dist/cli/chunks/memory-handlers-CG6DRLAW.js +2 -0
  244. package/dist/cli/chunks/{multi-model-executor-3FVTZCSO.js → multi-model-executor-VZDUYPLX.js} +2 -2
  245. package/dist/cli/chunks/{opencode-installer-NTPWGHUW.js → opencode-installer-QUTXKNH4.js} +2 -2
  246. package/dist/cli/chunks/orchestrator-PCKKUWOP.js +452 -0
  247. package/dist/cli/chunks/pattern-null-store-JWYBRBZG.js +2 -0
  248. package/dist/cli/chunks/{pattern-usage-recorder-WWXHUH5U.js → pattern-usage-recorder-PX5HQVRL.js} +2 -2
  249. package/dist/cli/chunks/{pipeline-ZOKZFXTH.js → pipeline-O562GTOG.js} +2 -2
  250. package/dist/cli/chunks/{platform-CDNL322F.js → platform-PM7Q2AZS.js} +2 -2
  251. package/dist/cli/chunks/plugin-OTYTFGPY.js +27 -0
  252. package/dist/cli/chunks/{prime-radiant-advanced-wasm-FVJDU2JY.js → prime-radiant-advanced-wasm-6CFXTHC2.js} +2 -2
  253. package/dist/cli/chunks/project-root-VVSTHIP4.js +2 -0
  254. package/dist/cli/chunks/protocol-executor-PXZCLZD3.js +2 -0
  255. package/dist/cli/chunks/{protocol-handler-4YBN5R23.js → protocol-handler-PPGNSAOS.js} +2 -2
  256. package/dist/cli/chunks/{prove-BHDHY664.js → prove-WQ3BKRZG.js} +2 -2
  257. package/dist/cli/chunks/qe-reasoning-bank-42FRS5V3.js +2 -0
  258. package/dist/cli/chunks/quality-C5WUU3AA.js +8 -0
  259. package/dist/cli/chunks/{quality-gate-WANE7TCN.js → quality-gate-WSSRKD5U.js} +3 -3
  260. package/dist/cli/chunks/queen-coordinator-UI3B7DI6.js +2 -0
  261. package/dist/cli/chunks/real-embeddings-CFQE7IRQ.js +2 -0
  262. package/dist/cli/chunks/{ref-validation-S7UWXQIP.js → ref-validation-DHKHXVZT.js} +2 -2
  263. package/dist/cli/chunks/{roocode-installer-TEYOQYL6.js → roocode-installer-3PPODABV.js} +2 -2
  264. package/dist/cli/chunks/router-HYRPWLAY.js +2 -0
  265. package/dist/cli/chunks/routing-feedback-BPZ5R6F3.js +2 -0
  266. package/dist/cli/chunks/{routing-handler-KDTLMRWD.js → routing-handler-JNXTGT6T.js} +2 -2
  267. package/dist/cli/chunks/{ruvector-commands-AOUDXCYE.js → ruvector-commands-6YLROPVP.js} +2 -2
  268. package/dist/cli/chunks/rvf-dual-writer-DEKDQ6KO.js +2 -0
  269. package/dist/cli/chunks/rvf-migration-adapter-L53VBS7I.js +2 -0
  270. package/dist/cli/chunks/rvf-migration-coordinator-4DWB4WRK.js +2 -0
  271. package/dist/cli/chunks/rvf-native-adapter-I6RUGD2D.js +2 -0
  272. package/dist/cli/chunks/{rvf-store-integrity-QI47Y354.js → rvf-store-integrity-YKR2ZNBF.js} +2 -2
  273. package/dist/cli/chunks/safe-db-KS65XDCP.js +2 -0
  274. package/dist/cli/chunks/schedule-KD2VN6GB.js +2 -0
  275. package/dist/cli/chunks/scheduler-ZH3RMUHY.js +2 -0
  276. package/dist/cli/chunks/{security-SN6MWOJT.js → security-PWQTGDRU.js} +3 -3
  277. package/dist/cli/chunks/shared-rvf-adapter-LNRLFP5I.js +2 -0
  278. package/dist/cli/chunks/{shared-rvf-dual-writer-WU7PFKQM.js → shared-rvf-dual-writer-GWU6YQNS.js} +2 -2
  279. package/dist/cli/chunks/sqlite-persistence-6DTVME5D.js +2 -0
  280. package/dist/cli/chunks/{standalone-memory-F6FSRFWC.js → standalone-memory-46KKBSSV.js} +2 -2
  281. package/dist/cli/chunks/{status-handler-DHD5MS4G.js → status-handler-35T5FTDQ.js} +2 -2
  282. package/dist/cli/chunks/{structural-health-P6HPSQMR.js → structural-health-P7QPQWLO.js} +2 -2
  283. package/dist/cli/chunks/{sync-LISJGDSE.js → sync-W6Z4R4PL.js} +2 -2
  284. package/dist/cli/chunks/sync-Y43EWBSY.js +2 -0
  285. package/dist/cli/chunks/{task-handler-ZT44NT5Z.js → task-handler-5CX3ZYT7.js} +2 -2
  286. package/dist/cli/chunks/{task-handlers-R6DQ5324.js → task-handlers-DQZGOJNE.js} +3 -3
  287. package/dist/cli/chunks/{test-MUFHR4JQ.js → test-TPP53VVV.js} +12 -12
  288. package/dist/cli/chunks/{test-scheduling-TAUSLZJP.js → test-scheduling-WBV4UMQH.js} +3 -3
  289. package/dist/cli/chunks/token-bootstrap-GIIDXHLC.js +2 -0
  290. package/dist/cli/chunks/{token-usage-IX65ECBR.js → token-usage-AKK37RB7.js} +2 -2
  291. package/dist/cli/chunks/{transformers-QKPSVW2W.js → transformers-7MASPELS.js} +2 -2
  292. package/dist/cli/chunks/{tree-sitter-wasm-parser-Z7PPA2JO.js → tree-sitter-wasm-parser-YZKD6UGB.js} +2 -2
  293. package/dist/cli/chunks/{types-ULNNGGGH.js → types-AZ3BTXDP.js} +2 -2
  294. package/dist/cli/chunks/unified-memory-FCX7NLFZ.js +2 -0
  295. package/dist/cli/chunks/unified-memory-hnsw-VU5QJK37.js +2 -0
  296. package/dist/cli/chunks/unified-persistence-FM376LGE.js +2 -0
  297. package/dist/cli/chunks/{upgrade-ECI3YUYA.js → upgrade-L7OTDKEK.js} +2 -2
  298. package/dist/cli/chunks/{validate-3JKRUW2S.js → validate-O3QVFIGP.js} +2 -2
  299. package/dist/cli/chunks/{validate-swarm-LZWANCIE.js → validate-swarm-2UGBGLTX.js} +2 -2
  300. package/dist/cli/chunks/visual-security-EU7Y3X46.js +2 -0
  301. package/dist/cli/chunks/{web-tree-sitter-N5V4A6XG.js → web-tree-sitter-J75IYPRO.js} +2 -2
  302. package/dist/cli/chunks/{windsurf-installer-5TBM5B3C.js → windsurf-installer-FQ5DBFCG.js} +2 -2
  303. package/dist/cli/chunks/witness-chain-CSEBT52D.js +2 -0
  304. package/dist/cli/chunks/{witness-chain-MFP3HBWQ.js → witness-chain-I7TN4MXZ.js} +2 -2
  305. package/dist/cli/chunks/witness-chain-repair-D3NE3NQK.js +2 -0
  306. package/dist/cli/chunks/{witness-chain-verifier-SRAT7LVY.js → witness-chain-verifier-RU2WOP5M.js} +2 -2
  307. package/dist/cli/chunks/witness-key-manager-IHQB2FR5.js +2 -0
  308. package/dist/cli/chunks/{workflow-M7TUYYXY.js → workflow-6BWTNVV6.js} +28 -28
  309. package/dist/cli/chunks/workflow-orchestrator-ALNKOM3N.js +2 -0
  310. package/dist/cli/chunks/wrappers-URVP25VU.js +2 -0
  311. package/dist/cli/commands/ci.js +53 -23
  312. package/dist/cli/commands/code.js +1 -0
  313. package/dist/cli/commands/coverage.d.ts +1 -0
  314. package/dist/cli/commands/coverage.js +182 -138
  315. package/dist/cli/commands/daemon.js +7 -1
  316. package/dist/cli/commands/hooks-handlers/stats-hooks.d.ts +15 -0
  317. package/dist/cli/commands/hooks-handlers/stats-hooks.js +54 -2
  318. package/dist/cli/commands/learning.js +47 -7
  319. package/dist/cli/commands/quality.d.ts +12 -1
  320. package/dist/cli/commands/quality.js +51 -3
  321. package/dist/cli/commands/test.js +6 -7
  322. package/dist/cli/commands/workflow.js +9 -5
  323. package/dist/cli/handlers/init-guard.d.ts +13 -0
  324. package/dist/cli/handlers/init-guard.js +23 -0
  325. package/dist/cli/handlers/init-handler.d.ts +3 -0
  326. package/dist/cli/handlers/init-handler.js +9 -0
  327. package/dist/cli/handlers/interfaces.js +5 -1
  328. package/dist/cli/scheduler/persistent-scheduler.d.ts +6 -2
  329. package/dist/cli/scheduler/persistent-scheduler.js +107 -41
  330. package/dist/cli/utils/ci-output.d.ts +22 -5
  331. package/dist/cli/utils/ci-output.js +33 -5
  332. package/dist/cli/utils/coverage-data.d.ts +10 -0
  333. package/dist/cli/utils/coverage-data.js +34 -65
  334. package/dist/cli/utils/coverage-verdict.d.ts +130 -0
  335. package/dist/cli/utils/coverage-verdict.js +193 -0
  336. package/dist/cli/utils/file-discovery.js +5 -0
  337. package/dist/contracts/verdicts.d.ts +14 -0
  338. package/dist/contracts/verdicts.js +44 -3
  339. package/dist/coordination/deterministic-actions.js +24 -13
  340. package/dist/coordination/handlers/code-intelligence-handlers.d.ts +8 -0
  341. package/dist/coordination/handlers/code-intelligence-handlers.js +39 -0
  342. package/dist/coordination/handlers/coverage-handlers.js +150 -121
  343. package/dist/coordination/handlers/coverage-runner.d.ts +143 -0
  344. package/dist/coordination/handlers/coverage-runner.js +462 -0
  345. package/dist/coordination/handlers/coverage-target.d.ts +145 -0
  346. package/dist/coordination/handlers/coverage-target.js +314 -0
  347. package/dist/coordination/handlers/handler-types.d.ts +9 -0
  348. package/dist/coordination/handlers/handler-utils.d.ts +23 -1
  349. package/dist/coordination/handlers/handler-utils.js +90 -23
  350. package/dist/coordination/handlers/quality-handlers.js +209 -33
  351. package/dist/coordination/handlers/test-execution-handlers.js +4 -1
  352. package/dist/coordination/protocols/defect-investigation.d.ts +2 -1
  353. package/dist/coordination/protocols/defect-investigation.js +6 -3
  354. package/dist/coordination/protocols/quality-gate.js +10 -6
  355. package/dist/coordination/result-saver.d.ts +22 -0
  356. package/dist/coordination/result-saver.js +130 -46
  357. package/dist/coordination/task-executor.d.ts +12 -0
  358. package/dist/coordination/task-executor.js +37 -1
  359. package/dist/domains/code-intelligence/coordinator.d.ts +2 -1
  360. package/dist/domains/code-intelligence/coordinator.js +10 -32
  361. package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
  362. package/dist/domains/code-intelligence/plugin.js +5 -0
  363. package/dist/domains/code-intelligence/project-root-resolver.d.ts +50 -0
  364. package/dist/domains/code-intelligence/project-root-resolver.js +121 -0
  365. package/dist/domains/code-intelligence/services/metric-collector/index.js +9 -2
  366. package/dist/domains/code-intelligence/services/metric-collector/interfaces.d.ts +21 -0
  367. package/dist/domains/code-intelligence/services/metric-collector/interfaces.js +25 -0
  368. package/dist/domains/code-intelligence/services/metric-collector/loc-counter.d.ts +12 -0
  369. package/dist/domains/code-intelligence/services/metric-collector/loc-counter.js +69 -3
  370. package/dist/domains/code-intelligence/services/metric-collector/test-counter.js +4 -1
  371. package/dist/domains/coverage-analysis/collected-metrics.d.ts +33 -0
  372. package/dist/domains/coverage-analysis/collected-metrics.js +36 -0
  373. package/dist/domains/coverage-analysis/coordinator.js +22 -7
  374. package/dist/domains/coverage-analysis/interfaces.d.ts +59 -0
  375. package/dist/domains/coverage-analysis/interfaces.js +6 -1
  376. package/dist/domains/coverage-analysis/plugin.js +7 -1
  377. package/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts +7 -0
  378. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +85 -38
  379. package/dist/domains/coverage-analysis/services/gap-detector.js +7 -2
  380. package/dist/domains/defect-intelligence/plugin.js +4 -0
  381. package/dist/domains/defect-intelligence/services/defect-predictor.js +6 -4
  382. package/dist/domains/learning-optimization/coordinator.js +4 -0
  383. package/dist/domains/learning-optimization/plugin.js +4 -0
  384. package/dist/domains/quality-assessment/coordinator-claim-verifier.js +2 -1
  385. package/dist/domains/quality-assessment/coordinator-rl-integration.d.ts +14 -0
  386. package/dist/domains/quality-assessment/coordinator-rl-integration.js +54 -16
  387. package/dist/domains/quality-assessment/coordinator.js +18 -14
  388. package/dist/domains/quality-assessment/coverage-report-event.d.ts +49 -0
  389. package/dist/domains/quality-assessment/coverage-report-event.js +58 -0
  390. package/dist/domains/quality-assessment/evidence-sufficiency.d.ts +57 -0
  391. package/dist/domains/quality-assessment/evidence-sufficiency.js +97 -0
  392. package/dist/domains/quality-assessment/index.d.ts +2 -2
  393. package/dist/domains/quality-assessment/index.js +1 -1
  394. package/dist/domains/quality-assessment/interfaces.d.ts +46 -0
  395. package/dist/domains/quality-assessment/plugin.js +8 -8
  396. package/dist/domains/quality-assessment/quality-evidence.d.ts +98 -4
  397. package/dist/domains/quality-assessment/quality-evidence.js +152 -8
  398. package/dist/domains/quality-assessment/services/quality-analyzer.d.ts +23 -2
  399. package/dist/domains/quality-assessment/services/quality-analyzer.js +203 -116
  400. package/dist/domains/security-compliance/services/scanners/dast-scanner.js +22 -16
  401. package/dist/domains/test-execution/interfaces.d.ts +10 -6
  402. package/dist/domains/test-execution/plugin.js +4 -0
  403. package/dist/domains/test-execution/services/test-executor.js +152 -102
  404. package/dist/domains/test-generation/coordinator.js +4 -0
  405. package/dist/domains/test-generation/plugin.js +4 -0
  406. package/dist/feedback/coverage-learner.js +4 -1
  407. package/dist/feedback/coverage-session-provenance.d.ts +29 -0
  408. package/dist/feedback/coverage-session-provenance.js +39 -0
  409. package/dist/init/orchestrator.js +2 -0
  410. package/dist/init/phases/09-assets.d.ts +4 -0
  411. package/dist/init/phases/09-assets.js +35 -0
  412. package/dist/init/retired-assets.d.ts +86 -0
  413. package/dist/init/retired-assets.js +230 -0
  414. package/dist/init/skills-installer.d.ts +2 -0
  415. package/dist/init/skills-installer.js +4 -0
  416. package/dist/init/types.d.ts +3 -0
  417. package/dist/integrations/ruvector/rvf-native-adapter.d.ts +2 -0
  418. package/dist/integrations/ruvector/rvf-native-adapter.js +5 -0
  419. package/dist/integrations/ruvector/server-client.js +4 -12
  420. package/dist/kernel/project-root.d.ts +17 -0
  421. package/dist/kernel/project-root.js +54 -2
  422. package/dist/kernel/shared-dirs.d.ts +66 -0
  423. package/dist/kernel/shared-dirs.js +168 -0
  424. package/dist/learning/daily-log.js +2 -1
  425. package/dist/learning/experience-capture-middleware.d.ts +22 -0
  426. package/dist/learning/experience-capture-middleware.js +35 -0
  427. package/dist/learning/learnable-result.d.ts +16 -0
  428. package/dist/learning/learnable-result.js +24 -0
  429. package/dist/learning/pattern-mutation-error.d.ts +8 -0
  430. package/dist/learning/pattern-mutation-error.js +12 -0
  431. package/dist/learning/qe-reasoning-bank.d.ts +10 -0
  432. package/dist/learning/qe-reasoning-bank.js +50 -1
  433. package/dist/learning/rvf-reconcile.d.ts +39 -0
  434. package/dist/learning/rvf-reconcile.js +40 -0
  435. package/dist/learning/sqlite-persistence.d.ts +14 -0
  436. package/dist/learning/sqlite-persistence.js +36 -0
  437. package/dist/mcp/bundle.js +524 -507
  438. package/dist/mcp/handlers/domain-handler-configs.d.ts +49 -2
  439. package/dist/mcp/handlers/domain-handler-configs.js +79 -7
  440. package/dist/mcp/handlers/handler-factory.js +43 -14
  441. package/dist/mcp/handlers/wrapped-domain-handlers.js +7 -1
  442. package/dist/mcp/protocol-server.js +30 -4
  443. package/dist/mcp/tool-cache-scope.d.ts +31 -0
  444. package/dist/mcp/tool-cache-scope.js +71 -0
  445. package/dist/mcp/tools/code-intelligence/analyze.js +5 -3
  446. package/dist/mcp/tools/coverage-analysis/index.js +1 -0
  447. package/dist/mcp/types.d.ts +10 -0
  448. package/dist/optimization/session-cache.d.ts +19 -1
  449. package/dist/optimization/session-cache.js +36 -2
  450. package/dist/plugins/cache.js +2 -1
  451. package/dist/plugins/sources/github.js +2 -1
  452. package/dist/plugins/sources/npm.js +2 -1
  453. package/dist/shared/aqe-managed-dirs.d.ts +24 -0
  454. package/dist/shared/aqe-managed-dirs.js +56 -0
  455. package/dist/shared/events/domain-events.d.ts +20 -3
  456. package/dist/shared/events/domain-events.js +4 -0
  457. package/dist/shared/http/http-client.d.ts +6 -0
  458. package/dist/shared/http/http-client.js +13 -15
  459. package/dist/shared/io/file-reader.d.ts +26 -0
  460. package/dist/shared/io/file-reader.js +111 -17
  461. package/dist/shared/llm/providers/response-deadline.d.ts +7 -2
  462. package/dist/shared/llm/providers/response-deadline.js +17 -5
  463. package/dist/shared/metrics/code-metrics.d.ts +24 -0
  464. package/dist/shared/metrics/code-metrics.js +93 -6
  465. package/dist/shared/metrics/index.d.ts +1 -1
  466. package/dist/workers/interfaces.d.ts +9 -1
  467. package/dist/workers/quality-daemon/coverage-delta.d.ts +4 -3
  468. package/dist/workers/quality-daemon/coverage-delta.js +13 -6
  469. package/dist/workers/quality-daemon/index.js +6 -5
  470. package/dist/workers/quality-daemon/notification-service.js +3 -3
  471. package/dist/workers/quality-daemon/persistent-memory.d.ts +2 -2
  472. package/dist/workers/quality-daemon/persistent-memory.js +2 -2
  473. package/dist/workers/worker-manager.js +5 -1
  474. package/dist/workers/workers/coverage-tracker.js +69 -33
  475. package/dist/workers/workers/regression-monitor.d.ts +18 -1
  476. package/dist/workers/workers/regression-monitor.js +276 -117
  477. package/package.json +1 -1
  478. package/dist/cli/chunks/adapter-T54G3TBK.js +0 -2
  479. package/dist/cli/chunks/aqe-learning-engine-HLCJJ3JM.js +0 -2
  480. package/dist/cli/chunks/base-VLD755UU.js +0 -2
  481. package/dist/cli/chunks/browser-workflow-6M6VLWRF.js +0 -2
  482. package/dist/cli/chunks/chunk-5XXLWJU7.js +0 -2
  483. package/dist/cli/chunks/chunk-AHVN3UQZ.js +0 -4
  484. package/dist/cli/chunks/chunk-AOKSLWON.js +0 -742
  485. package/dist/cli/chunks/chunk-CQ3WSTJ2.js +0 -16
  486. package/dist/cli/chunks/chunk-LY53L6NH.js +0 -2
  487. package/dist/cli/chunks/chunk-O7TMY4GS.js +0 -2
  488. package/dist/cli/chunks/chunk-QIAX3JJB.js +0 -3
  489. package/dist/cli/chunks/chunk-RJMBHZYL.js +0 -2
  490. package/dist/cli/chunks/chunk-UORI2CZ4.js +0 -2
  491. package/dist/cli/chunks/chunk-V3NZ23X6.js +0 -2
  492. package/dist/cli/chunks/chunk-WI5AEB7Q.js +0 -2
  493. package/dist/cli/chunks/chunk-XKIFNKHV.js +0 -2
  494. package/dist/cli/chunks/chunk-ZAOQIVHG.js +0 -5
  495. package/dist/cli/chunks/chunk-ZF5JTQEE.js +0 -4
  496. package/dist/cli/chunks/ci-NGMGB43T.js +0 -82
  497. package/dist/cli/chunks/client-FUHNNK5O.js +0 -2
  498. package/dist/cli/chunks/core-handlers-F7TLX4LM.js +0 -2
  499. package/dist/cli/chunks/coverage-IVKDV236.js +0 -27
  500. package/dist/cli/chunks/cross-domain-router-EGWPY67O.js +0 -2
  501. package/dist/cli/chunks/daemon-IPTOSCHM.js +0 -10
  502. package/dist/cli/chunks/dream-V4QN6OF5.js +0 -2
  503. package/dist/cli/chunks/embed-and-insert-pattern-65H4XHWR.js +0 -3
  504. package/dist/cli/chunks/experience-capture-middleware-4JXVF5PL.js +0 -40
  505. package/dist/cli/chunks/file-discovery-R73BYEXB.js +0 -2
  506. package/dist/cli/chunks/heartbeat-scheduler-3N3L6CRM.js +0 -2
  507. package/dist/cli/chunks/hnsw-adapter-2BXJYDXI.js +0 -2
  508. package/dist/cli/chunks/hnsw-index-2DLI5OVO.js +0 -2
  509. package/dist/cli/chunks/hybrid-backend-OW4J65YH.js +0 -2
  510. package/dist/cli/chunks/impact-analyzer-ZH5I2RG6.js +0 -2
  511. package/dist/cli/chunks/init-handler-HETPWU67.js +0 -86
  512. package/dist/cli/chunks/init-wizard-NIKM3ZOK.js +0 -2
  513. package/dist/cli/chunks/kernel-2EOSVM6X.js +0 -2
  514. package/dist/cli/chunks/knowledge-graph-D3BPWNNO.js +0 -2
  515. package/dist/cli/chunks/learning-QLVRZNHT.js +0 -122
  516. package/dist/cli/chunks/llm-router-service-TJPPZFUN.js +0 -2
  517. package/dist/cli/chunks/load-test-RFT7IDOL.js +0 -2
  518. package/dist/cli/chunks/memory-backend-O2O4CFKZ.js +0 -2
  519. package/dist/cli/chunks/memory-handlers-DAEGUDBD.js +0 -2
  520. package/dist/cli/chunks/orchestrator-ORGJ6VAA.js +0 -452
  521. package/dist/cli/chunks/pattern-null-store-TUBNXS34.js +0 -2
  522. package/dist/cli/chunks/plugin-ZVLFNZZ4.js +0 -27
  523. package/dist/cli/chunks/project-root-UCHQH3QL.js +0 -2
  524. package/dist/cli/chunks/protocol-executor-6FQTTO3Y.js +0 -2
  525. package/dist/cli/chunks/qe-reasoning-bank-TKPND56C.js +0 -2
  526. package/dist/cli/chunks/quality-46AK277P.js +0 -7
  527. package/dist/cli/chunks/queen-coordinator-DWMXLPJG.js +0 -2
  528. package/dist/cli/chunks/real-embeddings-56MNGJGJ.js +0 -2
  529. package/dist/cli/chunks/router-QIMUYRCC.js +0 -2
  530. package/dist/cli/chunks/routing-feedback-4OH5ZNF4.js +0 -2
  531. package/dist/cli/chunks/rvf-dual-writer-S6JBZL54.js +0 -2
  532. package/dist/cli/chunks/rvf-migration-adapter-TSGMLMYR.js +0 -2
  533. package/dist/cli/chunks/rvf-migration-coordinator-V74MVBHS.js +0 -2
  534. package/dist/cli/chunks/rvf-native-adapter-Z7QOW47S.js +0 -2
  535. package/dist/cli/chunks/safe-db-JLOVBJNC.js +0 -2
  536. package/dist/cli/chunks/schedule-IM6XOBGR.js +0 -2
  537. package/dist/cli/chunks/scheduler-XL2SVVK5.js +0 -2
  538. package/dist/cli/chunks/shared-rvf-adapter-2LB56LP4.js +0 -2
  539. package/dist/cli/chunks/sqlite-persistence-LWMIIC4U.js +0 -2
  540. package/dist/cli/chunks/sync-SNAXAVCN.js +0 -2
  541. package/dist/cli/chunks/token-bootstrap-UGRH7OPU.js +0 -2
  542. package/dist/cli/chunks/unified-memory-F5IJY7W7.js +0 -2
  543. package/dist/cli/chunks/unified-memory-hnsw-C3WAMAQL.js +0 -2
  544. package/dist/cli/chunks/unified-persistence-EWXXOTCB.js +0 -2
  545. package/dist/cli/chunks/visual-security-CKLTAIAB.js +0 -2
  546. package/dist/cli/chunks/witness-chain-Z6LWFEZS.js +0 -2
  547. package/dist/cli/chunks/witness-chain-repair-5QWRFVUK.js +0 -2
  548. package/dist/cli/chunks/witness-key-manager-FYZXQTLJ.js +0 -2
  549. package/dist/cli/chunks/workflow-orchestrator-OFTAR2NA.js +0 -2
  550. package/dist/cli/chunks/wrappers-COU73OQ6.js +0 -2
  551. /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
  552. /package/.claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
  553. /package/.claude/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
  554. /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.test.ts → budget-tests.ts.fixture} +0 -0
  555. /package/assets/skills/qe-court/evals/fixtures/seeded-mutant-delivery/{budget.ts → budget.ts.fixture} +0 -0
  556. /package/assets/skills/testability-scoring/resources/templates/{testability-scoring.spec.template.js → testability-scoring-spec.template.js} +0 -0
@@ -4,8 +4,9 @@
4
4
  */
5
5
  import * as fs from 'fs/promises';
6
6
  import * as path from 'path';
7
- import { createHash } from 'crypto';
7
+ import { createHash, randomBytes } from 'crypto';
8
8
  import { safeJsonParse } from '../shared/safe-json.js';
9
+ import { getProjectStorePath } from '../kernel/project-root.js';
9
10
  function securityReportExecution(data) {
10
11
  return data.evidence?.completeness === 'complete' ? 'completed'
11
12
  : data.evidence?.completeness === 'partial' ? 'partial'
@@ -77,7 +78,12 @@ const TEST_FILE_PATTERNS = {
77
78
  export class ResultSaver {
78
79
  baseDir;
79
80
  resultsDir;
80
- constructor(baseDir = '.agentic-qe') {
81
+ /**
82
+ * @param baseDir Store directory. Defaults to the resolved project's
83
+ * `.agentic-qe` (review of #1026 N2: a cwd-relative default wrote
84
+ * `<tmp>/.agentic-qe/results` when run from a shared dir).
85
+ */
86
+ constructor(baseDir = getProjectStorePath()) {
81
87
  this.baseDir = baseDir;
82
88
  this.resultsDir = path.join(baseDir, 'results');
83
89
  }
@@ -94,8 +100,13 @@ export class ResultSaver {
94
100
  // Ensure directories exist
95
101
  await this.ensureDirectories(taskType);
96
102
  // Get timestamp string for filenames
103
+ // #1007: millisecond timestamp plus a per-save suffix. Names to the second
104
+ // let two saves in the same second overwrite each other. Report, manifest
105
+ // and data files are created exclusively (see writeNewFile), so even a
106
+ // reused custom prefix never replaces an earlier result. Generated test
107
+ // files are the exception: one file per test name (see replaceFile).
97
108
  const tsStr = this.formatTimestamp(timestamp);
98
- const prefix = options.filenamePrefix || tsStr;
109
+ const prefix = options.filenamePrefix || `${tsStr}_${this.uniqueSuffix(taskId)}`;
99
110
  // Save based on task type
100
111
  switch (taskType) {
101
112
  case 'generate-tests':
@@ -159,8 +170,7 @@ export class ResultSaver {
159
170
  framework: options.framework || 'vitest',
160
171
  tests: data.tests,
161
172
  }, null, 2);
162
- await fs.writeFile(manifestPath, manifestContent);
163
- files.push(await this.createFileEntry(manifestPath, 'json'));
173
+ files.push(await this.writeNewFile(manifestPath, manifestContent, 'json'));
164
174
  // Save individual test files if code is provided
165
175
  if (data.tests) {
166
176
  for (const test of data.tests) {
@@ -168,16 +178,17 @@ export class ResultSaver {
168
178
  const ext = this.getTestExtension(options.language || 'typescript', options.framework || 'vitest');
169
179
  const testFilename = this.sanitizeFilename(test.name) + ext;
170
180
  const testPath = path.join(testDir, testFilename);
171
- await fs.writeFile(testPath, test.code);
172
- files.push(await this.createFileEntry(testPath, 'source'));
181
+ // Review of #1026 N7: a generated test keeps one file per test name
182
+ // (replaced atomically), unlike reports, so numbered copies never
183
+ // pile up for a test runner to collect.
184
+ files.push(await this.replaceFile(testPath, test.code, 'source'));
173
185
  }
174
186
  }
175
187
  }
176
188
  // Save markdown report
177
189
  const reportPath = path.join(this.resultsDir, 'tests', `${prefix}_report.md`);
178
190
  const reportContent = this.generateTestReport(data, options);
179
- await fs.writeFile(reportPath, reportContent);
180
- files.push(await this.createFileEntry(reportPath, 'markdown'));
191
+ files.push(await this.writeNewFile(reportPath, reportContent, 'markdown'));
181
192
  return files;
182
193
  }
183
194
  async saveCoverage(result, prefix, options) {
@@ -189,8 +200,7 @@ export class ResultSaver {
189
200
  const coverageDir = path.join(this.resultsDir, 'coverage');
190
201
  // Save JSON
191
202
  const jsonPath = path.join(coverageDir, `${prefix}_coverage.json`);
192
- await fs.writeFile(jsonPath, JSON.stringify(data, null, 2));
193
- files.push(await this.createFileEntry(jsonPath, 'json'));
203
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(data, null, 2), 'json'));
194
204
  // Save LCOV format — ONLY for genuinely measured coverage.
195
205
  //
196
206
  // #569/ADR-126: LCOV has nowhere to record provenance. Emitting it for an
@@ -202,14 +212,12 @@ export class ResultSaver {
202
212
  if (options.includeSecondary !== false && data.measured === true) {
203
213
  const lcovPath = path.join(coverageDir, `${prefix}_coverage.lcov`);
204
214
  const lcovContent = this.generateLcov(data);
205
- await fs.writeFile(lcovPath, lcovContent);
206
- files.push(await this.createFileEntry(lcovPath, 'lcov'));
215
+ files.push(await this.writeNewFile(lcovPath, lcovContent, 'lcov'));
207
216
  }
208
217
  // Save markdown report
209
218
  const reportPath = path.join(coverageDir, `${prefix}_report.md`);
210
219
  const reportContent = this.generateCoverageReport(data);
211
- await fs.writeFile(reportPath, reportContent);
212
- files.push(await this.createFileEntry(reportPath, 'markdown'));
220
+ files.push(await this.writeNewFile(reportPath, reportContent, 'markdown'));
213
221
  return files;
214
222
  }
215
223
  async saveSecurityScan(result, prefix, options) {
@@ -218,20 +226,17 @@ export class ResultSaver {
218
226
  const securityDir = path.join(this.resultsDir, 'security');
219
227
  // Save JSON
220
228
  const jsonPath = path.join(securityDir, `${prefix}_scan.json`);
221
- await fs.writeFile(jsonPath, JSON.stringify(data, null, 2));
222
- files.push(await this.createFileEntry(jsonPath, 'json'));
229
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(data, null, 2), 'json'));
223
230
  // Save SARIF format
224
231
  if (options.includeSecondary !== false) {
225
232
  const sarifPath = path.join(securityDir, `${prefix}_scan.sarif`);
226
233
  const sarifContent = this.generateSarif(data);
227
- await fs.writeFile(sarifPath, sarifContent);
228
- files.push(await this.createFileEntry(sarifPath, 'sarif'));
234
+ files.push(await this.writeNewFile(sarifPath, sarifContent, 'sarif'));
229
235
  }
230
236
  // Save markdown report
231
237
  const reportPath = path.join(securityDir, `${prefix}_report.md`);
232
238
  const reportContent = this.generateSecurityReport(data);
233
- await fs.writeFile(reportPath, reportContent);
234
- files.push(await this.createFileEntry(reportPath, 'markdown'));
239
+ files.push(await this.writeNewFile(reportPath, reportContent, 'markdown'));
235
240
  return files;
236
241
  }
237
242
  async saveQualityAssessment(result, prefix, _options) {
@@ -240,13 +245,11 @@ export class ResultSaver {
240
245
  const qualityDir = path.join(this.resultsDir, 'quality');
241
246
  // Save JSON
242
247
  const jsonPath = path.join(qualityDir, `${prefix}_assessment.json`);
243
- await fs.writeFile(jsonPath, JSON.stringify(data, null, 2));
244
- files.push(await this.createFileEntry(jsonPath, 'json'));
248
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(data, null, 2), 'json'));
245
249
  // Save markdown report
246
250
  const reportPath = path.join(qualityDir, `${prefix}_report.md`);
247
251
  const reportContent = this.generateQualityReport(data);
248
- await fs.writeFile(reportPath, reportContent);
249
- files.push(await this.createFileEntry(reportPath, 'markdown'));
252
+ files.push(await this.writeNewFile(reportPath, reportContent, 'markdown'));
250
253
  return files;
251
254
  }
252
255
  async saveCodeIndex(result, prefix, _options) {
@@ -256,8 +259,7 @@ export class ResultSaver {
256
259
  await fs.mkdir(indexDir, { recursive: true });
257
260
  // Save JSON
258
261
  const jsonPath = path.join(indexDir, `${prefix}_index.json`);
259
- await fs.writeFile(jsonPath, JSON.stringify(data, null, 2));
260
- files.push(await this.createFileEntry(jsonPath, 'json'));
262
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(data, null, 2), 'json'));
261
263
  return files;
262
264
  }
263
265
  async saveDefectPrediction(result, prefix, _options) {
@@ -266,8 +268,7 @@ export class ResultSaver {
266
268
  await fs.mkdir(defectDir, { recursive: true });
267
269
  // Save JSON
268
270
  const jsonPath = path.join(defectDir, `${prefix}_prediction.json`);
269
- await fs.writeFile(jsonPath, JSON.stringify(result, null, 2));
270
- files.push(await this.createFileEntry(jsonPath, 'json'));
271
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(result, null, 2), 'json'));
271
272
  return files;
272
273
  }
273
274
  async saveContractValidation(result, prefix, _options) {
@@ -276,8 +277,7 @@ export class ResultSaver {
276
277
  await fs.mkdir(contractDir, { recursive: true });
277
278
  // Save JSON
278
279
  const jsonPath = path.join(contractDir, `${prefix}_validation.json`);
279
- await fs.writeFile(jsonPath, JSON.stringify(result, null, 2));
280
- files.push(await this.createFileEntry(jsonPath, 'json'));
280
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(result, null, 2), 'json'));
281
281
  return files;
282
282
  }
283
283
  async saveAccessibilityTest(result, prefix, _options) {
@@ -286,8 +286,7 @@ export class ResultSaver {
286
286
  await fs.mkdir(a11yDir, { recursive: true });
287
287
  // Save JSON
288
288
  const jsonPath = path.join(a11yDir, `${prefix}_test.json`);
289
- await fs.writeFile(jsonPath, JSON.stringify(result, null, 2));
290
- files.push(await this.createFileEntry(jsonPath, 'json'));
289
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(result, null, 2), 'json'));
291
290
  return files;
292
291
  }
293
292
  async saveChaosTest(result, prefix, _options) {
@@ -296,8 +295,7 @@ export class ResultSaver {
296
295
  await fs.mkdir(chaosDir, { recursive: true });
297
296
  // Save JSON
298
297
  const jsonPath = path.join(chaosDir, `${prefix}_chaos.json`);
299
- await fs.writeFile(jsonPath, JSON.stringify(result, null, 2));
300
- files.push(await this.createFileEntry(jsonPath, 'json'));
298
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(result, null, 2), 'json'));
301
299
  return files;
302
300
  }
303
301
  async saveGeneric(taskType, result, prefix) {
@@ -305,8 +303,7 @@ export class ResultSaver {
305
303
  const genericDir = path.join(this.resultsDir, 'other');
306
304
  await fs.mkdir(genericDir, { recursive: true });
307
305
  const jsonPath = path.join(genericDir, `${prefix}_${taskType}.json`);
308
- await fs.writeFile(jsonPath, JSON.stringify(result, null, 2));
309
- files.push(await this.createFileEntry(jsonPath, 'json'));
306
+ files.push(await this.writeNewFile(jsonPath, JSON.stringify(result, null, 2), 'json'));
310
307
  return files;
311
308
  }
312
309
  // ==========================================================================
@@ -466,24 +463,42 @@ ${data.recommendations.map((r, i) => `${i + 1}. ${r}`).join('\n')}
466
463
  `;
467
464
  }
468
465
  generateQualityReport(data) {
466
+ // #996: unmeasured metrics (-1 sentinel) are not scores, and a static
467
+ // analysis run is not a gate — say both plainly.
468
+ const insufficient = (data.unmeasured?.length ?? 0) > 0 || data.evidenceStatus === 'insufficient-evidence';
469
+ const status = insufficient ? 'INSUFFICIENT EVIDENCE (not passed)' : data.passed ? 'PASSED' : 'FAILED';
470
+ const gateLine = data.gateEvaluated === false
471
+ ? '\n**Quality gate:** Not evaluated (static analysis only)'
472
+ : '';
473
+ const unmeasuredLine = insufficient && data.unmeasured?.length
474
+ ? `\n**Unmeasured:** ${data.unmeasured.join(', ')}`
475
+ : '';
476
+ const noRecommendations = data.gateEvaluated === false
477
+ ? 'No recommendations.'
478
+ : 'No recommendations - all quality gates passed.';
469
479
  return `# Quality Assessment Report
470
480
 
471
481
  **Generated:** ${new Date().toISOString()}
472
- **Status:** ${data.passed ? 'PASSED' : 'FAILED'}
482
+ **Status:** ${status}${gateLine}${unmeasuredLine}
473
483
 
474
484
  ## Quality Score
475
485
 
476
- ${typeof data.qualityScore === 'number' ? `**${data.qualityScore.toFixed(1)}** / 100` : 'N/A — measured gate uses individual checks.'}
486
+ ${typeof data.qualityScore !== 'number' ? 'N/A — measured gate uses individual checks.'
487
+ : data.qualityScore < 0 ? 'Not measured — no requested metric had measured data (#1011).'
488
+ : data.evidenceStatus === 'insufficient-evidence'
489
+ ? `Subset score over measured metrics: ${data.qualityScore.toFixed(1)} (not a verdict)`
490
+ + (data.scoreBasis?.length ? `\nBased on: ${data.scoreBasis.join(', ')}` : '')
491
+ : `**${data.qualityScore.toFixed(1)}** / 100`}
477
492
 
478
493
  ## Metrics
479
494
 
480
495
  | Metric | Score |
481
496
  |--------|-------|
482
- ${Object.entries(data.metrics).map(([k, v]) => `| ${k} | ${v.toFixed(1)} |`).join('\n')}
497
+ ${Object.entries(data.metrics).map(([k, v]) => `| ${k} | ${Number.isFinite(v) && v >= 0 ? v.toFixed(1) : 'not measured'} |`).join('\n')}
483
498
 
484
499
  ## Recommendations
485
500
 
486
- ${data.recommendations.length === 0 ? 'No recommendations - all quality gates passed.' : data.recommendations.map((r, i) => `${i + 1}. ${r}`).join('\n')}
501
+ ${data.recommendations.length === 0 ? noRecommendations : data.recommendations.map((r, i) => `${i + 1}. ${r}`).join('\n')}
487
502
  `;
488
503
  }
489
504
  // ==========================================================================
@@ -502,8 +517,51 @@ ${data.recommendations.length === 0 ? 'No recommendations - all quality gates pa
502
517
  await fs.mkdir(dir, { recursive: true });
503
518
  }
504
519
  }
520
+ /** `YYYY-MM-DDTHH-MM-SS-mmm` (#1007: milliseconds, not seconds). */
505
521
  formatTimestamp(date) {
506
- return date.toISOString().replace(/[:.]/g, '-').slice(0, 19);
522
+ return date.toISOString().replace(/[:.]/g, '-').slice(0, 23);
523
+ }
524
+ /** Short task-id fragment plus random hex, unique per save. */
525
+ uniqueSuffix(taskId) {
526
+ const idPart = this.sanitizeFilename(taskId).slice(-12) || 'task';
527
+ return `${idPart}-${randomBytes(3).toString('hex')}`;
528
+ }
529
+ /** Write `filePath` via a temp file and rename, replacing any previous version. */
530
+ async replaceFile(filePath, content, format) {
531
+ const tmpPath = `${filePath}.${process.pid}.${randomBytes(4).toString('hex')}.tmp`;
532
+ try {
533
+ await fs.writeFile(tmpPath, content, { flag: 'wx' });
534
+ await fs.rename(tmpPath, filePath);
535
+ }
536
+ catch (error) {
537
+ await fs.rm(tmpPath, { force: true });
538
+ throw error;
539
+ }
540
+ return this.createFileEntry(filePath, format);
541
+ }
542
+ /**
543
+ * Create `filePath` exclusively and record it. If the name is taken (a
544
+ * reused custom prefix), write to
545
+ * `name-1.ext`, `name-2.ext`, … instead of replacing the earlier file (#1007).
546
+ */
547
+ async writeNewFile(filePath, content, format) {
548
+ const dir = path.dirname(filePath);
549
+ const base = path.basename(filePath);
550
+ const dot = base.indexOf('.', 1);
551
+ const stem = dot > 0 ? base.slice(0, dot) : base;
552
+ const ext = dot > 0 ? base.slice(dot) : '';
553
+ for (let attempt = 0; attempt < 1000; attempt++) {
554
+ const candidate = attempt === 0 ? filePath : path.join(dir, `${stem}-${attempt}${ext}`);
555
+ try {
556
+ await fs.writeFile(candidate, content, { flag: 'wx' });
557
+ return this.createFileEntry(candidate, format);
558
+ }
559
+ catch (error) {
560
+ if (error.code !== 'EEXIST')
561
+ throw error;
562
+ }
563
+ }
564
+ throw new Error(`ResultSaver: no free file name for ${filePath}`);
507
565
  }
508
566
  sanitizeFilename(name) {
509
567
  return name.replace(/[^a-zA-Z0-9_-]/g, '_').toLowerCase();
@@ -542,8 +600,12 @@ ${data.recommendations.length === 0 ? 'No recommendations - all quality gates pa
542
600
  };
543
601
  case 'assess-quality':
544
602
  return {
545
- qualityScore: data.qualityScore,
603
+ // #1021: -1 means "not measured", and a subset score under insufficient
604
+ // evidence is not a verdict; keep both out of the index and trends.
605
+ ...(typeof data.qualityScore === 'number' && data.qualityScore >= 0
606
+ && data.evidenceStatus !== 'insufficient-evidence' ? { qualityScore: data.qualityScore } : {}),
546
607
  passed: data.passed,
608
+ ...(data.evidenceStatus !== undefined ? { evidenceStatus: data.evidenceStatus } : {}),
547
609
  };
548
610
  case 'generate-tests':
549
611
  return {
@@ -554,8 +616,26 @@ ${data.recommendations.length === 0 ? 'No recommendations - all quality gates pa
554
616
  return {};
555
617
  }
556
618
  }
557
- async updateIndex(taskId, taskType, timestamp, files, summary) {
558
- const indexPath = path.join(this.resultsDir, 'index.json');
619
+ /**
620
+ * Append to index.json. Concurrent saves read-modify-write the same file, so
621
+ * updates are serialized per index path in this process and the file is
622
+ * replaced atomically, otherwise one save's entry is lost (#1007).
623
+ */
624
+ updateIndex(taskId, taskType, timestamp, files, summary) {
625
+ const indexPath = path.resolve(this.resultsDir, 'index.json');
626
+ const previous = indexUpdateQueues.get(indexPath) ?? Promise.resolve();
627
+ const next = previous
628
+ .catch(() => undefined)
629
+ .then(() => this.writeIndexEntry(indexPath, taskId, taskType, timestamp, files, summary));
630
+ indexUpdateQueues.set(indexPath, next);
631
+ const settle = () => {
632
+ if (indexUpdateQueues.get(indexPath) === next)
633
+ indexUpdateQueues.delete(indexPath);
634
+ };
635
+ next.then(settle, settle);
636
+ return next;
637
+ }
638
+ async writeIndexEntry(indexPath, taskId, taskType, timestamp, files, summary) {
559
639
  let index;
560
640
  try {
561
641
  const content = await fs.readFile(indexPath, 'utf-8');
@@ -584,9 +664,13 @@ ${data.recommendations.length === 0 ? 'No recommendations - all quality gates pa
584
664
  if (index.results.length > 100) {
585
665
  index.results = index.results.slice(-100);
586
666
  }
587
- await fs.writeFile(indexPath, JSON.stringify(index, null, 2));
667
+ const tmpPath = `${indexPath}.${process.pid}.${randomBytes(4).toString('hex')}.tmp`;
668
+ await fs.writeFile(tmpPath, JSON.stringify(index, null, 2));
669
+ await fs.rename(tmpPath, indexPath);
588
670
  }
589
671
  }
672
+ /** Pending index.json updates, keyed by absolute index path (#1007). */
673
+ const indexUpdateQueues = new Map();
590
674
  // Factory function
591
675
  export function createResultSaver(baseDir) {
592
676
  return new ResultSaver(baseDir);
@@ -22,6 +22,7 @@ type CoverageAnalyzerService = import('../domains/coverage-analysis').CoverageAn
22
22
  type SecurityScannerService = import('../domains/security-compliance').SecurityScannerService;
23
23
  type KnowledgeGraphService = import('../domains/code-intelligence').KnowledgeGraphService;
24
24
  type QualityAnalyzerService = import('../domains/quality-assessment').QualityAnalyzerService;
25
+ type ProjectMetricsCollector = import('./handlers/handler-types').ProjectMetricsCollector;
25
26
  export interface TaskExecutorConfig {
26
27
  timeout: number;
27
28
  maxRetries: number;
@@ -44,6 +45,11 @@ export interface TaskResult {
44
45
  domain: DomainName;
45
46
  /** Files saved by result saver */
46
47
  savedFiles?: string[];
48
+ /**
49
+ * #996: structured context for a failure (which quality metrics were
50
+ * unmeasured). Only set for InsufficientQualityEvidenceError; absent otherwise.
51
+ */
52
+ errorDetails?: Record<string, unknown>;
47
53
  }
48
54
  export declare class DomainTaskExecutor implements TaskHandlerContext {
49
55
  private readonly kernel;
@@ -101,6 +107,12 @@ export declare class DomainTaskExecutor implements TaskHandlerContext {
101
107
  */
102
108
  private resolveLLMRouter;
103
109
  getKnowledgeGraph(): KnowledgeGraphService;
110
+ /**
111
+ * #999: the code-intelligence coordinator, so the MCP index-code handler can
112
+ * run the same project-metric step as `aqe code index`. Loads the domain
113
+ * lazily; undefined when it is disabled or fails to load.
114
+ */
115
+ getCodeIntelligenceCoordinator(): Promise<ProjectMetricsCollector | undefined>;
104
116
  getQualityAnalyzer(): QualityAnalyzerService;
105
117
  private registerHandlers;
106
118
  /**
@@ -14,7 +14,9 @@
14
14
  */
15
15
  import { v4 as uuidv4 } from 'uuid';
16
16
  import { isCallerInputError, toErrorMessage } from '../shared/error-utils.js';
17
+ import { InsufficientQualityEvidenceError } from '../domains/quality-assessment/quality-evidence.js';
17
18
  import { createResultSaver } from './result-saver.js';
19
+ import { getProjectStorePath } from '../kernel/project-root.js';
18
20
  import { createLogger } from '../logging/logger-factory.js';
19
21
  import { getClaudeModelForTier } from '../shared/llm/model-registry.js';
20
22
  // ADR-051: Agent Booster integration for Tier 0 tasks
@@ -53,6 +55,16 @@ function resolveQualityAnalyzerService(memory) {
53
55
  const factory = DomainServiceRegistry.resolve(ServiceKeys.QualityAnalyzerService);
54
56
  return factory(memory);
55
57
  }
58
+ /**
59
+ * #996: structured details, only from error types known to carry them.
60
+ * #1021 round 2b: a caller-input error is marked so learners do not record
61
+ * the caller's mistake as a component failure.
62
+ */
63
+ function errorDetailsOf(error) {
64
+ if (error instanceof InsufficientQualityEvidenceError)
65
+ return { ...error.toDetails() };
66
+ return isCallerInputError(error) ? { callerError: true } : undefined;
67
+ }
56
68
  // ============================================================================
57
69
  // ADR-051: Model Routing Support
58
70
  // ============================================================================
@@ -136,7 +148,8 @@ export class DomainTaskExecutor {
136
148
  maxRetries: config?.maxRetries ?? 3,
137
149
  enableCaching: config?.enableCaching ?? true,
138
150
  saveResults: config?.saveResults ?? true,
139
- resultsDir: config?.resultsDir ?? '.agentic-qe',
151
+ // Review of #1026 N2: resolve the project store, not a cwd-relative one.
152
+ resultsDir: config?.resultsDir ?? getProjectStorePath(),
140
153
  defaultLanguage: config?.defaultLanguage ?? 'typescript',
141
154
  defaultFramework: config?.defaultFramework ?? 'vitest',
142
155
  };
@@ -235,6 +248,25 @@ export class DomainTaskExecutor {
235
248
  }
236
249
  return this.knowledgeGraph;
237
250
  }
251
+ /**
252
+ * #999: the code-intelligence coordinator, so the MCP index-code handler can
253
+ * run the same project-metric step as `aqe code index`. Loads the domain
254
+ * lazily; undefined when it is disabled or fails to load.
255
+ */
256
+ async getCodeIntelligenceCoordinator() {
257
+ try {
258
+ const api = this.kernel.getDomainAPIAsync
259
+ ? await this.kernel.getDomainAPIAsync('code-intelligence')
260
+ : this.kernel.getDomainAPI('code-intelligence');
261
+ return typeof api?.getCoordinator === 'function' ? api.getCoordinator() : undefined;
262
+ }
263
+ catch (error) {
264
+ logger.debug('code-intelligence coordinator unavailable for project metrics', {
265
+ error: error instanceof Error ? error.message : String(error),
266
+ });
267
+ return undefined;
268
+ }
269
+ }
238
270
  getQualityAnalyzer() {
239
271
  if (!this.qualityAnalyzer) {
240
272
  this.qualityAnalyzer = resolveQualityAnalyzerService(this.kernel.memory);
@@ -439,12 +471,14 @@ export class DomainTaskExecutor {
439
471
  await this.publishTaskFailed(task.id, errorMsg, domain, 'error' in result && isCallerInputError(result.error));
440
472
  // ADR-051: Record failed outcome
441
473
  this.recordOutcome(task, routingTier, false, Date.now() - startTime).catch((e) => { logger.warn('recordOutcome failed', { error: e instanceof Error ? e.message : String(e), taskId: task.id }); });
474
+ const errorDetails = 'error' in result ? errorDetailsOf(result.error) : undefined;
442
475
  return {
443
476
  taskId: task.id,
444
477
  success: false,
445
478
  error: errorMsg,
446
479
  duration: Date.now() - startTime,
447
480
  domain,
481
+ ...(errorDetails ? { errorDetails } : {}),
448
482
  };
449
483
  }
450
484
  await this.publishTaskCompleted(task.id, result.value, domain);
@@ -491,12 +525,14 @@ export class DomainTaskExecutor {
491
525
  await this.publishTaskFailed(task.id, errorMessage, domain, isCallerInputError(error));
492
526
  // ADR-051: Record failed outcome
493
527
  this.recordOutcome(task, routingTier, false, Date.now() - startTime).catch((e) => { logger.warn('recordOutcome failed', { error: e instanceof Error ? e.message : String(e), taskId: task.id }); });
528
+ const errorDetails = errorDetailsOf(error);
494
529
  return {
495
530
  taskId: task.id,
496
531
  success: false,
497
532
  error: errorMessage,
498
533
  duration: Date.now() - startTime,
499
534
  domain,
535
+ ...(errorDetails ? { errorDetails } : {}),
500
536
  };
501
537
  }
502
538
  }
@@ -261,7 +261,8 @@ export declare class CodeIntelligenceCoordinator extends BaseDomainCoordinator<C
261
261
  */
262
262
  getMetricCollector(): IMetricCollectorService | undefined;
263
263
  /**
264
- * Determine project root from indexed paths
264
+ * Determine project root from indexed paths (nearest marker, bottom-up; #994).
265
+ * Relative paths resolve against the process cwd, matching the CLI/MCP callers.
265
266
  */
266
267
  private getProjectRootFromPaths;
267
268
  /**
@@ -6,7 +6,7 @@
6
6
  * - QEGNNEmbeddingIndex: Code graph embeddings with HNSW for fast similarity search
7
7
  * - QESONA: Learns and adapts code patterns for improved intelligence
8
8
  */
9
- import { existsSync } from 'node:fs';
9
+ import { resolveProjectRootFromPaths } from './project-root-resolver.js';
10
10
  import { LoggerFactory } from '../../logging/index.js';
11
11
  import { v4 as uuidv4 } from 'uuid';
12
12
  import { err } from '../../shared/types/index.js';
@@ -300,11 +300,14 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
300
300
  this.updateWorkflowProgress(workflowId, 60);
301
301
  // V3: Collect real project metrics using actual tooling (Phase 5)
302
302
  if (this.config.enableMetricCollector && this.metricCollector && request.paths.length > 0) {
303
- // Determine project root from first path
304
- const projectPath = this.getProjectRootFromPaths(request.paths);
303
+ // Determine project root from the caller's target (or the indexed paths)
304
+ const projectPath = this.getProjectRootFromPaths(request.paths, request.target);
305
305
  if (projectPath) {
306
306
  await this.collectProjectMetrics(projectPath);
307
307
  }
308
+ else {
309
+ logger.debug('Skipping project metrics: no project root resolved (filesystem root or no paths)');
310
+ }
308
311
  }
309
312
  this.updateWorkflowProgress(workflowId, 70);
310
313
  // Index content for semantic search
@@ -941,36 +944,11 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
941
944
  return this.metricCollector;
942
945
  }
943
946
  /**
944
- * Determine project root from indexed paths
947
+ * Determine project root from indexed paths (nearest marker, bottom-up; #994).
948
+ * Relative paths resolve against the process cwd, matching the CLI/MCP callers.
945
949
  */
946
- getProjectRootFromPaths(paths) {
947
- if (paths.length === 0)
948
- return null;
949
- // Get the first path and find the project root
950
- const firstPath = paths[0];
951
- // Walk up the path to find package.json, Cargo.toml, go.mod, etc.
952
- const parts = firstPath.split('/');
953
- let currentPath = '';
954
- for (const part of parts) {
955
- currentPath = currentPath ? `${currentPath}/${part}` : part;
956
- // Check for common project markers
957
- const markers = ['package.json', 'Cargo.toml', 'go.mod', 'pyproject.toml', '.git'];
958
- for (const marker of markers) {
959
- try {
960
- const markerPath = `${currentPath}/${marker}`;
961
- // Synchronous existence check (we're in an async context anyway).
962
- if (existsSync(markerPath)) {
963
- return currentPath;
964
- }
965
- }
966
- catch {
967
- // Continue checking
968
- }
969
- }
970
- }
971
- // If no marker found, return the parent directory of the first path
972
- const lastSlash = firstPath.lastIndexOf('/');
973
- return lastSlash > 0 ? firstPath.substring(0, lastSlash) : firstPath;
950
+ getProjectRootFromPaths(paths, target) {
951
+ return resolveProjectRootFromPaths(paths, { target });
974
952
  }
975
953
  // ============================================================================
976
954
  // V3: Hypergraph Integration for Intelligent Code Analysis (GOAP Action 7)
@@ -17,6 +17,11 @@ export interface CodeIntelligenceAPI {
17
17
  }
18
18
  export interface IndexRequest {
19
19
  paths: string[];
20
+ /**
21
+ * The directory or file the caller asked to index, before it was expanded
22
+ * into `paths`. Used to resolve the project root for metrics (#994).
23
+ */
24
+ target?: string;
20
25
  incremental?: boolean;
21
26
  includeTests?: boolean;
22
27
  languages?: string[];
@@ -9,6 +9,7 @@ import { KnowledgeGraphService, } from './services/knowledge-graph.js';
9
9
  import { SemanticAnalyzerService, } from './services/semantic-analyzer.js';
10
10
  import { toError } from '../../shared/error-utils.js';
11
11
  import { ImpactAnalyzerService, } from './services/impact-analyzer.js';
12
+ import { isMeasuredGapPayload } from '../../shared/events/domain-events.js';
12
13
  /**
13
14
  * Code Intelligence Domain Plugin
14
15
  * Provides knowledge graph, semantic search, and impact analysis capabilities
@@ -80,6 +81,7 @@ export class CodeIntelligencePlugin extends BaseDomainPlugin {
80
81
  return this.coordinator.index({
81
82
  paths,
82
83
  languages,
84
+ target: typeof payload.target === 'string' ? payload.target : undefined,
83
85
  });
84
86
  }],
85
87
  ['search', async (payload) => {
@@ -300,6 +302,9 @@ export class CodeIntelligencePlugin extends BaseDomainPlugin {
300
302
  );
301
303
  }
302
304
  async handleCoverageGap(event) {
305
+ // #1014: only a gap found in MEASURED coverage is acted on / learned from.
306
+ if (!isMeasuredGapPayload(event.payload))
307
+ return;
303
308
  // Coverage gap detected - update risk scores in knowledge graph
304
309
  const payload = event.payload;
305
310
  // Store coverage gap info for impact analysis
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Project root resolution for code-intelligence metric collection (#994).
3
+ *
4
+ * `index()` receives an expanded list of files (the CLI walks the target
5
+ * directory first). When the caller also passes the original `target`, the
6
+ * walk starts at the target directory (its parent for a file target), so a `.`
7
+ * at a monorepo root whose source all lives in one package resolves to the
8
+ * root. Without a target we start from the deepest directory that contains
9
+ * every indexed path. Either way we walk UP (bottom-up, using `path.dirname`,
10
+ * so absolute paths and Windows drive roots are handled by the `path` module)
11
+ * and return the NEAREST directory that holds a project marker.
12
+ *
13
+ * Starting from the common directory rather than the first file keeps a stray
14
+ * marker inside one subtree (for example `.agentic-qe/workers/package.json`)
15
+ * from capturing an index that spans the whole project.
16
+ *
17
+ * When no marker exists anywhere up to the filesystem root, the start
18
+ * directory itself is returned (the target, the files' common directory, or a
19
+ * single file's directory). A filesystem or drive root is never returned:
20
+ * measuring `/` would walk the whole disk, so the result is null instead.
21
+ *
22
+ * @module domains/code-intelligence/project-root-resolver
23
+ */
24
+ import * as path from 'node:path';
25
+ /** Files or directories whose presence marks a project root. */
26
+ export declare const PROJECT_ROOT_MARKERS: readonly string[];
27
+ export interface ResolveProjectRootOptions {
28
+ /** Base directory for relative inputs. Defaults to `process.cwd()`. */
29
+ cwd?: string;
30
+ /** Existence check, injectable for tests. Defaults to `fs.existsSync`. */
31
+ exists?: (p: string) => boolean;
32
+ /** Directory check, injectable for tests. Defaults to `fs.statSync(...).isDirectory()`. */
33
+ isDirectory?: (p: string) => boolean;
34
+ /** Path implementation. Defaults to the platform `path`; tests pass `path.win32`. */
35
+ pathImpl?: path.PlatformPath;
36
+ /**
37
+ * The directory (or file) the caller asked to index, before expansion. When
38
+ * set, the walk starts here instead of at the common directory of `paths`.
39
+ */
40
+ target?: string;
41
+ }
42
+ /**
43
+ * Resolve the project root for a set of indexed paths.
44
+ *
45
+ * @param paths - Files and/or directories, absolute or relative to `options.cwd`
46
+ * @returns Absolute project root, or null when there is nothing to resolve or
47
+ * the result would be a filesystem/drive root
48
+ */
49
+ export declare function resolveProjectRootFromPaths(paths: readonly string[], options?: ResolveProjectRootOptions): string | null;
50
+ //# sourceMappingURL=project-root-resolver.d.ts.map