agentic-qe 3.15.17 → 3.15.18
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/brain-checkpoint.cjs +107 -10
- package/.claude/skills/agentic-quality-engineering/SKILL.md +67 -44
- package/.claude/skills/brutal-honesty-review/SKILL.md +12 -7
- package/.claude/skills/brutal-honesty-review/evals/brutal-honesty-review.yaml +120 -0
- package/.claude/skills/brutal-honesty-review/schemas/output.json +9 -3
- package/.claude/skills/code-review-quality/SKILL.md +2 -2
- package/.claude/skills/holistic-testing-pact/SKILL.md +11 -11
- package/.claude/skills/sherlock-review/SKILL.md +4 -2
- package/.claude/skills/sherlock-review/evals/sherlock-review.yaml +124 -0
- package/.claude/skills/skills-manifest.json +1 -1
- package/.claude/skills/technical-writing/SKILL.md +12 -6
- package/.claude/skills/technical-writing/evals/technical-writing.yaml +96 -0
- package/.opencode/skills/qe-agentic-quality-engineering.yaml +2 -2
- package/.opencode/skills/qe-holistic-testing-pact.yaml +2 -2
- package/CHANGELOG.md +123 -0
- package/assets/skills/agentic-quality-engineering/SKILL.md +67 -44
- package/assets/skills/brutal-honesty-review/SKILL.md +12 -8
- package/assets/skills/brutal-honesty-review/evals/brutal-honesty-review.yaml +120 -0
- package/assets/skills/brutal-honesty-review/schemas/output.json +9 -3
- package/assets/skills/code-review-quality/SKILL.md +2 -2
- package/assets/skills/holistic-testing-pact/SKILL.md +11 -11
- package/assets/skills/sherlock-review/SKILL.md +4 -3
- package/assets/skills/sherlock-review/evals/sherlock-review.yaml +124 -0
- package/assets/skills/skills-manifest.json +1 -1
- package/assets/skills/technical-writing/SKILL.md +12 -6
- package/assets/skills/technical-writing/evals/technical-writing.yaml +96 -0
- package/dist/cli/brain-commands.d.ts +5 -0
- package/dist/cli/brain-commands.js +4 -0
- package/dist/cli/bundle.js +6 -6
- package/dist/cli/chunks/adapter-WRSDXLOT.js +2 -0
- package/dist/cli/chunks/{agent-booster-wasm-6BUOFQZA.js → agent-booster-wasm-UFNJNF3M.js} +2 -2
- package/dist/cli/chunks/{agent-handler-HPDK3JI3.js → agent-handler-EAYVRJXN.js} +2 -2
- package/dist/cli/chunks/{agent-memory-branch-5QKUTWK5.js → agent-memory-branch-M65C6WAQ.js} +2 -2
- package/dist/cli/chunks/aqe-learning-engine-O6NJBCCM.js +2 -0
- package/dist/cli/chunks/{arena-HZ35LESR.js → arena-2GDICP6R.js} +4 -4
- package/dist/cli/chunks/{arena-7OKPMNHD.js → arena-CG3X67OE.js} +2 -2
- package/dist/cli/chunks/{audit-XI575SVK.js → audit-F4FSPJPL.js} +3 -3
- package/dist/cli/chunks/base-J2FXOE77.js +2 -0
- package/dist/cli/chunks/{better-sqlite3-YO5X7ZJS.js → better-sqlite3-2MCFXW4J.js} +2 -2
- package/dist/cli/chunks/brain-handler-WGTJNYNB.js +95 -0
- package/dist/cli/chunks/{branch-enumerator-N6G44UU2.js → branch-enumerator-KL7C535H.js} +2 -2
- package/dist/cli/chunks/{browser-EVKPTLOI.js → browser-SJEXDVHS.js} +2 -2
- package/dist/cli/chunks/browser-workflow-LXGER6ZD.js +2 -0
- package/dist/cli/chunks/{chunk-VLTDW7XJ.js → chunk-244RKAEP.js} +2 -2
- package/dist/cli/chunks/{chunk-CVPXHDQU.js → chunk-27TUMXPD.js} +1 -1
- package/dist/cli/chunks/{chunk-FBBPRVNF.js → chunk-2MBYDPCP.js} +2 -2
- package/dist/cli/chunks/{chunk-P3D7SEHW.js → chunk-2Q6DTBMT.js} +1 -1
- package/dist/cli/chunks/{chunk-NE3LRUNC.js → chunk-355MI7RV.js} +13 -13
- package/dist/cli/chunks/{chunk-YCVLKU6H.js → chunk-3LX5OKBD.js} +2 -2
- package/dist/cli/chunks/{chunk-74MDUIAZ.js → chunk-3RPDKJGV.js} +1 -1
- package/dist/cli/chunks/{chunk-OWIQR6N2.js → chunk-3YMIT73A.js} +2 -2
- package/dist/cli/chunks/{chunk-VKREKVFI.js → chunk-43KUVBSU.js} +2 -2
- package/dist/cli/chunks/chunk-477FKXSS.js +2 -0
- package/dist/cli/chunks/{chunk-XPTCQKVE.js → chunk-4BIMTRRX.js} +1 -1
- package/dist/cli/chunks/{chunk-HD6W6PHV.js → chunk-4CVNVBX5.js} +2 -2
- package/dist/cli/chunks/{chunk-CQER6IJ5.js → chunk-4HL3SD4A.js} +1 -1
- package/dist/cli/chunks/{chunk-ZNXM6WVL.js → chunk-4PEG4DU2.js} +2 -2
- package/dist/cli/chunks/{chunk-BSIWI4ES.js → chunk-4QSQKFED.js} +2 -2
- package/dist/cli/chunks/chunk-53ZBETYR.js +16 -0
- package/dist/cli/chunks/{chunk-BHQ2DLJU.js → chunk-544KDWL4.js} +1 -1
- package/dist/cli/chunks/chunk-54RCGMLB.js +8 -0
- package/dist/cli/chunks/{chunk-TDZ6N43D.js → chunk-5AGXIZQ5.js} +2 -2
- package/dist/cli/chunks/{chunk-RKCN4B26.js → chunk-5M24X6W7.js} +2 -2
- package/dist/cli/chunks/{chunk-GG7PMTHD.js → chunk-5O5T4LEU.js} +1 -1
- package/dist/cli/chunks/{chunk-OWIZBZLN.js → chunk-5RFXX4IF.js} +2 -2
- package/dist/cli/chunks/{chunk-VQFV2IPV.js → chunk-62MLAQRJ.js} +1 -1
- package/dist/cli/chunks/{chunk-PCL5JRKN.js → chunk-6D6TGL2E.js} +2 -2
- package/dist/cli/chunks/{chunk-WBDWHHKP.js → chunk-6IHZDSDL.js} +2 -2
- package/dist/cli/chunks/{chunk-UOVCTK5L.js → chunk-6P3Y45QL.js} +2 -2
- package/dist/cli/chunks/{chunk-45223KK6.js → chunk-6TEVM3X3.js} +10 -10
- package/dist/cli/chunks/{chunk-K7WAI662.js → chunk-7XTUKKRA.js} +1 -1
- package/dist/cli/chunks/chunk-A3GDX6UF.js +2 -0
- package/dist/cli/chunks/{chunk-GN6OE3JT.js → chunk-A5YTKKNA.js} +1 -1
- package/dist/cli/chunks/{chunk-KR2TAAF6.js → chunk-ADNGZAT2.js} +1 -1
- package/dist/cli/chunks/{chunk-J7Q5TXFZ.js → chunk-AWQAE3SW.js} +2 -2
- package/dist/cli/chunks/{chunk-ZN35XSKF.js → chunk-AXDBQFR4.js} +2 -2
- package/dist/cli/chunks/{chunk-ND72UDVH.js → chunk-AXVD7O3F.js} +2 -2
- package/dist/cli/chunks/{chunk-SAEECT23.js → chunk-B52ULNYO.js} +2 -2
- package/dist/cli/chunks/chunk-B6S4FC7M.js +3 -0
- package/dist/cli/chunks/{chunk-Z7SKUC6P.js → chunk-BDVFSMOQ.js} +1 -1
- package/dist/cli/chunks/{chunk-CXCMATZ6.js → chunk-BGXXMX3Y.js} +2 -2
- package/dist/cli/chunks/{chunk-R3KBOQ3O.js → chunk-BKMQQY5T.js} +2 -2
- package/dist/cli/chunks/{chunk-SAZ4PJBR.js → chunk-BN2FROBQ.js} +2 -2
- package/dist/cli/chunks/{chunk-G2X3OLMN.js → chunk-BO6EQNOC.js} +2 -2
- package/dist/cli/chunks/{chunk-776K4ZLE.js → chunk-BOVAKCDC.js} +2 -2
- package/dist/cli/chunks/{chunk-QSQNXBD2.js → chunk-BSXKZDKO.js} +2 -2
- package/dist/cli/chunks/{chunk-MGZ6XZHU.js → chunk-C5QVJ5XQ.js} +1 -1
- package/dist/cli/chunks/{chunk-LOLSZG5J.js → chunk-CFQLLF3D.js} +2 -2
- package/dist/cli/chunks/{chunk-J6QRNQJF.js → chunk-DUCVLT3F.js} +7 -7
- package/dist/cli/chunks/{chunk-QTQDX4TZ.js → chunk-E4RMJCGA.js} +3 -3
- package/dist/cli/chunks/{chunk-MLMD3I75.js → chunk-EONDCWY4.js} +1 -1
- package/dist/cli/chunks/{chunk-7BSOO3CY.js → chunk-F4AGNKL2.js} +2 -2
- package/dist/cli/chunks/{chunk-IKB3M7OF.js → chunk-F6YD3BOW.js} +1 -1
- package/dist/cli/chunks/{chunk-LIF6UWHV.js → chunk-FQRS7WVA.js} +2 -2
- package/dist/cli/chunks/{chunk-QJSSUBO3.js → chunk-FT24SSDG.js} +2 -2
- package/dist/cli/chunks/chunk-FV4YNSAJ.js +5 -0
- package/dist/cli/chunks/{chunk-VITV7AEC.js → chunk-FVDM3X42.js} +2 -2
- package/dist/cli/chunks/{chunk-LN7NKE3N.js → chunk-FVH7TXWU.js} +2 -2
- package/dist/cli/chunks/{chunk-FBSBXCZS.js → chunk-FWR5QY37.js} +2 -2
- package/dist/cli/chunks/{chunk-X2DWHGCC.js → chunk-FYINK2B7.js} +2 -2
- package/dist/cli/chunks/{chunk-ECKHDHR2.js → chunk-GGISVPOZ.js} +2 -2
- package/dist/cli/chunks/{chunk-SRBCBVSI.js → chunk-GPIJIZJQ.js} +2 -2
- package/dist/cli/chunks/{chunk-YR5QBUHZ.js → chunk-GXEVOT5F.js} +2 -2
- package/dist/cli/chunks/{chunk-ZTP3DQ5M.js → chunk-GZ4VB5RI.js} +1 -1
- package/dist/cli/chunks/{chunk-HWQPMUSN.js → chunk-HBDSCYSK.js} +2 -2
- package/dist/cli/chunks/{chunk-XBTGEYED.js → chunk-HGG4HR7C.js} +2 -2
- package/dist/cli/chunks/{chunk-YD2C6EPN.js → chunk-HSCKWWO2.js} +2 -2
- package/dist/cli/chunks/{chunk-LOMT4UC2.js → chunk-HSQ3GUYJ.js} +2 -2
- package/dist/cli/chunks/{chunk-ZC3KDNJW.js → chunk-HZQBW5EM.js} +3 -3
- package/dist/cli/chunks/{chunk-SUAZ5Z47.js → chunk-IGIYANVT.js} +2 -2
- package/dist/cli/chunks/{chunk-IHQGNDMX.js → chunk-IPWMSXBF.js} +2 -2
- package/dist/cli/chunks/{chunk-6V6BD6PH.js → chunk-IWVNC7VY.js} +1 -1
- package/dist/cli/chunks/{chunk-M2YI5YUR.js → chunk-IZODXKZD.js} +2 -2
- package/dist/cli/chunks/{chunk-LG5PPJT7.js → chunk-J2MT2OJV.js} +1 -1
- package/dist/cli/chunks/{chunk-6LSZCEW2.js → chunk-JKIJVVSP.js} +1 -1
- package/dist/cli/chunks/{chunk-REY52O7J.js → chunk-JMRDT2XK.js} +1 -1
- package/dist/cli/chunks/{chunk-XEYFZLIT.js → chunk-JR2UMTKG.js} +1 -1
- package/dist/cli/chunks/{chunk-DJDVD6RM.js → chunk-K6CH4CFF.js} +2 -2
- package/dist/cli/chunks/{chunk-2PCEMDIX.js → chunk-K7KW5QB5.js} +78 -87
- package/dist/cli/chunks/{chunk-EPVPXHL7.js → chunk-KFCQP434.js} +2 -2
- package/dist/cli/chunks/{chunk-TWBZONKT.js → chunk-KH4T6STG.js} +2 -2
- package/dist/cli/chunks/{chunk-JI33PMPZ.js → chunk-KJBYZO57.js} +1 -1
- package/dist/cli/chunks/{chunk-PK34KJH7.js → chunk-KP4OKOKV.js} +2 -2
- package/dist/cli/chunks/chunk-L2MBKVSE.js +2 -0
- package/dist/cli/chunks/{chunk-JVWZAE2H.js → chunk-L3IPUIT3.js} +2 -2
- package/dist/cli/chunks/{chunk-KT2QCXO6.js → chunk-L7PSU2YN.js} +2 -2
- package/dist/cli/chunks/{chunk-HAQJFUAQ.js → chunk-LA3JPGQA.js} +2 -2
- package/dist/cli/chunks/{chunk-LV7UIK4Q.js → chunk-LC2QRN7V.js} +14 -13
- package/dist/cli/chunks/{chunk-KTORRIX3.js → chunk-LHY7TMTM.js} +2 -2
- package/dist/cli/chunks/{chunk-IJSROBM6.js → chunk-LLQ2UMF6.js} +3 -3
- package/dist/cli/chunks/{chunk-NKUHMA4T.js → chunk-LOJ7OO6W.js} +2 -2
- package/dist/cli/chunks/{chunk-OJIUIEI4.js → chunk-LPUSH3VF.js} +1 -1
- package/dist/cli/chunks/{chunk-WAOEQA3W.js → chunk-LSEC2BU7.js} +2 -2
- package/dist/cli/chunks/{chunk-YMUY3TES.js → chunk-LTGB7OIU.js} +2 -2
- package/dist/cli/chunks/{chunk-CVYPMGUM.js → chunk-LUG7YNVZ.js} +2 -2
- package/dist/cli/chunks/{chunk-YAJOBZE5.js → chunk-LWAFRYKE.js} +2 -2
- package/dist/cli/chunks/{chunk-ZP5AWQRO.js → chunk-M24ZAZ4U.js} +2 -2
- package/dist/cli/chunks/{chunk-HFZD5KLR.js → chunk-MKRKRXTX.js} +1 -1
- package/dist/cli/chunks/{chunk-4YM45Z5B.js → chunk-MNNLONAD.js} +1 -1
- package/dist/cli/chunks/{chunk-CMN7PU2H.js → chunk-MQM37KAR.js} +2 -2
- package/dist/cli/chunks/{chunk-COTQ44YO.js → chunk-MSX2OHYT.js} +2 -2
- package/dist/cli/chunks/{chunk-4UKTIQDT.js → chunk-MVYQRVLP.js} +2 -2
- package/dist/cli/chunks/{chunk-HRUHHHVR.js → chunk-MZC5WM2P.js} +2 -2
- package/dist/cli/chunks/{chunk-YKRLUTK7.js → chunk-MZRBNBB3.js} +2 -2
- package/dist/cli/chunks/{chunk-XEMCHGAJ.js → chunk-N3KQU4UC.js} +2 -2
- package/dist/cli/chunks/{chunk-DS5IFRY6.js → chunk-NKU3FFM4.js} +2 -2
- package/dist/cli/chunks/chunk-O5EWFR76.js +2 -0
- package/dist/cli/chunks/{chunk-J3QFJI2Y.js → chunk-O5RDHD5T.js} +2 -2
- package/dist/cli/chunks/chunk-O6UWIXME.js +3 -0
- package/dist/cli/chunks/{chunk-Q6F3DYZN.js → chunk-OA4EQDC4.js} +2 -2
- package/dist/cli/chunks/{chunk-NQFDJ6BT.js → chunk-OBCXCRXK.js} +1 -1
- package/dist/cli/chunks/{chunk-S3TBOKAZ.js → chunk-OHU5P25N.js} +4 -4
- package/dist/cli/chunks/{chunk-DNVRTJKB.js → chunk-OOSV2RIA.js} +2 -2
- package/dist/cli/chunks/{chunk-NZJVDOUN.js → chunk-OW23N2Y5.js} +2 -2
- package/dist/cli/chunks/{chunk-ZWUF27P4.js → chunk-OXOO3YDL.js} +2 -2
- package/dist/cli/chunks/{chunk-4L6WX5KC.js → chunk-OYGKSSSI.js} +1 -1
- package/dist/cli/chunks/{chunk-DCDSN67A.js → chunk-PGO46IIW.js} +1 -1
- package/dist/cli/chunks/{chunk-C7QLLMYI.js → chunk-PZOYQHWS.js} +1 -1
- package/dist/cli/chunks/{chunk-BKHEQIRZ.js → chunk-Q2BZSG7Z.js} +2 -2
- package/dist/cli/chunks/{chunk-5FSPELOG.js → chunk-Q7V722K5.js} +2 -2
- package/dist/cli/chunks/{chunk-2EQK7B5L.js → chunk-QZU6M5IO.js} +2 -2
- package/dist/cli/chunks/{chunk-HVT7RMGV.js → chunk-R55Y76SJ.js} +1 -1
- package/dist/cli/chunks/{chunk-POPSZDI2.js → chunk-RMEQYJPU.js} +4 -4
- package/dist/cli/chunks/{chunk-H2LHWZRE.js → chunk-RTYXFXTI.js} +2 -2
- package/dist/cli/chunks/{chunk-QN7HP2UW.js → chunk-SJF3O4FX.js} +236 -236
- package/dist/cli/chunks/{chunk-2YWYW7NU.js → chunk-SOUS7Z2H.js} +2 -2
- package/dist/cli/chunks/{chunk-U5SMBJ6F.js → chunk-SRVNR3R3.js} +2 -2
- package/dist/cli/chunks/{chunk-ZAQMRFBB.js → chunk-SU3SXMVG.js} +2 -2
- package/dist/cli/chunks/chunk-SWGPLXWW.js +32 -0
- package/dist/cli/chunks/{chunk-S3DT5TPR.js → chunk-TRB3EVH3.js} +2 -2
- package/dist/cli/chunks/{chunk-IJZFJPHS.js → chunk-TVBDUMKT.js} +2 -2
- package/dist/cli/chunks/{chunk-7SNSI4VY.js → chunk-TWTXPSFU.js} +1 -1
- package/dist/cli/chunks/{chunk-ORQ2YBRR.js → chunk-ULYUVUL2.js} +2 -2
- package/dist/cli/chunks/{chunk-MVVVGQJ6.js → chunk-UNTBVJ5X.js} +2 -2
- package/dist/cli/chunks/{chunk-5WATBVU6.js → chunk-UQAA4PHU.js} +2 -2
- package/dist/cli/chunks/{chunk-5WYZVSL2.js → chunk-UWSJVKTE.js} +1 -1
- package/dist/cli/chunks/{chunk-JHKKIJT2.js → chunk-V2LJ54KP.js} +2 -2
- package/dist/cli/chunks/{chunk-2UUZCQSD.js → chunk-VCCTTKP3.js} +2 -2
- package/dist/cli/chunks/{chunk-P4OB6WDJ.js → chunk-VEGUYUVS.js} +1 -1
- package/dist/cli/chunks/{chunk-WX4PO65Q.js → chunk-VUQPVWNK.js} +2 -2
- package/dist/cli/chunks/{chunk-IQL6XRF5.js → chunk-VVGUE2T2.js} +2 -2
- package/dist/cli/chunks/{chunk-HZ5O7G2P.js → chunk-W5ASDHJQ.js} +1 -1
- package/dist/cli/chunks/{chunk-U4S74IIZ.js → chunk-WGXT5NWQ.js} +1 -1
- package/dist/cli/chunks/chunk-WJN3V7QB.js +7 -0
- package/dist/cli/chunks/chunk-WPCRQIIF.js +29 -0
- package/dist/cli/chunks/{chunk-AGCS5GSO.js → chunk-WQNLXUWA.js} +6 -6
- package/dist/cli/chunks/{chunk-LRY6UIRI.js → chunk-WZVRMKG2.js} +2 -2
- package/dist/cli/chunks/{chunk-KPIPVSIP.js → chunk-X27IUWTD.js} +2 -2
- package/dist/cli/chunks/{chunk-VDEKVIP5.js → chunk-X4B345B6.js} +2 -2
- package/dist/cli/chunks/{chunk-ERYADKMZ.js → chunk-X5I2Y4VO.js} +2 -2
- package/dist/cli/chunks/{chunk-EUWG2JG4.js → chunk-X7IQIFTS.js} +2 -2
- package/dist/cli/chunks/chunk-XJN3RKUD.js +3 -0
- package/dist/cli/chunks/{chunk-JRIJM4LE.js → chunk-XQMGXTHJ.js} +3 -3
- package/dist/cli/chunks/{chunk-VYPVU3JF.js → chunk-XTSAMB2Q.js} +2 -2
- package/dist/cli/chunks/{chunk-4NKZU2JZ.js → chunk-XZLIF4O2.js} +2 -2
- package/dist/cli/chunks/{chunk-XFTX3KLE.js → chunk-Y4LSEOZ3.js} +1 -1
- package/dist/cli/chunks/{chunk-ZVMSSCTH.js → chunk-Y4YN2RXR.js} +2 -2
- package/dist/cli/chunks/{chunk-X5QD76IU.js → chunk-YDI56L35.js} +2 -2
- package/dist/cli/chunks/{chunk-LRKLATSH.js → chunk-YFILS5D5.js} +2 -2
- package/dist/cli/chunks/{chunk-AVHYJ3XP.js → chunk-YISDX6WB.js} +2 -2
- package/dist/cli/chunks/{chunk-GPPTRKEM.js → chunk-YP2GHQSV.js} +2 -2
- package/dist/cli/chunks/{chunk-OO2M2QUV.js → chunk-YSX756AM.js} +4 -4
- package/dist/cli/chunks/{chunk-E7XIMOKW.js → chunk-YWANOASW.js} +2 -2
- package/dist/cli/chunks/{chunk-UHJVZEQA.js → chunk-YYIJLG7S.js} +2 -2
- package/dist/cli/chunks/{chunk-LCWEQRZI.js → chunk-Z7SD7LXM.js} +2 -2
- package/dist/cli/chunks/{chunk-TM75GAXG.js → chunk-ZDWD73UF.js} +2 -2
- package/dist/cli/chunks/{chunk-IRHXGCQR.js → chunk-ZFT3RLA4.js} +2 -2
- package/dist/cli/chunks/{chunk-ZGV7L4MW.js → chunk-ZNTHX5G3.js} +1 -1
- package/dist/cli/chunks/{chunk-D75GLKEL.js → chunk-ZS27R7VL.js} +2 -2
- package/dist/cli/chunks/{chunk-INI3Q4CN.js → chunk-ZXHHHR7K.js} +1 -1
- package/dist/cli/chunks/{ci-3RTTTS2D.js → ci-N5MOMNXH.js} +2 -2
- package/dist/cli/chunks/{ci-config-XRUR3I4K.js → ci-config-6L2ROQCW.js} +2 -2
- package/dist/cli/chunks/{ci-output-E5IAMU2U.js → ci-output-DSRBYEIK.js} +2 -2
- package/dist/cli/chunks/{circuit-breaker-SHR2P44P.js → circuit-breaker-VRPTNBL7.js} +2 -2
- package/dist/cli/chunks/{claude-flow-setup-ZDDILFMF.js → claude-flow-setup-4YFG3FU5.js} +2 -2
- package/dist/cli/chunks/client-I3L6BKRQ.js +2 -0
- package/dist/cli/chunks/{cline-installer-BGYVUM6G.js → cline-installer-7RGYJWGN.js} +2 -2
- package/dist/cli/chunks/{code-PJ4MC3MC.js → code-ISC6NW2K.js} +3 -3
- package/dist/cli/chunks/{code-index-extractor-IW2P22YG.js → code-index-extractor-2FID75YV.js} +2 -2
- package/dist/cli/chunks/{codex-installer-A7WZ6OGL.js → codex-installer-DZ7OG6KM.js} +2 -2
- package/dist/cli/chunks/{completions-KS23WD5J.js → completions-SM3LICWK.js} +2 -2
- package/dist/cli/chunks/{complexity-analyzer-Q7GLSR2E.js → complexity-analyzer-ZWD2CTAD.js} +2 -2
- package/dist/cli/chunks/{continuedev-installer-SK55BFW2.js → continuedev-installer-AGASOA26.js} +2 -2
- package/dist/cli/chunks/{copilot-installer-3N5J3WTM.js → copilot-installer-CLPZYTQC.js} +2 -2
- package/dist/cli/chunks/core-handlers-5EFOJ37H.js +2 -0
- package/dist/cli/chunks/{cost-tracker-NENVSO4A.js → cost-tracker-7PIGQYDV.js} +2 -2
- package/dist/cli/chunks/{coverage-5L7UQWDH.js → coverage-T2GEBTYS.js} +9 -9
- package/dist/cli/chunks/cross-domain-router-65WJAKVD.js +2 -0
- package/dist/cli/chunks/{cursor-installer-XXBO2ZE6.js → cursor-installer-KXBID4MB.js} +2 -2
- package/dist/cli/chunks/daemon-43MXIVH3.js +18 -0
- package/dist/cli/chunks/{daemon-CDCQU3LR.js → daemon-VAMJLQJ5.js} +3 -3
- package/dist/cli/chunks/{dag-attention-scheduler-HOMMF7FA.js → dag-attention-scheduler-UBP4VHTA.js} +2 -2
- package/dist/cli/chunks/{detect-FXCOUG6X.js → detect-QWFIQRKI.js} +2 -2
- package/dist/cli/chunks/{dist-node-GXQ7FMTY.js → dist-node-I2GICS3W.js} +2 -2
- package/dist/cli/chunks/{domain-handler-TI3JBAPC.js → domain-handler-Z66ISB2A.js} +2 -2
- package/dist/cli/chunks/{domain-plugins-R7LTUM32.js → domain-plugins-KHMD3FKT.js} +2 -2
- package/dist/cli/chunks/{domain-transfer-LBIAFHIQ.js → domain-transfer-JWGNNA6K.js} +2 -2
- package/dist/cli/chunks/dream-VQ2PZCVR.js +2 -0
- package/dist/cli/chunks/embed-and-insert-pattern-F5P5B6JX.js +3 -0
- package/dist/cli/chunks/{embedding-space-HHLWTBF5.js → embedding-space-KHG6TITM.js} +2 -2
- package/dist/cli/chunks/{eval-KDOZMAXJ.js → eval-43OHU7EI.js} +2 -2
- package/dist/cli/chunks/{experience-capture-middleware-X45PECQN.js → experience-capture-middleware-KXD47H6P.js} +3 -3
- package/dist/cli/chunks/{fast-paths-462V6UUB.js → fast-paths-6D75D5KD.js} +2 -2
- package/dist/cli/chunks/{feature-flags-NIRQ4YDM.js → feature-flags-IE35Y55N.js} +2 -2
- package/dist/cli/chunks/{feature-flags-G66OT3AS.js → feature-flags-OYYHY7LS.js} +2 -2
- package/dist/cli/chunks/file-discovery-LGBTY3ID.js +2 -0
- package/dist/cli/chunks/{fleet-PXWGB7CU.js → fleet-AGVJMFGD.js} +16 -16
- package/dist/cli/chunks/{gnn-wrapper-7MUW3M5M.js → gnn-wrapper-5L66A7LW.js} +2 -2
- package/dist/cli/chunks/{heartbeat-handler-5237PB35.js → heartbeat-handler-2BY6YYOT.js} +5 -5
- package/dist/cli/chunks/heartbeat-scheduler-3DU3M5AT.js +2 -0
- package/dist/cli/chunks/hnsw-adapter-N2IMSRPV.js +2 -0
- package/dist/cli/chunks/hnsw-index-DVU7TTJE.js +2 -0
- package/dist/cli/chunks/{hnsw-legacy-bridge-OSQPW7JP.js → hnsw-legacy-bridge-RYMWFNAH.js} +2 -2
- package/dist/cli/chunks/{hnswlib-node-GX6WG2GB.js → hnswlib-node-GG47HP2P.js} +2 -2
- package/dist/cli/chunks/{hooks-GUWHL7VC.js → hooks-FQNACS24.js} +10 -10
- package/dist/cli/chunks/hybrid-backend-AS2PNHOD.js +2 -0
- package/dist/cli/chunks/{hypergraph-engine-SRWLLCU3.js → hypergraph-engine-6BYNJQEP.js} +2 -2
- package/dist/cli/chunks/{hypergraph-handler-AVOPRHHO.js → hypergraph-handler-CYTAXZKJ.js} +3 -3
- package/dist/cli/chunks/impact-analyzer-Y4OONLFP.js +2 -0
- package/dist/cli/chunks/{init-guard-P4N6EVZS.js → init-guard-METTAV5O.js} +2 -2
- package/dist/cli/chunks/{init-handler-LRGWOJMD.js → init-handler-GFT74U5Y.js} +6 -6
- package/dist/cli/chunks/init-wizard-HLNUBJQN.js +2 -0
- package/dist/cli/chunks/kernel-XKFWCL7Y.js +2 -0
- package/dist/cli/chunks/{kilocode-installer-7R2EPOQ6.js → kilocode-installer-GZV2D3FF.js} +2 -2
- package/dist/cli/chunks/{kiro-installer-QNM7DPOB.js → kiro-installer-Q4ZXUFC7.js} +2 -2
- package/dist/cli/chunks/knowledge-graph-CNL77CSZ.js +2 -0
- package/dist/cli/chunks/{learning-7OIZBPXZ.js → learning-WA2QEYL7.js} +35 -34
- package/dist/cli/chunks/{llm-router-SIDXES23.js → llm-router-GRTCHWH7.js} +4 -4
- package/dist/cli/chunks/llm-router-service-UIYTYKP6.js +2 -0
- package/dist/cli/chunks/{load-EI2E2C3S.js → load-WXN3Q7Y5.js} +2 -2
- package/dist/cli/chunks/load-test-PXLW4A5B.js +2 -0
- package/dist/cli/chunks/{mcp-IOE5WOCS.js → mcp-LIQCPSJN.js} +2 -2
- package/dist/cli/chunks/{memory-DLYGJAP7.js → memory-OP6CHRFH.js} +5 -5
- package/dist/cli/chunks/memory-backend-XYOSO73Q.js +2 -0
- package/dist/cli/chunks/memory-handlers-PQFYVNVG.js +2 -0
- package/dist/cli/chunks/{multi-model-executor-WHH4YCHM.js → multi-model-executor-H54DEVRZ.js} +2 -2
- package/dist/cli/chunks/{opencode-installer-63FDZAMS.js → opencode-installer-BSQV6UAT.js} +2 -2
- package/dist/cli/chunks/{orchestrator-3LA776KK.js → orchestrator-TJDPQ4VL.js} +122 -35
- package/dist/cli/chunks/pattern-null-store-BKGTQFNF.js +2 -0
- package/dist/cli/chunks/{pattern-usage-recorder-NW54QUGI.js → pattern-usage-recorder-FOVS4M5L.js} +2 -2
- package/dist/cli/chunks/{pipeline-P3TYX6J6.js → pipeline-4AY2ZIC6.js} +2 -2
- package/dist/cli/chunks/{platform-FNA2WLI6.js → platform-FCSITYMR.js} +2 -2
- package/dist/cli/chunks/{plugin-NJS7BC2S.js → plugin-E56TV5S2.js} +2 -2
- package/dist/cli/chunks/{prime-radiant-advanced-wasm-NIAVL2OT.js → prime-radiant-advanced-wasm-ACOPC533.js} +2 -2
- package/dist/cli/chunks/project-root-MPX7CN2C.js +2 -0
- package/dist/cli/chunks/protocol-executor-CRQOCC4A.js +2 -0
- package/dist/cli/chunks/{protocol-handler-JU5C4JHY.js → protocol-handler-KRVXF4LS.js} +2 -2
- package/dist/cli/chunks/{prove-35VOSLYP.js → prove-KMFPSKGD.js} +2 -2
- package/dist/cli/chunks/qe-reasoning-bank-UEGQ3O7F.js +2 -0
- package/dist/cli/chunks/{quality-ET74X7HN.js → quality-6DBI3HLB.js} +2 -2
- package/dist/cli/chunks/{quality-gate-FEDQISNB.js → quality-gate-3ROZMEIL.js} +3 -3
- package/dist/cli/chunks/queen-coordinator-32574XSG.js +2 -0
- package/dist/cli/chunks/real-embeddings-MIGZNKK3.js +2 -0
- package/dist/cli/chunks/{ref-validation-DTBPYCEB.js → ref-validation-EYIP7DHW.js} +2 -2
- package/dist/cli/chunks/{roocode-installer-LYQEMR4J.js → roocode-installer-IGGZHR2Y.js} +2 -2
- package/dist/cli/chunks/router-CZJY5WX6.js +2 -0
- package/dist/cli/chunks/routing-feedback-RC3UBNFX.js +2 -0
- package/dist/cli/chunks/{routing-handler-DJOJFPII.js → routing-handler-BWNHBYDC.js} +2 -2
- package/dist/cli/chunks/{ruvector-commands-VXYGJDPW.js → ruvector-commands-PXIHF432.js} +2 -2
- package/dist/cli/chunks/rvf-dual-writer-OG7OV2AK.js +2 -0
- package/dist/cli/chunks/rvf-migration-adapter-THYMW7ZO.js +2 -0
- package/dist/cli/chunks/rvf-migration-coordinator-3H6CLFU7.js +2 -0
- package/dist/cli/chunks/rvf-native-adapter-6JQJIKKW.js +2 -0
- package/dist/cli/chunks/{rvf-store-integrity-GA2ZYOEG.js → rvf-store-integrity-CVB3NMSL.js} +2 -2
- package/dist/cli/chunks/safe-db-QFKCVTIJ.js +2 -0
- package/dist/cli/chunks/schedule-6JLVMMYB.js +2 -0
- package/dist/cli/chunks/scheduler-3MPZRMJD.js +2 -0
- package/dist/cli/chunks/{security-MM6YOECX.js → security-DCRGOTWU.js} +3 -3
- package/dist/cli/chunks/{shared-rvf-adapter-6AHPA3V5.js → shared-rvf-adapter-GKD74QUB.js} +2 -2
- package/dist/cli/chunks/{shared-rvf-dual-writer-EYAVY2GZ.js → shared-rvf-dual-writer-HVAAVEOH.js} +2 -2
- package/dist/cli/chunks/sqlite-persistence-LGTIKAEX.js +2 -0
- package/dist/cli/chunks/{standalone-memory-A3PLB4CZ.js → standalone-memory-O7O2U5N4.js} +2 -2
- package/dist/cli/chunks/{status-handler-OSSFAP4Z.js → status-handler-BQTPJJTL.js} +2 -2
- package/dist/cli/chunks/{structural-health-PGY5XUNO.js → structural-health-4H6J4OHK.js} +2 -2
- package/dist/cli/chunks/sync-DJ4TF6QX.js +2 -0
- package/dist/cli/chunks/{sync-CWEHYGNN.js → sync-WW5TAVYW.js} +2 -2
- package/dist/cli/chunks/{task-handler-LHMQ75W4.js → task-handler-HEM4IEOW.js} +2 -2
- package/dist/cli/chunks/{task-handlers-S2TX5FTR.js → task-handlers-JRA3NXIR.js} +3 -3
- package/dist/cli/chunks/{test-4EGZZ6NJ.js → test-772ZXVG2.js} +4 -4
- package/dist/cli/chunks/test-runner-process-XGF2U3NG.js +2 -0
- package/dist/cli/chunks/{test-scheduling-YJQHH3XE.js → test-scheduling-4TRB7LZ7.js} +3 -3
- package/dist/cli/chunks/token-bootstrap-CICBIJ7T.js +2 -0
- package/dist/cli/chunks/{token-usage-WPNOJR6H.js → token-usage-B7PEKE2G.js} +2 -2
- package/dist/cli/chunks/{transformers-4MRPXCPU.js → transformers-V7X7BDZX.js} +2 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-OXPFKFZS.js +2 -0
- package/dist/cli/chunks/{types-6P5FB4EB.js → types-AHHTUY3I.js} +2 -2
- package/dist/cli/chunks/unified-memory-GUR3IUI6.js +2 -0
- package/dist/cli/chunks/unified-memory-hnsw-NJP2F2RY.js +2 -0
- package/dist/cli/chunks/unified-persistence-NILBWXDP.js +2 -0
- package/dist/cli/chunks/{upgrade-4ICTN63Y.js → upgrade-DZ4DLUQ5.js} +2 -2
- package/dist/cli/chunks/{validate-HQF5GZ7L.js → validate-4DTLIDJE.js} +2 -2
- package/dist/cli/chunks/{validate-swarm-45JYG7VW.js → validate-swarm-A26UFVIS.js} +2 -2
- package/dist/cli/chunks/visual-security-YECYZ27X.js +2 -0
- package/dist/cli/chunks/{web-tree-sitter-UOTWZLNH.js → web-tree-sitter-F2C7QRYT.js} +2 -2
- package/dist/cli/chunks/{windsurf-installer-WDWSBXGN.js → windsurf-installer-OOBTDA6W.js} +2 -2
- package/dist/cli/chunks/{witness-chain-DOYMNPC7.js → witness-chain-KGFZJP32.js} +2 -2
- package/dist/cli/chunks/witness-chain-LYBXFLJB.js +2 -0
- package/dist/cli/chunks/witness-chain-repair-CNTXOGPN.js +2 -0
- package/dist/cli/chunks/{witness-chain-verifier-JB42X62J.js → witness-chain-verifier-OB7ZZOI3.js} +2 -2
- package/dist/cli/chunks/{witness-key-manager-LXXO6L2G.js → witness-key-manager-YCKGKGQI.js} +2 -2
- package/dist/cli/chunks/{workflow-6ARK47NF.js → workflow-PRERHWKY.js} +4 -4
- package/dist/cli/chunks/workflow-orchestrator-UIBGWCU3.js +2 -0
- package/dist/cli/chunks/wrappers-L4UY4V63.js +2 -0
- package/dist/cli/commands/coverage.js +4 -1
- package/dist/cli/commands/learning-prune.js +9 -1
- package/dist/cli/handlers/brain-handler.js +32 -2
- package/dist/cli/handlers/heartbeat-handler.js +3 -1
- package/dist/cli/utils/coverage-data.js +5 -1
- package/dist/cli/utils/coverage-verdict.d.ts +10 -2
- package/dist/cli/utils/coverage-verdict.js +23 -8
- package/dist/cli/utils/fleet-operation.js +9 -3
- package/dist/coordination/handlers/code-intelligence-handlers.js +17 -3
- package/dist/coordination/handlers/coverage-handlers.js +22 -9
- package/dist/coordination/handlers/coverage-target.d.ts +22 -2
- package/dist/coordination/handlers/coverage-target.js +45 -9
- package/dist/coordination/handlers/handler-utils.d.ts +19 -0
- package/dist/coordination/handlers/handler-utils.js +22 -8
- package/dist/coordination/protocols/code-intelligence-index.js +6 -3
- package/dist/coordination/protocols/learning-consolidation-archive.d.ts +6 -3
- package/dist/coordination/protocols/learning-consolidation-archive.js +4 -3
- package/dist/coordination/workflow-builtin.js +1 -0
- package/dist/domains/defect-intelligence/interfaces.d.ts +2 -0
- package/dist/domains/defect-intelligence/prediction-history.d.ts +15 -1
- package/dist/domains/defect-intelligence/prediction-history.js +63 -7
- package/dist/domains/defect-intelligence/services/defect-predictor.d.ts +1 -0
- package/dist/domains/defect-intelligence/services/defect-predictor.js +33 -13
- package/dist/domains/learning-optimization/coordinator.js +17 -10
- package/dist/domains/learning-optimization/domain-ranking.d.ts +26 -0
- package/dist/domains/learning-optimization/domain-ranking.js +28 -0
- package/dist/domains/learning-optimization/interfaces.d.ts +5 -0
- package/dist/domains/learning-optimization/pattern-archive.d.ts +55 -8
- package/dist/domains/learning-optimization/pattern-archive.js +90 -17
- package/dist/domains/learning-optimization/pattern-consolidation.js +18 -2
- package/dist/domains/learning-optimization/pattern-merge.d.ts +26 -0
- package/dist/domains/learning-optimization/pattern-merge.js +127 -0
- package/dist/domains/learning-optimization/services/learning-coordinator.js +21 -35
- package/dist/domains/test-execution/services/test-executor.js +6 -2
- package/dist/init/init-wizard-steps.js +3 -1
- package/dist/init/phases/07-hooks.js +97 -10
- package/dist/integrations/embeddings/cache/EmbeddingCache.js +1 -1
- package/dist/integrations/ruvector/brain-rvf-exporter.d.ts +16 -1
- package/dist/integrations/ruvector/brain-rvf-exporter.js +18 -32
- package/dist/integrations/ruvector/brain-rvf-richness.d.ts +75 -0
- package/dist/integrations/ruvector/brain-rvf-richness.js +127 -0
- package/dist/kernel/unified-memory-migration.js +1 -1
- package/dist/learning/checkpoint-shrink-ack.d.ts +25 -0
- package/dist/learning/checkpoint-shrink-ack.js +57 -0
- package/dist/learning/dream/dream-engine.d.ts +44 -3
- package/dist/learning/dream/dream-engine.js +6 -2
- package/dist/learning/embedder-identity-store.js +3 -1
- package/dist/learning/embedding-space-legacy-adoption.d.ts +53 -0
- package/dist/learning/embedding-space-legacy-adoption.js +115 -0
- package/dist/learning/embedding-space-registry.d.ts +15 -0
- package/dist/learning/embedding-space-registry.js +50 -11
- package/dist/learning/experience-capture.d.ts +3 -1
- package/dist/learning/experience-capture.js +15 -5
- package/dist/learning/experience-space-verification.d.ts +2 -0
- package/dist/learning/experience-space-verification.js +3 -2
- package/dist/learning/learning-retention.js +4 -0
- package/dist/learning/pattern-promotion.d.ts +7 -0
- package/dist/learning/pattern-promotion.js +64 -12
- package/dist/learning/real-embeddings.js +31 -7
- package/dist/learning/rvf-pattern-store.js +6 -1
- package/dist/mcp/bundle.js +570 -558
- package/dist/mcp/handlers/domain-handler-configs.d.ts +3 -0
- package/dist/mcp/handlers/domain-handler-configs.js +1 -0
- package/dist/mcp/handlers/heartbeat-handlers.d.ts +4 -2
- package/dist/mcp/tools/learning-optimization/optimize.d.ts +6 -1
- package/dist/mcp/tools/learning-optimization/optimize.js +20 -11
- package/dist/planning/goap-planner.js +4 -0
- package/dist/planning/plan-executor.js +6 -2
- package/dist/shared/git/git-analyzer.d.ts +30 -11
- package/dist/shared/git/git-analyzer.js +95 -48
- package/dist/shared/io/confined-read.d.ts +32 -7
- package/dist/shared/io/confined-read.js +58 -25
- package/dist/shared/io/file-reader.js +4 -1
- package/dist/shared/safe-db.d.ts +1 -1
- package/dist/shared/safe-db.js +20 -5
- package/dist/shared/sqlite-journal-mode.d.ts +39 -0
- package/dist/shared/sqlite-journal-mode.js +53 -0
- package/dist/sync/claude-flow-bridge.js +1 -1
- package/dist/sync/readers/sqlite-reader.js +3 -4
- package/dist/sync/writers/sqlite-writer.js +1 -1
- package/dist/workers/interfaces.d.ts +2 -2
- package/dist/workers/quality-daemon/git-watcher.d.ts +8 -0
- package/dist/workers/quality-daemon/git-watcher.js +54 -12
- package/dist/workers/quality-daemon/index.js +1 -1
- package/dist/workers/quality-daemon/priority-queue.d.ts +2 -1
- package/dist/workers/workers/defect-predictor.d.ts +9 -4
- package/dist/workers/workers/defect-predictor.js +98 -37
- package/package.json +1 -1
- package/dist/cli/chunks/adapter-OMILP6KH.js +0 -2
- package/dist/cli/chunks/aqe-learning-engine-OXH5CCOS.js +0 -2
- package/dist/cli/chunks/base-MAK2BLTG.js +0 -2
- package/dist/cli/chunks/brain-handler-GCQZFZGQ.js +0 -95
- package/dist/cli/chunks/browser-workflow-IR3VF2TL.js +0 -2
- package/dist/cli/chunks/chunk-4EJLHNER.js +0 -12
- package/dist/cli/chunks/chunk-A4BVDYIL.js +0 -2
- package/dist/cli/chunks/chunk-BE7ZHM34.js +0 -3
- package/dist/cli/chunks/chunk-DHKSPOUQ.js +0 -16
- package/dist/cli/chunks/chunk-FAQ24UHB.js +0 -29
- package/dist/cli/chunks/chunk-IOWEBPXJ.js +0 -5
- package/dist/cli/chunks/chunk-KB34MTFZ.js +0 -3
- package/dist/cli/chunks/chunk-MCXW3DKE.js +0 -8
- package/dist/cli/chunks/chunk-O7VJ3VKD.js +0 -2
- package/dist/cli/chunks/chunk-PIWGKGWP.js +0 -3
- package/dist/cli/chunks/chunk-SFITYZLV.js +0 -7
- package/dist/cli/chunks/chunk-TIVKDIF7.js +0 -2
- package/dist/cli/chunks/client-NO5FOWT4.js +0 -2
- package/dist/cli/chunks/core-handlers-JNAZPXE2.js +0 -2
- package/dist/cli/chunks/cross-domain-router-HEBM767Z.js +0 -2
- package/dist/cli/chunks/daemon-JEBJGEUK.js +0 -18
- package/dist/cli/chunks/dream-GQDCEJMS.js +0 -2
- package/dist/cli/chunks/embed-and-insert-pattern-33KLHDD5.js +0 -3
- package/dist/cli/chunks/file-discovery-33USPLB5.js +0 -2
- package/dist/cli/chunks/heartbeat-scheduler-LIXLC5IH.js +0 -2
- package/dist/cli/chunks/hnsw-adapter-62D5UH27.js +0 -2
- package/dist/cli/chunks/hnsw-index-GSGUMQQC.js +0 -2
- package/dist/cli/chunks/hybrid-backend-FRWP4BOY.js +0 -2
- package/dist/cli/chunks/impact-analyzer-7KF3AQXV.js +0 -2
- package/dist/cli/chunks/init-wizard-XWWAXY25.js +0 -2
- package/dist/cli/chunks/kernel-ZEJPNDBW.js +0 -2
- package/dist/cli/chunks/knowledge-graph-RRZQS7KY.js +0 -2
- package/dist/cli/chunks/llm-router-service-3OSW67LC.js +0 -2
- package/dist/cli/chunks/load-test-7TRIH2WJ.js +0 -2
- package/dist/cli/chunks/memory-backend-G7ZW6Q2B.js +0 -2
- package/dist/cli/chunks/memory-handlers-TPF3KCO5.js +0 -2
- package/dist/cli/chunks/pattern-null-store-OU3ZC3NR.js +0 -2
- package/dist/cli/chunks/project-root-GMOFJEKD.js +0 -2
- package/dist/cli/chunks/protocol-executor-AD345XRO.js +0 -2
- package/dist/cli/chunks/qe-reasoning-bank-NLTP26RC.js +0 -2
- package/dist/cli/chunks/queen-coordinator-2TB4FWS6.js +0 -2
- package/dist/cli/chunks/real-embeddings-II6CXTCI.js +0 -2
- package/dist/cli/chunks/router-PLM3MWME.js +0 -2
- package/dist/cli/chunks/routing-feedback-I7VOX2HU.js +0 -2
- package/dist/cli/chunks/rvf-dual-writer-GQZHFWO2.js +0 -2
- package/dist/cli/chunks/rvf-migration-adapter-3TVKBCAM.js +0 -2
- package/dist/cli/chunks/rvf-migration-coordinator-XUHKLMT6.js +0 -2
- package/dist/cli/chunks/rvf-native-adapter-5GUTYOWS.js +0 -2
- package/dist/cli/chunks/safe-db-RZPQGLGQ.js +0 -2
- package/dist/cli/chunks/schedule-G7JMQDUX.js +0 -2
- package/dist/cli/chunks/scheduler-4SEGPCKD.js +0 -2
- package/dist/cli/chunks/sqlite-persistence-IVE4SQXR.js +0 -2
- package/dist/cli/chunks/sync-PM6D7EQF.js +0 -2
- package/dist/cli/chunks/test-runner-process-72YACW6M.js +0 -2
- package/dist/cli/chunks/token-bootstrap-DJNETMVW.js +0 -2
- package/dist/cli/chunks/tree-sitter-wasm-parser-UVWSDXFR.js +0 -2
- package/dist/cli/chunks/unified-memory-2VMGSGQL.js +0 -2
- package/dist/cli/chunks/unified-memory-hnsw-3KULVD3N.js +0 -2
- package/dist/cli/chunks/unified-persistence-QCSLU2SV.js +0 -2
- package/dist/cli/chunks/visual-security-ZYP2KPH7.js +0 -2
- package/dist/cli/chunks/witness-chain-5QRT7EMX.js +0 -2
- package/dist/cli/chunks/witness-chain-repair-CUF2AFQB.js +0 -2
- package/dist/cli/chunks/workflow-orchestrator-RYDDWIXN.js +0 -2
- package/dist/cli/chunks/wrappers-CYQBOMPL.js +0 -2
|
@@ -1,28 +1,28 @@
|
|
|
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.15.
|
|
2
|
-
import{a as
|
|
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.15.18");process.exit(0)}
|
|
2
|
+
import{a as Qe}from"./chunk-2MBYDPCP.js";import{a as ue,b as ke,c as Fe,d as Le,e as Ve,f as Ue,g as We,h as Ge,i as Ke,j as ze,k as Je,l as Ye,m as Xe,n as Ze,o as et,p as ve,q as tt,r as nt}from"./chunk-LSEC2BU7.js";import{a as Q,b as pe,c as Be,e as He,f as V}from"./chunk-4CVNVBX5.js";import{a as Ne}from"./chunk-UWSJVKTE.js";import"./chunk-2Q6DTBMT.js";import{c as Me}from"./chunk-N3KQU4UC.js";import"./chunk-27TUMXPD.js";import"./chunk-Y4LSEOZ3.js";import"./chunk-X7IQIFTS.js";import"./chunk-YYIJLG7S.js";import"./chunk-OW23N2Y5.js";import"./chunk-YDI56L35.js";import"./chunk-ZFT3RLA4.js";import"./chunk-MZRBNBB3.js";import"./chunk-MSX2OHYT.js";import"./chunk-SRVNR3R3.js";import"./chunk-Z7SD7LXM.js";import"./chunk-QZU6M5IO.js";import"./chunk-LWAFRYKE.js";import"./chunk-YFILS5D5.js";import{b as x,d as de}from"./chunk-MQM37KAR.js";import"./chunk-M24ZAZ4U.js";import"./chunk-JMRDT2XK.js";import"./chunk-4QSQKFED.js";import"./chunk-O5EWFR76.js";import"./chunk-NKU3FFM4.js";import"./chunk-Q7V722K5.js";import"./chunk-KH4T6STG.js";import"./chunk-V2LJ54KP.js";import"./chunk-YP2GHQSV.js";import"./chunk-ZDWD73UF.js";import{a as Oe,b as je,c as Dt,d as D,e as ye}from"./chunk-WJN3V7QB.js";import"./chunk-L2MBKVSE.js";import{a as R,b as $e,e as H}from"./chunk-AWQAE3SW.js";import"./chunk-244RKAEP.js";import{a as xt}from"./chunk-BDVFSMOQ.js";H();H();var k=class{requiresPhases;requiresEnhancements;async shouldRun(e){return!0}async execute(e){let t=Date.now();try{return{success:!0,data:await this.run(e),durationMs:Date.now()-t,message:`${this.description} completed`}}catch(r){return{success:!1,error:$e(r),durationMs:Date.now()-t,message:`${this.description} failed: ${R(r)}`}}}checkDependencies(e){if(!this.requiresPhases?.length)return!0;for(let t of this.requiresPhases)if(!e.results.get(t)?.success)return e.services.warn(`Phase ${this.name} requires ${t} which has not completed`),!1;return!0}checkEnhancements(e){if(!this.requiresEnhancements?.length)return!0;for(let t of this.requiresEnhancements)if(!(t==="claudeFlow"?e.enhancements.claudeFlow:t==="ruvector"?e.enhancements.ruvector:!1))return e.services.warn(`Phase ${this.name} requires ${t} which is not available`),!1;return!0}};de();ye();import{existsSync as O}from"fs";import{join as j}from"path";var U=class extends k{name="detection";description="Detect existing installations";order=10;critical=!0;async run(e){let{projectRoot:t}=e,r=await this.detectV2Installation(t),n=O(j(t,".agentic-qe","config.yaml")),o=r.version?.startsWith("3."),s=r.detected,i=n||o||!1,d=!s&&!i;return e.v2Detection=r,{v2Detected:s,v3Detected:i,freshInstall:d,v2Detection:r}}async detectV2Installation(e){let t=j(e,".agentic-qe","memory.db"),r=j(e,".agentic-qe","config"),n=j(e,".claude","agents"),o=j(e,".agentic-qe","config","learning.json"),s=O(t),i=O(r),d=O(n),p=O(o),l=O(j(e,".agentic-qe","config.yaml")),u,m=!1;return s&&(u=this.readVersionFromDb(t),u?m=u.startsWith("3."):u="2.x.x"),{detected:!m&&s&&(!u?.startsWith("3.")||p&&!l),memoryDbPath:s?t:void 0,configPath:i?r:void 0,agentsPath:d?n:void 0,hasMemoryDb:s,hasConfig:i,hasAgents:d,version:u}}readVersionFromDb(e){try{let t=D(e,{readonly:!0,fileMustExist:!0});try{if(!t.prepare(`
|
|
3
3
|
SELECT name FROM sqlite_master
|
|
4
4
|
WHERE type='table' AND name='kv_store'
|
|
5
5
|
`).get()){t.close();return}let n=t.prepare(`
|
|
6
6
|
SELECT value FROM kv_store
|
|
7
7
|
WHERE key = 'aqe_version' AND namespace = '_system'
|
|
8
|
-
`).get();return t.close(),n?x(n.value):void 0}catch{t.close();return}}catch{return}}};var
|
|
8
|
+
`).get();return t.close(),n?x(n.value):void 0}catch{t.close();return}}catch{return}}};var W=class extends k{name="analysis";description="Analyze project structure";order=20;critical=!0;requiresPhases=["detection"];async run(e){let r=await Fe(e.projectRoot).analyze();return e.analysis=r,e.services.log(` Project: ${r.projectName}`),e.services.log(` Languages: ${r.languages.map(n=>n.name).join(", ")}`),e.services.log(` Frameworks: ${r.frameworks.map(n=>n.name).join(", ")}`),r}};var G=class extends k{name="configuration";description="Generate configuration";order=30;critical=!0;requiresPhases=["analysis"];async run(e){if(!e.analysis)throw new Error("Analysis phase must complete before configuration");let r=Le({minimal:e.options.minimal}).recommend(e.analysis);return r=this.applyOptions(r,e),e.config=r,e.services.log(` Version: ${r.version}`),e.services.log(` Learning: ${r.learning.enabled?"enabled":"disabled"}`),e.services.log(` Workers: ${r.workers.enabled.length}`),r}applyOptions(e,t){let{options:r}=t;return r.minimal&&(e.skills.install=!1,e.learning.pretrainedPatterns=!1,e.workers.enabled=[],e.workers.daemonAutoStart=!1),r.skipPatterns&&(e.learning.pretrainedPatterns=!1),r.wizardAnswers&&(e=this.applyWizardAnswers(e,r.wizardAnswers)),e}applyWizardAnswers(e,t){switch(t["project-type"]&&t["project-type"]!=="auto"&&(e.project.type=t["project-type"]),t["learning-mode"]){case"full":e.learning.enabled=!0,e.learning.embeddingModel="transformer";break;case"basic":e.learning.enabled=!0,e.learning.embeddingModel="hash";break;case"disabled":e.learning.enabled=!1;break}return t["load-patterns"]===!1&&(e.learning.pretrainedPatterns=!1),t.hooks===!1&&(e.hooks.claudeCode=!1),t.workers===!1&&(e.workers.daemonAutoStart=!1),t.skills===!1&&(e.skills.install=!1),e}};import{existsSync as K,mkdirSync as be}from"fs";import{join as z}from"path";H();Dt();var J=class extends k{name="database";description="Initialize persistence database";order=40;critical=!0;requiresPhases=["configuration"];async shouldRun(e){return e.options.memoryBackend!=="memory"}async run(e){let{projectRoot:t}=e,r=z(t,"vectors.db");K(r)&&e.services.log(` \u26A0 Stale vectors.db detected at ${r}
|
|
9
9
|
This file is left over from @ruvector/router (pre-v3.9.6).
|
|
10
10
|
It is no longer read or written by AQE. Safe to delete:
|
|
11
|
-
rm "${
|
|
11
|
+
rm "${r}"`);let n=z(t,".agentic-qe");K(n)||be(n,{recursive:!0});let o=z(n,"workers");K(o)||be(o,{recursive:!0});let s=z(n,"data");K(s)||be(s,{recursive:!0});let i=z(n,"memory.db"),d=!K(i);try{let{initializeUnifiedMemory:p,resetUnifiedMemory:l}=await import("./unified-memory-GUR3IUI6.js"),u=await p({dbPath:i,walMode:!0,busyTimeout:5e3}),y=u.getStats().tables.map(B=>B.name);await u.kvSet("_init_marker",{initialized:new Date().toISOString(),projectRoot:t,version:ue()},"_system");let S=u.getDatabase().prepare("SELECT version FROM schema_version WHERE id = 1").get()?.version??0;return l(),e.services.log(` Database: ${i}`),e.services.log(` Schema version: v${S}`),e.services.log(` Tables: ${y.length} (v3 full schema)`),{dbPath:i,created:d,tablesCreated:y,schemaVersion:S}}catch(p){throw je(p)?new Error(`SQLite persistence initialization FAILED: ${R(Oe(p))}`,{cause:p}):new Error(`SQLite persistence initialization FAILED: ${p}
|
|
12
12
|
Database path: ${i}
|
|
13
|
-
Ensure the directory is writable and has sufficient disk space.`)}}};import{existsSync as me,mkdirSync as we,writeFileSync as
|
|
13
|
+
Ensure the directory is writable and has sufficient disk space.`)}}};import{existsSync as me,mkdirSync as we,writeFileSync as Tt}from"fs";import{join as T}from"path";var Y=class extends k{name="learning";description="Initialize learning system";order=50;critical=!1;requiresPhases=["database","configuration"];async shouldRun(e){return e.options.memoryBackend==="memory"?!1:e.config?.learning?.enabled??!0}async run(e){let t=e.config,{projectRoot:r,options:n}=e;if(!t.learning.enabled)return{enabled:!1,dataDir:"",hnswDir:"",patternsLoaded:0};let o=T(r,".agentic-qe","data");me(o)||we(o,{recursive:!0});let s=T(o,"hnsw");me(s)||we(s,{recursive:!0});let i=T(o,"learning-config.json"),d={embeddingModel:t.learning.embeddingModel,hnswConfig:t.learning.hnswConfig,qualityThreshold:t.learning.qualityThreshold,promotionThreshold:t.learning.promotionThreshold,databasePath:T(o,"memory.db"),hnswIndexPath:T(s,"index.bin"),initialized:new Date().toISOString()};V(i,d,[["initialized"]]);let p=0;return t.learning.pretrainedPatterns&&!n.skipPatterns&&(p=await this.loadPretrainedPatterns(o,e)),e.services.log(` Data dir: ${o}`),e.services.log(` HNSW dir: ${s}`),e.services.log(` Patterns loaded: ${p}`),{enabled:!0,dataDir:o,hnswDir:s,patternsLoaded:p}}async loadPretrainedPatterns(e,t){try{let r=T(e,"patterns");me(r)||we(r,{recursive:!0});let n=T(r,"index.json");return me(n)||Tt(n,JSON.stringify({version:ue(),domains:[],loadedAt:new Date().toISOString()},null,2),"utf-8"),0}catch(r){return t.services.warn(`Could not load pre-trained patterns: ${r}`),0}}};de();ye();import{existsSync as qt,statSync as $t}from"fs";import{join as fe}from"path";var rt=3e4,st=18e4,ot=["**/node_modules/**","**/dist/**","**/build/**","**/out/**","**/coverage/**","**/.agentic-qe/**","**/.git/**","**/.next/**","**/.nuxt/**","**/.output/**","**/__pycache__/**","**/.pytest_cache/**","**/target/**","**/vendor/**","**/.venv/**","**/venv/**","**/.tox/**","**/*.min.js","**/*.min.css","**/*.bundle.js","**/*.map","**/package-lock.json","**/yarn.lock","**/pnpm-lock.yaml","**/Pipfile.lock","**/poetry.lock","**/.env","**/.env.*"],X=class extends k{name="code-intelligence";description="Code intelligence pre-scan";order=60;critical=!1;requiresPhases=["database"];async shouldRun(e){if(e.options.memoryBackend==="memory")return e.services.log(" Code intelligence skipped (database-free mode)"),!1;let t=process.env.AQE_SKIP_CODE_INDEX;return t==="1"||t==="true"?(e.services.log(" Code intelligence skipped (AQE_SKIP_CODE_INDEX=1)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):e.options.skipCodeIndex?(e.services.log(" Code intelligence skipped (--skip-code-index)"),e.services.log(" Run `aqe code index` later to build the KG on demand."),!1):!0}async run(e){let{projectRoot:t}=e,r=fe(t,".agentic-qe","memory.db");if(!qt(r))return e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let n=D(r);try{if(!this.checkCodeIntelligenceIndex(n))return n.close(),e.services.log(" Building knowledge graph..."),await this.runCodeIntelligenceScan(t,e,!1);let s=this.getLastIndexedAt(n);if(!s){let p=this.getKGEntryCount(n);return n.close(),e.services.log(` Using existing index (${p} entries)`),{status:"existing",entries:p}}let i=this.getKGEntryCount(n);n.close();let d=await this.findChangedFiles(t,s);return d.length===0?(e.services.log(` Index up to date (${i} entries)`),{status:"existing",entries:i}):(e.services.log(` Delta scan: ${d.length} files changed since last index...`),await this.runCodeIntelligenceScan(t,e,!0,d))}catch(o){try{n.close()}catch{}throw o}}checkCodeIntelligenceIndex(e){try{return e.prepare(`
|
|
14
14
|
SELECT COUNT(*) as count FROM kv_store
|
|
15
15
|
WHERE namespace = 'code-intelligence:kg'
|
|
16
16
|
`).get().count>0}catch{return!1}}getKGEntryCount(e){try{return e.prepare(`
|
|
17
17
|
SELECT COUNT(*) as count FROM kv_store
|
|
18
18
|
WHERE namespace LIKE 'code-intelligence:kg%'
|
|
19
|
-
`).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,
|
|
19
|
+
`).get().count}catch{return 0}}async runCodeIntelligenceScan(e,t,r,n){let{KnowledgeGraphService:o}=await import("./knowledge-graph-CNL77CSZ.js"),s=fe(e,".agentic-qe","memory.db"),i={type:"sqlite",sqlite:{path:s,walMode:!0}},{backend:d}=await Qe(i,!0),p=new o(d,{namespace:"code-intelligence:kg",enableVectorEmbeddings:!0,projectRoot:e});try{let l;if(n)l=n;else{let{glob:m}=await import("tinyglobby");l=(await m(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:ot,expandDirectories:!1})).map(g=>fe(e,g))}t.services.log(` Scanning ${l.length} source files...`);let u=await this.runBoundedScan(p,l,r,t);if(u.status==="timeout")return t.services.warn(` \u26A0 Code intelligence pre-scan exceeded ${st/1e3}s phase cap. Indexed ${u.entries} entries before timeout. Last file: ${u.timeoutFile??"(unknown)"}. Init is continuing \u2014 re-run 'aqe code index' later, or report this file to https://github.com/proffesor-for-testing/agentic-qe/issues.`),u;if(u.status==="indexed"){let m=r?"Delta indexed":"Indexed";t.services.log(` ${m} ${u.entries} entries to ${s}`),await this.buildHypergraph(s,l,t)}return u}finally{try{p.destroy()}catch{}try{await d.dispose()}catch{}}}async runBoundedScan(e,t,r,n){let o=0,s=0,i=0,d="",p=Date.now(),l=!1;r||await e.clear();let u=n.projectRoot,m=g=>g.startsWith(u)?g.slice(u.length+1):g;for(let g of t){if(Date.now()-p>st){l=!0;break}d=g,n.services.log(` [${i+1}/${t.length}] ${m(g)}`);try{let b=await this.withTimeout(e.index({paths:[g],incremental:!0,includeTests:!0}),rt,g);b.success&&(o+=b.value.nodesCreated,s+=b.value.edgesCreated)}catch(b){let S=b instanceof Error?b.message:String(b);S.startsWith("AQE_PER_FILE_TIMEOUT")?n.services.warn(` \u26A0 Skipped ${m(g)} \u2014 indexing exceeded ${rt/1e3}s`):n.services.warn(` \u26A0 Failed to index ${m(g)}: ${S}`)}i++}let y=o+s;return l?{status:"timeout",entries:y,timeoutFile:d}:{status:"indexed",entries:y}}withTimeout(e,t,r){return new Promise((n,o)=>{let s=setTimeout(()=>{o(new Error(`AQE_PER_FILE_TIMEOUT: ${r}`))},t);typeof s.unref=="function"&&s.unref(),e.then(i=>{clearTimeout(s),n(i)},i=>{clearTimeout(s),o(i)})})}async buildHypergraph(e,t,r){try{let{extractCodeIndex:n}=await import("./code-index-extractor-2FID75YV.js"),{createHypergraphEngine:o}=await import("./hypergraph-engine-6BYNJQEP.js"),s=D(e),i=await o({db:s,maxTraversalDepth:10,maxQueryResults:1e3,enableVectorSearch:!1}),d=await n(t),p=await i.buildFromIndexResult(d);s.close(),p.nodesCreated+p.edgesCreated>0&&r.services.log(` Hypergraph: ${p.nodesCreated} nodes, ${p.edgesCreated} edges`)}catch(n){r.services.warn?.(` Hypergraph build skipped: ${n}`)}}getLastIndexedAt(e){try{let t=e.prepare(`
|
|
20
20
|
SELECT value FROM kv_store
|
|
21
21
|
WHERE namespace = 'code-intelligence:kg'
|
|
22
22
|
AND key = 'metadata:index'
|
|
23
|
-
`).get();if(!t)return null;let
|
|
24
|
-
`);M(
|
|
25
|
-
`),"utf-8")}let o=v(e,"v3-domain-workers.json");w(o)||M(o,JSON.stringify({version:"3.0",workers:[{name:"pattern-consolidator",interval:"5m",enabled:!0},{name:"routing-accuracy-monitor",interval:"10m",enabled:!0},{name:"coverage-gap-scanner",interval:"15m",enabled:!0},{name:"flaky-test-detector",interval:"30m",enabled:!0}]},null,2),"utf-8")}hasExistingAqeHooks(e){for(let t of Object.values(e))if(Array.isArray(t)){for(let
|
|
23
|
+
`).get();if(!t)return null;let r=x(t.value);if(!r.indexedAt)return null;let n=new Date(r.indexedAt);return isNaN(n.getTime())?null:n}catch{return null}}async findChangedFiles(e,t){let{glob:r}=await import("tinyglobby"),n=await r(["**/*.ts","**/*.tsx","**/*.js","**/*.jsx","**/*.py"],{cwd:e,ignore:ot,expandDirectories:!1}),o=t.getTime(),s=[];for(let i of n){let d=fe(e,i);try{$t(d).mtimeMs>o&&s.push(d)}catch{}}return s}};de();import{existsSync as w,mkdirSync as Z,readFileSync as it,writeFileSync as M}from"fs";import{join as v,dirname as Ot}from"path";import{fileURLToPath as jt}from"url";var Mt=jt(import.meta.url),at=Ot(Mt),Nt=[["aqe","initialized"]],ee=class extends k{name="hooks";description="Configure Claude Code hooks";order=70;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.options.noClaude?(e.services.log(" Hooks skipped (--no-claude)"),!1):e.config?.hooks?.claudeCode??!0}async run(e){let t=e.config,{projectRoot:r}=e;if(!t.hooks.claudeCode)return{configured:!1,settingsPath:"",hookTypes:[],existingAqeDetected:!1};let n=v(r,".claude");w(n)||Z(n,{recursive:!0});let o=v(n,"hooks");w(o)||Z(o,{recursive:!0});let s=v(n,"settings.json"),i={},d;if(w(s))try{let P=it(s,"utf-8");i=x(P),d=x(P)}catch{i={}}let p=this.generateHooksConfig(t,r),l=Object.keys(p),u=i.hooks||{},m=this.hasExistingAqeHooks(u);m&&e.services.log(" Detected existing AQE hooks \u2014 replacing with updated config"),i.hooks=We(u,p);let y=i.env,g={memoryBackend:e.options.memoryBackend};i.env=Ge(y,Ke(t,g),g);let b=Xe(t,r,g);Ye(i,b,{statusLine:!e.options.noStatusLine,...g});let S=i.enabledMcpjsonServers||[];if(S=S.filter(P=>P!=="aqe"),S.includes("agentic-qe")||S.push("agentic-qe"),i.enabledMcpjsonServers=S,He(d,i,Nt)){let P=Ve(s);P&&e.services.log(` Backup created: ${P}`),M(s,JSON.stringify(i,null,2),"utf-8")}else e.services.log(" Settings unchanged \u2014 .claude/settings.json left as-is");this.writeHooksReadme(o,l),this.installHookAssets(o,e);try{let P=it(s,"utf-8"),E=x(P).hooks;(!E||!this.hasExistingAqeHooks(E))&&e.services.log(" WARNING: settings.json written but AQE hooks not detected \u2014 check settings-merge logic")}catch{e.services.log(" WARNING: Could not verify settings.json after write")}return e.services.log(` Settings: ${s}`),e.services.log(` Hooks dir: ${o}`),e.services.log(` Hook types: ${l.join(", ")}`),{configured:!0,settingsPath:s,hookTypes:l,existingAqeDetected:m}}writeHooksReadme(e,t){let r=v(e,"README.txt");if(w(r))return;let n=["AQE Hooks Directory","====================","","Claude Code hooks are configured in .claude/settings.json (not as files here).","This directory contains supporting infrastructure for the learning system.","","Configured hook types: "+t.join(", "),"","Files:"," settings.json \u2014 Hook definitions (in parent .claude/ directory)"," helpers/brain-checkpoint.cjs \u2014 Auto-exports brain to aqe.rvf on session end"," cross-phase-memory.yaml \u2014 QCSD feedback loop configuration","","Manual testing:"," npx agentic-qe hooks session-start --session-id test --json",' npx agentic-qe hooks route --task "generate tests" --json'," npx agentic-qe hooks post-edit --file src/example.ts --success --json",""].join(`
|
|
24
|
+
`);M(r,n,"utf-8")}installHookAssets(e,t){let{projectRoot:r}=t;this.installBrainCheckpoint(r,t),this.installStatusline(r,t),this.installHookShim(r,t);let n=v(e,"cross-phase-memory.yaml");if(!w(n)){let s=[v(r,"v3","assets","hooks","cross-phase-memory.yaml"),v(r,"assets","hooks","cross-phase-memory.yaml"),v(r,"node_modules","agentic-qe","v3","assets","hooks","cross-phase-memory.yaml")],i=!1;for(let d of s)if(w(d)){let{copyFileSync:p}=xt("fs");p(d,n),t.services.log(" Installed cross-phase memory config"),i=!0;break}i||M(n,["# Cross-Phase Memory Hooks Configuration","# Generated by aqe init",'version: "1.0"',"enabled: true",""].join(`
|
|
25
|
+
`),"utf-8")}let o=v(e,"v3-domain-workers.json");w(o)||M(o,JSON.stringify({version:"3.0",workers:[{name:"pattern-consolidator",interval:"5m",enabled:!0},{name:"routing-accuracy-monitor",interval:"10m",enabled:!0},{name:"coverage-gap-scanner",interval:"15m",enabled:!0},{name:"flaky-test-detector",interval:"30m",enabled:!0}]},null,2),"utf-8")}hasExistingAqeHooks(e){for(let t of Object.values(e))if(Array.isArray(t)){for(let r of t)if(Ue(r))return!0}return!1}installBrainCheckpoint(e,t){let r=v(e,".claude","helpers");w(r)||Z(r,{recursive:!0});let n=v(r,"brain-checkpoint.cjs"),o=[v(e,".claude","helpers","brain-checkpoint.cjs"),v(e,"node_modules","agentic-qe",".claude","helpers","brain-checkpoint.cjs"),v(at,"..","..","..",".claude","helpers","brain-checkpoint.cjs")];for(let s of o)if(w(s)&&s!==n){pe(s,n)&&t.services.log(" Installed brain-checkpoint.cjs (copied)");return}w(n)||(M(n,this.generateBrainCheckpointScript(),"utf-8"),t.services.log(" Installed brain-checkpoint.cjs (generated)"))}installStatusline(e,t){let r=v(e,".claude","helpers");w(r)||Z(r,{recursive:!0});let n=v(r,"statusline-v3.cjs"),o=[v(e,"node_modules","agentic-qe","assets","helpers","statusline-v3.cjs"),v(e,"assets","helpers","statusline-v3.cjs")];for(let s of o)if(w(s)&&s!==n){pe(s,n)&&t.services.log(" Installed statusline-v3.cjs (copied)");return}w(n)||(M(n,this.generateMinimalStatuslineScript(),"utf-8"),t.services.log(" Installed statusline-v3.cjs (generated)"))}installHookShim(e,t){let r=v(e,".claude","hooks");w(r)||Z(r,{recursive:!0});let n=v(r,"aqe-hook.cjs"),o=[v(e,"node_modules","agentic-qe",".claude","hooks","aqe-hook.cjs"),v(at,"..","..","..",".claude","hooks","aqe-hook.cjs")];for(let s of o)if(w(s)&&s!==n){pe(s,n)&&t.services.log(" Installed aqe-hook.cjs (copied)");return}w(n)||t.services.log(" \u26A0 aqe-hook.cjs source not found \u2014 lifecycle hooks cannot run until AQE is reinstalled")}generateMinimalStatuslineScript(){return`#!/usr/bin/env node
|
|
26
26
|
/**
|
|
27
27
|
* Agentic QE v3 Statusline (minimal fallback, generated by aqe init)
|
|
28
28
|
* For the full statusline, reinstall: npx agentic-qe init --auto
|
|
@@ -74,6 +74,15 @@ const MAX_AGE_HOURS = 24;
|
|
|
74
74
|
const SKIP_PATH = path.join(AQE_DIR, 'brain-checkpoint.skip.json');
|
|
75
75
|
const RETRY_ENV = Number.parseFloat(process.env.AQE_BRAIN_CHECKPOINT_RETRY_HOURS || '');
|
|
76
76
|
const TOO_LARGE_RETRY_HOURS = Number.isFinite(RETRY_ENV) && RETRY_ENV >= 0 ? RETRY_ENV : 6;
|
|
77
|
+
// #1251: refuse an export in which a table collapsed; a deliberate shrink
|
|
78
|
+
// (aqe learning prune --apply, dream retention) leaves this acknowledgement,
|
|
79
|
+
// which the CLI honours once, within 24h, while the brain holds its counts.
|
|
80
|
+
const SHRINK_ACK_PATH = path.join(AQE_DIR, 'brain-checkpoint.accept-shrink.json');
|
|
81
|
+
const SHRINK_ACK_MAX_AGE_HOURS = 24;
|
|
82
|
+
const MIRROR_REFUSAL = /RVF_MIRROR_(?:RICHER|INSPECTION_AMBIGUOUS):[^\\n]*/;
|
|
83
|
+
const SHRINK_ACK_VERDICT = /SHRINK_ACK_(HONOURED|IGNORED): ([^\\n]*)/;
|
|
84
|
+
// An older global aqe rejects the #1251 flags: back off rather than fail every turn.
|
|
85
|
+
const OUTDATED_CLI = /unknown option '(--(?:compare-with|richness-policy|accept-shrink))'/;
|
|
77
86
|
// Windows (#872): never execFile aqe.cmd (EINVAL without a shell); reuse the
|
|
78
87
|
// hook shim's resolver, which runs the AQE bundle via node instead.
|
|
79
88
|
function aqeInvocation() {
|
|
@@ -107,6 +116,42 @@ function activeSkip() {
|
|
|
107
116
|
return skip;
|
|
108
117
|
}
|
|
109
118
|
|
|
119
|
+
function dropShrinkAck(why) {
|
|
120
|
+
try { fs.unlinkSync(SHRINK_ACK_PATH); } catch { /* best-effort */ }
|
|
121
|
+
log('Ignored the shrink acknowledgement (' + why + '); the normal checkpoint policy applies.');
|
|
122
|
+
}
|
|
123
|
+
// The deliberate-shrink acknowledgement, or null; drops one that is unreadable,
|
|
124
|
+
// over 24h old or older than aqe.rvf. The CLI checks its counts (--accept-shrink).
|
|
125
|
+
function pendingShrinkAck() {
|
|
126
|
+
let st; try { st = fs.lstatSync(SHRINK_ACK_PATH); } catch { return null; }
|
|
127
|
+
let ack = null;
|
|
128
|
+
if (st.isFile()) { try { ack = JSON.parse(fs.readFileSync(SHRINK_ACK_PATH, 'utf8')); } catch { /* unreadable */ } }
|
|
129
|
+
const at = ack ? Date.parse(ack.at) : NaN;
|
|
130
|
+
let rvfMtime = 0; try { rvfMtime = fs.lstatSync(RVF_PATH).mtimeMs; } catch { /* absent */ }
|
|
131
|
+
let why = null;
|
|
132
|
+
if (!Number.isFinite(at)) why = 'unreadable';
|
|
133
|
+
else if (Date.now() - at > SHRINK_ACK_MAX_AGE_HOURS * 3600000) why = 'older than 24h';
|
|
134
|
+
else if (rvfMtime > at) why = 'already checkpointed';
|
|
135
|
+
if (why) { dropShrinkAck(why); return null; }
|
|
136
|
+
return { at, producer: String(ack.producer) };
|
|
137
|
+
}
|
|
138
|
+
// The CLI's verdict on the acknowledgement: its producer when honoured. No
|
|
139
|
+
// verdict (the export failed first) keeps it for the next turn.
|
|
140
|
+
function settleShrinkAck(output) {
|
|
141
|
+
const verdict = String(output || '').match(SHRINK_ACK_VERDICT);
|
|
142
|
+
if (!verdict) return null;
|
|
143
|
+
if (verdict[1] === 'IGNORED') { dropShrinkAck(verdict[2].trim()); return null; }
|
|
144
|
+
return verdict[2].trim();
|
|
145
|
+
}
|
|
146
|
+
function resumeHint(skip) {
|
|
147
|
+
return MIRROR_REFUSAL.test(skip.reason)
|
|
148
|
+
? 'To resume now, back up aqe.rvf and run \`aqe brain export -o .agentic-qe/aqe.rvf --force-overwrite-richer\`, '
|
|
149
|
+
+ 'or delete .agentic-qe/brain-checkpoint.skip.json to retry.'
|
|
150
|
+
: skip.reason.includes('upgrade to enable the checkpoint guard')
|
|
151
|
+
? 'Upgrade the global aqe (npm i -g agentic-qe), then delete .agentic-qe/brain-checkpoint.skip.json.'
|
|
152
|
+
: 'To retry now, delete .agentic-qe/brain-checkpoint.skip.json.';
|
|
153
|
+
}
|
|
154
|
+
|
|
110
155
|
function writeSkip(reason) {
|
|
111
156
|
const at = new Date();
|
|
112
157
|
const skip = { reason, at: at.toISOString(), retryAfter: new Date(at.getTime() + TOO_LARGE_RETRY_HOURS * 3600000).toISOString() };
|
|
@@ -149,6 +194,17 @@ function promote(tmp) {
|
|
|
149
194
|
}
|
|
150
195
|
}
|
|
151
196
|
|
|
197
|
+
// Version of the installed aqe, for the outdated-CLI back-off.
|
|
198
|
+
function aqeVersion(aqe) {
|
|
199
|
+
try {
|
|
200
|
+
const out = execFileSync(aqe.cmd, [...aqe.args, '--version'],
|
|
201
|
+
{ timeout: 10000, encoding: 'utf-8', windowsHide: true, stdio: ['ignore', 'pipe', 'ignore'] });
|
|
202
|
+
return out.trim().split(/\\s+/).pop() || 'unknown';
|
|
203
|
+
} catch {
|
|
204
|
+
return 'unknown';
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
152
208
|
function exportBrain() {
|
|
153
209
|
if (!fs.existsSync(DB_PATH)) { log('No memory.db, skipping'); return { exported: false }; }
|
|
154
210
|
const aqe = aqeInvocation();
|
|
@@ -156,17 +212,22 @@ function exportBrain() {
|
|
|
156
212
|
// Never write through a committed symlink: .agentic-qe must be a real dir.
|
|
157
213
|
let st; try { st = fs.lstatSync(AQE_DIR); } catch { /* missing */ }
|
|
158
214
|
if (!st || !st.isDirectory()) { log('Export skipped: .agentic-qe is a symlink'); return { exported: false }; }
|
|
215
|
+
const ack = pendingShrinkAck();
|
|
159
216
|
const skip = activeSkip();
|
|
160
|
-
|
|
161
|
-
|
|
217
|
+
// A shrink acknowledged after the back-off began is the answer to it.
|
|
218
|
+
if (skip && !(ack && ack.at > Date.parse(skip.at))) {
|
|
219
|
+
// Logged once, when the back-off began; session-start verify reports it.
|
|
162
220
|
return { exported: false, skipped: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
163
221
|
}
|
|
164
222
|
sweepStaleTmp();
|
|
165
223
|
const tmp = path.join(AQE_DIR, TMP_PREFIX + process.pid + '-' + crypto.randomBytes(4).toString('hex'));
|
|
166
224
|
try {
|
|
167
225
|
for (const suffix of ['', ...RVF_SIDECARS]) removeEntry(tmp + suffix);
|
|
226
|
+
const args = [...aqe.args, 'brain', 'export', '-o', tmp, '--format', 'rvf'];
|
|
227
|
+
if (lexists(RVF_PATH)) args.push('--compare-with', RVF_PATH, '--richness-policy', 'checkpoint');
|
|
228
|
+
if (ack) args.push('--accept-shrink', SHRINK_ACK_PATH);
|
|
168
229
|
const result = execFileSync(
|
|
169
|
-
aqe.cmd,
|
|
230
|
+
aqe.cmd, args,
|
|
170
231
|
{ timeout: 60000, encoding: 'utf-8', windowsHide: true, stdio: ['ignore', 'pipe', 'pipe'] }
|
|
171
232
|
);
|
|
172
233
|
// A zero exit without a store is a failure, not an empty checkpoint.
|
|
@@ -175,9 +236,30 @@ function exportBrain() {
|
|
|
175
236
|
const m = result.match(/Patterns:\\s+(\\d+)/);
|
|
176
237
|
const p = m ? m[1] : '0';
|
|
177
238
|
log('Exported ' + p + ' patterns to aqe.rvf');
|
|
178
|
-
|
|
239
|
+
const accepted = ack ? settleShrinkAck(result) : null;
|
|
240
|
+
if (!accepted) return { exported: true, patterns: parseInt(p) };
|
|
241
|
+
try { removeEntry(SHRINK_ACK_PATH); removeEntry(SKIP_PATH); } catch { /* spent: older than aqe.rvf now */ }
|
|
242
|
+
log('Accepted the smaller brain (' + accepted + ')');
|
|
243
|
+
return { exported: true, patterns: parseInt(p), acceptedShrink: accepted };
|
|
179
244
|
} catch (e) {
|
|
180
|
-
const
|
|
245
|
+
const output = String(e.stderr || '') + String(e.stdout || '');
|
|
246
|
+
if (ack) settleShrinkAck(e.stdout);
|
|
247
|
+
const outdated = output.match(OUTDATED_CLI);
|
|
248
|
+
if (outdated) {
|
|
249
|
+
const skip = writeSkip('installed aqe ' + aqeVersion(aqe) + ' lacks ' + outdated[1] + '; upgrade to enable the checkpoint guard');
|
|
250
|
+
log('Export skipped, previous aqe.rvf kept: ' + skip.reason);
|
|
251
|
+
log('Skipping the checkpoint export until ' + skip.retryAfter + ' (logged once).');
|
|
252
|
+
return { exported: false, outdatedCli: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
253
|
+
}
|
|
254
|
+
const refused = output.match(MIRROR_REFUSAL);
|
|
255
|
+
if (refused) {
|
|
256
|
+
const skip = writeSkip(refused[0].trim());
|
|
257
|
+
log('Export refused, previous aqe.rvf kept: ' + skip.reason);
|
|
258
|
+
log('Skipping the checkpoint export until ' + skip.retryAfter + ' (logged once). If the smaller brain is '
|
|
259
|
+
+ 'intended, back up aqe.rvf and run: aqe brain export -o .agentic-qe/aqe.rvf --force-overwrite-richer');
|
|
260
|
+
return { exported: false, richer: true, reason: skip.reason, retryAfter: skip.retryAfter };
|
|
261
|
+
}
|
|
262
|
+
const tooLarge = output.match(/RVF_KERNEL_TOO_LARGE:[^\\n]*/);
|
|
181
263
|
if (tooLarge) {
|
|
182
264
|
const skip = writeSkip(tooLarge[0].trim());
|
|
183
265
|
log('Export failed: ' + skip.reason);
|
|
@@ -195,27 +277,32 @@ function verifyBrain() {
|
|
|
195
277
|
if (!fs.existsSync(RVF_PATH)) {
|
|
196
278
|
const skip = activeSkip();
|
|
197
279
|
if (skip) {
|
|
198
|
-
log('No aqe.rvf found; checkpoint export paused until ' + skip.retryAfter + ': ' + skip.reason);
|
|
199
|
-
return { valid: false, reason: 'missing', skippedUntil: skip.retryAfter };
|
|
280
|
+
log('No aqe.rvf found; checkpoint export paused until ' + skip.retryAfter + ': ' + skip.reason + ' ' + resumeHint(skip));
|
|
281
|
+
return { valid: false, reason: 'missing', skippedUntil: skip.retryAfter, resumeHint: resumeHint(skip) };
|
|
200
282
|
}
|
|
201
283
|
log('No aqe.rvf found');
|
|
202
284
|
return { valid: false, reason: 'missing' };
|
|
203
285
|
}
|
|
204
286
|
const stat = fs.statSync(RVF_PATH);
|
|
287
|
+
const paused = activeSkip();
|
|
288
|
+
if (paused) log('Checkpoint export paused until ' + paused.retryAfter + ': ' + paused.reason + ' ' + resumeHint(paused));
|
|
289
|
+
const pause = paused
|
|
290
|
+
? { pausedUntil: paused.retryAfter, pauseReason: paused.reason, resumeHint: resumeHint(paused) }
|
|
291
|
+
: {};
|
|
205
292
|
const ageH = (Date.now() - stat.mtimeMs) / 3600000;
|
|
206
|
-
if (stat.size < 1024) { log('aqe.rvf too small'); return { valid: false, reason: 'too-small' }; }
|
|
207
|
-
if (ageH > MAX_AGE_HOURS) { log('aqe.rvf is ' + ageH.toFixed(1) + 'h old'); return { valid: true, stale: true }; }
|
|
293
|
+
if (stat.size < 1024) { log('aqe.rvf too small'); return { valid: false, reason: 'too-small', ...pause }; }
|
|
294
|
+
if (ageH > MAX_AGE_HOURS) { log('aqe.rvf is ' + ageH.toFixed(1) + 'h old'); return { valid: true, stale: true, ...pause }; }
|
|
208
295
|
log('aqe.rvf OK (' + (stat.size/1048576).toFixed(1) + ' MB)');
|
|
209
|
-
return { valid: true, stale: false };
|
|
296
|
+
return { valid: true, stale: false, ...pause };
|
|
210
297
|
}
|
|
211
298
|
|
|
212
299
|
const cmd = process.argv[2] || 'verify';
|
|
213
300
|
const result = cmd === 'export' ? exportBrain() : verifyBrain();
|
|
214
301
|
if (process.argv.includes('--json')) process.stdout.write(JSON.stringify(result));
|
|
215
|
-
`}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:10,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json'`,timeout:5,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json'`,timeout:60,continueOnError:!0}]}]}}};import{existsSync as Nt,readFileSync as Lt}from"fs";de();import{join as lt}from"path";var te=class extends k{constructor(t=s=>Ze(s)){super();this.detectPlugin=t}detectPlugin;name="mcp";description="Configure MCP server";order=80;critical=!1;requiresPhases=["configuration","database"];async run(t){let{projectRoot:s}=t;if(t.options.noClaude)return t.services.log(" MCP: skipped (--no-claude \u2014 .mcp.json is the Claude Code surface)"),{configured:!1,mcpPath:"",serverName:""};if(t.options.noMcp)return t.services.log(" MCP: skipped (--no-mcp)"),t.services.log(" CLI commands available: aqe memory, aqe test, aqe coverage, etc."),{configured:!1,mcpPath:"",serverName:""};if(!t.options.withMcp){let l=this.detectPlugin(s);if(l.enabled)return t.services.log(et(s)),ct(t,Je(lt(s,".mcp.json"))),{configured:!1,mcpPath:"",serverName:"",skippedForPlugin:l.pluginKey}}let n=t.options.memoryBackend==="memory",r={command:"aqe-mcp",args:[],env:n?{AQE_MEMORY_BACKEND:"memory",AQE_LEARNING_ENABLED:"false",AQE_WORKERS_ENABLED:"false",NODE_ENV:"production"}:{AQE_LEARNING_ENABLED:"true",AQE_WORKERS_ENABLED:"true",NODE_ENV:"production"}},i=lt(s,".mcp.json"),d={};if(Nt(i))try{let l=Lt(i,"utf-8");d=x(l)}catch{d={}}d.mcpServers||(d.mcpServers={});let p=d.mcpServers;return ct(t,ze(p)),p["agentic-qe"]=r,V(i,JSON.stringify(d,null,2)),t.services.log(` MCP config: ${i}`),t.services.log(" Server: agentic-qe"),n?(t.services.log(" Memory backend: in-memory (database-free)"),t.services.log(" Learning: disabled (db-free)"),t.services.log(" Workers: disabled (db-free)")):(t.services.log(" Learning: enabled"),t.services.log(" Workers: enabled")),{configured:!0,mcpPath:i,serverName:"agentic-qe"}}};function ct(c,e){e.length>0&&c.services.log(` MCP: removed server entry launching @anthropics/agentic-qe: ${e.join(", ")}`)}import{existsSync as A,readFileSync as Jt,readdirSync as Yt}from"fs";import{join as _}from"path";import{createHash as Bt}from"crypto";import{constants as Qt,copyFileSync as dt,existsSync as Ce,lstatSync as Pe,readFileSync as pt,realpathSync as mt,unlinkSync as Vt}from"fs";import{dirname as ft,join as Ee,sep as Wt}from"path";var ne=".claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery",Se="qe-court/evals/fixtures/seeded-mutant-delivery",ut=".claude/skills/testability-scoring/resources/templates",Ht="testability-scoring/resources/templates",Gt=Object.freeze([{id:"qe-court-seeded-mutant",retired:[{relPath:`${ne}/budget.test.ts`,shippedSha256:["add1ff4cb05978c136f8c2c5cc50059d920f06f409e5f6f304239b7dad3cf65d"]},{relPath:`${ne}/budget.ts`,shippedSha256:["11fc97cad19bb4fc0d31151a6d216ab99d0df0521b60be8fb19581d412147ef6"]}],replacements:[{relPath:`${ne}/budget-tests.ts.fixture`,source:`${Se}/budget-tests.ts.fixture`},{relPath:`${ne}/budget.ts.fixture`,source:`${Se}/budget.ts.fixture`}],refresh:[{relPath:`${ne}/README.md`,source:`${Se}/README.md`,previousSha256:["d3988b92856d0023a7ae210dce3e0bdf76204f41d635fd29f7e243c168ff6109"]},{relPath:".claude/skills/qe-court/evals/qe-court.yaml",source:"qe-court/evals/qe-court.yaml",previousSha256:["412899013a51a099224bad04491d49dca19f2c567c5599adedabd0e1d58556c7","27c8be547dc032e2dbe488156dd7a30f79b1cc921fe92efec5b9bb0a151f0e9b"]}],advice:"3.15.6 renamed the qe-court seeded-mutant fixture to budget.ts.fixture / budget-tests.ts.fixture because budget.test.ts matches test-runner globs, so your vitest/jest collects it (#1017). The pair was left as is; delete or rename both files if you do not want your test runner to collect it"},{id:"testability-scoring-spec-template",retired:[{relPath:`${ut}/testability-scoring.spec.template.js`,shippedSha256:["e85a3e25bb458f3d090834e121b02e8db83cdc589149b5cf7549853e1a067edf"]}],replacements:[{relPath:`${ut}/testability-scoring-spec.template.js`,source:`${Ht}/testability-scoring-spec.template.js`}],refresh:[],advice:"3.15.6 renamed it to testability-scoring-spec.template.js because its name matches the `*.spec.*` test glob (#1017); delete or rename it if your test runner should not collect it"}]);function gt(c){return Bt("sha256").update(c).digest("hex")}function Re(c,e){let t;try{t=mt(ft(e))}catch{return!1}return t===c||t.startsWith(c+Wt)}function Ut(c,e,t,s){let n;try{n=Pe(e)}catch{return{state:"absent"}}if(!Re(c,e))return{state:"blocked",why:`${t} resolves outside the project (symlinked directory)`};if(!n.isFile())return{state:"blocked",why:`${t} is not a regular file`};try{if(!s.includes(gt(pt(e))))return{state:"blocked",why:`${t} was modified since AQE installed it`}}catch(o){return{state:"blocked",why:`${t} is unreadable (${o instanceof Error?o.message:String(o)})`}}return{state:"removable"}}function ht(c,e={}){let t=e.groups??Gt,s={removed:[],installed:[],refreshed:[],kept:[],missingReplacements:[],replacementWarnings:[]},n;try{n=mt(c)}catch{return s}let o=r=>Ee(c,...r.split("/"));for(let r of t){let d=r.retired.map(l=>({file:l,probe:Ut(n,o(l.relPath),l.relPath.split("/").pop(),l.shippedSha256)})).filter(l=>l.probe.state!=="absent");if(d.length===0)continue;let p=d.filter(l=>l.probe.state==="blocked");if(p.length>0){s.kept.push({group:r.id,files:d.map(l=>l.file.relPath),why:p.map(l=>l.probe.why).join("; "),advice:r.advice});continue}for(let{file:l}of d)try{Vt(o(l.relPath)),s.removed.push(l.relPath)}catch(u){s.kept.push({group:r.id,files:[l.relPath],why:`could not remove (${u instanceof Error?u.message:String(u)})`,advice:r.advice})}for(let l of r.replacements){let u=o(l.relPath),m=e.sourceSkillsDir?Ee(e.sourceSkillsDir,...l.source.split("/")):void 0,y;try{y=Pe(u)}catch{y=void 0}if(!y?.isFile()){if(y){s.missingReplacements.push(l.relPath),s.replacementWarnings.push(`${l.relPath} exists and is not a regular file (e.g. a symlink); not replaced`);continue}if(!m||!Ce(m)){s.missingReplacements.push(l.relPath);continue}try{if(!Ce(ft(u))||!Re(n,u)){s.missingReplacements.push(l.relPath);continue}dt(m,u,Qt.COPYFILE_EXCL),s.installed.push(l.relPath)}catch(g){s.missingReplacements.push(l.relPath),g?.code==="EEXIST"&&s.replacementWarnings.push(`${l.relPath} appeared during install; not replaced`)}}}for(let l of r.refresh){let u=o(l.relPath),m=e.sourceSkillsDir?Ee(e.sourceSkillsDir,...l.source.split("/")):void 0;if(!(!m||!Ce(m)))try{if(!Pe(u).isFile()||!Re(n,u)||!l.previousSha256.includes(gt(pt(u))))continue;dt(m,u),s.refreshed.push(l.relPath)}catch{}}}return s}Q();import{spawnSync as Kt}from"node:child_process";import*as ge from"node:os";import*as kt from"node:fs";var F="vibium@^26.8.21",vt={platform:()=>ge.platform(),arch:()=>ge.arch(),existsSync:c=>kt.existsSync(c)},yt=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function Ie(c=vt){if(c.platform()!=="linux"||c.arch()!=="arm64")return;let e=yt.find(t=>c.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${yt.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function se(c,e,t,s){return c(e,t,{encoding:"utf8",timeout:s,maxBuffer:8*1024*1024})}var Ae=(c,e,t)=>Kt(c,e,t);function zt(c=Ae,e=5e3){let t=se(c,"vibium",["--version"],e);if(t.status!==0)return null;let s=(t.stdout||"").trim(),n=(t.stderr||"").trim(),o=s||n;if(!o)return"unknown";let r=o.match(/v?(\d+\.\d+\.\d+(?:[-+][\w.]+)?)/);return r?r[1]:o.split(/\s+/)[0]||"unknown"}function re(c=Ae,e=5e3){let t=zt(c,e);if(!t)return{status:"cli-missing"};let s=/^(\d+)\.(\d+)\.(\d+)(?:\+[\w.]+)?$/.exec(t);if(!s||Number(s[1])!==26||Number(s[2])<8||Number(s[2])===8&&Number(s[3])<21)return{status:"unsupported-version",version:t,message:`Vibium ${t} is unsupported; install ${F} for the browser.start() API`};let n=se(c,"vibium",["is-installed"],e);return n.status===0?{status:"ready",version:t}:{status:"payload-missing",version:t,message:n.stderr?.trim()||n.stdout?.trim()||S(n.error)||"Vibium Chrome/chromedriver payload is missing or incomplete"}}function bt(c={}){let e=c.packageSpec||F;if(c.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=c.spawner||Ae,s=c.platformProbe||vt,n=Ie(s),o=re(t);if(o.status==="ready")return{status:"already-installed",version:o.version,packageSpec:e,platformHint:n};let r=c.npmBin||"npm",i=se(t,r,["--version"],5e3);if(i.error||i.status!==0)return{status:"npm-unavailable",packageSpec:e,message:`npm is not available on PATH. Install Node.js + npm, then run \`npm install -g ${e}\`.`};let d=c.timeoutMs||18e4,p=se(t,r,["install","-g",e],d);if(p.status!==0)return{status:"install-failed",packageSpec:e,message:p.stderr?.trim()||p.stdout?.trim()||S(p.error)||"unknown npm install failure"};let l=re(t);if(l.status==="payload-missing"){let u=se(t,"vibium",["install"],d);if(u.status!==0)return{status:"install-failed",packageSpec:e,platformHint:n,message:`Browser payload installation failed: ${u.stderr?.trim()||u.stdout?.trim()||"vibium install failed"}. Run \`vibium install\` and verify with \`vibium is-installed\`.`};l=re(t)}if(l.status!=="ready"){let u=l.message?`: ${l.message}`:"";return{status:"install-failed",packageSpec:e,platformHint:n,message:`npm completed, but Vibium readiness verification failed (${l.status})${u}. Run \`npm install -g ${e}\`, then verify with \`vibium is-installed\`.`}}return{status:"installed",version:l.version,packageSpec:e,platformHint:n}}var oe=class extends k{name="assets";description="Install skills and agents";order=90;critical=!1;requiresPhases=["configuration"];async run(e){let t=e.config,{projectRoot:s,options:n}=e,o=this.detectVersionUpgrade(e),r=n.upgrade||t.skills.overwrite||n.autoMode&&o,i=0,d=0,p=0,l=0,u=0,m=0,y=0,g=0,b=0,E,B,R=[],he=[];if(n.upgrade?e.services.log(" Upgrade mode: overwriting existing files"):n.autoMode&&o&&e.services.log(" Version upgrade detected: updating skills and agents"),!n.noClaude&&t.skills.install){let h=await ve({projectRoot:s,installV2Skills:t.skills.installV2,installV3Skills:t.skills.installV3,overwrite:r}).install();i=h.installed.length,h.errors.length>0&&e.services.warn(`Skills warnings: ${h.errors.join(", ")}`)}if(!n.noClaude){let f=ht(s,{sourceSkillsDir:ve({projectRoot:s}).getSourceSkillsDir()});R=f.removed,he=f.kept.flatMap(h=>h.files);for(let h of f.removed)e.services.log(` Removed retired asset: ${h}`);for(let h of[...f.installed,...f.refreshed])e.services.log(` Updated skill file: ${h}`);for(let h of f.kept)e.services.warn(`Kept ${h.files.join(", ")}: ${h.why}. ${h.advice}.`);for(let h of f.replacementWarnings)e.services.warn(`Skill file kept: ${h}.`);f.missingReplacements.length>0&&e.services.warn(`Could not install ${f.missingReplacements.join(", ")}; run "aqe init --upgrade" to refresh the skills.`)}if(!n.noClaude){try{let h=await tt({projectRoot:s,installQEAgents:!0,installSubagents:!0,overwrite:r}).install();d=h.installed.length,h.errors.length>0&&e.services.warn(`Agents warnings: ${h.errors.join(", ")}`)}catch(f){e.services.warn(`Agents install error: ${f instanceof Error?f.message:f}`)}Me(s)}let P;if(n.browserEngine===!0&&!n.minimal)try{let f=re();if(f.status==="ready")P={status:"already-installed",version:f.version,packageSpec:F,platformHint:Ie()},e.services.log(` Browser engine: vibium ${P.version} (already installed)`);else switch(e.services.log(" Browser engine: installing vibium via npm (this can take 1\u20133 minutes on first run; downloads Chrome for Testing)\u2026"),P=bt({skip:!1}),P.status){case"installed":e.services.log(` Browser engine: vibium ${P.version} installed`);break;case"skipped":e.services.log(" Browser engine: skipped");break;case"install-failed":e.services.warn(`Browser engine install failed (qe-browser skill will be unavailable until you run \`aqe init --browser-engine\`): ${P.message||"unknown"}`);break;case"npm-unavailable":e.services.warn("Browser engine: npm not on PATH \u2014 install Node.js + npm, then `aqe init --browser-engine` to enable qe-browser");break}P?.platformHint&&e.services.warn(` Browser engine platform hint: ${P.platformHint.message}`)}catch(f){let h=f instanceof Error?f.message:String(f);e.services.warn(`Browser engine install error: ${h}
|
|
302
|
+
`}generateHooksConfig(e,t){return{PreToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" guard --file "$TOOL_INPUT_file_path" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-edit --file "$TOOL_INPUT_file_path" --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-command --command "$TOOL_INPUT_command" --json',timeout:3,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" pre-task --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],PostToolUse:[{matcher:"^(Write|Edit|MultiEdit)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-edit --file "$TOOL_INPUT_file_path" --success --json',timeout:5,continueOnError:!0}]},{matcher:"^Bash$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-command --command "$TOOL_INPUT_command" --success true --json',timeout:5,continueOnError:!0}]},{matcher:"^(Task|Agent)$",hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-task --task-id "$TOOL_RESULT_agent_id" --agent "$TOOL_INPUT_subagent_type" --success true --description "$TOOL_INPUT_prompt" --json',timeout:5,continueOnError:!0}]}],UserPromptSubmit:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" route --json',timeout:5,continueOnError:!0}]}],SessionStart:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-start --session-id "$SESSION_ID" --json',timeout:10,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" verify --json'`,timeout:5,continueOnError:!0}]}],Stop:[{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" session-end --save-state --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:'node "${CLAUDE_PROJECT_DIR:-.}/.claude/hooks/aqe-hook.cjs" post-route --success true --json',timeout:5,continueOnError:!0}]},{hooks:[{type:"command",command:`sh -c 'exec node "\${CLAUDE_PROJECT_DIR:-.}/.claude/helpers/brain-checkpoint.cjs" export --json'`,timeout:60,continueOnError:!0}]}]}}};import{existsSync as Ft,readFileSync as Lt}from"fs";de();import{join as lt}from"path";var te=class extends k{constructor(t=r=>Ze(r)){super();this.detectPlugin=t}detectPlugin;name="mcp";description="Configure MCP server";order=80;critical=!1;requiresPhases=["configuration","database"];async run(t){let{projectRoot:r}=t;if(t.options.noClaude)return t.services.log(" MCP: skipped (--no-claude \u2014 .mcp.json is the Claude Code surface)"),{configured:!1,mcpPath:"",serverName:""};if(t.options.noMcp)return t.services.log(" MCP: skipped (--no-mcp)"),t.services.log(" CLI commands available: aqe memory, aqe test, aqe coverage, etc."),{configured:!1,mcpPath:"",serverName:""};if(!t.options.withMcp){let l=this.detectPlugin(r);if(l.enabled)return t.services.log(et(r)),ct(t,Je(lt(r,".mcp.json"))),{configured:!1,mcpPath:"",serverName:"",skippedForPlugin:l.pluginKey}}let n=t.options.memoryBackend==="memory",s={command:"aqe-mcp",args:[],env:n?{AQE_MEMORY_BACKEND:"memory",AQE_LEARNING_ENABLED:"false",AQE_WORKERS_ENABLED:"false",NODE_ENV:"production"}:{AQE_LEARNING_ENABLED:"true",AQE_WORKERS_ENABLED:"true",NODE_ENV:"production"}},i=lt(r,".mcp.json"),d={};if(Ft(i))try{let l=Lt(i,"utf-8");d=x(l)}catch{d={}}d.mcpServers||(d.mcpServers={});let p=d.mcpServers;return ct(t,ze(p)),p["agentic-qe"]=s,Q(i,JSON.stringify(d,null,2)),t.services.log(` MCP config: ${i}`),t.services.log(" Server: agentic-qe"),n?(t.services.log(" Memory backend: in-memory (database-free)"),t.services.log(" Learning: disabled (db-free)"),t.services.log(" Workers: disabled (db-free)")):(t.services.log(" Learning: enabled"),t.services.log(" Workers: enabled")),{configured:!0,mcpPath:i,serverName:"agentic-qe"}}};function ct(c,e){e.length>0&&c.services.log(` MCP: removed server entry launching @anthropics/agentic-qe: ${e.join(", ")}`)}import{existsSync as A,readFileSync as Jt,readdirSync as Yt}from"fs";import{join as _}from"path";import{createHash as Bt}from"crypto";import{constants as Ht,copyFileSync as dt,existsSync as Ce,lstatSync as Ee,readFileSync as pt,realpathSync as mt,unlinkSync as Qt}from"fs";import{dirname as ft,join as Se,sep as Vt}from"path";var ne=".claude/skills/qe-court/evals/fixtures/seeded-mutant-delivery",Re="qe-court/evals/fixtures/seeded-mutant-delivery",ut=".claude/skills/testability-scoring/resources/templates",Ut="testability-scoring/resources/templates",Wt=Object.freeze([{id:"qe-court-seeded-mutant",retired:[{relPath:`${ne}/budget.test.ts`,shippedSha256:["add1ff4cb05978c136f8c2c5cc50059d920f06f409e5f6f304239b7dad3cf65d"]},{relPath:`${ne}/budget.ts`,shippedSha256:["11fc97cad19bb4fc0d31151a6d216ab99d0df0521b60be8fb19581d412147ef6"]}],replacements:[{relPath:`${ne}/budget-tests.ts.fixture`,source:`${Re}/budget-tests.ts.fixture`},{relPath:`${ne}/budget.ts.fixture`,source:`${Re}/budget.ts.fixture`}],refresh:[{relPath:`${ne}/README.md`,source:`${Re}/README.md`,previousSha256:["d3988b92856d0023a7ae210dce3e0bdf76204f41d635fd29f7e243c168ff6109"]},{relPath:".claude/skills/qe-court/evals/qe-court.yaml",source:"qe-court/evals/qe-court.yaml",previousSha256:["412899013a51a099224bad04491d49dca19f2c567c5599adedabd0e1d58556c7","27c8be547dc032e2dbe488156dd7a30f79b1cc921fe92efec5b9bb0a151f0e9b"]}],advice:"3.15.6 renamed the qe-court seeded-mutant fixture to budget.ts.fixture / budget-tests.ts.fixture because budget.test.ts matches test-runner globs, so your vitest/jest collects it (#1017). The pair was left as is; delete or rename both files if you do not want your test runner to collect it"},{id:"testability-scoring-spec-template",retired:[{relPath:`${ut}/testability-scoring.spec.template.js`,shippedSha256:["e85a3e25bb458f3d090834e121b02e8db83cdc589149b5cf7549853e1a067edf"]}],replacements:[{relPath:`${ut}/testability-scoring-spec.template.js`,source:`${Ut}/testability-scoring-spec.template.js`}],refresh:[],advice:"3.15.6 renamed it to testability-scoring-spec.template.js because its name matches the `*.spec.*` test glob (#1017); delete or rename it if your test runner should not collect it"}]);function gt(c){return Bt("sha256").update(c).digest("hex")}function Pe(c,e){let t;try{t=mt(ft(e))}catch{return!1}return t===c||t.startsWith(c+Vt)}function Gt(c,e,t,r){let n;try{n=Ee(e)}catch{return{state:"absent"}}if(!Pe(c,e))return{state:"blocked",why:`${t} resolves outside the project (symlinked directory)`};if(!n.isFile())return{state:"blocked",why:`${t} is not a regular file`};try{if(!r.includes(gt(pt(e))))return{state:"blocked",why:`${t} was modified since AQE installed it`}}catch(o){return{state:"blocked",why:`${t} is unreadable (${o instanceof Error?o.message:String(o)})`}}return{state:"removable"}}function ht(c,e={}){let t=e.groups??Wt,r={removed:[],installed:[],refreshed:[],kept:[],missingReplacements:[],replacementWarnings:[]},n;try{n=mt(c)}catch{return r}let o=s=>Se(c,...s.split("/"));for(let s of t){let d=s.retired.map(l=>({file:l,probe:Gt(n,o(l.relPath),l.relPath.split("/").pop(),l.shippedSha256)})).filter(l=>l.probe.state!=="absent");if(d.length===0)continue;let p=d.filter(l=>l.probe.state==="blocked");if(p.length>0){r.kept.push({group:s.id,files:d.map(l=>l.file.relPath),why:p.map(l=>l.probe.why).join("; "),advice:s.advice});continue}for(let{file:l}of d)try{Qt(o(l.relPath)),r.removed.push(l.relPath)}catch(u){r.kept.push({group:s.id,files:[l.relPath],why:`could not remove (${u instanceof Error?u.message:String(u)})`,advice:s.advice})}for(let l of s.replacements){let u=o(l.relPath),m=e.sourceSkillsDir?Se(e.sourceSkillsDir,...l.source.split("/")):void 0,y;try{y=Ee(u)}catch{y=void 0}if(!y?.isFile()){if(y){r.missingReplacements.push(l.relPath),r.replacementWarnings.push(`${l.relPath} exists and is not a regular file (e.g. a symlink); not replaced`);continue}if(!m||!Ce(m)){r.missingReplacements.push(l.relPath);continue}try{if(!Ce(ft(u))||!Pe(n,u)){r.missingReplacements.push(l.relPath);continue}dt(m,u,Ht.COPYFILE_EXCL),r.installed.push(l.relPath)}catch(g){r.missingReplacements.push(l.relPath),g?.code==="EEXIST"&&r.replacementWarnings.push(`${l.relPath} appeared during install; not replaced`)}}}for(let l of s.refresh){let u=o(l.relPath),m=e.sourceSkillsDir?Se(e.sourceSkillsDir,...l.source.split("/")):void 0;if(!(!m||!Ce(m)))try{if(!Ee(u).isFile()||!Pe(n,u)||!l.previousSha256.includes(gt(pt(u))))continue;dt(m,u),r.refreshed.push(l.relPath)}catch{}}}return r}H();import{spawnSync as Kt}from"node:child_process";import*as ge from"node:os";import*as kt from"node:fs";var N="vibium@^26.8.21",vt={platform:()=>ge.platform(),arch:()=>ge.arch(),existsSync:c=>kt.existsSync(c)},yt=["/usr/bin/chromium","/usr/bin/chromium-browser","/usr/bin/google-chrome","/usr/bin/google-chrome-stable","/snap/bin/chromium"];function Ie(c=vt){if(c.platform()!=="linux"||c.arch()!=="arm64")return;let e=yt.find(t=>c.existsSync(t));return e?{code:"linux-arm64-system-chromium-found",browserPath:e,message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64. Found system browser at ${e}. Export VIBIUM_BROWSER_PATH=${e} before running vibium.`}:{code:"linux-arm64-no-system-chromium",message:`Linux aarch64 detected. Vibium v26.3.x does not auto-download Chrome for Testing on ARM64, and no system chromium was found on PATH (checked: ${yt.join(", ")}). Install via \`apt-get install chromium\` (or your distro's equivalent), then export VIBIUM_BROWSER_PATH=/usr/bin/chromium before running vibium.`}}function re(c,e,t,r){return c(e,t,{encoding:"utf8",timeout:r,maxBuffer:8*1024*1024})}var Ae=(c,e,t)=>Kt(c,e,t);function zt(c=Ae,e=5e3){let t=re(c,"vibium",["--version"],e);if(t.status!==0)return null;let r=(t.stdout||"").trim(),n=(t.stderr||"").trim(),o=r||n;if(!o)return"unknown";let s=o.match(/v?(\d+\.\d+\.\d+(?:[-+][\w.]+)?)/);return s?s[1]:o.split(/\s+/)[0]||"unknown"}function se(c=Ae,e=5e3){let t=zt(c,e);if(!t)return{status:"cli-missing"};let r=/^(\d+)\.(\d+)\.(\d+)(?:\+[\w.]+)?$/.exec(t);if(!r||Number(r[1])!==26||Number(r[2])<8||Number(r[2])===8&&Number(r[3])<21)return{status:"unsupported-version",version:t,message:`Vibium ${t} is unsupported; install ${N} for the browser.start() API`};let n=re(c,"vibium",["is-installed"],e);return n.status===0?{status:"ready",version:t}:{status:"payload-missing",version:t,message:n.stderr?.trim()||n.stdout?.trim()||R(n.error)||"Vibium Chrome/chromedriver payload is missing or incomplete"}}function bt(c={}){let e=c.packageSpec||N;if(c.skip)return{status:"skipped",packageSpec:e,message:"install skipped by options"};let t=c.spawner||Ae,r=c.platformProbe||vt,n=Ie(r),o=se(t);if(o.status==="ready")return{status:"already-installed",version:o.version,packageSpec:e,platformHint:n};let s=c.npmBin||"npm",i=re(t,s,["--version"],5e3);if(i.error||i.status!==0)return{status:"npm-unavailable",packageSpec:e,message:`npm is not available on PATH. Install Node.js + npm, then run \`npm install -g ${e}\`.`};let d=c.timeoutMs||18e4,p=re(t,s,["install","-g",e],d);if(p.status!==0)return{status:"install-failed",packageSpec:e,message:p.stderr?.trim()||p.stdout?.trim()||R(p.error)||"unknown npm install failure"};let l=se(t);if(l.status==="payload-missing"){let u=re(t,"vibium",["install"],d);if(u.status!==0)return{status:"install-failed",packageSpec:e,platformHint:n,message:`Browser payload installation failed: ${u.stderr?.trim()||u.stdout?.trim()||"vibium install failed"}. Run \`vibium install\` and verify with \`vibium is-installed\`.`};l=se(t)}if(l.status!=="ready"){let u=l.message?`: ${l.message}`:"";return{status:"install-failed",packageSpec:e,platformHint:n,message:`npm completed, but Vibium readiness verification failed (${l.status})${u}. Run \`npm install -g ${e}\`, then verify with \`vibium is-installed\`.`}}return{status:"installed",version:l.version,packageSpec:e,platformHint:n}}var oe=class extends k{name="assets";description="Install skills and agents";order=90;critical=!1;requiresPhases=["configuration"];async run(e){let t=e.config,{projectRoot:r,options:n}=e,o=this.detectVersionUpgrade(e),s=n.upgrade||t.skills.overwrite||n.autoMode&&o,i=0,d=0,p=0,l=0,u=0,m=0,y=0,g=0,b=0,S,B,P=[],he=[];if(n.upgrade?e.services.log(" Upgrade mode: overwriting existing files"):n.autoMode&&o&&e.services.log(" Version upgrade detected: updating skills and agents"),!n.noClaude&&t.skills.install){let h=await ve({projectRoot:r,installV2Skills:t.skills.installV2,installV3Skills:t.skills.installV3,overwrite:s}).install();i=h.installed.length,h.errors.length>0&&e.services.warn(`Skills warnings: ${h.errors.join(", ")}`)}if(!n.noClaude){let f=ht(r,{sourceSkillsDir:ve({projectRoot:r}).getSourceSkillsDir()});P=f.removed,he=f.kept.flatMap(h=>h.files);for(let h of f.removed)e.services.log(` Removed retired asset: ${h}`);for(let h of[...f.installed,...f.refreshed])e.services.log(` Updated skill file: ${h}`);for(let h of f.kept)e.services.warn(`Kept ${h.files.join(", ")}: ${h.why}. ${h.advice}.`);for(let h of f.replacementWarnings)e.services.warn(`Skill file kept: ${h}.`);f.missingReplacements.length>0&&e.services.warn(`Could not install ${f.missingReplacements.join(", ")}; run "aqe init --upgrade" to refresh the skills.`)}if(!n.noClaude){try{let h=await tt({projectRoot:r,installQEAgents:!0,installSubagents:!0,overwrite:s}).install();d=h.installed.length,h.errors.length>0&&e.services.warn(`Agents warnings: ${h.errors.join(", ")}`)}catch(f){e.services.warn(`Agents install error: ${f instanceof Error?f.message:f}`)}Me(r)}let E;if(n.browserEngine===!0&&!n.minimal)try{let f=se();if(f.status==="ready")E={status:"already-installed",version:f.version,packageSpec:N,platformHint:Ie()},e.services.log(` Browser engine: vibium ${E.version} (already installed)`);else switch(e.services.log(" Browser engine: installing vibium via npm (this can take 1\u20133 minutes on first run; downloads Chrome for Testing)\u2026"),E=bt({skip:!1}),E.status){case"installed":e.services.log(` Browser engine: vibium ${E.version} installed`);break;case"skipped":e.services.log(" Browser engine: skipped");break;case"install-failed":e.services.warn(`Browser engine install failed (qe-browser skill will be unavailable until you run \`aqe init --browser-engine\`): ${E.message||"unknown"}`);break;case"npm-unavailable":e.services.warn("Browser engine: npm not on PATH \u2014 install Node.js + npm, then `aqe init --browser-engine` to enable qe-browser");break}E?.platformHint&&e.services.warn(` Browser engine platform hint: ${E.platformHint.message}`)}catch(f){let h=f instanceof Error?f.message:String(f);e.services.warn(`Browser engine install error: ${h}
|
|
216
303
|
qe-browser fleet skill will be unavailable until you run:
|
|
217
|
-
npm install -g ${
|
|
218
|
-
Then re-run \`aqe init --browser-engine\` to verify. The rest of the AQE install will continue.`)}else
|
|
304
|
+
npm install -g ${N}
|
|
305
|
+
Then re-run \`aqe init --browser-engine\` to verify. The rest of the AQE install will continue.`)}else E={status:"skipped",packageSpec:N,message:n.minimal?"minimal mode":"browser setup not requested; run aqe init --browser-engine"};if(n.withN8n){let h=await nt({projectRoot:r,installAgents:!0,installSkills:!0,overwrite:s,n8nApiConfig:n.n8nApiConfig}).install();p=h.agentsInstalled.length,l=h.skillsInstalled.length,h.errors.length>0&&e.services.warn(`N8n warnings: ${h.errors.join(", ")}`)}let qe=n.autoMode&&A(_(r,"opencode.json"));if(n.withOpenCode||qe){let{createOpenCodeInstaller:f}=await import("./opencode-installer-BSQV6UAT.js"),a=await f({projectRoot:r,installAgents:!0,installSkills:!0,installTools:!1,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();u=a.agentsInstalled.length,m=a.skillsInstalled.length,a.errors.length>0&&e.services.warn(`OpenCode warnings: ${a.errors.join(", ")}`)}e.services.log(` Skills: ${i}`),e.services.log(` Agents: ${d}`),n.withN8n&&(e.services.log(` N8n agents: ${p}`),e.services.log(` N8n skills: ${l}`)),(n.withOpenCode||qe)&&(e.services.log(` OpenCode agents: ${u}`),e.services.log(` OpenCode skills: ${m}`));let _t=n.autoMode&&A(_(r,".kiro"));if(n.withKiro||_t){let{createKiroInstaller:f}=await import("./kiro-installer-Q4ZXUFC7.js"),a=await f({projectRoot:r,installAgents:!0,installSkills:!0,installHooks:!0,installSteering:!0,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();y=a.agentsInstalled.length,g=a.skillsInstalled.length,b=a.hooksInstalled.length,a.errors.length>0&&e.services.warn(`Kiro warnings: ${a.errors.join(", ")}`),e.services.log(` Kiro agents: ${y}`),e.services.log(` Kiro skills: ${g}`),e.services.log(` Kiro hooks: ${b}`),e.services.log(` Kiro steering: ${a.steeringInstalled.length}`),a.mcpConfigured&&e.services.log(" Kiro MCP: .kiro/settings/mcp.json")}let I=[];if(n.withCopilot||n.autoMode&&A(_(r,".vscode"))){let{createCopilotInstaller:f}=await import("./copilot-installer-CLPZYTQC.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("copilot"),a.errors.length>0&&e.services.warn(`Copilot warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Copilot MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Copilot rules: ${a.rulesPath}`)}if(n.withCursor||n.autoMode&&A(_(r,".cursor"))){let{createCursorInstaller:f}=await import("./cursor-installer-KXBID4MB.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("cursor"),a.errors.length>0&&e.services.warn(`Cursor warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cursor MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Cursor rules: ${a.rulesPath}`)}if(n.withCline){let{createClineInstaller:f}=await import("./cline-installer-7RGYJWGN.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("cline"),a.errors.length>0&&e.services.warn(`Cline warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Cline MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Cline mode: ${a.modePath}`)}if(n.withKiloCode||n.autoMode&&A(_(r,".kilocode"))){let{createKiloCodeInstaller:f}=await import("./kilocode-installer-GZV2D3FF.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("kilocode"),a.errors.length>0&&e.services.warn(`Kilo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Kilo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Kilo Code mode: ${a.modePath}`)}if(n.withRooCode||n.autoMode&&A(_(r,".roo"))){let{createRooCodeInstaller:f}=await import("./roocode-installer-IGGZHR2Y.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("roocode"),a.errors.length>0&&e.services.warn(`Roo Code warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Roo Code MCP: ${a.configPath}`),a.modeInstalled&&e.services.log(` Roo Code mode: ${a.modePath}`)}if(n.withCodex||n.autoMode&&A(_(r,".codex"))){let{createCodexInstaller:f}=await import("./codex-installer-DZ7OG6KM.js"),a=await f({projectRoot:r,overwrite:s,installMcp:!n.noMcp,includeRuflo:n.withRuflo,guidancePolicy:n.codexGuidance,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();S={policy:a.guidancePolicy,ownedBytes:a.ownedGuidanceBytes},B={hooks:a.components.hooks,skills:a.components.skills},a.mcpConfigured&&I.push("codex"),a.errors.length>0&&e.services.warn(`Codex warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Codex MCP: ${a.configPath}`),a.agentsMdInstalled&&e.services.log(` Codex AGENTS.md: ${a.agentsMdPath}`),a.hooksConfigured&&e.services.log(` Codex hooks: ${a.hooksPath}`),a.skillsInstalled>0&&e.services.log(` Codex skills: ${a.skillsInstalled} installed`),e.services.log(n.withRuflo?" Codex Ruflo integration: enabled":" Codex Ruflo integration: not installed (opt in with --with-ruflo)")}if(n.withWindsurf||n.autoMode&&A(_(r,".windsurf"))){let{createWindsurfInstaller:f}=await import("./windsurf-installer-OOBTDA6W.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("windsurf"),a.errors.length>0&&e.services.warn(`Windsurf warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Windsurf MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Windsurf rules: ${a.rulesPath}`)}if(n.withContinueDev||n.autoMode&&A(_(r,".continue"))){let{createContinueDevInstaller:f}=await import("./continuedev-installer-AGASOA26.js"),a=await f({projectRoot:r,overwrite:s,memoryBackend:n.memoryBackend==="memory"?"memory":void 0}).install();a.mcpConfigured&&I.push("continuedev"),a.errors.length>0&&e.services.warn(`Continue.dev warnings: ${a.errors.join(", ")}`),a.mcpConfigured&&e.services.log(` Continue.dev MCP: ${a.configPath}`),a.rulesInstalled&&e.services.log(` Continue.dev rules: ${a.rulesPath}`)}return I.length>0&&e.services.log(` Platforms configured: ${I.join(", ")}`),{skillsInstalled:i,agentsInstalled:d,n8nAgents:p,n8nSkills:l,openCodeAgents:u,openCodeSkills:m,kiroAgents:y,kiroSkills:g,kiroHooks:b,platformsConfigured:I,browserEngine:E,codexGuidance:S,codexComponents:B,retiredAssetsRemoved:P,retiredAssetsKept:he}}detectVersionUpgrade(e){let t=e.config.version,r=_(e.projectRoot,".agentic-qe","config.yaml");if(A(r))try{let i=Jt(r,"utf-8").match(/version:\s*"?([^"\n]+)"?/)?.[1];if(i===t)return!1;if(i!==void 0)return!0}catch{}let n=_(e.projectRoot,".claude","agents","v3");try{return A(n)&&Yt(n).some(o=>o.endsWith(".md")&&o.startsWith("qe-"))}catch{return!1}}};import{existsSync as Xt,mkdirSync as Zt}from"fs";import{join as F,dirname as en}from"path";import{fileURLToPath as tn}from"url";var nn=tn(import.meta.url),Ur=en(nn),ie=class extends k{name="workers";description="Configure background workers";order=100;critical=!1;requiresPhases=["configuration"];async shouldRun(e){if(e.options.memoryBackend==="memory")return!1;let t=e.config;return t?.workers?.daemonAutoStart&&(t?.workers?.enabled?.length??0)>0}async run(e){let t=e.config,{projectRoot:r}=e;if(!t.workers.daemonAutoStart||t.workers.enabled.length===0)return{workersDir:"",workersConfigured:0,registryPath:"",daemonStarted:!1,daemonPid:null};let n=F(r,".agentic-qe","workers");Xt(n)||Zt(n,{recursive:!0});let o={"learning-consolidation":18e5,"pattern-consolidator":18e5,"test-health":3e5,"coverage-tracker":6e5,"coverage-gap-scanner":6e5,"flaky-detector":9e5,"flaky-test-detector":9e5,"security-scan":18e5,"quality-gate":3e5,"compliance-checker":18e5,"defect-predictor":9e5,"regression-monitor":6e5,"routing-accuracy-monitor":9e5,"performance-baseline":36e5,"cloud-sync":3e5},s={};for(let y of t.workers.enabled)s[y]={name:y,enabled:!0,interval:t.workers.intervals[y]||o[y]||6e4,lastRun:null,status:"pending"};let i=F(n,"registry.json"),d={version:t.version,maxConcurrent:t.workers.maxConcurrent,workers:s,createdAt:new Date().toISOString(),daemonPid:null};V(i,d,[["createdAt"]]);for(let y of t.workers.enabled){let g=F(n,`${y}.json`),b={name:y,enabled:!0,interval:t.workers.intervals[y]||o[y]||6e4,projectRoot:r,dataDir:F(r,".agentic-qe","data"),createdAt:new Date().toISOString()};V(g,b,[["createdAt"]])}let p=F(n,"start-daemon.cjs");Q(p,`#!/usr/bin/env node
|
|
219
306
|
// AQE v3 Worker Daemon Startup Script (cross-platform)
|
|
220
307
|
// Generated by aqe init
|
|
221
308
|
// Starts the MCP server with background workers enabled
|
|
@@ -409,7 +496,7 @@ setTimeout(() => {
|
|
|
409
496
|
console.log('Log file: ' + logFile);
|
|
410
497
|
console.log('To stop: node ' + join(workersDir, 'stop-daemon.cjs'));
|
|
411
498
|
}, 3000);
|
|
412
|
-
`);let u=
|
|
499
|
+
`);let u=F(n,"stop-daemon.cjs");return Q(u,`#!/usr/bin/env node
|
|
413
500
|
// AQE v3 Worker Daemon Stop Script (cross-platform)
|
|
414
501
|
// Generated by aqe init
|
|
415
502
|
|
|
@@ -432,9 +519,9 @@ try {
|
|
|
432
519
|
console.log('Daemon not running (stale PID file)');
|
|
433
520
|
try { unlinkSync(pidFile); } catch {}
|
|
434
521
|
}
|
|
435
|
-
`),e.services.log(` Workers dir: ${n}`),e.services.log(` Workers: ${t.workers.enabled.join(", ")}`),e.services.log(` Registry: ${i}`),{workersDir:n,workersConfigured:t.workers.enabled.length,registryPath:i,daemonStarted:!1,daemonPid:null}}};import{existsSync as
|
|
522
|
+
`),e.services.log(` Workers dir: ${n}`),e.services.log(` Workers: ${t.workers.enabled.join(", ")}`),e.services.log(` Registry: ${i}`),{workersDir:n,workersConfigured:t.workers.enabled.length,registryPath:i,daemonStarted:!1,daemonPid:null}}};import{existsSync as rn,readFileSync as sn,writeFileSync as _e}from"fs";import{join as wt}from"path";var ae=class extends k{name="claude-md";description="Generate CLAUDE.md";order=110;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.options.noClaude?(e.services.log(" CLAUDE.md skipped (--no-claude)"),!1):!0}async run(e){let t=e.config,{projectRoot:r}=e,n=wt(r,"CLAUDE.md"),o=this.generateContent(t),s=!1;if(rn(n)){let i=sn(n,"utf-8");if(i.includes("## Agentic QE v3"))return e.services.log(" CLAUDE.md already has AQE section"),{generated:!1,path:n,backupCreated:!1};let d=wt(r,"CLAUDE.md.backup");_e(d,i,"utf-8"),s=!0,_e(n,i+`
|
|
436
523
|
|
|
437
|
-
`+o,"utf-8")}else _e(n,o,"utf-8");return e.services.log(` Path: ${n}`),
|
|
524
|
+
`+o,"utf-8")}else _e(n,o,"utf-8");return e.services.log(` Path: ${n}`),s&&e.services.log(" Backup created"),{generated:!0,path:n,backupCreated:s}}generateContent(e){let t=e.domains.enabled.slice(0,6).join(", "),r=Math.max(0,e.domains.enabled.length-6);return`## Agentic QE v3
|
|
438
525
|
|
|
439
526
|
This project uses **Agentic QE v3** - a Domain-Driven Quality Engineering platform with 13 bounded contexts, ReasoningBank learning, HNSW vector search, and Agent Teams coordination (ADR-064).
|
|
440
527
|
|
|
@@ -574,7 +661,7 @@ mcp__agentic-qe__task_orchestrate({
|
|
|
574
661
|
|
|
575
662
|
### Configuration
|
|
576
663
|
|
|
577
|
-
- **Enabled Domains**: ${t}${
|
|
664
|
+
- **Enabled Domains**: ${t}${r>0?` (+${r} more)`:""}
|
|
578
665
|
- **Learning**: ${e.learning.enabled?"Enabled":"Disabled"} (${e.learning.embeddingModel} embeddings)
|
|
579
666
|
- **Max Concurrent Agents**: ${e.agents.maxConcurrent}
|
|
580
667
|
- **Background Workers**: ${e.workers.enabled.length>0?e.workers.enabled.join(", "):"None"}
|
|
@@ -596,7 +683,7 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
|
|
|
596
683
|
|
|
597
684
|
---
|
|
598
685
|
*Generated by AQE v3 init - ${new Date().toISOString()}*
|
|
599
|
-
`}};import{existsSync as
|
|
686
|
+
`}};import{existsSync as q,readFileSync as on}from"fs";import{join as L,dirname as an}from"path";import{mkdirSync as Ct}from"fs";ye();var ln=/^# \d{4}-\d{2}-\d{2}T[\d:.]+Z$/,xe=new Set(["__proto__","constructor","prototype"]),le=class extends k{name="verification";description="Verify installation";order=120;critical=!0;requiresPhases=["database","configuration"];async run(e){let t=e.config,{projectRoot:r}=e,n=[],o=e.options.memoryBackend==="memory",s=L(r,".agentic-qe","memory.db");n.push({name:o?"Database (in-memory mode)":"Database exists",passed:o||q(s)}),n.push({name:".agentic-qe directory",passed:q(L(r,".agentic-qe"))});let i=L(r,".agentic-qe","config.yaml");await this.saveConfig(t,r),n.push({name:"Config saved",passed:q(i)});let d=o?!0:await this.writeVersionToDb(t.version,r);n.push({name:"Version marker",passed:d});let p=["Database exists",".agentic-qe directory","Config saved"],l=n.filter(u=>p.includes(u.name)).every(u=>u.passed);e.services.log(" Verification checks:");for(let u of n){let m=p.includes(u.name),y=u.passed?"\u2713":m?"\u2717":"\u26A0",g=!m&&!u.passed?" (optional)":"";e.services.log(` ${y} ${u.name}${g}`)}return{verified:l,versionWritten:d,configSaved:q(i),checks:n}}async writeVersionToDb(e,t){let r=L(t,".agentic-qe","memory.db");try{let n=an(r);q(n)||Ct(n,{recursive:!0});let o=D(r);try{o.exec(`
|
|
600
687
|
CREATE TABLE IF NOT EXISTS kv_store (
|
|
601
688
|
key TEXT NOT NULL,
|
|
602
689
|
namespace TEXT NOT NULL,
|
|
@@ -605,15 +692,15 @@ Task({ prompt: "Security audit", subagent_type: "qe-security-scanner", run_in_ba
|
|
|
605
692
|
created_at INTEGER DEFAULT (strftime('%s', 'now') * 1000),
|
|
606
693
|
PRIMARY KEY (namespace, key)
|
|
607
694
|
);
|
|
608
|
-
`);let
|
|
695
|
+
`);let s=Date.now();return o.prepare(`
|
|
609
696
|
INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
|
|
610
697
|
VALUES (?, '_system', ?, ?)
|
|
611
|
-
`).run("aqe_version",JSON.stringify(e),
|
|
698
|
+
`).run("aqe_version",JSON.stringify(e),s),o.prepare(`
|
|
612
699
|
INSERT OR REPLACE INTO kv_store (key, namespace, value, created_at)
|
|
613
700
|
VALUES (?, '_system', ?, ?)
|
|
614
|
-
`).run("init_timestamp",JSON.stringify(new Date().toISOString()),
|
|
615
|
-
`),n="",o="";for(let i of
|
|
616
|
-
`)}};
|
|
617
|
-
\u{1F4CB} ${n.description}...`);let
|
|
618
|
-
\u274C Critical phase failed: ${n.name}`),n.rollback)try{await n.rollback(this.context)}catch(i){console.error(`Rollback failed: ${i}`)}return this.createFailureResult(t,e)}if(
|
|
619
|
-
`)}export{
|
|
701
|
+
`).run("init_timestamp",JSON.stringify(new Date().toISOString()),s),o.close(),!0}catch{return o.close(),!1}}catch{return!1}}async saveConfig(e,t){let r=L(t,".agentic-qe");q(r)||Ct(r,{recursive:!0});let n=L(r,"config.yaml");if(q(n)){let s=this.loadExistingConfig(n);s&&(e=this.mergeConfigs(e,s))}let o=this.configToYAML(e);Be(n,o,ln)}loadExistingConfig(e){try{let t=on(e,"utf-8");return this.parseYAML(t)}catch{return null}}parseYAML(e){try{let t={},r=e.split(`
|
|
702
|
+
`),n="",o="";for(let i of r){if(i.trim().startsWith("#")||i.trim()==="")continue;let d=i.match(/^(\w+):\s*(.*)$/);if(d){if(n=xe.has(d[1])?"":d[1],o="",!n)continue;let m=d[2].trim();m&&!m.startsWith('"')?t[n]=this.parseValue(m):m?t[n]=this.parseValue(m):t[n]={};continue}let p=i.match(/^ {2}(\w+):\s*(.*)$/);if(p&&n){if(o=xe.has(p[1])?"":p[1],!o)continue;let m=p[2].trim();(!Object.hasOwn(t,n)||!t[n])&&(t[n]={}),m?t[n][o]=this.parseValue(m):t[n][o]={};continue}let l=i.match(/^ {4}([\w-]+):\s*(.*)$/);if(l&&n&&o){let m=l[1],y=l[2].trim();if(xe.has(m))continue;let g=t[n];(!Object.hasOwn(g,o)||!g[o])&&(g[o]={}),typeof g[o]=="object"&&!Array.isArray(g[o])&&(g[o][m]=this.parseValue(y));continue}let u=i.match(/^ {4}- "?([^"]*)"?$/);if(u&&n&&o){let m=t[n];Array.isArray(m[o])||(m[o]=[]),m[o].push(u[1])}}let s=[["domains","enabled"],["domains","disabled"],["workers","enabled"]];for(let[i,d]of s){let p=t[i];p&&d in p&&!Array.isArray(p[d])&&(p[d]=[])}return t}catch{return null}}parseValue(e){return e==="true"?!0:e==="false"?!1:/^\d+$/.test(e)?parseInt(e,10):/^\d+\.\d+$/.test(e)?parseFloat(e):e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}mergeConfigs(e,t){if(t.domains?.enabled&&Array.isArray(t.domains.enabled)){let r=new Set(t.domains.enabled),n=new Set(e.domains.enabled);for(let s of n)r.add(s);let o=new Set(Array.isArray(t.domains?.disabled)?t.domains.disabled:[]);e.domains.enabled=Array.from(r).filter(s=>!o.has(s))}return t.domains?.disabled&&Array.isArray(t.domains.disabled)&&(e.domains.disabled=t.domains.disabled),t.learning?.enabled!==void 0&&(e.learning.enabled=t.learning.enabled),t.learning?.qualityThreshold!==void 0&&(e.learning.qualityThreshold=t.learning.qualityThreshold),t.learning?.promotionThreshold!==void 0&&(e.learning.promotionThreshold=t.learning.promotionThreshold),t.hooks?.claudeCode!==void 0&&(e.hooks.claudeCode=t.hooks.claudeCode),t.hooks?.preCommit!==void 0&&(e.hooks.preCommit=t.hooks.preCommit),t.hooks?.ciIntegration!==void 0&&(e.hooks.ciIntegration=t.hooks.ciIntegration),t.workers?.enabled&&Array.isArray(t.workers.enabled)&&(e.workers.enabled=t.workers.enabled),t.workers?.daemonAutoStart!==void 0&&(e.workers.daemonAutoStart=t.workers.daemonAutoStart),t.agents?.maxConcurrent!==void 0&&(e.agents.maxConcurrent=t.agents.maxConcurrent),t.agents?.defaultTimeout!==void 0&&(e.agents.defaultTimeout=t.agents.defaultTimeout),e}configToYAML(e){return["# Agentic QE v3 Configuration","# Generated by aqe init",`# ${new Date().toISOString()}`,"#",'# NOTE: Your customizations are PRESERVED when you run "aqe init" again.','# You do NOT need to re-run "aqe init" after editing this file - changes',"# take effect immediately. The following settings are merged on reinstall:","# - domains.enabled (custom domains like visual-accessibility)","# - domains.disabled","# - learning.enabled, qualityThreshold, and promotionThreshold","# - hooks.* preferences","# - workers.enabled","# - agents.maxConcurrent and defaultTimeout","",`version: "${e.version}"`,"","project:",` name: "${e.project.name}"`,` root: "${e.project.root}"`,` type: "${e.project.type}"`,"","learning:",` enabled: ${e.learning.enabled}`,` embeddingModel: "${e.learning.embeddingModel}"`," hnswConfig:",` M: ${e.learning.hnswConfig.M}`,` efConstruction: ${e.learning.hnswConfig.efConstruction}`,` efSearch: ${e.learning.hnswConfig.efSearch}`,` qualityThreshold: ${e.learning.qualityThreshold}`,` promotionThreshold: ${e.learning.promotionThreshold}`,` pretrainedPatterns: ${e.learning.pretrainedPatterns}`,"","routing:",` mode: "${e.routing.mode}"`,` confidenceThreshold: ${e.routing.confidenceThreshold}`,` feedbackEnabled: ${e.routing.feedbackEnabled}`,"","# ADR-092: Advisor Strategy \u2014 agents consult a stronger model for strategic guidance","# Set provider/model to override auto-detection from environment API keys","advisor:",' # provider: "openrouter" # openrouter | claude | ollama (auto-detected if not set)',' # model: "anthropic/claude-opus-5.5" # provider-specific model ID',' # maxUses: "3" # per-task advisor call cap',' redact: "strict" # strict | balanced | off',"","workers:"," enabled:",...e.workers.enabled.map(r=>` - "${r}"`)," intervals:",...Object.entries(e.workers.intervals).map(([r,n])=>` ${r}: ${n}`),` maxConcurrent: ${e.workers.maxConcurrent}`,` daemonAutoStart: ${e.workers.daemonAutoStart}`,"","hooks:",` claudeCode: ${e.hooks.claudeCode}`,` preCommit: ${e.hooks.preCommit}`,` ciIntegration: ${e.hooks.ciIntegration}`,"","skills:",` install: ${e.skills.install}`,` installV2: ${e.skills.installV2}`,` installV3: ${e.skills.installV3}`,` overwrite: ${e.skills.overwrite}`,"","domains:"," enabled:",...e.domains.enabled.map(r=>` - "${r}"`)," disabled:",...e.domains.disabled.map(r=>` - "${r}"`),"","agents:",` maxConcurrent: ${e.agents.maxConcurrent}`,` defaultTimeout: ${e.agents.defaultTimeout}`,""].join(`
|
|
703
|
+
`)}};H();import{existsSync as $,mkdirSync as St,readdirSync as Rt,copyFileSync as Et}from"fs";import{join as C,dirname as cn}from"path";import{fileURLToPath as dn}from"url";var un=dn(import.meta.url),Pt=cn(un);function pn(){let c=[C(Pt,"../../assets/governance"),C(Pt,"../assets/governance")],e=Ne(import.meta.url);e&&(c.push(C(e,"assets/governance")),c.push(C(e,"dist/assets/governance"))),c.push(C(process.cwd(),"node_modules/agentic-qe/assets/governance")),c.push(C(process.cwd(),"assets/governance"));for(let t of c)if($(t))return t;throw new Error(`Governance assets not found. Package may be corrupted. Searched: ${c.join(", ")}`)}var De=class{projectRoot;overwrite;skipShards;assetsPath;constructor(e){this.projectRoot=e.projectRoot,this.overwrite=e.overwrite??!1,this.skipShards=e.skipShards??!1,this.assetsPath=pn()}async install(){let e=[],t=[],r=[],n=C(this.projectRoot,".claude","guidance"),o=C(n,"shards");try{St(n,{recursive:!0}),this.skipShards||St(o,{recursive:!0})}catch(l){return r.push(`Failed to create governance directory: ${R(l)}`),{installed:e,skipped:t,errors:r,governanceDir:n,constitutionInstalled:!1,shardsInstalled:0}}let s=!1,i=C(this.assetsPath,"constitution.md"),d=C(n,"constitution.md");if($(i))try{!$(d)||this.overwrite?(Et(i,d),e.push("constitution.md"),s=!0):t.push("constitution.md")}catch(l){r.push(`Failed to install constitution.md: ${R(l)}`)}else r.push("constitution.md not found in assets");let p=0;if(!this.skipShards){let l=C(this.assetsPath,"shards");if($(l))try{let u=Rt(l).filter(m=>m.endsWith(".shard.md"));for(let m of u){let y=C(l,m),g=C(o,m);try{!$(g)||this.overwrite?(Et(y,g),e.push(`shards/${m}`),p++):t.push(`shards/${m}`)}catch(b){r.push(`Failed to install ${m}: ${R(b)}`)}}}catch(u){r.push(`Failed to read shards directory: ${R(u)}`)}else r.push("Shards directory not found in assets")}return{installed:e,skipped:t,errors:r,governanceDir:n,constitutionInstalled:s,shardsInstalled:p}}isInstalled(){let e=C(this.projectRoot,".claude","guidance","constitution.md");return $(e)}getInstalledShards(){let e=C(this.projectRoot,".claude","guidance","shards");if(!$(e))return[];try{return Rt(e).filter(t=>t.endsWith(".shard.md"))}catch{return[]}}};function It(c){return new De(c)}var ce=class extends k{name="governance";description="Install governance configuration";order=95;critical=!1;requiresPhases=["configuration"];async shouldRun(e){return e.options.noClaude?(e.services.log(" Governance skipped (--no-claude)"),!1):e.options.noGovernance?(e.services.log(" Governance skipped (--no-governance flag)"),!1):e.options.minimal?(e.services.log(" Governance skipped (minimal mode)"),!1):!0}async run(e){let{projectRoot:t,options:r}=e,n=r.upgrade,o=It({projectRoot:t,overwrite:n});if(o.isInstalled()&&!n){let i=o.getInstalledShards();return e.services.log(` Governance already installed (${i.length} shards)`),e.services.log(" Use --upgrade to overwrite existing files"),{filesInstalled:0,filesSkipped:1+i.length,constitutionInstalled:!1,shardsInstalled:0,governanceDir:`${t}/.claude/guidance`,skippedByFlag:!1}}let s=await o.install();if(s.errors.length>0)for(let i of s.errors)e.services.warn(` ${i}`);return e.services.log(` Constitution: ${s.constitutionInstalled?"installed":"skipped"}`),e.services.log(` Shards: ${s.shardsInstalled} installed, ${s.skipped.filter(i=>i.startsWith("shards/")).length} skipped`),s.installed.length>0&&(e.services.log(" Governance enabled (non-strict mode by default)"),e.services.log(" Set GOVERNANCE_STRICT_MODE=true for strict enforcement")),{filesInstalled:s.installed.length,filesSkipped:s.skipped.length,constitutionInstalled:s.constitutionInstalled,shardsInstalled:s.shardsInstalled,governanceDir:s.governanceDir,skippedByFlag:!1}}};var mn=new U,fn=new W,gn=new G,hn=new J,yn=new Y,kn=new X,vn=new ee,bn=new te,wn=new oe,Cn=new ie,Sn=new ae,Rn=new le,En=new ce;function At(){return[mn,fn,gn,hn,yn,kn,vn,bn,wn,En,Cn,Sn,Rn]}var Te=class{phases;context;constructor(e){this.context=this.createContext(e),this.phases=e.customPhases??At()}createContext(e){let t=e.withAllPlatforms;return{projectRoot:e.projectRoot,options:{autoMode:e.autoMode,upgrade:e.upgrade,skipPatterns:e.skipPatterns,skipCodeIndex:e.skipCodeIndex,minimal:e.minimal,browserEngine:e.browserEngine,withN8n:e.withN8n,withOpenCode:e.withOpenCode,withKiro:e.withKiro,withCopilot:e.withCopilot||t,withCursor:e.withCursor||t,withCline:e.withCline||t,withKiloCode:e.withKiloCode||t,withRooCode:e.withRooCode||t,withCodex:e.withCodex||t,withRuflo:e.withRuflo,codexGuidance:e.codexGuidance,withWindsurf:e.withWindsurf||t,withContinueDev:e.withContinueDev||t,withAllPlatforms:e.withAllPlatforms,n8nApiConfig:e.n8nApiConfig,wizardAnswers:e.wizardAnswers,noGovernance:e.noGovernance,noMcp:e.noMcp,withMcp:e.withMcp,noClaude:e.noClaude,noStatusLine:e.noStatusLine,memoryBackend:e.memoryBackend},config:{},enhancements:{claudeFlow:!1,ruvector:!1},results:new Map,services:{log:r=>console.log(r),warn:r=>console.warn(r),error:r=>console.error(r)}}}async initialize(){let e=Date.now(),t=[];try{let r=[...this.phases].sort((n,o)=>n.order-o.order);for(let n of r){if(!await n.shouldRun(this.context))continue;console.log(`
|
|
704
|
+
\u{1F4CB} ${n.description}...`);let s=await n.execute(this.context);if(this.context.results.set(n.name,s),t.push({step:n.description,status:s.success?"success":"error",message:s.message||"",durationMs:s.durationMs}),!s.success&&n.critical){if(console.error(`
|
|
705
|
+
\u274C Critical phase failed: ${n.name}`),n.rollback)try{await n.rollback(this.context)}catch(i){console.error(`Rollback failed: ${i}`)}return this.createFailureResult(t,e)}if(s.skipRemaining)break}return this.createSuccessResult(t,e)}catch(r){return t.push({step:"Initialization Failed",status:"error",message:R(r),durationMs:0}),this.createFailureResult(t,e)}}createSuccessResult(e,t){let r=this.context.config,n=this.context.results.get("learning"),o=this.context.results.get("code-intelligence"),s=this.context.results.get("assets"),i=this.context.results.get("hooks"),d=this.context.results.get("mcp"),p=this.context.results.get("claude-md"),l=this.context.results.get("workers");return{success:!0,config:r||ke("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:this.context.results.has("analysis"),configGenerated:this.context.results.has("configuration"),codeIntelligenceIndexed:o?.data?.entries??0,patternsLoaded:n?.data?.patternsLoaded??0,skillsInstalled:s?.data?.skillsInstalled??0,agentsInstalled:s?.data?.agentsInstalled??0,hooksConfigured:i?.data?.configured??!1,mcpConfigured:d?.data?.configured??!1,claudeMdGenerated:p?.data?.generated??!1,workersStarted:l?.data?.workersConfigured??0,codexGuidance:s?.data?.codexGuidance,codexComponents:s?.data?.codexComponents,retiredAssetsRemoved:s?.data?.retiredAssetsRemoved,retiredAssetsKept:s?.data?.retiredAssetsKept},totalDurationMs:Date.now()-t,timestamp:new Date}}createFailureResult(e,t){return{success:!1,config:ke("unknown",this.context.projectRoot),steps:e,summary:{projectAnalyzed:!1,configGenerated:!1,codeIntelligenceIndexed:0,patternsLoaded:0,skillsInstalled:0,agentsInstalled:0,hooksConfigured:!1,mcpConfigured:!1,claudeMdGenerated:!1,workersStarted:0},totalDurationMs:Date.now()-t,timestamp:new Date}}getPhase(e){return this.phases.find(t=>t.name===e)}getPhases(){return[...this.phases]}getContext(){return this.context}};function Pn(c){return new Te(c)}async function Ws(c){return await Pn({projectRoot:c,autoMode:!0}).initialize()}function Gs(c){let e=[];e.push(""),e.push("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510"),e.push("\u2502 AQE v3 Initialization \u2502"),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");for(let r of c.steps){let n=r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u25CB",o=r.step.substring(0,48).padEnd(48);e.push(`\u2502 ${n} ${o} ${String(r.durationMs).padStart(4)}ms \u2502`)}e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524"),e.push(`\u2502 Project: ${c.config.project.name.substring(0,45).padEnd(45)} \u2502`),e.push(`\u2502 Type: ${c.config.project.type.padEnd(48)} \u2502`),e.push(`\u2502 Code Intel: ${String(c.summary.codeIntelligenceIndexed).padEnd(43)} \u2502`),e.push(`\u2502 Patterns: ${String(c.summary.patternsLoaded).padEnd(45)} \u2502`),e.push(`\u2502 Skills: ${String(c.summary.skillsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Agents: ${String(c.summary.agentsInstalled).padEnd(47)} \u2502`),e.push(`\u2502 Workers: ${String(c.summary.workersStarted).padEnd(46)} \u2502`),e.push(`\u2502 Hooks: ${c.summary.hooksConfigured?"Yes":"No".padEnd(48)} \u2502`),e.push(`\u2502 MCP: ${c.summary.mcpConfigured?"Yes":"No".padEnd(50)} \u2502`),e.push(`\u2502 CLAUDE.md: ${c.summary.claudeMdGenerated?"Yes":"No".padEnd(44)} \u2502`),e.push("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524");let t=c.success?"\u2713 AQE v3 initialized successfully":"\u2717 Initialization failed";return e.push(`\u2502 ${t.padEnd(57)} \u2502`),e.push("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"),e.push(""),e.join(`
|
|
706
|
+
`)}export{Te as ModularInitOrchestrator,Pn as createModularInitOrchestrator,Gs as formatInitResultModular,Ws as quickInitModular};
|