agentic-qe 3.11.1 → 3.11.3

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 (357) hide show
  1. package/.claude/skills/.validation/templates/eval.template.yaml +36 -0
  2. package/.claude/skills/qe-code-intelligence/SKILL.md +3 -0
  3. package/.claude/skills/qe-quality-assessment/SKILL.md +25 -0
  4. package/.claude/skills/qe-test-generation/SKILL.md +58 -20
  5. package/.claude/skills/qe-test-generation/evals/qe-test-generation.yaml +37 -0
  6. package/.claude/skills/skills-manifest.json +1 -1
  7. package/CHANGELOG.md +71 -0
  8. package/README.md +1 -0
  9. package/assets/skills/.validation/templates/eval.template.yaml +36 -0
  10. package/assets/skills/enterprise-integration-testing/SKILL.md +1 -1
  11. package/assets/skills/pentest-validation/SKILL.md +1 -1
  12. package/assets/skills/qcsd-development-swarm/SKILL.md +27 -6
  13. package/assets/skills/qe-code-intelligence/SKILL.md +3 -0
  14. package/assets/skills/qe-quality-assessment/SKILL.md +25 -0
  15. package/assets/skills/qe-test-generation/SKILL.md +58 -20
  16. package/assets/skills/qe-test-generation/evals/qe-test-generation.yaml +37 -0
  17. package/dist/cli/bundle.js +5 -5
  18. package/dist/cli/chunks/adapter-IU3H3MD7.js +2 -0
  19. package/dist/cli/chunks/{agent-booster-wasm-3OJAT664.js → agent-booster-wasm-BFRW7HEU.js} +2 -2
  20. package/dist/cli/chunks/{agent-handler-6TCTI5AT.js → agent-handler-ZVC3VFPC.js} +2 -2
  21. package/dist/cli/chunks/{agent-memory-branch-FAWCYEGJ.js → agent-memory-branch-3WU3CVSX.js} +2 -2
  22. package/dist/cli/chunks/aqe-learning-engine-BGOC63IN.js +2 -0
  23. package/dist/cli/chunks/{arena-UVYIGYUF.js → arena-JMVTWWG5.js} +2 -2
  24. package/dist/cli/chunks/{arena-O2TCUQBF.js → arena-QMRLNQUC.js} +4 -4
  25. package/dist/cli/chunks/{audit-AYESKHAJ.js → audit-TTWAAV7P.js} +2 -2
  26. package/dist/cli/chunks/base-DVPRE3WO.js +2 -0
  27. package/dist/cli/chunks/{hnswlib-node-FUWQTM2D.js → better-sqlite3-QNZJOJAB.js} +2 -2
  28. package/dist/cli/chunks/{brain-handler-KSJBVTHZ.js → brain-handler-FXPLJCPV.js} +3 -3
  29. package/dist/cli/chunks/{branch-enumerator-4O3S42EG.js → branch-enumerator-CJJG6X3I.js} +2 -2
  30. package/dist/cli/chunks/{browser-5VXK323P.js → browser-LI2CDWVR.js} +2 -2
  31. package/dist/cli/chunks/browser-workflow-MP5P7KZF.js +2 -0
  32. package/dist/cli/chunks/{chunk-ZKPOKMJZ.js → chunk-22CUJA33.js} +2 -2
  33. package/dist/cli/chunks/{chunk-N52WQO3G.js → chunk-242B625Q.js} +2 -2
  34. package/dist/cli/chunks/{chunk-T7PUM6OY.js → chunk-26KHL4VO.js} +1 -1
  35. package/dist/cli/chunks/{chunk-IIX5Y7BO.js → chunk-27MMZQ7X.js} +1 -1
  36. package/dist/cli/chunks/{chunk-FBOPSWF6.js → chunk-2OUXYSQV.js} +2 -2
  37. package/dist/cli/chunks/{chunk-AEZMNFXM.js → chunk-2SZQDTI5.js} +1 -1
  38. package/dist/cli/chunks/{chunk-44HXRFOP.js → chunk-36HTS4EP.js} +2 -2
  39. package/dist/cli/chunks/{chunk-3XCEFSUK.js → chunk-3BREKEL5.js} +2 -2
  40. package/dist/cli/chunks/{chunk-56PICCZN.js → chunk-3CBYKKRW.js} +2 -2
  41. package/dist/cli/chunks/{chunk-EJSDQQZH.js → chunk-3E3PSEC5.js} +2 -2
  42. package/dist/cli/chunks/{chunk-5PSIKJL5.js → chunk-3FOFPGHH.js} +2 -2
  43. package/dist/cli/chunks/{chunk-J2LAYCYZ.js → chunk-3XLGXCSX.js} +1 -1
  44. package/dist/cli/chunks/{chunk-YFY35CSD.js → chunk-4ITHKHR5.js} +2 -2
  45. package/dist/cli/chunks/{chunk-5QFZEEJ2.js → chunk-54TDOQAH.js} +3 -3
  46. package/dist/cli/chunks/{chunk-S7ZHD6VN.js → chunk-5746QYRF.js} +2 -2
  47. package/dist/cli/chunks/{chunk-4OYC5TIZ.js → chunk-5EW36WTI.js} +2 -2
  48. package/dist/cli/chunks/{chunk-C27UV6DO.js → chunk-6F43POT6.js} +1 -1
  49. package/dist/cli/chunks/{chunk-SU4YXUVK.js → chunk-6GVRP64A.js} +2 -2
  50. package/dist/cli/chunks/{chunk-SZPTUV3B.js → chunk-6IHB3T6M.js} +2 -2
  51. package/dist/cli/chunks/{chunk-CN2HMHIY.js → chunk-6JR2RSY2.js} +2 -2
  52. package/dist/cli/chunks/{chunk-VGR65B4Y.js → chunk-6KKKPVOF.js} +1 -1
  53. package/dist/cli/chunks/{chunk-C7FYDE5F.js → chunk-6WWNK67C.js} +125 -150
  54. package/dist/cli/chunks/{chunk-VRHLHGKR.js → chunk-77QJQRL2.js} +2 -2
  55. package/dist/cli/chunks/{chunk-W6RS5S4Q.js → chunk-7FVWETN4.js} +2 -2
  56. package/dist/cli/chunks/{chunk-X4GKYSOH.js → chunk-7PDUD7FF.js} +2 -2
  57. package/dist/cli/chunks/{chunk-V6YDM37M.js → chunk-7QIYYYUE.js} +1 -1
  58. package/dist/cli/chunks/{chunk-CII57TME.js → chunk-7S7QF4HJ.js} +1 -1
  59. package/dist/cli/chunks/{chunk-ILZHECWZ.js → chunk-7SBMTSGY.js} +3 -3
  60. package/dist/cli/chunks/{chunk-S7IHSELP.js → chunk-7UOH55UT.js} +2 -2
  61. package/dist/cli/chunks/{chunk-6ZAUNPAI.js → chunk-A43MKBSX.js} +2 -2
  62. package/dist/cli/chunks/{chunk-HMVL55QX.js → chunk-A4NYOH7P.js} +2 -2
  63. package/dist/cli/chunks/{chunk-OHBZON7T.js → chunk-ABD6JBNO.js} +1 -1
  64. package/dist/cli/chunks/{chunk-WIC5UZCQ.js → chunk-AC6OZTY4.js} +2 -2
  65. package/dist/cli/chunks/{chunk-LNV76GGB.js → chunk-AKOGQT3A.js} +2 -2
  66. package/dist/cli/chunks/{chunk-XMDZRULK.js → chunk-ATFADWGD.js} +2 -2
  67. package/dist/cli/chunks/{chunk-UDLN2THT.js → chunk-B65CRJN6.js} +1 -1
  68. package/dist/cli/chunks/{chunk-7DQLYWLR.js → chunk-B6USJW5E.js} +1 -1
  69. package/dist/cli/chunks/{chunk-NVJIOCS5.js → chunk-B7XPSXK6.js} +2 -2
  70. package/dist/cli/chunks/{chunk-IUVAWWQG.js → chunk-BA7PJS3Y.js} +2 -2
  71. package/dist/cli/chunks/{chunk-2RE32VOF.js → chunk-BFBZFUBP.js} +1 -1
  72. package/dist/cli/chunks/{chunk-KIBP3LGY.js → chunk-BHZI6PDR.js} +1 -1
  73. package/dist/cli/chunks/{chunk-EFRIMR74.js → chunk-BQ5EJPK3.js} +1 -1
  74. package/dist/cli/chunks/{chunk-3DS7ZHA7.js → chunk-CCDGNJZX.js} +2 -2
  75. package/dist/cli/chunks/{chunk-QOR4YAZY.js → chunk-CGKHG46K.js} +2 -2
  76. package/dist/cli/chunks/{chunk-3V5DAM37.js → chunk-CLZ5RQVA.js} +2 -2
  77. package/dist/cli/chunks/{chunk-H4V6WCF7.js → chunk-CYJ6O5VZ.js} +2 -2
  78. package/dist/cli/chunks/{chunk-X2OVUBF6.js → chunk-DNOBN3IR.js} +2 -2
  79. package/dist/cli/chunks/{chunk-AG4BYKUV.js → chunk-DPYNXEBC.js} +2 -2
  80. package/dist/cli/chunks/{chunk-76UVJLPM.js → chunk-DS7AZD26.js} +2 -2
  81. package/dist/cli/chunks/{chunk-7QICU44H.js → chunk-DZ7PWB6E.js} +2 -2
  82. package/dist/cli/chunks/{chunk-TOQJWLJV.js → chunk-DZZ4AJQI.js} +2 -2
  83. package/dist/cli/chunks/{chunk-N6RSJGTW.js → chunk-EBCUWMLX.js} +2 -2
  84. package/dist/cli/chunks/{chunk-FK3XYV3A.js → chunk-ECGASTG7.js} +2 -2
  85. package/dist/cli/chunks/{chunk-3IMEDZIS.js → chunk-ED7MD6OI.js} +3 -3
  86. package/dist/cli/chunks/{chunk-BOQNPFO5.js → chunk-EHEFI6LR.js} +1 -1
  87. package/dist/cli/chunks/{chunk-GUSW3OGX.js → chunk-EXCU4J7T.js} +1 -1
  88. package/dist/cli/chunks/{chunk-7GP7ZG3K.js → chunk-EZ4GKHSI.js} +2 -2
  89. package/dist/cli/chunks/{chunk-CZU5G6J4.js → chunk-FJRRXCIS.js} +1 -1
  90. package/dist/cli/chunks/{chunk-WEPZOCN7.js → chunk-FPKKKUWF.js} +1 -1
  91. package/dist/cli/chunks/{chunk-CIDTFU3C.js → chunk-FZLCKIPP.js} +2 -2
  92. package/dist/cli/chunks/{chunk-N6NSZG7Z.js → chunk-G6MPXBCD.js} +2 -2
  93. package/dist/cli/chunks/{chunk-KRUKMGPF.js → chunk-GBCDJJWH.js} +2 -2
  94. package/dist/cli/chunks/{chunk-72UPBNVF.js → chunk-GCIL7PK7.js} +2 -2
  95. package/dist/cli/chunks/{chunk-K3BBLIWW.js → chunk-H2YOWAEB.js} +2 -2
  96. package/dist/cli/chunks/{chunk-HOFEAA4R.js → chunk-H6YFMUFG.js} +1 -1
  97. package/dist/cli/chunks/{chunk-U5GCSSYX.js → chunk-H7Y43HBQ.js} +1 -1
  98. package/dist/cli/chunks/{chunk-6CH7476R.js → chunk-HRD5I7ES.js} +1 -1
  99. package/dist/cli/chunks/{chunk-LOPM3YIO.js → chunk-IJHPZMEQ.js} +2 -2
  100. package/dist/cli/chunks/{chunk-437XL5VZ.js → chunk-JVXPKHND.js} +2 -2
  101. package/dist/cli/chunks/{chunk-LSZLXLZA.js → chunk-JWTMVC6E.js} +2 -2
  102. package/dist/cli/chunks/{chunk-BVFNF3RW.js → chunk-KHUN65Q3.js} +1 -1
  103. package/dist/cli/chunks/{chunk-ATQTTGSE.js → chunk-KTYESESI.js} +2 -2
  104. package/dist/cli/chunks/{chunk-Z6ADE3KJ.js → chunk-KULBMV6K.js} +2 -2
  105. package/dist/cli/chunks/{chunk-H5GCRC2D.js → chunk-KXRI4MR3.js} +2 -2
  106. package/dist/cli/chunks/{chunk-VS2G6LX5.js → chunk-L44XXD3X.js} +2 -2
  107. package/dist/cli/chunks/{chunk-N4OWZLH5.js → chunk-L6PH7JIE.js} +2 -2
  108. package/dist/cli/chunks/{chunk-QEDS3MOJ.js → chunk-LGEZ3ZJX.js} +2 -2
  109. package/dist/cli/chunks/{chunk-QXDZN2WX.js → chunk-LKLWIP4Z.js} +1 -1
  110. package/dist/cli/chunks/{chunk-MX6M2VPB.js → chunk-LMA6KEZH.js} +1 -1
  111. package/dist/cli/chunks/{chunk-4565IIF6.js → chunk-LW5TUN5F.js} +2 -2
  112. package/dist/cli/chunks/{chunk-O5NF6BBD.js → chunk-MU36VPXV.js} +1 -1
  113. package/dist/cli/chunks/{chunk-3G25ZBQ6.js → chunk-MX5FMAY5.js} +1 -1
  114. package/dist/cli/chunks/{chunk-D4DAZ3P2.js → chunk-N2K2EQFH.js} +2 -2
  115. package/dist/cli/chunks/{chunk-5LDUW2FD.js → chunk-NBOEXSV2.js} +1 -1
  116. package/dist/cli/chunks/{chunk-5Y7GXQOM.js → chunk-NJ2RY4OL.js} +2 -2
  117. package/dist/cli/chunks/{chunk-PY4YQDBM.js → chunk-NWUVXLBB.js} +4 -4
  118. package/dist/cli/chunks/{chunk-JGHEGMLD.js → chunk-O7ZDQ5FF.js} +3 -3
  119. package/dist/cli/chunks/{chunk-OUSD2RWO.js → chunk-OCACCUFO.js} +2 -2
  120. package/dist/cli/chunks/{chunk-L2QHZFC3.js → chunk-OFMVC6P3.js} +1 -1
  121. package/dist/cli/chunks/{chunk-DZT4A7R3.js → chunk-OQGELUM2.js} +2 -2
  122. package/dist/cli/chunks/{chunk-O75SVMMB.js → chunk-OVEG5MEL.js} +2 -2
  123. package/dist/cli/chunks/{chunk-TUEDIQHY.js → chunk-P4UGVVVX.js} +1 -1
  124. package/dist/cli/chunks/{chunk-D6MPGK7R.js → chunk-PLQADRA6.js} +2 -2
  125. package/dist/cli/chunks/{chunk-OX2PGDUM.js → chunk-PMHSTMHV.js} +3 -3
  126. package/dist/cli/chunks/{chunk-QMN563LV.js → chunk-PSL53AQ4.js} +44 -44
  127. package/dist/cli/chunks/{chunk-7SRSOZMP.js → chunk-PUK5NE47.js} +1 -1
  128. package/dist/cli/chunks/{chunk-7OAKIXNM.js → chunk-PUUGIBFF.js} +2 -2
  129. package/dist/cli/chunks/{chunk-CXIFCN6G.js → chunk-PW4GGJMP.js} +1 -1
  130. package/dist/cli/chunks/{chunk-4RUS5E3Q.js → chunk-PY2Q6MN3.js} +6 -6
  131. package/dist/cli/chunks/{chunk-6YNXH6H4.js → chunk-Q2A2XQGF.js} +2 -2
  132. package/dist/cli/chunks/{chunk-4G4GTF36.js → chunk-QCCXH5DK.js} +4 -4
  133. package/dist/cli/chunks/{chunk-22FHOXEE.js → chunk-QPMISAWB.js} +1 -1
  134. package/dist/cli/chunks/{chunk-EQYDPF52.js → chunk-REZ2GZQ3.js} +1 -1
  135. package/dist/cli/chunks/{chunk-EZBXCEBV.js → chunk-RRSUW2TK.js} +2 -2
  136. package/dist/cli/chunks/{chunk-IVZVVZZ3.js → chunk-RWUGXU2K.js} +3 -3
  137. package/dist/cli/chunks/{chunk-BR4ERWVD.js → chunk-RXN5DWVM.js} +2 -2
  138. package/dist/cli/chunks/{chunk-XEVUW4QL.js → chunk-S2T2BXUL.js} +2 -2
  139. package/dist/cli/chunks/{chunk-IAHJ62JS.js → chunk-S7KDHA6P.js} +4 -4
  140. package/dist/cli/chunks/{chunk-6WNYBIPS.js → chunk-SFDBIO64.js} +2 -2
  141. package/dist/cli/chunks/{chunk-TCKBICJ3.js → chunk-SFGBC5RP.js} +2 -2
  142. package/dist/cli/chunks/{chunk-P7CMWL7Y.js → chunk-SIAJP3YA.js} +2 -2
  143. package/dist/cli/chunks/{chunk-QUTKELAS.js → chunk-SLU35IDJ.js} +2 -2
  144. package/dist/cli/chunks/{chunk-HYT5EMES.js → chunk-SMHYPPO6.js} +2 -2
  145. package/dist/cli/chunks/{chunk-BXLWERBR.js → chunk-SWRGPCZ2.js} +3 -3
  146. package/dist/cli/chunks/{chunk-B6U56VWG.js → chunk-UFZCHVLH.js} +1 -1
  147. package/dist/cli/chunks/{chunk-OUBYADPD.js → chunk-UMWYL37S.js} +2 -2
  148. package/dist/cli/chunks/chunk-UNH2DE2G.js +2 -0
  149. package/dist/cli/chunks/{chunk-S456W64P.js → chunk-UTGW75AZ.js} +2 -2
  150. package/dist/cli/chunks/{chunk-3D4HNUZM.js → chunk-VFEU4JM4.js} +2 -2
  151. package/dist/cli/chunks/{chunk-K7XPKGOL.js → chunk-VTDWQ7WI.js} +2 -2
  152. package/dist/cli/chunks/{chunk-4S3UIY3G.js → chunk-VUEYLW5P.js} +2 -2
  153. package/dist/cli/chunks/{chunk-B5EE63VE.js → chunk-WCVZHXWL.js} +2 -2
  154. package/dist/cli/chunks/{chunk-7WQKKYYG.js → chunk-WLLGPGQY.js} +1 -1
  155. package/dist/cli/chunks/{chunk-NKCL6RAF.js → chunk-WTKT2AD3.js} +2 -2
  156. package/dist/cli/chunks/{chunk-FOD6JEEU.js → chunk-WV66MXJI.js} +2 -2
  157. package/dist/cli/chunks/{chunk-ZRWAFMM7.js → chunk-WYJFVSEB.js} +2 -2
  158. package/dist/cli/chunks/{chunk-AL54LED5.js → chunk-XCSEJQXR.js} +2 -2
  159. package/dist/cli/chunks/{chunk-MILWEZSZ.js → chunk-XKUN5PDH.js} +3 -3
  160. package/dist/cli/chunks/{chunk-4BMPFEEG.js → chunk-YPRM6ZFL.js} +2 -2
  161. package/dist/cli/chunks/{chunk-4UHWZ47M.js → chunk-ZDPQB67L.js} +1 -1
  162. package/dist/cli/chunks/{chunk-NYWK7ZSX.js → chunk-ZM7WOA3K.js} +1 -1
  163. package/dist/cli/chunks/{ci-KTWY7BZT.js → ci-JW4O2J3W.js} +2 -2
  164. package/dist/cli/chunks/{ci-output-WOX6QBMS.js → ci-output-JNXJV4B2.js} +2 -2
  165. package/dist/cli/chunks/{circuit-breaker-6XKOSFIF.js → circuit-breaker-XDD4KUGR.js} +2 -2
  166. package/dist/cli/chunks/{claude-flow-setup-5JA4MNE4.js → claude-flow-setup-L6IZOGYZ.js} +2 -2
  167. package/dist/cli/chunks/client-ADCDBTEE.js +2 -0
  168. package/dist/cli/chunks/{cline-installer-Z2ANHEKW.js → cline-installer-PK5SMN2B.js} +2 -2
  169. package/dist/cli/chunks/code-ZDVX3SQH.js +58 -0
  170. package/dist/cli/chunks/{code-index-extractor-VV4OEPG7.js → code-index-extractor-VXZNKEU5.js} +2 -2
  171. package/dist/cli/chunks/{codex-installer-BP7Y2NYR.js → codex-installer-OXKSIX7H.js} +2 -2
  172. package/dist/cli/chunks/{completions-YULJQUF4.js → completions-VRFFK223.js} +8 -5
  173. package/dist/cli/chunks/{complexity-analyzer-D7XYPQ76.js → complexity-analyzer-FTIMV74J.js} +2 -2
  174. package/dist/cli/chunks/{continuedev-installer-E3L7UF72.js → continuedev-installer-KTYBBPN4.js} +2 -2
  175. package/dist/cli/chunks/{copilot-installer-5TRUMJC5.js → copilot-installer-WDC3YNUR.js} +2 -2
  176. package/dist/cli/chunks/core-handlers-HCACMLUW.js +2 -0
  177. package/dist/cli/chunks/{cost-tracker-QTYSJMSV.js → cost-tracker-6MH4H33B.js} +2 -2
  178. package/dist/cli/chunks/{coverage-D5DKZ3XT.js → coverage-NHATLNS4.js} +3 -3
  179. package/dist/cli/chunks/cross-domain-router-HXFQAU4M.js +2 -0
  180. package/dist/cli/chunks/{cursor-installer-UDBHGUIG.js → cursor-installer-VQSUJDFB.js} +2 -2
  181. package/dist/cli/chunks/{daemon-2GXYN7F7.js → daemon-3VAOEKQW.js} +3 -3
  182. package/dist/cli/chunks/{daemon-IVWUMQKL.js → daemon-ZSK6CLQR.js} +4 -4
  183. package/dist/cli/chunks/{dag-attention-scheduler-PWXR4QTU.js → dag-attention-scheduler-HZ6OGYIH.js} +2 -2
  184. package/dist/cli/chunks/{detect-C6P7ONFB.js → detect-CGU3SC63.js} +2 -2
  185. package/dist/cli/chunks/{dist-node-2BUFM2JK.js → dist-node-DIBQ7PTA.js} +2 -2
  186. package/dist/cli/chunks/{domain-handler-Q2GWZLDM.js → domain-handler-DCMGAYXS.js} +2 -2
  187. package/dist/cli/chunks/{domain-transfer-GMUBAM3J.js → domain-transfer-UWFKBZTJ.js} +2 -2
  188. package/dist/cli/chunks/dream-SVWQH62A.js +2 -0
  189. package/dist/cli/chunks/{embed-and-insert-pattern-EFUERRM2.js → embed-and-insert-pattern-7247LAU3.js} +2 -2
  190. package/dist/cli/chunks/{eval-24FIC43F.js → eval-6KR7TFOK.js} +2 -2
  191. package/dist/cli/chunks/{experience-capture-middleware-R4UP2Q2M.js → experience-capture-middleware-IIOR6RVV.js} +3 -3
  192. package/dist/cli/chunks/{fast-paths-RQCGGTXB.js → fast-paths-M7OGD4ZI.js} +2 -2
  193. package/dist/cli/chunks/{feature-flags-SOXVYIBN.js → feature-flags-GGUXHRJI.js} +2 -2
  194. package/dist/cli/chunks/{feature-flags-APTWWVNQ.js → feature-flags-U75KFIGH.js} +2 -2
  195. package/dist/cli/chunks/{file-discovery-66KRMXVF.js → file-discovery-V52AYEB7.js} +2 -2
  196. package/dist/cli/chunks/{fleet-EMBNKO5Q.js → fleet-2UH72CK4.js} +3 -3
  197. package/dist/cli/chunks/{gnn-wrapper-6TKDWFJF.js → gnn-wrapper-J2GDLT3P.js} +2 -2
  198. package/dist/cli/chunks/{heartbeat-handler-4ODKJ75H.js → heartbeat-handler-QIDQHRXT.js} +4 -4
  199. package/dist/cli/chunks/heartbeat-scheduler-QW5TW5QS.js +2 -0
  200. package/dist/cli/chunks/hnsw-adapter-D6EJWYAL.js +2 -0
  201. package/dist/cli/chunks/hnsw-index-4MWR4U5W.js +2 -0
  202. package/dist/cli/chunks/{hnsw-legacy-bridge-25KFCLUC.js → hnsw-legacy-bridge-IU62PIY5.js} +2 -2
  203. package/dist/cli/chunks/{better-sqlite3-MJNUEPYB.js → hnswlib-node-EBRXKEX5.js} +2 -2
  204. package/dist/cli/chunks/{hooks-JIDA2COE.js → hooks-ZI4D3ATS.js} +10 -10
  205. package/dist/cli/chunks/hybrid-router-BYVUBHER.js +2 -0
  206. package/dist/cli/chunks/{hypergraph-engine-3YDFDPE3.js → hypergraph-engine-6JEERAGA.js} +2 -2
  207. package/dist/cli/chunks/{hypergraph-handler-VWZX2OJX.js → hypergraph-handler-YMDGYCB6.js} +3 -3
  208. package/dist/cli/chunks/impact-analyzer-OK2UIMSG.js +2 -0
  209. package/dist/cli/chunks/{init-handler-DH7VQAMF.js → init-handler-N57NW3QI.js} +6 -6
  210. package/dist/cli/chunks/init-wizard-6NNPNS6J.js +2 -0
  211. package/dist/cli/chunks/kernel-F4A4GRNO.js +2 -0
  212. package/dist/cli/chunks/{kilocode-installer-2W2KZCGH.js → kilocode-installer-7ABTGXJ5.js} +2 -2
  213. package/dist/cli/chunks/{kiro-installer-E5KP7OMD.js → kiro-installer-2JFOHLVI.js} +2 -2
  214. package/dist/cli/chunks/knowledge-graph-MSJDEZCF.js +2 -0
  215. package/dist/cli/chunks/{learning-XJRUVPLF.js → learning-3P3ZXRGD.js} +3 -3
  216. package/dist/cli/chunks/{llm-router-AEEKEMF5.js → llm-router-AWB2KHDW.js} +4 -4
  217. package/dist/cli/chunks/llm-router-service-27IQAO7G.js +2 -0
  218. package/dist/cli/chunks/{load-PZ4YOTBJ.js → load-GGVBCBGX.js} +2 -2
  219. package/dist/cli/chunks/load-test-TT5VLAN7.js +2 -0
  220. package/dist/cli/chunks/{mcp-IVA6LC2S.js → mcp-33NHIBN3.js} +2 -2
  221. package/dist/cli/chunks/{memory-Y3DHXFQE.js → memory-IVAQS4OW.js} +5 -5
  222. package/dist/cli/chunks/memory-backend-FVSK53IM.js +2 -0
  223. package/dist/cli/chunks/{memory-handlers-V5PXEJWL.js → memory-handlers-OPUDOZNT.js} +2 -2
  224. package/dist/cli/chunks/{multi-model-executor-646G4S4Y.js → multi-model-executor-NWQY6IN2.js} +2 -2
  225. package/dist/cli/chunks/{opencode-installer-P6KOOTUS.js → opencode-installer-FBB4JOEV.js} +2 -2
  226. package/dist/cli/chunks/{orchestrator-T2GVKYMX.js → orchestrator-GDAXR7DH.js} +5 -5
  227. package/dist/cli/chunks/pattern-null-store-7MVEDWCY.js +2 -0
  228. package/dist/cli/chunks/{pipeline-CK2ON45P.js → pipeline-VIKAOIBE.js} +2 -2
  229. package/dist/cli/chunks/{platform-OQNSD3A3.js → platform-FFVP36LH.js} +2 -2
  230. package/dist/cli/chunks/{plugin-UOG6RNRM.js → plugin-TI6QOLXH.js} +2 -2
  231. package/dist/cli/chunks/{prime-radiant-advanced-wasm-37UE6TG5.js → prime-radiant-advanced-wasm-AZRNI2OL.js} +2 -2
  232. package/dist/cli/chunks/protocol-executor-BLDDYEJ4.js +2 -0
  233. package/dist/cli/chunks/{protocol-handler-V722S6YH.js → protocol-handler-J4EA34B3.js} +2 -2
  234. package/dist/cli/chunks/{prove-ANGY6W3W.js → prove-ADVRMAWS.js} +2 -2
  235. package/dist/cli/chunks/provider-manager-ZYCFRYZQ.js +2 -0
  236. package/dist/cli/chunks/qe-reasoning-bank-P66CCPHM.js +2 -0
  237. package/dist/cli/chunks/{quality-KG4ALI2L.js → quality-GB5SJFSD.js} +2 -2
  238. package/dist/cli/chunks/queen-coordinator-LPHT3SX5.js +2 -0
  239. package/dist/cli/chunks/{real-embeddings-GUZDO5UN.js → real-embeddings-GDRJ4XSH.js} +2 -2
  240. package/dist/cli/chunks/{roocode-installer-WROAR6MJ.js → roocode-installer-Q6EISUDV.js} +2 -2
  241. package/dist/cli/chunks/router-XQ2TERUT.js +2 -0
  242. package/dist/cli/chunks/routing-feedback-K52O752B.js +2 -0
  243. package/dist/cli/chunks/{routing-handler-UFPSSS5D.js → routing-handler-RO4RTRAG.js} +2 -2
  244. package/dist/cli/chunks/{ruvector-commands-XJQMKDRM.js → ruvector-commands-FFIHCGVQ.js} +2 -2
  245. package/dist/cli/chunks/{rvf-dual-writer-QPRMDKYX.js → rvf-dual-writer-JGEK3A5Y.js} +2 -2
  246. package/dist/cli/chunks/{rvf-migration-adapter-SOHBK23K.js → rvf-migration-adapter-OVYC4QM6.js} +2 -2
  247. package/dist/cli/chunks/{rvf-migration-coordinator-MTWUSPEJ.js → rvf-migration-coordinator-U6L77QTS.js} +2 -2
  248. package/dist/cli/chunks/rvf-native-adapter-G4DV7FK3.js +2 -0
  249. package/dist/cli/chunks/safe-db-TMSEITES.js +2 -0
  250. package/dist/cli/chunks/schedule-RWFLA43O.js +2 -0
  251. package/dist/cli/chunks/scheduler-2V55MJJR.js +2 -0
  252. package/dist/cli/chunks/{security-5MAMQKP6.js → security-QPQIDAIL.js} +3 -3
  253. package/dist/cli/chunks/{shared-rvf-adapter-YEUBSRNN.js → shared-rvf-adapter-JRJTI4UD.js} +2 -2
  254. package/dist/cli/chunks/{shared-rvf-dual-writer-DBQJHG42.js → shared-rvf-dual-writer-DSHGURDA.js} +2 -2
  255. package/dist/cli/chunks/sqlite-persistence-L7QM6IWF.js +2 -0
  256. package/dist/cli/chunks/{status-handler-ZUB2UKQZ.js → status-handler-SBT3MZTX.js} +2 -2
  257. package/dist/cli/chunks/{structural-health-B2GHENWX.js → structural-health-UVECCN7U.js} +2 -2
  258. package/dist/cli/chunks/{sync-7VMXJTR2.js → sync-XXIGTGCG.js} +2 -2
  259. package/dist/cli/chunks/{sync-YCUUW3IP.js → sync-ZLZ4CZFJ.js} +2 -2
  260. package/dist/cli/chunks/{task-handler-N7LJTXZM.js → task-handler-73YAVOKJ.js} +2 -2
  261. package/dist/cli/chunks/{task-handlers-GDHNJV2E.js → task-handlers-PKECV27D.js} +3 -3
  262. package/dist/cli/chunks/{test-6COGC5KI.js → test-U3SXW4SV.js} +4 -4
  263. package/dist/cli/chunks/{test-scheduling-CUERHJMF.js → test-scheduling-POJND3GV.js} +3 -3
  264. package/dist/cli/chunks/{token-bootstrap-JTGSL6PP.js → token-bootstrap-ICX6SIXJ.js} +2 -2
  265. package/dist/cli/chunks/{token-usage-LSG3JYGX.js → token-usage-WCHJUVGT.js} +2 -2
  266. package/dist/cli/chunks/{transformers-ODIITRCT.js → transformers-L77UIHIY.js} +2 -2
  267. package/dist/cli/chunks/{tree-sitter-wasm-parser-KSP7ZZ5H.js → tree-sitter-wasm-parser-CVAXURQP.js} +2 -2
  268. package/dist/cli/chunks/{types-6N6SUU2O.js → types-LNVJBDM2.js} +2 -2
  269. package/dist/cli/chunks/unified-memory-ZSULA46X.js +2 -0
  270. package/dist/cli/chunks/unified-memory-hnsw-SQEWFUBN.js +2 -0
  271. package/dist/cli/chunks/unified-persistence-EDCTT6SE.js +2 -0
  272. package/dist/cli/chunks/{upgrade-7SCVOCPS.js → upgrade-4ND5RQFY.js} +2 -2
  273. package/dist/cli/chunks/{validate-762ISH2Y.js → validate-ZA4XT6K2.js} +2 -2
  274. package/dist/cli/chunks/{validate-swarm-R6WYYXGO.js → validate-swarm-FNK3GCJ4.js} +2 -2
  275. package/dist/cli/chunks/{vibium-5GZYSUDQ.js → vibium-E2CK2GBQ.js} +2 -2
  276. package/dist/cli/chunks/visual-security-SOGAETFP.js +2 -0
  277. package/dist/cli/chunks/{web-tree-sitter-VYYVAJTY.js → web-tree-sitter-63VRNKZV.js} +2 -2
  278. package/dist/cli/chunks/{windsurf-installer-RRIOR3B6.js → windsurf-installer-5BTCVOLH.js} +2 -2
  279. package/dist/cli/chunks/{witness-chain-SRVBEKDB.js → witness-chain-6CUUGISD.js} +2 -2
  280. package/dist/cli/chunks/witness-chain-AJCECBH5.js +2 -0
  281. package/dist/cli/chunks/{workflow-XNUDHGEC.js → workflow-V7ED22XT.js} +4 -4
  282. package/dist/cli/chunks/workflow-orchestrator-UXRUCOZR.js +2 -0
  283. package/dist/cli/chunks/{wrappers-3STST7QW.js → wrappers-7S3NTTLW.js} +2 -2
  284. package/dist/cli/commands/code.js +78 -2
  285. package/dist/cli/completions/index.js +4 -1
  286. package/dist/domains/code-intelligence/coordinator.js +8 -4
  287. package/dist/domains/code-intelligence/services/c4-model/from-detected.d.ts +41 -0
  288. package/dist/domains/code-intelligence/services/c4-model/from-detected.js +152 -0
  289. package/dist/domains/code-intelligence/services/c4-model/kg-relationships.d.ts +71 -0
  290. package/dist/domains/code-intelligence/services/c4-model/kg-relationships.js +87 -0
  291. package/dist/domains/code-intelligence/services/knowledge-graph.d.ts +6 -0
  292. package/dist/domains/code-intelligence/services/knowledge-graph.js +3 -3
  293. package/dist/domains/code-intelligence/services/product-factors-bridge.d.ts +26 -5
  294. package/dist/domains/code-intelligence/services/product-factors-bridge.js +72 -65
  295. package/dist/feedback/regenerability-gate.d.ts +70 -0
  296. package/dist/feedback/regenerability-gate.js +91 -0
  297. package/dist/mcp/bundle.js +429 -454
  298. package/dist/mcp/tools/code-intelligence/c4.d.ts +56 -0
  299. package/dist/mcp/tools/code-intelligence/c4.js +145 -0
  300. package/dist/mcp/tools/index.d.ts +1 -0
  301. package/dist/mcp/tools/index.js +1 -0
  302. package/dist/mcp/tools/registry.d.ts +1 -0
  303. package/dist/mcp/tools/registry.js +3 -0
  304. package/dist/shared/c4-model/confidence.d.ts +38 -0
  305. package/dist/shared/c4-model/confidence.js +69 -0
  306. package/dist/shared/c4-model/index.d.ts +4 -0
  307. package/dist/shared/c4-model/index.js +1 -0
  308. package/dist/shared/llm/providers/gemini.js +16 -10
  309. package/dist/shared/llm/providers/openrouter.js +20 -20
  310. package/dist/validation/conservation-guard.d.ts +39 -0
  311. package/dist/validation/conservation-guard.js +54 -0
  312. package/dist/validation/oracle-eval.d.ts +46 -0
  313. package/dist/validation/oracle-eval.js +108 -0
  314. package/dist/validation/skill-parity.d.ts +58 -0
  315. package/dist/validation/skill-parity.js +94 -0
  316. package/dist/validation/test-gen-prompt.d.ts +10 -0
  317. package/dist/validation/test-gen-prompt.js +26 -0
  318. package/package.json +8 -1
  319. package/dist/cli/chunks/adapter-A6GCBONS.js +0 -2
  320. package/dist/cli/chunks/aqe-learning-engine-FRCSXNMG.js +0 -2
  321. package/dist/cli/chunks/base-CZ3EHBU5.js +0 -2
  322. package/dist/cli/chunks/browser-workflow-EKTGQQBQ.js +0 -2
  323. package/dist/cli/chunks/chunk-57WGS6BI.js +0 -2
  324. package/dist/cli/chunks/client-X3KUJ6R5.js +0 -2
  325. package/dist/cli/chunks/code-NO4ZKNDU.js +0 -39
  326. package/dist/cli/chunks/core-handlers-A2EQB3UH.js +0 -2
  327. package/dist/cli/chunks/cross-domain-router-OKZ2PDHT.js +0 -2
  328. package/dist/cli/chunks/dream-ZBP4Z5C3.js +0 -2
  329. package/dist/cli/chunks/heartbeat-scheduler-6JUWQXWG.js +0 -2
  330. package/dist/cli/chunks/hnsw-adapter-JT4BU7XJ.js +0 -2
  331. package/dist/cli/chunks/hnsw-index-JC5YELJX.js +0 -2
  332. package/dist/cli/chunks/hybrid-router-SLTXHUFG.js +0 -2
  333. package/dist/cli/chunks/impact-analyzer-JXHCMZXY.js +0 -2
  334. package/dist/cli/chunks/init-wizard-EX37TYOG.js +0 -2
  335. package/dist/cli/chunks/kernel-JPHAG27D.js +0 -2
  336. package/dist/cli/chunks/knowledge-graph-5QJZIRYB.js +0 -2
  337. package/dist/cli/chunks/llm-router-service-SE2RO4P5.js +0 -2
  338. package/dist/cli/chunks/load-test-LOTBWIIS.js +0 -2
  339. package/dist/cli/chunks/memory-backend-BSDKTFAN.js +0 -2
  340. package/dist/cli/chunks/pattern-null-store-LRSXCZWM.js +0 -2
  341. package/dist/cli/chunks/protocol-executor-WPUVJEL7.js +0 -2
  342. package/dist/cli/chunks/provider-manager-EVPWSH3E.js +0 -2
  343. package/dist/cli/chunks/qe-reasoning-bank-IH63FG33.js +0 -2
  344. package/dist/cli/chunks/queen-coordinator-TTCAGYQO.js +0 -2
  345. package/dist/cli/chunks/router-64Q4ILOQ.js +0 -2
  346. package/dist/cli/chunks/routing-feedback-KCZV4XXC.js +0 -2
  347. package/dist/cli/chunks/rvf-native-adapter-GNJKMURU.js +0 -2
  348. package/dist/cli/chunks/safe-db-6VBZQIJI.js +0 -2
  349. package/dist/cli/chunks/schedule-4V7O5IPX.js +0 -2
  350. package/dist/cli/chunks/scheduler-CQDMHEHN.js +0 -2
  351. package/dist/cli/chunks/sqlite-persistence-7DHUFTHL.js +0 -2
  352. package/dist/cli/chunks/unified-memory-MQA72NLP.js +0 -2
  353. package/dist/cli/chunks/unified-memory-hnsw-K7HA3CWV.js +0 -2
  354. package/dist/cli/chunks/unified-persistence-2DXB4OE4.js +0 -2
  355. package/dist/cli/chunks/visual-security-UD6CARIJ.js +0 -2
  356. package/dist/cli/chunks/witness-chain-LWALPPMC.js +0 -2
  357. package/dist/cli/chunks/workflow-orchestrator-QU652FLH.js +0 -2
