agentic-qe 3.11.4 → 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.
- package/.claude/helpers/.helpers-version +1 -0
- package/.claude/helpers/auto-memory-hook.mjs +35 -3
- package/.claude/helpers/brain-checkpoint.cjs +16 -1
- package/.claude/helpers/helpers.manifest.json +12 -0
- package/.claude/helpers/hook-handler.cjs +26 -5
- package/.claude/helpers/intelligence.cjs +14 -1
- package/.claude/hooks/aqe-hook.cjs +57 -10
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +110 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/a2a/auth/routes.js +59 -28
- package/dist/audit/witness-chain.d.ts +25 -0
- package/dist/audit/witness-chain.js +69 -22
- package/dist/audit/witness-key-manager.d.ts +11 -0
- package/dist/audit/witness-key-manager.js +24 -0
- package/dist/cli/brain-commands.js +2 -1
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-6IWRIHF3.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-62I6ZNRW.js → agent-booster-wasm-IO54X6IQ.js} +2 -2
- package/dist/cli/chunks/{agent-handler-E2TZKKBS.js → agent-handler-A57SZUCW.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-JHAHC2NH.js → agent-memory-branch-BX7LRFGN.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-FSF5U67K.js +2 -0
- package/dist/cli/chunks/{arena-72ZV65BR.js → arena-UTC4YY6Y.js} +4 -4
- package/dist/cli/chunks/{arena-KLG3YSSR.js → arena-Y3XTX6O7.js} +2 -2
- package/dist/cli/chunks/audit-L4RL2AOY.js +3 -0
- package/dist/cli/chunks/base-2CKCJU3O.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-LAFK5QZ4.js → better-sqlite3-LRDXKYOJ.js} +2 -2
- package/dist/cli/chunks/brain-handler-OHDPI5TQ.js +89 -0
- package/dist/cli/chunks/{branch-enumerator-C7MPNYT7.js → branch-enumerator-ZRXE2CQ7.js} +2 -2
- package/dist/cli/chunks/{browser-UUDUDYLR.js → browser-NT33FG76.js} +2 -2
- package/dist/cli/chunks/browser-workflow-UGYJE64S.js +2 -0
- package/dist/cli/chunks/{chunk-7QTB5XIQ.js → chunk-27JCWG5J.js} +2 -2
- package/dist/cli/chunks/{chunk-3FJZMQJ7.js → chunk-2ALNNXFF.js} +2 -2
- package/dist/cli/chunks/{chunk-LMJUMUQJ.js → chunk-2AOOIAW3.js} +4 -4
- package/dist/cli/chunks/{chunk-CNF3ZWLM.js → chunk-2AR4B3DI.js} +2 -2
- package/dist/cli/chunks/{chunk-7ADD2ZQL.js → chunk-2KHDGC7N.js} +2 -2
- package/dist/cli/chunks/{chunk-P6S6ZVB5.js → chunk-2UMCB7AH.js} +1 -1
- package/dist/cli/chunks/{chunk-HH6NCBSP.js → chunk-335GHVJV.js} +22 -22
- package/dist/cli/chunks/{chunk-2WPSMQIL.js → chunk-36MPDANH.js} +1 -1
- package/dist/cli/chunks/{chunk-Y4AXOHW4.js → chunk-3AFNXU45.js} +1 -1
- package/dist/cli/chunks/{chunk-SL3SNOO2.js → chunk-3B4XXFKD.js} +2 -2
- package/dist/cli/chunks/{chunk-7IKWF2AD.js → chunk-4GU656WM.js} +1 -1
- package/dist/cli/chunks/{chunk-IQBZBUP5.js → chunk-4SALW7OT.js} +2 -2
- package/dist/cli/chunks/{chunk-TCVEKRPI.js → chunk-5FR5GBUT.js} +2 -2
- package/dist/cli/chunks/chunk-5VBPIJUZ.js +65 -0
- package/dist/cli/chunks/chunk-5XFX25AJ.js +4 -0
- package/dist/cli/chunks/{chunk-QSDIY3E2.js → chunk-5YGESYBC.js} +1 -1
- package/dist/cli/chunks/{chunk-5U2WHPXL.js → chunk-62RELCU6.js} +1 -1
- package/dist/cli/chunks/{chunk-QJ5NCYJ3.js → chunk-64M3FFM4.js} +2 -2
- package/dist/cli/chunks/{chunk-BMQDELPA.js → chunk-6JNNZGI2.js} +1 -1
- package/dist/cli/chunks/{chunk-U34OZXD6.js → chunk-6X3RJBA3.js} +2 -2
- package/dist/cli/chunks/{chunk-AE6HXMOG.js → chunk-72VZGAMJ.js} +1 -1
- package/dist/cli/chunks/{chunk-4JFH3MVA.js → chunk-7F7U2HUH.js} +1 -1
- package/dist/cli/chunks/{chunk-A4OMK3FO.js → chunk-7HJHXSYT.js} +2 -2
- package/dist/cli/chunks/chunk-7WX3MKRS.js +2 -0
- package/dist/cli/chunks/{chunk-O7PVZ32A.js → chunk-7ZIVDGSN.js} +1 -1
- package/dist/cli/chunks/{chunk-EZRHSHOQ.js → chunk-AAATFEIL.js} +2 -2
- package/dist/cli/chunks/{chunk-TQ373GGI.js → chunk-AEX75YGI.js} +2 -2
- package/dist/cli/chunks/chunk-BA6U7NSR.js +2 -0
- package/dist/cli/chunks/chunk-BB4OVXWF.js +14 -0
- package/dist/cli/chunks/{chunk-GRQ36XUH.js → chunk-BBC526PL.js} +2 -2
- package/dist/cli/chunks/{chunk-EONKMHKO.js → chunk-BGRJZH5Q.js} +2 -2
- package/dist/cli/chunks/{chunk-XQ6DW5FV.js → chunk-BUYPRUNY.js} +2 -2
- package/dist/cli/chunks/{chunk-TU6YN43Q.js → chunk-BZPF6GTL.js} +1 -1
- package/dist/cli/chunks/{chunk-TPMBFARK.js → chunk-C4SZSPXY.js} +67 -22
- package/dist/cli/chunks/{chunk-D6CKKNYC.js → chunk-C6GYLCTX.js} +2 -2
- package/dist/cli/chunks/{chunk-YNK6SUPU.js → chunk-CC5G3K4X.js} +2 -2
- package/dist/cli/chunks/{chunk-ADFKY3X2.js → chunk-CHO54B34.js} +2 -2
- package/dist/cli/chunks/{chunk-WQZ2WRO4.js → chunk-CMGYUCM7.js} +1 -1
- package/dist/cli/chunks/{chunk-QMC5MTBV.js → chunk-CSEEGX5T.js} +2 -2
- package/dist/cli/chunks/{chunk-FSGMRQFC.js → chunk-CVGXB7IX.js} +2 -2
- package/dist/cli/chunks/{chunk-5VSQAGA2.js → chunk-DQDFACYW.js} +1 -1
- package/dist/cli/chunks/chunk-DR7PCO3S.js +153 -0
- package/dist/cli/chunks/{chunk-D5S47YUS.js → chunk-DTOE3NYW.js} +3 -3
- package/dist/cli/chunks/{chunk-WZYNY3VF.js → chunk-DXOMRWDC.js} +1 -1
- package/dist/cli/chunks/{chunk-HJ24KMC2.js → chunk-EGH3H7QO.js} +1 -1
- package/dist/cli/chunks/{chunk-JFLSQH2X.js → chunk-EM2JIIAQ.js} +2 -2
- package/dist/cli/chunks/{chunk-MWFJC5HR.js → chunk-ESDGCTC4.js} +1 -1
- package/dist/cli/chunks/{chunk-SRVTNG6L.js → chunk-EZE2HRQB.js} +2 -2
- package/dist/cli/chunks/{chunk-ZFCVT43J.js → chunk-FEEMJDUF.js} +2 -2
- package/dist/cli/chunks/{chunk-HJO4RNOW.js → chunk-FI5SSLEF.js} +2 -2
- package/dist/cli/chunks/{chunk-XHRLBJTM.js → chunk-FKPUPQQT.js} +2 -2
- package/dist/cli/chunks/{chunk-ODZSQVEW.js → chunk-FOPS6DRZ.js} +1 -1
- package/dist/cli/chunks/{chunk-AQIEK4SY.js → chunk-FU5RNEXV.js} +2 -2
- package/dist/cli/chunks/{chunk-PQUXFSN6.js → chunk-FZIHOMGY.js} +2 -2
- package/dist/cli/chunks/{chunk-Z2REKBD6.js → chunk-FZRU73M4.js} +2 -2
- package/dist/cli/chunks/{chunk-NBBLPDJX.js → chunk-G5JQLUUO.js} +2 -2
- package/dist/cli/chunks/{chunk-4BFCLSDN.js → chunk-G6LR7FK7.js} +2 -2
- package/dist/cli/chunks/{chunk-QEVX4GWF.js → chunk-G6RKUEGL.js} +2 -2
- package/dist/cli/chunks/{chunk-HWBMYR5W.js → chunk-GCF42L7M.js} +5 -5
- package/dist/cli/chunks/{chunk-TSWF3AGQ.js → chunk-GGMQOEZZ.js} +2 -2
- package/dist/cli/chunks/{chunk-PFWJQPUC.js → chunk-HAEUPIKW.js} +2 -2
- package/dist/cli/chunks/{chunk-63QUN3JK.js → chunk-HDJMD6UH.js} +1 -1
- package/dist/cli/chunks/{chunk-JPENUVCI.js → chunk-HW62TB4T.js} +1 -1
- package/dist/cli/chunks/{chunk-WMIRAD3J.js → chunk-I6WHYRWB.js} +2 -2
- package/dist/cli/chunks/{chunk-YZ5EQR37.js → chunk-ICK3B24H.js} +2 -2
- package/dist/cli/chunks/{chunk-FRFVN6AA.js → chunk-IDLNLSQI.js} +2 -2
- package/dist/cli/chunks/{chunk-VQU7DMEY.js → chunk-IJUYHIKN.js} +2 -2
- package/dist/cli/chunks/{chunk-6JUOH6L4.js → chunk-IKVNYK7Y.js} +2 -2
- package/dist/cli/chunks/{chunk-ZKCKOQJI.js → chunk-JOBCMNTP.js} +2 -2
- package/dist/cli/chunks/{chunk-ARPBG6FQ.js → chunk-JYX7AZHE.js} +2 -2
- package/dist/cli/chunks/{chunk-SFDUT5WM.js → chunk-JYXSVSH2.js} +2 -2
- package/dist/cli/chunks/{chunk-VJGHRWMH.js → chunk-K5SN66B4.js} +2 -2
- package/dist/cli/chunks/{chunk-DNOU2HVQ.js → chunk-KDLYTJ5C.js} +2 -2
- package/dist/cli/chunks/{chunk-T76RFXQX.js → chunk-KI5BP4X5.js} +2 -2
- package/dist/cli/chunks/{chunk-7AWK43JN.js → chunk-KJWQ7ENF.js} +2 -2
- package/dist/cli/chunks/{chunk-BRLUNIR4.js → chunk-KN5GOEYK.js} +2 -2
- package/dist/cli/chunks/{chunk-VKJQAKYG.js → chunk-KZ37VHMJ.js} +2 -2
- package/dist/cli/chunks/{chunk-NV3TXXOW.js → chunk-KZMRU7DL.js} +2 -2
- package/dist/cli/chunks/{chunk-LLUPRGOR.js → chunk-L5ZLOW3K.js} +2 -2
- package/dist/cli/chunks/{chunk-THKZVOZV.js → chunk-LMJUQWR7.js} +1 -1
- package/dist/cli/chunks/{chunk-2KNFS3L5.js → chunk-MBF3Q7FQ.js} +1 -1
- package/dist/cli/chunks/chunk-MDT3LIXS.js +2 -0
- package/dist/cli/chunks/{chunk-B5XUWHKQ.js → chunk-MJPYNGZ7.js} +1 -1
- package/dist/cli/chunks/{chunk-UCYTY4LG.js → chunk-MK3J7JVZ.js} +2 -2
- package/dist/cli/chunks/{chunk-MCT4CD5M.js → chunk-MUAHFGIX.js} +2 -2
- package/dist/cli/chunks/{chunk-3SBUL72V.js → chunk-MUV56BPK.js} +2 -2
- package/dist/cli/chunks/{chunk-WNMDWP5A.js → chunk-NLHISTL2.js} +2 -2
- package/dist/cli/chunks/{chunk-UJMTKXPI.js → chunk-NNGCUJWQ.js} +2 -2
- package/dist/cli/chunks/chunk-NW7G57NR.js +27 -0
- package/dist/cli/chunks/{chunk-3SRPFBU7.js → chunk-O3C5RRDQ.js} +3 -3
- package/dist/cli/chunks/{chunk-AYGEWPN4.js → chunk-OHSVDMF7.js} +1 -1
- package/dist/cli/chunks/{chunk-AJXGGTX7.js → chunk-OPIWFXME.js} +1 -1
- package/dist/cli/chunks/{chunk-ZSBJNE35.js → chunk-P52YORQG.js} +2 -2
- package/dist/cli/chunks/chunk-PM566XEO.js +2 -0
- package/dist/cli/chunks/chunk-POKMJTD2.js +2 -0
- package/dist/cli/chunks/{chunk-GOQ4P2PB.js → chunk-PQMLIVGV.js} +2 -2
- package/dist/cli/chunks/{chunk-IB3ZPLFA.js → chunk-PT3FTGKZ.js} +2 -2
- package/dist/cli/chunks/{chunk-U3AVZGQA.js → chunk-Q5YRPS4P.js} +1 -1
- package/dist/cli/chunks/{chunk-5Z4FBCBK.js → chunk-QJ6H2HQQ.js} +1 -1
- package/dist/cli/chunks/{chunk-DRMHVY4T.js → chunk-RG552ROA.js} +4 -4
- package/dist/cli/chunks/{chunk-PEIQDQXN.js → chunk-RHC7TFPU.js} +2 -2
- package/dist/cli/chunks/{chunk-JNQN5DNS.js → chunk-RMFRFING.js} +1 -1
- package/dist/cli/chunks/{chunk-4YT5YN5G.js → chunk-RQN4HWGV.js} +2 -2
- package/dist/cli/chunks/{chunk-5P7Q5YNC.js → chunk-RYUSZ43T.js} +1 -1
- package/dist/cli/chunks/{chunk-O5NEJIHB.js → chunk-RZDNCTOA.js} +2 -2
- package/dist/cli/chunks/chunk-SCMXIBI7.js +2 -0
- package/dist/cli/chunks/{chunk-6545AS2J.js → chunk-SPEUF7ZL.js} +2 -2
- package/dist/cli/chunks/{chunk-LW5DHT3Z.js → chunk-SSXAW3ER.js} +2 -2
- package/dist/cli/chunks/{chunk-Q7ORVHJB.js → chunk-TC2JE5OK.js} +3 -3
- package/dist/cli/chunks/{chunk-MALOUGSF.js → chunk-TED4KOSK.js} +2 -2
- package/dist/cli/chunks/{chunk-ICCTQ5LO.js → chunk-TJ6N4CCX.js} +2 -2
- package/dist/cli/chunks/{chunk-6GYGAW53.js → chunk-TJEJ4UVX.js} +2 -2
- package/dist/cli/chunks/{chunk-VO6YJGB4.js → chunk-TO5PQSDD.js} +2 -2
- package/dist/cli/chunks/{chunk-LKURMUBU.js → chunk-TR5GOGH3.js} +37 -12
- package/dist/cli/chunks/{chunk-JCTCM6IR.js → chunk-UGJQJSPB.js} +1 -1
- package/dist/cli/chunks/{chunk-4RHNPRAP.js → chunk-USB44IHJ.js} +2 -2
- package/dist/cli/chunks/{chunk-JDFPAJGB.js → chunk-UUOXV3NS.js} +92 -92
- package/dist/cli/chunks/chunk-UVVKFBF7.js +2 -0
- package/dist/cli/chunks/{chunk-VCUCD3B5.js → chunk-V2MD5EDD.js} +2 -2
- package/dist/cli/chunks/{chunk-RFQBDMAP.js → chunk-VA7TEOPM.js} +1 -1
- package/dist/cli/chunks/{chunk-IF3HPQNV.js → chunk-VMP4M5PB.js} +1 -1
- package/dist/cli/chunks/{chunk-KUZMVH6N.js → chunk-VS4GMNJK.js} +3 -3
- package/dist/cli/chunks/{chunk-ZYZT2CDX.js → chunk-VWJSWXHG.js} +1 -1
- package/dist/cli/chunks/{chunk-54B6P2WS.js → chunk-VZ67ZDB3.js} +3 -3
- package/dist/cli/chunks/{chunk-NSPCZPTB.js → chunk-W2OMW6UU.js} +2 -2
- package/dist/cli/chunks/{chunk-3SKIZDKL.js → chunk-W766S4SK.js} +1 -1
- package/dist/cli/chunks/{chunk-N2BJN6AO.js → chunk-WJYTLRA5.js} +3 -3
- package/dist/cli/chunks/{chunk-X64BEXUY.js → chunk-WNASEUBW.js} +117 -113
- package/dist/cli/chunks/{chunk-HT6WAYIR.js → chunk-WT4ZDDFM.js} +1 -1
- package/dist/cli/chunks/chunk-XEYW3V5I.js +2 -0
- package/dist/cli/chunks/{chunk-6W3QHS45.js → chunk-XIFPIVZI.js} +2 -2
- package/dist/cli/chunks/{chunk-3E7D3A35.js → chunk-Y2MCIIJD.js} +1 -1
- package/dist/cli/chunks/{chunk-YUHM72VQ.js → chunk-YKOTOCO6.js} +2 -2
- package/dist/cli/chunks/{chunk-YKSWC7I4.js → chunk-Z3W3R4CW.js} +8 -20
- package/dist/cli/chunks/chunk-ZT2WHCVM.js +2 -0
- package/dist/cli/chunks/{chunk-G3TFNY4T.js → chunk-ZVPAFX4I.js} +2 -2
- package/dist/cli/chunks/{chunk-NFJT7XXR.js → chunk-ZWC6CM4R.js} +1 -1
- package/dist/cli/chunks/{ci-HQCRSCC7.js → ci-RJH5LAL3.js} +2 -2
- package/dist/cli/chunks/{ci-output-YBVXLA6O.js → ci-output-62SGMGB2.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-ULGMF2QN.js → circuit-breaker-QXTS5ZAW.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-MKZ2LJXK.js → claude-flow-setup-BBCCT5WV.js} +2 -2
- package/dist/cli/chunks/client-E2XUBCLK.js +2 -0
- package/dist/cli/chunks/{cline-installer-WZQ6XBWN.js → cline-installer-IZCUJJ3I.js} +2 -2
- package/dist/cli/chunks/{code-H3KGH45S.js → code-AWNVOZ7S.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-NUVEAJ7C.js → code-index-extractor-MX65BKMI.js} +2 -2
- package/dist/cli/chunks/{codex-installer-JQI6E6CV.js → codex-installer-EQT6JVLM.js} +2 -2
- package/dist/cli/chunks/{completions-NDF4PFE7.js → completions-WOJAM45W.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-XCZH66HG.js → complexity-analyzer-3DJB7V3K.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-Z4AJGZ7S.js → continuedev-installer-P4KWUTCJ.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-K4IPAL7C.js → copilot-installer-FFZWTMWQ.js} +2 -2
- package/dist/cli/chunks/core-handlers-46Z5VOO6.js +2 -0
- package/dist/cli/chunks/{cost-tracker-35KXAB23.js → cost-tracker-CYBOV3NI.js} +2 -2
- package/dist/cli/chunks/{coverage-QW5I4TYZ.js → coverage-GTZJBSC4.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-SXQ3HFRY.js +2 -0
- package/dist/cli/chunks/{cursor-installer-P4Z7RMIZ.js → cursor-installer-WZIVXGGB.js} +2 -2
- package/dist/cli/chunks/daemon-JWMHEJEN.js +10 -0
- package/dist/cli/chunks/{daemon-WQWTCYBM.js → daemon-MSFN2LXY.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-7XD2VGON.js → dag-attention-scheduler-4TWOTTQE.js} +2 -2
- package/dist/cli/chunks/{detect-GZ3P4DI7.js → detect-YZ6AGQPB.js} +2 -2
- package/dist/cli/chunks/{dist-node-6WWAW7OP.js → dist-node-3EM2XH54.js} +2 -2
- package/dist/cli/chunks/{domain-handler-3GTLWARQ.js → domain-handler-4XU5BINU.js} +2 -2
- package/dist/cli/chunks/domain-transfer-HUFC7I52.js +2 -0
- package/dist/cli/chunks/dream-R6MQQQ3N.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-BGIMA77V.js → embed-and-insert-pattern-J5ZFM6YX.js} +2 -2
- package/dist/cli/chunks/{eval-SXV6DRDD.js → eval-XYOA3EH2.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-TT6WCT2S.js → experience-capture-middleware-E3RYQB6Z.js} +3 -3
- package/dist/cli/chunks/{fast-paths-HTAZHEQP.js → fast-paths-DKIYN2YS.js} +2 -2
- package/dist/cli/chunks/{feature-flags-DIE3Z2B4.js → feature-flags-S2RNZATS.js} +2 -2
- package/dist/cli/chunks/{feature-flags-WBUKU54W.js → feature-flags-ZB63Z7N5.js} +2 -2
- package/dist/cli/chunks/{file-discovery-SKDETFS3.js → file-discovery-USJJLYQU.js} +2 -2
- package/dist/cli/chunks/{fleet-WCWEPAVU.js → fleet-4MUPHSF5.js} +4 -4
- package/dist/cli/chunks/{gnn-wrapper-KWZOWBYS.js → gnn-wrapper-PYOQZKX6.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-3AGYHVG2.js → heartbeat-handler-HLO5XCG7.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-OSDPJT6A.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-KMGSHBIN.js +2 -0
- package/dist/cli/chunks/hnsw-index-IMFRAOPE.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-6OJJDZHL.js → hnsw-legacy-bridge-FZEH2KLM.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-URULPKRF.js → hnswlib-node-VS6L5VUG.js} +2 -2
- package/dist/cli/chunks/{hooks-OXEBTLXV.js → hooks-R2757K57.js} +48 -52
- package/dist/cli/chunks/hybrid-router-57QSWSWC.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-NL74PRHD.js → hypergraph-engine-EAV3GJ5D.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-KZ54AEEL.js → hypergraph-handler-5ERXAVGH.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-OC4MPBGA.js +2 -0
- package/dist/cli/chunks/{init-handler-XKZXRXPG.js → init-handler-RXUSEMG7.js} +6 -6
- package/dist/cli/chunks/init-wizard-CDBRL4PO.js +2 -0
- package/dist/cli/chunks/kernel-CQ7R3AAV.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-WISQMJK7.js → kilocode-installer-ZUBVBHGT.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-O7TBB3GM.js → kiro-installer-TRTRQDGL.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-UXNH7RY4.js +2 -0
- package/dist/cli/chunks/{learning-6IZBGVRU.js → learning-UYXWAU5D.js} +3 -3
- package/dist/cli/chunks/{llm-router-QDMQPPQ7.js → llm-router-TB5OJPEV.js} +4 -4
- package/dist/cli/chunks/llm-router-service-UV34YXBE.js +2 -0
- package/dist/cli/chunks/{load-KLAJJGL5.js → load-ELPSUIPV.js} +2 -2
- package/dist/cli/chunks/load-test-2VEN3PQZ.js +2 -0
- package/dist/cli/chunks/{mcp-SZOPQZIZ.js → mcp-UX7TK3XV.js} +2 -2
- package/dist/cli/chunks/{memory-G3WY74C6.js → memory-W3LG6H6N.js} +5 -5
- package/dist/cli/chunks/memory-backend-TZL5U6F3.js +2 -0
- package/dist/cli/chunks/memory-handlers-BNXAYS2P.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-TDNQGTOT.js → multi-model-executor-227LWZRY.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-NGYGEDMV.js → opencode-installer-F4WKVWDL.js} +2 -2
- package/dist/cli/chunks/{orchestrator-KPI5DY2C.js → orchestrator-V4DBMGK6.js} +5 -5
- package/dist/cli/chunks/pattern-null-store-KLX2RNHM.js +2 -0
- package/dist/cli/chunks/pattern-usage-recorder-BY3HEWSU.js +2 -0
- package/dist/cli/chunks/{pipeline-CSDCC675.js → pipeline-3F5RIESX.js} +2 -2
- package/dist/cli/chunks/{platform-Q5XKEVKH.js → platform-KCGXTZO3.js} +2 -2
- package/dist/cli/chunks/{plugin-XKKR3GVL.js → plugin-2H552KOV.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-22QVNKEN.js → prime-radiant-advanced-wasm-EFKVL7VN.js} +2 -2
- package/dist/cli/chunks/protocol-executor-5HJKW6MC.js +2 -0
- package/dist/cli/chunks/{protocol-handler-REQKTJGG.js → protocol-handler-ELGYV7D2.js} +2 -2
- package/dist/cli/chunks/{prove-NOFUFSQN.js → prove-AYJCQYNI.js} +2 -2
- package/dist/cli/chunks/provider-manager-TRZSBXD3.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-RCEYSLVV.js +2 -0
- package/dist/cli/chunks/{quality-3DQ2H5TK.js → quality-HH7L5A7V.js} +2 -2
- package/dist/cli/chunks/quality-gate-NAQLXE4C.js +7 -0
- package/dist/cli/chunks/queen-coordinator-6JFZD54W.js +2 -0
- package/dist/cli/chunks/{real-embeddings-FCGNYWLL.js → real-embeddings-IO3F4ZFR.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-HX3CNRIR.js → roocode-installer-X4TU5HO4.js} +2 -2
- package/dist/cli/chunks/router-KRLC46NS.js +2 -0
- package/dist/cli/chunks/routing-feedback-WW26H6SA.js +2 -0
- package/dist/cli/chunks/{routing-handler-YRZ2LDCR.js → routing-handler-ZJKGDDMT.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-GCQVBJ4E.js → ruvector-commands-NXCSUBN2.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-B562P3ZC.js → rvf-dual-writer-JMA74SKP.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-NAGFKCMD.js → rvf-migration-adapter-BNTGH2KU.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-WWFBEJ5Q.js → rvf-migration-coordinator-7T2HHUOH.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-OVQKPQUH.js +2 -0
- package/dist/cli/chunks/safe-db-UQOCQIH2.js +2 -0
- package/dist/cli/chunks/schedule-EUX7ZQUK.js +2 -0
- package/dist/cli/chunks/scheduler-MALHQKNR.js +2 -0
- package/dist/cli/chunks/{security-IFOYTD75.js → security-XSK2QHB3.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-TYD5TQ35.js → shared-rvf-adapter-WLRKI7RY.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-YGOOVDQZ.js → shared-rvf-dual-writer-SZW3J7ZK.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-OBCLRP4L.js +2 -0
- package/dist/cli/chunks/status-handler-HGCKYJX2.js +46 -0
- package/dist/cli/chunks/{structural-health-KZI6YMKV.js → structural-health-4SJCFX63.js} +2 -2
- package/dist/cli/chunks/{sync-Z5BDDBMK.js → sync-7WAVNZGL.js} +2 -2
- package/dist/cli/chunks/{sync-ABZNNYRC.js → sync-ATR4DUSA.js} +2 -2
- package/dist/cli/chunks/{task-handler-5ACZEPJ7.js → task-handler-O6REL34Y.js} +2 -2
- package/dist/cli/chunks/{task-handlers-UZWDPL6A.js → task-handlers-WFV2ZYWW.js} +3 -3
- package/dist/cli/chunks/{test-APO3MCVV.js → test-4LXUVHEU.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-EFZA5G5C.js → test-scheduling-OTN3DMKY.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-J2OPLNUK.js → token-bootstrap-VA7T4P42.js} +2 -2
- package/dist/cli/chunks/{token-usage-VHWVNN4R.js → token-usage-TLT6OXXR.js} +2 -2
- package/dist/cli/chunks/{transformers-PX4HPO75.js → transformers-JI7LZRQ3.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-44HA2Z3F.js → tree-sitter-wasm-parser-QNIMHB4K.js} +2 -2
- package/dist/cli/chunks/{types-IMOP7F4R.js → types-DJNWOAC6.js} +2 -2
- package/dist/cli/chunks/unified-memory-A5BS3LGX.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-WJLJO5MY.js +2 -0
- package/dist/cli/chunks/unified-persistence-CFC2BKI5.js +2 -0
- package/dist/cli/chunks/{upgrade-OZ3O6ZZI.js → upgrade-VEW4FL23.js} +2 -2
- package/dist/cli/chunks/{validate-DRY5BMWX.js → validate-O3P6PF7B.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-QD3LYPUF.js → validate-swarm-M2HXHZVC.js} +2 -2
- package/dist/cli/chunks/{vibium-2J3H2ITD.js → vibium-GOU55LUO.js} +2 -2
- package/dist/cli/chunks/visual-security-VPB6KVYJ.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-KRNUOGKI.js → web-tree-sitter-MXOI4GH3.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-PQIPH3WP.js → windsurf-installer-6GKT53IH.js} +2 -2
- package/dist/cli/chunks/{witness-chain-HPLOYPS7.js → witness-chain-OXGQGL26.js} +2 -2
- package/dist/cli/chunks/witness-chain-ZZAUAXDY.js +2 -0
- package/dist/cli/chunks/witness-key-manager-PGFSQXUJ.js +2 -0
- package/dist/cli/chunks/{workflow-OAQ3FWCY.js → workflow-ENBWRMBA.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-S4LBFTYD.js +2 -0
- package/dist/cli/chunks/{wrappers-UPIU6S5S.js → wrappers-MHLNYANQ.js} +2 -2
- package/dist/cli/commands/audit.d.ts +12 -0
- package/dist/cli/commands/audit.js +64 -4
- package/dist/cli/commands/hooks-handlers/hooks-dream-learning.js +45 -19
- package/dist/cli/commands/hooks-handlers/hooks-shared.d.ts +13 -0
- package/dist/cli/commands/hooks-handlers/hooks-shared.js +38 -0
- package/dist/cli/commands/hooks-handlers/task-hooks.js +19 -1
- package/dist/cli/commands/quality-gate.d.ts +24 -0
- package/dist/cli/commands/quality-gate.js +135 -0
- package/dist/cli/handlers/status-handler.d.ts +18 -0
- package/dist/cli/handlers/status-handler.js +47 -0
- package/dist/cli/index.js +5 -0
- package/dist/coordination/mincut/dream-integration.d.ts +11 -0
- package/dist/coordination/mincut/dream-integration.js +39 -12
- package/dist/coordination/mincut/queen-integration.js +24 -7
- package/dist/coordination/protocol-executor.js +2 -1
- package/dist/coordination/queen-lifecycle.js +4 -1
- package/dist/domains/code-intelligence/coordinator.js +10 -6
- package/dist/domains/code-intelligence/services/product-factors-bridge.js +3 -1
- package/dist/domains/defect-intelligence/services/defect-predictor.d.ts +6 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +21 -0
- package/dist/domains/learning-optimization/interfaces.d.ts +7 -0
- package/dist/domains/learning-optimization/plugin.js +5 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.d.ts +10 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.js +57 -0
- package/dist/domains/test-execution/plugin.js +2 -2
- package/dist/domains/test-execution/services/flaky-detector.js +1 -1
- package/dist/domains/test-generation/coordinator.js +22 -8
- package/dist/domains/test-generation/interfaces.d.ts +3 -0
- package/dist/domains/test-generation/services/test-generator.js +9 -1
- package/dist/integrations/ruvector/delta-tracker.js +10 -1
- package/dist/integrations/ruvector/feature-flags.js +7 -0
- package/dist/integrations/ruvector/sona-persistence.d.ts +24 -0
- package/dist/integrations/ruvector/sona-persistence.js +76 -0
- package/dist/integrations/ruvector/sona-three-loop.d.ts +15 -0
- package/dist/integrations/ruvector/sona-three-loop.js +17 -0
- package/dist/kernel/unified-memory-schemas.d.ts +2 -2
- package/dist/kernel/unified-memory-schemas.js +48 -2
- package/dist/kernel/unified-memory.d.ts +22 -0
- package/dist/kernel/unified-memory.js +43 -0
- package/dist/learning/aqe-learning-engine.js +3 -1
- package/dist/learning/dream/concept-graph.d.ts +31 -1
- package/dist/learning/dream/concept-graph.js +109 -3
- package/dist/learning/dream/dream-engine.d.ts +13 -1
- package/dist/learning/dream/dream-engine.js +146 -10
- package/dist/learning/dream/index.d.ts +1 -1
- package/dist/learning/dream/types.d.ts +23 -0
- package/dist/learning/pattern-lifecycle.d.ts +16 -0
- package/dist/learning/pattern-lifecycle.js +77 -1
- package/dist/learning/pattern-store.d.ts +2 -2
- package/dist/learning/pattern-store.js +14 -3
- package/dist/learning/provenance-tier.d.ts +52 -0
- package/dist/learning/provenance-tier.js +64 -0
- package/dist/learning/qe-flywheel/corpus-scorer.d.ts +55 -0
- package/dist/learning/qe-flywheel/corpus-scorer.js +293 -0
- package/dist/learning/qe-flywheel/coupled-anchor.d.ts +91 -0
- package/dist/learning/qe-flywheel/coupled-anchor.js +181 -0
- package/dist/learning/qe-flywheel/generation.d.ts +121 -0
- package/dist/learning/qe-flywheel/generation.js +167 -0
- package/dist/learning/qe-flywheel/policy.d.ts +37 -0
- package/dist/learning/qe-flywheel/policy.js +66 -0
- package/dist/learning/qe-flywheel/receipt-store.d.ts +31 -0
- package/dist/learning/qe-flywheel/receipt-store.js +89 -0
- package/dist/learning/qe-flywheel/receipt.d.ts +62 -0
- package/dist/learning/qe-flywheel/receipt.js +97 -0
- package/dist/learning/qe-reasoning-bank.js +34 -31
- package/dist/learning/routing-topology-gate.d.ts +12 -2
- package/dist/learning/routing-topology-gate.js +15 -3
- package/dist/learning/rvf-pattern-store.d.ts +1 -1
- package/dist/learning/rvf-pattern-store.js +21 -8
- package/dist/learning/sqlite-persistence.js +12 -9
- package/dist/mcp/bundle.js +540 -460
- package/dist/mcp/qe-tool-bridge.js +7 -2
- package/dist/mcp/tools/base.d.ts +29 -0
- package/dist/mcp/tools/base.js +25 -0
- package/dist/mcp/tools/coverage-analysis/index.js +6 -4
- package/dist/mcp/tools/learning-optimization/dream.d.ts +4 -13
- package/dist/mcp/tools/learning-optimization/dream.js +10 -96
- package/dist/mcp/tools/planning/goap-execute.d.ts +13 -1
- package/dist/mcp/tools/planning/goap-execute.js +33 -18
- package/dist/mcp/tools/quality-assessment/gate.d.ts +38 -0
- package/dist/mcp/tools/quality-assessment/gate.js +86 -0
- package/dist/mcp/tools/registry.d.ts +1 -0
- package/dist/mcp/tools/registry.js +10 -2
- package/dist/persistence/rvf-migration-coordinator.js +2 -1
- package/dist/planning/actions/qe-action-library.js +124 -1
- package/dist/planning/goap-planner.d.ts +14 -2
- package/dist/planning/goap-planner.js +51 -9
- package/dist/planning/index.d.ts +1 -1
- package/dist/planning/plan-executor.d.ts +84 -4
- package/dist/planning/plan-executor.js +221 -56
- package/dist/planning/types.d.ts +27 -0
- package/dist/shared/events/domain-events.d.ts +2 -0
- package/dist/shared/safe-db.js +23 -4
- package/dist/validation/anchor-set.d.ts +74 -0
- package/dist/validation/anchor-set.js +78 -0
- package/dist/validation/frontier-judge.d.ts +99 -0
- package/dist/validation/frontier-judge.js +234 -0
- package/dist/validation/gate-reexecute.d.ts +165 -0
- package/dist/validation/gate-reexecute.js +255 -0
- package/dist/validation/quality-gate-runner.d.ts +49 -0
- package/dist/validation/quality-gate-runner.js +62 -0
- package/dist/validation/quality-verdict.d.ts +94 -0
- package/dist/validation/quality-verdict.js +120 -0
- package/dist/workers/workers/learning-consolidation.js +21 -1
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-2HMUXHWY.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-M2NKRVRE.js +0 -2
- package/dist/cli/chunks/audit-EPB7ETMT.js +0 -3
- package/dist/cli/chunks/base-CCHC2DAC.js +0 -2
- package/dist/cli/chunks/brain-handler-FBMYEERK.js +0 -89
- package/dist/cli/chunks/browser-workflow-4DGHFYY3.js +0 -2
- package/dist/cli/chunks/chunk-37ZDGJ3H.js +0 -2
- package/dist/cli/chunks/chunk-5AQ7FXYG.js +0 -27
- package/dist/cli/chunks/chunk-KYTFIP6R.js +0 -2
- package/dist/cli/chunks/chunk-MYMIEQSZ.js +0 -65
- package/dist/cli/chunks/chunk-RCPD6F4R.js +0 -2
- package/dist/cli/chunks/chunk-TCWR6TDN.js +0 -2
- package/dist/cli/chunks/chunk-UQ72K44T.js +0 -149
- package/dist/cli/chunks/chunk-XXRTWG7O.js +0 -2
- package/dist/cli/chunks/chunk-ZSA6V5FH.js +0 -2
- package/dist/cli/chunks/client-2OVEDWGU.js +0 -2
- package/dist/cli/chunks/core-handlers-UXRRYP52.js +0 -2
- package/dist/cli/chunks/cross-domain-router-PV3VQVLO.js +0 -2
- package/dist/cli/chunks/daemon-ESUEM6VB.js +0 -10
- package/dist/cli/chunks/domain-transfer-TQYO3SVG.js +0 -2
- package/dist/cli/chunks/dream-UFUXVJQC.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-MBG3SARO.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-5HXA3QB3.js +0 -2
- package/dist/cli/chunks/hnsw-index-PZRQWBRG.js +0 -2
- package/dist/cli/chunks/hybrid-router-NQRIE2GG.js +0 -2
- package/dist/cli/chunks/impact-analyzer-46347ZDV.js +0 -2
- package/dist/cli/chunks/init-wizard-CJYP4WKO.js +0 -2
- package/dist/cli/chunks/kernel-22KQZ56U.js +0 -2
- package/dist/cli/chunks/knowledge-graph-KM3JDBGR.js +0 -2
- package/dist/cli/chunks/llm-router-service-IFO6GRRO.js +0 -2
- package/dist/cli/chunks/load-test-TTKCYAPB.js +0 -2
- package/dist/cli/chunks/memory-backend-ELHCX2ZT.js +0 -2
- package/dist/cli/chunks/memory-handlers-3SKYQZTL.js +0 -2
- package/dist/cli/chunks/pattern-null-store-TMXAYD43.js +0 -2
- package/dist/cli/chunks/protocol-executor-BPLR5EJC.js +0 -2
- package/dist/cli/chunks/provider-manager-4MMD5QKL.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-P7KNT3WZ.js +0 -2
- package/dist/cli/chunks/queen-coordinator-NBZZ4MGC.js +0 -2
- package/dist/cli/chunks/router-2RXR6J2Q.js +0 -2
- package/dist/cli/chunks/routing-feedback-AVAA76TK.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-X2YDJA55.js +0 -2
- package/dist/cli/chunks/safe-db-4PRU65BK.js +0 -2
- package/dist/cli/chunks/schedule-2AST5CHW.js +0 -2
- package/dist/cli/chunks/scheduler-SW6II7OU.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-OB5NEGAK.js +0 -2
- package/dist/cli/chunks/status-handler-HFPWSCBY.js +0 -45
- package/dist/cli/chunks/unified-memory-X7OJYGSD.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-O6HOD5YL.js +0 -2
- package/dist/cli/chunks/unified-persistence-C332CER2.js +0 -2
- package/dist/cli/chunks/visual-security-MPUG5HPI.js +0 -2
- package/dist/cli/chunks/witness-chain-Q4BZHPDF.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-4NDWECYK.js +0 -2
|
@@ -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
|
|
@@ -5,6 +5,24 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Command } from 'commander';
|
|
7
7
|
import { ICommandHandler, CLIContext } from './interfaces.js';
|
|
8
|
+
export interface DaemonLivenessStatus {
|
|
9
|
+
/** A daemon.pid file exists (`aqe`/`npx ruflo daemon start` was run at least once) */
|
|
10
|
+
configured: boolean;
|
|
11
|
+
/** The PID in daemon.pid corresponds to a live process right now */
|
|
12
|
+
running: boolean;
|
|
13
|
+
pid?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Check whether the detached background-worker daemon (`.agentic-qe/workers/
|
|
17
|
+
* start-daemon.cjs`, PID recorded in `daemon.pid` — see `10-workers.ts`) is
|
|
18
|
+
* actually alive. Mirrors the exact liveness check `stop-daemon.cjs` uses
|
|
19
|
+
* (`process.kill(pid, 0)`) rather than inventing a new protocol.
|
|
20
|
+
*
|
|
21
|
+
* Distinct from `aqe daemon status` (in `cli/commands/daemon.ts`), which
|
|
22
|
+
* tracks a *different*, in-process `QualityDaemon` instance that can't see a
|
|
23
|
+
* truly detached process across separate CLI invocations anyway.
|
|
24
|
+
*/
|
|
25
|
+
export declare function checkDaemonLiveness(): DaemonLivenessStatus;
|
|
8
26
|
export declare class StatusHandler implements ICommandHandler {
|
|
9
27
|
readonly name = "status";
|
|
10
28
|
readonly description = "Show system status";
|
|
@@ -4,8 +4,41 @@
|
|
|
4
4
|
* Handles the 'aqe status' and 'aqe health' commands.
|
|
5
5
|
*/
|
|
6
6
|
import chalk from 'chalk';
|
|
7
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
8
|
+
import { join } from 'node:path';
|
|
7
9
|
import { getStatusColor, formatUptime, } from './interfaces.js';
|
|
8
10
|
import { writeOutput, toJSON } from '../utils/ci-output.js';
|
|
11
|
+
import { findProjectRoot } from '../../kernel/unified-memory.js';
|
|
12
|
+
/**
|
|
13
|
+
* Check whether the detached background-worker daemon (`.agentic-qe/workers/
|
|
14
|
+
* start-daemon.cjs`, PID recorded in `daemon.pid` — see `10-workers.ts`) is
|
|
15
|
+
* actually alive. Mirrors the exact liveness check `stop-daemon.cjs` uses
|
|
16
|
+
* (`process.kill(pid, 0)`) rather than inventing a new protocol.
|
|
17
|
+
*
|
|
18
|
+
* Distinct from `aqe daemon status` (in `cli/commands/daemon.ts`), which
|
|
19
|
+
* tracks a *different*, in-process `QualityDaemon` instance that can't see a
|
|
20
|
+
* truly detached process across separate CLI invocations anyway.
|
|
21
|
+
*/
|
|
22
|
+
export function checkDaemonLiveness() {
|
|
23
|
+
try {
|
|
24
|
+
const pidFile = join(findProjectRoot(), '.agentic-qe', 'workers', 'daemon.pid');
|
|
25
|
+
if (!existsSync(pidFile))
|
|
26
|
+
return { configured: false, running: false };
|
|
27
|
+
const pid = parseInt(readFileSync(pidFile, 'utf-8').trim(), 10);
|
|
28
|
+
if (!Number.isFinite(pid))
|
|
29
|
+
return { configured: true, running: false };
|
|
30
|
+
try {
|
|
31
|
+
process.kill(pid, 0); // signal 0: existence check only, doesn't actually kill
|
|
32
|
+
return { configured: true, running: true, pid };
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return { configured: true, running: false, pid };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return { configured: false, running: false };
|
|
40
|
+
}
|
|
41
|
+
}
|
|
9
42
|
// ============================================================================
|
|
10
43
|
// Status Handler
|
|
11
44
|
// ============================================================================
|
|
@@ -193,6 +226,7 @@ export class HealthHandler {
|
|
|
193
226
|
lastCheck: health.lastHealthCheck.toISOString(),
|
|
194
227
|
domains: domainSummary,
|
|
195
228
|
issues: health.issues,
|
|
229
|
+
daemon: checkDaemonLiveness(),
|
|
196
230
|
}), options.output);
|
|
197
231
|
}
|
|
198
232
|
await this.cleanupAndExit(0);
|
|
@@ -244,6 +278,19 @@ export class HealthHandler {
|
|
|
244
278
|
if (idle > 0 && healthy === 0 && degraded === 0 && unhealthy === 0) {
|
|
245
279
|
console.log(chalk.gray('\n Tip: Domains are idle (ready). Run a task to spawn agents.'));
|
|
246
280
|
}
|
|
281
|
+
// A18: background worker daemon liveness \u2014 was previously invisible,
|
|
282
|
+
// so a stopped daemon looked identical to "everything's fine".
|
|
283
|
+
const daemon = checkDaemonLiveness();
|
|
284
|
+
console.log(chalk.blue('\n Background Daemon:'));
|
|
285
|
+
if (!daemon.configured) {
|
|
286
|
+
console.log(` ${chalk.gray('\u25CB')} Not configured (never started \u2014 run "npx ruflo daemon start")`);
|
|
287
|
+
}
|
|
288
|
+
else if (daemon.running) {
|
|
289
|
+
console.log(` ${chalk.green('\u25CF')} Running (PID: ${daemon.pid})`);
|
|
290
|
+
}
|
|
291
|
+
else {
|
|
292
|
+
console.log(` ${chalk.red('\u25CF')} Not running (stale PID: ${daemon.pid ?? 'unknown'}) \u2014 learning/consolidation snapshots will not advance`);
|
|
293
|
+
}
|
|
247
294
|
}
|
|
248
295
|
console.log('');
|
|
249
296
|
await this.cleanupAndExit(0);
|
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
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
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
|
}
|
|
@@ -277,7 +277,7 @@ export class QueenMinCutBridge {
|
|
|
277
277
|
};
|
|
278
278
|
// Agent status changed
|
|
279
279
|
const onAgentStatusChanged = async (event) => {
|
|
280
|
-
const { agentId, status
|
|
280
|
+
const { agentId, status } = event.payload;
|
|
281
281
|
const vertexId = `agent:${agentId}`;
|
|
282
282
|
const vertex = this.graph.getVertex(vertexId);
|
|
283
283
|
if (vertex) {
|
|
@@ -293,7 +293,7 @@ export class QueenMinCutBridge {
|
|
|
293
293
|
};
|
|
294
294
|
// Task coordination (agent-to-agent communication)
|
|
295
295
|
const onTaskCoordination = async (event) => {
|
|
296
|
-
const { fromAgent, toAgent
|
|
296
|
+
const { fromAgent, toAgent } = event.payload;
|
|
297
297
|
const sourceId = `agent:${fromAgent}`;
|
|
298
298
|
const targetId = `agent:${toAgent}`;
|
|
299
299
|
if (this.graph.hasVertex(sourceId) && this.graph.hasVertex(targetId)) {
|
|
@@ -321,11 +321,20 @@ export class QueenMinCutBridge {
|
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
};
|
|
324
|
-
//
|
|
325
|
-
//
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
324
|
+
// A16: these handlers existed but were never actually subscribed — the
|
|
325
|
+
// topology graph only ever saw its static domain-coordinator scaffold,
|
|
326
|
+
// never a real agent, no matter how many agents Queen actually spawned.
|
|
327
|
+
// `QueenCoordinator.publishEvent()` prefixes every event with "Queen"
|
|
328
|
+
// (e.g. `AgentSpawned` -> `QueenAgentSpawned`); only that one has a real
|
|
329
|
+
// publisher today (`queen-coordinator.ts`). The other three are wired to
|
|
330
|
+
// the same convention so they activate automatically if/when a publisher
|
|
331
|
+
// for agent termination / status-change / cross-agent coordination is
|
|
332
|
+
// added — they are current no-ops otherwise, not fabricated coverage.
|
|
333
|
+
const spawnedSub = this.eventBus.subscribe('QueenAgentSpawned', onAgentSpawned);
|
|
334
|
+
const terminatedSub = this.eventBus.subscribe('QueenAgentTerminated', onAgentTerminated);
|
|
335
|
+
const statusSub = this.eventBus.subscribe('QueenAgentStatusChanged', onAgentStatusChanged);
|
|
336
|
+
const taskCoordSub = this.eventBus.subscribe('QueenTaskCoordination', onTaskCoordination);
|
|
337
|
+
this.eventSubscriptions.push(() => spawnedSub.unsubscribe(), () => terminatedSub.unsubscribe(), () => statusSub.unsubscribe(), () => taskCoordSub.unsubscribe());
|
|
329
338
|
}
|
|
330
339
|
// ==========================================================================
|
|
331
340
|
// Health Integration
|
|
@@ -437,6 +446,14 @@ export class QueenMinCutBridge {
|
|
|
437
446
|
*/
|
|
438
447
|
startSnapshotTimer() {
|
|
439
448
|
this.snapshotTimer = setInterval(async () => {
|
|
449
|
+
// A16: skip the periodic write entirely when no real agents have
|
|
450
|
+
// spawned yet — the domain-coordinator scaffold is static, so an
|
|
451
|
+
// empty-of-agents graph produces the exact same degenerate reading
|
|
452
|
+
// (14 vertices, mincut 0.0) every tick forever, which is noise, not
|
|
453
|
+
// signal. The dispose()-time final snapshot still runs unconditionally
|
|
454
|
+
// since that's a single row, not a recurring accumulation.
|
|
455
|
+
if (this.isEmptyTopology())
|
|
456
|
+
return;
|
|
440
457
|
await this.saveSnapshot();
|
|
441
458
|
// Also record history
|
|
442
459
|
await this.persistence.recordHistory({
|
|
@@ -486,7 +486,8 @@ export class DefaultProtocolExecutor {
|
|
|
486
486
|
results: Object.fromEntries(execution.results),
|
|
487
487
|
}, {
|
|
488
488
|
namespace: 'coordination',
|
|
489
|
-
ttl
|
|
489
|
+
// ttl is in SECONDS, not ms (unified-memory.ts:607) — was 1000x too long.
|
|
490
|
+
ttl: 86400, // 24 hours
|
|
490
491
|
});
|
|
491
492
|
}
|
|
492
493
|
/**
|
|
@@ -67,7 +67,10 @@ export function startMetricsCollectionTimer(ctx) {
|
|
|
67
67
|
const metrics = ctx.getMetrics();
|
|
68
68
|
await ctx.publishEvent('MetricsCollected', { metrics });
|
|
69
69
|
await ctx.memory.set(`queen:metrics:${Date.now()}`, metrics, {
|
|
70
|
-
ttl
|
|
70
|
+
// MemoryBackend.set's ttl is in SECONDS, not ms (unified-memory.ts:607
|
|
71
|
+
// does Date.now() + ttl * 1000) — this was 86400000, making rows live
|
|
72
|
+
// 1000 days instead of 1, hence unbounded kv_store growth.
|
|
73
|
+
ttl: 86400, // 24 hours
|
|
71
74
|
namespace: 'queen-coordinator',
|
|
72
75
|
});
|
|
73
76
|
// ADR-064 Phase 4C: Feed workload metrics to dynamic scaler
|
|
@@ -853,14 +853,16 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
|
|
|
853
853
|
*/
|
|
854
854
|
async storeC4DiagramsInMemory(projectPath, result) {
|
|
855
855
|
const key = `c4-diagrams:latest:${this.hashCode(projectPath)}`;
|
|
856
|
+
// ttl is in SECONDS, not ms (unified-memory.ts:607) — these were
|
|
857
|
+
// 3600000, making cache entries live ~41.6 days instead of 1 hour.
|
|
856
858
|
await this.memory.set(key, result, {
|
|
857
859
|
namespace: 'code-intelligence',
|
|
858
860
|
persist: true,
|
|
859
|
-
ttl:
|
|
861
|
+
ttl: 3600, // 1 hour
|
|
860
862
|
});
|
|
861
863
|
// Also store components and external systems separately for quick access
|
|
862
|
-
await this.memory.set(`c4-components:${this.hashCode(projectPath)}`, result.components, { namespace: 'code-intelligence', ttl:
|
|
863
|
-
await this.memory.set(`c4-external-systems:${this.hashCode(projectPath)}`, result.externalSystems, { namespace: 'code-intelligence', ttl:
|
|
864
|
+
await this.memory.set(`c4-components:${this.hashCode(projectPath)}`, result.components, { namespace: 'code-intelligence', ttl: 3600 });
|
|
865
|
+
await this.memory.set(`c4-external-systems:${this.hashCode(projectPath)}`, result.externalSystems, { namespace: 'code-intelligence', ttl: 3600 });
|
|
864
866
|
}
|
|
865
867
|
// ============================================================================
|
|
866
868
|
// V3 Integration: MetricCollector for Real Code Metrics (Phase 5)
|
|
@@ -921,14 +923,16 @@ export class CodeIntelligenceCoordinator extends BaseDomainCoordinator {
|
|
|
921
923
|
*/
|
|
922
924
|
async storeProjectMetricsInMemory(projectPath, metrics) {
|
|
923
925
|
const key = `project-metrics:latest:${this.hashCode(projectPath)}`;
|
|
926
|
+
// ttl is in SECONDS, not ms (unified-memory.ts:607) — these were
|
|
927
|
+
// 300000, making entries live ~3.47 days instead of 5 minutes.
|
|
924
928
|
await this.memory.set(key, metrics, {
|
|
925
929
|
namespace: 'code-intelligence',
|
|
926
930
|
persist: true,
|
|
927
|
-
ttl:
|
|
931
|
+
ttl: 300, // 5 minutes (metrics can change frequently)
|
|
928
932
|
});
|
|
929
933
|
// Store LOC and test counts separately for quick access
|
|
930
|
-
await this.memory.set(`loc-metrics:${this.hashCode(projectPath)}`, metrics.loc, { namespace: 'code-intelligence', ttl:
|
|
931
|
-
await this.memory.set(`test-metrics:${this.hashCode(projectPath)}`, metrics.tests, { namespace: 'code-intelligence', ttl:
|
|
934
|
+
await this.memory.set(`loc-metrics:${this.hashCode(projectPath)}`, metrics.loc, { namespace: 'code-intelligence', ttl: 300 });
|
|
935
|
+
await this.memory.set(`test-metrics:${this.hashCode(projectPath)}`, metrics.tests, { namespace: 'code-intelligence', ttl: 300 });
|
|
932
936
|
}
|
|
933
937
|
/**
|
|
934
938
|
* Get the MetricCollector service for direct access
|
|
@@ -624,7 +624,9 @@ export class ProductFactorsBridgeService {
|
|
|
624
624
|
};
|
|
625
625
|
await this.memory.set(cacheKey, cacheEntry, {
|
|
626
626
|
namespace: 'code-intelligence',
|
|
627
|
-
ttl:
|
|
627
|
+
// MemoryBackend.set's ttl is in SECONDS (unified-memory.ts:607 does
|
|
628
|
+
// Date.now() + ttl * 1000) — cacheTtlMs is milliseconds, so convert.
|
|
629
|
+
ttl: this.config.cacheTtlMs / 1000,
|
|
628
630
|
});
|
|
629
631
|
}
|
|
630
632
|
getCacheKey(projectPath) {
|
|
@@ -121,6 +121,12 @@ export declare class DefectPredictorService implements IDefectPredictorService {
|
|
|
121
121
|
* ADR-051: Retrieve historical defect patterns for context
|
|
122
122
|
*/
|
|
123
123
|
private getHistoricalDefectPatterns;
|
|
124
|
+
/**
|
|
125
|
+
* Write side of getHistoricalDefectPatterns — records a confirmed defect's
|
|
126
|
+
* type both per-file and in the general pool, capped and deduped to match
|
|
127
|
+
* what the reader expects.
|
|
128
|
+
*/
|
|
129
|
+
private recordConfirmedDefectPattern;
|
|
124
130
|
/**
|
|
125
131
|
* Analyze regression risk for a changeset
|
|
126
132
|
*/
|
|
@@ -331,6 +331,21 @@ Be specific and actionable. Focus on concrete issues, not generic advice.`,
|
|
|
331
331
|
}
|
|
332
332
|
return [...new Set(patterns)].slice(0, 10);
|
|
333
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Write side of getHistoricalDefectPatterns — records a confirmed defect's
|
|
336
|
+
* type both per-file and in the general pool, capped and deduped to match
|
|
337
|
+
* what the reader expects.
|
|
338
|
+
*/
|
|
339
|
+
async recordConfirmedDefectPattern(file, defectType) {
|
|
340
|
+
const fileKey = `${this.config.modelNamespace}:defect-patterns:${file}`;
|
|
341
|
+
const existing = await this.memory.get(fileKey);
|
|
342
|
+
const patterns = [...new Set([...(existing?.patterns ?? []), defectType])].slice(-20);
|
|
343
|
+
await this.memory.set(fileKey, { patterns }, { namespace: 'defect-intelligence', persist: true });
|
|
344
|
+
const generalKey = `${this.config.modelNamespace}:common-defect-patterns`;
|
|
345
|
+
const existingGeneral = (await this.memory.get(generalKey)) ?? [];
|
|
346
|
+
const general = [...new Set([...existingGeneral, defectType])].slice(-50);
|
|
347
|
+
await this.memory.set(generalKey, general, { namespace: 'defect-intelligence', persist: true });
|
|
348
|
+
}
|
|
334
349
|
/**
|
|
335
350
|
* Analyze regression risk for a changeset
|
|
336
351
|
*/
|
|
@@ -385,6 +400,12 @@ Be specific and actionable. Focus on concrete issues, not generic advice.`,
|
|
|
385
400
|
});
|
|
386
401
|
// Update model metrics based on feedback
|
|
387
402
|
await this.recalculateMetrics(feedback);
|
|
403
|
+
// A confirmed defect with a known type is the write side of
|
|
404
|
+
// getHistoricalDefectPatterns' read — previously nothing populated
|
|
405
|
+
// these keys, so historical-pattern lookup always returned empty.
|
|
406
|
+
if (feedback.actualDefect && feedback.defectType) {
|
|
407
|
+
await this.recordConfirmedDefectPattern(feedback.file, feedback.defectType);
|
|
408
|
+
}
|
|
388
409
|
return ok(undefined);
|
|
389
410
|
}
|
|
390
411
|
catch (error) {
|
|
@@ -56,6 +56,13 @@ export interface Experience {
|
|
|
56
56
|
readonly result: ExperienceResult;
|
|
57
57
|
readonly reward: number;
|
|
58
58
|
readonly timestamp: Date;
|
|
59
|
+
/**
|
|
60
|
+
* ReasoningBank pattern IDs that were applied/matched to produce this
|
|
61
|
+
* experience (ADR-110 kept-nulls). Optional — most domains don't yet
|
|
62
|
+
* track which pattern influenced a given operation; only populate this
|
|
63
|
+
* when real matched-pattern data exists, never a placeholder.
|
|
64
|
+
*/
|
|
65
|
+
readonly appliedPatternIds?: readonly string[];
|
|
59
66
|
}
|
|
60
67
|
export interface StateSnapshot {
|
|
61
68
|
readonly context: Record<string, unknown>;
|
|
@@ -391,6 +391,11 @@ export class LearningOptimizationPlugin extends BaseDomainPlugin {
|
|
|
391
391
|
duration: 0,
|
|
392
392
|
},
|
|
393
393
|
reward: 0.8,
|
|
394
|
+
// ADR-110: real matched-pattern IDs from test-generation/coordinator.ts's
|
|
395
|
+
// GeneratedTests.patternsUsed. This event always represents a successful
|
|
396
|
+
// generation, so nulls won't fire from here in practice — threaded for
|
|
397
|
+
// correctness/future use, not for immediate null-recording payoff.
|
|
398
|
+
appliedPatternIds: payload.patternsUsed,
|
|
394
399
|
});
|
|
395
400
|
}
|
|
396
401
|
async handleTestRunCompleted(event) {
|
|
@@ -40,6 +40,8 @@ export declare class LearningCoordinatorService implements IPatternLearningServi
|
|
|
40
40
|
* Provides 2.49x-7.47x speedup via @ruvector/attention SIMD implementation
|
|
41
41
|
*/
|
|
42
42
|
private flashAttention;
|
|
43
|
+
/** ADR-110 null store, lazily wired. undefined = not yet attempted; null = attempted and unavailable. */
|
|
44
|
+
private _nullStore?;
|
|
43
45
|
constructor(dependencies: LearningCoordinatorDependencies, config?: Partial<LearningCoordinatorConfig>);
|
|
44
46
|
/**
|
|
45
47
|
* Initialize FlashAttention for high-performance similarity computations.
|
|
@@ -143,6 +145,14 @@ export declare class LearningCoordinatorService implements IPatternLearningServi
|
|
|
143
145
|
* Record a new experience
|
|
144
146
|
*/
|
|
145
147
|
recordExperience(experience: Omit<Experience, 'id' | 'timestamp'>): Promise<Result<string>>;
|
|
148
|
+
/**
|
|
149
|
+
* Lazily wire the ADR-110 null store (fail-soft — mirrors the witness-chain
|
|
150
|
+
* wiring pattern in AQELearningEngine). Cached after first successful init;
|
|
151
|
+
* silently no-ops if the unified persistence layer isn't available (e.g.
|
|
152
|
+
* memory-only mode) so a learning-side failure never blocks the caller.
|
|
153
|
+
*/
|
|
154
|
+
private getNullStore;
|
|
155
|
+
private recordPatternNulls;
|
|
146
156
|
/**
|
|
147
157
|
* Mine experiences for insights
|
|
148
158
|
*/
|
|
@@ -40,6 +40,8 @@ export class LearningCoordinatorService {
|
|
|
40
40
|
* Provides 2.49x-7.47x speedup via @ruvector/attention SIMD implementation
|
|
41
41
|
*/
|
|
42
42
|
flashAttention = null;
|
|
43
|
+
/** ADR-110 null store, lazily wired. undefined = not yet attempted; null = attempted and unavailable. */
|
|
44
|
+
_nullStore;
|
|
43
45
|
constructor(dependencies, config = {}) {
|
|
44
46
|
this.memory = dependencies.memory;
|
|
45
47
|
this.llmRouter = dependencies.llmRouter;
|
|
@@ -462,12 +464,67 @@ Provide:
|
|
|
462
464
|
});
|
|
463
465
|
// Index by agent and domain for faster retrieval
|
|
464
466
|
await this.indexExperience(fullExperience);
|
|
467
|
+
// ADR-110: a pattern-guided failure is a kept null, not a discarded
|
|
468
|
+
// run. Only fires when the caller supplied real matched-pattern IDs
|
|
469
|
+
// (appliedPatternIds) — most domains don't track this yet, so this is
|
|
470
|
+
// a no-op for them, which is correct (nothing to blame the failure on).
|
|
471
|
+
if (!experience.result.success && experience.appliedPatternIds?.length) {
|
|
472
|
+
await this.recordPatternNulls(fullExperience);
|
|
473
|
+
}
|
|
465
474
|
return ok(id);
|
|
466
475
|
}
|
|
467
476
|
catch (error) {
|
|
468
477
|
return err(toError(error));
|
|
469
478
|
}
|
|
470
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* Lazily wire the ADR-110 null store (fail-soft — mirrors the witness-chain
|
|
482
|
+
* wiring pattern in AQELearningEngine). Cached after first successful init;
|
|
483
|
+
* silently no-ops if the unified persistence layer isn't available (e.g.
|
|
484
|
+
* memory-only mode) so a learning-side failure never blocks the caller.
|
|
485
|
+
*/
|
|
486
|
+
async getNullStore() {
|
|
487
|
+
if (this._nullStore !== undefined)
|
|
488
|
+
return this._nullStore || undefined;
|
|
489
|
+
try {
|
|
490
|
+
const { getUnifiedPersistence } = await import('../../../kernel/unified-persistence.js');
|
|
491
|
+
const persistence = getUnifiedPersistence();
|
|
492
|
+
if (!persistence.isInitialized()) {
|
|
493
|
+
this._nullStore = null;
|
|
494
|
+
return undefined;
|
|
495
|
+
}
|
|
496
|
+
const { PatternNullStore } = await import('../../../learning/pattern-null-store.js');
|
|
497
|
+
this._nullStore = new PatternNullStore(persistence.getDatabase());
|
|
498
|
+
return this._nullStore;
|
|
499
|
+
}
|
|
500
|
+
catch (e) {
|
|
501
|
+
this._nullStore = null;
|
|
502
|
+
logger.warn('Null store wiring skipped', { error: e instanceof Error ? e.message : String(e) });
|
|
503
|
+
return undefined;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
async recordPatternNulls(experience) {
|
|
507
|
+
const nullStore = await this.getNullStore();
|
|
508
|
+
if (!nullStore)
|
|
509
|
+
return;
|
|
510
|
+
const contextFingerprint = `${experience.domain}:${experience.action}`;
|
|
511
|
+
for (const patternId of experience.appliedPatternIds ?? []) {
|
|
512
|
+
try {
|
|
513
|
+
nullStore.recordNull({
|
|
514
|
+
patternId,
|
|
515
|
+
contextFingerprint,
|
|
516
|
+
failureMode: String(experience.result.outcome?.error ?? experience.action),
|
|
517
|
+
evidenceClass: 'EXECUTED',
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
catch (e) {
|
|
521
|
+
logger.warn('Failed to record pattern null', {
|
|
522
|
+
patternId,
|
|
523
|
+
error: e instanceof Error ? e.message : String(e),
|
|
524
|
+
});
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
}
|
|
471
528
|
/**
|
|
472
529
|
* Mine experiences for insights
|
|
473
530
|
*/
|