agentic-qe 3.11.5 → 3.12.1
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 +14 -1
- package/.claude/skills/skills-manifest.json +1 -1
- package/CHANGELOG.md +87 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/dist/adapters/a2a/auth/routes.js +59 -28
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-X4UEC6UJ.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-CSTBLNYZ.js → agent-booster-wasm-P4VYM5KK.js} +2 -2
- package/dist/cli/chunks/{agent-handler-M4W4GTXN.js → agent-handler-PBQ7L2TO.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-VGXFYLSQ.js → agent-memory-branch-UPWO3X6V.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-5FG7JCY7.js +2 -0
- package/dist/cli/chunks/{arena-IQBRGWAG.js → arena-LEUTILZ7.js} +2 -2
- package/dist/cli/chunks/{arena-FKSD3LLM.js → arena-QYTP3FG6.js} +4 -4
- package/dist/cli/chunks/{audit-7NSGRR4Z.js → audit-TB6M2YLK.js} +3 -3
- package/dist/cli/chunks/base-CWPMFSZG.js +2 -0
- package/dist/cli/chunks/{hnswlib-node-E6NSZPP2.js → better-sqlite3-IPKCAVLS.js} +2 -2
- package/dist/cli/chunks/{brain-handler-M6A3UB66.js → brain-handler-JF3OK35F.js} +3 -3
- package/dist/cli/chunks/{branch-enumerator-2JGKY4BB.js → branch-enumerator-WEIP3DXB.js} +2 -2
- package/dist/cli/chunks/{browser-J43WQPJL.js → browser-HY6VLXHZ.js} +2 -2
- package/dist/cli/chunks/browser-workflow-A77OFBVY.js +2 -0
- package/dist/cli/chunks/{chunk-7BCRULCP.js → chunk-2PQ7YADF.js} +2 -2
- package/dist/cli/chunks/{chunk-XKQY2Z3Q.js → chunk-3I3Z4C5X.js} +1 -1
- package/dist/cli/chunks/{chunk-MCHEUSY4.js → chunk-3W2FZXFD.js} +1 -1
- package/dist/cli/chunks/{chunk-WMZ2QGGS.js → chunk-42GFB7VX.js} +2 -2
- package/dist/cli/chunks/{chunk-UBI2EOS3.js → chunk-42PYEEYQ.js} +1 -1
- package/dist/cli/chunks/{chunk-HJWT4KME.js → chunk-45QNHMTP.js} +1 -1
- package/dist/cli/chunks/{chunk-AGJOGUP5.js → chunk-4KI72C2E.js} +1 -1
- package/dist/cli/chunks/{chunk-5WMU7XCF.js → chunk-4LKQZW2H.js} +1 -1
- package/dist/cli/chunks/{chunk-SUL3I6QZ.js → chunk-4U5MJX2H.js} +2 -2
- package/dist/cli/chunks/{chunk-DFRRWOEX.js → chunk-55MQ2SFP.js} +2 -2
- package/dist/cli/chunks/{chunk-KP3R2M2G.js → chunk-5H5A74U2.js} +1 -1
- package/dist/cli/chunks/{chunk-YBPLJRVT.js → chunk-5HMGDB7B.js} +2 -2
- package/dist/cli/chunks/{chunk-YZSTZUGJ.js → chunk-6432JORM.js} +1 -1
- package/dist/cli/chunks/{chunk-CDJP6COA.js → chunk-6BCVKCG5.js} +2 -2
- package/dist/cli/chunks/{chunk-TBT3OFRW.js → chunk-6ONUCDVL.js} +2 -2
- package/dist/cli/chunks/{chunk-3LY7OCSO.js → chunk-6RX5QZMU.js} +1 -1
- package/dist/cli/chunks/chunk-74VIADSJ.js +2 -0
- package/dist/cli/chunks/{chunk-K4I7UIU5.js → chunk-75AVUS5U.js} +1 -1
- package/dist/cli/chunks/{chunk-KVVJVMDM.js → chunk-774X6OJY.js} +2 -2
- package/dist/cli/chunks/chunk-7KHIOWBN.js +2 -0
- package/dist/cli/chunks/{chunk-62OTU2AP.js → chunk-7KK6XSYK.js} +2 -2
- package/dist/cli/chunks/{chunk-RFLHPLET.js → chunk-7N2SCRWJ.js} +1 -1
- package/dist/cli/chunks/{chunk-OS2HHJTM.js → chunk-AGWKCY42.js} +2 -2
- package/dist/cli/chunks/chunk-BAHXVVX3.js +4 -0
- package/dist/cli/chunks/{chunk-6T65OKUM.js → chunk-BALFQQB7.js} +2 -2
- package/dist/cli/chunks/{chunk-I3ANRYQ6.js → chunk-BBNQDHGF.js} +2 -2
- package/dist/cli/chunks/{chunk-LOE2JETO.js → chunk-BCBITOMT.js} +2 -2
- package/dist/cli/chunks/{chunk-FII3WCCY.js → chunk-BKKJEKNT.js} +2 -2
- package/dist/cli/chunks/{chunk-TTJJ4DQE.js → chunk-BLU7OLQZ.js} +2 -2
- package/dist/cli/chunks/{chunk-AL5VJJN4.js → chunk-BNMV5DCM.js} +1 -1
- package/dist/cli/chunks/{chunk-4XJ2A3HY.js → chunk-BPM7NEHS.js} +4 -4
- package/dist/cli/chunks/{chunk-3V36WMIO.js → chunk-BWNMAXV7.js} +1 -1
- package/dist/cli/chunks/{chunk-EDOGRFAG.js → chunk-BXIJY6SB.js} +1 -1
- package/dist/cli/chunks/{chunk-ZXEWTZFR.js → chunk-C2K4LQI5.js} +1 -1
- package/dist/cli/chunks/{chunk-3WR35GFF.js → chunk-C7HGYLNF.js} +2 -2
- package/dist/cli/chunks/{chunk-7YSBATSN.js → chunk-CDVKFAYP.js} +2 -2
- package/dist/cli/chunks/{chunk-JBKZ5TUM.js → chunk-CJTXZI37.js} +2 -2
- package/dist/cli/chunks/{chunk-VMWRMINE.js → chunk-CP4GSICY.js} +1 -1
- package/dist/cli/chunks/{chunk-2XPMATEK.js → chunk-CXUHD2O5.js} +2 -2
- package/dist/cli/chunks/{chunk-W7TYKPLY.js → chunk-CYYT6YEV.js} +2 -2
- package/dist/cli/chunks/{chunk-SO6G4IX3.js → chunk-D72N5V2S.js} +2 -2
- package/dist/cli/chunks/{chunk-4LODYRNV.js → chunk-DQ3J7ZT6.js} +2 -2
- package/dist/cli/chunks/{chunk-PVDXNQPL.js → chunk-DSNFOX22.js} +2 -2
- package/dist/cli/chunks/{chunk-LPR2R3AN.js → chunk-EOBZJDJR.js} +3 -3
- package/dist/cli/chunks/{chunk-6R3YOAKO.js → chunk-FBYFDD7L.js} +2 -2
- package/dist/cli/chunks/{chunk-ZPP57WQU.js → chunk-FFSS3Y6W.js} +2 -2
- package/dist/cli/chunks/chunk-FNMEVLSN.js +2 -0
- package/dist/cli/chunks/{chunk-7KXPNNMR.js → chunk-GASACVTU.js} +2 -2
- package/dist/cli/chunks/{chunk-ABU64UWB.js → chunk-GGF5FZWS.js} +1 -1
- package/dist/cli/chunks/{chunk-M6FW56MV.js → chunk-GLO53MUQ.js} +2 -2
- package/dist/cli/chunks/{chunk-52U5BFZP.js → chunk-GW3M7GQH.js} +2 -2
- package/dist/cli/chunks/chunk-GXMNCW2M.js +2 -0
- package/dist/cli/chunks/{chunk-D45QLJEL.js → chunk-HDI3FD4G.js} +1 -1
- package/dist/cli/chunks/{chunk-26WEI3P4.js → chunk-HGKSU4QV.js} +2 -2
- package/dist/cli/chunks/{chunk-B2VBDMDI.js → chunk-HHMTQQUE.js} +2 -2
- package/dist/cli/chunks/{chunk-4Y3LGBKJ.js → chunk-HZGFER4N.js} +3 -3
- package/dist/cli/chunks/{chunk-AXKWV5NF.js → chunk-I4BZLVFE.js} +3 -3
- package/dist/cli/chunks/{chunk-JDSHUECG.js → chunk-IC6SOVGO.js} +2 -2
- package/dist/cli/chunks/{chunk-YFCULQBP.js → chunk-IE6FDICX.js} +2 -2
- package/dist/cli/chunks/{chunk-FGD6HINU.js → chunk-IHWWZOHP.js} +1 -1
- package/dist/cli/chunks/{chunk-HC6KTVFR.js → chunk-J4IAMQZI.js} +2 -2
- package/dist/cli/chunks/{chunk-VMFAANWX.js → chunk-J6ZCULWG.js} +2 -2
- package/dist/cli/chunks/{chunk-YGVDP6X7.js → chunk-JDZIBSMY.js} +1 -1
- package/dist/cli/chunks/{chunk-WPSK237F.js → chunk-JIM4VSLF.js} +3 -3
- package/dist/cli/chunks/{chunk-EK3HPH6A.js → chunk-JRHRC2MP.js} +1 -1
- package/dist/cli/chunks/{chunk-3JF5A72M.js → chunk-JRNDFC23.js} +2 -2
- package/dist/cli/chunks/chunk-JWZNWVLG.js +153 -0
- package/dist/cli/chunks/{chunk-Q5TR6ETB.js → chunk-KQV5644J.js} +3 -3
- package/dist/cli/chunks/{chunk-4RTWPR3X.js → chunk-LAJHHR3Q.js} +1 -1
- package/dist/cli/chunks/{chunk-AOXJFDH5.js → chunk-LF5XOYR7.js} +10 -10
- package/dist/cli/chunks/{chunk-I3NWKPXJ.js → chunk-LRWBOJ5Y.js} +2 -2
- package/dist/cli/chunks/{chunk-354367AP.js → chunk-LZ6TJ7XL.js} +2 -2
- package/dist/cli/chunks/{chunk-4QOI5JS7.js → chunk-M5P5WNXA.js} +1 -1
- package/dist/cli/chunks/{chunk-SE3JFUKP.js → chunk-MCUILJ33.js} +1 -1
- package/dist/cli/chunks/{chunk-ZG5UAEEO.js → chunk-MIAY35K6.js} +2 -2
- package/dist/cli/chunks/{chunk-6Q57K4YD.js → chunk-N3PSRG6F.js} +2 -2
- package/dist/cli/chunks/{chunk-FMNXHVIN.js → chunk-NEXJUTHF.js} +2 -2
- package/dist/cli/chunks/{chunk-RJN2RM76.js → chunk-NHRBKOYD.js} +2 -2
- package/dist/cli/chunks/{chunk-BJLA2IX7.js → chunk-NK2Z6FGF.js} +2 -2
- package/dist/cli/chunks/{chunk-Y25PO65W.js → chunk-NOCPO55P.js} +2 -2
- package/dist/cli/chunks/{chunk-XT4TDLOB.js → chunk-NTMN2ZJY.js} +2 -2
- package/dist/cli/chunks/{chunk-7DTMENY6.js → chunk-NVXSM7UO.js} +2 -2
- package/dist/cli/chunks/{chunk-CKOF27L7.js → chunk-O65OPAZH.js} +2 -2
- package/dist/cli/chunks/{chunk-OGNTCZKK.js → chunk-OEXSBR72.js} +1 -1
- package/dist/cli/chunks/{chunk-Y6DWJKHU.js → chunk-OJORNYN3.js} +3 -3
- package/dist/cli/chunks/{chunk-DPL762HU.js → chunk-ONSNNY6J.js} +1 -1
- package/dist/cli/chunks/{chunk-IBDQWKI3.js → chunk-OXVAGR64.js} +2 -2
- package/dist/cli/chunks/{chunk-C5C4W572.js → chunk-P7G5LGUE.js} +2 -2
- package/dist/cli/chunks/{chunk-XLT3FYS7.js → chunk-PDS5P5QD.js} +2 -2
- package/dist/cli/chunks/{chunk-IU5RSN6M.js → chunk-PQ4NSXZM.js} +2 -2
- package/dist/cli/chunks/{chunk-4MHN7JWC.js → chunk-PRA73XZY.js} +12 -12
- package/dist/cli/chunks/{chunk-2XQHG56O.js → chunk-PZ3Q34OT.js} +2 -2
- package/dist/cli/chunks/{chunk-EEKG35K5.js → chunk-PZZDAECU.js} +3 -3
- package/dist/cli/chunks/{chunk-J6PFPY7V.js → chunk-QJXUK54J.js} +2 -2
- package/dist/cli/chunks/{chunk-7P6X4BFO.js → chunk-QOAI6ETC.js} +3 -3
- package/dist/cli/chunks/{chunk-53YOYZW5.js → chunk-QORWBION.js} +2 -2
- package/dist/cli/chunks/{chunk-OS62Y77J.js → chunk-QXZOUETY.js} +2 -2
- package/dist/cli/chunks/{chunk-G2ZIJZJ7.js → chunk-QZBPXJ5C.js} +2 -2
- package/dist/cli/chunks/{chunk-WHHQIL4F.js → chunk-R4A6PY5D.js} +2 -2
- package/dist/cli/chunks/{chunk-ZLBY25MB.js → chunk-R7XEACKR.js} +1 -1
- package/dist/cli/chunks/{chunk-K4C25BWV.js → chunk-RAS7WRN5.js} +2 -2
- package/dist/cli/chunks/{chunk-MHMQ6MCT.js → chunk-REJGZP27.js} +2 -2
- package/dist/cli/chunks/{chunk-PW72M2FE.js → chunk-RIASOMB2.js} +2 -2
- package/dist/cli/chunks/{chunk-TEIWJ3GJ.js → chunk-RJ7TU2MP.js} +1 -1
- package/dist/cli/chunks/{chunk-W72FJA2H.js → chunk-S42RFOZJ.js} +2 -2
- package/dist/cli/chunks/chunk-SFQFBLWQ.js +2 -0
- package/dist/cli/chunks/{chunk-O7J54OHN.js → chunk-SHKOPOPD.js} +1 -1
- package/dist/cli/chunks/{chunk-QKK7VBVB.js → chunk-TGIKKD43.js} +2 -2
- package/dist/cli/chunks/chunk-TMPRR3FZ.js +2 -0
- package/dist/cli/chunks/{chunk-GW6XWMX2.js → chunk-U55X2ZUM.js} +2 -2
- package/dist/cli/chunks/{chunk-C4EZNOWK.js → chunk-U5ITD7ZD.js} +1 -1
- package/dist/cli/chunks/{chunk-RKXZLTWR.js → chunk-UBPJQKYS.js} +2 -2
- package/dist/cli/chunks/{chunk-DVW66FPU.js → chunk-UBWSYDO5.js} +1 -1
- package/dist/cli/chunks/chunk-UEC53US3.js +316 -0
- package/dist/cli/chunks/{chunk-UBY322ED.js → chunk-UGPBL7LX.js} +2 -2
- package/dist/cli/chunks/{chunk-MMEXHZUC.js → chunk-UKF4V7LE.js} +5 -5
- package/dist/cli/chunks/{chunk-FIPKIIMS.js → chunk-UR655D4K.js} +2 -2
- package/dist/cli/chunks/{chunk-GODAWJMZ.js → chunk-USTUWUCE.js} +2 -2
- package/dist/cli/chunks/{chunk-FGSIID5C.js → chunk-UZXDYT6O.js} +2 -2
- package/dist/cli/chunks/{chunk-JATLFS6A.js → chunk-VFRWLSQO.js} +1 -1
- package/dist/cli/chunks/{chunk-AF6P5RWY.js → chunk-VHJCQBD2.js} +2 -2
- package/dist/cli/chunks/{chunk-J5XDKVI7.js → chunk-VTFYY4SH.js} +2 -2
- package/dist/cli/chunks/{chunk-BTLUWH4R.js → chunk-W52R3G22.js} +2 -2
- package/dist/cli/chunks/{chunk-AOQYORVA.js → chunk-WBDV4V3H.js} +2 -2
- package/dist/cli/chunks/{chunk-3I4TCMOJ.js → chunk-WPEGG6DX.js} +1 -1
- package/dist/cli/chunks/{chunk-KQVIWE3W.js → chunk-WPG5LXR7.js} +2 -2
- package/dist/cli/chunks/{chunk-DLBVADWQ.js → chunk-X2CEX4KC.js} +42 -42
- package/dist/cli/chunks/{chunk-MTBGOWJA.js → chunk-X2K3BTI4.js} +2 -2
- package/dist/cli/chunks/{chunk-NCSXLMDL.js → chunk-XDRAU3W6.js} +2 -2
- package/dist/cli/chunks/{chunk-URP75DL4.js → chunk-XJTGLG7G.js} +1 -1
- package/dist/cli/chunks/{chunk-TRNBQFFG.js → chunk-XS6BIOPQ.js} +2 -2
- package/dist/cli/chunks/{chunk-MEIU7457.js → chunk-XTAXSKPC.js} +2 -2
- package/dist/cli/chunks/{chunk-VN2HHBZN.js → chunk-XYV6YUWS.js} +2 -2
- package/dist/cli/chunks/{chunk-UORTQXJ2.js → chunk-YGB3MT3R.js} +1 -1
- package/dist/cli/chunks/{chunk-37ZUF5NX.js → chunk-YNXQMJGJ.js} +1 -1
- package/dist/cli/chunks/{chunk-BLPWJQTY.js → chunk-ZCDGLNJ7.js} +2 -2
- package/dist/cli/chunks/{chunk-62UM7Q5N.js → chunk-ZNITDSWL.js} +1 -1
- package/dist/cli/chunks/{ci-CBNVLOOQ.js → ci-IU5HVUL5.js} +2 -2
- package/dist/cli/chunks/{ci-output-I4HY2FYJ.js → ci-output-CLI4A43F.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-5VRBKGWL.js → circuit-breaker-ZR5OFMW7.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-XPJPKHIO.js → claude-flow-setup-UBMA6ZHJ.js} +2 -2
- package/dist/cli/chunks/client-KKCFGD7R.js +2 -0
- package/dist/cli/chunks/{cline-installer-OFRDUUWZ.js → cline-installer-EWYELOBI.js} +2 -2
- package/dist/cli/chunks/{code-QIZQVB3E.js → code-YSPF4MXN.js} +2 -2
- package/dist/cli/chunks/{code-index-extractor-LMUUWEX4.js → code-index-extractor-WW5OKSTN.js} +2 -2
- package/dist/cli/chunks/{codex-installer-N2MKIZ2S.js → codex-installer-GLADK5PY.js} +2 -2
- package/dist/cli/chunks/{completions-Y36S3C5J.js → completions-2KTWZ3AK.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-73YS3WUD.js → complexity-analyzer-KMX4OWKB.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-SAOTP6J3.js → continuedev-installer-4FHU4OEJ.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-A4HXF6HE.js → copilot-installer-AKR4WE7B.js} +2 -2
- package/dist/cli/chunks/core-handlers-KRSSJEO5.js +2 -0
- package/dist/cli/chunks/{cost-tracker-P26XUVZS.js → cost-tracker-BUJ6WEWY.js} +2 -2
- package/dist/cli/chunks/{coverage-HVNHSMVJ.js → coverage-OB6HVQS4.js} +3 -3
- package/dist/cli/chunks/cross-domain-router-27QGWU27.js +2 -0
- package/dist/cli/chunks/{cursor-installer-46BQFTYZ.js → cursor-installer-3AOE4O3Q.js} +2 -2
- package/dist/cli/chunks/{daemon-Y54O3FLT.js → daemon-4RAL5URG.js} +3 -3
- package/dist/cli/chunks/{daemon-YE7K2AZF.js → daemon-JGSPLYGO.js} +4 -4
- package/dist/cli/chunks/{dag-attention-scheduler-ETA7YY52.js → dag-attention-scheduler-DSBTHIMH.js} +2 -2
- package/dist/cli/chunks/{detect-5WLQ2J3E.js → detect-6CVW2VUQ.js} +2 -2
- package/dist/cli/chunks/{dist-node-45WW6I7J.js → dist-node-EWPKBTYA.js} +2 -2
- package/dist/cli/chunks/{domain-handler-J7DQV74M.js → domain-handler-HLVIJU25.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-GD2EGQVR.js → domain-transfer-7Y3BR3YU.js} +2 -2
- package/dist/cli/chunks/dream-M6K47Q4H.js +2 -0
- package/dist/cli/chunks/{embed-and-insert-pattern-JELNEA2D.js → embed-and-insert-pattern-ZMJ3263X.js} +2 -2
- package/dist/cli/chunks/{eval-A4PA5G2U.js → eval-73XW2WJD.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-MLHTYWTA.js → experience-capture-middleware-OGJ3JOSQ.js} +3 -3
- package/dist/cli/chunks/{fast-paths-QYDTITRV.js → fast-paths-5XCY3Y6U.js} +2 -2
- package/dist/cli/chunks/{feature-flags-H4MSY26Z.js → feature-flags-R5V2FRJR.js} +2 -2
- package/dist/cli/chunks/{feature-flags-MQYYRHIK.js → feature-flags-VULQI6KY.js} +2 -2
- package/dist/cli/chunks/{file-discovery-RMFVJNGL.js → file-discovery-HW33C3HC.js} +2 -2
- package/dist/cli/chunks/{fleet-7KZQOTAC.js → fleet-NH3XR5OY.js} +3 -3
- package/dist/cli/chunks/{gnn-wrapper-NMZFTGVH.js → gnn-wrapper-L3XMLPTG.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-7BQDK7MG.js → heartbeat-handler-TIQFBT4D.js} +4 -4
- package/dist/cli/chunks/heartbeat-scheduler-URXBF5RW.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-WWAGM6HK.js +2 -0
- package/dist/cli/chunks/hnsw-index-UFV2HSZE.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-TPPGBPKF.js → hnsw-legacy-bridge-YL2SUIPA.js} +2 -2
- package/dist/cli/chunks/{better-sqlite3-2KR4LQRU.js → hnswlib-node-62RTSHAY.js} +2 -2
- package/dist/cli/chunks/{hooks-CYZIUYSH.js → hooks-UR2ZF54G.js} +10 -10
- package/dist/cli/chunks/hybrid-router-3U6Q6OTL.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-WC6DMTYQ.js → hypergraph-engine-NX45AOPY.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-GTGA3TXJ.js → hypergraph-handler-LUM4YI4K.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-EUEX6ZRO.js +2 -0
- package/dist/cli/chunks/{init-handler-N3Z72JNI.js → init-handler-YTKKNTVV.js} +6 -6
- package/dist/cli/chunks/init-wizard-POKY2LRY.js +2 -0
- package/dist/cli/chunks/kernel-HPAONLZY.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-FUX4V6II.js → kilocode-installer-ZW7DVH7T.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-ZSNZT7ZR.js → kiro-installer-IA7INW4N.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-2WCUFG63.js +2 -0
- package/dist/cli/chunks/{learning-UQY64COU.js → learning-4AZ5PGTT.js} +3 -3
- package/dist/cli/chunks/{llm-router-CMHGGX6N.js → llm-router-WQ4E3AOP.js} +4 -4
- package/dist/cli/chunks/llm-router-service-D5VMG6SD.js +2 -0
- package/dist/cli/chunks/{load-E6WH4QN2.js → load-4FAH7CZO.js} +2 -2
- package/dist/cli/chunks/load-test-DHG26REU.js +2 -0
- package/dist/cli/chunks/{mcp-UM5VTW6N.js → mcp-KLLHI6DG.js} +2 -2
- package/dist/cli/chunks/{memory-7Q3XDUE5.js → memory-Q5HLIUC6.js} +5 -5
- package/dist/cli/chunks/memory-backend-GLWQ4DAL.js +2 -0
- package/dist/cli/chunks/memory-handlers-P72I4VV4.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-LZENWVRR.js → multi-model-executor-ABI73AFV.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-O2JAIPLF.js → opencode-installer-KRPQ6JOJ.js} +2 -2
- package/dist/cli/chunks/{orchestrator-DKZWXDRI.js → orchestrator-SUPEONRG.js} +18 -18
- package/dist/cli/chunks/pattern-null-store-Y2YFTE3V.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-CLUL4M55.js → pattern-usage-recorder-R4GKK6RZ.js} +2 -2
- package/dist/cli/chunks/{pipeline-2VDLTR5J.js → pipeline-LCUETNGD.js} +2 -2
- package/dist/cli/chunks/{platform-4N4Q5XYX.js → platform-WJDIB4X3.js} +2 -2
- package/dist/cli/chunks/{plugin-GY5AU5CS.js → plugin-2X5NY2RF.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-TQ4DKDZS.js → prime-radiant-advanced-wasm-3T665QC6.js} +2 -2
- package/dist/cli/chunks/protocol-executor-HNT67NN5.js +2 -0
- package/dist/cli/chunks/{protocol-handler-T3LZ3WRG.js → protocol-handler-JTXRF7GU.js} +2 -2
- package/dist/cli/chunks/{prove-OV7S5J4W.js → prove-BFPWWPOC.js} +2 -2
- package/dist/cli/chunks/provider-manager-5YGPZIEZ.js +2 -0
- package/dist/cli/chunks/qe-reasoning-bank-Z5UGOA3F.js +2 -0
- package/dist/cli/chunks/{quality-AXD4NLQA.js → quality-F7UZU4RN.js} +2 -2
- package/dist/cli/chunks/quality-gate-R5L4UZIX.js +7 -0
- package/dist/cli/chunks/queen-coordinator-P5LU5NWI.js +2 -0
- package/dist/cli/chunks/{real-embeddings-2PUCC7FG.js → real-embeddings-LZD6HTQF.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-WJ5ARGLW.js → roocode-installer-6TTG7VSH.js} +2 -2
- package/dist/cli/chunks/router-CRGHUAVR.js +2 -0
- package/dist/cli/chunks/routing-feedback-BVX5ZBCF.js +2 -0
- package/dist/cli/chunks/{routing-handler-CU6657SZ.js → routing-handler-SW442GK7.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-IIF6VSFW.js → ruvector-commands-CLFGKXMW.js} +2 -2
- package/dist/cli/chunks/{rvf-dual-writer-YMQI7XO2.js → rvf-dual-writer-EVPPXXXS.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-adapter-HDE3PR2W.js → rvf-migration-adapter-NOHDIRIP.js} +2 -2
- package/dist/cli/chunks/{rvf-migration-coordinator-MQV5OA7K.js → rvf-migration-coordinator-BYJ3M7WZ.js} +2 -2
- package/dist/cli/chunks/rvf-native-adapter-FZJSQOJM.js +2 -0
- package/dist/cli/chunks/safe-db-USYNEOC6.js +2 -0
- package/dist/cli/chunks/schedule-KCRCQ3PS.js +2 -0
- package/dist/cli/chunks/scheduler-CX3UHI4U.js +2 -0
- package/dist/cli/chunks/{security-UM3IGDSM.js → security-IXDKBPSG.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-I3SOJ6M4.js → shared-rvf-adapter-VCOK3OVD.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-KQGC2UO7.js → shared-rvf-dual-writer-FFKBKYNL.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-K23C4TFH.js +2 -0
- package/dist/cli/chunks/{status-handler-OX4CJZME.js → status-handler-M5W64S5U.js} +2 -2
- package/dist/cli/chunks/{structural-health-PYUMVBXJ.js → structural-health-55X6BTLT.js} +2 -2
- package/dist/cli/chunks/{sync-VALFNTA6.js → sync-BUGDXW3Y.js} +2 -2
- package/dist/cli/chunks/{sync-2TED3YTY.js → sync-NUG67HGK.js} +2 -2
- package/dist/cli/chunks/{task-handler-VPGAJVPC.js → task-handler-T6ZKXV4S.js} +2 -2
- package/dist/cli/chunks/{task-handlers-IB4UAMU6.js → task-handlers-H63TB2UI.js} +3 -3
- package/dist/cli/chunks/{test-OMRJOZB6.js → test-VEK76SBT.js} +4 -4
- package/dist/cli/chunks/{test-scheduling-ZL3YFPBU.js → test-scheduling-QZM6PNZH.js} +3 -3
- package/dist/cli/chunks/{token-bootstrap-DNWZI7SH.js → token-bootstrap-W5IAMJW4.js} +2 -2
- package/dist/cli/chunks/{token-usage-IYO7RGFF.js → token-usage-OBY6UEUR.js} +2 -2
- package/dist/cli/chunks/{transformers-53ALC34T.js → transformers-EFNY2MRX.js} +2 -2
- package/dist/cli/chunks/{tree-sitter-wasm-parser-WUKJ2I2Q.js → tree-sitter-wasm-parser-EU2S5NVM.js} +2 -2
- package/dist/cli/chunks/{types-47FTEPMV.js → types-3DYRKX23.js} +2 -2
- package/dist/cli/chunks/unified-memory-NCDBQLLF.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-T7NSGQ2H.js +2 -0
- package/dist/cli/chunks/unified-persistence-XUAYDCMM.js +2 -0
- package/dist/cli/chunks/{upgrade-QPLMJA5Z.js → upgrade-H5V53FRF.js} +2 -2
- package/dist/cli/chunks/{validate-3GVKZOVF.js → validate-IL22VB5I.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-XCRTLVM6.js → validate-swarm-WZKECK3W.js} +2 -2
- package/dist/cli/chunks/{vibium-CH4VPKVZ.js → vibium-KKM23OTQ.js} +2 -2
- package/dist/cli/chunks/visual-security-3TUC4GPP.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-JDBNAZTV.js → web-tree-sitter-NJM5YBOY.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-3MNPVJBP.js → windsurf-installer-SLP43TVT.js} +2 -2
- package/dist/cli/chunks/witness-chain-QLOKUZXC.js +2 -0
- package/dist/cli/chunks/{witness-chain-HR5UBV5J.js → witness-chain-XBEPT4XD.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-G5SQTIBZ.js → witness-key-manager-DAAMNYOW.js} +2 -2
- package/dist/cli/chunks/{workflow-43EMD5FY.js → workflow-SZOOU6D3.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-6JAYTZ7L.js +2 -0
- package/dist/cli/chunks/{wrappers-3N7AYNM3.js → wrappers-I2CBKWGF.js} +2 -2
- package/dist/cli/commands/quality-gate.d.ts +24 -0
- package/dist/cli/commands/quality-gate.js +135 -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/init/init-wizard-hooks.js +11 -25
- package/dist/init/phases/07-hooks.js +15 -25
- package/dist/init/settings-merge.d.ts +44 -0
- package/dist/init/settings-merge.js +119 -4
- package/dist/integrations/ruvector/feature-flags.js +7 -0
- package/dist/learning/pattern-lifecycle.d.ts +16 -0
- package/dist/learning/pattern-lifecycle.js +77 -1
- 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/mcp/bundle.js +396 -390
- 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 +3 -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/package.json +1 -1
- package/dist/cli/chunks/adapter-KNM5R47J.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-MXPJLVR3.js +0 -2
- package/dist/cli/chunks/base-X4EXQ2AS.js +0 -2
- package/dist/cli/chunks/browser-workflow-4HX6RP5F.js +0 -2
- package/dist/cli/chunks/chunk-FHTYEAQ3.js +0 -2
- package/dist/cli/chunks/chunk-MIU5RUBJ.js +0 -149
- package/dist/cli/chunks/chunk-SK754ZSH.js +0 -316
- package/dist/cli/chunks/chunk-V6NAB5UZ.js +0 -2
- package/dist/cli/chunks/chunk-YR2JKBZO.js +0 -2
- package/dist/cli/chunks/chunk-ZMPAM4DY.js +0 -2
- package/dist/cli/chunks/client-AHXNCOHK.js +0 -2
- package/dist/cli/chunks/core-handlers-EEFLLMAZ.js +0 -2
- package/dist/cli/chunks/cross-domain-router-LT3H4SNJ.js +0 -2
- package/dist/cli/chunks/dream-4K3BK4IG.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-IMPPGQUK.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-EIAA6R2L.js +0 -2
- package/dist/cli/chunks/hnsw-index-ZXXP6AXZ.js +0 -2
- package/dist/cli/chunks/hybrid-router-LXWG4MLH.js +0 -2
- package/dist/cli/chunks/impact-analyzer-TP5LRFYH.js +0 -2
- package/dist/cli/chunks/init-wizard-AIOA5KOY.js +0 -2
- package/dist/cli/chunks/kernel-SQALRU6Q.js +0 -2
- package/dist/cli/chunks/knowledge-graph-JFVT6SNN.js +0 -2
- package/dist/cli/chunks/llm-router-service-XHFKTH3I.js +0 -2
- package/dist/cli/chunks/load-test-JEIFJKNN.js +0 -2
- package/dist/cli/chunks/memory-backend-NT7I37CP.js +0 -2
- package/dist/cli/chunks/memory-handlers-746D7NE7.js +0 -2
- package/dist/cli/chunks/pattern-null-store-6QU6WHDW.js +0 -2
- package/dist/cli/chunks/protocol-executor-GT2MZYUU.js +0 -2
- package/dist/cli/chunks/provider-manager-OATJ7R3D.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-IJXNQ67O.js +0 -2
- package/dist/cli/chunks/queen-coordinator-6RBHWCUG.js +0 -2
- package/dist/cli/chunks/router-XKQRT5JK.js +0 -2
- package/dist/cli/chunks/routing-feedback-ACPSD4LW.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-SIWRKE33.js +0 -2
- package/dist/cli/chunks/safe-db-LCPUYMX4.js +0 -2
- package/dist/cli/chunks/schedule-HIQJCWXG.js +0 -2
- package/dist/cli/chunks/scheduler-QE5EJ5LE.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-EU54UTMH.js +0 -2
- package/dist/cli/chunks/unified-memory-CJLMC2I4.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-FDGR4D2J.js +0 -2
- package/dist/cli/chunks/unified-persistence-UFH5GLDN.js +0 -2
- package/dist/cli/chunks/visual-security-4ARJ7J2Y.js +0 -2
- package/dist/cli/chunks/witness-chain-73QC33ED.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-RKMMPXNA.js +0 -2
|
@@ -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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentic-qe",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.1",
|
|
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.5");process.exit(0)}
|
|
2
|
-
import{a,b,c}from"./chunk-7P6X4BFO.js";import"./chunk-3WR35GFF.js";import"./chunk-TEIWJ3GJ.js";import"./chunk-CKOF27L7.js";import"./chunk-RKXZLTWR.js";import"./chunk-C4EZNOWK.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.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-Y6DWJKHU.js";import"./chunk-J6PFPY7V.js";import"./chunk-EEKG35K5.js";import"./chunk-UORTQXJ2.js";import"./chunk-4XJ2A3HY.js";import"./chunk-PW72M2FE.js";import"./chunk-UBI2EOS3.js";import"./chunk-MCHEUSY4.js";import"./chunk-YGVDP6X7.js";import"./chunk-JBKZ5TUM.js";import"./chunk-W7TYKPLY.js";import"./chunk-IBDQWKI3.js";import"./chunk-53YOYZW5.js";import"./chunk-TRNBQFFG.js";import"./chunk-LPR2R3AN.js";import"./chunk-NCSXLMDL.js";import"./chunk-IU5RSN6M.js";import"./chunk-ZMPAM4DY.js";import"./chunk-Y25PO65W.js";import"./chunk-YFCULQBP.js";import"./chunk-CKOF27L7.js";import"./chunk-4QOI5JS7.js";import"./chunk-RJN2RM76.js";import"./chunk-OS62Y77J.js";import"./chunk-TTJJ4DQE.js";import"./chunk-5WMU7XCF.js";import"./chunk-RKXZLTWR.js";import"./chunk-K4I7UIU5.js";import"./chunk-FHTYEAQ3.js";import"./chunk-WHHQIL4F.js";import"./chunk-3JF5A72M.js";import"./chunk-CDJP6COA.js";import"./chunk-FIPKIIMS.js";import"./chunk-2XQHG56O.js";import"./chunk-2XPMATEK.js";import"./chunk-JDSHUECG.js";import"./chunk-GODAWJMZ.js";import"./chunk-C4EZNOWK.js";export{b as AQELearningEngine,a as DEFAULT_ENGINE_CONFIG,c as DEFAULT_META_LEARNING_CONFIG,d as MetaLearningEngine,e as createAQELearningEngine,f as createDefaultLearningEngine};
|
|
@@ -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.5");process.exit(0)}
|
|
2
|
-
import{a,b,c,d,e,f,g,h,i,j,k,l}from"./chunk-6T65OKUM.js";import"./chunk-I3NWKPXJ.js";import"./chunk-NCSXLMDL.js";import"./chunk-IU5RSN6M.js";import"./chunk-ZMPAM4DY.js";import"./chunk-Y25PO65W.js";import"./chunk-YFCULQBP.js";import"./chunk-CKOF27L7.js";import"./chunk-TTJJ4DQE.js";import"./chunk-RKXZLTWR.js";import"./chunk-K4I7UIU5.js";import"./chunk-SUL3I6QZ.js";import"./chunk-FHTYEAQ3.js";import"./chunk-WHHQIL4F.js";import"./chunk-3JF5A72M.js";import"./chunk-CDJP6COA.js";import"./chunk-FIPKIIMS.js";import"./chunk-2XQHG56O.js";import"./chunk-2XPMATEK.js";import"./chunk-JDSHUECG.js";import"./chunk-GODAWJMZ.js";import"./chunk-C4EZNOWK.js";export{l as MCPToolBase,k as defaultToolLogger,j as getKernel,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};
|
|
@@ -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.5");process.exit(0)}
|
|
2
|
-
import{a}from"./chunk-KVVJVMDM.js";import"./chunk-6T65OKUM.js";import"./chunk-I3NWKPXJ.js";import"./chunk-NCSXLMDL.js";import"./chunk-IU5RSN6M.js";import"./chunk-ZMPAM4DY.js";import"./chunk-Y25PO65W.js";import"./chunk-YFCULQBP.js";import"./chunk-CKOF27L7.js";import"./chunk-TTJJ4DQE.js";import"./chunk-RKXZLTWR.js";import"./chunk-K4I7UIU5.js";import"./chunk-SUL3I6QZ.js";import"./chunk-FHTYEAQ3.js";import"./chunk-WHHQIL4F.js";import"./chunk-3JF5A72M.js";import"./chunk-CDJP6COA.js";import"./chunk-FIPKIIMS.js";import"./chunk-2XQHG56O.js";import"./chunk-2XPMATEK.js";import"./chunk-JDSHUECG.js";import"./chunk-GODAWJMZ.js";import"./chunk-C4EZNOWK.js";export{a as BrowserWorkflowTool};
|
|
@@ -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.5");process.exit(0)}
|
|
2
|
-
import{a as t,q as r}from"./chunk-WHHQIL4F.js";import{c as l}from"./chunk-C4EZNOWK.js";function m(s,e){let o=e?.readonly??!1,n=e?.fileMustExist??!1,i=e?.busyTimeout??5e3,b=e?.walMode??!o,a=new t(s,{readonly:o,fileMustExist:n});return a.pragma(`busy_timeout = ${i}`),b&&a.pragma("journal_mode = WAL"),a}var u=l(()=>{r()});export{m as a,u as b};
|
|
@@ -1,149 +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.5");process.exit(0)}
|
|
2
|
-
import{a as _}from"./chunk-AGJOGUP5.js";import{e as E}from"./chunk-MCHEUSY4.js";import{a as b}from"./chunk-ZMPAM4DY.js";import{c as h}from"./chunk-Y25PO65W.js";import{b as p,d as S}from"./chunk-CKOF27L7.js";import{S as A,j as g}from"./chunk-GODAWJMZ.js";S();b();A();var d=h.create("pattern-lifecycle"),D={promotionRewardThreshold:.7,promotionMinOccurrences:E,promotionMinSuccessRate:.7,deprecationFailureThreshold:3,staleDaysThreshold:30,confidenceDecayRate:.01,minActiveConfidence:.3,maxAgeForActivePatterns:90,promotionActivityWindowDays:30,asymmetricLearning:{}},y=5,L=.9,R=2;function v(u,e){return e<y||!Number.isFinite(u)?0:Math.min(Math.max(u,0),1)}var f=class{constructor(e,t={}){this.db=e;this.config={...D,...t},this.asymmetricEngine=new _(this.config.asymmetricLearning),this.ensureSchema()}db;config;asymmetricEngine;_witnessChain=null;set witnessChain(e){this._witnessChain=e}_compressionService=null;set compressionService(e){this._compressionService=e}ensureSchema(){try{this.db.prepare(`
|
|
3
|
-
SELECT deprecated_at FROM qe_patterns LIMIT 1
|
|
4
|
-
`).get()}catch(e){d.debug("Adding missing deprecated_at column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
5
|
-
ALTER TABLE qe_patterns ADD COLUMN deprecated_at TEXT DEFAULT NULL
|
|
6
|
-
`),console.log("[PatternLifecycle] Added deprecated_at column to qe_patterns")}try{this.db.prepare(`
|
|
7
|
-
SELECT consecutive_failures FROM qe_patterns LIMIT 1
|
|
8
|
-
`).get()}catch(e){d.debug("Adding missing consecutive_failures column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
9
|
-
ALTER TABLE qe_patterns ADD COLUMN consecutive_failures INTEGER DEFAULT 0
|
|
10
|
-
`),console.log("[PatternLifecycle] Added consecutive_failures column to qe_patterns")}try{this.db.prepare(`
|
|
11
|
-
SELECT promotion_date FROM qe_patterns LIMIT 1
|
|
12
|
-
`).get()}catch(e){d.debug("Adding missing promotion_date column",{error:e instanceof Error?e.message:String(e)}),this.db.exec(`
|
|
13
|
-
ALTER TABLE qe_patterns ADD COLUMN promotion_date TEXT DEFAULT NULL
|
|
14
|
-
`),console.log("[PatternLifecycle] Added promotion_date column to qe_patterns")}}getRecentExperiences(e={}){let t=e.minReward??this.config.promotionRewardThreshold,n=e.limit??100,r=e.sinceDays??7;if(!this.db.prepare("SELECT name FROM sqlite_master WHERE type='table' AND name='captured_experiences'").get())return d.debug("captured_experiences table not found"),[];let a=new Date(Date.now()-r*864e5).toISOString().replace("T"," ").slice(0,19);return this.db.prepare(`
|
|
15
|
-
SELECT
|
|
16
|
-
domain as task_type,
|
|
17
|
-
COUNT(*) as count,
|
|
18
|
-
AVG(quality) as avg_reward,
|
|
19
|
-
MAX(quality) as max_reward,
|
|
20
|
-
MIN(quality) as min_reward,
|
|
21
|
-
SUM(CASE WHEN quality >= ? THEN 1 ELSE 0 END) as success_count,
|
|
22
|
-
GROUP_CONCAT(DISTINCT agent) as actions,
|
|
23
|
-
MAX(started_at) as latest_at
|
|
24
|
-
FROM captured_experiences
|
|
25
|
-
WHERE started_at >= ?
|
|
26
|
-
AND quality >= ?
|
|
27
|
-
AND agent != 'cli-hook'
|
|
28
|
-
GROUP BY domain
|
|
29
|
-
HAVING COUNT(*) >= ?
|
|
30
|
-
ORDER BY avg_reward DESC
|
|
31
|
-
LIMIT ?
|
|
32
|
-
`).all(t,a,t*.5,this.config.promotionMinOccurrences,n).map(i=>({taskType:i.task_type,domain:this.taskTypeToQEDomain(i.task_type),count:i.count,avgReward:i.avg_reward,maxReward:i.max_reward,minReward:i.min_reward,actions:i.actions?i.actions.split(",").filter(Boolean):[],successCount:i.success_count,latestAt:new Date(i.latest_at)}))}taskTypeToQEDomain(e){let t={generate:"test-generation","test-generation":"test-generation",test:"test-generation",analyze:"coverage-analysis",coverage:"coverage-analysis","coverage-analysis":"coverage-analysis",run:"test-execution",execute:"test-execution","test-execution":"test-execution",report:"quality-assessment",quality:"quality-assessment",assessment:"quality-assessment",security:"security-compliance",sast:"security-compliance",audit:"security-compliance",defect:"defect-intelligence",predict:"defect-intelligence",bug:"defect-intelligence",requirements:"requirements-validation",validation:"requirements-validation",code:"code-intelligence",complexity:"code-intelligence",contract:"contract-testing",api:"contract-testing",visual:"visual-accessibility",a11y:"visual-accessibility",accessibility:"visual-accessibility",chaos:"chaos-resilience",resilience:"chaos-resilience",flaky:"chaos-resilience",learning:"learning-optimization",optimize:"learning-optimization"},n=e.toLowerCase();for(let[r,s]of Object.entries(t))if(n.includes(r))return s;return null}taskTypeToPatternType(e){let t={generate:"test-template",test:"test-template",coverage:"coverage-strategy",analyze:"coverage-strategy",mock:"mock-pattern",stub:"mock-pattern",assert:"assertion-pattern",expect:"assertion-pattern",security:"assertion-pattern",contract:"api-contract",api:"api-contract",visual:"visual-baseline",screenshot:"visual-baseline",a11y:"a11y-check",accessibility:"a11y-check",perf:"perf-benchmark",load:"perf-benchmark",stress:"perf-benchmark",flaky:"flaky-fix",retry:"flaky-fix",refactor:"refactor-safe",error:"error-handling",exception:"error-handling"},n=e.toLowerCase();for(let[r,s]of Object.entries(t))if(n.includes(r))return s;return"test-template"}findPatternCandidates(e){let t=[];for(let n of e){let r=n.avgReward>=this.config.promotionRewardThreshold,s=n.count>=this.config.promotionMinOccurrences,a=n.successCount/n.count,c=a>=this.config.promotionMinSuccessRate;if(r&&s&&c){let i=n.domain||"code-intelligence",o=this.taskTypeToPatternType(n.taskType);if(this.findExistingPattern(n.taskType,i))continue;t.push({name:`${n.taskType}-success-pattern`,domain:i,patternType:o,confidence:Math.min(.95,n.avgReward*.9),sourceExperiences:n.count,avgReward:n.avgReward,successRate:a,actions:n.actions.slice(0,5),templateContent:this.generateTemplateContent(n)})}}return t}findExistingPattern(e,t){let n=this.db.prepare(`
|
|
33
|
-
SELECT * FROM qe_patterns
|
|
34
|
-
WHERE name LIKE ? AND qe_domain = ? AND deprecated_at IS NULL
|
|
35
|
-
LIMIT 1
|
|
36
|
-
`).get(`%${e}%`,t);return n?this.rowToPattern(n):null}generateTemplateContent(e){let t=e.actions.map((n,r)=>`${r+1}. ${n}`).join(`
|
|
37
|
-
`);return`Task Type: ${e.taskType}
|
|
38
|
-
Domain: ${e.domain||"general"}
|
|
39
|
-
Average Reward: ${e.avgReward.toFixed(3)}
|
|
40
|
-
Success Rate: ${(e.successCount/e.count*100).toFixed(1)}%
|
|
41
|
-
|
|
42
|
-
Typical Actions:
|
|
43
|
-
${t||"N/A"}
|
|
44
|
-
|
|
45
|
-
Pattern extracted from ${e.count} successful experiences.`}checkPromotion(e){let t=this.getPattern(e);if(!t)return{shouldPromote:!1,meetsRewardThreshold:!1,meetsOccurrenceThreshold:!1,meetsSuccessRateThreshold:!1,meetsActivityWindow:!1,currentReward:0,currentOccurrences:0,currentSuccessRate:0};let n=t.qualityScore,r=n>=this.config.promotionRewardThreshold,s=t.usageCount>=this.config.promotionMinOccurrences,a=t.successRate>=this.config.promotionMinSuccessRate,c=this.config.promotionActivityWindowDays*24*60*60*1e3,i=t.lastUsedAt?.getTime()??t.createdAt.getTime(),o=Date.now()-i<c;return{shouldPromote:t.tier==="short-term"&&r&&s&&a&&o,meetsRewardThreshold:r,meetsOccurrenceThreshold:s,meetsSuccessRateThreshold:a,meetsActivityWindow:o,currentReward:n,currentOccurrences:t.usageCount,currentSuccessRate:t.successRate}}promotePattern(e){return this.checkPromotion(e).shouldPromote?(this.db.prepare(`
|
|
46
|
-
UPDATE qe_patterns
|
|
47
|
-
SET tier = 'long-term',
|
|
48
|
-
promotion_date = datetime('now'),
|
|
49
|
-
confidence = MIN(1.0, confidence + 0.1),
|
|
50
|
-
updated_at = datetime('now')
|
|
51
|
-
WHERE id = ?
|
|
52
|
-
`).run(e),console.log(`[PatternLifecycle] Promoted pattern ${e} to long-term`),!0):!1}promoteEligiblePatterns(){let e=this.db.prepare(`
|
|
53
|
-
SELECT id FROM qe_patterns
|
|
54
|
-
WHERE tier = 'short-term' AND deprecated_at IS NULL
|
|
55
|
-
`).all(),t=0;for(let{id:n}of e)this.promotePattern(n)&&t++;return{promoted:t,checked:e.length}}runPromotionSweep(){return this.promoteEligiblePatterns()}checkDeprecation(e){let t=this.getPattern(e);if(!t)return{shouldDeprecate:!1,reason:null};if(t.deprecated_at)return{shouldDeprecate:!1,reason:null};let n=t.consecutive_failures||0;if(n>=this.config.deprecationFailureThreshold)return{shouldDeprecate:!0,reason:"failures",consecutiveFailures:n};let r=t.lastUsedAt instanceof Date?t.lastUsedAt.getTime():new Date(t.lastUsedAt).getTime(),s=(Date.now()-r)/(1e3*60*60*24),a=v(t.successRate,t.usageCount),c=this.config.staleDaysThreshold*(1+a*R);if(s>=c)return{shouldDeprecate:!0,reason:"stale",daysSinceLastUse:s};if(t.confidence<this.config.minActiveConfidence)return{shouldDeprecate:!0,reason:"low_confidence",currentConfidence:t.confidence};let i=t.createdAt instanceof Date?t.createdAt.getTime():new Date(t.createdAt).getTime(),o=(Date.now()-i)/(1e3*60*60*24);return o>=this.config.maxAgeForActivePatterns&&t.usageCount<5?{shouldDeprecate:!0,reason:"age",ageInDays:o}:{shouldDeprecate:!1,reason:null}}deprecatePattern(e,t){let n=this.checkDeprecation(e);if(!n.shouldDeprecate&&!t)return!1;let r=t||n.reason||"manual";this.db.prepare(`
|
|
56
|
-
UPDATE qe_patterns
|
|
57
|
-
SET deprecated_at = datetime('now'),
|
|
58
|
-
updated_at = datetime('now')
|
|
59
|
-
WHERE id = ?
|
|
60
|
-
`).run(e);let s=this.getPattern(e);if(s){let a={deprecation_reason:r,deprecated_at:new Date().toISOString(),final_confidence:s.confidence,final_success_rate:s.successRate,total_usage:s.usageCount};this.db.prepare(`
|
|
61
|
-
UPDATE qe_patterns
|
|
62
|
-
SET context_json = json_patch(COALESCE(context_json, '{}'), ?)
|
|
63
|
-
WHERE id = ?
|
|
64
|
-
`).run(JSON.stringify({deprecation_metadata:a}),e)}return console.log(`[PatternLifecycle] Deprecated pattern ${e}: ${r}`),!0}deprecateStalePatterns(){let e=this.db.prepare(`
|
|
65
|
-
SELECT id FROM qe_patterns
|
|
66
|
-
WHERE deprecated_at IS NULL
|
|
67
|
-
`).all(),t=0;for(let{id:n}of e){let r=this.checkDeprecation(n);r.shouldDeprecate&&(this.deprecatePattern(n,r.reason||void 0),t++)}return{deprecated:t,checked:e.length}}applyConfidenceDecay(e=1){let t=this.config.confidenceDecayRate*e,n=Date.now()-e*24*60*60*1e3,r=this.db.prepare(`
|
|
68
|
-
UPDATE qe_patterns
|
|
69
|
-
SET confidence = MAX(?, confidence * (1 - ? * (1 - ? *
|
|
70
|
-
(CASE WHEN usage_count >= ?
|
|
71
|
-
THEN MIN(MAX(COALESCE(success_rate, 0.0), 0.0), 1.0)
|
|
72
|
-
ELSE 0.0 END)))),
|
|
73
|
-
updated_at = datetime('now')
|
|
74
|
-
WHERE deprecated_at IS NULL
|
|
75
|
-
AND (last_used_at IS NULL OR datetime(last_used_at) < datetime(?, 'unixepoch'))
|
|
76
|
-
`).run(this.config.minActiveConfidence,t,L,y,n/1e3);return{updated:r.changes,decayed:r.changes}}recordUsage(e,t){t?this.db.prepare(`
|
|
77
|
-
UPDATE qe_patterns
|
|
78
|
-
SET usage_count = usage_count + 1,
|
|
79
|
-
successful_uses = successful_uses + 1,
|
|
80
|
-
consecutive_failures = 0,
|
|
81
|
-
confidence = MIN(1.0, confidence + 0.02),
|
|
82
|
-
success_rate = CAST(successful_uses + 1 AS REAL) / CAST(usage_count + 1 AS REAL),
|
|
83
|
-
last_used_at = datetime('now'),
|
|
84
|
-
updated_at = datetime('now')
|
|
85
|
-
WHERE id = ?
|
|
86
|
-
`).run(e):this.db.prepare(`
|
|
87
|
-
UPDATE qe_patterns
|
|
88
|
-
SET usage_count = usage_count + 1,
|
|
89
|
-
consecutive_failures = consecutive_failures + 1,
|
|
90
|
-
confidence = MAX(0.1, confidence - 0.05),
|
|
91
|
-
success_rate = CAST(successful_uses AS REAL) / CAST(usage_count + 1 AS REAL),
|
|
92
|
-
last_used_at = datetime('now'),
|
|
93
|
-
updated_at = datetime('now')
|
|
94
|
-
WHERE id = ?
|
|
95
|
-
`).run(e),this.db.prepare(`
|
|
96
|
-
UPDATE qe_patterns
|
|
97
|
-
SET quality_score = confidence * 0.3 + (MIN(usage_count, 100) / 100.0) * 0.2 + success_rate * 0.5
|
|
98
|
-
WHERE id = ?
|
|
99
|
-
`).run(e)}recordAsymmetricOutcome(e,t,n){let r=this.getPattern(e);if(!r)return;let s=r.confidence,a=this.asymmetricEngine.computeConfidenceUpdate(s,t?"success":"failure",n);this.db.prepare(`
|
|
100
|
-
UPDATE qe_patterns
|
|
101
|
-
SET confidence = ?,
|
|
102
|
-
usage_count = usage_count + 1,
|
|
103
|
-
successful_uses = CASE WHEN ? THEN successful_uses + 1 ELSE successful_uses END,
|
|
104
|
-
consecutive_failures = CASE WHEN ? THEN 0 ELSE consecutive_failures + 1 END,
|
|
105
|
-
success_rate = CAST(CASE WHEN ? THEN successful_uses + 1 ELSE successful_uses END AS REAL) / CAST(usage_count + 1 AS REAL),
|
|
106
|
-
last_used_at = datetime('now'),
|
|
107
|
-
updated_at = datetime('now')
|
|
108
|
-
WHERE id = ?
|
|
109
|
-
`).run(a,t?1:0,t?1:0,t?1:0,e),this.asymmetricEngine.shouldQuarantine(a,n).shouldQuarantine&&this.quarantinePattern(e)}quarantinePattern(e){if(this.db.prepare(`
|
|
110
|
-
UPDATE qe_patterns
|
|
111
|
-
SET deprecated_at = datetime('now'),
|
|
112
|
-
updated_at = datetime('now')
|
|
113
|
-
WHERE id = ? AND deprecated_at IS NULL
|
|
114
|
-
`).run(e).changes>0){console.log(`[PatternLifecycle] Quarantined pattern ${e} (asymmetric confidence drop)`);try{this._witnessChain?.append("PATTERN_QUARANTINE",{patternId:e},"pattern-lifecycle")}catch{}return!0}return!1}checkRehabilitation(e,t){return this.asymmetricEngine.checkRehabilitation(t).canRehabilitate}rehabilitatePattern(e){return this.db.prepare(`
|
|
115
|
-
UPDATE qe_patterns
|
|
116
|
-
SET deprecated_at = NULL,
|
|
117
|
-
consecutive_failures = 0,
|
|
118
|
-
confidence = 0.5,
|
|
119
|
-
updated_at = datetime('now')
|
|
120
|
-
WHERE id = ?
|
|
121
|
-
`).run(e).changes>0?(console.log(`[PatternLifecycle] Rehabilitated pattern ${e} (10+ consecutive successes)`),!0):!1}getAsymmetricEngine(){return this.asymmetricEngine}compressPatternEmbedding(e){if(!g()||!this._compressionService)return null;let t=this.getPattern(e);if(!t||!t.embedding||t.embedding.length===0)return null;let n=t.lastUsedAt??t.createdAt,r=this._compressionService.classifyTier(n),s=new Float32Array(t.embedding),a=this._compressionService.compress(s,r);return d.debug("Compressed pattern embedding",{patternId:e,tier:r,ratio:(a.originalByteSize/a.compressedByteSize).toFixed(1)}),a}decompressPatternEmbedding(e){return this._compressionService?this._compressionService.decompress(e):null}compressAllPatternEmbeddings(){if(!g()||!this._compressionService)return 0;let e=this.db.prepare(`
|
|
122
|
-
SELECT id FROM qe_patterns
|
|
123
|
-
WHERE deprecated_at IS NULL
|
|
124
|
-
`).all(),t=0;for(let{id:n}of e)this.compressPatternEmbedding(n)&&t++;return d.info("Bulk pattern embedding compression complete",{total:e.length,compressed:t}),t}getStats(){let e=this.db.prepare(`
|
|
125
|
-
SELECT
|
|
126
|
-
COUNT(*) as total,
|
|
127
|
-
SUM(CASE WHEN deprecated_at IS NULL THEN 1 ELSE 0 END) as active,
|
|
128
|
-
SUM(CASE WHEN deprecated_at IS NOT NULL THEN 1 ELSE 0 END) as deprecated,
|
|
129
|
-
SUM(CASE WHEN tier = 'long-term' AND deprecated_at IS NULL THEN 1 ELSE 0 END) as promoted,
|
|
130
|
-
SUM(CASE WHEN tier = 'short-term' AND deprecated_at IS NULL THEN 1 ELSE 0 END) as short_term,
|
|
131
|
-
SUM(CASE WHEN tier = 'long-term' THEN 1 ELSE 0 END) as long_term,
|
|
132
|
-
AVG(CASE WHEN deprecated_at IS NULL THEN confidence ELSE NULL END) as avg_confidence,
|
|
133
|
-
AVG(CASE WHEN deprecated_at IS NULL THEN success_rate ELSE NULL END) as avg_success_rate
|
|
134
|
-
FROM qe_patterns
|
|
135
|
-
`).get(),t=this.db.prepare(`
|
|
136
|
-
SELECT COUNT(*) as count
|
|
137
|
-
FROM qe_patterns
|
|
138
|
-
WHERE deprecated_at IS NULL
|
|
139
|
-
AND (
|
|
140
|
-
consecutive_failures >= ?
|
|
141
|
-
OR confidence < ?
|
|
142
|
-
OR (julianday('now') - julianday(COALESCE(last_used_at, created_at))) >= ?
|
|
143
|
-
)
|
|
144
|
-
`).get(this.config.deprecationFailureThreshold-1,this.config.minActiveConfidence+.1,this.config.staleDaysThreshold-7);return{totalPatterns:e.total||0,activePatterns:e.active||0,deprecatedPatterns:e.deprecated||0,promotedPatterns:e.promoted||0,shortTermPatterns:e.short_term||0,longTermPatterns:e.long_term||0,avgConfidence:e.avg_confidence||0,avgSuccessRate:e.avg_success_rate||0,patternsNearDeprecation:t.count||0}}getPattern(e){let t=this.db.prepare(`
|
|
145
|
-
SELECT * FROM qe_patterns WHERE id = ?
|
|
146
|
-
`).get(e);return t?this.rowToPattern(t):null}rowToPattern(e){return{id:e.id,patternType:e.pattern_type,qeDomain:e.qe_domain,domain:e.domain,name:e.name,description:e.description||"",confidence:e.confidence,usageCount:e.usage_count,successRate:e.success_rate,qualityScore:e.quality_score,tier:e.tier,template:p(e.template_json||"{}"),context:p(e.context_json||"{}"),createdAt:new Date(e.created_at),lastUsedAt:e.last_used_at?new Date(e.last_used_at):new Date(e.created_at),successfulUses:e.successful_uses,reusable:e.reusable===1,reuseCount:e.reuse_count||0,averageTokenSavings:e.average_token_savings||0,deprecated_at:e.deprecated_at??null,consecutive_failures:e.consecutive_failures??0}}};function k(u,e){return new f(u,e)}import*as l from"fs";import*as m from"path";var C={"pattern-learned":"\u{1F9E0}","pattern-promoted":"\u2B06\uFE0F","pattern-quarantined":"\u{1F512}","experience-captured":"\u{1F4F8}","search-performed":"\u{1F50D}","reward-assigned":"\u{1F3AF}"},T=class{config;buffer=[];flushTimer=null;constructor(e){this.config={logDir:e?.logDir??m.join(process.cwd(),".agentic-qe","logs"),enabled:e?.enabled??!0,maxEntriesPerDay:e?.maxEntriesPerDay??500}}log(e){this.config.enabled&&(this.buffer.push(e),this.buffer.length>=10&&this.flush())}flush(){if(this.buffer.length===0)return;let e=new Date().toISOString().split("T")[0],t=m.join(this.config.logDir,`${e}.md`);try{l.mkdirSync(this.config.logDir,{recursive:!0});let n=this.buffer.splice(0,this.buffer.length),r=[];l.existsSync(t)||(r.push(`# AQE Daily Log \u2014 ${e}
|
|
147
|
-
`),r.push("| Time | Event | Summary |"),r.push("|------|-------|---------|"));for(let s of n){let a=s.timestamp.toISOString().split("T")[1]?.slice(0,8)??"00:00:00",c=C[s.type]??"\u{1F4DD}",i=s.summary.replace(/\\/g,"\\\\").replace(/\|/g,"\\|").replace(/\n/g," ");r.push(`| ${a} | ${c} ${s.type} | ${i} |`)}l.appendFileSync(t,r.join(`
|
|
148
|
-
`)+`
|
|
149
|
-
`)}catch(n){console.debug("[DailyLog] Write failed:",n)}}getTodayLogPath(){let e=new Date().toISOString().split("T")[0];return m.join(this.config.logDir,`${e}.md`)}dispose(){this.flush(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null)}};export{k as a,T as b};
|