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,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gateReExecutes — re-execute a frozen acceptance rule from sealed inputs
|
|
3
|
+
* on every promotion path (ADR-120).
|
|
4
|
+
*
|
|
5
|
+
* The July 2026 remediation exposed the A8-EXT fake-`applied`-counter: a
|
|
6
|
+
* promotion path that logged success without doing the work — a logged verdict
|
|
7
|
+
* that lied. The fix (from MetaHarness `verifyReplayBundle`): trust the re-run,
|
|
8
|
+
* not the log. At verification time, re-execute a VERSIONED FROZEN acceptance
|
|
9
|
+
* rule against the decision's SEALED inputs; a recorded PROMOTE the frozen rule
|
|
10
|
+
* would not grant is a forgery.
|
|
11
|
+
*
|
|
12
|
+
* Two checks, both required (mirrors MetaHarness `replay.ts:66-90`):
|
|
13
|
+
* - gateUnchanged — the recorded rule fingerprint matches the current rule
|
|
14
|
+
* version's fingerprint (a swapped rule is caught).
|
|
15
|
+
* - gateReExecutes — re-running the frozen rule on the sealed inputs
|
|
16
|
+
* reproduces the recorded verdict.
|
|
17
|
+
* Plus sealIntact (ADR-116 composition) — the sealed inputs were not mutated
|
|
18
|
+
* after the decision. Re-execution on tampered inputs is meaningless.
|
|
19
|
+
*
|
|
20
|
+
* The acceptance rule is a PURE function of sealed inputs. `accept/v1` composes
|
|
21
|
+
* the cluster: ADR-121 provenance tier gate + ADR-118 held-out-beats-baseline +
|
|
22
|
+
* ADR-117 anchor no-regression. Changing a rule is a new VERSION, never an
|
|
23
|
+
* in-place edit (which gateUnchanged flags).
|
|
24
|
+
*/
|
|
25
|
+
import { createHash } from 'node:crypto';
|
|
26
|
+
import { meetsNoRegression } from './anchor-set.js';
|
|
27
|
+
import { tierAllowsPromotion } from '../learning/provenance-tier.js';
|
|
28
|
+
/** Tag domain-separating the rule fingerprint hash. */
|
|
29
|
+
const RULE_TAG = 'aqe:accept-rule:v1+sig';
|
|
30
|
+
/**
|
|
31
|
+
* accept/v1 — the conjunctive frozen gate. Promotes only when ALL hold:
|
|
32
|
+
* 1. provenance tier is strong enough (ADR-121),
|
|
33
|
+
* 2. held-out strictly beats baseline (ADR-118),
|
|
34
|
+
* 3. the anchor mean does not regress (ADR-117).
|
|
35
|
+
*/
|
|
36
|
+
const acceptV1 = (s) => {
|
|
37
|
+
if (!tierAllowsPromotion(s.provenanceTier, { allowJudgeTier: s.allowJudgeTier })) {
|
|
38
|
+
return { promote: false, reason: `provenance tier '${s.provenanceTier}' not allowed to promote` };
|
|
39
|
+
}
|
|
40
|
+
if (!(s.candidateHeldOut > s.baselineHeldOut)) {
|
|
41
|
+
return { promote: false, reason: `held-out ${s.candidateHeldOut} did not beat baseline ${s.baselineHeldOut}` };
|
|
42
|
+
}
|
|
43
|
+
if (!meetsNoRegression(s.candidateAnchorMean, s.baselineAnchorMean, s.anchorTol)) {
|
|
44
|
+
return { promote: false, reason: `anchor regression: ${s.candidateAnchorMean} < ${s.baselineAnchorMean} - ${s.anchorTol}` };
|
|
45
|
+
}
|
|
46
|
+
return { promote: true, reason: 'held-out gain, no anchor regression, oracle-tier evidence' };
|
|
47
|
+
};
|
|
48
|
+
/** Registry of versioned frozen rules. Add a NEW key to change a rule; never edit in place. */
|
|
49
|
+
export const ACCEPTANCE_RULES = Object.freeze({
|
|
50
|
+
'accept/v1': acceptV1,
|
|
51
|
+
});
|
|
52
|
+
/**
|
|
53
|
+
* Canonical (sorted-key) JSON — same discipline as ADR-116 proof-gate. Keys
|
|
54
|
+
* whose value is `undefined` are OMITTED, matching JSON.stringify, so a sealed
|
|
55
|
+
* input's hash is stable across a JSON serialize/parse roundtrip (e.g. persisting
|
|
56
|
+
* a receipt to the DB and reloading it — an optional field like `allowJudgeTier`
|
|
57
|
+
* that is undefined must not change the hash).
|
|
58
|
+
*/
|
|
59
|
+
function canonicalJson(value) {
|
|
60
|
+
if (value === null || typeof value !== 'object')
|
|
61
|
+
return JSON.stringify(value) ?? 'null';
|
|
62
|
+
if (Array.isArray(value))
|
|
63
|
+
return `[${value.map(canonicalJson).join(',')}]`;
|
|
64
|
+
const rec = value;
|
|
65
|
+
const keys = Object.keys(rec).filter((k) => rec[k] !== undefined).sort();
|
|
66
|
+
return `{${keys.map((k) => `${JSON.stringify(k)}:${canonicalJson(rec[k])}`).join(',')}}`;
|
|
67
|
+
}
|
|
68
|
+
/** SHA-256 content hash of the sealed inputs (ADR-116 canonical form). */
|
|
69
|
+
export function sealedHash(sealed) {
|
|
70
|
+
return createHash('sha256').update(canonicalJson(sealed)).digest('hex');
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Fingerprint of a rule VERSION. Because a rule change is a version bump
|
|
74
|
+
* (ADR-120 §5), fingerprinting the version string is the contract — an edited
|
|
75
|
+
* rule ships under a new version and thus a new fingerprint. Throws for an
|
|
76
|
+
* unknown version so a missing rule can never silently pass verification.
|
|
77
|
+
*/
|
|
78
|
+
export function gateFingerprint(ruleVersion) {
|
|
79
|
+
if (!(ruleVersion in ACCEPTANCE_RULES)) {
|
|
80
|
+
throw new Error(`Unknown acceptance rule version '${ruleVersion}' — cannot fingerprint an unregistered rule.`);
|
|
81
|
+
}
|
|
82
|
+
return createHash('sha256').update(RULE_TAG).update('\0').update(ruleVersion).digest('hex');
|
|
83
|
+
}
|
|
84
|
+
/** Re-execute a frozen rule on sealed inputs. Throws for an unknown version. */
|
|
85
|
+
export function reExecuteGate(ruleVersion, sealed) {
|
|
86
|
+
const rule = ACCEPTANCE_RULES[ruleVersion];
|
|
87
|
+
if (!rule) {
|
|
88
|
+
throw new Error(`Unknown acceptance rule version '${ruleVersion}' — refusing to re-execute an unregistered rule.`);
|
|
89
|
+
}
|
|
90
|
+
return rule(sealed);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Verify a promotion by re-executing its frozen rule on its sealed inputs.
|
|
94
|
+
* The logged verdict is trusted only insofar as the re-run reproduces it.
|
|
95
|
+
*
|
|
96
|
+
* @param opts.pinnedRuleFingerprint - if supplied, the receipt's fingerprint
|
|
97
|
+
* must also equal this pinned value (an externally-anchored rule identity).
|
|
98
|
+
*/
|
|
99
|
+
export function verifyPromotion(receipt, opts = {}) {
|
|
100
|
+
const failures = [];
|
|
101
|
+
// sealIntact — recompute the sealed content hash (ADR-116).
|
|
102
|
+
const sealIntact = sealedHash(receipt.sealed) === receipt.sealedHash;
|
|
103
|
+
if (!sealIntact)
|
|
104
|
+
failures.push('sealIntact');
|
|
105
|
+
// gateUnchanged — recorded fingerprint matches the current rule version, and
|
|
106
|
+
// the pinned fingerprint if one was supplied. Unknown version ⇒ not unchanged.
|
|
107
|
+
let gateUnchanged = false;
|
|
108
|
+
try {
|
|
109
|
+
const currentFp = gateFingerprint(receipt.ruleVersion);
|
|
110
|
+
gateUnchanged =
|
|
111
|
+
receipt.ruleFingerprint === currentFp &&
|
|
112
|
+
(opts.pinnedRuleFingerprint === undefined || receipt.ruleFingerprint === opts.pinnedRuleFingerprint);
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
gateUnchanged = false; // unregistered rule version
|
|
116
|
+
}
|
|
117
|
+
if (!gateUnchanged)
|
|
118
|
+
failures.push('gateUnchanged');
|
|
119
|
+
// gateReExecutes — only meaningful if the inputs are intact and the rule is
|
|
120
|
+
// the same one. Re-run must reproduce the recorded verdict; a logged PROMOTE
|
|
121
|
+
// the frozen rule would reject (the A8-EXT forgery class) fails here.
|
|
122
|
+
let gateReExecutes = false;
|
|
123
|
+
if (sealIntact && gateUnchanged) {
|
|
124
|
+
const rerun = reExecuteGate(receipt.ruleVersion, receipt.sealed);
|
|
125
|
+
const rerunVerdict = rerun.promote ? 'promote' : 'reject';
|
|
126
|
+
gateReExecutes = rerunVerdict === receipt.recordedVerdict;
|
|
127
|
+
}
|
|
128
|
+
if (!gateReExecutes)
|
|
129
|
+
failures.push('gateReExecutes');
|
|
130
|
+
const valid = failures.length === 0;
|
|
131
|
+
return {
|
|
132
|
+
valid,
|
|
133
|
+
checks: { sealIntact, gateUnchanged, gateReExecutes },
|
|
134
|
+
failures,
|
|
135
|
+
reason: valid
|
|
136
|
+
? 'promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict'
|
|
137
|
+
: `promotion INVALID (failed: ${failures.join(', ')}) — the recorded verdict is not reproducible under the frozen rule`,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
/** Tag domain-separating the path-rule fingerprint (distinct from the accept tag). */
|
|
141
|
+
const PATH_RULE_TAG = 'aqe:promotion-path-rule:v1+sig';
|
|
142
|
+
/**
|
|
143
|
+
* pattern-promote/v1 — the P1 conjunctive gate (short-term → long-term).
|
|
144
|
+
* Promotes only when ALL hold: evidence tier allows promotion (ADR-121),
|
|
145
|
+
* reward / occurrences / success-rate clear their sealed thresholds, and the
|
|
146
|
+
* pattern was active within the promotion window (anti-stale).
|
|
147
|
+
*/
|
|
148
|
+
const patternPromoteV1 = (s) => {
|
|
149
|
+
if (!tierAllowsPromotion(s.provenanceTier, { allowJudgeTier: s.allowJudgeTier })) {
|
|
150
|
+
return { promote: false, reason: `provenance tier '${s.provenanceTier}' not allowed to promote` };
|
|
151
|
+
}
|
|
152
|
+
if (s.reward === undefined || s.rewardThreshold === undefined || !(s.reward >= s.rewardThreshold)) {
|
|
153
|
+
return { promote: false, reason: `reward ${s.reward} below threshold ${s.rewardThreshold}` };
|
|
154
|
+
}
|
|
155
|
+
if (s.occurrences === undefined || s.occurrenceThreshold === undefined || !(s.occurrences >= s.occurrenceThreshold)) {
|
|
156
|
+
return { promote: false, reason: `occurrences ${s.occurrences} below threshold ${s.occurrenceThreshold}` };
|
|
157
|
+
}
|
|
158
|
+
if (s.successRate === undefined || s.successRateThreshold === undefined || !(s.successRate >= s.successRateThreshold)) {
|
|
159
|
+
return { promote: false, reason: `success rate ${s.successRate} below threshold ${s.successRateThreshold}` };
|
|
160
|
+
}
|
|
161
|
+
if (s.withinActivityWindow !== true) {
|
|
162
|
+
return { promote: false, reason: 'pattern outside promotion activity window (stale)' };
|
|
163
|
+
}
|
|
164
|
+
return { promote: true, reason: 'tier allowed; reward/occurrence/success-rate thresholds met; within activity window' };
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* dream-apply/v1 — the P2 gate (the A8-EXT fake-`applied`-counter home).
|
|
168
|
+
* An insight is countable as applied only when: its evidence tier allows a
|
|
169
|
+
* fleet-changing apply (ADR-121), its confidence clears the sealed threshold,
|
|
170
|
+
* and it produced a real reorganization action (not `no_action`).
|
|
171
|
+
*/
|
|
172
|
+
const dreamApplyV1 = (s) => {
|
|
173
|
+
if (!tierAllowsPromotion(s.provenanceTier, { allowJudgeTier: s.allowJudgeTier })) {
|
|
174
|
+
return { promote: false, reason: `provenance tier '${s.provenanceTier}' not allowed to apply` };
|
|
175
|
+
}
|
|
176
|
+
if (s.insightConfidence === undefined ||
|
|
177
|
+
s.insightConfidenceThreshold === undefined ||
|
|
178
|
+
!(s.insightConfidence >= s.insightConfidenceThreshold)) {
|
|
179
|
+
return { promote: false, reason: `insight confidence ${s.insightConfidence} below threshold ${s.insightConfidenceThreshold}` };
|
|
180
|
+
}
|
|
181
|
+
if (s.insightActionable !== true) {
|
|
182
|
+
return { promote: false, reason: 'insight produced no actionable reorganization' };
|
|
183
|
+
}
|
|
184
|
+
return { promote: true, reason: 'tier allowed; insight confidence meets threshold; actionable' };
|
|
185
|
+
};
|
|
186
|
+
/**
|
|
187
|
+
* Registry of versioned frozen promotion-path rules. Add a NEW key to change a
|
|
188
|
+
* rule; never edit in place (a rule change is a version bump — ADR-120 §5).
|
|
189
|
+
* Kept separate from `ACCEPTANCE_RULES` so the flywheel accept gate and its
|
|
190
|
+
* locked test are untouched.
|
|
191
|
+
*/
|
|
192
|
+
export const PROMOTION_PATH_RULES = Object.freeze({
|
|
193
|
+
'pattern-promote/v1': patternPromoteV1,
|
|
194
|
+
'dream-apply/v1': dreamApplyV1,
|
|
195
|
+
});
|
|
196
|
+
/** SHA-256 content hash of path sealed inputs (ADR-116 canonical form). */
|
|
197
|
+
export function pathSealedHash(sealed) {
|
|
198
|
+
return createHash('sha256').update(canonicalJson(sealed)).digest('hex');
|
|
199
|
+
}
|
|
200
|
+
/** Fingerprint of a path-rule VERSION. Throws for an unregistered rule. */
|
|
201
|
+
export function pathGateFingerprint(ruleVersion) {
|
|
202
|
+
if (!(ruleVersion in PROMOTION_PATH_RULES)) {
|
|
203
|
+
throw new Error(`Unknown promotion-path rule version '${ruleVersion}' — cannot fingerprint an unregistered rule.`);
|
|
204
|
+
}
|
|
205
|
+
return createHash('sha256').update(PATH_RULE_TAG).update('\0').update(ruleVersion).digest('hex');
|
|
206
|
+
}
|
|
207
|
+
/** Re-execute a frozen path rule on sealed inputs. Throws for an unknown version. */
|
|
208
|
+
export function reExecutePathGate(ruleVersion, sealed) {
|
|
209
|
+
const rule = PROMOTION_PATH_RULES[ruleVersion];
|
|
210
|
+
if (!rule) {
|
|
211
|
+
throw new Error(`Unknown promotion-path rule version '${ruleVersion}' — refusing to re-execute an unregistered rule.`);
|
|
212
|
+
}
|
|
213
|
+
return rule(sealed);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Verify a promotion-path decision by re-executing its frozen rule on its
|
|
217
|
+
* sealed inputs. Identical semantics to {@link verifyPromotion}: the logged
|
|
218
|
+
* verdict is trusted only insofar as the re-run reproduces it on intact inputs.
|
|
219
|
+
*/
|
|
220
|
+
export function verifyPathPromotion(receipt, opts = {}) {
|
|
221
|
+
const failures = [];
|
|
222
|
+
const sealIntact = pathSealedHash(receipt.sealed) === receipt.sealedHash;
|
|
223
|
+
if (!sealIntact)
|
|
224
|
+
failures.push('sealIntact');
|
|
225
|
+
let gateUnchanged = false;
|
|
226
|
+
try {
|
|
227
|
+
const currentFp = pathGateFingerprint(receipt.ruleVersion);
|
|
228
|
+
gateUnchanged =
|
|
229
|
+
receipt.ruleFingerprint === currentFp &&
|
|
230
|
+
(opts.pinnedRuleFingerprint === undefined || receipt.ruleFingerprint === opts.pinnedRuleFingerprint);
|
|
231
|
+
}
|
|
232
|
+
catch {
|
|
233
|
+
gateUnchanged = false; // unregistered rule version
|
|
234
|
+
}
|
|
235
|
+
if (!gateUnchanged)
|
|
236
|
+
failures.push('gateUnchanged');
|
|
237
|
+
let gateReExecutes = false;
|
|
238
|
+
if (sealIntact && gateUnchanged) {
|
|
239
|
+
const rerun = reExecutePathGate(receipt.ruleVersion, receipt.sealed);
|
|
240
|
+
const rerunVerdict = rerun.promote ? 'promote' : 'reject';
|
|
241
|
+
gateReExecutes = rerunVerdict === receipt.recordedVerdict;
|
|
242
|
+
}
|
|
243
|
+
if (!gateReExecutes)
|
|
244
|
+
failures.push('gateReExecutes');
|
|
245
|
+
const valid = failures.length === 0;
|
|
246
|
+
return {
|
|
247
|
+
valid,
|
|
248
|
+
checks: { sealIntact, gateUnchanged, gateReExecutes },
|
|
249
|
+
failures,
|
|
250
|
+
reason: valid
|
|
251
|
+
? 'promotion verified: sealed inputs intact, rule unchanged, frozen rule re-execution reproduces the recorded verdict'
|
|
252
|
+
: `promotion INVALID (failed: ${failures.join(', ')}) — the recorded verdict is not reproducible under the frozen rule`,
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
//# sourceMappingURL=gate-reexecute.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quality-gate orchestrator (ADR-119 / ADR-120).
|
|
3
|
+
*
|
|
4
|
+
* The ONE code path both the `aqe quality-gate` CLI subcommand and the
|
|
5
|
+
* `qe/quality/gate` MCP tool call, so the two surfaces stay in exact parity
|
|
6
|
+
* (the CLI/MCP divergence CLAUDE.md warns about). It:
|
|
7
|
+
*
|
|
8
|
+
* 1. loads the pinned, hash-checked ADR-117 anchor via `loadAnchorSet` (which
|
|
9
|
+
* throws on drift — the frozen checklist can't be silently edited),
|
|
10
|
+
* 2. selects the constant-denominator checklist for `checklistId`,
|
|
11
|
+
* 3. runs the two-gate, three-valued `computeQualityVerdict` with the injected
|
|
12
|
+
* frontier judge.
|
|
13
|
+
*
|
|
14
|
+
* The oracle result and the judge are injected — this module owns no LLM and no
|
|
15
|
+
* mutation runner, so it is deterministic and unit-testable with a fake judge.
|
|
16
|
+
*/
|
|
17
|
+
import { type Judge, type QualityVerdictResult, type RequirementChecklist } from './quality-verdict.js';
|
|
18
|
+
import type { OracleResult } from './oracle-eval.js';
|
|
19
|
+
/** Default frozen anchor location, relative to the project root (ADR-117). */
|
|
20
|
+
export declare const DEFAULT_ANCHOR_RELATIVE_PATH = "verification/anchors/qe-anchor-v1.json";
|
|
21
|
+
export interface QualityGateRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Mechanical-gate result from the ADR-113 oracle. `null` ⇒ the oracle did not
|
|
24
|
+
* run at all — treated as a non-executed test ⇒ mechanical fail.
|
|
25
|
+
*/
|
|
26
|
+
oracleResult: Pick<OracleResult, 'passed' | 'baselinePassed'> | null;
|
|
27
|
+
/** The artifact under judgement (produced test source / spec output). */
|
|
28
|
+
artifact: string;
|
|
29
|
+
/** Anchor item id whose pinned checklist to grade against (e.g. "A1-inRange"). */
|
|
30
|
+
checklistId: string;
|
|
31
|
+
/** The frontier judge (injected — ALWAYS frontier-tier, ADR-111). */
|
|
32
|
+
judge: Judge;
|
|
33
|
+
/** Override the frozen anchor path (absolute, or relative to project root). */
|
|
34
|
+
anchorPath?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Run the two-gate quality gate for one artifact against one pinned checklist.
|
|
38
|
+
* Throws only for caller error (unknown checklist id, unloadable/drifted anchor);
|
|
39
|
+
* every judgement outcome is returned as a three-valued `QualityVerdictResult`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function runQualityGate(req: QualityGateRequest): Promise<QualityVerdictResult>;
|
|
42
|
+
/**
|
|
43
|
+
* Load the pinned checklist for `checklistId` from the frozen anchor. Exposed so
|
|
44
|
+
* callers (CLI/MCP) can list valid ids or pre-validate before building a judge.
|
|
45
|
+
*/
|
|
46
|
+
export declare function loadChecklist(checklistId: string, anchorPath?: string): RequirementChecklist;
|
|
47
|
+
/** List every checklist id in the frozen anchor (for CLI/MCP discoverability). */
|
|
48
|
+
export declare function listChecklistIds(anchorPath?: string): string[];
|
|
49
|
+
//# sourceMappingURL=quality-gate-runner.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quality-gate orchestrator (ADR-119 / ADR-120).
|
|
3
|
+
*
|
|
4
|
+
* The ONE code path both the `aqe quality-gate` CLI subcommand and the
|
|
5
|
+
* `qe/quality/gate` MCP tool call, so the two surfaces stay in exact parity
|
|
6
|
+
* (the CLI/MCP divergence CLAUDE.md warns about). It:
|
|
7
|
+
*
|
|
8
|
+
* 1. loads the pinned, hash-checked ADR-117 anchor via `loadAnchorSet` (which
|
|
9
|
+
* throws on drift — the frozen checklist can't be silently edited),
|
|
10
|
+
* 2. selects the constant-denominator checklist for `checklistId`,
|
|
11
|
+
* 3. runs the two-gate, three-valued `computeQualityVerdict` with the injected
|
|
12
|
+
* frontier judge.
|
|
13
|
+
*
|
|
14
|
+
* The oracle result and the judge are injected — this module owns no LLM and no
|
|
15
|
+
* mutation runner, so it is deterministic and unit-testable with a fake judge.
|
|
16
|
+
*/
|
|
17
|
+
import path from 'node:path';
|
|
18
|
+
import { loadAnchorSet } from './anchor-set.js';
|
|
19
|
+
import { computeQualityVerdict, } from './quality-verdict.js';
|
|
20
|
+
import { findProjectRoot } from '../kernel/unified-memory.js';
|
|
21
|
+
/** Default frozen anchor location, relative to the project root (ADR-117). */
|
|
22
|
+
export const DEFAULT_ANCHOR_RELATIVE_PATH = 'verification/anchors/qe-anchor-v1.json';
|
|
23
|
+
/**
|
|
24
|
+
* Run the two-gate quality gate for one artifact against one pinned checklist.
|
|
25
|
+
* Throws only for caller error (unknown checklist id, unloadable/drifted anchor);
|
|
26
|
+
* every judgement outcome is returned as a three-valued `QualityVerdictResult`.
|
|
27
|
+
*/
|
|
28
|
+
export async function runQualityGate(req) {
|
|
29
|
+
const checklist = loadChecklist(req.checklistId, req.anchorPath);
|
|
30
|
+
return computeQualityVerdict({
|
|
31
|
+
oracle: req.oracleResult,
|
|
32
|
+
artifact: req.artifact,
|
|
33
|
+
checklist,
|
|
34
|
+
judge: req.judge,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Load the pinned checklist for `checklistId` from the frozen anchor. Exposed so
|
|
39
|
+
* callers (CLI/MCP) can list valid ids or pre-validate before building a judge.
|
|
40
|
+
*/
|
|
41
|
+
export function loadChecklist(checklistId, anchorPath) {
|
|
42
|
+
const resolved = resolveAnchorPath(anchorPath);
|
|
43
|
+
const anchor = loadAnchorSet(resolved); // throws on hash drift (ADR-117 §2)
|
|
44
|
+
const item = anchor.items.find((it) => it.id === checklistId);
|
|
45
|
+
if (!item) {
|
|
46
|
+
const available = anchor.items.map((it) => it.id).join(', ');
|
|
47
|
+
throw new Error(`Unknown checklist id "${checklistId}" in anchor ${resolved}. Available: ${available}`);
|
|
48
|
+
}
|
|
49
|
+
return { id: item.id, requirements: item.requirements };
|
|
50
|
+
}
|
|
51
|
+
/** List every checklist id in the frozen anchor (for CLI/MCP discoverability). */
|
|
52
|
+
export function listChecklistIds(anchorPath) {
|
|
53
|
+
const anchor = loadAnchorSet(resolveAnchorPath(anchorPath));
|
|
54
|
+
return anchor.items.map((it) => it.id);
|
|
55
|
+
}
|
|
56
|
+
function resolveAnchorPath(anchorPath) {
|
|
57
|
+
if (anchorPath && path.isAbsolute(anchorPath))
|
|
58
|
+
return anchorPath;
|
|
59
|
+
const root = findProjectRoot();
|
|
60
|
+
return path.resolve(root, anchorPath ?? DEFAULT_ANCHOR_RELATIVE_PATH);
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=quality-gate-runner.js.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-gate, three-valued quality verdict (ADR-119).
|
|
3
|
+
*
|
|
4
|
+
* A single, two-valued quality verdict lies in three ways: it can pass tests
|
|
5
|
+
* that never executed, a single LLM judge is noisy (retort measured Haiku
|
|
6
|
+
* swinging 0.33↔1.0 on identical code), and pass/fail can't tell a genuine gap
|
|
7
|
+
* from an inconclusive run. This composes retort's design:
|
|
8
|
+
*
|
|
9
|
+
* 1. Mechanical gate — reuse the ADR-113 oracle. Tests that did not execute
|
|
10
|
+
* ⇒ `fail`. No judge is consulted until the mechanical gate is satisfied.
|
|
11
|
+
* 2. Spec gate — a FRONTIER-tier judge (never the cheap writer lane, ADR-111)
|
|
12
|
+
* scores the artifact against the ADR-117 pinned, constant-denominator
|
|
13
|
+
* checklist; two-attempt second opinion; pass only at coverage 1.0.
|
|
14
|
+
* 3. Judge preflight — refuse to report success if the judge never ran.
|
|
15
|
+
*
|
|
16
|
+
* Verdict ∈ {pass, fail, inconclusive}. `inconclusive` (retort's `None`) keeps
|
|
17
|
+
* an infra hiccup from masquerading as a spec failure — ADR-118's accept()
|
|
18
|
+
* records neither a promotion nor a rejection on `inconclusive`.
|
|
19
|
+
*
|
|
20
|
+
* The judge and checklist are injected so this logic is testable without a live
|
|
21
|
+
* frontier model or the frozen anchor file (which is authored under ADR-117).
|
|
22
|
+
*/
|
|
23
|
+
import type { OracleResult } from './oracle-eval.js';
|
|
24
|
+
export type QualityVerdict = 'pass' | 'fail' | 'inconclusive';
|
|
25
|
+
/**
|
|
26
|
+
* A pinned, constant-denominator requirement checklist (ADR-117 anchor).
|
|
27
|
+
* The denominator (requirement count) is authored ONCE per artifact type so
|
|
28
|
+
* coverage scores are comparable across runs — retort's fix for non-comparable
|
|
29
|
+
* per-run extraction.
|
|
30
|
+
*/
|
|
31
|
+
export interface RequirementChecklist {
|
|
32
|
+
/** Stable id of the pinned checklist (e.g. the ADR-117 anchor id). */
|
|
33
|
+
id: string;
|
|
34
|
+
/** The requirements — the constant denominator. Must be non-empty. */
|
|
35
|
+
requirements: string[];
|
|
36
|
+
}
|
|
37
|
+
/** One judge attempt's opinion. */
|
|
38
|
+
export interface JudgeOpinion {
|
|
39
|
+
/**
|
|
40
|
+
* Whether the judge tooling actually ran and produced a real grade. `false`
|
|
41
|
+
* means usage-limit / timeout / tooling failure — NOT a real opinion, so it
|
|
42
|
+
* can never contribute to a `fail`.
|
|
43
|
+
*/
|
|
44
|
+
ran: boolean;
|
|
45
|
+
/** Fraction of checklist requirements satisfied, in [0, 1]. */
|
|
46
|
+
coverage: number;
|
|
47
|
+
/** Requirements judged unmet (for reporting; empty when coverage is 1.0). */
|
|
48
|
+
unmet: string[];
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The frontier judge. ALWAYS top-tier (ADR-111 — the oracle is the one place
|
|
52
|
+
* you never economize). Implementations wrap the frontier model + credentials.
|
|
53
|
+
*/
|
|
54
|
+
export interface Judge {
|
|
55
|
+
/** ADR-119 §4: verify the judge tooling/credentials before grading. */
|
|
56
|
+
preflight(): Promise<boolean> | boolean;
|
|
57
|
+
/** Grade the artifact against the pinned checklist. */
|
|
58
|
+
grade(artifact: string, checklist: RequirementChecklist): Promise<JudgeOpinion> | JudgeOpinion;
|
|
59
|
+
}
|
|
60
|
+
export interface QualityVerdictInput {
|
|
61
|
+
/**
|
|
62
|
+
* Mechanical-gate result from the ADR-113 oracle. `null` means the oracle did
|
|
63
|
+
* not run at all — treated as a non-executed test ⇒ mechanical fail.
|
|
64
|
+
*/
|
|
65
|
+
oracle: Pick<OracleResult, 'passed' | 'baselinePassed'> | null;
|
|
66
|
+
/** The artifact under judgement (e.g. produced test source / spec output). */
|
|
67
|
+
artifact: string;
|
|
68
|
+
/** The pinned checklist to grade against. */
|
|
69
|
+
checklist: RequirementChecklist;
|
|
70
|
+
/** The frontier judge (injected). */
|
|
71
|
+
judge: Judge;
|
|
72
|
+
}
|
|
73
|
+
export interface QualityVerdictResult {
|
|
74
|
+
verdict: QualityVerdict;
|
|
75
|
+
/** Mechanical gate outcome (execution). */
|
|
76
|
+
mechanical: 'pass' | 'fail';
|
|
77
|
+
/** Best spec-gate coverage observed across attempts (null if judge never ran). */
|
|
78
|
+
specCoverage: number | null;
|
|
79
|
+
/** Unmet requirements from the best real attempt (empty on pass). */
|
|
80
|
+
unmet: string[];
|
|
81
|
+
/** Number of spec-gate attempts actually made. */
|
|
82
|
+
attempts: number;
|
|
83
|
+
reason: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Compute the two-gate, three-valued quality verdict.
|
|
87
|
+
*
|
|
88
|
+
* Order is strict: mechanical gate first (a non-executing test is `fail`
|
|
89
|
+
* regardless of judge opinion), then judge preflight, then the two-attempt spec
|
|
90
|
+
* gate. `fail` requires TWO real short opinions; fewer than two real opinions ⇒
|
|
91
|
+
* `inconclusive` (never a silent pass, never a spec-fail from infra).
|
|
92
|
+
*/
|
|
93
|
+
export declare function computeQualityVerdict(input: QualityVerdictInput): Promise<QualityVerdictResult>;
|
|
94
|
+
//# sourceMappingURL=quality-verdict.d.ts.map
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-gate, three-valued quality verdict (ADR-119).
|
|
3
|
+
*
|
|
4
|
+
* A single, two-valued quality verdict lies in three ways: it can pass tests
|
|
5
|
+
* that never executed, a single LLM judge is noisy (retort measured Haiku
|
|
6
|
+
* swinging 0.33↔1.0 on identical code), and pass/fail can't tell a genuine gap
|
|
7
|
+
* from an inconclusive run. This composes retort's design:
|
|
8
|
+
*
|
|
9
|
+
* 1. Mechanical gate — reuse the ADR-113 oracle. Tests that did not execute
|
|
10
|
+
* ⇒ `fail`. No judge is consulted until the mechanical gate is satisfied.
|
|
11
|
+
* 2. Spec gate — a FRONTIER-tier judge (never the cheap writer lane, ADR-111)
|
|
12
|
+
* scores the artifact against the ADR-117 pinned, constant-denominator
|
|
13
|
+
* checklist; two-attempt second opinion; pass only at coverage 1.0.
|
|
14
|
+
* 3. Judge preflight — refuse to report success if the judge never ran.
|
|
15
|
+
*
|
|
16
|
+
* Verdict ∈ {pass, fail, inconclusive}. `inconclusive` (retort's `None`) keeps
|
|
17
|
+
* an infra hiccup from masquerading as a spec failure — ADR-118's accept()
|
|
18
|
+
* records neither a promotion nor a rejection on `inconclusive`.
|
|
19
|
+
*
|
|
20
|
+
* The judge and checklist are injected so this logic is testable without a live
|
|
21
|
+
* frontier model or the frozen anchor file (which is authored under ADR-117).
|
|
22
|
+
*/
|
|
23
|
+
/** Coverage at or above this is a spec-gate pass (pinned checklist ⇒ pass only at 1.0). */
|
|
24
|
+
const PASS_COVERAGE = 1.0;
|
|
25
|
+
/** ADR-119 §3: at most two attempts (second opinion). */
|
|
26
|
+
const MAX_ATTEMPTS = 2;
|
|
27
|
+
/**
|
|
28
|
+
* Compute the two-gate, three-valued quality verdict.
|
|
29
|
+
*
|
|
30
|
+
* Order is strict: mechanical gate first (a non-executing test is `fail`
|
|
31
|
+
* regardless of judge opinion), then judge preflight, then the two-attempt spec
|
|
32
|
+
* gate. `fail` requires TWO real short opinions; fewer than two real opinions ⇒
|
|
33
|
+
* `inconclusive` (never a silent pass, never a spec-fail from infra).
|
|
34
|
+
*/
|
|
35
|
+
export async function computeQualityVerdict(input) {
|
|
36
|
+
if (input.checklist.requirements.length === 0) {
|
|
37
|
+
throw new Error('RequirementChecklist must have a non-empty, constant denominator (ADR-117).');
|
|
38
|
+
}
|
|
39
|
+
// 1. Mechanical gate (ADR-113). Non-execution ⇒ fail, no judge consulted.
|
|
40
|
+
const mechanicalPass = input.oracle != null && input.oracle.baselinePassed && input.oracle.passed;
|
|
41
|
+
if (!mechanicalPass) {
|
|
42
|
+
const why = input.oracle == null
|
|
43
|
+
? 'oracle did not run'
|
|
44
|
+
: !input.oracle.baselinePassed
|
|
45
|
+
? 'tests did not execute against the reference implementation'
|
|
46
|
+
: 'mutation score below threshold';
|
|
47
|
+
return {
|
|
48
|
+
verdict: 'fail',
|
|
49
|
+
mechanical: 'fail',
|
|
50
|
+
specCoverage: null,
|
|
51
|
+
unmet: [],
|
|
52
|
+
attempts: 0,
|
|
53
|
+
reason: `mechanical gate failed: ${why}`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
// 2. Judge preflight (ADR-119 §4). If the judge tooling can't run, the verdict
|
|
57
|
+
// is inconclusive — never a silent pass.
|
|
58
|
+
const ready = await input.judge.preflight();
|
|
59
|
+
if (!ready) {
|
|
60
|
+
return {
|
|
61
|
+
verdict: 'inconclusive',
|
|
62
|
+
mechanical: 'pass',
|
|
63
|
+
specCoverage: null,
|
|
64
|
+
unmet: [],
|
|
65
|
+
attempts: 0,
|
|
66
|
+
reason: 'judge preflight failed: judge tooling did not run — refusing to report success',
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
// 3. Two-attempt spec gate (retort protocol). Pass on the first attempt that
|
|
70
|
+
// reaches 1.0; otherwise collect real opinions.
|
|
71
|
+
const realOpinions = [];
|
|
72
|
+
let bestCoverage = null;
|
|
73
|
+
let bestUnmet = [];
|
|
74
|
+
let attempts = 0;
|
|
75
|
+
for (let i = 0; i < MAX_ATTEMPTS; i++) {
|
|
76
|
+
attempts++;
|
|
77
|
+
const op = await input.judge.grade(input.artifact, input.checklist);
|
|
78
|
+
if (!op.ran) {
|
|
79
|
+
continue; // not a real opinion — cannot contribute to a fail
|
|
80
|
+
}
|
|
81
|
+
realOpinions.push(op);
|
|
82
|
+
if (bestCoverage == null || op.coverage > bestCoverage) {
|
|
83
|
+
bestCoverage = op.coverage;
|
|
84
|
+
bestUnmet = op.unmet;
|
|
85
|
+
}
|
|
86
|
+
if (op.coverage >= PASS_COVERAGE) {
|
|
87
|
+
return {
|
|
88
|
+
verdict: 'pass',
|
|
89
|
+
mechanical: 'pass',
|
|
90
|
+
specCoverage: op.coverage,
|
|
91
|
+
unmet: [],
|
|
92
|
+
attempts,
|
|
93
|
+
reason: `spec gate passed at coverage ${op.coverage.toFixed(3)} on attempt ${attempts}`,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// No attempt reached 1.0. Fail ONLY on two real short opinions; otherwise
|
|
98
|
+
// inconclusive (fewer than two real opinions = usage limit / timeout).
|
|
99
|
+
if (realOpinions.length >= 2) {
|
|
100
|
+
return {
|
|
101
|
+
verdict: 'fail',
|
|
102
|
+
mechanical: 'pass',
|
|
103
|
+
specCoverage: bestCoverage,
|
|
104
|
+
unmet: bestUnmet,
|
|
105
|
+
attempts,
|
|
106
|
+
reason: `spec gate failed: ${realOpinions.length} real opinions, best coverage `
|
|
107
|
+
+ `${(bestCoverage ?? 0).toFixed(3)} < ${PASS_COVERAGE} (${bestUnmet.length} unmet)`,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
verdict: 'inconclusive',
|
|
112
|
+
mechanical: 'pass',
|
|
113
|
+
specCoverage: bestCoverage,
|
|
114
|
+
unmet: bestUnmet,
|
|
115
|
+
attempts,
|
|
116
|
+
reason: `spec gate inconclusive: only ${realOpinions.length} real opinion(s) obtainable `
|
|
117
|
+
+ `(need 2 to fail) — retry later, record neither pass nor fail`,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=quality-verdict.js.map
|
|
@@ -17,11 +17,12 @@ import { ALL_DOMAINS } from '../../shared/types';
|
|
|
17
17
|
import { TimeRange } from '../../shared/value-objects/index.js';
|
|
18
18
|
import { DreamEngine } from '../../learning/dream/index.js';
|
|
19
19
|
import { createPatternLifecycleManager, } from '../../learning/pattern-lifecycle.js';
|
|
20
|
-
import { getUnifiedMemory } from '../../kernel/unified-memory.js';
|
|
20
|
+
import { getUnifiedMemory, findProjectRoot } from '../../kernel/unified-memory.js';
|
|
21
21
|
import { toErrorMessage } from '../../shared/error-utils.js';
|
|
22
22
|
import { ExperienceConsolidator } from '../../learning/experience-consolidation.js';
|
|
23
23
|
import { recordLoopHealth } from '../../learning/loop-health.js';
|
|
24
24
|
import { pruneStaleDreamInsights } from '../../learning/dream/dream-insights-pruner.js';
|
|
25
|
+
import { createLearningMetricsTracker } from '../../learning/metrics-tracker.js';
|
|
25
26
|
const CONFIG = {
|
|
26
27
|
id: 'learning-consolidation',
|
|
27
28
|
name: 'Learning Consolidation',
|
|
@@ -202,6 +203,25 @@ export class LearningConsolidationWorker extends BaseWorker {
|
|
|
202
203
|
error: recordErr instanceof Error ? recordErr.message : String(recordErr),
|
|
203
204
|
});
|
|
204
205
|
}
|
|
206
|
+
// A18: learning_daily_snapshots previously only populated via the
|
|
207
|
+
// manual `aqe learning dashboard --save-snapshot` flag — it never
|
|
208
|
+
// advanced on its own. Piggyback on this worker's existing ~30-min
|
|
209
|
+
// cadence instead of adding a new timer. Best-effort, own DB handle
|
|
210
|
+
// closed every tick (LearningMetricsTracker opens a connection
|
|
211
|
+
// separate from the shared unified-memory one context.memory uses).
|
|
212
|
+
const tracker = createLearningMetricsTracker(findProjectRoot());
|
|
213
|
+
try {
|
|
214
|
+
await tracker.initialize();
|
|
215
|
+
await tracker.saveSnapshot();
|
|
216
|
+
}
|
|
217
|
+
catch (snapshotErr) {
|
|
218
|
+
context.logger.warn('learning_daily_snapshots saveSnapshot failed (non-fatal)', {
|
|
219
|
+
error: snapshotErr instanceof Error ? snapshotErr.message : String(snapshotErr),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
finally {
|
|
223
|
+
tracker.close();
|
|
224
|
+
}
|
|
205
225
|
}
|
|
206
226
|
}
|
|
207
227
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Agentic Quality Engineering V3 - Domain-Driven Design Architecture with 13 Bounded Contexts, O(log n) coverage analysis, ReasoningBank learning, 60 specialized QE agents, mathematical Coherence verification, deep Claude Flow integration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -1,2 +0,0 @@
|
|
|
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.4");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-N2BJN6AO.js";import"./chunk-6JUOH6L4.js";import"./chunk-AYGEWPN4.js";import"./chunk-VJGHRWMH.js";import"./chunk-PEIQDQXN.js";import"./chunk-Y4AXOHW4.js";export{a as AgentBoosterAdapter,b as createAgentBoosterAdapter,c as createAgentBoosterAdapterSync};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.4");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-3SRPFBU7.js";import"./chunk-QEVX4GWF.js";import"./chunk-HWBMYR5W.js";import"./chunk-QSDIY3E2.js";import"./chunk-MYMIEQSZ.js";import"./chunk-DNOU2HVQ.js";import"./chunk-2WPSMQIL.js";import"./chunk-IF3HPQNV.js";import"./chunk-HT6WAYIR.js";import"./chunk-HJO4RNOW.js";import"./chunk-5AQ7FXYG.js";import"./chunk-YNK6SUPU.js";import"./chunk-YKSWC7I4.js";import"./chunk-54B6P2WS.js";import"./chunk-TPMBFARK.js";import"./chunk-LW5DHT3Z.js";import"./chunk-XXRTWG7O.js";import"./chunk-6GYGAW53.js";import"./chunk-LLUPRGOR.js";import"./chunk-VJGHRWMH.js";import"./chunk-IB3ZPLFA.js";import"./chunk-TSWF3AGQ.js";import"./chunk-NSPCZPTB.js";import"./chunk-O7PVZ32A.js";import"./chunk-PEIQDQXN.js";import"./chunk-BMQDELPA.js";import"./chunk-TCWR6TDN.js";import"./chunk-YUHM72VQ.js";import"./chunk-PQUXFSN6.js";import"./chunk-7AWK43JN.js";import"./chunk-VCUCD3B5.js";import"./chunk-QJ5NCYJ3.js";import"./chunk-TQ373GGI.js";import"./chunk-7QTB5XIQ.js";import"./chunk-7ADD2ZQL.js";import"./chunk-Y4AXOHW4.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|
|
@@ -1,3 +0,0 @@
|
|
|
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.4");process.exit(0)}
|
|
2
|
-
import{d as c,e as u,f as h,g as m}from"./chunk-BRLUNIR4.js";import{m as p}from"./chunk-TPMBFARK.js";import"./chunk-LW5DHT3Z.js";import"./chunk-XXRTWG7O.js";import"./chunk-6GYGAW53.js";import{b as s}from"./chunk-LLUPRGOR.js";import"./chunk-VJGHRWMH.js";import"./chunk-NSPCZPTB.js";import"./chunk-PEIQDQXN.js";import"./chunk-TCWR6TDN.js";import{p as l,q as d}from"./chunk-YUHM72VQ.js";import"./chunk-PQUXFSN6.js";import"./chunk-7AWK43JN.js";import"./chunk-VCUCD3B5.js";import"./chunk-QJ5NCYJ3.js";import"./chunk-TQ373GGI.js";import"./chunk-7QTB5XIQ.js";import"./chunk-7ADD2ZQL.js";import{g as f}from"./chunk-Y4AXOHW4.js";import{Command as g}from"commander";import a from"chalk";p();import{existsSync as y}from"node:fs";import b from"node:path";function C(n,i){let t=[];t.push(a.bold("Witness Chain Audit Verification")),t.push("");let e=i?a.green("ENABLED"):a.yellow("DISABLED");t.push(` Feature Flag: ${e}`),t.push(` Chain Length: ${n.length} receipts`);let r=n.valid?a.green("VALID"):a.red("BROKEN");return t.push(` Integrity: ${r}`),n.length>0&&t.push(` Last Hash: ${n.lastHash.slice(0,16)}...`),!n.valid&&n.brokenAt>=0&&(t.push(""),t.push(a.red(` Break detected at index ${n.brokenAt}`)),t.push(a.red(` ${n.message}`))),t.push(""),t.join(`
|
|
3
|
-
`)}function x(){try{let n=s(),i=b.join(n,".agentic-qe","memory.db");if(!y(i))return null;let t=(d(),f(l)),e=new t(i),r=c(e),o=h(r);return e.close(),o}catch{return null}}async function A(n){let i=m(),e=(x()??u()).verifyChain(),r={featureEnabled:i,chainLength:e.length,integrity:e.valid,brokenAt:e.brokenAt,lastHash:e.lastHash,message:e.message};return n.format==="json"?console.log(JSON.stringify(r,null,2)):console.log(C(e,i)),r}function v(n,i,t){let e=new g("audit").description("Witness chain audit trail management");return e.command("verify").description("Verify witness chain integrity").option("-F, --format <format>","Output format (json|text)","text").action(async r=>{try{await A({format:r.format}),await i(0)}catch(o){console.error("Failed to verify witness chain:",o),await i(1)}}),e}export{v as createAuditCommand,C as formatVerificationText,A as handleAuditVerify};
|
|
@@ -1,2 +0,0 @@
|
|
|
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.4");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"./chunk-ZSA6V5FH.js";import"./chunk-IQBZBUP5.js";import"./chunk-TPMBFARK.js";import"./chunk-LW5DHT3Z.js";import"./chunk-XXRTWG7O.js";import"./chunk-6GYGAW53.js";import"./chunk-LLUPRGOR.js";import"./chunk-VJGHRWMH.js";import"./chunk-NSPCZPTB.js";import"./chunk-PEIQDQXN.js";import"./chunk-BMQDELPA.js";import"./chunk-ICCTQ5LO.js";import"./chunk-TCWR6TDN.js";import"./chunk-YUHM72VQ.js";import"./chunk-PQUXFSN6.js";import"./chunk-7AWK43JN.js";import"./chunk-VCUCD3B5.js";import"./chunk-QJ5NCYJ3.js";import"./chunk-TQ373GGI.js";import"./chunk-7QTB5XIQ.js";import"./chunk-7ADD2ZQL.js";import"./chunk-Y4AXOHW4.js";export{k as MCPToolBase,j as defaultToolLogger,i as getLLMRouter,e as getMemoryBackend,g as getSharedLLMRouter,c as getSharedMemoryBackend,a as isMemoryOnlyMode,b as registerRvfResetFn,h as resetSharedLLMRouter,d as resetSharedMemoryBackend,f as setSharedLLMRouter};
|