@@ -18,8 +18,10 @@ import * as fs from 'fs/promises';
18
18
  import { ok, err } from '../../../shared/types';
19
19
  import { CodeIntelligenceEvents, createEvent, } from '../../../shared/events/domain-events';
20
20
  import { toError } from '../../../shared/error-utils.js';
21
- import { isCacheValid, sanitizeId, inferComponentType, } from '../../../shared/c4-model';
21
+ import { isCacheValid, sanitizeId, inferComponentType, assessC4Confidence, } from '../../../shared/c4-model';
22
22
  import { safeJsonParse } from '../../../shared/safe-json.js';
23
+ import { C4ModelService } from './c4-model';
24
+ import { toContextRequest, toContainerRequest, toComponentRequest, } from './c4-model/from-detected';
23
25
  const DEFAULT_CONFIG = {
24
26
  cacheTtlMs: 3600000, // 1 hour
25
27
  publishEvents: true,
@@ -96,11 +98,26 @@ export class ProductFactorsBridgeService {
96
98
  config;
97
99
  initialized = false;
98
100
  eventSubscriptions = [];
101
+ /** ADR-112: the consolidated render+analyze+store engine (lazily built). */
102
+ c4Service;
99
103
  constructor(eventBus, memory, config = {}) {
100
104
  this.eventBus = eventBus;
101
105
  this.memory = memory;
102
106
  this.config = { ...DEFAULT_CONFIG, ...config };
103
107
  }
108
+ /**
109
+ * ADR-112: lazily construct the shared C4ModelService.
110
+ * Embeddings are OFF on this internal product-factors path (keeps it offline +
111
+ * fast); the CLI/MCP surfaces opt embeddings in when semantic search is wanted.
112
+ */
113
+ getC4Service() {
114
+ if (!this.c4Service) {
115
+ this.c4Service = new C4ModelService(this.memory, {
116
+ enableEmbeddings: this.config.enableC4Embeddings ?? false,
117
+ });
118
+ }
119
+ return this.c4Service;
120
+ }
104
121
  // ==========================================================================
105
122
  // Lifecycle
106
123
  // ==========================================================================
@@ -130,7 +147,7 @@ export class ProductFactorsBridgeService {
130
147
  const sub2 = this.eventBus.subscribe(CodeIntelligenceEvents.ImpactAnalysisCompleted, this.handleImpactAnalysisCompleted.bind(this));
131
148
  this.eventSubscriptions.push(sub2);
132
149
  }
133
- async handleKnowledgeGraphUpdated(event) {
150
+ async handleKnowledgeGraphUpdated(_event) {
134
151
  // Invalidate relevant caches when knowledge graph is updated
135
152
  logger.info('[ProductFactorsBridge] Knowledge graph updated, considering cache invalidation');
136
153
  // Note: We don't have project path in this event, so we rely on hash-based invalidation
@@ -198,30 +215,40 @@ export class ProductFactorsBridgeService {
198
215
  if (request.analyzeCoupling && components.length > 1) {
199
216
  couplingAnalysis = this.analyzeCoupling(components, relationships);
200
217
  }
201
- // Generate diagrams
218
+ // Generate diagrams. ADR-112: the three C4 levels render through the
219
+ // consolidated C4ModelService (richer + stored + searchable); the bridge
220
+ // keeps only detection. Inline generators remain as a safety fallback.
202
221
  const diagrams = {};
203
222
  if (request.includeContext !== false) {
204
- diagrams.context = this.generateContextDiagram(projectInfo, externalSystems);
223
+ diagrams.context = await this.renderContext(projectInfo, externalSystems);
205
224
  }
206
225
  if (request.includeContainer !== false) {
207
- diagrams.container = this.generateContainerDiagram(projectInfo, externalSystems);
226
+ diagrams.container = await this.renderContainer(projectInfo, externalSystems);
208
227
  }
209
228
  if (request.includeComponent !== false && components.length > 0) {
210
- diagrams.component = this.generateComponentDiagram(projectInfo.name, components, relationships);
229
+ diagrams.component = await this.renderComponent(projectInfo, components, relationships);
211
230
  }
212
231
  if (request.includeDependency && components.length > 0) {
213
232
  diagrams.dependency = this.generateDependencyGraph(components, relationships);
214
233
  }
234
+ const filesAnalyzed = components.reduce((sum, c) => sum + c.files.length, 0);
215
235
  const metadata = {
216
236
  projectName: projectInfo.name,
217
237
  projectDescription: projectInfo.description,
218
238
  generatedAt: new Date(),
219
239
  source: 'codebase-analysis',
220
240
  analysisMetadata: {
221
- filesAnalyzed: components.reduce((sum, c) => sum + c.files.length, 0),
241
+ filesAnalyzed,
222
242
  componentsDetected: components.length,
223
243
  externalSystemsDetected: externalSystems.length,
224
244
  analysisTimeMs: Date.now() - startTime,
245
+ // ADR-112: deterministic confidence gate — never present a wrong diagram as truth.
246
+ confidence: assessC4Confidence({
247
+ componentsDetected: components.length,
248
+ relationshipsDetected: relationships.length,
249
+ externalSystemsDetected: externalSystems.length,
250
+ filesAnalyzed,
251
+ }),
225
252
  },
226
253
  };
227
254
  return ok({
@@ -239,70 +266,37 @@ export class ProductFactorsBridgeService {
239
266
  }
240
267
  }
241
268
  // ==========================================================================
242
- // IC4DiagramGenerator Implementation
269
+ // ADR-112: render via the consolidated C4ModelService (the single engine).
270
+ // On failure we FAIL LOUD — propagate the error so the caller surfaces it —
271
+ // rather than silently degrading to a weaker inline diagram. A masked render
272
+ // failure is worse than a surfaced one (ADR-050: no silent degradation).
243
273
  // ==========================================================================
244
- generateContextDiagram(project, externalSystems) {
245
- let mermaid = `C4Context
246
- title System Context diagram for ${project.name}
247
-
248
- Person(user, "User", "A user of the system")
249
- System(system, "${project.name}", "${project.description}")
250
- `;
251
- for (const sys of externalSystems) {
252
- mermaid += ` System_Ext(${sys.id}, "${sys.name}", "${sys.type}")
253
- `;
254
- }
255
- mermaid += `
256
- Rel(user, system, "Uses")
257
- `;
258
- for (const sys of externalSystems) {
259
- mermaid += ` Rel(system, ${sys.id}, "${sys.relationship}")
260
- `;
274
+ async renderContext(projectInfo, externalSystems) {
275
+ const res = await this.getC4Service().buildContext(toContextRequest(projectInfo, externalSystems));
276
+ if (!res.success) {
277
+ logger.error('[ProductFactorsBridge] C4 context render failed', res.error);
278
+ throw res.error;
261
279
  }
262
- return mermaid;
280
+ return res.value.mermaid;
263
281
  }
264
- generateContainerDiagram(project, externalSystems) {
265
- let mermaid = `C4Container
266
- title Container diagram for ${project.name}
267
-
268
- Person(user, "User", "A user of the system")
269
-
270
- Container_Boundary(c1, "${project.name}") {
271
- Container(app, "Application", "TypeScript", "Main application")
272
- }
273
- `;
274
- for (const sys of externalSystems) {
275
- mermaid += ` System_Ext(${sys.id}, "${sys.name}", "${sys.type}")
276
- `;
277
- }
278
- mermaid += `
279
- Rel(user, app, "Uses")
280
- `;
281
- for (const sys of externalSystems) {
282
- mermaid += ` Rel(app, ${sys.id}, "${sys.relationship}")
283
- `;
282
+ async renderContainer(projectInfo, externalSystems) {
283
+ const res = await this.getC4Service().buildContainer(toContainerRequest(projectInfo, externalSystems));
284
+ if (!res.success) {
285
+ logger.error('[ProductFactorsBridge] C4 container render failed', res.error);
286
+ throw res.error;
284
287
  }
285
- return mermaid;
288
+ return res.value.mermaid;
286
289
  }
287
- generateComponentDiagram(projectName, components, relationships) {
288
- let mermaid = `C4Component
289
- title Component diagram for ${projectName}
290
-
291
- Container_Boundary(app, "Application") {
292
- `;
293
- for (const comp of components) {
294
- const responsibility = comp.responsibilities?.[0] || '';
295
- mermaid += ` Component(${comp.id}, "${comp.name}", "${comp.technology || 'TypeScript'}", "${responsibility}")
296
- `;
297
- }
298
- mermaid += ` }
299
- `;
300
- for (const rel of relationships) {
301
- mermaid += ` Rel(${rel.sourceId}, ${rel.targetId}, "${rel.type}")
302
- `;
290
+ async renderComponent(projectInfo, components, relationships) {
291
+ const res = await this.getC4Service().buildComponent(toComponentRequest(components, relationships));
292
+ if (!res.success) {
293
+ logger.error('[ProductFactorsBridge] C4 component render failed', res.error);
294
+ throw res.error;
303
295
  }
304
- return mermaid;
296
+ return res.value.mermaid;
305
297
  }
298
+ // The dependency graph is NOT a C4 level and C4ModelService does not render
299
+ // it, so this stays as the bridge's own renderer.
306
300
  generateDependencyGraph(components, relationships) {
307
301
  let mermaid = `graph TD
308
302
  `;
@@ -439,6 +433,19 @@ export class ProductFactorsBridgeService {
439
433
  catch (error) {
440
434
  logger.error('Component analysis failed:', error instanceof Error ? error : undefined);
441
435
  }
436
+ // ADR-112 C2: prefer REAL KG-derived edges (AST import/call graph) over the
437
+ // naming heuristic. The resolver returns null on any miss → heuristic stands.
438
+ if (this.config.relationshipResolver && components.length > 0) {
439
+ try {
440
+ const resolved = await this.config.relationshipResolver(components, projectPath);
441
+ if (resolved && resolved.length > 0) {
442
+ return { components, relationships: resolved };
443
+ }
444
+ }
445
+ catch (error) {
446
+ logger.debug(`KG relationship resolver failed; using heuristic: ${toError(error).message}`);
447
+ }
448
+ }
442
449
  return { components, relationships };
443
450
  }
444
451
  shouldExclude(name) {
@@ -473,7 +480,7 @@ export class ProductFactorsBridgeService {
473
480
  }
474
481
  }
475
482
  }
476
- catch (error) {
483
+ catch {
477
484
  // Non-critical: permission errors when scanning directories
478
485
  logger.debug('Directory scan error:');
479
486
  }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Regenerability Gate (ADR-113)
3
+ *
4
+ * Answers the Deletion Test per module: "if I deleted this module and
5
+ * regenerated it, how confident am I that a wrong rebuild would be caught?"
6
+ * Confidence comes from the oracle tier backing the module (durable > live >
7
+ * ephemeral > none) scaled by its mutation kill rate. The gate is warn-by-default
8
+ * and opt-in blocking so it never breaks an existing pipeline on adoption.
9
+ *
10
+ * Pure functions only — no I/O. Inputs (tier presence + mutation score) are
11
+ * produced upstream by the oracle eval runner and test-tier tagging.
12
+ */
13
+ /** Which durability tier of test backs a module (see qe-test-generation SKILL.md). */
14
+ export type RegenerabilityTier = 'durable' | 'live' | 'ephemeral' | 'none';
15
+ export interface ModuleTestProfile {
16
+ module: string;
17
+ /** Mutation kill rate of the module's tests, 0..1. */
18
+ mutationScore: number;
19
+ /** Has >=1 durable test (invariant / contract / property at the boundary). */
20
+ hasDurable: boolean;
21
+ /** Has live checks (monitoring / drift / cost assertions). */
22
+ hasLive?: boolean;
23
+ /** Has ephemeral tests (example-based / mock-call). */
24
+ hasEphemeral?: boolean;
25
+ }
26
+ export interface RegenerabilityResult {
27
+ module: string;
28
+ tier: RegenerabilityTier;
29
+ /** 0..1 confidence that deleting + regenerating this module is safe. */
30
+ score: number;
31
+ reason: string;
32
+ }
33
+ export interface RegenerabilityGateConfig {
34
+ /** Minimum mutation kill rate per module. */
35
+ mutationScoreMin: number;
36
+ /** Minimum regenerability score per module. */
37
+ regenerabilityMin: number;
38
+ /** 'warn' reports but never fails CI; 'block' fails CI when thresholds are unmet. */
39
+ mode: 'warn' | 'block';
40
+ }
41
+ /** Non-blocking by default — adoption must not break existing pipelines. */
42
+ export declare const DEFAULT_REGENERABILITY_GATE: RegenerabilityGateConfig;
43
+ export interface RegenerabilityGateVerdict {
44
+ /** True when every module meets both thresholds. */
45
+ passed: boolean;
46
+ /** True only when the gate should fail CI: mode === 'block' AND not passed. */
47
+ blocking: boolean;
48
+ mode: 'warn' | 'block';
49
+ results: RegenerabilityResult[];
50
+ failures: Array<{
51
+ module: string;
52
+ reasons: string[];
53
+ }>;
54
+ summary: string;
55
+ }
56
+ /** Highest tier of test present on the module. Durable wins because it survives a rewrite. */
57
+ export declare function classifyTier(profile: ModuleTestProfile): RegenerabilityTier;
58
+ /**
59
+ * Regenerability = fault-detection (mutation score) discounted by how well the
60
+ * backing tests survive a reimplementation. Ephemeral tests are coupled to the
61
+ * current code, so even a high mutation score earns limited regeneration
62
+ * confidence; durable tests earn full confidence for their kill rate.
63
+ */
64
+ export declare function regenerabilityScore(profile: ModuleTestProfile): RegenerabilityResult;
65
+ /**
66
+ * Evaluate the regenerability gate over a set of modules.
67
+ * `passed` reflects thresholds; `blocking` reflects whether CI should fail.
68
+ */
69
+ export declare function evaluateRegenerabilityGate(profiles: ModuleTestProfile[], config?: RegenerabilityGateConfig): RegenerabilityGateVerdict;
70
+ //# sourceMappingURL=regenerability-gate.d.ts.map
@@ -0,0 +1,91 @@
1
+ /**
2
+ * Regenerability Gate (ADR-113)
3
+ *
4
+ * Answers the Deletion Test per module: "if I deleted this module and
5
+ * regenerated it, how confident am I that a wrong rebuild would be caught?"
6
+ * Confidence comes from the oracle tier backing the module (durable > live >
7
+ * ephemeral > none) scaled by its mutation kill rate. The gate is warn-by-default
8
+ * and opt-in blocking so it never breaks an existing pipeline on adoption.
9
+ *
10
+ * Pure functions only — no I/O. Inputs (tier presence + mutation score) are
11
+ * produced upstream by the oracle eval runner and test-tier tagging.
12
+ */
13
+ /** Non-blocking by default — adoption must not break existing pipelines. */
14
+ export const DEFAULT_REGENERABILITY_GATE = {
15
+ mutationScoreMin: 0.6,
16
+ regenerabilityMin: 0.5,
17
+ mode: 'warn',
18
+ };
19
+ const round = (n) => Math.round(n * 10000) / 10000;
20
+ const clamp01 = (n) => Math.max(0, Math.min(1, n));
21
+ /** Highest tier of test present on the module. Durable wins because it survives a rewrite. */
22
+ export function classifyTier(profile) {
23
+ if (profile.hasDurable)
24
+ return 'durable';
25
+ if (profile.hasLive)
26
+ return 'live';
27
+ if (profile.hasEphemeral)
28
+ return 'ephemeral';
29
+ return 'none';
30
+ }
31
+ /**
32
+ * Regenerability = fault-detection (mutation score) discounted by how well the
33
+ * backing tests survive a reimplementation. Ephemeral tests are coupled to the
34
+ * current code, so even a high mutation score earns limited regeneration
35
+ * confidence; durable tests earn full confidence for their kill rate.
36
+ */
37
+ export function regenerabilityScore(profile) {
38
+ const tier = classifyTier(profile);
39
+ const mutation = clamp01(profile.mutationScore);
40
+ let score;
41
+ let reason;
42
+ switch (tier) {
43
+ case 'durable':
44
+ score = mutation;
45
+ reason = `durable tests kill ${(mutation * 100).toFixed(0)}% of mutants and survive a reimplementation`;
46
+ break;
47
+ case 'live':
48
+ score = mutation * 0.7;
49
+ reason = `live checks only; ${(mutation * 100).toFixed(0)}% mutation — add durable boundary tests for full confidence`;
50
+ break;
51
+ case 'ephemeral':
52
+ score = mutation * 0.4;
53
+ reason = `only ephemeral (example/mock) tests — coupled to the current implementation, would not survive a rewrite`;
54
+ break;
55
+ case 'none':
56
+ default:
57
+ score = 0;
58
+ reason = `no tests — deleting this module is unrecoverable (fails the Deletion Test)`;
59
+ break;
60
+ }
61
+ return { module: profile.module, tier, score: round(score), reason };
62
+ }
63
+ /**
64
+ * Evaluate the regenerability gate over a set of modules.
65
+ * `passed` reflects thresholds; `blocking` reflects whether CI should fail.
66
+ */
67
+ export function evaluateRegenerabilityGate(profiles, config = DEFAULT_REGENERABILITY_GATE) {
68
+ const results = profiles.map(regenerabilityScore);
69
+ const failures = [];
70
+ for (let i = 0; i < profiles.length; i++) {
71
+ const p = profiles[i];
72
+ const r = results[i];
73
+ const reasons = [];
74
+ if (clamp01(p.mutationScore) < config.mutationScoreMin) {
75
+ reasons.push(`mutation score ${(clamp01(p.mutationScore) * 100).toFixed(0)}% < ${(config.mutationScoreMin * 100).toFixed(0)}%`);
76
+ }
77
+ if (r.score < config.regenerabilityMin) {
78
+ reasons.push(`regenerability ${(r.score * 100).toFixed(0)}% < ${(config.regenerabilityMin * 100).toFixed(0)}% (${r.tier})`);
79
+ }
80
+ if (reasons.length > 0)
81
+ failures.push({ module: p.module, reasons });
82
+ }
83
+ const passed = failures.length === 0;
84
+ const blocking = config.mode === 'block' && !passed;
85
+ const verb = passed ? 'PASS' : config.mode === 'block' ? 'FAIL (blocking)' : 'WARN (non-blocking)';
86
+ const summary = profiles.length === 0
87
+ ? 'regenerability gate: no modules evaluated'
88
+ : `regenerability gate: ${verb} — ${profiles.length - failures.length}/${profiles.length} modules meet thresholds`;
89
+ return { passed, blocking, mode: config.mode, results, failures, summary };
90
+ }
91
+ //# sourceMappingURL=regenerability-gate.js.map