agentic-qe 3.11.5 → 3.12.0

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 (369) hide show
  1. package/.claude/helpers/.helpers-version +1 -0
  2. package/.claude/helpers/auto-memory-hook.mjs +35 -3
  3. package/.claude/helpers/brain-checkpoint.cjs +16 -1
  4. package/.claude/helpers/helpers.manifest.json +12 -0
  5. package/.claude/helpers/hook-handler.cjs +26 -5
  6. package/.claude/helpers/intelligence.cjs +14 -1
  7. package/.claude/hooks/aqe-hook.cjs +14 -1
  8. package/.claude/skills/skills-manifest.json +1 -1
  9. package/CHANGELOG.md +52 -0
  10. package/assets/skills/skills-manifest.json +1 -1
  11. package/dist/adapters/a2a/auth/routes.js +59 -28
  12. package/dist/cli/bundle.js +6 -6
  13. package/dist/cli/chunks/adapter-6IWRIHF3.js +2 -0
  14. package/dist/cli/chunks/{agent-booster-wasm-CSTBLNYZ.js → agent-booster-wasm-IO54X6IQ.js} +2 -2
  15. package/dist/cli/chunks/{agent-handler-M4W4GTXN.js → agent-handler-A57SZUCW.js} +2 -2
  16. package/dist/cli/chunks/{agent-memory-branch-VGXFYLSQ.js → agent-memory-branch-BX7LRFGN.js} +2 -2
  17. package/dist/cli/chunks/aqe-learning-engine-FSF5U67K.js +2 -0
  18. package/dist/cli/chunks/{arena-FKSD3LLM.js → arena-UTC4YY6Y.js} +4 -4
  19. package/dist/cli/chunks/{arena-IQBRGWAG.js → arena-Y3XTX6O7.js} +2 -2
  20. package/dist/cli/chunks/{audit-7NSGRR4Z.js → audit-L4RL2AOY.js} +3 -3
  21. package/dist/cli/chunks/base-2CKCJU3O.js +2 -0
  22. package/dist/cli/chunks/{hnswlib-node-E6NSZPP2.js → better-sqlite3-LRDXKYOJ.js} +2 -2
  23. package/dist/cli/chunks/{brain-handler-M6A3UB66.js → brain-handler-OHDPI5TQ.js} +3 -3
  24. package/dist/cli/chunks/{branch-enumerator-2JGKY4BB.js → branch-enumerator-ZRXE2CQ7.js} +2 -2
  25. package/dist/cli/chunks/{browser-J43WQPJL.js → browser-NT33FG76.js} +2 -2
  26. package/dist/cli/chunks/browser-workflow-UGYJE64S.js +2 -0
  27. package/dist/cli/chunks/{chunk-JDSHUECG.js → chunk-27JCWG5J.js} +2 -2
  28. package/dist/cli/chunks/{chunk-B2VBDMDI.js → chunk-2ALNNXFF.js} +2 -2
  29. package/dist/cli/chunks/{chunk-SK754ZSH.js → chunk-2AOOIAW3.js} +4 -4
  30. package/dist/cli/chunks/{chunk-ZG5UAEEO.js → chunk-2AR4B3DI.js} +2 -2
  31. package/dist/cli/chunks/{chunk-GODAWJMZ.js → chunk-2KHDGC7N.js} +2 -2
  32. package/dist/cli/chunks/{chunk-YZSTZUGJ.js → chunk-2UMCB7AH.js} +1 -1
  33. package/dist/cli/chunks/{chunk-Q5TR6ETB.js → chunk-335GHVJV.js} +3 -3
  34. package/dist/cli/chunks/{chunk-UBI2EOS3.js → chunk-36MPDANH.js} +1 -1
  35. package/dist/cli/chunks/{chunk-C4EZNOWK.js → chunk-3AFNXU45.js} +1 -1
  36. package/dist/cli/chunks/{chunk-7YSBATSN.js → chunk-3B4XXFKD.js} +2 -2
  37. package/dist/cli/chunks/{chunk-DPL762HU.js → chunk-4GU656WM.js} +1 -1
  38. package/dist/cli/chunks/{chunk-I3NWKPXJ.js → chunk-4SALW7OT.js} +2 -2
  39. package/dist/cli/chunks/{chunk-7BCRULCP.js → chunk-5FR5GBUT.js} +2 -2
  40. package/dist/cli/chunks/{chunk-4XJ2A3HY.js → chunk-5VBPIJUZ.js} +4 -4
  41. package/dist/cli/chunks/chunk-5XFX25AJ.js +4 -0
  42. package/dist/cli/chunks/{chunk-UORTQXJ2.js → chunk-5YGESYBC.js} +1 -1
  43. package/dist/cli/chunks/{chunk-ABU64UWB.js → chunk-62RELCU6.js} +1 -1
  44. package/dist/cli/chunks/{chunk-2XQHG56O.js → chunk-64M3FFM4.js} +2 -2
  45. package/dist/cli/chunks/{chunk-K4I7UIU5.js → chunk-6JNNZGI2.js} +1 -1
  46. package/dist/cli/chunks/{chunk-XT4TDLOB.js → chunk-6X3RJBA3.js} +2 -2
  47. package/dist/cli/chunks/{chunk-JATLFS6A.js → chunk-72VZGAMJ.js} +1 -1
  48. package/dist/cli/chunks/{chunk-AGJOGUP5.js → chunk-7F7U2HUH.js} +1 -1
  49. package/dist/cli/chunks/{chunk-ZPP57WQU.js → chunk-7HJHXSYT.js} +2 -2
  50. package/dist/cli/chunks/{chunk-6T65OKUM.js → chunk-7WX3MKRS.js} +2 -2
  51. package/dist/cli/chunks/{chunk-5WMU7XCF.js → chunk-7ZIVDGSN.js} +1 -1
  52. package/dist/cli/chunks/{chunk-M6FW56MV.js → chunk-AAATFEIL.js} +2 -2
  53. package/dist/cli/chunks/{chunk-2XPMATEK.js → chunk-AEX75YGI.js} +2 -2
  54. package/dist/cli/chunks/chunk-BA6U7NSR.js +2 -0
  55. package/dist/cli/chunks/{chunk-4QOI5JS7.js → chunk-BB4OVXWF.js} +1 -1
  56. package/dist/cli/chunks/{chunk-K4C25BWV.js → chunk-BBC526PL.js} +2 -2
  57. package/dist/cli/chunks/{chunk-354367AP.js → chunk-BGRJZH5Q.js} +2 -2
  58. package/dist/cli/chunks/{chunk-7KXPNNMR.js → chunk-BUYPRUNY.js} +2 -2
  59. package/dist/cli/chunks/{chunk-O7J54OHN.js → chunk-BZPF6GTL.js} +1 -1
  60. package/dist/cli/chunks/{chunk-NCSXLMDL.js → chunk-C4SZSPXY.js} +2 -2
  61. package/dist/cli/chunks/{chunk-YBPLJRVT.js → chunk-C6GYLCTX.js} +2 -2
  62. package/dist/cli/chunks/{chunk-53YOYZW5.js → chunk-CC5G3K4X.js} +2 -2
  63. package/dist/cli/chunks/{chunk-UBY322ED.js → chunk-CHO54B34.js} +2 -2
  64. package/dist/cli/chunks/{chunk-EK3HPH6A.js → chunk-CMGYUCM7.js} +1 -1
  65. package/dist/cli/chunks/{chunk-W72FJA2H.js → chunk-CSEEGX5T.js} +2 -2
  66. package/dist/cli/chunks/{chunk-OS2HHJTM.js → chunk-CVGXB7IX.js} +2 -2
  67. package/dist/cli/chunks/{chunk-SE3JFUKP.js → chunk-DQDFACYW.js} +1 -1
  68. package/dist/cli/chunks/chunk-DR7PCO3S.js +153 -0
  69. package/dist/cli/chunks/{chunk-4MHN7JWC.js → chunk-DTOE3NYW.js} +2 -2
  70. package/dist/cli/chunks/{chunk-FGD6HINU.js → chunk-DXOMRWDC.js} +1 -1
  71. package/dist/cli/chunks/{chunk-3V36WMIO.js → chunk-EGH3H7QO.js} +1 -1
  72. package/dist/cli/chunks/{chunk-52U5BFZP.js → chunk-EM2JIIAQ.js} +2 -2
  73. package/dist/cli/chunks/{chunk-ZLBY25MB.js → chunk-ESDGCTC4.js} +1 -1
  74. package/dist/cli/chunks/{chunk-MTBGOWJA.js → chunk-EZE2HRQB.js} +2 -2
  75. package/dist/cli/chunks/{chunk-KVVJVMDM.js → chunk-FEEMJDUF.js} +2 -2
  76. package/dist/cli/chunks/{chunk-JBKZ5TUM.js → chunk-FI5SSLEF.js} +2 -2
  77. package/dist/cli/chunks/{chunk-J5XDKVI7.js → chunk-FKPUPQQT.js} +2 -2
  78. package/dist/cli/chunks/{chunk-URP75DL4.js → chunk-FOPS6DRZ.js} +1 -1
  79. package/dist/cli/chunks/{chunk-GW6XWMX2.js → chunk-FU5RNEXV.js} +2 -2
  80. package/dist/cli/chunks/{chunk-3JF5A72M.js → chunk-FZIHOMGY.js} +2 -2
  81. package/dist/cli/chunks/{chunk-AOQYORVA.js → chunk-FZRU73M4.js} +2 -2
  82. package/dist/cli/chunks/{chunk-MEIU7457.js → chunk-G5JQLUUO.js} +2 -2
  83. package/dist/cli/chunks/{chunk-MHMQ6MCT.js → chunk-G6LR7FK7.js} +2 -2
  84. package/dist/cli/chunks/{chunk-J6PFPY7V.js → chunk-G6RKUEGL.js} +2 -2
  85. package/dist/cli/chunks/{chunk-EEKG35K5.js → chunk-GCF42L7M.js} +3 -3
  86. package/dist/cli/chunks/{chunk-OS62Y77J.js → chunk-GGMQOEZZ.js} +2 -2
  87. package/dist/cli/chunks/{chunk-QKK7VBVB.js → chunk-HAEUPIKW.js} +2 -2
  88. package/dist/cli/chunks/{chunk-4RTWPR3X.js → chunk-HDJMD6UH.js} +1 -1
  89. package/dist/cli/chunks/{chunk-EDOGRFAG.js → chunk-HW62TB4T.js} +1 -1
  90. package/dist/cli/chunks/{chunk-LOE2JETO.js → chunk-I6WHYRWB.js} +2 -2
  91. package/dist/cli/chunks/{chunk-VMFAANWX.js → chunk-ICK3B24H.js} +2 -2
  92. package/dist/cli/chunks/{chunk-C5C4W572.js → chunk-IDLNLSQI.js} +2 -2
  93. package/dist/cli/chunks/{chunk-PVDXNQPL.js → chunk-IJUYHIKN.js} +2 -2
  94. package/dist/cli/chunks/{chunk-3WR35GFF.js → chunk-IKVNYK7Y.js} +2 -2
  95. package/dist/cli/chunks/{chunk-62OTU2AP.js → chunk-JOBCMNTP.js} +2 -2
  96. package/dist/cli/chunks/{chunk-BJLA2IX7.js → chunk-JYX7AZHE.js} +2 -2
  97. package/dist/cli/chunks/{chunk-6Q57K4YD.js → chunk-JYXSVSH2.js} +2 -2
  98. package/dist/cli/chunks/{chunk-CKOF27L7.js → chunk-K5SN66B4.js} +2 -2
  99. package/dist/cli/chunks/{chunk-PW72M2FE.js → chunk-KDLYTJ5C.js} +2 -2
  100. package/dist/cli/chunks/{chunk-4LODYRNV.js → chunk-KI5BP4X5.js} +2 -2
  101. package/dist/cli/chunks/{chunk-CDJP6COA.js → chunk-KJWQ7ENF.js} +2 -2
  102. package/dist/cli/chunks/{chunk-FII3WCCY.js → chunk-KN5GOEYK.js} +2 -2
  103. package/dist/cli/chunks/{chunk-7DTMENY6.js → chunk-KZ37VHMJ.js} +2 -2
  104. package/dist/cli/chunks/{chunk-I3ANRYQ6.js → chunk-KZMRU7DL.js} +2 -2
  105. package/dist/cli/chunks/{chunk-YFCULQBP.js → chunk-L5ZLOW3K.js} +2 -2
  106. package/dist/cli/chunks/{chunk-37ZUF5NX.js → chunk-LMJUQWR7.js} +1 -1
  107. package/dist/cli/chunks/{chunk-HJWT4KME.js → chunk-MBF3Q7FQ.js} +1 -1
  108. package/dist/cli/chunks/chunk-MDT3LIXS.js +2 -0
  109. package/dist/cli/chunks/{chunk-3LY7OCSO.js → chunk-MJPYNGZ7.js} +1 -1
  110. package/dist/cli/chunks/{chunk-SO6G4IX3.js → chunk-MK3J7JVZ.js} +2 -2
  111. package/dist/cli/chunks/{chunk-VN2HHBZN.js → chunk-MUAHFGIX.js} +2 -2
  112. package/dist/cli/chunks/{chunk-6R3YOAKO.js → chunk-MUV56BPK.js} +2 -2
  113. package/dist/cli/chunks/{chunk-XLT3FYS7.js → chunk-NLHISTL2.js} +2 -2
  114. package/dist/cli/chunks/{chunk-26WEI3P4.js → chunk-NNGCUJWQ.js} +2 -2
  115. package/dist/cli/chunks/{chunk-W7TYKPLY.js → chunk-NW7G57NR.js} +2 -2
  116. package/dist/cli/chunks/{chunk-Y6DWJKHU.js → chunk-O3C5RRDQ.js} +3 -3
  117. package/dist/cli/chunks/{chunk-TEIWJ3GJ.js → chunk-OHSVDMF7.js} +1 -1
  118. package/dist/cli/chunks/{chunk-KP3R2M2G.js → chunk-OPIWFXME.js} +1 -1
  119. package/dist/cli/chunks/{chunk-FGSIID5C.js → chunk-P52YORQG.js} +2 -2
  120. package/dist/cli/chunks/chunk-PM566XEO.js +2 -0
  121. package/dist/cli/chunks/chunk-POKMJTD2.js +2 -0
  122. package/dist/cli/chunks/{chunk-HC6KTVFR.js → chunk-PQMLIVGV.js} +2 -2
  123. package/dist/cli/chunks/{chunk-RJN2RM76.js → chunk-PT3FTGKZ.js} +2 -2
  124. package/dist/cli/chunks/{chunk-ZXEWTZFR.js → chunk-Q5YRPS4P.js} +1 -1
  125. package/dist/cli/chunks/{chunk-AL5VJJN4.js → chunk-QJ6H2HQQ.js} +1 -1
  126. package/dist/cli/chunks/{chunk-AXKWV5NF.js → chunk-RG552ROA.js} +3 -3
  127. package/dist/cli/chunks/{chunk-RKXZLTWR.js → chunk-RHC7TFPU.js} +2 -2
  128. package/dist/cli/chunks/{chunk-RFLHPLET.js → chunk-RMFRFING.js} +1 -1
  129. package/dist/cli/chunks/{chunk-WMZ2QGGS.js → chunk-RQN4HWGV.js} +2 -2
  130. package/dist/cli/chunks/{chunk-3I4TCMOJ.js → chunk-RYUSZ43T.js} +1 -1
  131. package/dist/cli/chunks/{chunk-BTLUWH4R.js → chunk-RZDNCTOA.js} +2 -2
  132. package/dist/cli/chunks/chunk-SCMXIBI7.js +2 -0
  133. package/dist/cli/chunks/{chunk-FMNXHVIN.js → chunk-SPEUF7ZL.js} +2 -2
  134. package/dist/cli/chunks/{chunk-IU5RSN6M.js → chunk-SSXAW3ER.js} +2 -2
  135. package/dist/cli/chunks/{chunk-WPSK237F.js → chunk-TC2JE5OK.js} +3 -3
  136. package/dist/cli/chunks/{chunk-DFRRWOEX.js → chunk-TED4KOSK.js} +2 -2
  137. package/dist/cli/chunks/{chunk-SUL3I6QZ.js → chunk-TJ6N4CCX.js} +2 -2
  138. package/dist/cli/chunks/{chunk-Y25PO65W.js → chunk-TJEJ4UVX.js} +2 -2
  139. package/dist/cli/chunks/{chunk-G2ZIJZJ7.js → chunk-TO5PQSDD.js} +2 -2
  140. package/dist/cli/chunks/{chunk-MMEXHZUC.js → chunk-TR5GOGH3.js} +5 -5
  141. package/dist/cli/chunks/{chunk-OGNTCZKK.js → chunk-UGJQJSPB.js} +1 -1
  142. package/dist/cli/chunks/{chunk-AF6P5RWY.js → chunk-USB44IHJ.js} +2 -2
  143. package/dist/cli/chunks/{chunk-DLBVADWQ.js → chunk-UUOXV3NS.js} +42 -42
  144. package/dist/cli/chunks/chunk-UVVKFBF7.js +2 -0
  145. package/dist/cli/chunks/{chunk-FIPKIIMS.js → chunk-V2MD5EDD.js} +2 -2
  146. package/dist/cli/chunks/{chunk-DVW66FPU.js → chunk-VA7TEOPM.js} +1 -1
  147. package/dist/cli/chunks/{chunk-MCHEUSY4.js → chunk-VMP4M5PB.js} +1 -1
  148. package/dist/cli/chunks/{chunk-4Y3LGBKJ.js → chunk-VS4GMNJK.js} +3 -3
  149. package/dist/cli/chunks/{chunk-XKQY2Z3Q.js → chunk-VWJSWXHG.js} +1 -1
  150. package/dist/cli/chunks/{chunk-LPR2R3AN.js → chunk-VZ67ZDB3.js} +3 -3
  151. package/dist/cli/chunks/{chunk-TTJJ4DQE.js → chunk-W2OMW6UU.js} +2 -2
  152. package/dist/cli/chunks/{chunk-62UM7Q5N.js → chunk-W766S4SK.js} +1 -1
  153. package/dist/cli/chunks/{chunk-7P6X4BFO.js → chunk-WJYTLRA5.js} +3 -3
  154. package/dist/cli/chunks/{chunk-AOXJFDH5.js → chunk-WNASEUBW.js} +10 -10
  155. package/dist/cli/chunks/{chunk-YGVDP6X7.js → chunk-WT4ZDDFM.js} +1 -1
  156. package/dist/cli/chunks/{chunk-IBDQWKI3.js → chunk-XEYW3V5I.js} +2 -2
  157. package/dist/cli/chunks/{chunk-BLPWJQTY.js → chunk-XIFPIVZI.js} +2 -2
  158. package/dist/cli/chunks/{chunk-D45QLJEL.js → chunk-Y2MCIIJD.js} +1 -1
  159. package/dist/cli/chunks/{chunk-WHHQIL4F.js → chunk-YKOTOCO6.js} +2 -2
  160. package/dist/cli/chunks/{chunk-TRNBQFFG.js → chunk-Z3W3R4CW.js} +2 -2
  161. package/dist/cli/chunks/{chunk-KQVIWE3W.js → chunk-ZT2WHCVM.js} +2 -2
  162. package/dist/cli/chunks/{chunk-TBT3OFRW.js → chunk-ZVPAFX4I.js} +2 -2
  163. package/dist/cli/chunks/{chunk-VMWRMINE.js → chunk-ZWC6CM4R.js} +1 -1
  164. package/dist/cli/chunks/{ci-CBNVLOOQ.js → ci-RJH5LAL3.js} +2 -2
  165. package/dist/cli/chunks/{ci-output-I4HY2FYJ.js → ci-output-62SGMGB2.js} +2 -2
  166. package/dist/cli/chunks/{circuit-breaker-5VRBKGWL.js → circuit-breaker-QXTS5ZAW.js} +2 -2
  167. package/dist/cli/chunks/{claude-flow-setup-XPJPKHIO.js → claude-flow-setup-BBCCT5WV.js} +2 -2
  168. package/dist/cli/chunks/client-E2XUBCLK.js +2 -0
  169. package/dist/cli/chunks/{cline-installer-OFRDUUWZ.js → cline-installer-IZCUJJ3I.js} +2 -2
  170. package/dist/cli/chunks/{code-QIZQVB3E.js → code-AWNVOZ7S.js} +2 -2
  171. package/dist/cli/chunks/{code-index-extractor-LMUUWEX4.js → code-index-extractor-MX65BKMI.js} +2 -2
  172. package/dist/cli/chunks/{codex-installer-N2MKIZ2S.js → codex-installer-EQT6JVLM.js} +2 -2
  173. package/dist/cli/chunks/{completions-Y36S3C5J.js → completions-WOJAM45W.js} +2 -2
  174. package/dist/cli/chunks/{complexity-analyzer-73YS3WUD.js → complexity-analyzer-3DJB7V3K.js} +2 -2
  175. package/dist/cli/chunks/{continuedev-installer-SAOTP6J3.js → continuedev-installer-P4KWUTCJ.js} +2 -2
  176. package/dist/cli/chunks/{copilot-installer-A4HXF6HE.js → copilot-installer-FFZWTMWQ.js} +2 -2
  177. package/dist/cli/chunks/core-handlers-46Z5VOO6.js +2 -0
  178. package/dist/cli/chunks/{cost-tracker-P26XUVZS.js → cost-tracker-CYBOV3NI.js} +2 -2
  179. package/dist/cli/chunks/{coverage-HVNHSMVJ.js → coverage-GTZJBSC4.js} +3 -3
  180. package/dist/cli/chunks/cross-domain-router-SXQ3HFRY.js +2 -0
  181. package/dist/cli/chunks/{cursor-installer-46BQFTYZ.js → cursor-installer-WZIVXGGB.js} +2 -2
  182. package/dist/cli/chunks/{daemon-YE7K2AZF.js → daemon-JWMHEJEN.js} +4 -4
  183. package/dist/cli/chunks/{daemon-Y54O3FLT.js → daemon-MSFN2LXY.js} +3 -3
  184. package/dist/cli/chunks/{dag-attention-scheduler-ETA7YY52.js → dag-attention-scheduler-4TWOTTQE.js} +2 -2
  185. package/dist/cli/chunks/{detect-5WLQ2J3E.js → detect-YZ6AGQPB.js} +2 -2
  186. package/dist/cli/chunks/{dist-node-45WW6I7J.js → dist-node-3EM2XH54.js} +2 -2
  187. package/dist/cli/chunks/{domain-handler-J7DQV74M.js → domain-handler-4XU5BINU.js} +2 -2
  188. package/dist/cli/chunks/{domain-transfer-GD2EGQVR.js → domain-transfer-HUFC7I52.js} +2 -2
  189. package/dist/cli/chunks/dream-R6MQQQ3N.js +2 -0
  190. package/dist/cli/chunks/{embed-and-insert-pattern-JELNEA2D.js → embed-and-insert-pattern-J5ZFM6YX.js} +2 -2
  191. package/dist/cli/chunks/{eval-A4PA5G2U.js → eval-XYOA3EH2.js} +2 -2
  192. package/dist/cli/chunks/{experience-capture-middleware-MLHTYWTA.js → experience-capture-middleware-E3RYQB6Z.js} +3 -3
  193. package/dist/cli/chunks/{fast-paths-QYDTITRV.js → fast-paths-DKIYN2YS.js} +2 -2
  194. package/dist/cli/chunks/{feature-flags-MQYYRHIK.js → feature-flags-S2RNZATS.js} +2 -2
  195. package/dist/cli/chunks/{feature-flags-H4MSY26Z.js → feature-flags-ZB63Z7N5.js} +2 -2
  196. package/dist/cli/chunks/{file-discovery-RMFVJNGL.js → file-discovery-USJJLYQU.js} +2 -2
  197. package/dist/cli/chunks/{fleet-7KZQOTAC.js → fleet-4MUPHSF5.js} +3 -3
  198. package/dist/cli/chunks/{gnn-wrapper-NMZFTGVH.js → gnn-wrapper-PYOQZKX6.js} +2 -2
  199. package/dist/cli/chunks/{heartbeat-handler-7BQDK7MG.js → heartbeat-handler-HLO5XCG7.js} +4 -4
  200. package/dist/cli/chunks/heartbeat-scheduler-OSDPJT6A.js +2 -0
  201. package/dist/cli/chunks/hnsw-adapter-KMGSHBIN.js +2 -0
  202. package/dist/cli/chunks/hnsw-index-IMFRAOPE.js +2 -0
  203. package/dist/cli/chunks/{hnsw-legacy-bridge-TPPGBPKF.js → hnsw-legacy-bridge-FZEH2KLM.js} +2 -2
  204. package/dist/cli/chunks/{better-sqlite3-2KR4LQRU.js → hnswlib-node-VS6L5VUG.js} +2 -2
  205. package/dist/cli/chunks/{hooks-CYZIUYSH.js → hooks-R2757K57.js} +10 -10
  206. package/dist/cli/chunks/hybrid-router-57QSWSWC.js +2 -0
  207. package/dist/cli/chunks/{hypergraph-engine-WC6DMTYQ.js → hypergraph-engine-EAV3GJ5D.js} +2 -2
  208. package/dist/cli/chunks/{hypergraph-handler-GTGA3TXJ.js → hypergraph-handler-5ERXAVGH.js} +3 -3
  209. package/dist/cli/chunks/impact-analyzer-OC4MPBGA.js +2 -0
  210. package/dist/cli/chunks/{init-handler-N3Z72JNI.js → init-handler-RXUSEMG7.js} +6 -6
  211. package/dist/cli/chunks/init-wizard-CDBRL4PO.js +2 -0
  212. package/dist/cli/chunks/kernel-CQ7R3AAV.js +2 -0
  213. package/dist/cli/chunks/{kilocode-installer-FUX4V6II.js → kilocode-installer-ZUBVBHGT.js} +2 -2
  214. package/dist/cli/chunks/{kiro-installer-ZSNZT7ZR.js → kiro-installer-TRTRQDGL.js} +2 -2
  215. package/dist/cli/chunks/knowledge-graph-UXNH7RY4.js +2 -0
  216. package/dist/cli/chunks/{learning-UQY64COU.js → learning-UYXWAU5D.js} +3 -3
  217. package/dist/cli/chunks/{llm-router-CMHGGX6N.js → llm-router-TB5OJPEV.js} +4 -4
  218. package/dist/cli/chunks/llm-router-service-UV34YXBE.js +2 -0
  219. package/dist/cli/chunks/{load-E6WH4QN2.js → load-ELPSUIPV.js} +2 -2
  220. package/dist/cli/chunks/load-test-2VEN3PQZ.js +2 -0
  221. package/dist/cli/chunks/{mcp-UM5VTW6N.js → mcp-UX7TK3XV.js} +2 -2
  222. package/dist/cli/chunks/{memory-7Q3XDUE5.js → memory-W3LG6H6N.js} +5 -5
  223. package/dist/cli/chunks/memory-backend-TZL5U6F3.js +2 -0
  224. package/dist/cli/chunks/memory-handlers-BNXAYS2P.js +2 -0
  225. package/dist/cli/chunks/{multi-model-executor-LZENWVRR.js → multi-model-executor-227LWZRY.js} +2 -2
  226. package/dist/cli/chunks/{opencode-installer-O2JAIPLF.js → opencode-installer-F4WKVWDL.js} +2 -2
  227. package/dist/cli/chunks/{orchestrator-DKZWXDRI.js → orchestrator-V4DBMGK6.js} +5 -5
  228. package/dist/cli/chunks/pattern-null-store-KLX2RNHM.js +2 -0
  229. package/dist/cli/chunks/{pattern-usage-recorder-CLUL4M55.js → pattern-usage-recorder-BY3HEWSU.js} +2 -2
  230. package/dist/cli/chunks/{pipeline-2VDLTR5J.js → pipeline-3F5RIESX.js} +2 -2
  231. package/dist/cli/chunks/{platform-4N4Q5XYX.js → platform-KCGXTZO3.js} +2 -2
  232. package/dist/cli/chunks/{plugin-GY5AU5CS.js → plugin-2H552KOV.js} +2 -2
  233. package/dist/cli/chunks/{prime-radiant-advanced-wasm-TQ4DKDZS.js → prime-radiant-advanced-wasm-EFKVL7VN.js} +2 -2
  234. package/dist/cli/chunks/protocol-executor-5HJKW6MC.js +2 -0
  235. package/dist/cli/chunks/{protocol-handler-T3LZ3WRG.js → protocol-handler-ELGYV7D2.js} +2 -2
  236. package/dist/cli/chunks/{prove-OV7S5J4W.js → prove-AYJCQYNI.js} +2 -2
  237. package/dist/cli/chunks/provider-manager-TRZSBXD3.js +2 -0
  238. package/dist/cli/chunks/qe-reasoning-bank-RCEYSLVV.js +2 -0
  239. package/dist/cli/chunks/{quality-AXD4NLQA.js → quality-HH7L5A7V.js} +2 -2
  240. package/dist/cli/chunks/quality-gate-NAQLXE4C.js +7 -0
  241. package/dist/cli/chunks/queen-coordinator-6JFZD54W.js +2 -0
  242. package/dist/cli/chunks/{real-embeddings-2PUCC7FG.js → real-embeddings-IO3F4ZFR.js} +2 -2
  243. package/dist/cli/chunks/{roocode-installer-WJ5ARGLW.js → roocode-installer-X4TU5HO4.js} +2 -2
  244. package/dist/cli/chunks/router-KRLC46NS.js +2 -0
  245. package/dist/cli/chunks/routing-feedback-WW26H6SA.js +2 -0
  246. package/dist/cli/chunks/{routing-handler-CU6657SZ.js → routing-handler-ZJKGDDMT.js} +2 -2
  247. package/dist/cli/chunks/{ruvector-commands-IIF6VSFW.js → ruvector-commands-NXCSUBN2.js} +2 -2
  248. package/dist/cli/chunks/{rvf-dual-writer-YMQI7XO2.js → rvf-dual-writer-JMA74SKP.js} +2 -2
  249. package/dist/cli/chunks/{rvf-migration-adapter-HDE3PR2W.js → rvf-migration-adapter-BNTGH2KU.js} +2 -2
  250. package/dist/cli/chunks/{rvf-migration-coordinator-MQV5OA7K.js → rvf-migration-coordinator-7T2HHUOH.js} +2 -2
  251. package/dist/cli/chunks/rvf-native-adapter-OVQKPQUH.js +2 -0
  252. package/dist/cli/chunks/safe-db-UQOCQIH2.js +2 -0
  253. package/dist/cli/chunks/schedule-EUX7ZQUK.js +2 -0
  254. package/dist/cli/chunks/scheduler-MALHQKNR.js +2 -0
  255. package/dist/cli/chunks/{security-UM3IGDSM.js → security-XSK2QHB3.js} +3 -3
  256. package/dist/cli/chunks/{shared-rvf-adapter-I3SOJ6M4.js → shared-rvf-adapter-WLRKI7RY.js} +2 -2
  257. package/dist/cli/chunks/{shared-rvf-dual-writer-KQGC2UO7.js → shared-rvf-dual-writer-SZW3J7ZK.js} +2 -2
  258. package/dist/cli/chunks/sqlite-persistence-OBCLRP4L.js +2 -0
  259. package/dist/cli/chunks/{status-handler-OX4CJZME.js → status-handler-HGCKYJX2.js} +2 -2
  260. package/dist/cli/chunks/{structural-health-PYUMVBXJ.js → structural-health-4SJCFX63.js} +2 -2
  261. package/dist/cli/chunks/{sync-2TED3YTY.js → sync-7WAVNZGL.js} +2 -2
  262. package/dist/cli/chunks/{sync-VALFNTA6.js → sync-ATR4DUSA.js} +2 -2
  263. package/dist/cli/chunks/{task-handler-VPGAJVPC.js → task-handler-O6REL34Y.js} +2 -2
  264. package/dist/cli/chunks/{task-handlers-IB4UAMU6.js → task-handlers-WFV2ZYWW.js} +3 -3
  265. package/dist/cli/chunks/{test-OMRJOZB6.js → test-4LXUVHEU.js} +4 -4
  266. package/dist/cli/chunks/{test-scheduling-ZL3YFPBU.js → test-scheduling-OTN3DMKY.js} +3 -3
  267. package/dist/cli/chunks/{token-bootstrap-DNWZI7SH.js → token-bootstrap-VA7T4P42.js} +2 -2
  268. package/dist/cli/chunks/{token-usage-IYO7RGFF.js → token-usage-TLT6OXXR.js} +2 -2
  269. package/dist/cli/chunks/{transformers-53ALC34T.js → transformers-JI7LZRQ3.js} +2 -2
  270. package/dist/cli/chunks/{tree-sitter-wasm-parser-WUKJ2I2Q.js → tree-sitter-wasm-parser-QNIMHB4K.js} +2 -2
  271. package/dist/cli/chunks/{types-47FTEPMV.js → types-DJNWOAC6.js} +2 -2
  272. package/dist/cli/chunks/unified-memory-A5BS3LGX.js +2 -0
  273. package/dist/cli/chunks/unified-memory-hnsw-WJLJO5MY.js +2 -0
  274. package/dist/cli/chunks/unified-persistence-CFC2BKI5.js +2 -0
  275. package/dist/cli/chunks/{upgrade-QPLMJA5Z.js → upgrade-VEW4FL23.js} +2 -2
  276. package/dist/cli/chunks/{validate-3GVKZOVF.js → validate-O3P6PF7B.js} +2 -2
  277. package/dist/cli/chunks/{validate-swarm-XCRTLVM6.js → validate-swarm-M2HXHZVC.js} +2 -2
  278. package/dist/cli/chunks/{vibium-CH4VPKVZ.js → vibium-GOU55LUO.js} +2 -2
  279. package/dist/cli/chunks/visual-security-VPB6KVYJ.js +2 -0
  280. package/dist/cli/chunks/{web-tree-sitter-JDBNAZTV.js → web-tree-sitter-MXOI4GH3.js} +2 -2
  281. package/dist/cli/chunks/{windsurf-installer-3MNPVJBP.js → windsurf-installer-6GKT53IH.js} +2 -2
  282. package/dist/cli/chunks/{witness-chain-HR5UBV5J.js → witness-chain-OXGQGL26.js} +2 -2
  283. package/dist/cli/chunks/witness-chain-ZZAUAXDY.js +2 -0
  284. package/dist/cli/chunks/{witness-key-manager-G5SQTIBZ.js → witness-key-manager-PGFSQXUJ.js} +2 -2
  285. package/dist/cli/chunks/{workflow-43EMD5FY.js → workflow-ENBWRMBA.js} +4 -4
  286. package/dist/cli/chunks/workflow-orchestrator-S4LBFTYD.js +2 -0
  287. package/dist/cli/chunks/{wrappers-3N7AYNM3.js → wrappers-MHLNYANQ.js} +2 -2
  288. package/dist/cli/commands/quality-gate.d.ts +24 -0
  289. package/dist/cli/commands/quality-gate.js +135 -0
  290. package/dist/cli/index.js +5 -0
  291. package/dist/coordination/mincut/dream-integration.d.ts +11 -0
  292. package/dist/coordination/mincut/dream-integration.js +39 -12
  293. package/dist/integrations/ruvector/feature-flags.js +7 -0
  294. package/dist/learning/pattern-lifecycle.d.ts +16 -0
  295. package/dist/learning/pattern-lifecycle.js +77 -1
  296. package/dist/learning/provenance-tier.d.ts +52 -0
  297. package/dist/learning/provenance-tier.js +64 -0
  298. package/dist/learning/qe-flywheel/corpus-scorer.d.ts +55 -0
  299. package/dist/learning/qe-flywheel/corpus-scorer.js +293 -0
  300. package/dist/learning/qe-flywheel/coupled-anchor.d.ts +91 -0
  301. package/dist/learning/qe-flywheel/coupled-anchor.js +181 -0
  302. package/dist/learning/qe-flywheel/generation.d.ts +121 -0
  303. package/dist/learning/qe-flywheel/generation.js +167 -0
  304. package/dist/learning/qe-flywheel/policy.d.ts +37 -0
  305. package/dist/learning/qe-flywheel/policy.js +66 -0
  306. package/dist/learning/qe-flywheel/receipt-store.d.ts +31 -0
  307. package/dist/learning/qe-flywheel/receipt-store.js +89 -0
  308. package/dist/learning/qe-flywheel/receipt.d.ts +62 -0
  309. package/dist/learning/qe-flywheel/receipt.js +97 -0
  310. package/dist/mcp/bundle.js +396 -390
  311. package/dist/mcp/tools/quality-assessment/gate.d.ts +38 -0
  312. package/dist/mcp/tools/quality-assessment/gate.js +86 -0
  313. package/dist/mcp/tools/registry.d.ts +1 -0
  314. package/dist/mcp/tools/registry.js +3 -0
  315. package/dist/shared/safe-db.js +23 -4
  316. package/dist/validation/anchor-set.d.ts +74 -0
  317. package/dist/validation/anchor-set.js +78 -0
  318. package/dist/validation/frontier-judge.d.ts +99 -0
  319. package/dist/validation/frontier-judge.js +234 -0
  320. package/dist/validation/gate-reexecute.d.ts +165 -0
  321. package/dist/validation/gate-reexecute.js +255 -0
  322. package/dist/validation/quality-gate-runner.d.ts +49 -0
  323. package/dist/validation/quality-gate-runner.js +62 -0
  324. package/dist/validation/quality-verdict.d.ts +94 -0
  325. package/dist/validation/quality-verdict.js +120 -0
  326. package/package.json +1 -1
  327. package/dist/cli/chunks/adapter-KNM5R47J.js +0 -2
  328. package/dist/cli/chunks/aqe-learning-engine-MXPJLVR3.js +0 -2
  329. package/dist/cli/chunks/base-X4EXQ2AS.js +0 -2
  330. package/dist/cli/chunks/browser-workflow-4HX6RP5F.js +0 -2
  331. package/dist/cli/chunks/chunk-FHTYEAQ3.js +0 -2
  332. package/dist/cli/chunks/chunk-MIU5RUBJ.js +0 -149
  333. package/dist/cli/chunks/chunk-V6NAB5UZ.js +0 -2
  334. package/dist/cli/chunks/chunk-YR2JKBZO.js +0 -2
  335. package/dist/cli/chunks/chunk-ZMPAM4DY.js +0 -2
  336. package/dist/cli/chunks/client-AHXNCOHK.js +0 -2
  337. package/dist/cli/chunks/core-handlers-EEFLLMAZ.js +0 -2
  338. package/dist/cli/chunks/cross-domain-router-LT3H4SNJ.js +0 -2
  339. package/dist/cli/chunks/dream-4K3BK4IG.js +0 -2
  340. package/dist/cli/chunks/heartbeat-scheduler-IMPPGQUK.js +0 -2
  341. package/dist/cli/chunks/hnsw-adapter-EIAA6R2L.js +0 -2
  342. package/dist/cli/chunks/hnsw-index-ZXXP6AXZ.js +0 -2
  343. package/dist/cli/chunks/hybrid-router-LXWG4MLH.js +0 -2
  344. package/dist/cli/chunks/impact-analyzer-TP5LRFYH.js +0 -2
  345. package/dist/cli/chunks/init-wizard-AIOA5KOY.js +0 -2
  346. package/dist/cli/chunks/kernel-SQALRU6Q.js +0 -2
  347. package/dist/cli/chunks/knowledge-graph-JFVT6SNN.js +0 -2
  348. package/dist/cli/chunks/llm-router-service-XHFKTH3I.js +0 -2
  349. package/dist/cli/chunks/load-test-JEIFJKNN.js +0 -2
  350. package/dist/cli/chunks/memory-backend-NT7I37CP.js +0 -2
  351. package/dist/cli/chunks/memory-handlers-746D7NE7.js +0 -2
  352. package/dist/cli/chunks/pattern-null-store-6QU6WHDW.js +0 -2
  353. package/dist/cli/chunks/protocol-executor-GT2MZYUU.js +0 -2
  354. package/dist/cli/chunks/provider-manager-OATJ7R3D.js +0 -2
  355. package/dist/cli/chunks/qe-reasoning-bank-IJXNQ67O.js +0 -2
  356. package/dist/cli/chunks/queen-coordinator-6RBHWCUG.js +0 -2
  357. package/dist/cli/chunks/router-XKQRT5JK.js +0 -2
  358. package/dist/cli/chunks/routing-feedback-ACPSD4LW.js +0 -2
  359. package/dist/cli/chunks/rvf-native-adapter-SIWRKE33.js +0 -2
  360. package/dist/cli/chunks/safe-db-LCPUYMX4.js +0 -2
  361. package/dist/cli/chunks/schedule-HIQJCWXG.js +0 -2
  362. package/dist/cli/chunks/scheduler-QE5EJ5LE.js +0 -2
  363. package/dist/cli/chunks/sqlite-persistence-EU54UTMH.js +0 -2
  364. package/dist/cli/chunks/unified-memory-CJLMC2I4.js +0 -2
  365. package/dist/cli/chunks/unified-memory-hnsw-FDGR4D2J.js +0 -2
  366. package/dist/cli/chunks/unified-persistence-UFH5GLDN.js +0 -2
  367. package/dist/cli/chunks/visual-security-4ARJ7J2Y.js +0 -2
  368. package/dist/cli/chunks/witness-chain-73QC33ED.js +0 -2
  369. package/dist/cli/chunks/workflow-orchestrator-RKMMPXNA.js +0 -2
