agentic-qe 3.15.4 → 3.15.5

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 (402) hide show
  1. package/.claude/skills/skills-manifest.json +1 -1
  2. package/CHANGELOG.md +70 -0
  3. package/assets/skills/skills-manifest.json +1 -1
  4. package/dist/bridge/captured-experience-bridge.js +7 -9
  5. package/dist/cli/bundle.js +5 -5
  6. package/dist/cli/chunks/adapter-EGIPTX5H.js +2 -0
  7. package/dist/cli/chunks/{agent-booster-wasm-MHJBRXMK.js → agent-booster-wasm-CCTTGCQS.js} +2 -2
  8. package/dist/cli/chunks/{agent-handler-G64SD7J2.js → agent-handler-DHYUF3NX.js} +2 -2
  9. package/dist/cli/chunks/{agent-memory-branch-G4UXFPKH.js → agent-memory-branch-642W7CYX.js} +2 -2
  10. package/dist/cli/chunks/aqe-learning-engine-WP4GCBDT.js +2 -0
  11. package/dist/cli/chunks/{arena-QJMKYPHS.js → arena-MUCC7UUN.js} +4 -4
  12. package/dist/cli/chunks/{arena-63M3M6EW.js → arena-NW2JVAFY.js} +2 -2
  13. package/dist/cli/chunks/{audit-UDFVTWSX.js → audit-VKQTZJAA.js} +3 -3
  14. package/dist/cli/chunks/base-6ORFD62I.js +2 -0
  15. package/dist/cli/chunks/{better-sqlite3-JLX2G56I.js → better-sqlite3-7ZUFVWLQ.js} +2 -2
  16. package/dist/cli/chunks/{brain-handler-PWF32LLW.js → brain-handler-7LKAWSBI.js} +3 -3
  17. package/dist/cli/chunks/{branch-enumerator-PB7QWXDP.js → branch-enumerator-HUNXJKM4.js} +2 -2
  18. package/dist/cli/chunks/{browser-CYNV2F3U.js → browser-ZSZEYUDP.js} +2 -2
  19. package/dist/cli/chunks/browser-workflow-PIXGERWP.js +2 -0
  20. package/dist/cli/chunks/{chunk-RWZ4F44Y.js → chunk-2KWI3MT3.js} +2 -2
  21. package/dist/cli/chunks/{chunk-UORI2CZ4.js → chunk-2WFTZSRT.js} +1 -1
  22. package/dist/cli/chunks/{chunk-HCDTLV5J.js → chunk-2XYTS2WY.js} +2 -2
  23. package/dist/cli/chunks/{chunk-DBIK4OFX.js → chunk-35MDATQE.js} +1 -1
  24. package/dist/cli/chunks/{chunk-54XTJBHV.js → chunk-3AYYGR6W.js} +1 -1
  25. package/dist/cli/chunks/{chunk-SJB4KMZS.js → chunk-3DTEQHFB.js} +3 -3
  26. package/dist/cli/chunks/{chunk-RG67RZIX.js → chunk-3OAQPN2N.js} +2 -2
  27. package/dist/cli/chunks/{chunk-2DRMTRBM.js → chunk-3QD7U3FY.js} +2 -2
  28. package/dist/cli/chunks/{chunk-VMSO6DMF.js → chunk-3SH23PS3.js} +2 -2
  29. package/dist/cli/chunks/{chunk-RJ5CZ7B6.js → chunk-3YASZPLO.js} +2 -2
  30. package/dist/cli/chunks/{chunk-JFQDWAU3.js → chunk-3YNP33GB.js} +2 -2
  31. package/dist/cli/chunks/{chunk-I53365HG.js → chunk-47GEI2LT.js} +3 -3
  32. package/dist/cli/chunks/{chunk-PCWZCXBD.js → chunk-4AZP7ZCW.js} +2 -2
  33. package/dist/cli/chunks/{chunk-54ITMOFM.js → chunk-4PT5KNXL.js} +4 -4
  34. package/dist/cli/chunks/{chunk-SIUUAKCE.js → chunk-4UXPDV7E.js} +1 -1
  35. package/dist/cli/chunks/{chunk-LZSLJJII.js → chunk-4XSCZVON.js} +2 -2
  36. package/dist/cli/chunks/{chunk-DFJGXXCL.js → chunk-5BOZCMXZ.js} +1 -1
  37. package/dist/cli/chunks/{chunk-B7J3O2WM.js → chunk-644DFAGS.js} +1 -1
  38. package/dist/cli/chunks/{chunk-2ICC4H6K.js → chunk-663ZFPUL.js} +2 -2
  39. package/dist/cli/chunks/{chunk-YUWUFYHK.js → chunk-6JFGB2JB.js} +1 -1
  40. package/dist/cli/chunks/{chunk-MBV57LKC.js → chunk-6LG5UEQE.js} +2 -2
  41. package/dist/cli/chunks/{chunk-LRTF5RMG.js → chunk-6UYN5PHA.js} +4 -4
  42. package/dist/cli/chunks/{chunk-5SS2Z7JC.js → chunk-6ZIDZ4TJ.js} +2 -2
  43. package/dist/cli/chunks/{chunk-2534PXIV.js → chunk-7BIYJRQJ.js} +2 -2
  44. package/dist/cli/chunks/{chunk-HX5KQK7I.js → chunk-7EZLOC4K.js} +2 -2
  45. package/dist/cli/chunks/{chunk-ZAOQIVHG.js → chunk-7YB2KELI.js} +2 -2
  46. package/dist/cli/chunks/{chunk-SOSJFEFB.js → chunk-A2WOQO2N.js} +2 -2
  47. package/dist/cli/chunks/{chunk-M6SJALLA.js → chunk-A337MD3C.js} +2 -2
  48. package/dist/cli/chunks/{chunk-YZ2AGC7O.js → chunk-A5J4XJS6.js} +1 -1
  49. package/dist/cli/chunks/{chunk-PEA4DVXW.js → chunk-AQN5EDBM.js} +1 -1
  50. package/dist/cli/chunks/{chunk-EGHK6NMH.js → chunk-AUZXRFOX.js} +2 -2
  51. package/dist/cli/chunks/{chunk-BBKLVHDQ.js → chunk-B2UHTA4Q.js} +1 -1
  52. package/dist/cli/chunks/{chunk-LY53L6NH.js → chunk-BBL6YXD3.js} +2 -2
  53. package/dist/cli/chunks/chunk-BJ5P4IV2.js +2 -0
  54. package/dist/cli/chunks/{chunk-I43QRLLB.js → chunk-BMWAWZAN.js} +2 -2
  55. package/dist/cli/chunks/chunk-BO4PKNYP.js +102 -0
  56. package/dist/cli/chunks/{chunk-PMXWDTDK.js → chunk-BY646JOM.js} +2 -2
  57. package/dist/cli/chunks/{chunk-OFQDM73J.js → chunk-BYXNHGQC.js} +2 -2
  58. package/dist/cli/chunks/{chunk-73MTUM6F.js → chunk-BZFT4QDQ.js} +2 -2
  59. package/dist/cli/chunks/{chunk-RA3MI5WK.js → chunk-CFPR24YK.js} +2 -2
  60. package/dist/cli/chunks/{chunk-WEDVLKRB.js → chunk-CQMHDAJS.js} +2 -2
  61. package/dist/cli/chunks/{chunk-HFSBONCS.js → chunk-CR2JUANW.js} +2 -2
  62. package/dist/cli/chunks/{chunk-BY3IL56R.js → chunk-CXOXUBYU.js} +1 -1
  63. package/dist/cli/chunks/{chunk-AOKSLWON.js → chunk-D3G2NN7F.js} +77 -78
  64. package/dist/cli/chunks/{chunk-I5A3HGO6.js → chunk-DEGWCUMY.js} +2 -2
  65. package/dist/cli/chunks/{chunk-CQ3WSTJ2.js → chunk-DFPL5N3Q.js} +2 -2
  66. package/dist/cli/chunks/{chunk-TVQPYP2Z.js → chunk-DL5JENWD.js} +3 -3
  67. package/dist/cli/chunks/{chunk-V3NZ23X6.js → chunk-DLY4YEN3.js} +2 -2
  68. package/dist/cli/chunks/{chunk-HEKCN5XQ.js → chunk-DPV33C77.js} +2 -2
  69. package/dist/cli/chunks/{chunk-KOLHZSEC.js → chunk-DPYDUKVZ.js} +2 -2
  70. package/dist/cli/chunks/{chunk-3MSBVOYW.js → chunk-DTJODGCE.js} +2 -2
  71. package/dist/cli/chunks/{chunk-MGH4XIHH.js → chunk-DWZI3IVB.js} +2 -2
  72. package/dist/cli/chunks/{chunk-DPL4ZXTE.js → chunk-DXVZBJE4.js} +1 -1
  73. package/dist/cli/chunks/{chunk-LXYTC62V.js → chunk-E4VIVMDL.js} +2 -2
  74. package/dist/cli/chunks/{chunk-DVE5SM5G.js → chunk-EAYQCBXL.js} +3 -3
  75. package/dist/cli/chunks/{chunk-BY5PLEPZ.js → chunk-EOR3RECZ.js} +2 -2
  76. package/dist/cli/chunks/chunk-ERGWWI4Y.js +3 -0
  77. package/dist/cli/chunks/{chunk-LPSE6DOQ.js → chunk-EUEHBERE.js} +1 -1
  78. package/dist/cli/chunks/{chunk-3BDDOFYW.js → chunk-EVCFUYYK.js} +2 -2
  79. package/dist/cli/chunks/{chunk-SZWXUG36.js → chunk-FBEXG4HD.js} +2 -2
  80. package/dist/cli/chunks/{chunk-5GWTJJEO.js → chunk-FE3AIZI6.js} +1 -1
  81. package/dist/cli/chunks/{chunk-4GLR2S2M.js → chunk-FHUJCVT3.js} +2 -2
  82. package/dist/cli/chunks/{chunk-6TMUZGM2.js → chunk-FNAYDITO.js} +1 -1
  83. package/dist/cli/chunks/{chunk-U2E5F3VZ.js → chunk-FQKEZVN6.js} +2 -2
  84. package/dist/cli/chunks/{chunk-2LL35V3A.js → chunk-FWYJ6UDX.js} +2 -2
  85. package/dist/cli/chunks/{chunk-ISASRHZP.js → chunk-GGDKOJVF.js} +2 -2
  86. package/dist/cli/chunks/{chunk-ZKXZTIVF.js → chunk-GKPRECLL.js} +2 -2
  87. package/dist/cli/chunks/{chunk-OHH6BUZK.js → chunk-GRIPCYW5.js} +1 -1
  88. package/dist/cli/chunks/{chunk-XZ5Z56OP.js → chunk-GTSOFCMQ.js} +1 -1
  89. package/dist/cli/chunks/{chunk-2MU4WCMQ.js → chunk-HBYQYGXP.js} +2 -2
  90. package/dist/cli/chunks/{chunk-YQ6BK7QC.js → chunk-HGBJ2QQ4.js} +2 -2
  91. package/dist/cli/chunks/{chunk-N6CRIUTO.js → chunk-HIUNCO2W.js} +2 -2
  92. package/dist/cli/chunks/{chunk-5H7MR6HP.js → chunk-HLFDC4SF.js} +1 -1
  93. package/dist/cli/chunks/{chunk-GAXTPQCZ.js → chunk-HPLMX62I.js} +2 -2
  94. package/dist/cli/chunks/{chunk-WO4NSPLX.js → chunk-IHFUEPZH.js} +2 -2
  95. package/dist/cli/chunks/{chunk-ADF6LGHZ.js → chunk-IJ2EXSMO.js} +2 -2
  96. package/dist/cli/chunks/{chunk-GLKLEHK3.js → chunk-IJOFZBXD.js} +2 -2
  97. package/dist/cli/chunks/{chunk-IKWAPHJA.js → chunk-JANLATHN.js} +2 -2
  98. package/dist/cli/chunks/{chunk-J3RNVHDH.js → chunk-JCC7QEKZ.js} +1 -1
  99. package/dist/cli/chunks/{chunk-C5EN5WB6.js → chunk-JI77KJP7.js} +1 -1
  100. package/dist/cli/chunks/{chunk-B7GJXQD2.js → chunk-JNMUVBAJ.js} +2 -2
  101. package/dist/cli/chunks/{chunk-ZP6ANUP7.js → chunk-JYY7AYGA.js} +1 -1
  102. package/dist/cli/chunks/{chunk-6HTO4BLV.js → chunk-KHCALIFP.js} +2 -2
  103. package/dist/cli/chunks/{chunk-BND6M2JX.js → chunk-KJ3KBP24.js} +2 -2
  104. package/dist/cli/chunks/{chunk-O7TMY4GS.js → chunk-KZVJW2SD.js} +2 -2
  105. package/dist/cli/chunks/chunk-L336HFFE.js +2 -0
  106. package/dist/cli/chunks/{chunk-W3PPYNHF.js → chunk-L375O3CZ.js} +2 -2
  107. package/dist/cli/chunks/{chunk-PJAXWCFC.js → chunk-L6SVCNXK.js} +1 -1
  108. package/dist/cli/chunks/{chunk-VAXQUD5G.js → chunk-LNO5IWGH.js} +1 -1
  109. package/dist/cli/chunks/{chunk-CFXFGQEN.js → chunk-LRASYSGV.js} +2 -2
  110. package/dist/cli/chunks/{chunk-MVTUFPM2.js → chunk-MB4VFAJC.js} +2 -2
  111. package/dist/cli/chunks/{chunk-SCL2OYN7.js → chunk-MNQ36MAF.js} +2 -2
  112. package/dist/cli/chunks/{chunk-W6TJXK5Y.js → chunk-MQGEZA2A.js} +2 -2
  113. package/dist/cli/chunks/{chunk-73PCVMGA.js → chunk-MS3Z2CP5.js} +2 -2
  114. package/dist/cli/chunks/{chunk-WI5AEB7Q.js → chunk-N2TJNIHA.js} +2 -2
  115. package/dist/cli/chunks/{chunk-DEJM2P5K.js → chunk-NF6AFIAX.js} +1 -1
  116. package/dist/cli/chunks/{chunk-JL3TI43V.js → chunk-NLDFNAOS.js} +2 -2
  117. package/dist/cli/chunks/{chunk-UK5HY6LC.js → chunk-NMJVG22Z.js} +1 -1
  118. package/dist/cli/chunks/{chunk-WW6WUMS7.js → chunk-OGYWWZU7.js} +2 -2
  119. package/dist/cli/chunks/{chunk-3C2BFLYC.js → chunk-ONCH5AXU.js} +3 -3
  120. package/dist/cli/chunks/{chunk-OG4KHX7S.js → chunk-OQDC7GCM.js} +2 -2
  121. package/dist/cli/chunks/{chunk-3ZIVBTX6.js → chunk-ORTBRO7F.js} +2 -2
  122. package/dist/cli/chunks/{chunk-NIJMLEAX.js → chunk-OU4ZAWCC.js} +2 -2
  123. package/dist/cli/chunks/{chunk-FDK2GF4G.js → chunk-OW42F2TX.js} +2 -2
  124. package/dist/cli/chunks/{chunk-TB22Y3WW.js → chunk-PCCIZFD7.js} +1 -1
  125. package/dist/cli/chunks/{chunk-BZWZTGMF.js → chunk-PDPEMBFV.js} +2 -2
  126. package/dist/cli/chunks/{chunk-D7RVZ5C2.js → chunk-PHAQWAEV.js} +2 -2
  127. package/dist/cli/chunks/{chunk-P7GM3EE7.js → chunk-PHP4UJYP.js} +1 -1
  128. package/dist/cli/chunks/{chunk-6QPW4OVH.js → chunk-PURHGLEC.js} +1 -1
  129. package/dist/cli/chunks/{chunk-BPGFCUDO.js → chunk-PVAE65B4.js} +1 -1
  130. package/dist/cli/chunks/{chunk-7X2IVMXN.js → chunk-QPV3OKX2.js} +2 -2
  131. package/dist/cli/chunks/{chunk-DAYMT7TH.js → chunk-QXY3IRBW.js} +3 -3
  132. package/dist/cli/chunks/{chunk-QIAX3JJB.js → chunk-RCXMUEZN.js} +2 -2
  133. package/dist/cli/chunks/{chunk-RB2SL5GD.js → chunk-RMJ7PJOS.js} +2 -2
  134. package/dist/cli/chunks/{chunk-FRBCX46J.js → chunk-RUJLVJDE.js} +2 -2
  135. package/dist/cli/chunks/{chunk-S5D3HCGN.js → chunk-RUSLEOMC.js} +2 -2
  136. package/dist/cli/chunks/chunk-SAPIRK2G.js +3 -0
  137. package/dist/cli/chunks/{chunk-A4OPQJ4A.js → chunk-SDWMLT7B.js} +5 -5
  138. package/dist/cli/chunks/{chunk-RJMBHZYL.js → chunk-SEZLYRCS.js} +1 -1
  139. package/dist/cli/chunks/{chunk-AHVN3UQZ.js → chunk-TDLKXLJC.js} +2 -2
  140. package/dist/cli/chunks/{chunk-EWUFVWRT.js → chunk-U4TV75AC.js} +2 -2
  141. package/dist/cli/chunks/{chunk-X5S5UEM6.js → chunk-U6OVPMQX.js} +2 -2
  142. package/dist/cli/chunks/{chunk-5B5D5KCV.js → chunk-UE22ODHN.js} +1 -1
  143. package/dist/cli/chunks/{chunk-I6E4X3L3.js → chunk-UXZEVIFX.js} +1 -1
  144. package/dist/cli/chunks/{chunk-DF4Y3HPO.js → chunk-V7GNUVYI.js} +1 -1
  145. package/dist/cli/chunks/{chunk-OOK6GPJR.js → chunk-VCKDVOPD.js} +2 -2
  146. package/dist/cli/chunks/{chunk-G3ZUB3HD.js → chunk-VH3EB6ZG.js} +2 -2
  147. package/dist/cli/chunks/{chunk-PB2WSCBW.js → chunk-VLOIEVER.js} +3 -3
  148. package/dist/cli/chunks/{chunk-7INP6HZH.js → chunk-VML4SG3X.js} +3 -3
  149. package/dist/cli/chunks/{chunk-K2VUYRMG.js → chunk-VRJPH3LG.js} +2 -2
  150. package/dist/cli/chunks/{chunk-RI4JPBZD.js → chunk-VYDNLQJN.js} +2 -2
  151. package/dist/cli/chunks/{chunk-35A22AUL.js → chunk-W3ZGNNDV.js} +1 -1
  152. package/dist/cli/chunks/{chunk-R47LNH5W.js → chunk-WC47GICZ.js} +2 -2
  153. package/dist/cli/chunks/{chunk-Z56QTRRB.js → chunk-WLIYWBQR.js} +2 -2
  154. package/dist/cli/chunks/{chunk-ZURYZEHX.js → chunk-WN55MNZ2.js} +2 -2
  155. package/dist/cli/chunks/chunk-WOZIXXY5.js +7 -0
  156. package/dist/cli/chunks/{chunk-NBMQOP2R.js → chunk-WR64BKUE.js} +1 -1
  157. package/dist/cli/chunks/{chunk-T3BMCEQR.js → chunk-WT3JC4A6.js} +2 -2
  158. package/dist/cli/chunks/{chunk-WYO5VN2L.js → chunk-X52TMBHU.js} +1 -1
  159. package/dist/cli/chunks/{chunk-6EHVPFHW.js → chunk-XIE7OHML.js} +1 -1
  160. package/dist/cli/chunks/{chunk-LOLAEDZD.js → chunk-XNEEYXR2.js} +2 -2
  161. package/dist/cli/chunks/{chunk-EY5IUF7U.js → chunk-XNHB6TLC.js} +2 -2
  162. package/dist/cli/chunks/{chunk-GJVRQBLI.js → chunk-XQRE2HWM.js} +2 -2
  163. package/dist/cli/chunks/{chunk-33IUCP34.js → chunk-Y2E3IJ53.js} +2 -2
  164. package/dist/cli/chunks/{chunk-6HO3XRXE.js → chunk-Y2WMPEUP.js} +2 -2
  165. package/dist/cli/chunks/{chunk-LGA6J4I4.js → chunk-Y7GPLOXB.js} +2 -2
  166. package/dist/cli/chunks/{chunk-76PRW2KY.js → chunk-YINFES3E.js} +2 -2
  167. package/dist/cli/chunks/{chunk-LJRZAALA.js → chunk-ZLBBX24Q.js} +133 -133
  168. package/dist/cli/chunks/{chunk-ASKPTGUU.js → chunk-ZT3GUYM5.js} +2 -2
  169. package/dist/cli/chunks/{chunk-XHCCH7UC.js → chunk-ZTC5FBL6.js} +3 -3
  170. package/dist/cli/chunks/ci-KP4GZKJ7.js +81 -0
  171. package/dist/cli/chunks/ci-config-XDDZOOEI.js +2 -0
  172. package/dist/cli/chunks/{ci-output-BMJABAEX.js → ci-output-7ZUQI4U6.js} +2 -2
  173. package/dist/cli/chunks/{circuit-breaker-GYD5CMJQ.js → circuit-breaker-ALXKCFAL.js} +2 -2
  174. package/dist/cli/chunks/{claude-flow-setup-MMOYVBVD.js → claude-flow-setup-RL7K2NI2.js} +2 -2
  175. package/dist/cli/chunks/client-C3KHVRM6.js +2 -0
  176. package/dist/cli/chunks/{cline-installer-B2SOZ44R.js → cline-installer-2Z2QQKC3.js} +2 -2
  177. package/dist/cli/chunks/{code-V3FIRAXD.js → code-QSZTDINQ.js} +4 -4
  178. package/dist/cli/chunks/{code-index-extractor-CV6A756Z.js → code-index-extractor-5CGR5D3Y.js} +2 -2
  179. package/dist/cli/chunks/{codex-installer-EUC6J47Y.js → codex-installer-7JLSEDE5.js} +2 -2
  180. package/dist/cli/chunks/{completions-DQQIBAHR.js → completions-U4NBSXEB.js} +2 -2
  181. package/dist/cli/chunks/{complexity-analyzer-HPXMXP5I.js → complexity-analyzer-WYZD2YSY.js} +2 -2
  182. package/dist/cli/chunks/{continuedev-installer-RCIYXH6V.js → continuedev-installer-UPXINJFT.js} +2 -2
  183. package/dist/cli/chunks/{copilot-installer-VUH32SHF.js → copilot-installer-WIVYQRIF.js} +2 -2
  184. package/dist/cli/chunks/core-handlers-KSQM6Q6S.js +2 -0
  185. package/dist/cli/chunks/{cost-tracker-YLCKLOAL.js → cost-tracker-RIN4JDDM.js} +2 -2
  186. package/dist/cli/chunks/coverage-SPFVHRRU.js +43 -0
  187. package/dist/cli/chunks/coverage-target-GSRBNHXE.js +2 -0
  188. package/dist/cli/chunks/cross-domain-router-CTGNOVCF.js +2 -0
  189. package/dist/cli/chunks/{cursor-installer-B42FN62K.js → cursor-installer-POM7NGCC.js} +2 -2
  190. package/dist/cli/chunks/{daemon-DECQRQII.js → daemon-HFGKQ6LB.js} +3 -3
  191. package/dist/cli/chunks/{daemon-IPTOSCHM.js → daemon-M5TD5Y6T.js} +4 -4
  192. package/dist/cli/chunks/{dag-attention-scheduler-RY7CDYSC.js → dag-attention-scheduler-HJXM7Q5P.js} +2 -2
  193. package/dist/cli/chunks/{detect-NW53BMJN.js → detect-XKQGLZYN.js} +2 -2
  194. package/dist/cli/chunks/{dist-node-LE6KHXAB.js → dist-node-SSKB53QL.js} +2 -2
  195. package/dist/cli/chunks/{domain-handler-JGXFT4LW.js → domain-handler-6BNDHATU.js} +2 -2
  196. package/dist/cli/chunks/{domain-plugins-GY3RYKKK.js → domain-plugins-DOX54YE3.js} +2 -2
  197. package/dist/cli/chunks/{domain-transfer-CGBRXNTC.js → domain-transfer-FW4ZX3Z7.js} +2 -2
  198. package/dist/cli/chunks/dream-MIK2E4UL.js +2 -0
  199. package/dist/cli/chunks/{embed-and-insert-pattern-65H4XHWR.js → embed-and-insert-pattern-QST77T2B.js} +2 -2
  200. package/dist/cli/chunks/{eval-YPYIZQUR.js → eval-K7E4XXBS.js} +2 -2
  201. package/dist/cli/chunks/{experience-capture-middleware-4JXVF5PL.js → experience-capture-middleware-X66IYSRV.js} +3 -3
  202. package/dist/cli/chunks/{fast-paths-HYQTAF2S.js → fast-paths-5JXXTYAG.js} +2 -2
  203. package/dist/cli/chunks/{feature-flags-HNSAFFX2.js → feature-flags-2CR3CO23.js} +2 -2
  204. package/dist/cli/chunks/{feature-flags-YACUH6OW.js → feature-flags-RB72LHOJ.js} +2 -2
  205. package/dist/cli/chunks/{file-discovery-R73BYEXB.js → file-discovery-3NHRUQQB.js} +2 -2
  206. package/dist/cli/chunks/{fleet-6M3BP4OO.js → fleet-SDU7QEOA.js} +3 -3
  207. package/dist/cli/chunks/{gnn-wrapper-QLD7KHXV.js → gnn-wrapper-AWCFODUV.js} +2 -2
  208. package/dist/cli/chunks/{heartbeat-handler-EZP333X4.js → heartbeat-handler-A4PJ3NFP.js} +4 -4
  209. package/dist/cli/chunks/heartbeat-scheduler-OCKRACUW.js +2 -0
  210. package/dist/cli/chunks/hnsw-adapter-X67XG73C.js +2 -0
  211. package/dist/cli/chunks/hnsw-index-I7KCQBQR.js +2 -0
  212. package/dist/cli/chunks/{hnsw-legacy-bridge-47CUCSAU.js → hnsw-legacy-bridge-KRS7SSFM.js} +2 -2
  213. package/dist/cli/chunks/{hnswlib-node-SVNYDJZH.js → hnswlib-node-OGGCPKPO.js} +2 -2
  214. package/dist/cli/chunks/{hooks-6V5LMWP6.js → hooks-XNRNMUBW.js} +10 -10
  215. package/dist/cli/chunks/hybrid-backend-FOUHTKAK.js +2 -0
  216. package/dist/cli/chunks/{hypergraph-engine-L2FOBIFF.js → hypergraph-engine-X35LTXYT.js} +2 -2
  217. package/dist/cli/chunks/{hypergraph-handler-DU6Z57EE.js → hypergraph-handler-M6THKAG6.js} +3 -3
  218. package/dist/cli/chunks/impact-analyzer-GXYVX46O.js +2 -0
  219. package/dist/cli/chunks/{init-handler-HETPWU67.js → init-handler-2AXMXHYF.js} +6 -6
  220. package/dist/cli/chunks/init-wizard-C2MRX2QG.js +2 -0
  221. package/dist/cli/chunks/kernel-Q2IUDIDC.js +2 -0
  222. package/dist/cli/chunks/{kilocode-installer-NHKYGJ7Q.js → kilocode-installer-TEPR2ZJD.js} +2 -2
  223. package/dist/cli/chunks/{kiro-installer-24UK6GGR.js → kiro-installer-RUKHGDEE.js} +2 -2
  224. package/dist/cli/chunks/knowledge-graph-E2Z6K5EE.js +2 -0
  225. package/dist/cli/chunks/{learning-QLVRZNHT.js → learning-BEA26RNA.js} +3 -3
  226. package/dist/cli/chunks/{llm-router-XRMI2VMG.js → llm-router-7GECMDCP.js} +4 -4
  227. package/dist/cli/chunks/llm-router-service-YATYFEDD.js +2 -0
  228. package/dist/cli/chunks/{load-W5UWL5C7.js → load-NTJ4Y4ZR.js} +2 -2
  229. package/dist/cli/chunks/load-test-LV77JXWA.js +2 -0
  230. package/dist/cli/chunks/{mcp-N7ALQ4BL.js → mcp-4335GTTG.js} +2 -2
  231. package/dist/cli/chunks/{memory-WV52DLSA.js → memory-HYC4M4XS.js} +5 -5
  232. package/dist/cli/chunks/memory-backend-XME3X3QX.js +2 -0
  233. package/dist/cli/chunks/memory-handlers-VG47X5DX.js +2 -0
  234. package/dist/cli/chunks/{multi-model-executor-3FVTZCSO.js → multi-model-executor-T7FYKM6T.js} +2 -2
  235. package/dist/cli/chunks/{opencode-installer-NTPWGHUW.js → opencode-installer-3USXVT5M.js} +2 -2
  236. package/dist/cli/chunks/{orchestrator-ORGJ6VAA.js → orchestrator-VHUXUYIM.js} +5 -5
  237. package/dist/cli/chunks/pattern-null-store-TAXMLENP.js +2 -0
  238. package/dist/cli/chunks/{pattern-usage-recorder-WWXHUH5U.js → pattern-usage-recorder-CMZLPX2K.js} +2 -2
  239. package/dist/cli/chunks/{pipeline-ZOKZFXTH.js → pipeline-BTRZOVSL.js} +2 -2
  240. package/dist/cli/chunks/{platform-CDNL322F.js → platform-2MCRKC25.js} +2 -2
  241. package/dist/cli/chunks/{plugin-ZVLFNZZ4.js → plugin-2VAYWAO3.js} +2 -2
  242. package/dist/cli/chunks/{prime-radiant-advanced-wasm-FVJDU2JY.js → prime-radiant-advanced-wasm-TXFEMBP6.js} +2 -2
  243. package/dist/cli/chunks/{project-root-UCHQH3QL.js → project-root-CFFPBGPX.js} +2 -2
  244. package/dist/cli/chunks/protocol-executor-ML76QAVQ.js +2 -0
  245. package/dist/cli/chunks/{protocol-handler-4YBN5R23.js → protocol-handler-DZ26OYVZ.js} +2 -2
  246. package/dist/cli/chunks/{prove-BHDHY664.js → prove-QWONEJWX.js} +2 -2
  247. package/dist/cli/chunks/qe-reasoning-bank-LUZH6RYV.js +2 -0
  248. package/dist/cli/chunks/quality-WFH54FY7.js +8 -0
  249. package/dist/cli/chunks/{quality-gate-WANE7TCN.js → quality-gate-ONJB7XU7.js} +3 -3
  250. package/dist/cli/chunks/queen-coordinator-EWXNIXB6.js +2 -0
  251. package/dist/cli/chunks/{real-embeddings-56MNGJGJ.js → real-embeddings-GZV4VKK4.js} +2 -2
  252. package/dist/cli/chunks/{ref-validation-S7UWXQIP.js → ref-validation-HW5Y55ZC.js} +2 -2
  253. package/dist/cli/chunks/{roocode-installer-TEYOQYL6.js → roocode-installer-5OABDNZT.js} +2 -2
  254. package/dist/cli/chunks/router-MXOBVEBF.js +2 -0
  255. package/dist/cli/chunks/routing-feedback-T6CCRUEK.js +2 -0
  256. package/dist/cli/chunks/{routing-handler-KDTLMRWD.js → routing-handler-CVHVOQTC.js} +2 -2
  257. package/dist/cli/chunks/{ruvector-commands-AOUDXCYE.js → ruvector-commands-KKDKFGIQ.js} +2 -2
  258. package/dist/cli/chunks/rvf-dual-writer-WHXVT3V3.js +2 -0
  259. package/dist/cli/chunks/rvf-migration-adapter-JFPWIRCG.js +2 -0
  260. package/dist/cli/chunks/{rvf-migration-coordinator-V74MVBHS.js → rvf-migration-coordinator-D4KUBNRZ.js} +2 -2
  261. package/dist/cli/chunks/rvf-native-adapter-KOXR7TJL.js +2 -0
  262. package/dist/cli/chunks/{rvf-store-integrity-QI47Y354.js → rvf-store-integrity-UGUXKIFX.js} +2 -2
  263. package/dist/cli/chunks/safe-db-CI6IPSIN.js +2 -0
  264. package/dist/cli/chunks/schedule-X4HW6TVJ.js +2 -0
  265. package/dist/cli/chunks/scheduler-KCNJ2ON3.js +2 -0
  266. package/dist/cli/chunks/{security-SN6MWOJT.js → security-7723AZZ4.js} +3 -3
  267. package/dist/cli/chunks/{shared-rvf-adapter-2LB56LP4.js → shared-rvf-adapter-KEQ5CLNI.js} +2 -2
  268. package/dist/cli/chunks/{shared-rvf-dual-writer-WU7PFKQM.js → shared-rvf-dual-writer-ZSHYG5IA.js} +2 -2
  269. package/dist/cli/chunks/sqlite-persistence-PGHU6VUR.js +2 -0
  270. package/dist/cli/chunks/{standalone-memory-F6FSRFWC.js → standalone-memory-MHZEEYMK.js} +2 -2
  271. package/dist/cli/chunks/{status-handler-DHD5MS4G.js → status-handler-JKXPJ22K.js} +2 -2
  272. package/dist/cli/chunks/{structural-health-P6HPSQMR.js → structural-health-J4RKCYWF.js} +2 -2
  273. package/dist/cli/chunks/{sync-SNAXAVCN.js → sync-EFWXMA2H.js} +2 -2
  274. package/dist/cli/chunks/{sync-LISJGDSE.js → sync-PDPORHVN.js} +2 -2
  275. package/dist/cli/chunks/{task-handler-ZT44NT5Z.js → task-handler-VERADM44.js} +2 -2
  276. package/dist/cli/chunks/{task-handlers-R6DQ5324.js → task-handlers-4RUCWUR2.js} +3 -3
  277. package/dist/cli/chunks/{test-MUFHR4JQ.js → test-DMBJFQNL.js} +4 -4
  278. package/dist/cli/chunks/{test-scheduling-TAUSLZJP.js → test-scheduling-LUPTVGCD.js} +3 -3
  279. package/dist/cli/chunks/{token-bootstrap-UGRH7OPU.js → token-bootstrap-S346YBVO.js} +2 -2
  280. package/dist/cli/chunks/{token-usage-IX65ECBR.js → token-usage-VOA34IKM.js} +2 -2
  281. package/dist/cli/chunks/{transformers-QKPSVW2W.js → transformers-GU4TYAN5.js} +2 -2
  282. package/dist/cli/chunks/{tree-sitter-wasm-parser-Z7PPA2JO.js → tree-sitter-wasm-parser-MZPXAH7C.js} +2 -2
  283. package/dist/cli/chunks/{types-ULNNGGGH.js → types-K4FLXR2K.js} +2 -2
  284. package/dist/cli/chunks/unified-memory-6CK3TUNQ.js +2 -0
  285. package/dist/cli/chunks/unified-memory-hnsw-A7BWBGYN.js +2 -0
  286. package/dist/cli/chunks/unified-persistence-GEPMDBQZ.js +2 -0
  287. package/dist/cli/chunks/{upgrade-ECI3YUYA.js → upgrade-M3ATDRMK.js} +2 -2
  288. package/dist/cli/chunks/{validate-3JKRUW2S.js → validate-AAP773B3.js} +2 -2
  289. package/dist/cli/chunks/{validate-swarm-LZWANCIE.js → validate-swarm-7RGAZX5F.js} +2 -2
  290. package/dist/cli/chunks/visual-security-L4J7LQWT.js +2 -0
  291. package/dist/cli/chunks/{web-tree-sitter-N5V4A6XG.js → web-tree-sitter-GQMRHGGI.js} +2 -2
  292. package/dist/cli/chunks/{windsurf-installer-5TBM5B3C.js → windsurf-installer-HG6HF2GF.js} +2 -2
  293. package/dist/cli/chunks/witness-chain-CDUMX623.js +2 -0
  294. package/dist/cli/chunks/{witness-chain-MFP3HBWQ.js → witness-chain-WKU3ZIBQ.js} +2 -2
  295. package/dist/cli/chunks/{witness-chain-repair-5QWRFVUK.js → witness-chain-repair-WNYH6O4L.js} +2 -2
  296. package/dist/cli/chunks/{witness-chain-verifier-SRAT7LVY.js → witness-chain-verifier-Q2KW3QEQ.js} +2 -2
  297. package/dist/cli/chunks/{witness-key-manager-FYZXQTLJ.js → witness-key-manager-NQ5DAAC4.js} +2 -2
  298. package/dist/cli/chunks/{workflow-M7TUYYXY.js → workflow-CX6SHFBW.js} +4 -4
  299. package/dist/cli/chunks/workflow-orchestrator-USJDWVDR.js +2 -0
  300. package/dist/cli/chunks/{wrappers-COU73OQ6.js → wrappers-CZDI6Z3X.js} +2 -2
  301. package/dist/cli/commands/ci.js +14 -6
  302. package/dist/cli/commands/code.js +1 -0
  303. package/dist/cli/commands/coverage.d.ts +28 -0
  304. package/dist/cli/commands/coverage.js +258 -143
  305. package/dist/cli/commands/quality.d.ts +12 -1
  306. package/dist/cli/commands/quality.js +51 -3
  307. package/dist/cli/utils/ci-output.d.ts +14 -4
  308. package/dist/cli/utils/ci-output.js +21 -4
  309. package/dist/cli/utils/coverage-data.d.ts +7 -0
  310. package/dist/cli/utils/coverage-data.js +21 -27
  311. package/dist/contracts/verdicts.d.ts +14 -0
  312. package/dist/contracts/verdicts.js +44 -3
  313. package/dist/coordination/handlers/coverage-handlers.js +121 -120
  314. package/dist/coordination/handlers/coverage-runner.d.ts +121 -0
  315. package/dist/coordination/handlers/coverage-runner.js +367 -0
  316. package/dist/coordination/handlers/coverage-target.d.ts +144 -0
  317. package/dist/coordination/handlers/coverage-target.js +311 -0
  318. package/dist/coordination/handlers/handler-utils.d.ts +9 -0
  319. package/dist/coordination/handlers/handler-utils.js +44 -1
  320. package/dist/coordination/handlers/quality-handlers.js +101 -15
  321. package/dist/coordination/result-saver.js +17 -3
  322. package/dist/coordination/task-executor.d.ts +5 -0
  323. package/dist/coordination/task-executor.js +7 -0
  324. package/dist/domains/code-intelligence/coordinator.d.ts +2 -1
  325. package/dist/domains/code-intelligence/coordinator.js +10 -32
  326. package/dist/domains/code-intelligence/interfaces.d.ts +5 -0
  327. package/dist/domains/code-intelligence/plugin.js +1 -0
  328. package/dist/domains/code-intelligence/project-root-resolver.d.ts +50 -0
  329. package/dist/domains/code-intelligence/project-root-resolver.js +121 -0
  330. package/dist/domains/coverage-analysis/coordinator.js +4 -1
  331. package/dist/domains/coverage-analysis/interfaces.d.ts +15 -0
  332. package/dist/domains/coverage-analysis/plugin.js +7 -1
  333. package/dist/domains/coverage-analysis/services/coverage-analyzer.d.ts +7 -0
  334. package/dist/domains/coverage-analysis/services/coverage-analyzer.js +29 -9
  335. package/dist/domains/quality-assessment/coordinator-claim-verifier.js +2 -1
  336. package/dist/domains/quality-assessment/coordinator.js +8 -8
  337. package/dist/domains/quality-assessment/coverage-report-event.d.ts +25 -0
  338. package/dist/domains/quality-assessment/coverage-report-event.js +36 -0
  339. package/dist/domains/quality-assessment/evidence-sufficiency.d.ts +57 -0
  340. package/dist/domains/quality-assessment/evidence-sufficiency.js +97 -0
  341. package/dist/domains/quality-assessment/index.d.ts +1 -1
  342. package/dist/domains/quality-assessment/index.js +1 -1
  343. package/dist/domains/quality-assessment/plugin.js +8 -8
  344. package/dist/domains/quality-assessment/quality-evidence.d.ts +50 -2
  345. package/dist/domains/quality-assessment/quality-evidence.js +90 -8
  346. package/dist/domains/quality-assessment/services/quality-analyzer.js +13 -9
  347. package/dist/mcp/bundle.js +456 -451
  348. package/dist/mcp/handlers/domain-handler-configs.d.ts +18 -1
  349. package/dist/mcp/handlers/domain-handler-configs.js +42 -4
  350. package/dist/mcp/handlers/handler-factory.js +3 -0
  351. package/dist/mcp/handlers/wrapped-domain-handlers.js +7 -1
  352. package/dist/mcp/protocol-server.js +3 -2
  353. package/dist/mcp/tools/coverage-analysis/index.js +1 -0
  354. package/dist/mcp/types.d.ts +6 -0
  355. package/dist/shared/events/domain-events.d.ts +2 -0
  356. package/package.json +1 -1
  357. package/dist/cli/chunks/adapter-T54G3TBK.js +0 -2
  358. package/dist/cli/chunks/aqe-learning-engine-HLCJJ3JM.js +0 -2
  359. package/dist/cli/chunks/base-VLD755UU.js +0 -2
  360. package/dist/cli/chunks/browser-workflow-6M6VLWRF.js +0 -2
  361. package/dist/cli/chunks/chunk-5XXLWJU7.js +0 -2
  362. package/dist/cli/chunks/chunk-HEDLZWPM.js +0 -96
  363. package/dist/cli/chunks/chunk-XKIFNKHV.js +0 -2
  364. package/dist/cli/chunks/chunk-ZF5JTQEE.js +0 -4
  365. package/dist/cli/chunks/ci-NGMGB43T.js +0 -82
  366. package/dist/cli/chunks/client-FUHNNK5O.js +0 -2
  367. package/dist/cli/chunks/core-handlers-F7TLX4LM.js +0 -2
  368. package/dist/cli/chunks/coverage-IVKDV236.js +0 -27
  369. package/dist/cli/chunks/cross-domain-router-EGWPY67O.js +0 -2
  370. package/dist/cli/chunks/dream-V4QN6OF5.js +0 -2
  371. package/dist/cli/chunks/heartbeat-scheduler-3N3L6CRM.js +0 -2
  372. package/dist/cli/chunks/hnsw-adapter-2BXJYDXI.js +0 -2
  373. package/dist/cli/chunks/hnsw-index-2DLI5OVO.js +0 -2
  374. package/dist/cli/chunks/hybrid-backend-OW4J65YH.js +0 -2
  375. package/dist/cli/chunks/impact-analyzer-ZH5I2RG6.js +0 -2
  376. package/dist/cli/chunks/init-wizard-NIKM3ZOK.js +0 -2
  377. package/dist/cli/chunks/kernel-2EOSVM6X.js +0 -2
  378. package/dist/cli/chunks/knowledge-graph-D3BPWNNO.js +0 -2
  379. package/dist/cli/chunks/llm-router-service-TJPPZFUN.js +0 -2
  380. package/dist/cli/chunks/load-test-RFT7IDOL.js +0 -2
  381. package/dist/cli/chunks/memory-backend-O2O4CFKZ.js +0 -2
  382. package/dist/cli/chunks/memory-handlers-DAEGUDBD.js +0 -2
  383. package/dist/cli/chunks/pattern-null-store-TUBNXS34.js +0 -2
  384. package/dist/cli/chunks/protocol-executor-6FQTTO3Y.js +0 -2
  385. package/dist/cli/chunks/qe-reasoning-bank-TKPND56C.js +0 -2
  386. package/dist/cli/chunks/quality-46AK277P.js +0 -7
  387. package/dist/cli/chunks/queen-coordinator-DWMXLPJG.js +0 -2
  388. package/dist/cli/chunks/router-QIMUYRCC.js +0 -2
  389. package/dist/cli/chunks/routing-feedback-4OH5ZNF4.js +0 -2
  390. package/dist/cli/chunks/rvf-dual-writer-S6JBZL54.js +0 -2
  391. package/dist/cli/chunks/rvf-migration-adapter-TSGMLMYR.js +0 -2
  392. package/dist/cli/chunks/rvf-native-adapter-Z7QOW47S.js +0 -2
  393. package/dist/cli/chunks/safe-db-JLOVBJNC.js +0 -2
  394. package/dist/cli/chunks/schedule-IM6XOBGR.js +0 -2
  395. package/dist/cli/chunks/scheduler-XL2SVVK5.js +0 -2
  396. package/dist/cli/chunks/sqlite-persistence-LWMIIC4U.js +0 -2
  397. package/dist/cli/chunks/unified-memory-F5IJY7W7.js +0 -2
  398. package/dist/cli/chunks/unified-memory-hnsw-C3WAMAQL.js +0 -2
  399. package/dist/cli/chunks/unified-persistence-EWXXOTCB.js +0 -2
  400. package/dist/cli/chunks/visual-security-CKLTAIAB.js +0 -2
  401. package/dist/cli/chunks/witness-chain-Z6LWFEZS.js +0 -2
  402. package/dist/cli/chunks/workflow-orchestrator-OFTAR2NA.js +0 -2