@@ -1,5 +1,5 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.11.5");process.exit(0)}
2
- import"./chunk-MTBGOWJA.js";import{b as $}from"./chunk-HJWT4KME.js";import{d as R}from"./chunk-FMNXHVIN.js";import{b as k,c as C,d as b}from"./chunk-BJLA2IX7.js";import{c as W}from"./chunk-CKOF27L7.js";import"./chunk-5WMU7XCF.js";import"./chunk-RKXZLTWR.js";import"./chunk-C4EZNOWK.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
+ import"./chunk-EZE2HRQB.js";import{b as $}from"./chunk-MBF3Q7FQ.js";import{d as R}from"./chunk-SPEUF7ZL.js";import{b as k,c as C,d as b}from"./chunk-JYX7AZHE.js";import{c as W}from"./chunk-K5SN66B4.js";import"./chunk-7ZIVDGSN.js";import"./chunk-RHC7TFPU.js";import"./chunk-3AFNXU45.js";import{Command as O}from"commander";import o from"chalk";function P(d,a){let m=d.indexOf("=");return m>0&&(a[d.substring(0,m)]=d.substring(m+1)),a}function x(d,a,m){let y=new O("workflow").description("Manage QE workflows and pipelines (ADR-041)");return y.command("run <file>").description("Execute a QE pipeline from YAML file").option("-w, --watch","Watch execution progress").option("-v, --verbose","Show detailed output").option("--params <json>","Additional parameters as JSON","{}").action(async(t,l)=>{if(!await m())return;let e=await import("fs"),c=(await import("path")).resolve(t);try{console.log(o.blue(`
3
3
  Running workflow from: ${t}
4
4
  `));let s=k(c);if(!s.success||!s.workflow){console.log(o.red("Failed to parse pipeline:"));for(let w of s.errors)console.log(o.red(` ${w}`));await a(1)}let r={...W(l.params,"params")};if(s.pipeline){for(let w of s.pipeline.stages)if(w.params)for(let[S,h]of Object.entries(w.params))r[S]=h}if(!d.workflowOrchestrator.getWorkflow(s.workflow.id)){let w=d.workflowOrchestrator.registerWorkflow(s.workflow);w.success||(console.log(o.red(`Failed to register workflow: ${w.error.message}`)),await a(1))}let n=await d.workflowOrchestrator.executeWorkflow(s.workflow.id,r);if(!n.success){console.log(o.red(`Failed to start workflow: ${n.error.message}`)),await a(1);return}let p=n.value;if(console.log(o.cyan(` Execution ID: ${p}`)),console.log(o.gray(` Workflow: ${s.workflow.name}`)),console.log(o.gray(` Stages: ${s.workflow.steps.length}`)),console.log(""),l.watch){console.log(o.blue(`Workflow Progress:
5
5
  `));let w,S=Date.now();for(;;){let g=d.workflowOrchestrator.getWorkflowStatus(p);if(!g)break;if(!w||w.progress!==g.progress||w.status!==g.status||JSON.stringify(w.currentSteps)!==JSON.stringify(g.currentSteps)){process.stdout.write("\r\x1B[K");let v="\u2588".repeat(Math.floor(g.progress/5))+"\u2591".repeat(20-Math.floor(g.progress/5)),D=g.status==="completed"?o.green:g.status==="failed"?o.red:g.status==="running"?o.yellow:o.gray;console.log(` [${v}] ${g.progress}% - ${D(g.status)}`),g.currentSteps.length>0&&l.verbose&&console.log(o.gray(` Running: ${g.currentSteps.join(", ")}`)),w=g}if(g.status==="completed"||g.status==="failed"||g.status==="cancelled")break;await new Promise(v=>setTimeout(v,500))}let h=d.workflowOrchestrator.getWorkflowStatus(p);if(h){console.log("");let g=h.duration||Date.now()-S;h.status==="completed"?(console.log(o.green("Workflow completed successfully")),console.log(o.gray(` Duration: ${$(g)}`)),console.log(o.gray(` Completed: ${h.completedSteps.length} stages`)),h.skippedSteps.length>0&&console.log(o.yellow(` Skipped: ${h.skippedSteps.length} stages`))):h.status==="failed"?(console.log(o.red("Workflow failed")),console.log(o.red(` Error: ${h.error}`)),console.log(o.gray(` Failed stages: ${h.failedSteps.join(", ")}`))):console.log(o.yellow(`Workflow ${h.status}`))}}else console.log(o.green("Workflow execution started")),console.log(o.gray(` Use 'aqe workflow status ${p}' to check progress`));console.log(""),await a(0)}catch(s){console.error(o.red(`
@@ -35,10 +35,10 @@ Workflow cancelled: ${t}
35
35
  `)):console.log(o.red(`
36
36
  Failed to cancel workflow: ${l.error.message}
37
37
  `)),await a(l.success?0:1)}catch(l){console.error(o.red(`
38
- Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-4HX6RP5F.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
38
+ Failed to cancel workflow:`),l),await a(1)}}),y.command("browser-list").description("List available browser workflow templates").action(async()=>{try{let{BrowserWorkflowTool:t}=await import("./browser-workflow-UGYJE64S.js"),e=await new t().invoke({});if(e.success&&e.data){console.log(o.blue(`
39
39
  Browser Workflow Templates:
40
40
  `));for(let u of e.data.availableTemplates)console.log(` ${o.cyan(u)}`);console.log("")}else console.log(o.red(`Failed: ${e.error||"Unknown error"}`));await a(0)}catch(t){console.error(o.red(`
41
- Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-4HX6RP5F.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-I4HY2FYJ.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
41
+ Failed:`),t),await a(1)}}),y.command("browser-load [template]").description("Load and validate a browser workflow template or inline YAML").option("--yaml <yaml>","Inline YAML workflow definition").option("-v, --var <key=value>","Variable override (repeatable)",P,{}).option("-F, --format <format>","Output format (text|json)","text").option("-o, --output <path>","Write output to file").action(async(t,l)=>{try{let{BrowserWorkflowTool:e}=await import("./browser-workflow-UGYJE64S.js"),{writeOutput:u,toJSON:c}=await import("./ci-output-62SGMGB2.js"),s=new e,f={variables:l.var||{}};if(l.yaml)f.workflowYaml=l.yaml;else if(t)if(t.endsWith(".yaml")||t.endsWith(".yml")){let i=await import("fs"),p=(await import("path")).resolve(t);i.existsSync(p)||(console.log(o.red(`
42
42
  File not found: ${p}
43
43
  `)),await a(1)),f.workflowYaml=i.readFileSync(p,"utf-8")}else f.templateName=t;else console.log(o.red(`
44
44
  Provide a template name or --yaml. Use "workflow browser-list" to see templates.
@@ -0,0 +1,2 @@
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
+ import{a,b,c,d}from"./chunk-I6WHYRWB.js";import"./chunk-G6LR7FK7.js";import"./chunk-C4SZSPXY.js";import"./chunk-SSXAW3ER.js";import"./chunk-MDT3LIXS.js";import"./chunk-TJEJ4UVX.js";import"./chunk-L5ZLOW3K.js";import"./chunk-K5SN66B4.js";import"./chunk-W2OMW6UU.js";import"./chunk-7ZIVDGSN.js";import"./chunk-RHC7TFPU.js";import"./chunk-6JNNZGI2.js";import"./chunk-UVVKFBF7.js";import"./chunk-YKOTOCO6.js";import"./chunk-FZIHOMGY.js";import"./chunk-KJWQ7ENF.js";import"./chunk-V2MD5EDD.js";import"./chunk-64M3FFM4.js";import"./chunk-AEX75YGI.js";import"./chunk-27JCWG5J.js";import"./chunk-2KHDGC7N.js";import"./chunk-3AFNXU45.js";export{b as DEFAULT_WORKFLOW_CONFIG,a as WorkflowEvents,c as WorkflowOrchestrator,d as createWorkflowOrchestrator};
@@ -1,2 +1,2 @@
1
- import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.11.5");process.exit(0)}
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-KQVIWE3W.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-TBT3OFRW.js";import"./chunk-NCSXLMDL.js";import"./chunk-IU5RSN6M.js";import"./chunk-ZMPAM4DY.js";import"./chunk-Y25PO65W.js";import"./chunk-YFCULQBP.js";import"./chunk-CKOF27L7.js";import"./chunk-TTJJ4DQE.js";import"./chunk-RKXZLTWR.js";import"./chunk-FHTYEAQ3.js";import"./chunk-WHHQIL4F.js";import"./chunk-3JF5A72M.js";import"./chunk-CDJP6COA.js";import"./chunk-FIPKIIMS.js";import"./chunk-2XQHG56O.js";import"./chunk-2XPMATEK.js";import"./chunk-JDSHUECG.js";import"./chunk-GODAWJMZ.js";import"./chunk-C4EZNOWK.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
1
+ import{createRequire as __cr}from"module";const require=__cr(import.meta.url);if(process.argv.includes('--version')||process.argv.includes('-v')){console.log("3.12.0");process.exit(0)}
2
+ import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v as L,w as M,x as N}from"./chunk-ZT2WHCVM.js";import{a as v,b as w,c as x,d as y,e as z,f as A,g as B,h as C,i as D,j as E,k as F,l as G,m as H,n as I,o as J,p as K}from"./chunk-ZVPAFX4I.js";import"./chunk-C4SZSPXY.js";import"./chunk-SSXAW3ER.js";import"./chunk-MDT3LIXS.js";import"./chunk-TJEJ4UVX.js";import"./chunk-L5ZLOW3K.js";import"./chunk-K5SN66B4.js";import"./chunk-W2OMW6UU.js";import"./chunk-RHC7TFPU.js";import"./chunk-UVVKFBF7.js";import"./chunk-YKOTOCO6.js";import"./chunk-FZIHOMGY.js";import"./chunk-KJWQ7ENF.js";import"./chunk-V2MD5EDD.js";import"./chunk-64M3FFM4.js";import"./chunk-AEX75YGI.js";import"./chunk-27JCWG5J.js";import"./chunk-2KHDGC7N.js";import"./chunk-3AFNXU45.js";export{z as GNNLayerFactory,i as QEFlashAttention,x as QEGNNEmbeddingIndex,y as QEGNNIndexFactory,a as QESONA,e as QE_FLASH_ATTENTION_CONFIG,g as QE_PERFORMANCE_TARGETS,f as QE_SONA_CONFIG,A as TensorCompressionFactory,u as batchComputeAttention,K as batchDifferentiableSearch,M as checkRuvectorPackagesAvailable,c as createDomainQESONA,j as createQEFlashAttention,b as createQESONA,D as getDifferentiableSearch,F as getGetCompressionLevel,E as getHierarchicalForward,G as getInit,h as getOptimalBlockConfig,k as getQEFlashAttentionConfig,n as getRuvectorDotProductAttention,m as getRuvectorFlashAttention,p as getRuvectorHyperbolicAttention,B as getRuvectorLayer,q as getRuvectorLinearAttention,r as getRuvectorMoEAttention,o as getRuvectorMultiHeadAttention,L as getRuvectorPackageVersions,C as getTensorCompress,l as getWorkloadTypes,N as initAllRuvectorPackages,w as initGNN,d as isAttentionAvailable,v as isGNNAvailable,s as toFloat32Array,H as toFloat32ArrayGNN,J as toIEmbedding,t as toNumberArrayAttn,I as toNumberArrayGNN};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Agentic QE v3 - Quality Gate Command (ADR-119)
3
+ *
4
+ * `aqe quality-gate` runs the two-gate, three-valued quality verdict against a
5
+ * pinned ADR-117 checklist: the mechanical (oracle) gate plus a FRONTIER judge.
6
+ * It calls the SAME `runQualityGate` orchestrator as the `qe/quality/gate` MCP
7
+ * tool, so CLI and MCP stay in exact parity.
8
+ *
9
+ * The oracle (mechanical) result is supplied by the caller (`--oracle-passed` /
10
+ * `--baseline-passed`, or `--oracle-file`) because the ADR-113 mutation oracle
11
+ * runs upstream. A missing oracle result is treated as a non-executed test ⇒
12
+ * mechanical fail (never a silent pass).
13
+ */
14
+ import { Command } from 'commander';
15
+ import type { CLIContext } from '../handlers/interfaces.js';
16
+ import type { Judge } from '../../validation/quality-verdict.js';
17
+ export declare function createQualityGateCommand(_context: CLIContext, cleanupAndExit: (code: number) => Promise<never>, _ensureInitialized: () => Promise<boolean>): Command;
18
+ /**
19
+ * Build the frontier judge from the shared multi-provider router. When no
20
+ * provider/credentials are available the judge's preflight fails ⇒ the verdict
21
+ * is `inconclusive` (never a silent pass). Identical construction to the MCP tool.
22
+ */
23
+ export declare function buildJudge(model?: string): Promise<Judge>;
24
+ //# sourceMappingURL=quality-gate.d.ts.map
@@ -0,0 +1,135 @@
1
+ /**
2
+ * Agentic QE v3 - Quality Gate Command (ADR-119)
3
+ *
4
+ * `aqe quality-gate` runs the two-gate, three-valued quality verdict against a
5
+ * pinned ADR-117 checklist: the mechanical (oracle) gate plus a FRONTIER judge.
6
+ * It calls the SAME `runQualityGate` orchestrator as the `qe/quality/gate` MCP
7
+ * tool, so CLI and MCP stay in exact parity.
8
+ *
9
+ * The oracle (mechanical) result is supplied by the caller (`--oracle-passed` /
10
+ * `--baseline-passed`, or `--oracle-file`) because the ADR-113 mutation oracle
11
+ * runs upstream. A missing oracle result is treated as a non-executed test ⇒
12
+ * mechanical fail (never a silent pass).
13
+ */
14
+ import { Command } from 'commander';
15
+ import chalk from 'chalk';
16
+ import fs from 'node:fs';
17
+ import { writeOutput, toJSON } from '../utils/ci-output.js';
18
+ import { runQualityGate, listChecklistIds, } from '../../validation/quality-gate-runner.js';
19
+ import { createRouterFrontierJudge, createUnavailableJudge, } from '../../validation/frontier-judge.js';
20
+ export function createQualityGateCommand(_context, cleanupAndExit, _ensureInitialized) {
21
+ return new Command('quality-gate')
22
+ .description('Two-gate, three-valued quality verdict against a pinned ADR-117 checklist (ADR-119)')
23
+ .option('-c, --checklist <id>', 'Pinned anchor checklist id (e.g. A1-inRange)')
24
+ .option('-a, --artifact-file <path>', 'File containing the artifact under judgement')
25
+ .option('--artifact <text>', 'Inline artifact text (alternative to --artifact-file)')
26
+ .option('--oracle-passed', 'Mechanical oracle passed (mutation score met threshold)')
27
+ .option('--baseline-passed', 'Tests executed against the reference implementation')
28
+ .option('--oracle-file <path>', 'JSON file with { passed, baselinePassed } from the ADR-113 oracle')
29
+ .option('--anchor <path>', 'Override the frozen anchor path (ADR-117)')
30
+ .option('--model <id>', 'Frontier judge model id (ADR-111: always frontier-tier)')
31
+ .option('--list', 'List the available pinned checklist ids and exit')
32
+ .option('-F, --format <format>', 'Output format (text|json)', 'text')
33
+ .option('-o, --output <path>', 'Write output to file')
34
+ .action(async (options) => {
35
+ // No kernel/memory needed: this reads the frozen ADR-117 anchor and calls
36
+ // the LLM router — so it runs standalone in CI without a fleet init.
37
+ const format = options.format;
38
+ try {
39
+ if (options.list) {
40
+ const ids = listChecklistIds(options.anchor);
41
+ if (format === 'json')
42
+ writeOutput(toJSON({ checklists: ids }), options.output);
43
+ else
44
+ console.log(`Available checklists:\n ${ids.join('\n ')}`);
45
+ await cleanupAndExit(0);
46
+ return;
47
+ }
48
+ if (!options.checklist) {
49
+ console.error(chalk.red('Missing required option -c, --checklist <id> (use --list to see ids)'));
50
+ await cleanupAndExit(1);
51
+ return;
52
+ }
53
+ const artifact = resolveArtifact(options);
54
+ if (artifact == null) {
55
+ console.error(chalk.red('Provide --artifact-file <path> or --artifact <text>'));
56
+ await cleanupAndExit(1);
57
+ return;
58
+ }
59
+ const oracleResult = resolveOracle(options);
60
+ const judge = await buildJudge(options.model);
61
+ const request = {
62
+ oracleResult,
63
+ artifact,
64
+ checklistId: options.checklist,
65
+ judge,
66
+ anchorPath: options.anchor,
67
+ };
68
+ const result = await runQualityGate(request);
69
+ if (format === 'json') {
70
+ writeOutput(toJSON(result), options.output);
71
+ }
72
+ else {
73
+ printVerdict(result.verdict, result.mechanical, result.specCoverage, result.unmet, result.reason);
74
+ }
75
+ // Exit codes: 0 pass, 1 fail, 3 inconclusive (distinct so CI can branch).
76
+ const code = result.verdict === 'pass' ? 0 : result.verdict === 'fail' ? 1 : 3;
77
+ await cleanupAndExit(code);
78
+ }
79
+ catch (error) {
80
+ console.error(chalk.red('\nQuality gate failed:'), error instanceof Error ? error.message : error);
81
+ await cleanupAndExit(1);
82
+ }
83
+ });
84
+ }
85
+ function resolveArtifact(options) {
86
+ if (typeof options.artifact === 'string')
87
+ return options.artifact;
88
+ if (options.artifactFile)
89
+ return fs.readFileSync(options.artifactFile, 'utf8');
90
+ return null;
91
+ }
92
+ /**
93
+ * Resolve the mechanical-gate (oracle) result. `--oracle-file` wins; otherwise
94
+ * the boolean flags. Returns null (⇒ mechanical fail) when nothing is supplied,
95
+ * so an un-run oracle can never masquerade as a pass.
96
+ */
97
+ function resolveOracle(options) {
98
+ if (options.oracleFile) {
99
+ const raw = JSON.parse(fs.readFileSync(options.oracleFile, 'utf8'));
100
+ return { passed: !!raw.passed, baselinePassed: !!raw.baselinePassed };
101
+ }
102
+ if (options.oraclePassed === undefined && options.baselinePassed === undefined) {
103
+ return null;
104
+ }
105
+ return { passed: !!options.oraclePassed, baselinePassed: !!options.baselinePassed };
106
+ }
107
+ /**
108
+ * Build the frontier judge from the shared multi-provider router. When no
109
+ * provider/credentials are available the judge's preflight fails ⇒ the verdict
110
+ * is `inconclusive` (never a silent pass). Identical construction to the MCP tool.
111
+ */
112
+ export async function buildJudge(model) {
113
+ const { createLLMRouterService } = await import('../../shared/llm/llm-router-service.js');
114
+ const built = await createLLMRouterService().catch(() => null);
115
+ if (!built) {
116
+ return createUnavailableJudge('no LLM provider configured — set a frontier provider API key');
117
+ }
118
+ return createRouterFrontierJudge(built.router, model ? { model } : {});
119
+ }
120
+ function printVerdict(verdict, mechanical, specCoverage, unmet, reason) {
121
+ const icon = verdict === 'pass' ? chalk.green('✓ PASS')
122
+ : verdict === 'fail' ? chalk.red('✗ FAIL')
123
+ : chalk.yellow('? INCONCLUSIVE');
124
+ console.log(`\n Quality Gate: ${icon}`);
125
+ console.log(` Mechanical gate: ${mechanical === 'pass' ? chalk.green('pass') : chalk.red('fail')}`);
126
+ if (specCoverage != null)
127
+ console.log(` Spec coverage: ${chalk.cyan((specCoverage * 100).toFixed(0) + '%')}`);
128
+ if (unmet.length > 0) {
129
+ console.log(chalk.cyan(' Unmet requirements:'));
130
+ for (const u of unmet)
131
+ console.log(chalk.gray(` - ${u}`));
132
+ }
133
+ console.log(chalk.gray(` ${reason}\n`));
134
+ }
135
+ //# sourceMappingURL=quality-gate.js.map
package/dist/cli/index.js CHANGED
@@ -248,6 +248,11 @@ registerLazyCommand(program, {
248
248
  description: 'Quality assessment shortcut',
249
249
  factory: () => import('./commands/quality.js').then(m => m.createQualityCommand(context, cleanupAndExit, ensureInitialized)),
250
250
  });
251
+ registerLazyCommand(program, {
252
+ name: 'quality-gate',
253
+ description: 'Two-gate, three-valued quality verdict against a pinned checklist (ADR-119)',
254
+ factory: () => import('./commands/quality-gate.js').then(m => m.createQualityGateCommand(context, cleanupAndExit, ensureInitialized)),
255
+ });
251
256
  registerLazyCommand(program, {
252
257
  name: 'security',
253
258
  description: 'Security scanning and URL validation',
@@ -53,6 +53,11 @@ interface DreamInsight {
53
53
  applied: boolean;
54
54
  suggestedAction?: string;
55
55
  createdAt: Date;
56
+ /**
57
+ * ADR-121 evidence tier of the insight. Absent → the conservative default
58
+ * (`proxy:structural`), which the ADR-120 dream-apply gate will not apply.
59
+ */
60
+ provenanceTier?: string;
56
61
  }
57
62
  interface PatternImportData {
58
63
  id: string;
@@ -165,6 +170,12 @@ export interface DreamIntegrationConfig {
165
170
  maxAdaptationHistory: number;
166
171
  /** Whether to auto-apply high-confidence insights */
167
172
  autoApplyInsights: boolean;
173
+ /**
174
+ * ADR-121: whether `judge:llm`-tier insights may be applied. A single LLM
175
+ * judgment is noisy, so judge-tier apply is opt-in (default false). Oracle
176
+ * tier always applies; proxy tier never does.
177
+ */
178
+ allowJudgeTierApply?: boolean;
168
179
  }
169
180
  /**
170
181
  * Default dream integration configuration
@@ -21,6 +21,8 @@
21
21
  */
22
22
  import { v4 as uuidv4 } from 'uuid';
23
23
  import { StrangeLoopController } from './strange-loop';
24
+ import { DEFAULT_PROVENANCE_TIER } from '../../learning/provenance-tier.js';
25
+ import { reExecutePathGate, pathGateFingerprint, pathSealedHash, verifyPathPromotion, } from '../../validation/gate-reexecute.js';
24
26
  /**
25
27
  * Default dream integration configuration
26
28
  */
@@ -930,19 +932,44 @@ export class DreamMinCutController {
930
932
  continue;
931
933
  }
932
934
  const action = this.integration.convertInsightToAction(insight);
933
- if (action && action.type !== 'no_action') {
934
- // Record as adaptation
935
- this.integration.getMetaTracker().recordAdaptation({
936
- timestamp: new Date(),
937
- type: 'insight_applied',
938
- trigger: 'dream_insight',
939
- stateBefore: { minCutValue: 0, weakVertexCount: 0 },
940
- stateAfter: { minCutValue: 0, weakVertexCount: 0 },
941
- improvement: insight.noveltyScore * insight.confidenceScore,
942
- insightId: insight.id,
943
- });
944
- appliedCount++;
935
+ const actionable = !!action && action.type !== 'no_action';
936
+ // ADR-120: seal the apply decision's inputs and re-execute the frozen
937
+ // `dream-apply/v1` rule. This is the A8-EXT fake-`applied`-counter home:
938
+ // a logged apply the frozen rule would reject (proxy-tier evidence, or an
939
+ // insight that produced no real reorganization) is a forgery. Only a
940
+ // receipt that re-executes to `promote` on intact sealed inputs is
941
+ // counted as applied — the log no longer decides, the re-run does.
942
+ const sealed = {
943
+ provenanceTier: insight.provenanceTier ?? DEFAULT_PROVENANCE_TIER,
944
+ allowJudgeTier: this.config.allowJudgeTierApply,
945
+ insightConfidence: insight.confidenceScore,
946
+ insightConfidenceThreshold: this.config.insightConfidenceThreshold,
947
+ insightActionable: actionable,
948
+ };
949
+ const rerun = reExecutePathGate('dream-apply/v1', sealed);
950
+ const receipt = {
951
+ ruleVersion: 'dream-apply/v1',
952
+ ruleFingerprint: pathGateFingerprint('dream-apply/v1'),
953
+ sealedHash: pathSealedHash(sealed),
954
+ sealed,
955
+ recordedVerdict: rerun.promote ? 'promote' : 'reject',
956
+ };
957
+ const verdict = verifyPathPromotion(receipt);
958
+ if (!verdict.valid || !rerun.promote) {
959
+ continue; // not reproducibly applicable under the frozen rule — do not count
945
960
  }
961
+ // Record as adaptation
962
+ this.integration.getMetaTracker().recordAdaptation({
963
+ timestamp: new Date(),
964
+ type: 'insight_applied',
965
+ trigger: 'dream_insight',
966
+ stateBefore: { minCutValue: 0, weakVertexCount: 0 },
967
+ stateAfter: { minCutValue: 0, weakVertexCount: 0 },
968
+ improvement: insight.noveltyScore * insight.confidenceScore,
969
+ insightId: insight.id,
970
+ });
971
+ insight.applied = true;
972
+ appliedCount++;
946
973
  }
947
974
  return appliedCount;
948
975
  }
@@ -441,6 +441,13 @@ export function isHyperbolicHnswEnabled() {
441
441
  */
442
442
  export function initFeatureFlagsFromEnv() {
443
443
  const envFlags = {};
444
+ // RVF-backed PatternStore (ADR-066). Was the only flag WITHOUT an env override,
445
+ // so an environment where RVF native init fails (e.g. `RVF error 0x0303:
446
+ // FsyncFailed` on a macOS virtiofs bind mount) had no runtime way to fall back
447
+ // to the SQLite HNSW PatternStore. Set RUVECTOR_USE_RVF_PATTERN_STORE=false there.
448
+ if (process.env.RUVECTOR_USE_RVF_PATTERN_STORE !== undefined) {
449
+ envFlags.useRVFPatternStore = process.env.RUVECTOR_USE_RVF_PATTERN_STORE === 'true';
450
+ }
444
451
  if (process.env.RUVECTOR_USE_SONA !== undefined) {
445
452
  envFlags.useQESONA = process.env.RUVECTOR_USE_SONA === 'true';
446
453
  }
@@ -37,6 +37,12 @@ export interface PatternLifecycleConfig {
37
37
  promotionActivityWindowDays: number;
38
38
  /** ADR-061: Asymmetric learning config */
39
39
  asymmetricLearning: Partial<AsymmetricLearningConfig>;
40
+ /**
41
+ * ADR-121: allow `judge:llm`-tier evidence to promote patterns. A single LLM
42
+ * judgment is noisy (ADR-119), so judge-tier promotion is an explicit,
43
+ * cost-bearing opt-in. Default false — only `oracle:test-exec` promotes.
44
+ */
45
+ allowJudgeTierPromotion: boolean;
40
46
  }
41
47
  /**
42
48
  * Default lifecycle configuration
@@ -103,6 +109,10 @@ export interface PromotionCheckResult {
103
109
  currentReward: number;
104
110
  currentOccurrences: number;
105
111
  currentSuccessRate: number;
112
+ /** ADR-121: evidence tier of the pattern (gates promotion). */
113
+ provenanceTier: string;
114
+ /** ADR-121: whether the pattern's evidence tier is strong enough to promote. */
115
+ meetsProvenanceTier: boolean;
106
116
  }
107
117
  /**
108
118
  * Result of deprecation check
@@ -178,6 +188,12 @@ export declare class PatternLifecycleManager {
178
188
  * Generate template content from experience aggregate
179
189
  */
180
190
  private generateTemplateContent;
191
+ /**
192
+ * ADR-121: read a pattern's provenance tier. Tolerant of an un-migrated DB
193
+ * (column absent) and of a NULL/unknown value — both degrade to the
194
+ * conservative default so the gate can never be bypassed by a missing tier.
195
+ */
196
+ private getProvenanceTier;
181
197
  /**
182
198
  * Check if a pattern should be promoted
183
199
  */
@@ -11,6 +11,8 @@
11
11
  import { PROMOTION_THRESHOLD } from './qe-patterns.js';
12
12
  import { AsymmetricLearningEngine } from './asymmetric-learning.js';
13
13
  import { safeJsonParse } from '../shared/safe-json.js';
14
+ import { tierAllowsPromotion, DEFAULT_PROVENANCE_TIER } from './provenance-tier.js';
15
+ import { reExecutePathGate, pathGateFingerprint, pathSealedHash, verifyPathPromotion, } from '../validation/gate-reexecute.js';
14
16
  import { LoggerFactory } from '../logging/index.js';
15
17
  import { isTemporalCompressionEnabled } from '../integrations/ruvector/feature-flags.js';
16
18
  const logger = LoggerFactory.create('pattern-lifecycle');
@@ -28,6 +30,7 @@ export const DEFAULT_LIFECYCLE_CONFIG = {
28
30
  maxAgeForActivePatterns: 90,
29
31
  promotionActivityWindowDays: 30,
30
32
  asymmetricLearning: {},
33
+ allowJudgeTierPromotion: false,
31
34
  };
32
35
  // ============================================================================
33
36
  // EWC++ catastrophic-forgetting protection (#510 item 6)
@@ -143,6 +146,23 @@ export class PatternLifecycleManager {
143
146
  `);
144
147
  console.log('[PatternLifecycle] Added promotion_date column to qe_patterns');
145
148
  }
149
+ // ADR-121: provenance_tier — additive, conservative-default migration.
150
+ // The DEFAULT backfills every existing row as 'proxy:structural', which can
151
+ // never over-credit legacy history. Rows re-derived from execution evidence
152
+ // are re-tiered upward through the normal write path (never up-tiered here).
153
+ // Distinct from the lifecycle `tier` (short-term/long-term) column.
154
+ try {
155
+ this.db.prepare(`
156
+ SELECT provenance_tier FROM qe_patterns LIMIT 1
157
+ `).get();
158
+ }
159
+ catch (e) {
160
+ logger.debug('Adding missing provenance_tier column', { error: e instanceof Error ? e.message : String(e) });
161
+ this.db.exec(`
162
+ ALTER TABLE qe_patterns ADD COLUMN provenance_tier TEXT DEFAULT '${DEFAULT_PROVENANCE_TIER}'
163
+ `);
164
+ console.log(`[PatternLifecycle] Added provenance_tier column to qe_patterns (backfilled '${DEFAULT_PROVENANCE_TIER}')`);
165
+ }
146
166
  }
147
167
  // ============================================================================
148
168
  // Experience Extraction
@@ -344,6 +364,20 @@ Pattern extracted from ${exp.count} successful experiences.`;
344
364
  // ============================================================================
345
365
  // Pattern Promotion
346
366
  // ============================================================================
367
+ /**
368
+ * ADR-121: read a pattern's provenance tier. Tolerant of an un-migrated DB
369
+ * (column absent) and of a NULL/unknown value — both degrade to the
370
+ * conservative default so the gate can never be bypassed by a missing tier.
371
+ */
372
+ getProvenanceTier(patternId) {
373
+ try {
374
+ const row = this.db.prepare(`SELECT provenance_tier FROM qe_patterns WHERE id = ?`).get(patternId);
375
+ return row?.provenance_tier ?? DEFAULT_PROVENANCE_TIER;
376
+ }
377
+ catch {
378
+ return DEFAULT_PROVENANCE_TIER;
379
+ }
380
+ }
347
381
  /**
348
382
  * Check if a pattern should be promoted
349
383
  */
@@ -359,23 +393,35 @@ Pattern extracted from ${exp.count} successful experiences.`;
359
393
  currentReward: 0,
360
394
  currentOccurrences: 0,
361
395
  currentSuccessRate: 0,
396
+ provenanceTier: DEFAULT_PROVENANCE_TIER,
397
+ meetsProvenanceTier: false,
362
398
  };
363
399
  }
364
400
  const avgReward = pattern.qualityScore;
365
401
  const meetsReward = avgReward >= this.config.promotionRewardThreshold;
366
402
  const meetsOccurrences = pattern.usageCount >= this.config.promotionMinOccurrences;
367
403
  const meetsSuccessRate = pattern.successRate >= this.config.promotionMinSuccessRate;
404
+ // ADR-121: evidence-tier gate. Only oracle:test-exec (or judge:llm under an
405
+ // explicit budget flag) may promote; proxy:structural is never auto-promoted.
406
+ // Read the tier directly — the column is additive and may be absent on an
407
+ // un-migrated DB, in which case it defaults to the conservative tier.
408
+ const provenanceTier = this.getProvenanceTier(patternId);
409
+ const meetsProvenanceTier = tierAllowsPromotion(provenanceTier, {
410
+ allowJudgeTier: this.config.allowJudgeTierPromotion,
411
+ });
368
412
  // Temporal window: require activity within configured window to prevent
369
413
  // promoting stale patterns that haven't been validated recently
370
414
  const PROMOTION_ACTIVITY_WINDOW_MS = this.config.promotionActivityWindowDays * 24 * 60 * 60 * 1000;
371
415
  const lastActivity = pattern.lastUsedAt?.getTime() ?? pattern.createdAt.getTime();
372
416
  const meetsActivityWindow = (Date.now() - lastActivity) < PROMOTION_ACTIVITY_WINDOW_MS;
373
417
  return {
374
- shouldPromote: pattern.tier === 'short-term' && meetsReward && meetsOccurrences && meetsSuccessRate && meetsActivityWindow,
418
+ shouldPromote: pattern.tier === 'short-term' && meetsProvenanceTier && meetsReward && meetsOccurrences && meetsSuccessRate && meetsActivityWindow,
375
419
  meetsRewardThreshold: meetsReward,
376
420
  meetsOccurrenceThreshold: meetsOccurrences,
377
421
  meetsSuccessRateThreshold: meetsSuccessRate,
378
422
  meetsActivityWindow,
423
+ provenanceTier,
424
+ meetsProvenanceTier,
379
425
  currentReward: avgReward,
380
426
  currentOccurrences: pattern.usageCount,
381
427
  currentSuccessRate: pattern.successRate,
@@ -389,6 +435,36 @@ Pattern extracted from ${exp.count} successful experiences.`;
389
435
  if (!check.shouldPromote) {
390
436
  return false;
391
437
  }
438
+ // ADR-120: re-execute the frozen `pattern-promote/v1` rule on the sealed
439
+ // check result before writing. `checkPromotion` is advisory; the frozen
440
+ // rule is authoritative. A forged/stale promote (proxy-tier or sub-threshold
441
+ // inputs logged as `promote`) fails `verifyPathPromotion` and the UPDATE is
442
+ // skipped — the same defense the flywheel accept path gets (ADR-120 §5).
443
+ const sealed = {
444
+ provenanceTier: check.provenanceTier,
445
+ allowJudgeTier: this.config.allowJudgeTierPromotion,
446
+ reward: check.currentReward,
447
+ rewardThreshold: this.config.promotionRewardThreshold,
448
+ occurrences: check.currentOccurrences,
449
+ occurrenceThreshold: this.config.promotionMinOccurrences,
450
+ successRate: check.currentSuccessRate,
451
+ successRateThreshold: this.config.promotionMinSuccessRate,
452
+ withinActivityWindow: check.meetsActivityWindow,
453
+ };
454
+ const rerun = reExecutePathGate('pattern-promote/v1', sealed);
455
+ const receipt = {
456
+ ruleVersion: 'pattern-promote/v1',
457
+ ruleFingerprint: pathGateFingerprint('pattern-promote/v1'),
458
+ sealedHash: pathSealedHash(sealed),
459
+ sealed,
460
+ recordedVerdict: rerun.promote ? 'promote' : 'reject',
461
+ };
462
+ const verdict = verifyPathPromotion(receipt);
463
+ if (!verdict.valid || !rerun.promote) {
464
+ // The advisory verdict is not reproducible under the frozen rule — refuse.
465
+ console.warn(`[PatternLifecycle] Refusing to promote ${patternId}: ${rerun.reason} (${verdict.reason})`);
466
+ return false;
467
+ }
392
468
  this.db.prepare(`
393
469
  UPDATE qe_patterns
394
470
  SET tier = 'long-term',
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Provenance tiers for learning writes (ADR-121).
3
+ *
4
+ * Every learning write carries an explicit evidence tier. Authority tracks
5
+ * evidence strength: an execution-observed outcome is ground truth, an LLM
6
+ * judgment is a noisy opinion (ADR-119), a structural/co-occurrence inference
7
+ * is a weak guess. Only `oracle:test-exec` (or an explicitly-budgeted
8
+ * `judge:llm`) may change fleet behavior; `proxy:structural` is written and
9
+ * searchable but never auto-promoted.
10
+ *
11
+ * Mirrors ruflo ADR-174's in-code tier gate (not prose). Shared across every
12
+ * promotion path (pattern promotion, dream apply, flywheel accept) so the gate
13
+ * is defined once.
14
+ */
15
+ /** Evidence tiers, strongest first. */
16
+ export type ProvenanceTier = 'oracle:test-exec' | 'judge:llm' | 'proxy:structural';
17
+ /** Ordered strongest → weakest. Index is the rank (0 = strongest). */
18
+ export declare const PROVENANCE_TIERS: readonly ProvenanceTier[];
19
+ /**
20
+ * Conservative default for undifferentiated / legacy / unknown writes.
21
+ * The backfill (ADR-121 §4) tags all pre-existing rows with this — it can
22
+ * never over-credit, only under-credit until a row is re-derived from
23
+ * execution evidence through the normal write path.
24
+ */
25
+ export declare const DEFAULT_PROVENANCE_TIER: ProvenanceTier;
26
+ /** Rank of a tier (0 = strongest). Unknown tiers rank as the weakest. */
27
+ export declare function tierRank(tier: string | null | undefined): number;
28
+ /**
29
+ * Normalize any raw value read from storage into a known tier.
30
+ * Null / undefined / unrecognized → the conservative default. Never throws —
31
+ * a bad tier must degrade to "weak", never crash the promotion path.
32
+ */
33
+ export declare function coerceTier(raw: string | null | undefined): ProvenanceTier;
34
+ export interface PromotionTierOptions {
35
+ /**
36
+ * When true, `judge:llm`-tier evidence may promote. This is an explicit,
37
+ * cost-bearing budget decision (ADR-121 §2 / ADR-119): a single LLM judgment
38
+ * is noisy, so judge-tier promotion is opt-in, never the default.
39
+ */
40
+ allowJudgeTier?: boolean;
41
+ }
42
+ /**
43
+ * The in-code promotion gate (ADR-121 §2). `oracle:test-exec` may always
44
+ * promote; `judge:llm` promotes only under an explicit budget flag;
45
+ * `proxy:structural` is NEVER auto-promoted.
46
+ *
47
+ * This is the single authority consulted by every promotion path. It does not
48
+ * decide whether the *metrics* clear threshold — only whether the *evidence
49
+ * tier* is strong enough to be allowed to change fleet behavior at all.
50
+ */
51
+ export declare function tierAllowsPromotion(tier: string | null | undefined, options?: PromotionTierOptions): boolean;
52
+ //# sourceMappingURL=provenance-tier.d.ts.map
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Provenance tiers for learning writes (ADR-121).
3
+ *
4
+ * Every learning write carries an explicit evidence tier. Authority tracks
5
+ * evidence strength: an execution-observed outcome is ground truth, an LLM
6
+ * judgment is a noisy opinion (ADR-119), a structural/co-occurrence inference
7
+ * is a weak guess. Only `oracle:test-exec` (or an explicitly-budgeted
8
+ * `judge:llm`) may change fleet behavior; `proxy:structural` is written and
9
+ * searchable but never auto-promoted.
10
+ *
11
+ * Mirrors ruflo ADR-174's in-code tier gate (not prose). Shared across every
12
+ * promotion path (pattern promotion, dream apply, flywheel accept) so the gate
13
+ * is defined once.
14
+ */
15
+ /** Ordered strongest → weakest. Index is the rank (0 = strongest). */
16
+ export const PROVENANCE_TIERS = [
17
+ 'oracle:test-exec',
18
+ 'judge:llm',
19
+ 'proxy:structural',
20
+ ];
21
+ /**
22
+ * Conservative default for undifferentiated / legacy / unknown writes.
23
+ * The backfill (ADR-121 §4) tags all pre-existing rows with this — it can
24
+ * never over-credit, only under-credit until a row is re-derived from
25
+ * execution evidence through the normal write path.
26
+ */
27
+ export const DEFAULT_PROVENANCE_TIER = 'proxy:structural';
28
+ /** Rank of a tier (0 = strongest). Unknown tiers rank as the weakest. */
29
+ export function tierRank(tier) {
30
+ const idx = PROVENANCE_TIERS.indexOf(coerceTier(tier));
31
+ return idx < 0 ? PROVENANCE_TIERS.length - 1 : idx;
32
+ }
33
+ /**
34
+ * Normalize any raw value read from storage into a known tier.
35
+ * Null / undefined / unrecognized → the conservative default. Never throws —
36
+ * a bad tier must degrade to "weak", never crash the promotion path.
37
+ */
38
+ export function coerceTier(raw) {
39
+ if (raw && PROVENANCE_TIERS.includes(raw)) {
40
+ return raw;
41
+ }
42
+ return DEFAULT_PROVENANCE_TIER;
43
+ }
44
+ /**
45
+ * The in-code promotion gate (ADR-121 §2). `oracle:test-exec` may always
46
+ * promote; `judge:llm` promotes only under an explicit budget flag;
47
+ * `proxy:structural` is NEVER auto-promoted.
48
+ *
49
+ * This is the single authority consulted by every promotion path. It does not
50
+ * decide whether the *metrics* clear threshold — only whether the *evidence
51
+ * tier* is strong enough to be allowed to change fleet behavior at all.
52
+ */
53
+ export function tierAllowsPromotion(tier, options = {}) {
54
+ switch (coerceTier(tier)) {
55
+ case 'oracle:test-exec':
56
+ return true;
57
+ case 'judge:llm':
58
+ return options.allowJudgeTier === true;
59
+ case 'proxy:structural':
60
+ default:
61
+ return false;
62
+ }
63
+ }
64
+ //# sourceMappingURL=provenance-tier.js.map