@@ -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[];
@@ -80,6 +80,7 @@ export class CodeIntelligencePlugin extends BaseDomainPlugin {
80
80
  return this.coordinator.index({
81
81
  paths,
82
82
  languages,
83
+ target: typeof payload.target === 'string' ? payload.target : undefined,
83
84
  });
84
85
  }],
85
86
  ['search', async (payload) => {
@@ -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
@@ -0,0 +1,121 @@
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 { existsSync, statSync } from 'node:fs';
25
+ import * as path from 'node:path';
26
+ /** Files or directories whose presence marks a project root. */
27
+ export const PROJECT_ROOT_MARKERS = Object.freeze([
28
+ 'package.json',
29
+ 'Cargo.toml',
30
+ 'go.mod',
31
+ 'pyproject.toml',
32
+ '.git',
33
+ ]);
34
+ function defaultIsDirectory(p) {
35
+ try {
36
+ return statSync(p).isDirectory();
37
+ }
38
+ catch {
39
+ return false;
40
+ }
41
+ }
42
+ /** True when `child` is `parent` or lies inside it. */
43
+ function isWithin(p, child, parent) {
44
+ const rel = p.relative(parent, child);
45
+ return rel === '' || (!rel.startsWith('..') && !p.isAbsolute(rel));
46
+ }
47
+ /**
48
+ * Deepest directory containing every input directory, or null when the inputs
49
+ * share no ancestor (for example different Windows drives).
50
+ */
51
+ function commonAncestor(p, dirs) {
52
+ let common = dirs[0];
53
+ for (const dir of dirs.slice(1)) {
54
+ while (!isWithin(p, dir, common)) {
55
+ const parent = p.dirname(common);
56
+ if (parent === common)
57
+ return null;
58
+ common = parent;
59
+ }
60
+ }
61
+ return common;
62
+ }
63
+ /** Walk from `startDir` up to the filesystem root; return the nearest marker directory. */
64
+ function findNearestMarkerDir(p, startDir, exists) {
65
+ let current = startDir;
66
+ for (;;) {
67
+ for (const marker of PROJECT_ROOT_MARKERS) {
68
+ try {
69
+ if (exists(p.join(current, marker)))
70
+ return current;
71
+ }
72
+ catch {
73
+ // Unreadable entry: keep checking the remaining markers.
74
+ }
75
+ }
76
+ const parent = p.dirname(current);
77
+ if (parent === current)
78
+ return null;
79
+ current = parent;
80
+ }
81
+ }
82
+ /**
83
+ * Resolve the project root for a set of indexed paths.
84
+ *
85
+ * @param paths - Files and/or directories, absolute or relative to `options.cwd`
86
+ * @returns Absolute project root, or null when there is nothing to resolve or
87
+ * the result would be a filesystem/drive root
88
+ */
89
+ export function resolveProjectRootFromPaths(paths, options = {}) {
90
+ const usable = paths.filter((p) => typeof p === 'string' && p.length > 0);
91
+ const target = typeof options.target === 'string' && options.target.length > 0 ? options.target : undefined;
92
+ if (usable.length === 0 && !target)
93
+ return null;
94
+ const p = options.pathImpl ?? path;
95
+ const cwd = options.cwd ?? process.cwd();
96
+ const exists = options.exists ?? existsSync;
97
+ const isDirectory = options.isDirectory ?? defaultIsDirectory;
98
+ // A directory contributes itself; a file contributes its parent directory.
99
+ const dirOf = (input) => {
100
+ const abs = p.resolve(cwd, input);
101
+ return isDirectory(abs) ? abs : p.dirname(abs);
102
+ };
103
+ let start;
104
+ if (target) {
105
+ // The caller's own target wins over the expanded file list: a `.` at a
106
+ // monorepo root whose source all lives in packages/a is still the root.
107
+ start = dirOf(target);
108
+ }
109
+ else {
110
+ const dirs = usable.map(dirOf);
111
+ // Inputs on different roots (Windows drives): use the first path's directory.
112
+ start = commonAncestor(p, dirs) ?? dirs[0];
113
+ }
114
+ const root = findNearestMarkerDir(p, start, exists) ?? start;
115
+ // Never measure a whole filesystem / drive root (review N1).
116
+ return isFilesystemRoot(p, root) ? null : root;
117
+ }
118
+ function isFilesystemRoot(p, dir) {
119
+ return p.parse(dir).root === dir || p.dirname(dir) === dir;
120
+ }
121
+ //# sourceMappingURL=project-root-resolver.js.map
@@ -361,7 +361,9 @@ export class CoverageAnalysisCoordinator extends BaseDomainCoordinator {
361
361
  return err(new Error('Coverage analysis paused: topology is in critical state'));
362
362
  }
363
363
  const result = await this.coverageAnalyzer.analyze(request);
364
- if (result.success) {
364
+ // #1008: subscribers (quality-assessment) store the report as
365
+ // `coverage:latest`. A static estimate must never reach them.
366
+ if (result.success && result.value.measured !== false) {
365
367
  // Publish coverage report event
366
368
  await this.publishCoverageReport(result.value);
367
369
  }
@@ -613,6 +615,7 @@ export class CoverageAnalysisCoordinator extends BaseDomainCoordinator {
613
615
  function: report.summary.function,
614
616
  statement: report.summary.statement,
615
617
  files: report.summary.files,
618
+ measured: true,
616
619
  };
617
620
  const event = createEvent(CoverageAnalysisEvents.CoverageReportCreated, 'coverage-analysis', payload);
618
621
  await this.eventBus.publish(event);
@@ -19,10 +19,20 @@ export interface AnalyzeCoverageRequest {
19
19
  coverageData: CoverageData;
20
20
  threshold?: number;
21
21
  includeFileDetails?: boolean;
22
+ /**
23
+ * Whether `coverageData` came from instrumentation (#1008). `false` marks a
24
+ * static estimate: it is analyzed and returned, but never persisted as
25
+ * `coverage:latest`, history, per-file coverage or quality evidence.
26
+ * Takes precedence over `coverageData.instrumented`. Fail-closed: when both
27
+ * are absent the data is treated as UNMEASURED and nothing is persisted.
28
+ */
29
+ measured?: boolean;
22
30
  }
23
31
  export interface CoverageData {
24
32
  files: FileCoverage[];
25
33
  summary: CoverageSummary;
34
+ /** Set by producers that know their provenance; `false` = static estimate (#1008). */
35
+ instrumented?: boolean;
26
36
  }
27
37
  export interface FileCoverage {
28
38
  path: string;
@@ -57,6 +67,11 @@ export interface CoverageReport {
57
67
  meetsThreshold: boolean;
58
68
  delta?: CoverageDelta;
59
69
  recommendations: string[];
70
+ /**
71
+ * False when the report was computed from a static estimate (#1008). Such a
72
+ * report was not persisted and must not be published or stored as evidence.
73
+ */
74
+ measured?: boolean;
60
75
  }
61
76
  export interface CoverageDelta {
62
77
  line: number;
@@ -60,10 +60,16 @@ export class CoverageAnalysisPlugin extends BaseDomainPlugin {
60
60
  this._activeAnalyses++;
61
61
  this.updateAgentMetrics();
62
62
  try {
63
+ // #1008: coverage numbers supplied in a task payload (e.g. MCP
64
+ // `task_submit`) are caller claims, not an instrumented run. Never
65
+ // trust a caller-supplied `measured`/`instrumented` flag: analyze
66
+ // and return the data, but do not persist it as coverage evidence.
67
+ const { instrumented: _claimed, ...callerData } = coverageData;
63
68
  return await this.coordinator.analyze({
64
- coverageData,
69
+ coverageData: callerData,
65
70
  threshold: payload.threshold,
66
71
  includeFileDetails: payload.includeFileDetails,
72
+ measured: false,
67
73
  });
68
74
  }
69
75
  finally {
@@ -8,6 +8,13 @@ import { Result } from '../../../shared/types';
8
8
  import { MemoryBackend } from '../../../kernel/interfaces';
9
9
  import { AnalyzeCoverageRequest, CoverageReport, CoverageData, CoverageSummary, CoverageGaps, CoverageGap } from '../interfaces';
10
10
  import type { HybridRouter } from '../../../shared/llm';
11
+ /**
12
+ * Whether an analyze request carries instrumented (measured) coverage (#1008).
13
+ * Fail-closed: an explicit `request.measured` wins; otherwise only data a
14
+ * producer marked `instrumented: true` is measured. Anything without
15
+ * provenance is analyzed and returned, but never persisted as evidence.
16
+ */
17
+ export declare function isMeasuredCoverage(request: AnalyzeCoverageRequest): boolean;
11
18
  export interface ICoverageAnalysisService {
12
19
  /** Analyze coverage from reports */
13
20
  analyze(request: AnalyzeCoverageRequest): Promise<Result<CoverageReport, Error>>;
@@ -10,6 +10,17 @@ import { toError } from '../../../shared/error-utils.js';
10
10
  import { safeJsonParse } from '../../../shared/safe-json.js';
11
11
  import { writeQualityEvidence } from '../../quality-assessment/quality-evidence.js';
12
12
  import { getClaudeModelForTier } from '../../../shared/llm/model-registry.js';
13
+ /**
14
+ * Whether an analyze request carries instrumented (measured) coverage (#1008).
15
+ * Fail-closed: an explicit `request.measured` wins; otherwise only data a
16
+ * producer marked `instrumented: true` is measured. Anything without
17
+ * provenance is analyzed and returned, but never persisted as evidence.
18
+ */
19
+ export function isMeasuredCoverage(request) {
20
+ if (typeof request.measured === 'boolean')
21
+ return request.measured;
22
+ return request.coverageData.instrumented === true;
23
+ }
13
24
  const DEFAULT_CONFIG = {
14
25
  defaultThreshold: 80,
15
26
  enableLLMAnalysis: true, // On by default - opt-out
@@ -66,22 +77,30 @@ export class CoverageAnalyzerService {
66
77
  // Check if coverage meets threshold
67
78
  const overallCoverage = this.calculateOverallCoverage(summary);
68
79
  const meetsThreshold = overallCoverage >= threshold;
80
+ // #1008: only instrumented coverage is evidence. A static estimate is
81
+ // analyzed and returned to the caller, but never compared against or
82
+ // written over a measurement, and never stored where a quality gate,
83
+ // quality_assess or another reader would take it as measured.
84
+ const measured = isMeasuredCoverage(request);
69
85
  // Calculate delta from previous coverage (if stored)
70
- const delta = await this.calculateDelta(summary);
86
+ const delta = measured ? await this.calculateDelta(summary) : undefined;
71
87
  // Generate recommendations based on analysis
72
88
  const recommendations = this.generateRecommendations(coverageData, summary, threshold);
73
- // Store current coverage for future delta calculations
74
- await this.storeCoverageSnapshot(summary);
75
- // Store coverage vectors for similarity search + KV for quality-analyzer
76
- if (request.includeFileDetails) {
77
- await this.indexFileCoverageVectors(coverageData.files);
78
- await this.storeFileCoverageKV(coverageData.files);
89
+ if (measured) {
90
+ // Store current coverage for future delta calculations
91
+ await this.storeCoverageSnapshot(summary);
92
+ // Store coverage vectors for similarity search + KV for quality-analyzer
93
+ if (request.includeFileDetails) {
94
+ await this.indexFileCoverageVectors(coverageData.files);
95
+ await this.storeFileCoverageKV(coverageData.files);
96
+ }
79
97
  }
80
98
  return ok({
81
99
  summary,
82
100
  meetsThreshold,
83
101
  delta,
84
102
  recommendations,
103
+ measured,
85
104
  });
86
105
  }
87
106
  catch (error) {
@@ -440,8 +459,9 @@ Provide thoughtful, specific analysis based on the coverage data. Do not include
440
459
  if (existing) {
441
460
  await this.memory.set('coverage:previous', existing, { persist: true });
442
461
  }
443
- // Store latest snapshot
444
- await this.memory.set('coverage:latest', summary, { persist: true });
462
+ // Store latest snapshot, stamped with its provenance (#1008). Only
463
+ // measured coverage reaches this method.
464
+ await this.memory.set('coverage:latest', { ...summary, measured: true }, { persist: true });
445
465
  await writeQualityEvidence(this.memory, { coverage: summary.line }, {
446
466
  measuredAt: new Date().toISOString(),
447
467
  source: 'coverage-analysis',
@@ -104,7 +104,8 @@ export function convertToQEReport(report, type) {
104
104
  },
105
105
  });
106
106
  }
107
- if (report.score.coverage < 80) {
107
+ // #996: -1 means coverage was not measured; it is not a "-1%" coverage claim.
108
+ if (report.score.coverage >= 0 && report.score.coverage < 80) {
108
109
  claims.push({
109
110
  id: `coverage-${Date.now()}`,
110
111
  type: 'coverage-claim',
@@ -33,6 +33,7 @@ import { DEFAULT_RATCHET_CONFIG, } from './coherence/types.js';
33
33
  import { getWitnessChain } from '../../audit/witness-chain.js';
34
34
  // Three-loop feature flag for instantAdapt protocol
35
35
  import { isSONAThreeLoopEnabled } from '../../integrations/ruvector/feature-flags.js';
36
+ import { measuredCoverageSummary } from './coverage-report-event.js';
36
37
  // CQ-002: Base domain coordinator
37
38
  import { BaseDomainCoordinator, } from '../base-domain-coordinator.js';
38
39
  const DEFAULT_CONFIG = {
@@ -819,15 +820,14 @@ export class QualityAssessmentCoordinator extends BaseDomainCoordinator {
819
820
  }
820
821
  async handleCoverageReportCreated(event) {
821
822
  // Store coverage data for quality assessment
822
- const payload = event.payload;
823
+ // #1008: only a report explicitly marked measured is coverage evidence.
824
+ // Estimates and look-alike events with no coverage figures (e.g. bridged
825
+ // captured experiences) must never touch `coverage:latest`.
826
+ const summary = measuredCoverageSummary(event.payload);
827
+ if (!summary)
828
+ return;
823
829
  // Store under the canonical coverage key so quality-analyzer can read it
824
- await this.memory.set('coverage:latest', {
825
- line: payload.line,
826
- branch: payload.branch,
827
- function: 0,
828
- statement: 0,
829
- files: 0,
830
- }, { persist: true });
830
+ await this.memory.set('coverage:latest', summary, { persist: true });
831
831
  }
832
832
  async handleSecurityAuditCompleted(event) {
833
833
  // Store security findings for deployment decisions
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Validation of `coverage-analysis.CoverageReportCreated` payloads before the
3
+ * quality-assessment domain stores them as `coverage:latest` (#1008).
4
+ *
5
+ * Only a report its producer explicitly marked `measured: true`, carrying
6
+ * finite coverage figures, is coverage evidence. Anything else — a static
7
+ * estimate, a legacy event without provenance, or a look-alike event with no
8
+ * coverage figures at all — is ignored rather than written as zeros.
9
+ */
10
+ /** The `coverage:latest` record written from a measured coverage report. */
11
+ export interface MeasuredCoverageSummary {
12
+ line: number;
13
+ branch: number;
14
+ function: number;
15
+ statement: number;
16
+ files: number;
17
+ /** Provenance stamp: this record came from instrumented coverage. */
18
+ measured: true;
19
+ }
20
+ /**
21
+ * Return the measured summary to store, or `null` when the payload is not
22
+ * measured coverage evidence.
23
+ */
24
+ export declare function measuredCoverageSummary(payload: unknown): MeasuredCoverageSummary | null;
25
+ //# sourceMappingURL=coverage-report-event.d.ts.map
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Validation of `coverage-analysis.CoverageReportCreated` payloads before the
3
+ * quality-assessment domain stores them as `coverage:latest` (#1008).
4
+ *
5
+ * Only a report its producer explicitly marked `measured: true`, carrying
6
+ * finite coverage figures, is coverage evidence. Anything else — a static
7
+ * estimate, a legacy event without provenance, or a look-alike event with no
8
+ * coverage figures at all — is ignored rather than written as zeros.
9
+ */
10
+ const isPercent = (v) => typeof v === 'number' && Number.isFinite(v) && v >= 0 && v <= 100;
11
+ /**
12
+ * Return the measured summary to store, or `null` when the payload is not
13
+ * measured coverage evidence.
14
+ */
15
+ export function measuredCoverageSummary(payload) {
16
+ if (!payload || typeof payload !== 'object')
17
+ return null;
18
+ const p = payload;
19
+ if (p.measured !== true)
20
+ return null;
21
+ if (!isPercent(p.line) || !isPercent(p.branch) || !isPercent(p.function) || !isPercent(p.statement)) {
22
+ return null;
23
+ }
24
+ const files = typeof p.files === 'number' && Number.isInteger(p.files) && p.files >= 0 ? p.files : null;
25
+ if (files === null)
26
+ return null;
27
+ return {
28
+ line: p.line,
29
+ branch: p.branch,
30
+ function: p.function,
31
+ statement: p.statement,
32
+ files,
33
+ measured: true,
34
+ };
35
+ }
36
+ //# sourceMappingURL=coverage-report-event.js.map
@@ -0,0 +1,57 @@
1
+ /**
2
+ * Evidence sufficiency for static quality analysis (#996).
3
+ *
4
+ * The static analyzer marks metrics it could not measure with the `-1`
5
+ * sentinel (or omits them). Such metrics must never be read as numbers that
6
+ * support a verdict: a pass computed without them is a pass on missing data.
7
+ */
8
+ import { INSUFFICIENT_EVIDENCE, type QualityThresholdOverrides } from './quality-evidence.js';
9
+ /** `measured`: every requested metric has data. Otherwise no verdict may approve. */
10
+ export type StaticEvidenceStatus = 'measured' | typeof INSUFFICIENT_EVIDENCE;
11
+ /** Metric names the static quality analysis understands. */
12
+ export declare const STATIC_QUALITY_METRICS: readonly ["coverage", "complexity", "maintainability", "duplication", "testability", "security"];
13
+ /**
14
+ * #996: the coverage threshold that applies to a static assessment — the
15
+ * request's threshold, else the user-configured gate threshold, else the
16
+ * canonical default (undefined = use the default).
17
+ */
18
+ export declare function resolveCoverageOverride(requested: number | undefined, configured: number | undefined): number | undefined;
19
+ export interface MeasuredFailure {
20
+ metric: string;
21
+ value: number;
22
+ threshold: number;
23
+ direction: 'min' | 'max';
24
+ }
25
+ export interface EvidenceSufficiency {
26
+ evidenceStatus: StaticEvidenceStatus;
27
+ /** Requested metrics backed by measured data. */
28
+ measured: string[];
29
+ /** Requested metrics with no measured data (missing, `-1`, or non-finite). */
30
+ unmeasured: string[];
31
+ /** Share of requested metrics that were measured, in [0, 1], two decimals. */
32
+ confidence: number;
33
+ }
34
+ /** A metric value is measured only if it is a finite, non-negative number. */
35
+ export declare function isMeasuredMetricValue(value: unknown): value is number;
36
+ /**
37
+ * #996 (N3): `metrics` must be a non-empty string[] of known names. A bare
38
+ * string would otherwise be spread into characters. Returns the de-duplicated
39
+ * list, or throws a caller-facing validation error.
40
+ */
41
+ export declare function validateRequestedMetrics(metrics: unknown): string[];
42
+ /**
43
+ * Decide whether static analysis measured every requested metric.
44
+ *
45
+ * @param requested - metric names the caller asked to assess; when empty,
46
+ * the measured values themselves define the scope.
47
+ * @param values - metric values produced by the analyzer (`-1` = unmeasured).
48
+ */
49
+ export declare function assessEvidenceSufficiency(requested: readonly string[], values: Readonly<Record<string, number | undefined>>): EvidenceSufficiency;
50
+ /**
51
+ * #996 (N2): measured metrics that already fail their own limit. Such a
52
+ * failure is conclusive — no unmeasured metric can turn it into a pass.
53
+ */
54
+ export declare function findMeasuredFailures(measured: readonly string[], values: Readonly<Record<string, number | undefined>>, overrides?: QualityThresholdOverrides): MeasuredFailure[];
55
+ /** Plain-language recommendation for one measured failure. */
56
+ export declare function describeMeasuredFailure(failure: MeasuredFailure): string;
57
+ //# sourceMappingURL=evidence-sufficiency.d.ts.map