@poetic-ai/poetic 1.42.1-bootstrap.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/SECURITY.md +47 -0
- package/.nvmrc +1 -0
- package/.poetic/README.md +37 -0
- package/.poetic/providers/catalog.json +12051 -0
- package/.poetic/providers/pricing.json +1272 -0
- package/.poetic/providers/registry.json +3369 -0
- package/CHANGELOG.md +552 -0
- package/CODE_OF_CONDUCT.md +40 -0
- package/CONTRIBUTING.md +23 -0
- package/INSTALL.md +454 -0
- package/LICENSE +21 -0
- package/README.md +474 -0
- package/dist/BasicOptimizationCompetitionRunner-5H5TBYO4.js +153 -0
- package/dist/ExecutionTracker-UVONC4C6.js +16 -0
- package/dist/OptimizationConfig-7DFY2TST.js +17 -0
- package/dist/OptimizationEngine-MXTSOSST.js +1597 -0
- package/dist/PromptStore-U6ZD3ZMQ.js +18 -0
- package/dist/actions-M3AESHFF.js +322 -0
- package/dist/agent-ingest-HO77TH26.js +53 -0
- package/dist/aggregator-DNCBINFO.js +12 -0
- package/dist/ai-judge-LDWHURKK.js +156 -0
- package/dist/allowlist-grounding-RO6HKUFI.js +16 -0
- package/dist/allowlist-utils-23V7TJ3G.js +28 -0
- package/dist/anchored-turn-service-GFYU6GCQ.js +489 -0
- package/dist/api-transport-FS3CQRMN.js +1087 -0
- package/dist/apply-completion-mode-JBT2CTQO.js +89 -0
- package/dist/artifact-migrator-23L45ISD.js +267 -0
- package/dist/ask-UYVZY7JH.js +135 -0
- package/dist/auth-CSQP5RHJ.js +67 -0
- package/dist/auth-E6XUNZ5M.js +68 -0
- package/dist/auth-KQLJPZ2E.js +134 -0
- package/dist/auth-OC4E6633.js +71 -0
- package/dist/auth-R3NQ2ZF5.js +78 -0
- package/dist/auth-S4CTX4GQ.js +44 -0
- package/dist/auth-YLH3S7EY.js +69 -0
- package/dist/auth-liveness-TDDEZY3T.js +46 -0
- package/dist/auto-optimizer-HA3T23SF.js +80 -0
- package/dist/autoloop-cleanup-JOGKTLWA.js +109 -0
- package/dist/autoloop-evidence-gates-ACB5YW5G.js +36 -0
- package/dist/autoloop-gate-policy-XZA5EQFN.js +175 -0
- package/dist/autoloop-helpers-EFJLBQUP.js +22 -0
- package/dist/autoloop-ledger-W7QO62PX.js +96 -0
- package/dist/autoloop-ledger-subscriber-Z5RW5EIE.js +162 -0
- package/dist/autoloop-run-defaults-FERGRZGP.js +19 -0
- package/dist/autoloop-run-lock-CT2NWSV3.js +197 -0
- package/dist/autoloop-success-OPR74YEX.js +85 -0
- package/dist/autoloop-termination-summary-RN75F422.js +58 -0
- package/dist/autoloop-trajectory-K5I45UBR.js +282 -0
- package/dist/autoloop-wall-clock-T7ZVIQOC.js +12 -0
- package/dist/autonomous-loop-controller-4QJMOIIN.js +4120 -0
- package/dist/backend-P3DAYRP7.js +29 -0
- package/dist/background-executor-CBN552V4.js +257 -0
- package/dist/backlog-execution-intent-U4XYPTV6.js +15 -0
- package/dist/backup-active-store-5WXG6SXT.js +17 -0
- package/dist/backup-telemetry-db-XGLXAA3N.js +254 -0
- package/dist/basic-competition-master-WXZHUT42.js +344 -0
- package/dist/branch-archive-manager-RP6FP3ZC.js +254 -0
- package/dist/branch-cleanup-manager-RSHAI7YR.js +20 -0
- package/dist/build-gate-YFASRB5Z.js +71 -0
- package/dist/change-summary-WY7J5TOX.js +33 -0
- package/dist/chunk-25QL3M3L.js +899 -0
- package/dist/chunk-2ABC6SEC.js +2626 -0
- package/dist/chunk-2AICM4P3.js +1763 -0
- package/dist/chunk-2AQUWJPW.js +225 -0
- package/dist/chunk-2DY5KNVM.js +276 -0
- package/dist/chunk-2QJ3H3L7.js +42 -0
- package/dist/chunk-2UH6VQRZ.js +328 -0
- package/dist/chunk-2VSQMRCB.js +18 -0
- package/dist/chunk-2XQXYBM2.js +130 -0
- package/dist/chunk-2YFUIER7.js +426 -0
- package/dist/chunk-2YXZCZTX.js +1160 -0
- package/dist/chunk-32VLDFRT.js +797 -0
- package/dist/chunk-34CNP2HB.js +148 -0
- package/dist/chunk-35P3W3JX.js +456 -0
- package/dist/chunk-36PEBZAF.js +18 -0
- package/dist/chunk-3733QTI7.js +6818 -0
- package/dist/chunk-3A5PDH5L.js +12513 -0
- package/dist/chunk-3AOKYKA7.js +22 -0
- package/dist/chunk-3BCUNHKF.js +475 -0
- package/dist/chunk-3C26DPFK.js +566 -0
- package/dist/chunk-3FLXLLB7.js +26 -0
- package/dist/chunk-3FOZ2VHV.js +100 -0
- package/dist/chunk-3G6FZCRF.js +106 -0
- package/dist/chunk-3JWNRJSB.js +736 -0
- package/dist/chunk-3LUMR3D3.js +156 -0
- package/dist/chunk-3M57DADF.js +44 -0
- package/dist/chunk-3S62LLWJ.js +543 -0
- package/dist/chunk-3VABAKT2.js +1784 -0
- package/dist/chunk-44N5WZZH.js +45 -0
- package/dist/chunk-45FPSA3B.js +125 -0
- package/dist/chunk-4BIPZBT7.js +791 -0
- package/dist/chunk-4BJ3O4RQ.js +929 -0
- package/dist/chunk-4BTDUT2S.js +42 -0
- package/dist/chunk-4CSS7WVI.js +143 -0
- package/dist/chunk-4CUY7AFY.js +247 -0
- package/dist/chunk-4HN6DF7V.js +1027 -0
- package/dist/chunk-4HXKHDNH.js +1064 -0
- package/dist/chunk-4KKI477Q.js +44 -0
- package/dist/chunk-4NA7FSTV.js +595 -0
- package/dist/chunk-4NXPXE62.js +84 -0
- package/dist/chunk-4SALLK63.js +9831 -0
- package/dist/chunk-4SHKPCGK.js +110 -0
- package/dist/chunk-4VJITV4P.js +445 -0
- package/dist/chunk-4W2NRXQL.js +1205 -0
- package/dist/chunk-4XICK3HN.js +784 -0
- package/dist/chunk-55EJVV3C.js +385 -0
- package/dist/chunk-5DLKYTQX.js +4003 -0
- package/dist/chunk-5EERLVZB.js +139 -0
- package/dist/chunk-5HDP7XZG.js +91 -0
- package/dist/chunk-5LAMRH4X.js +969 -0
- package/dist/chunk-5REDMNLZ.js +310 -0
- package/dist/chunk-5UCJARII.js +1984 -0
- package/dist/chunk-5WCQRDRB.js +588 -0
- package/dist/chunk-5WRLK5KW.js +700 -0
- package/dist/chunk-66AGFTBQ.js +131 -0
- package/dist/chunk-66CIO2SV.js +48 -0
- package/dist/chunk-6BM72ZMG.js +31 -0
- package/dist/chunk-6BTFXYRO.js +276 -0
- package/dist/chunk-6EDAJH2I.js +68 -0
- package/dist/chunk-6EQKFDBH.js +457 -0
- package/dist/chunk-6KMJKHIQ.js +2193 -0
- package/dist/chunk-6MFRHTRI.js +115 -0
- package/dist/chunk-6QMUKUHH.js +632 -0
- package/dist/chunk-6TZJRKNW.js +321 -0
- package/dist/chunk-6V7HGQFZ.js +20 -0
- package/dist/chunk-6Y5TWI7H.js +146 -0
- package/dist/chunk-6Y5U7UFY.js +91 -0
- package/dist/chunk-6ZLAK3XG.js +14 -0
- package/dist/chunk-72XCRQED.js +34 -0
- package/dist/chunk-72YTZMAM.js +589 -0
- package/dist/chunk-73NCTWKL.js +188 -0
- package/dist/chunk-77I6G4CO.js +1 -0
- package/dist/chunk-7D7QT3BE.js +688 -0
- package/dist/chunk-7DNSNKJV.js +78 -0
- package/dist/chunk-7FMJVYBS.js +307 -0
- package/dist/chunk-7GDRQBQC.js +419 -0
- package/dist/chunk-7IL4A2PP.js +948 -0
- package/dist/chunk-7NPSXSHO.js +975 -0
- package/dist/chunk-7PS6INZP.js +302 -0
- package/dist/chunk-7QCZSLBH.js +1 -0
- package/dist/chunk-7R2WLDOS.js +62 -0
- package/dist/chunk-7XV3QXLT.js +878 -0
- package/dist/chunk-A2WKSVX7.js +43 -0
- package/dist/chunk-A3YGID55.js +133 -0
- package/dist/chunk-A5MRWHMI.js +1604 -0
- package/dist/chunk-A722DEVA.js +14 -0
- package/dist/chunk-AG2Z2SUZ.js +554 -0
- package/dist/chunk-AHWAZ2MU.js +137 -0
- package/dist/chunk-AIAQ3HS3.js +119 -0
- package/dist/chunk-ALAB3PBR.js +2206 -0
- package/dist/chunk-APPNGGN7.js +365 -0
- package/dist/chunk-APV6MK5E.js +137 -0
- package/dist/chunk-AQNPGRWS.js +395 -0
- package/dist/chunk-ASEP3M2W.js +968 -0
- package/dist/chunk-AT4TNPWW.js +2931 -0
- package/dist/chunk-ATVKCSGT.js +250 -0
- package/dist/chunk-AX6GWE7V.js +47 -0
- package/dist/chunk-AZQILSNQ.js +1376 -0
- package/dist/chunk-B76KHLX6.js +13 -0
- package/dist/chunk-BAV2HJXS.js +194 -0
- package/dist/chunk-BBHRN366.js +89 -0
- package/dist/chunk-BCZAENOH.js +448 -0
- package/dist/chunk-BIGSACCY.js +19527 -0
- package/dist/chunk-BPYMCIVD.js +9243 -0
- package/dist/chunk-BSE4R6XD.js +322 -0
- package/dist/chunk-BVPWRDCO.js +2321 -0
- package/dist/chunk-BXI4NXL3.js +507 -0
- package/dist/chunk-C3L6YQ7P.js +147 -0
- package/dist/chunk-C57KJOUQ.js +121 -0
- package/dist/chunk-CCV7BPSY.js +118 -0
- package/dist/chunk-CD7ISXA4.js +826 -0
- package/dist/chunk-CE5OZBYY.js +21 -0
- package/dist/chunk-CFBIG37O.js +154 -0
- package/dist/chunk-CHQV73H5.js +408 -0
- package/dist/chunk-CJC6GZ46.js +457 -0
- package/dist/chunk-CJHRFSNY.js +924 -0
- package/dist/chunk-CKP2Q3TP.js +1905 -0
- package/dist/chunk-CLKSETWE.js +10 -0
- package/dist/chunk-CQM3A35X.js +844 -0
- package/dist/chunk-CSLAS5GW.js +4007 -0
- package/dist/chunk-CTLUBNCW.js +622 -0
- package/dist/chunk-CVMVZWG4.js +3544 -0
- package/dist/chunk-CYB6QDCT.js +263 -0
- package/dist/chunk-D5EP5D2W.js +26 -0
- package/dist/chunk-DC4ZYMXJ.js +115 -0
- package/dist/chunk-DCAVAABI.js +348 -0
- package/dist/chunk-DCYF7EKG.js +26 -0
- package/dist/chunk-DF5SLDE4.js +966 -0
- package/dist/chunk-DN7UMLF7.js +5678 -0
- package/dist/chunk-DSFM56OA.js +1203 -0
- package/dist/chunk-DTY4APYV.js +218 -0
- package/dist/chunk-E3NTPHEO.js +194 -0
- package/dist/chunk-E74LUIID.js +302 -0
- package/dist/chunk-EJ42BNGY.js +2904 -0
- package/dist/chunk-EJ4ZAWLV.js +305 -0
- package/dist/chunk-EJGCZGUF.js +1483 -0
- package/dist/chunk-EK2U3YEG.js +486 -0
- package/dist/chunk-ELMFYNV7.js +109 -0
- package/dist/chunk-ENRGKNR5.js +25 -0
- package/dist/chunk-EQGIDAUF.js +62 -0
- package/dist/chunk-EX3OM35G.js +20414 -0
- package/dist/chunk-F5JO7HAS.js +94 -0
- package/dist/chunk-F7ER6ANO.js +174 -0
- package/dist/chunk-FATUVIIN.js +374 -0
- package/dist/chunk-FC23CTXV.js +322 -0
- package/dist/chunk-FCNAS3W2.js +1033 -0
- package/dist/chunk-FD4ERYEG.js +22 -0
- package/dist/chunk-FDVZLG6Z.js +3104 -0
- package/dist/chunk-FEPIFY7D.js +511 -0
- package/dist/chunk-FEQ4HXL7.js +412 -0
- package/dist/chunk-FFH5HHJU.js +5351 -0
- package/dist/chunk-FH7WOJAE.js +79 -0
- package/dist/chunk-FKAUPHMR.js +96 -0
- package/dist/chunk-FRG57FPM.js +240 -0
- package/dist/chunk-FUVP64ER.js +31 -0
- package/dist/chunk-G2PTLLEL.js +284 -0
- package/dist/chunk-G35UYQ6Z.js +69 -0
- package/dist/chunk-G36W2T2S.js +1143 -0
- package/dist/chunk-G4THLFV3.js +148 -0
- package/dist/chunk-GAFJEYLK.js +29 -0
- package/dist/chunk-GCCAPO3S.js +118 -0
- package/dist/chunk-GG6KJYW6.js +85 -0
- package/dist/chunk-GHHFDU2U.js +55 -0
- package/dist/chunk-GHTZSQB7.js +57 -0
- package/dist/chunk-GJTWJNLV.js +1374 -0
- package/dist/chunk-GKN3HMN4.js +2809 -0
- package/dist/chunk-GNH3QGTL.js +1342 -0
- package/dist/chunk-GOAQ2I7Y.js +7000 -0
- package/dist/chunk-GSGD5E4C.js +30 -0
- package/dist/chunk-GXWAJQOJ.js +5011 -0
- package/dist/chunk-H2AYQIHW.js +224 -0
- package/dist/chunk-H6G7QRMQ.js +35 -0
- package/dist/chunk-H7JAGHZT.js +59 -0
- package/dist/chunk-HAC6EHZZ.js +79 -0
- package/dist/chunk-HE2KH6EQ.js +161 -0
- package/dist/chunk-HIHENQDX.js +66 -0
- package/dist/chunk-HIO33P3G.js +19 -0
- package/dist/chunk-HK4AQZSR.js +438 -0
- package/dist/chunk-HMVQIPH3.js +547 -0
- package/dist/chunk-HOYBYAOA.js +257 -0
- package/dist/chunk-HQLGXODD.js +123 -0
- package/dist/chunk-HQXYYUNY.js +1231 -0
- package/dist/chunk-HY3ESWCA.js +708 -0
- package/dist/chunk-I46EG2XQ.js +65 -0
- package/dist/chunk-I4NPDSCB.js +279 -0
- package/dist/chunk-I5WRT7ZR.js +514 -0
- package/dist/chunk-I6BL3PDH.js +1024 -0
- package/dist/chunk-IATQ7NBI.js +679 -0
- package/dist/chunk-IC7I6YIJ.js +301 -0
- package/dist/chunk-IDCSOZVN.js +78 -0
- package/dist/chunk-IEXU4RR6.js +5742 -0
- package/dist/chunk-IFCBYECK.js +112 -0
- package/dist/chunk-IFZCPEY2.js +66 -0
- package/dist/chunk-IKFP2KUR.js +48 -0
- package/dist/chunk-IP7BYVUV.js +338 -0
- package/dist/chunk-IRJ2I6KH.js +166 -0
- package/dist/chunk-IUXNGKA6.js +152 -0
- package/dist/chunk-IZYIQQ7X.js +53 -0
- package/dist/chunk-IZZK3H6I.js +2175 -0
- package/dist/chunk-J3J4P7RW.js +353 -0
- package/dist/chunk-J62KPGII.js +464 -0
- package/dist/chunk-J6P3FWWW.js +130 -0
- package/dist/chunk-JD6SIZED.js +712 -0
- package/dist/chunk-JEV6UI7H.js +537 -0
- package/dist/chunk-JKBHJQMT.js +434 -0
- package/dist/chunk-JLS65NUQ.js +14 -0
- package/dist/chunk-JOSYEJKY.js +141 -0
- package/dist/chunk-JPKSXKNB.js +94 -0
- package/dist/chunk-JQD5VYKR.js +483 -0
- package/dist/chunk-JSOWEFEQ.js +351 -0
- package/dist/chunk-JSWMRQYG.js +28 -0
- package/dist/chunk-K4XK7SGB.js +6783 -0
- package/dist/chunk-K54Y7MLK.js +160 -0
- package/dist/chunk-KAT4RXUT.js +521 -0
- package/dist/chunk-KDMKKIRK.js +103 -0
- package/dist/chunk-KM3F7SYE.js +702 -0
- package/dist/chunk-KNDYMVWN.js +102 -0
- package/dist/chunk-KNT72VR6.js +132 -0
- package/dist/chunk-KQEBSK3T.js +274 -0
- package/dist/chunk-KT6VHSPF.js +84 -0
- package/dist/chunk-KTMW65UX.js +14 -0
- package/dist/chunk-L4427KOE.js +26 -0
- package/dist/chunk-L6OM4A22.js +189 -0
- package/dist/chunk-L7E6XCRA.js +1042 -0
- package/dist/chunk-L7JZLXQL.js +173 -0
- package/dist/chunk-LAMKBTXX.js +40 -0
- package/dist/chunk-LDCF2MKN.js +132 -0
- package/dist/chunk-LEIIWPWQ.js +78 -0
- package/dist/chunk-LFTQVYBB.js +31 -0
- package/dist/chunk-LGHII5ET.js +23 -0
- package/dist/chunk-LH34OGSB.js +265 -0
- package/dist/chunk-LO3X5NLS.js +326 -0
- package/dist/chunk-LPITVM7M.js +339 -0
- package/dist/chunk-LR5IJIGV.js +810 -0
- package/dist/chunk-LUVKFFWR.js +315 -0
- package/dist/chunk-LWCBNGH6.js +35 -0
- package/dist/chunk-LWTN3WRV.js +260 -0
- package/dist/chunk-LZBBXYWF.js +1004 -0
- package/dist/chunk-M34PS4NE.js +2213 -0
- package/dist/chunk-M3HQYKQX.js +308 -0
- package/dist/chunk-MCPQNJMK.js +482 -0
- package/dist/chunk-MF5HP6XV.js +221 -0
- package/dist/chunk-MFADRRTR.js +112 -0
- package/dist/chunk-MN6PL4AN.js +120 -0
- package/dist/chunk-MQ4WA34C.js +206 -0
- package/dist/chunk-MTVZITQ2.js +185 -0
- package/dist/chunk-MWHF5V7U.js +223 -0
- package/dist/chunk-MWHLBPNU.js +211 -0
- package/dist/chunk-MWK5UZQ3.js +1068 -0
- package/dist/chunk-MYLH2S4G.js +64 -0
- package/dist/chunk-MZ5WYKNA.js +28 -0
- package/dist/chunk-N5DX4JAK.js +12 -0
- package/dist/chunk-NEDCMN7E.js +415 -0
- package/dist/chunk-NEQUQHOX.js +223 -0
- package/dist/chunk-NGK6PEOG.js +25 -0
- package/dist/chunk-NM6PMYY4.js +768 -0
- package/dist/chunk-NOZGR2QO.js +2373 -0
- package/dist/chunk-NP2V3L7K.js +226 -0
- package/dist/chunk-NPZJMUZ4.js +194 -0
- package/dist/chunk-NRLY536M.js +260 -0
- package/dist/chunk-NS33V3IM.js +51 -0
- package/dist/chunk-NWOYOA6H.js +378 -0
- package/dist/chunk-NWRUSEXG.js +322 -0
- package/dist/chunk-O6V4PNLO.js +63 -0
- package/dist/chunk-OGMSYL6J.js +227 -0
- package/dist/chunk-OIS7J26S.js +319 -0
- package/dist/chunk-OKBTRSZI.js +205 -0
- package/dist/chunk-OMX5VL43.js +79 -0
- package/dist/chunk-ON3G73BU.js +264 -0
- package/dist/chunk-OPYFYTWQ.js +220 -0
- package/dist/chunk-OQ6K46CK.js +1734 -0
- package/dist/chunk-OSDYVKHW.js +2440 -0
- package/dist/chunk-OUM5S64R.js +3429 -0
- package/dist/chunk-OWB7JXUS.js +751 -0
- package/dist/chunk-OYZYO7TV.js +47 -0
- package/dist/chunk-P47VN5F4.js +282 -0
- package/dist/chunk-P6VQROCO.js +594 -0
- package/dist/chunk-P7CQGPLS.js +30 -0
- package/dist/chunk-PA6BCSOX.js +2872 -0
- package/dist/chunk-PGSPX4SU.js +15 -0
- package/dist/chunk-PIKLF7BM.js +432 -0
- package/dist/chunk-PJWJ3SAV.js +22 -0
- package/dist/chunk-PKIFMV72.js +100 -0
- package/dist/chunk-PTH5E5XO.js +195 -0
- package/dist/chunk-PYITM4N2.js +79 -0
- package/dist/chunk-PZ5AY32C.js +10 -0
- package/dist/chunk-Q3RO7N35.js +45 -0
- package/dist/chunk-Q3WIC6GQ.js +2670 -0
- package/dist/chunk-QGJDMEOV.js +34 -0
- package/dist/chunk-QJYIHVXT.js +100 -0
- package/dist/chunk-QNOB37UH.js +58 -0
- package/dist/chunk-QOCOVLUH.js +462 -0
- package/dist/chunk-QTCJ5CC5.js +172 -0
- package/dist/chunk-QU6JQJMH.js +3063 -0
- package/dist/chunk-QVFV5IP2.js +232 -0
- package/dist/chunk-QVZMFDYG.js +29 -0
- package/dist/chunk-R2ZYWNW3.js +1581 -0
- package/dist/chunk-R4UWBC35.js +200 -0
- package/dist/chunk-R6W23LKN.js +254 -0
- package/dist/chunk-RAK5HOIJ.js +459 -0
- package/dist/chunk-RDFRCT64.js +168 -0
- package/dist/chunk-RE5VZDFQ.js +58 -0
- package/dist/chunk-RGROYC2G.js +638 -0
- package/dist/chunk-RGWHUI5E.js +68 -0
- package/dist/chunk-RHVG6UNL.js +205 -0
- package/dist/chunk-RI4EX2QE.js +18 -0
- package/dist/chunk-RIKFAWZF.js +71 -0
- package/dist/chunk-RJAAKDRX.js +17 -0
- package/dist/chunk-RSXSD4MH.js +1016 -0
- package/dist/chunk-RW7RVSDV.js +79 -0
- package/dist/chunk-RWREC3KJ.js +517 -0
- package/dist/chunk-RZY7RKM5.js +500 -0
- package/dist/chunk-S2MNWFAG.js +52 -0
- package/dist/chunk-S2VQCZO4.js +22 -0
- package/dist/chunk-S54MKU6V.js +117 -0
- package/dist/chunk-S77XPALC.js +239 -0
- package/dist/chunk-SCW4ZF6R.js +150 -0
- package/dist/chunk-SKHGYQ7W.js +405 -0
- package/dist/chunk-SNLBO4BF.js +247 -0
- package/dist/chunk-SP3LFU6B.js +60 -0
- package/dist/chunk-SQZRPY23.js +5181 -0
- package/dist/chunk-SSB5UQHA.js +4128 -0
- package/dist/chunk-STJOHHSF.js +605 -0
- package/dist/chunk-STV6LYYE.js +45 -0
- package/dist/chunk-SUN4OFTW.js +740 -0
- package/dist/chunk-SURZ2WFE.js +326 -0
- package/dist/chunk-SUZ7UYZH.js +1972 -0
- package/dist/chunk-SZ7DL357.js +1047 -0
- package/dist/chunk-T2SZELJL.js +624 -0
- package/dist/chunk-T6VPI2XP.js +10338 -0
- package/dist/chunk-TAJPCXSB.js +13 -0
- package/dist/chunk-TAOOYK3P.js +358 -0
- package/dist/chunk-TDSEX5CF.js +24 -0
- package/dist/chunk-TFTGP7Z7.js +174 -0
- package/dist/chunk-TGON4N4O.js +197 -0
- package/dist/chunk-TIBZPAD2.js +9924 -0
- package/dist/chunk-TK644IOG.js +1813 -0
- package/dist/chunk-TRSVUPCX.js +25 -0
- package/dist/chunk-TSPQONRT.js +4533 -0
- package/dist/chunk-TSXGRLPR.js +107 -0
- package/dist/chunk-TWYLVAS2.js +152 -0
- package/dist/chunk-U2S3YEX3.js +224 -0
- package/dist/chunk-U32HWI76.js +437 -0
- package/dist/chunk-U45RTRGY.js +818 -0
- package/dist/chunk-U62VCQGR.js +49 -0
- package/dist/chunk-UDMS5AD3.js +307 -0
- package/dist/chunk-UGX7GI37.js +94 -0
- package/dist/chunk-UH3JJSHK.js +1 -0
- package/dist/chunk-UHRBTZYY.js +208 -0
- package/dist/chunk-UHT2KRG5.js +193 -0
- package/dist/chunk-UI2F6DJ5.js +118 -0
- package/dist/chunk-UKMAFG7A.js +189 -0
- package/dist/chunk-UUH2RVKS.js +585 -0
- package/dist/chunk-UVBBFDFQ.js +270 -0
- package/dist/chunk-UXZF3B7T.js +75 -0
- package/dist/chunk-V6YLL5WA.js +3746 -0
- package/dist/chunk-V72RMBM4.js +48 -0
- package/dist/chunk-VBNCKCCI.js +16 -0
- package/dist/chunk-VCAUV5XQ.js +3679 -0
- package/dist/chunk-VDSH7O4Y.js +152 -0
- package/dist/chunk-VNSYKC25.js +24 -0
- package/dist/chunk-VTLNJQ44.js +133 -0
- package/dist/chunk-VV6HOXRC.js +302 -0
- package/dist/chunk-VVGEPBPS.js +218 -0
- package/dist/chunk-VXF4Q3FW.js +20 -0
- package/dist/chunk-W3ZGW3C5.js +331 -0
- package/dist/chunk-W4OMESPG.js +271 -0
- package/dist/chunk-WDUORIHF.js +877 -0
- package/dist/chunk-WDVTY4U6.js +148 -0
- package/dist/chunk-WGXYDLMX.js +4386 -0
- package/dist/chunk-WMPU2UOV.js +82 -0
- package/dist/chunk-WOEVVPDP.js +1125 -0
- package/dist/chunk-WTLMSPBQ.js +256 -0
- package/dist/chunk-X43NMU4Z.js +1124 -0
- package/dist/chunk-X5NTI5U5.js +368 -0
- package/dist/chunk-X6UIEADS.js +949 -0
- package/dist/chunk-XAONGNST.js +57 -0
- package/dist/chunk-XB5YLCLB.js +13 -0
- package/dist/chunk-XGYF2QMZ.js +351 -0
- package/dist/chunk-XHEKQENB.js +255 -0
- package/dist/chunk-XPHKYHO4.js +878 -0
- package/dist/chunk-XQD2B6BB.js +507 -0
- package/dist/chunk-XT2ZQVTC.js +558 -0
- package/dist/chunk-XUSRFFA7.js +1859 -0
- package/dist/chunk-XUXVDPSZ.js +50 -0
- package/dist/chunk-XV7NZL4B.js +57 -0
- package/dist/chunk-XXCGJGSQ.js +121 -0
- package/dist/chunk-XYGDZCB5.js +659 -0
- package/dist/chunk-XZAMZUX5.js +992 -0
- package/dist/chunk-XZE4XARH.js +563 -0
- package/dist/chunk-Y34DUC4A.js +1356 -0
- package/dist/chunk-Y3J4JMTU.js +61 -0
- package/dist/chunk-Y4RC2YFX.js +1270 -0
- package/dist/chunk-Y55LZN5U.js +52 -0
- package/dist/chunk-Y5677NDO.js +183 -0
- package/dist/chunk-YESZJFK6.js +220 -0
- package/dist/chunk-YGXKOBQQ.js +292 -0
- package/dist/chunk-YMX76IOS.js +31 -0
- package/dist/chunk-YOTXESEH.js +257 -0
- package/dist/chunk-YQAAKTVH.js +712 -0
- package/dist/chunk-YVORHQ2S.js +579 -0
- package/dist/chunk-YWNAHW24.js +1552 -0
- package/dist/chunk-Z476RATD.js +1689 -0
- package/dist/chunk-ZDTGECTN.js +235 -0
- package/dist/chunk-ZDTMICNY.js +316 -0
- package/dist/chunk-ZIPWI2LY.js +151 -0
- package/dist/chunk-ZIVYXF7A.js +2344 -0
- package/dist/chunk-ZX65UI5W.js +78 -0
- package/dist/chunk-ZYG7GGKO.js +218 -0
- package/dist/chunk-ZZZUL4OF.js +38 -0
- package/dist/cli-utils-HUOTBRM3.js +40 -0
- package/dist/cli-validation-WLXWLUJL.js +111 -0
- package/dist/commit-utils-3QV2P6RA.js +202 -0
- package/dist/compete-config-resolver-SNH3TT2Q.js +76 -0
- package/dist/compete-request-XWNPOARL.js +364 -0
- package/dist/compete-results-PAP67LDR.js +208 -0
- package/dist/competition-outcome-tracker-GOZXNAQU.js +38 -0
- package/dist/config-HWHUNA72.js +166 -0
- package/dist/config-audit-EL3GHXS7.js +360 -0
- package/dist/config-explain-TNILDEVJ.js +12 -0
- package/dist/config-loader-VPFPFO4B.js +38 -0
- package/dist/config-manager-L3VRNTSG.js +67 -0
- package/dist/config-validator-SIIQEOFQ.js +72 -0
- package/dist/cost-7CX37DU3.js +53 -0
- package/dist/coverage-orchestrator-MNKHD6YC.js +772 -0
- package/dist/coverage-scanner-YVD62MLH.js +12 -0
- package/dist/createCompetitionRunner-LJG6ZQSO.js +46 -0
- package/dist/data-migration-state-VJK64DLT.js +31 -0
- package/dist/db-migrator-XSEIOGWY.js +34 -0
- package/dist/discovery-JGYGDD25.js +25 -0
- package/dist/doctor-CGBCD7IQ.js +186 -0
- package/dist/domain-analyzer-DL6BDR2N.js +29 -0
- package/dist/ensure-initialized-4BY73HLE.js +52 -0
- package/dist/entry.js +940 -0
- package/dist/environment-IGVH5X53.js +81 -0
- package/dist/error-parser-core-PPZ36A4S.js +50 -0
- package/dist/escalation-ladder-NWY5BJ57.js +130 -0
- package/dist/evaluation-context-KMWDSDYD.js +35 -0
- package/dist/evidence-plan-resolver-YIVH76PU.js +85 -0
- package/dist/execution-data-writer-OHAQ7G5H.js +53 -0
- package/dist/execution-policy-applier-ZHD3DCF3.js +31 -0
- package/dist/execution-preflight-Z4Y64V3I.js +209 -0
- package/dist/execution-roles-KBH2MC3M.js +66 -0
- package/dist/exit-code-error-Z4SW2DVK.js +14 -0
- package/dist/external-temp-cleanup-N2RZH4QP.js +311 -0
- package/dist/factory-IYBMCZG7.js +149 -0
- package/dist/file-utils-XIVR2ZMA.js +47 -0
- package/dist/flywheel-autoloop-executor-R3KD2G4D.js +249 -0
- package/dist/flywheel-competition-executor-XCFGVJSK.js +259 -0
- package/dist/flywheel-executor-LTSIZN2L.js +369 -0
- package/dist/flywheel-git-isolation-CZ5YVVZY.js +48 -0
- package/dist/flywheel-manifest-5UC4VBMA.js +108 -0
- package/dist/flywheel-model-defaults-7CVKP53V.js +27 -0
- package/dist/flywheel-preflight-6E33DJDK.js +104 -0
- package/dist/flywheel-resume-7HELH7QS.js +23 -0
- package/dist/flywheel-safety-7U7DPOAP.js +28 -0
- package/dist/flywheel-scope-decision-ZHKF6ZIN.js +11 -0
- package/dist/get-telemetry-logger-AZ46EPRP.js +73 -0
- package/dist/git-worktree-IY6V6DUO.js +18 -0
- package/dist/github-pr-manager-4XUO2YTM.js +211 -0
- package/dist/guidance-profile-config-E7XJL2VP.js +117 -0
- package/dist/guidance-profile-renderer-QK2YMAAP.js +21 -0
- package/dist/index-query-4JEUKA44.js +31 -0
- package/dist/index.js +108644 -0
- package/dist/instructions-CM6THDV7.js +64 -0
- package/dist/invoke-provider-auth-V5TC5UDS.js +223 -0
- package/dist/judge-scoring.json +80 -0
- package/dist/judge-test.js +555 -0
- package/dist/lab-mode-OTWVHN63.js +39 -0
- package/dist/lab-utils-VA6VXNOV.js +23 -0
- package/dist/linux-host-class-UY4KVLFD.js +29 -0
- package/dist/llm-judge-executor-34YPIRJ7.js +133 -0
- package/dist/local-executor-LJJSCWZX.js +223 -0
- package/dist/logger-6PRYM56M.js +72 -0
- package/dist/loop-spec-XTLQAVZ7.js +191 -0
- package/dist/manager-2HJG5CLT.js +25 -0
- package/dist/matrix-prompt-builder-LHDTJ4TY.js +497 -0
- package/dist/matrix-result-parser-7W35EUOV.js +15 -0
- package/dist/metadata-HQ43NDEK.js +22 -0
- package/dist/model-invocations-db-QBO4Y7WZ.js +38 -0
- package/dist/monitor-MCI3F4PX.js +72 -0
- package/dist/next-HQKDXIIR.js +90 -0
- package/dist/next-JC3V2UCS.js +69 -0
- package/dist/optimization-config-resolver-QPSFLCJU.js +75 -0
- package/dist/package-3YCWIQQ5.js +10 -0
- package/dist/parallel-orchestrator-NL7YJJU2.js +297 -0
- package/dist/parallel-worker.js +279 -0
- package/dist/parse-git-status-PIAF3OTP.js +10 -0
- package/dist/path-security-ETTH6TZL.js +39 -0
- package/dist/pattern-bank-UNJR5ADV.js +15 -0
- package/dist/plan-backlog-list-fast-DZK24LSZ.js +270 -0
- package/dist/plan-backlog-show-fast-63GBBH6Q.js +406 -0
- package/dist/plan-sprint-list-fast-TJ6ZUF5E.js +162 -0
- package/dist/plan-sprint-status-fast-YWE5X3NG.js +208 -0
- package/dist/plan-task-status-fast-K22BTTBW.js +349 -0
- package/dist/plan-to-flywheel-VFGCPINA.js +456 -0
- package/dist/planning-backlog-Y6TIJYWU.js +319 -0
- package/dist/poetic-root-V5DNXEAE.js +17 -0
- package/dist/preflight-OPANWMME.js +12 -0
- package/dist/process-registry-PDZJPTAS.js +27 -0
- package/dist/process-scanner-C22SYXYD.js +22 -0
- package/dist/processes-KMQUD7HY.js +29 -0
- package/dist/processes-json-fast-IBDXZ6WW.js +135 -0
- package/dist/profile-2XP3FWH2.js +149 -0
- package/dist/prompts-EPAAAMMF.js +168 -0
- package/dist/protected-branches-RNTEX7ET.js +57 -0
- package/dist/provider-aware-resource-manager-QBTZJMNP.js +18 -0
- package/dist/provider-matrix-KWTYA5QV.js +154 -0
- package/dist/provider-matrix-renderer-MZDWKKID.js +139 -0
- package/dist/provider-output-forwarding-DERID3TP.js +30 -0
- package/dist/provider-registry-J5NRBJKI.js +128 -0
- package/dist/provider-temp-cleanup-KYGLF6YU.js +14 -0
- package/dist/prune-engine-Q6E2DXBN.js +451 -0
- package/dist/quality-gate-33SHK43X.js +70 -0
- package/dist/quickstart-E32SODTA.js +62 -0
- package/dist/readiness-REWW7OSV.js +96 -0
- package/dist/registry-N6L36RE2.js +153 -0
- package/dist/repair-helpers-TTV5FEF4.js +117 -0
- package/dist/repo-root-2IGD4H7X.js +22 -0
- package/dist/resolution-engine-LXQYDSKS.js +127 -0
- package/dist/resolve-provider-cli-O2P6XZBZ.js +35 -0
- package/dist/restore-telemetry-db-BQL6DTQF.js +360 -0
- package/dist/result-streamer-WEHW476R.js +19 -0
- package/dist/routing-events-DHPUZDDF.js +27 -0
- package/dist/routing-history-store-UWCEXAP3.js +46 -0
- package/dist/routing-planner-VGQU35QM.js +160 -0
- package/dist/run-poetic-tui-ZZXFDOQ4.js +13517 -0
- package/dist/run-simulation.js +376 -0
- package/dist/runner-2YPKOJ6A.js +1092 -0
- package/dist/runner-HEJJ65AJ.js +1571 -0
- package/dist/safety-OCC4KJJR.js +64 -0
- package/dist/safety-stanza-BSVE6OJU.js +60 -0
- package/dist/sandbox-3AG2WJLM.js +94 -0
- package/dist/sandbox-5JOFBS75.js +81 -0
- package/dist/schema-extensions.sql +234 -0
- package/dist/security-2KI5XNDG.js +17 -0
- package/dist/setup-bb-plugin-QAQWZCV5.js +738 -0
- package/dist/setup-claude-code-P7BTTSPO.js +317 -0
- package/dist/setup-temp-cleanup-GASCWZ2I.js +20 -0
- package/dist/shared-utils-D6U6UREP.js +37 -0
- package/dist/simple-artifact-goal-OTXNGZY6.js +25 -0
- package/dist/sprint-QGXLN3SO.js +338 -0
- package/dist/sprint-bridge-FNKQCJGL.js +68 -0
- package/dist/sprint-execution-service-4ELKNJDS.js +311 -0
- package/dist/sprint-manager-7TNCXCIX.js +91 -0
- package/dist/sqlite-wrapper-UDWCTNLJ.js +17 -0
- package/dist/stale-cleanup-orchestrator-H5XKGZP2.js +62 -0
- package/dist/storage-access-F6ALDN4S.js +22 -0
- package/dist/synthesis-TGQUVAW3.js +185 -0
- package/dist/task-classifier-DZIRBSS2.js +494 -0
- package/dist/task-list-fast-PJ2EXVZE.js +147 -0
- package/dist/task-manager-5742GMJK.js +93 -0
- package/dist/task-splitter-6MBXSWF6.js +79 -0
- package/dist/task-type-detector-OLVOMXZO.js +21 -0
- package/dist/task-type-resolver-4HG6TXFV.js +42 -0
- package/dist/telemetry-JX7EMNOZ.js +131 -0
- package/dist/telemetry-health-tracker-DMSSGBZ2.js +11 -0
- package/dist/telemetry-path-resolver-7ICSG276.js +28 -0
- package/dist/telemetry-reliability-2MLJ4J6B.js +125 -0
- package/dist/token-estimator-PDU345YE.js +37 -0
- package/dist/transports-3UEO6C5Y.js +255 -0
- package/dist/unified-cost-tracker-F3W5NMPG.js +35 -0
- package/dist/unified-state-cleanup-LJPF2BOW.js +276 -0
- package/dist/universal-cost-calculator-BAJV35GA.js +42 -0
- package/dist/user-agents-GHUGCSKN.js +22 -0
- package/dist/variant-delivery-state-XCOYVCM4.js +33 -0
- package/dist/variant-state-cleanup-QIEKRULB.js +280 -0
- package/dist/variant-success-PJXWE3ZV.js +12 -0
- package/dist/variant-worker-HPTUA37Z.js +4196 -0
- package/dist/variant-worker.js +24 -0
- package/dist/variants-2HDYZOCG.js +233 -0
- package/dist/verification-toolchains-VVKT3GBF.js +28 -0
- package/dist/verify-commands-5F6CJV4B.js +37 -0
- package/dist/warning-EGQGUUIO.js +12 -0
- package/dist/work-edge-RWEDWJZF.js +49 -0
- package/dist/work-item-writer-WHAVZXAY.js +19 -0
- package/dist/worker-AGWHD4D2.js +1435 -0
- package/dist/worker.js +19 -0
- package/dist/worktree-metrics-3DFUYVYE.js +26 -0
- package/dist/writeback-VZKHYHSN.js +44 -0
- package/docs/CLI_REFERENCE.md +7040 -0
- package/docs/PROVIDER_SETUP.md +1570 -0
- package/docs/README.md +96 -0
- package/docs/TROUBLESHOOTING.md +2232 -0
- package/docs/getting-started/QUICK_START.md +294 -0
- package/docs/getting-started/README.md +188 -0
- package/docs/getting-started/SETUP.md +52 -0
- package/docs/reference/AGENT_CONTEXT.md +38 -0
- package/docs/reference/PROVIDER_RELEASE_TIERS.md +34 -0
- package/docs/reference/README.md +381 -0
- package/docs/reference/SECURITY.md +262 -0
- package/integrations/bb-plugin-poetic/README.md +362 -0
- package/integrations/bb-plugin-poetic/app.css +341 -0
- package/integrations/bb-plugin-poetic/app.tsx +5059 -0
- package/integrations/bb-plugin-poetic/package.json +45 -0
- package/integrations/bb-plugin-poetic/server.ts +444 -0
- package/integrations/bb-plugin-poetic/src/adapter.ts +3312 -0
- package/integrations/bb-plugin-poetic/src/backlog-authoring-model.ts +150 -0
- package/integrations/bb-plugin-poetic/src/backlog-authoring-schema.ts +355 -0
- package/integrations/bb-plugin-poetic/src/backlog-authoring-service.ts +419 -0
- package/integrations/bb-plugin-poetic/src/backlog-authoring-view.ts +1026 -0
- package/integrations/bb-plugin-poetic/src/competition-defaults-schema.ts +122 -0
- package/integrations/bb-plugin-poetic/src/competition-defaults-service.ts +105 -0
- package/integrations/bb-plugin-poetic/src/competition-defaults-view.ts +138 -0
- package/integrations/bb-plugin-poetic/src/contract.ts +615 -0
- package/integrations/bb-plugin-poetic/src/finalize-model.ts +205 -0
- package/integrations/bb-plugin-poetic/src/finalize-schema.ts +158 -0
- package/integrations/bb-plugin-poetic/src/finalize-service.ts +382 -0
- package/integrations/bb-plugin-poetic/src/finalize-view.ts +159 -0
- package/integrations/bb-plugin-poetic/src/judge-operations-readback.ts +303 -0
- package/integrations/bb-plugin-poetic/src/judge-operations-schema.ts +33 -0
- package/integrations/bb-plugin-poetic/src/judge-operations-view.ts +459 -0
- package/integrations/bb-plugin-poetic/src/model.ts +1302 -0
- package/integrations/bb-plugin-poetic/src/monitor-service.ts +233 -0
- package/integrations/bb-plugin-poetic/src/panel-read-ux.ts +97 -0
- package/integrations/bb-plugin-poetic/src/patch-preview-schema.ts +166 -0
- package/integrations/bb-plugin-poetic/src/patch-preview-service.ts +480 -0
- package/integrations/bb-plugin-poetic/src/patch-preview-view.ts +109 -0
- package/integrations/bb-plugin-poetic/src/planning-readback.ts +204 -0
- package/integrations/bb-plugin-poetic/src/planning-service.ts +594 -0
- package/integrations/bb-plugin-poetic/src/planning-workspace-schema.ts +95 -0
- package/integrations/bb-plugin-poetic/src/planning-workspace.ts +323 -0
- package/integrations/bb-plugin-poetic/src/poll-handoff.ts +136 -0
- package/integrations/bb-plugin-poetic/src/project-target-server.ts +21 -0
- package/integrations/bb-plugin-poetic/src/project-target.ts +45 -0
- package/integrations/bb-plugin-poetic/src/reference-index.ts +192 -0
- package/integrations/bb-plugin-poetic/src/repository-schema.ts +30 -0
- package/integrations/bb-plugin-poetic/src/result-explorer-view.ts +597 -0
- package/integrations/bb-plugin-poetic/src/result-readback-model.ts +163 -0
- package/integrations/bb-plugin-poetic/src/result-readback-schema.ts +319 -0
- package/integrations/bb-plugin-poetic/src/result-readback-service.ts +333 -0
- package/integrations/bb-plugin-poetic/src/run-page-view.ts +177 -0
- package/integrations/bb-plugin-poetic/src/setup-config-schema.ts +291 -0
- package/integrations/bb-plugin-poetic/src/setup-config-service.ts +590 -0
- package/integrations/bb-plugin-poetic/src/setup-config-view.ts +413 -0
- package/integrations/bb-plugin-poetic/src/sprint-close-model.ts +150 -0
- package/integrations/bb-plugin-poetic/src/sprint-close-schema.ts +136 -0
- package/integrations/bb-plugin-poetic/src/sprint-close-service.ts +341 -0
- package/integrations/bb-plugin-poetic/src/sprint-close-view.ts +116 -0
- package/integrations/bb-plugin-poetic/src/sprint-composition-model.ts +714 -0
- package/integrations/bb-plugin-poetic/src/sprint-composition-readback.ts +231 -0
- package/integrations/bb-plugin-poetic/src/sprint-composition-schema.ts +601 -0
- package/integrations/bb-plugin-poetic/src/sprint-composition-service.ts +775 -0
- package/integrations/bb-plugin-poetic/src/sprint-composition-view.ts +1221 -0
- package/integrations/bb-plugin-poetic/src/task-authoring-model.ts +567 -0
- package/integrations/bb-plugin-poetic/src/task-authoring-schema.ts +635 -0
- package/integrations/bb-plugin-poetic/src/task-authoring-service.ts +842 -0
- package/integrations/bb-plugin-poetic/src/task-authoring-view.ts +1227 -0
- package/integrations/bb-plugin-poetic/src/task-detail-readback.ts +56 -0
- package/integrations/bb-plugin-poetic/src/task-detail-schema.ts +144 -0
- package/integrations/bb-plugin-poetic/src/task-navigation.ts +446 -0
- package/integrations/bb-plugin-poetic/src/workbench-route.ts +74 -0
- package/integrations/bb-plugin-poetic/tests/host-contract.test.ts +773 -0
- package/integrations/bb-plugin-poetic/tsconfig.json +18 -0
- package/integrations/bb-plugin-poetic/types/PROVENANCE.json +52 -0
- package/integrations/bb-plugin-poetic/types/bb-plugin-sdk-app.d.ts +1444 -0
- package/integrations/bb-plugin-poetic/types/bb-plugin-sdk.d.ts +13030 -0
- package/integrations/bb-plugin-poetic/vitest.host.config.ts +71 -0
- package/package.json +331 -0
- package/schemas/README.md +80 -0
- package/schemas/config-v1.schema.json +136 -0
- package/schemas/execution-config.schema.json +47 -0
- package/schemas/judge-scoring.schema.json +370 -0
- package/schemas/poetic.config.schema.json +2214 -0
- package/schemas/provider-config.schema.json +203 -0
- package/schemas/telemetry-config.schema.json +79 -0
- package/schemas/user-preferences.schema.json +141 -0
- package/scripts/assert-node-runtime.mjs +140 -0
- package/scripts/preflight-native.mjs +49 -0
- package/scripts/preinstall-node-check.mjs +78 -0
- package/scripts/setup-git-hooks.mjs +24 -0
- package/scripts/sync.sh +2722 -0
- package/scripts/write-node-launcher.sh +108 -0
- package/src/resources/gemini/slash-packs/default/plan.toml +15 -0
- package/src/resources/gemini/slash-packs/default/summary.toml +16 -0
- package/src/resources/gemini/slash-packs/default/tests.toml +16 -0
- package/templates/.poetic/README.md +37 -0
- package/templates/.poetic/agents/README.md +296 -0
- package/templates/.poetic/agents/api-documenter.md +147 -0
- package/templates/.poetic/agents/backend-architect.md +31 -0
- package/templates/.poetic/agents/code-reviewer.md +157 -0
- package/templates/.poetic/agents/data-scientist.md +179 -0
- package/templates/.poetic/agents/database-optimizer.md +145 -0
- package/templates/.poetic/agents/debugger.md +31 -0
- package/templates/.poetic/agents/deployment-engineer.md +164 -0
- package/templates/.poetic/agents/devops-troubleshooter.md +139 -0
- package/templates/.poetic/agents/frontend-developer.md +150 -0
- package/templates/.poetic/agents/javascript-pro.md +36 -0
- package/templates/.poetic/agents/performance-engineer.md +151 -0
- package/templates/.poetic/agents/python-pro.md +137 -0
- package/templates/.poetic/agents/test-automator.md +147 -0
- package/templates/.poetic/agents/typescript-pro.md +34 -0
- package/templates/.poetic/config/poetic.config.jsonc +69 -0
- package/templates/.poetic/config/project-context.template.json +6 -0
- package/templates/.poetic/config/task-type-aliases.presets/kanban.yaml +14 -0
- package/templates/.poetic/config/task-type-aliases.presets/scrum.yaml +17 -0
- package/templates/.poetic/config/task-type-aliases.presets/xp.yaml +12 -0
- package/templates/.poetic/config/task-type-aliases.yaml +28 -0
- package/templates/.poetic/gitignore.template +55 -0
- package/templates/.poetic/task-types/analysis.yaml +40 -0
- package/templates/.poetic/task-types/architecture.yaml +38 -0
- package/templates/.poetic/task-types/doc.yaml +35 -0
- package/templates/.poetic/task-types/feature.yaml +23 -0
- package/templates/.poetic/task-types/general.yaml +6 -0
- package/templates/.poetic/task-types/security.yaml +39 -0
- package/templates/AGENTS.template.md +99 -0
- package/templates/CLAUDE.template.md +1 -0
- package/templates/GEMINI.template.md +1 -0
- package/templates/builtin-workflows/code-review.yaml +73 -0
- package/templates/builtin-workflows/compete-streak.yaml +78 -0
- package/templates/builtin-workflows/hello-verify.yaml +10 -0
- package/templates/builtin-workflows/judge-regression.yaml +114 -0
- package/templates/builtin-workflows/skills/code-review/SKILL.md +60 -0
- package/templates/builtin-workflows/skills/hello-verify/SKILL.md +6 -0
- package/templates/guard-kit/GUARD_SETUP.md.template +255 -0
- package/templates/guard-kit/check.mjs.template +777 -0
- package/templates/guard-kit/config.json.template +6 -0
- package/templates/guard-kit/poetic-guard.yml.template +189 -0
- package/templates/profiles/README.md +56 -0
- package/templates/profiles/frontier-claude.json +27 -0
- package/templates/profiles/frontier-codex.json +26 -0
|
@@ -0,0 +1,1784 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CoreLensEvaluator,
|
|
3
|
+
MultiLensJudge
|
|
4
|
+
} from "./chunk-4SALLK63.js";
|
|
5
|
+
import {
|
|
6
|
+
createPercentScore,
|
|
7
|
+
percentScoreToNumber
|
|
8
|
+
} from "./chunk-TSPQONRT.js";
|
|
9
|
+
import {
|
|
10
|
+
TelemetryLogger
|
|
11
|
+
} from "./chunk-T6VPI2XP.js";
|
|
12
|
+
|
|
13
|
+
// scripts/simulation/analysis.ts
|
|
14
|
+
import { rootMeanSquare, sampleRankCorrelation } from "simple-statistics";
|
|
15
|
+
var MULTI_LENS_CORE_WEIGHTS = [0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1];
|
|
16
|
+
var PLANNING_CAP_VALUES = [30, 40, 50];
|
|
17
|
+
function binomialConfidenceInterval(successes, trials, z = 1.96) {
|
|
18
|
+
if (trials === 0) {
|
|
19
|
+
return [0, 1];
|
|
20
|
+
}
|
|
21
|
+
const p = successes / trials;
|
|
22
|
+
const denominator = 1 + z * z / trials;
|
|
23
|
+
const centre = p + z * z / (2 * trials);
|
|
24
|
+
const margin = z * Math.sqrt(p * (1 - p) / trials + z * z / (4 * trials * trials));
|
|
25
|
+
const lower = (centre - margin) / denominator;
|
|
26
|
+
const upper = (centre + margin) / denominator;
|
|
27
|
+
return [Math.max(0, lower), Math.min(1, upper)];
|
|
28
|
+
}
|
|
29
|
+
function mapEvaluationsToScores(result) {
|
|
30
|
+
if (!result) return null;
|
|
31
|
+
const map = {};
|
|
32
|
+
for (const evaluation of result.evaluations) {
|
|
33
|
+
map[evaluation.variant] = percentScoreToNumber(evaluation.qualityScore);
|
|
34
|
+
}
|
|
35
|
+
return map;
|
|
36
|
+
}
|
|
37
|
+
function clamp01(value) {
|
|
38
|
+
if (!Number.isFinite(value)) return 0;
|
|
39
|
+
return Math.max(0, Math.min(1, value));
|
|
40
|
+
}
|
|
41
|
+
function extractConfidence01(result) {
|
|
42
|
+
if (!result || !result.metadata) return null;
|
|
43
|
+
const meta = result.metadata;
|
|
44
|
+
const rawCandidates = [meta.confidence, meta.confidenceScore];
|
|
45
|
+
for (const raw of rawCandidates) {
|
|
46
|
+
const numeric = Number(raw);
|
|
47
|
+
if (!Number.isFinite(numeric)) continue;
|
|
48
|
+
const normalized = numeric <= 1 ? numeric : numeric / 100;
|
|
49
|
+
return clamp01(normalized);
|
|
50
|
+
}
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
function computeBrier(pairs) {
|
|
54
|
+
if (pairs.length === 0) return void 0;
|
|
55
|
+
const sum = pairs.reduce((acc, { p, y }) => acc + (p - y) * (p - y), 0);
|
|
56
|
+
return sum / pairs.length;
|
|
57
|
+
}
|
|
58
|
+
function computeEce10(pairs) {
|
|
59
|
+
if (pairs.length === 0) return void 0;
|
|
60
|
+
const bins = Array.from({ length: 10 }, () => ({ count: 0, sumP: 0, sumY: 0 }));
|
|
61
|
+
for (const { p, y } of pairs) {
|
|
62
|
+
const idx = Math.min(9, Math.max(0, Math.floor(clamp01(p) * 10)));
|
|
63
|
+
const bin = bins[idx];
|
|
64
|
+
if (!bin) continue;
|
|
65
|
+
bin.count += 1;
|
|
66
|
+
bin.sumP += p;
|
|
67
|
+
bin.sumY += y;
|
|
68
|
+
}
|
|
69
|
+
const total = pairs.length;
|
|
70
|
+
let ece = 0;
|
|
71
|
+
for (const bin of bins) {
|
|
72
|
+
if (bin.count === 0) continue;
|
|
73
|
+
const avgP = bin.sumP / bin.count;
|
|
74
|
+
const acc = bin.sumY / bin.count;
|
|
75
|
+
ece += bin.count / total * Math.abs(acc - avgP);
|
|
76
|
+
}
|
|
77
|
+
return ece;
|
|
78
|
+
}
|
|
79
|
+
function updateSweepBucket(bucket, key, judge, params, matchesGroundTruth) {
|
|
80
|
+
if (!bucket[key]) {
|
|
81
|
+
bucket[key] = { judge, params, winnerMatches: 0, total: 0 };
|
|
82
|
+
}
|
|
83
|
+
const entry = bucket[key];
|
|
84
|
+
if (entry) {
|
|
85
|
+
entry.total += 1;
|
|
86
|
+
if (matchesGroundTruth) {
|
|
87
|
+
entry.winnerMatches += 1;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
function selectGroundTruth(scenario, judge, mode) {
|
|
92
|
+
if (mode === "policy") {
|
|
93
|
+
const policyModel = scenario.groundTruth.policyModels?.[judge];
|
|
94
|
+
if (policyModel) {
|
|
95
|
+
return {
|
|
96
|
+
expectedRanking: policyModel.expectedRanking,
|
|
97
|
+
expectedWinner: policyModel.expectedWinner,
|
|
98
|
+
expectedScores: policyModel.expectedScores
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
expectedRanking: scenario.groundTruth.expectedRanking,
|
|
104
|
+
expectedWinner: scenario.groundTruth.expectedWinner,
|
|
105
|
+
expectedScores: scenario.groundTruth.expectedScores
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function accumulateJudgeStats(bucket, scores, judgeWinner, expected) {
|
|
109
|
+
const actualOrder = Object.keys(scores).sort((a, b) => (scores[b] ?? 0) - (scores[a] ?? 0));
|
|
110
|
+
const expectedList = expected.expectedRanking;
|
|
111
|
+
for (const variantId of expectedList) {
|
|
112
|
+
const expectedRank = expectedList.indexOf(variantId);
|
|
113
|
+
const actualRank = actualOrder.indexOf(variantId);
|
|
114
|
+
if (expectedRank < 0 || actualRank < 0) continue;
|
|
115
|
+
bucket.expectedRanks.push(expectedRank + 1);
|
|
116
|
+
bucket.actualRanks.push(actualRank + 1);
|
|
117
|
+
bucket.diffs.push((scores[variantId] ?? 0) - (expected.expectedScores[variantId] ?? 0));
|
|
118
|
+
}
|
|
119
|
+
const winnerMatches = judgeWinner === expected.expectedWinner;
|
|
120
|
+
if (winnerMatches) bucket.winnerMatches += 1;
|
|
121
|
+
bucket.total += 1;
|
|
122
|
+
return winnerMatches;
|
|
123
|
+
}
|
|
124
|
+
function finalizeAccuracyMetrics(stats, calibrationPairs, agreement) {
|
|
125
|
+
const accuracy = {
|
|
126
|
+
judges: {},
|
|
127
|
+
agreementRate: agreement
|
|
128
|
+
};
|
|
129
|
+
for (const judge of ["multiLens", "hybrid"]) {
|
|
130
|
+
const { expectedRanks, actualRanks, diffs, winnerMatches, total } = stats[judge];
|
|
131
|
+
const rmse = diffs.length > 0 ? rootMeanSquare(diffs) : 0;
|
|
132
|
+
const bias = diffs.length > 0 ? diffs.reduce((acc, value) => acc + value, 0) / diffs.length : 0;
|
|
133
|
+
const correlation = expectedRanks.length > 1 && actualRanks.length > 1 ? sampleRankCorrelation(expectedRanks, actualRanks) : 0;
|
|
134
|
+
const winnerAccuracy = total === 0 ? 0 : winnerMatches / total;
|
|
135
|
+
const pairs = calibrationPairs[judge];
|
|
136
|
+
const brier = computeBrier(pairs);
|
|
137
|
+
const ece = computeEce10(pairs);
|
|
138
|
+
accuracy.judges[judge] = {
|
|
139
|
+
winnerAccuracy,
|
|
140
|
+
winnerAccuracyCI: binomialConfidenceInterval(winnerMatches, total),
|
|
141
|
+
rankingCorrelation: correlation,
|
|
142
|
+
scoreRMSE: rmse,
|
|
143
|
+
scoreBias: bias,
|
|
144
|
+
brierScore: brier,
|
|
145
|
+
expectedCalibrationError: ece,
|
|
146
|
+
calibrationCount: pairs.length
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return accuracy;
|
|
150
|
+
}
|
|
151
|
+
function analyzeSimulationResults(results, prompt, options = {}) {
|
|
152
|
+
const judgeNames = ["multiLens", "hybrid"];
|
|
153
|
+
const legacyStats = {
|
|
154
|
+
multiLens: { expectedRanks: [], actualRanks: [], diffs: [], winnerMatches: 0, total: 0 },
|
|
155
|
+
hybrid: { expectedRanks: [], actualRanks: [], diffs: [], winnerMatches: 0, total: 0 }
|
|
156
|
+
};
|
|
157
|
+
const policyStats = {
|
|
158
|
+
multiLens: { expectedRanks: [], actualRanks: [], diffs: [], winnerMatches: 0, total: 0 },
|
|
159
|
+
hybrid: { expectedRanks: [], actualRanks: [], diffs: [], winnerMatches: 0, total: 0 }
|
|
160
|
+
};
|
|
161
|
+
const legacyCalibrationPairs = {
|
|
162
|
+
multiLens: [],
|
|
163
|
+
hybrid: []
|
|
164
|
+
};
|
|
165
|
+
const policyCalibrationPairs = {
|
|
166
|
+
multiLens: [],
|
|
167
|
+
hybrid: []
|
|
168
|
+
};
|
|
169
|
+
let agreementMatches = 0;
|
|
170
|
+
let agreementTotal = 0;
|
|
171
|
+
const bucketMap = {};
|
|
172
|
+
const coreLens = new CoreLensEvaluator();
|
|
173
|
+
for (const scenario of results) {
|
|
174
|
+
const { groundTruth, variants } = scenario;
|
|
175
|
+
const scenarioPrompt = scenario.scenario.prompt ?? prompt;
|
|
176
|
+
const staticScores = coreLens.evaluate(variants, scenarioPrompt);
|
|
177
|
+
const staticRanking = variants.map((variant, index) => ({ variantId: variant.variant, score: staticScores[index] ?? 0 })).sort((a, b) => (b.score ?? 0) - (a.score ?? 0) || a.variantId.localeCompare(b.variantId));
|
|
178
|
+
const staticWinner = staticRanking[0]?.variantId ?? variants[0]?.variant ?? "unknown";
|
|
179
|
+
const hybridWinner = scenario.hybridResult?.winner ?? staticWinner;
|
|
180
|
+
const hybridScores = mapEvaluationsToScores(scenario.hybridResult);
|
|
181
|
+
const multiLensScores = mapEvaluationsToScores(scenario.multiLensResult);
|
|
182
|
+
for (const judge of judgeNames) {
|
|
183
|
+
const scores = judge === "multiLens" ? multiLensScores : hybridScores;
|
|
184
|
+
if (!scores) {
|
|
185
|
+
continue;
|
|
186
|
+
}
|
|
187
|
+
const judgeResult = scenario[judge === "multiLens" ? "multiLensResult" : "hybridResult"];
|
|
188
|
+
const judgeWinner = judgeResult?.winner;
|
|
189
|
+
const legacyExpected = selectGroundTruth(scenario, judge, "legacy");
|
|
190
|
+
const policyExpected = selectGroundTruth(scenario, judge, "policy");
|
|
191
|
+
const legacyWinnerMatches = accumulateJudgeStats(
|
|
192
|
+
legacyStats[judge],
|
|
193
|
+
scores,
|
|
194
|
+
judgeWinner,
|
|
195
|
+
legacyExpected
|
|
196
|
+
);
|
|
197
|
+
const policyWinnerMatches = accumulateJudgeStats(
|
|
198
|
+
policyStats[judge],
|
|
199
|
+
scores,
|
|
200
|
+
judgeWinner,
|
|
201
|
+
policyExpected
|
|
202
|
+
);
|
|
203
|
+
const p = extractConfidence01(judgeResult);
|
|
204
|
+
if (p !== null) {
|
|
205
|
+
legacyCalibrationPairs[judge].push({ p, y: legacyWinnerMatches ? 1 : 0 });
|
|
206
|
+
policyCalibrationPairs[judge].push({ p, y: policyWinnerMatches ? 1 : 0 });
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
if (scenario.multiLensResult && scenario.hybridResult) {
|
|
210
|
+
agreementTotal += 1;
|
|
211
|
+
if (scenario.multiLensResult.winner === scenario.hybridResult.winner) {
|
|
212
|
+
agreementMatches += 1;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (options.enableSweep ?? true) {
|
|
216
|
+
updateSweepBucket(
|
|
217
|
+
bucketMap,
|
|
218
|
+
"hybrid:mode=always_ai",
|
|
219
|
+
"hybrid",
|
|
220
|
+
{},
|
|
221
|
+
hybridWinner === groundTruth.expectedWinner
|
|
222
|
+
);
|
|
223
|
+
for (const coreWeight of MULTI_LENS_CORE_WEIGHTS) {
|
|
224
|
+
for (const planningCap of PLANNING_CAP_VALUES) {
|
|
225
|
+
const scores = variants.map((variant) => {
|
|
226
|
+
const coreScore = groundTruth.expectedScores[variant.variant] ?? 0;
|
|
227
|
+
const strategyScore2 = groundTruth.expectedStrategyScores[variant.variant] ?? 0;
|
|
228
|
+
const combined = coreWeight * coreScore + (1 - coreWeight) * strategyScore2;
|
|
229
|
+
const isPlanningOnly = variant.executionCategory === "analysis";
|
|
230
|
+
const capped = isPlanningOnly ? Math.min(planningCap, combined) : combined;
|
|
231
|
+
return { variantId: variant.variant, value: capped };
|
|
232
|
+
});
|
|
233
|
+
scores.sort((a, b) => b.value - a.value || a.variantId.localeCompare(b.variantId));
|
|
234
|
+
const predictedWinner = scores[0]?.variantId ?? "unknown";
|
|
235
|
+
const matchesGroundTruth = predictedWinner === groundTruth.expectedWinner;
|
|
236
|
+
updateSweepBucket(
|
|
237
|
+
bucketMap,
|
|
238
|
+
`multiLens:core=${coreWeight}:cap=${planningCap}`,
|
|
239
|
+
"multiLens",
|
|
240
|
+
{ coreWeight, planningCapValue: planningCap },
|
|
241
|
+
matchesGroundTruth
|
|
242
|
+
);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
const agreementRate = {
|
|
248
|
+
matches: agreementMatches,
|
|
249
|
+
total: agreementTotal,
|
|
250
|
+
rate: agreementTotal === 0 ? 0 : agreementMatches / agreementTotal
|
|
251
|
+
};
|
|
252
|
+
const accuracy = finalizeAccuracyMetrics(legacyStats, legacyCalibrationPairs, agreementRate);
|
|
253
|
+
const policyAccuracy = finalizeAccuracyMetrics(
|
|
254
|
+
policyStats,
|
|
255
|
+
policyCalibrationPairs,
|
|
256
|
+
agreementRate
|
|
257
|
+
);
|
|
258
|
+
const sweepEntries = options.enableSweep ?? true ? Object.values(bucketMap).map((bucket) => ({
|
|
259
|
+
judge: bucket.judge,
|
|
260
|
+
params: bucket.params,
|
|
261
|
+
totalScenarios: bucket.total,
|
|
262
|
+
winnerAccuracy: bucket.total === 0 ? 0 : bucket.winnerMatches / bucket.total
|
|
263
|
+
})).sort((a, b) => b.winnerAccuracy - a.winnerAccuracy) : [];
|
|
264
|
+
const parameterSweep = {
|
|
265
|
+
entries: sweepEntries
|
|
266
|
+
};
|
|
267
|
+
return { accuracy, policyAccuracy, parameterSweep };
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
// scripts/simulation/spec-harness.ts
|
|
271
|
+
import path from "path";
|
|
272
|
+
var EXCLUDED_DIR_PREFIXES = ["node_modules/", ".git/", "dist/", "coverage/", "build/"];
|
|
273
|
+
function normalizeRepoRelativePath(raw) {
|
|
274
|
+
const trimmed = raw.trim();
|
|
275
|
+
const withSlashes = trimmed.replaceAll("\\", "/");
|
|
276
|
+
const isAbsolute = path.posix.isAbsolute(withSlashes) || /^[a-zA-Z]:\//.test(withSlashes);
|
|
277
|
+
const normalized = path.posix.normalize(withSlashes).replace(/^(\.\/)+/, "");
|
|
278
|
+
return { normalized, isAbsolute };
|
|
279
|
+
}
|
|
280
|
+
function isOutsideRepo(normalized) {
|
|
281
|
+
if (normalized === "..") return true;
|
|
282
|
+
if (normalized.startsWith("../")) return true;
|
|
283
|
+
return normalized.includes("/../") || normalized.includes("/..");
|
|
284
|
+
}
|
|
285
|
+
function isExcluded(normalized) {
|
|
286
|
+
if (EXCLUDED_DIR_PREFIXES.some((prefix) => normalized === prefix.slice(0, -1))) return true;
|
|
287
|
+
return EXCLUDED_DIR_PREFIXES.some((prefix) => normalized.startsWith(prefix));
|
|
288
|
+
}
|
|
289
|
+
function validateRepoRelativePaths(inputs) {
|
|
290
|
+
const violations = [];
|
|
291
|
+
const valid = [];
|
|
292
|
+
for (const input of inputs) {
|
|
293
|
+
if (typeof input !== "string") {
|
|
294
|
+
violations.push({
|
|
295
|
+
code: "NON_STRING",
|
|
296
|
+
input,
|
|
297
|
+
reason: `expected string path, received ${input === null ? "null" : typeof input}`
|
|
298
|
+
});
|
|
299
|
+
continue;
|
|
300
|
+
}
|
|
301
|
+
if (input.trim().length === 0) {
|
|
302
|
+
violations.push({ code: "EMPTY", input, reason: "empty path" });
|
|
303
|
+
continue;
|
|
304
|
+
}
|
|
305
|
+
const { normalized, isAbsolute } = normalizeRepoRelativePath(input);
|
|
306
|
+
if (normalized.length === 0 || normalized === ".") {
|
|
307
|
+
violations.push({
|
|
308
|
+
code: "EMPTY",
|
|
309
|
+
input,
|
|
310
|
+
normalized,
|
|
311
|
+
reason: "empty path after normalization"
|
|
312
|
+
});
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
if (isAbsolute) {
|
|
316
|
+
violations.push({ code: "ABSOLUTE", input, normalized, reason: "absolute path" });
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
if (normalized.includes("\0")) {
|
|
320
|
+
violations.push({ code: "INVALID", input, normalized, reason: "contains NUL byte" });
|
|
321
|
+
continue;
|
|
322
|
+
}
|
|
323
|
+
if (isOutsideRepo(normalized)) {
|
|
324
|
+
violations.push({
|
|
325
|
+
code: "OUTSIDE_REPO",
|
|
326
|
+
input,
|
|
327
|
+
normalized,
|
|
328
|
+
reason: "path escapes repo boundary"
|
|
329
|
+
});
|
|
330
|
+
continue;
|
|
331
|
+
}
|
|
332
|
+
if (isExcluded(normalized)) {
|
|
333
|
+
violations.push({
|
|
334
|
+
code: "EXCLUDED_DIR",
|
|
335
|
+
input,
|
|
336
|
+
normalized,
|
|
337
|
+
reason: "path targets excluded directory"
|
|
338
|
+
});
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
valid.push(normalized);
|
|
342
|
+
}
|
|
343
|
+
valid.sort((a, b) => a.localeCompare(b));
|
|
344
|
+
const deduped = [];
|
|
345
|
+
for (const item of valid) {
|
|
346
|
+
if (deduped.length === 0 || deduped[deduped.length - 1] !== item) {
|
|
347
|
+
deduped.push(item);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return { valid: deduped, violations };
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
// scripts/simulation/deterministic-judge.ts
|
|
354
|
+
var clamp = (value) => Math.max(0, Math.min(100, value));
|
|
355
|
+
function coerceFiniteNumber(value, fallback) {
|
|
356
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
357
|
+
if (typeof value === "string" && value.trim().length > 0) {
|
|
358
|
+
const parsed = Number(value);
|
|
359
|
+
if (Number.isFinite(parsed)) return parsed;
|
|
360
|
+
}
|
|
361
|
+
return fallback;
|
|
362
|
+
}
|
|
363
|
+
function extractSyntheticSignals(variant) {
|
|
364
|
+
const rubricMeta = variant.evaluationRubric?.metadata;
|
|
365
|
+
const synthetic = rubricMeta && typeof rubricMeta === "object" ? rubricMeta.synthetic : void 0;
|
|
366
|
+
const syntheticObj = synthetic && typeof synthetic === "object" ? synthetic : {};
|
|
367
|
+
const fallbackCompleteness = coerceFiniteNumber(variant.completeness, 0);
|
|
368
|
+
const fallbackCorrectness = coerceFiniteNumber(variant.testMetrics?.passRate, 50);
|
|
369
|
+
const edgeModifiersRaw = syntheticObj.edgeModifiers;
|
|
370
|
+
const edgeModifiers = edgeModifiersRaw && typeof edgeModifiersRaw === "object" ? edgeModifiersRaw : {};
|
|
371
|
+
return {
|
|
372
|
+
codeQuality: clamp(coerceFiniteNumber(syntheticObj.codeQuality, fallbackCompleteness)),
|
|
373
|
+
correctness: clamp(coerceFiniteNumber(syntheticObj.correctness, fallbackCorrectness)),
|
|
374
|
+
completeness: clamp(coerceFiniteNumber(syntheticObj.completeness, fallbackCompleteness)),
|
|
375
|
+
innovation: clamp(coerceFiniteNumber(syntheticObj.innovation, 50)),
|
|
376
|
+
files: Array.isArray(syntheticObj.files) ? syntheticObj.files : [],
|
|
377
|
+
edgeModifiers
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
function inferDocsOnly(validPaths) {
|
|
381
|
+
if (validPaths.length === 0) return false;
|
|
382
|
+
const isDoc = (p) => p.startsWith("docs/") || p.endsWith(".md") || p.endsWith(".mdx");
|
|
383
|
+
return validPaths.every(isDoc);
|
|
384
|
+
}
|
|
385
|
+
function buildStrengthsWeaknesses(scores) {
|
|
386
|
+
const strengths = [];
|
|
387
|
+
const weaknesses = [];
|
|
388
|
+
if (scores.functionalCorrectness >= 85)
|
|
389
|
+
strengths.push("Strong correctness and validation signals");
|
|
390
|
+
if (scores.semanticTaskFit >= 85) strengths.push("High semantic task fit and completeness");
|
|
391
|
+
if (scores.maintainability >= 85) strengths.push("Maintainable, readable implementation shape");
|
|
392
|
+
if (scores.changeDiscipline >= 85) strengths.push("Disciplined, scoped changes");
|
|
393
|
+
if (scores.functionalCorrectness <= 50)
|
|
394
|
+
weaknesses.push("Correctness risk (tests/syntax/execution)");
|
|
395
|
+
if (scores.semanticTaskFit <= 50) weaknesses.push("Low completeness or mismatched intent");
|
|
396
|
+
if (scores.maintainability <= 50) weaknesses.push("Quality/maintainability concerns");
|
|
397
|
+
if (scores.changeDiscipline <= 50)
|
|
398
|
+
weaknesses.push("Change discipline issues (scope/paths/empties)");
|
|
399
|
+
if (strengths.length === 0 && scores.finalScore >= 60) strengths.push("Solid overall balance");
|
|
400
|
+
if (weaknesses.length === 0 && scores.finalScore < 60)
|
|
401
|
+
weaknesses.push("Overall score below target threshold");
|
|
402
|
+
return { strengths, weaknesses };
|
|
403
|
+
}
|
|
404
|
+
function computeCategoryScores(signals) {
|
|
405
|
+
const semanticTaskFit2 = clamp(signals.completeness * 0.85 + signals.correctness * 0.15);
|
|
406
|
+
const functionalCorrectness2 = clamp(signals.correctness);
|
|
407
|
+
const maintainability2 = clamp(signals.codeQuality * 0.65 + signals.innovation * 0.35);
|
|
408
|
+
const changeDiscipline2 = clamp(100 - signals.completeness * 0.3 + signals.codeQuality * 0.2);
|
|
409
|
+
const strategyScore2 = clamp(signals.codeQuality * 0.6 + signals.innovation * 0.4);
|
|
410
|
+
return {
|
|
411
|
+
semanticTaskFit: semanticTaskFit2,
|
|
412
|
+
functionalCorrectness: functionalCorrectness2,
|
|
413
|
+
maintainability: maintainability2,
|
|
414
|
+
changeDiscipline: changeDiscipline2,
|
|
415
|
+
strategyScore: strategyScore2
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
function applyDeterministicCaps(variant, signals, baseScore) {
|
|
419
|
+
let score = baseScore;
|
|
420
|
+
const capReasons = [];
|
|
421
|
+
let planningCapApplied = false;
|
|
422
|
+
const { valid: validPaths, violations } = validateRepoRelativePaths(signals.files);
|
|
423
|
+
const hasPathViolations = violations.length > 0;
|
|
424
|
+
const docsOnly = Boolean(signals.edgeModifiers.isDocsOnly) || inferDocsOnly(validPaths) || Boolean(variant.completenessScore?.factors?.docsOnly);
|
|
425
|
+
const emptyChanges = Boolean(signals.edgeModifiers.hasEmptyChanges) || variant.emptyChanges === true || (variant.gitMetrics?.filesChanged ?? 0) === 0 || typeof variant.worktreeDiff === "string" && variant.worktreeDiff.length === 0;
|
|
426
|
+
const planningOnly = Boolean(signals.edgeModifiers.isPlanningOnly) || variant.executionCategory === "analysis" || variant.executionIntent === "analysis";
|
|
427
|
+
const hasTestFailures = Boolean(signals.edgeModifiers.hasTestFailures) || variant.testStatus === "failed";
|
|
428
|
+
const hasSyntaxErrors = Boolean(signals.edgeModifiers.hasSyntaxErrors) || typeof variant.result?.stderr === "string" && /syntaxerror/i.test(variant.result.stderr);
|
|
429
|
+
if (planningOnly) {
|
|
430
|
+
capReasons.push("planning-only cap");
|
|
431
|
+
planningCapApplied = true;
|
|
432
|
+
score = Math.min(score, 40);
|
|
433
|
+
}
|
|
434
|
+
if (hasTestFailures) {
|
|
435
|
+
capReasons.push("tests-failed cap");
|
|
436
|
+
score = Math.min(score, 50);
|
|
437
|
+
}
|
|
438
|
+
if (hasSyntaxErrors) {
|
|
439
|
+
capReasons.push("syntax-error cap");
|
|
440
|
+
score = Math.min(score, 40);
|
|
441
|
+
}
|
|
442
|
+
if (emptyChanges) {
|
|
443
|
+
capReasons.push("empty-changes cap");
|
|
444
|
+
score = Math.min(score, 10);
|
|
445
|
+
}
|
|
446
|
+
if (docsOnly) {
|
|
447
|
+
capReasons.push("docs-only cap");
|
|
448
|
+
score = Math.min(score, 60);
|
|
449
|
+
}
|
|
450
|
+
if (signals.edgeModifiers.hasOrphanedTestImports) {
|
|
451
|
+
capReasons.push("orphaned-test-imports cap");
|
|
452
|
+
score = Math.min(score, 60);
|
|
453
|
+
}
|
|
454
|
+
if (hasPathViolations) {
|
|
455
|
+
capReasons.push("invalid-paths cap");
|
|
456
|
+
score = Math.min(score, 10);
|
|
457
|
+
}
|
|
458
|
+
return { finalScore: clamp(score), capReasons, planningCapApplied };
|
|
459
|
+
}
|
|
460
|
+
function buildEvaluation(variantId, categories, finalScore, capReasons, judgeKind) {
|
|
461
|
+
const { strengths, weaknesses } = buildStrengthsWeaknesses({
|
|
462
|
+
semanticTaskFit: categories.semanticTaskFit,
|
|
463
|
+
functionalCorrectness: categories.functionalCorrectness,
|
|
464
|
+
maintainability: categories.maintainability,
|
|
465
|
+
changeDiscipline: categories.changeDiscipline,
|
|
466
|
+
finalScore
|
|
467
|
+
});
|
|
468
|
+
const primaryReason = capReasons.length > 0 ? `Capped (${capReasons.join(", ")})` : judgeKind === "hybrid" ? "Static deterministic evaluation: high-confidence winner selection" : "Static deterministic evaluation: multi-lens composite scoring";
|
|
469
|
+
return {
|
|
470
|
+
variant: variantId,
|
|
471
|
+
qualityScore: createPercentScore(finalScore, `simulation ${judgeKind} qualityScore`),
|
|
472
|
+
strengths,
|
|
473
|
+
weaknesses,
|
|
474
|
+
codeQuality: {
|
|
475
|
+
correctness: createPercentScore(categories.functionalCorrectness, "correctness"),
|
|
476
|
+
readability: createPercentScore(categories.maintainability, "readability"),
|
|
477
|
+
maintainability: createPercentScore(categories.maintainability, "maintainability"),
|
|
478
|
+
completeness: createPercentScore(categories.semanticTaskFit, "completeness"),
|
|
479
|
+
innovation: createPercentScore(categories.strategyScore, "innovation"),
|
|
480
|
+
security: createPercentScore(categories.changeDiscipline, "security")
|
|
481
|
+
},
|
|
482
|
+
schemaVersion: "2.0",
|
|
483
|
+
planningCap: capReasons.includes("planning-only cap") ? { applied: true, reason: "planning-only", preCapScore: finalScore } : { applied: false },
|
|
484
|
+
scoreBreakdown: {
|
|
485
|
+
core: createPercentScore(finalScore, "core"),
|
|
486
|
+
strategy: createPercentScore(categories.strategyScore, "strategy"),
|
|
487
|
+
combined: createPercentScore(finalScore, "combined"),
|
|
488
|
+
weights: { core: 1, strategy: 0 }
|
|
489
|
+
},
|
|
490
|
+
primaryReason
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
function simulateJudgeSynthesisResult(judgeKind, variants, _prompt) {
|
|
494
|
+
const startTime = Date.now();
|
|
495
|
+
if (!variants || variants.length === 0) {
|
|
496
|
+
return {
|
|
497
|
+
winner: "unknown",
|
|
498
|
+
evaluations: [],
|
|
499
|
+
reasoning: "No variants provided for evaluation",
|
|
500
|
+
recommendations: ["Provide at least one variant to evaluate"],
|
|
501
|
+
metadata: {
|
|
502
|
+
model: `simulation:${judgeKind}:deterministic-v1`,
|
|
503
|
+
evaluationTimeMs: 0,
|
|
504
|
+
confidence: createPercentScore(0, "no variants"),
|
|
505
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
506
|
+
topVariants: []
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
const stableVariants = [...variants].sort((a, b) => a.variant.localeCompare(b.variant));
|
|
511
|
+
const finalAllScores = {};
|
|
512
|
+
const evaluations = [];
|
|
513
|
+
const audit = {};
|
|
514
|
+
for (const variant of stableVariants) {
|
|
515
|
+
const signals = extractSyntheticSignals(variant);
|
|
516
|
+
const categories = computeCategoryScores(signals);
|
|
517
|
+
const baseScore = judgeKind === "hybrid" ? 0.4 * categories.functionalCorrectness + 0.35 * clamp(signals.codeQuality * 0.8 + signals.innovation * 0.2) + 0.25 * clamp(signals.completeness) : 0.45 * categories.semanticTaskFit + 0.35 * categories.functionalCorrectness + 0.15 * categories.maintainability + 0.05 * categories.changeDiscipline;
|
|
518
|
+
const capped = applyDeterministicCaps(variant, signals, baseScore);
|
|
519
|
+
finalAllScores[variant.variant] = capped.finalScore;
|
|
520
|
+
evaluations.push(
|
|
521
|
+
buildEvaluation(variant.variant, categories, capped.finalScore, capped.capReasons, judgeKind)
|
|
522
|
+
);
|
|
523
|
+
audit[variant.variant] = {
|
|
524
|
+
baseScore: clamp(baseScore),
|
|
525
|
+
capReasons: capped.capReasons,
|
|
526
|
+
files: validateRepoRelativePaths(signals.files).valid
|
|
527
|
+
};
|
|
528
|
+
}
|
|
529
|
+
if (judgeKind === "hybrid") {
|
|
530
|
+
const isCorrectnessFailure2 = (v) => {
|
|
531
|
+
const s = extractSyntheticSignals(v);
|
|
532
|
+
return Boolean(s.edgeModifiers.hasTestFailures || s.edgeModifiers.hasSyntaxErrors);
|
|
533
|
+
};
|
|
534
|
+
const isLikelyCorrect = (v) => {
|
|
535
|
+
const s = extractSyntheticSignals(v);
|
|
536
|
+
return !isCorrectnessFailure2(v) && s.correctness >= 70;
|
|
537
|
+
};
|
|
538
|
+
const bestCorrect = stableVariants.filter(isLikelyCorrect).sort(
|
|
539
|
+
(a, b) => (finalAllScores[b.variant] ?? 0) - (finalAllScores[a.variant] ?? 0) || a.variant.localeCompare(b.variant)
|
|
540
|
+
)[0];
|
|
541
|
+
if (bestCorrect) {
|
|
542
|
+
const bestScore = finalAllScores[bestCorrect.variant] ?? 0;
|
|
543
|
+
for (const v of stableVariants) {
|
|
544
|
+
if (!isCorrectnessFailure2(v)) continue;
|
|
545
|
+
const current = finalAllScores[v.variant] ?? 0;
|
|
546
|
+
if (current >= bestScore) {
|
|
547
|
+
finalAllScores[v.variant] = clamp(Math.max(0, bestScore - 0.1));
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
} else {
|
|
552
|
+
const STRONG_CORRECTNESS_GAP = 25;
|
|
553
|
+
const variantsWithSignals = stableVariants.map((v) => ({
|
|
554
|
+
variant: v,
|
|
555
|
+
signals: extractSyntheticSignals(v),
|
|
556
|
+
score: finalAllScores[v.variant] ?? 0
|
|
557
|
+
}));
|
|
558
|
+
for (let i = 0; i < variantsWithSignals.length; i++) {
|
|
559
|
+
const a = variantsWithSignals[i];
|
|
560
|
+
if (!a) continue;
|
|
561
|
+
for (let j = i + 1; j < variantsWithSignals.length; j++) {
|
|
562
|
+
const b = variantsWithSignals[j];
|
|
563
|
+
if (!b) continue;
|
|
564
|
+
const correctnessA = a.signals.correctness;
|
|
565
|
+
const correctnessB = b.signals.correctness;
|
|
566
|
+
if (correctnessA >= correctnessB + STRONG_CORRECTNESS_GAP && b.score > a.score) {
|
|
567
|
+
finalAllScores[b.variant.variant] = clamp(Math.max(0, a.score - 0.1));
|
|
568
|
+
} else if (correctnessB >= correctnessA + STRONG_CORRECTNESS_GAP && a.score > b.score) {
|
|
569
|
+
finalAllScores[a.variant.variant] = clamp(Math.max(0, b.score - 0.1));
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
const ranked = Object.keys(finalAllScores).sort(
|
|
575
|
+
(a, b) => (finalAllScores[b] ?? 0) - (finalAllScores[a] ?? 0) || a.localeCompare(b)
|
|
576
|
+
);
|
|
577
|
+
const winner = ranked[0] ?? stableVariants[0]?.variant ?? "unknown";
|
|
578
|
+
const winnerScore = finalAllScores[winner] ?? 0;
|
|
579
|
+
const runnerUp = ranked[1];
|
|
580
|
+
const runnerUpScore = runnerUp ? finalAllScores[runnerUp] ?? 0 : winnerScore;
|
|
581
|
+
const margin = Math.max(0, winnerScore - runnerUpScore);
|
|
582
|
+
const confidence = judgeKind === "hybrid" ? margin > 15 ? 98 : margin > 5 ? 95 : margin > 3 ? 90 : margin > 1 ? 85 : 80 : clamp(55 + margin * 0.9);
|
|
583
|
+
const reasoning = ranked.length <= 1 ? `Single-variant evaluation; selecting ${winner}` : `Selected ${winner} (score=${winnerScore.toFixed(1)}) over ${runnerUp} (score=${runnerUpScore.toFixed(1)}), margin=${margin.toFixed(1)}`;
|
|
584
|
+
return {
|
|
585
|
+
winner,
|
|
586
|
+
evaluations: evaluations.sort(
|
|
587
|
+
(a, b) => percentScoreToNumber(b.qualityScore) - percentScoreToNumber(a.qualityScore) || a.variant.localeCompare(b.variant)
|
|
588
|
+
),
|
|
589
|
+
reasoning,
|
|
590
|
+
recommendations: [],
|
|
591
|
+
confidence: createPercentScore(confidence, "simulation confidence"),
|
|
592
|
+
metadata: {
|
|
593
|
+
model: `simulation:${judgeKind}:deterministic-v1`,
|
|
594
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
595
|
+
evaluationTimeMs: Math.max(0, Date.now() - startTime),
|
|
596
|
+
confidence: createPercentScore(confidence, "simulation confidence"),
|
|
597
|
+
finalAllScores,
|
|
598
|
+
topVariants: ranked.slice(0, 5),
|
|
599
|
+
audit: {
|
|
600
|
+
judgeKind,
|
|
601
|
+
deterministic: true,
|
|
602
|
+
marginScore: margin,
|
|
603
|
+
perVariant: audit
|
|
604
|
+
},
|
|
605
|
+
...judgeKind === "hybrid" ? {
|
|
606
|
+
routedToAI: false,
|
|
607
|
+
confidenceScore: createPercentScore(confidence, "static confidence"),
|
|
608
|
+
marginScore: margin,
|
|
609
|
+
staticWinner: winner,
|
|
610
|
+
staticConfidence: createPercentScore(confidence, "static confidence"),
|
|
611
|
+
staticEvaluationTimeMs: Math.max(0, Date.now() - startTime),
|
|
612
|
+
aiAttempted: false,
|
|
613
|
+
staticFallback: true,
|
|
614
|
+
routeTier: "static"
|
|
615
|
+
} : {}
|
|
616
|
+
}
|
|
617
|
+
};
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
// scripts/simulation/generators.ts
|
|
621
|
+
import path2 from "path";
|
|
622
|
+
var DEFAULT_FILES = ["src/lib/main.ts", "src/core/judge/judge.ts", "docs/runtime.md"];
|
|
623
|
+
function clampScore(value) {
|
|
624
|
+
if (Number.isNaN(value)) return 0;
|
|
625
|
+
return Math.max(0, Math.min(100, value));
|
|
626
|
+
}
|
|
627
|
+
function safeIdentifier(input) {
|
|
628
|
+
const normalized = input.trim().replace(/[^a-zA-Z0-9_]/g, "_");
|
|
629
|
+
return normalized.length > 0 ? normalized : "variant";
|
|
630
|
+
}
|
|
631
|
+
function buildCodeDocOnlyLines(spec, file) {
|
|
632
|
+
const label = safeIdentifier(spec.variantLabel);
|
|
633
|
+
return [
|
|
634
|
+
"+/**",
|
|
635
|
+
`+ * ${label}: documentation-only change`,
|
|
636
|
+
"+ *",
|
|
637
|
+
"+ * NOTE: No runtime logic changes intended.",
|
|
638
|
+
"+ */",
|
|
639
|
+
`+// ${label}: updated docs for ${file}`
|
|
640
|
+
];
|
|
641
|
+
}
|
|
642
|
+
function buildCodeExecutableLines(spec) {
|
|
643
|
+
const label = safeIdentifier(spec.variantLabel);
|
|
644
|
+
const quality = typeof spec.codeQuality === "number" ? spec.codeQuality : 65;
|
|
645
|
+
if (quality <= 55) {
|
|
646
|
+
return [
|
|
647
|
+
`+export function ${label}Example(): number {`,
|
|
648
|
+
"+ // TODO: cleanup",
|
|
649
|
+
"+ let x: any = 7;",
|
|
650
|
+
"+ x++;",
|
|
651
|
+
"+ x = x + 42;",
|
|
652
|
+
"+ return x;",
|
|
653
|
+
"+}"
|
|
654
|
+
];
|
|
655
|
+
}
|
|
656
|
+
if (quality >= 75) {
|
|
657
|
+
return [
|
|
658
|
+
"+const EXAMPLE_DEFAULT = 1;",
|
|
659
|
+
`+function compute${label}Example(): number {`,
|
|
660
|
+
"+ return EXAMPLE_DEFAULT;",
|
|
661
|
+
"+}",
|
|
662
|
+
`+export function ${label}Example(): number {`,
|
|
663
|
+
`+ return compute${label}Example();`,
|
|
664
|
+
"+}"
|
|
665
|
+
];
|
|
666
|
+
}
|
|
667
|
+
return [`+export function ${label}Example(): number {`, "+ return 1;", "+}"];
|
|
668
|
+
}
|
|
669
|
+
function buildTestExecutableLines(spec) {
|
|
670
|
+
const label = safeIdentifier(spec.variantLabel);
|
|
671
|
+
const orphanedImport = spec.edgeModifiers?.hasOrphanedTestImports ? [`+import { missing } from './__poetic_orphaned_test_import_never_exists__';`, "+"] : [];
|
|
672
|
+
return [
|
|
673
|
+
`+import { describe, it, expect } from 'vitest';`,
|
|
674
|
+
"+",
|
|
675
|
+
...orphanedImport,
|
|
676
|
+
`+describe('${label}', () => {`,
|
|
677
|
+
`+ it('works', () => {`,
|
|
678
|
+
"+ expect(1).toBe(1);",
|
|
679
|
+
"+ });",
|
|
680
|
+
"+});"
|
|
681
|
+
];
|
|
682
|
+
}
|
|
683
|
+
function buildMarkdownLines(spec) {
|
|
684
|
+
const label = safeIdentifier(spec.variantLabel);
|
|
685
|
+
return [`+## ${label} update`, "+", "+- Added documentation and usage notes."];
|
|
686
|
+
}
|
|
687
|
+
function buildFileChange(spec, file, linesAdded) {
|
|
688
|
+
const ext = path2.posix.extname(file).toLowerCase();
|
|
689
|
+
const isTestFile = /\.test\.(ts|tsx|js|jsx)$/.test(file) || /\/__tests__\//.test(file);
|
|
690
|
+
const isCodeFile = [".ts", ".tsx", ".js", ".jsx"].includes(ext);
|
|
691
|
+
const isMarkdown = ext === ".md";
|
|
692
|
+
if (isMarkdown) {
|
|
693
|
+
return buildMarkdownLines(spec);
|
|
694
|
+
}
|
|
695
|
+
if (isCodeFile) {
|
|
696
|
+
if (spec.edgeModifiers?.docOnlyInCodeFiles) {
|
|
697
|
+
return buildCodeDocOnlyLines(spec, file);
|
|
698
|
+
}
|
|
699
|
+
if (spec.edgeModifiers?.addsExecutableLines) {
|
|
700
|
+
return isTestFile ? buildTestExecutableLines(spec) : buildCodeExecutableLines(spec);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
const quality = typeof spec.codeQuality === "number" ? spec.codeQuality : 65;
|
|
704
|
+
const buildLegacyQualitySignalLines = () => {
|
|
705
|
+
if (!isCodeFile) return [];
|
|
706
|
+
if (quality <= 55) {
|
|
707
|
+
return [
|
|
708
|
+
"+// TODO: tidy this up later",
|
|
709
|
+
"+let tmp: any = 2 + 3 + 4 + 5 + 6 + 7;",
|
|
710
|
+
"+tmp++;",
|
|
711
|
+
"+const data: any[] = [];",
|
|
712
|
+
"+data.push(tmp);",
|
|
713
|
+
"+data.sort();"
|
|
714
|
+
];
|
|
715
|
+
}
|
|
716
|
+
if (quality >= 75) {
|
|
717
|
+
return [
|
|
718
|
+
"+const EXAMPLE_LIMIT = 10;",
|
|
719
|
+
"+function buildExampleValue(): number {",
|
|
720
|
+
"+ return EXAMPLE_LIMIT;",
|
|
721
|
+
"+}",
|
|
722
|
+
"+const EXAMPLE_RESULT = buildExampleValue();"
|
|
723
|
+
];
|
|
724
|
+
}
|
|
725
|
+
return [
|
|
726
|
+
"+const exampleLimit = 10;",
|
|
727
|
+
"+function buildExampleValue(): number {",
|
|
728
|
+
"+ return exampleLimit;",
|
|
729
|
+
"+}"
|
|
730
|
+
];
|
|
731
|
+
};
|
|
732
|
+
const lines = [];
|
|
733
|
+
lines.push(`+// ${spec.variantLabel} modification`);
|
|
734
|
+
lines.push(`+// ${spec.description ?? "Synthetic change"}`);
|
|
735
|
+
lines.push(...buildLegacyQualitySignalLines());
|
|
736
|
+
for (let i = 0; i < Math.max(1, Math.floor(linesAdded)); i += 1) {
|
|
737
|
+
lines.push(`+// ${spec.variantLabel} change`);
|
|
738
|
+
lines.push(`-// ${spec.variantLabel} old change`);
|
|
739
|
+
}
|
|
740
|
+
return lines;
|
|
741
|
+
}
|
|
742
|
+
function buildDiff(spec, files, linesAdded) {
|
|
743
|
+
if (spec.edgeModifiers?.hasEmptyChanges) return "";
|
|
744
|
+
const parts = [];
|
|
745
|
+
for (const file of files) {
|
|
746
|
+
const basePath = file.startsWith("/") ? file : path2.posix.join("/", file);
|
|
747
|
+
parts.push(`diff --git a${basePath} b${basePath}`);
|
|
748
|
+
parts.push("index 0000000..1111111 100644");
|
|
749
|
+
parts.push(`--- a${basePath}`);
|
|
750
|
+
parts.push(`+++ b${basePath}`);
|
|
751
|
+
const linesPerFile = Math.max(1, Math.floor(linesAdded / files.length));
|
|
752
|
+
parts.push(...buildFileChange(spec, file, linesPerFile));
|
|
753
|
+
}
|
|
754
|
+
return parts.join("\n");
|
|
755
|
+
}
|
|
756
|
+
function createVariantResult(spec) {
|
|
757
|
+
const files = spec.files && spec.files.length > 0 ? spec.files : DEFAULT_FILES;
|
|
758
|
+
const filesChanged = spec.edgeModifiers?.hasEmptyChanges ? 0 : files.length;
|
|
759
|
+
const linesAdded = spec.edgeModifiers?.hasEmptyChanges ? 0 : Math.round(spec.completeness / 100 * 120 + 3);
|
|
760
|
+
const linesRemoved = Math.round(linesAdded * 0.5);
|
|
761
|
+
const diff = buildDiff(spec, files, linesAdded);
|
|
762
|
+
const exitCode = spec.edgeModifiers?.hasTestFailures ? 1 : 0;
|
|
763
|
+
const testStatus = spec.edgeModifiers?.hasTestFailures ? "failed" : spec.edgeModifiers?.isPlanningOnly || spec.edgeModifiers?.isDocsOnly || spec.edgeModifiers?.docOnlyInCodeFiles ? "not_run" : "passed";
|
|
764
|
+
const testMetrics = testStatus === "not_run" ? { totalTests: 0, passedTests: 0, failedTests: 0, passRate: 0 } : (() => {
|
|
765
|
+
const passRate = testStatus === "passed" ? 100 : clampScore(spec.correctness);
|
|
766
|
+
const totalTests = 100;
|
|
767
|
+
const passedTests = Math.round(passRate / 100 * totalTests);
|
|
768
|
+
const failedTests = Math.max(0, totalTests - passedTests);
|
|
769
|
+
return { totalTests, passedTests, failedTests, passRate };
|
|
770
|
+
})();
|
|
771
|
+
const durationMs = spec.durationMs ?? 12e3;
|
|
772
|
+
const success = !spec.edgeModifiers?.hasTestFailures && !spec.edgeModifiers?.hasSyntaxErrors;
|
|
773
|
+
const isPlanningIntent = spec.edgeModifiers?.isPlanningOnly ?? false;
|
|
774
|
+
const result = {
|
|
775
|
+
stdout: diff,
|
|
776
|
+
stderr: spec.edgeModifiers?.hasSyntaxErrors ? "SyntaxError: Unexpected token" : "",
|
|
777
|
+
exitCode
|
|
778
|
+
};
|
|
779
|
+
return {
|
|
780
|
+
variant: spec.id,
|
|
781
|
+
provider: spec.provider,
|
|
782
|
+
strategy: spec.variantStrategy,
|
|
783
|
+
executionMode: spec.executionMode ?? "local",
|
|
784
|
+
success,
|
|
785
|
+
testStatus,
|
|
786
|
+
testMetrics,
|
|
787
|
+
result,
|
|
788
|
+
duration: Math.max(1, Math.round(durationMs / 1e3)),
|
|
789
|
+
executionDurationMs: durationMs,
|
|
790
|
+
completeness: clampScore(spec.completeness),
|
|
791
|
+
gitMetrics: {
|
|
792
|
+
filesChanged,
|
|
793
|
+
linesAdded,
|
|
794
|
+
linesDeleted: linesRemoved,
|
|
795
|
+
source: "worktree"
|
|
796
|
+
},
|
|
797
|
+
worktreeDiff: diff,
|
|
798
|
+
output: diff,
|
|
799
|
+
filesChanged,
|
|
800
|
+
linesAdded,
|
|
801
|
+
linesRemoved,
|
|
802
|
+
emptyChanges: spec.edgeModifiers?.hasEmptyChanges,
|
|
803
|
+
executionCategory: isPlanningIntent ? "analysis" : "edit",
|
|
804
|
+
executionIntent: isPlanningIntent ? "analysis" : "code",
|
|
805
|
+
promptHash: spec.id,
|
|
806
|
+
promptLength: diff.length,
|
|
807
|
+
evaluationRubric: {
|
|
808
|
+
rubricVersion: "simulation",
|
|
809
|
+
editMode: isPlanningIntent ? "analysis" : "edit",
|
|
810
|
+
metadata: {
|
|
811
|
+
scenario: spec.description ?? spec.id,
|
|
812
|
+
synthetic: {
|
|
813
|
+
id: spec.id,
|
|
814
|
+
variantLabel: spec.variantLabel,
|
|
815
|
+
variantStrategy: spec.variantStrategy,
|
|
816
|
+
provider: spec.provider,
|
|
817
|
+
executionMode: spec.executionMode ?? "local",
|
|
818
|
+
outcomeType: spec.outcomeType ?? (success ? "success" : "failure"),
|
|
819
|
+
codeQuality: clampScore(spec.codeQuality),
|
|
820
|
+
correctness: clampScore(spec.correctness),
|
|
821
|
+
completeness: clampScore(spec.completeness),
|
|
822
|
+
innovation: clampScore(spec.innovation),
|
|
823
|
+
files,
|
|
824
|
+
edgeModifiers: spec.edgeModifiers ?? {}
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
analysisCompletenessSource: spec.edgeModifiers?.isPlanningOnly ? "empty" : "provider"
|
|
829
|
+
};
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
// scripts/simulation/ground-truth.ts
|
|
833
|
+
var clamp2 = (value) => Math.max(0, Math.min(100, value));
|
|
834
|
+
function semanticTaskFit(spec) {
|
|
835
|
+
const base = spec.completeness * 0.85 + spec.correctness * 0.15;
|
|
836
|
+
return clamp2(base);
|
|
837
|
+
}
|
|
838
|
+
function functionalCorrectness(spec) {
|
|
839
|
+
const base = spec.correctness;
|
|
840
|
+
return clamp2(base);
|
|
841
|
+
}
|
|
842
|
+
function maintainability(spec) {
|
|
843
|
+
const base = spec.codeQuality * 0.65 + spec.innovation * 0.35;
|
|
844
|
+
return clamp2(base);
|
|
845
|
+
}
|
|
846
|
+
function changeDiscipline(spec) {
|
|
847
|
+
const base = 100 - spec.completeness * 0.3 + spec.codeQuality * 0.2;
|
|
848
|
+
return clamp2(base);
|
|
849
|
+
}
|
|
850
|
+
function strategyScore(spec) {
|
|
851
|
+
return clamp2(spec.codeQuality * 0.6 + spec.innovation * 0.4);
|
|
852
|
+
}
|
|
853
|
+
function applyCommonCaps(spec, score, constraints, scoreLabel) {
|
|
854
|
+
if (spec.edgeModifiers?.isPlanningOnly) {
|
|
855
|
+
constraints.push({
|
|
856
|
+
type: "planningOnly",
|
|
857
|
+
reason: `${spec.id} is planning-only, applying planning cap (${scoreLabel})`
|
|
858
|
+
});
|
|
859
|
+
score = Math.min(score, 40);
|
|
860
|
+
}
|
|
861
|
+
if (spec.edgeModifiers?.hasTestFailures) {
|
|
862
|
+
constraints.push({
|
|
863
|
+
type: "testsFailed",
|
|
864
|
+
reason: `${spec.id} exercise failed tests (${scoreLabel})`
|
|
865
|
+
});
|
|
866
|
+
score = Math.min(score, 50);
|
|
867
|
+
}
|
|
868
|
+
if (spec.edgeModifiers?.hasSyntaxErrors) {
|
|
869
|
+
constraints.push({
|
|
870
|
+
type: "syntaxErrors",
|
|
871
|
+
reason: `${spec.id} contains syntax errors (${scoreLabel})`
|
|
872
|
+
});
|
|
873
|
+
score = Math.min(score, 40);
|
|
874
|
+
}
|
|
875
|
+
if (spec.edgeModifiers?.hasEmptyChanges) {
|
|
876
|
+
constraints.push({
|
|
877
|
+
type: "emptyChanges",
|
|
878
|
+
reason: `${spec.id} produced no file changes (${scoreLabel})`
|
|
879
|
+
});
|
|
880
|
+
score = Math.min(score, 10);
|
|
881
|
+
}
|
|
882
|
+
if (spec.edgeModifiers?.isDocsOnly) {
|
|
883
|
+
constraints.push({
|
|
884
|
+
type: "docsOnly",
|
|
885
|
+
reason: `${spec.id} touched docs-only paths (${scoreLabel})`
|
|
886
|
+
});
|
|
887
|
+
score = Math.min(score, 60);
|
|
888
|
+
}
|
|
889
|
+
if (spec.edgeModifiers?.hasOrphanedTestImports) {
|
|
890
|
+
constraints.push({
|
|
891
|
+
type: "orphanedTestImports",
|
|
892
|
+
reason: `${spec.id} includes orphaned test relative imports (${scoreLabel})`
|
|
893
|
+
});
|
|
894
|
+
score = Math.min(score, 60);
|
|
895
|
+
}
|
|
896
|
+
if (spec.edgeModifiers?.isTestsOnly) {
|
|
897
|
+
constraints.push({
|
|
898
|
+
type: "testsOnly",
|
|
899
|
+
reason: `${spec.id} edits only touch test files (${scoreLabel})`
|
|
900
|
+
});
|
|
901
|
+
score = Math.min(score, 60);
|
|
902
|
+
}
|
|
903
|
+
return clamp2(score);
|
|
904
|
+
}
|
|
905
|
+
function applyLegacyCaps(spec, composites, constraints) {
|
|
906
|
+
const { semanticTaskFit: semanticTaskFit2, functionalCorrectness: functionalCorrectness2, maintainability: maintainability2, changeDiscipline: changeDiscipline2 } = composites;
|
|
907
|
+
const score = 0.45 * semanticTaskFit2 + 0.35 * functionalCorrectness2 + 0.15 * maintainability2 + 0.05 * changeDiscipline2;
|
|
908
|
+
return applyCommonCaps(spec, score, constraints, "legacy");
|
|
909
|
+
}
|
|
910
|
+
function hybridQuality(spec) {
|
|
911
|
+
return clamp2(spec.codeQuality * 0.8 + spec.innovation * 0.2);
|
|
912
|
+
}
|
|
913
|
+
function hybridDelivery(spec) {
|
|
914
|
+
return clamp2(spec.completeness);
|
|
915
|
+
}
|
|
916
|
+
function hybridCorrectness(spec) {
|
|
917
|
+
return clamp2(spec.correctness);
|
|
918
|
+
}
|
|
919
|
+
function isCorrectnessFailure(spec) {
|
|
920
|
+
return Boolean(spec.edgeModifiers?.hasTestFailures || spec.edgeModifiers?.hasSyntaxErrors);
|
|
921
|
+
}
|
|
922
|
+
function isLikelyCorrectVariant(spec) {
|
|
923
|
+
return !isCorrectnessFailure(spec) && hybridCorrectness(spec) >= 70;
|
|
924
|
+
}
|
|
925
|
+
function computeHybridGroundTruth(specs) {
|
|
926
|
+
const constraints = [];
|
|
927
|
+
const expectedScores = {};
|
|
928
|
+
for (const spec of specs) {
|
|
929
|
+
const score = 0.4 * hybridCorrectness(spec) + 0.35 * hybridQuality(spec) + 0.25 * hybridDelivery(spec);
|
|
930
|
+
expectedScores[spec.id] = applyCommonCaps(spec, score, constraints, "hybrid_policy");
|
|
931
|
+
}
|
|
932
|
+
const bestCorrectCandidate = specs.filter(isLikelyCorrectVariant).sort(
|
|
933
|
+
(a, b) => (expectedScores[b.id] ?? 0) - (expectedScores[a.id] ?? 0) || a.id.localeCompare(b.id)
|
|
934
|
+
)[0];
|
|
935
|
+
if (bestCorrectCandidate) {
|
|
936
|
+
const bestCorrectScore = expectedScores[bestCorrectCandidate.id] ?? 0;
|
|
937
|
+
for (const spec of specs) {
|
|
938
|
+
if (!isCorrectnessFailure(spec)) continue;
|
|
939
|
+
const current = expectedScores[spec.id] ?? 0;
|
|
940
|
+
if (current >= bestCorrectScore) {
|
|
941
|
+
constraints.push({
|
|
942
|
+
type: "correctnessDominance",
|
|
943
|
+
reason: `${spec.id} capped below ${bestCorrectCandidate.id} due to correctness-dominance (hybrid_policy)`
|
|
944
|
+
});
|
|
945
|
+
expectedScores[spec.id] = clamp2(Math.max(0, bestCorrectScore - 0.1));
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
}
|
|
949
|
+
const ranked = [...specs].sort(
|
|
950
|
+
(a, b) => (expectedScores[b.id] ?? 0) - (expectedScores[a.id] ?? 0) || a.id.localeCompare(b.id)
|
|
951
|
+
).map((spec) => spec.id);
|
|
952
|
+
const expectedConfidence = computeExpectedConfidence(specs, expectedScores);
|
|
953
|
+
return {
|
|
954
|
+
expectedRanking: ranked,
|
|
955
|
+
expectedWinner: ranked[0] ?? specs[0]?.id ?? "unknown",
|
|
956
|
+
expectedScores,
|
|
957
|
+
constraints,
|
|
958
|
+
expectedConfidence
|
|
959
|
+
};
|
|
960
|
+
}
|
|
961
|
+
function computeExpectedConfidence(specs, scores) {
|
|
962
|
+
const sorted = [...specs].sort(
|
|
963
|
+
(a, b) => (scores[b.id] ?? 0) - (scores[a.id] ?? 0) || a.id.localeCompare(b.id)
|
|
964
|
+
);
|
|
965
|
+
const confidence = {};
|
|
966
|
+
if (sorted.length === 0) return confidence;
|
|
967
|
+
const topScore = scores[sorted[0]?.id ?? ""] ?? 0;
|
|
968
|
+
const runnerUpScore = sorted.length > 1 ? scores[sorted[1]?.id ?? ""] ?? 0 : 0;
|
|
969
|
+
const margin = topScore - runnerUpScore;
|
|
970
|
+
for (const spec of sorted) {
|
|
971
|
+
const score = scores[spec.id] ?? 0;
|
|
972
|
+
const distFromTop = topScore - score;
|
|
973
|
+
if (distFromTop === 0) {
|
|
974
|
+
if (margin > 15) confidence[spec.id] = 0.9;
|
|
975
|
+
else if (margin > 5) confidence[spec.id] = 0.85;
|
|
976
|
+
else if (margin > 3) confidence[spec.id] = 0.65;
|
|
977
|
+
else if (margin > 1) confidence[spec.id] = 0.5;
|
|
978
|
+
else confidence[spec.id] = 0.45;
|
|
979
|
+
} else {
|
|
980
|
+
confidence[spec.id] = clamp2(Math.max(15, 50 - distFromTop * 0.8)) / 100;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
return confidence;
|
|
984
|
+
}
|
|
985
|
+
function calculateGroundTruth(specs) {
|
|
986
|
+
const constraints = [];
|
|
987
|
+
const expectedScores = {};
|
|
988
|
+
const expectedStrategyScores = {};
|
|
989
|
+
const expectedCategoryScores = {};
|
|
990
|
+
for (const spec of specs) {
|
|
991
|
+
const categories = {
|
|
992
|
+
semanticTaskFit: semanticTaskFit(spec),
|
|
993
|
+
functionalCorrectness: functionalCorrectness(spec),
|
|
994
|
+
maintainability: maintainability(spec),
|
|
995
|
+
changeDiscipline: changeDiscipline(spec)
|
|
996
|
+
};
|
|
997
|
+
expectedCategoryScores[spec.id] = categories;
|
|
998
|
+
expectedStrategyScores[spec.id] = strategyScore(spec);
|
|
999
|
+
expectedScores[spec.id] = applyLegacyCaps(spec, categories, constraints);
|
|
1000
|
+
}
|
|
1001
|
+
const STRONG_CORRECTNESS_GAP = 25;
|
|
1002
|
+
for (let i = 0; i < specs.length; i++) {
|
|
1003
|
+
const specA = specs[i];
|
|
1004
|
+
if (!specA) continue;
|
|
1005
|
+
const scoreA = expectedScores[specA.id] ?? 0;
|
|
1006
|
+
const correctnessA = functionalCorrectness(specA);
|
|
1007
|
+
for (let j = i + 1; j < specs.length; j++) {
|
|
1008
|
+
const specB = specs[j];
|
|
1009
|
+
if (!specB) continue;
|
|
1010
|
+
const scoreB = expectedScores[specB.id] ?? 0;
|
|
1011
|
+
const correctnessB = functionalCorrectness(specB);
|
|
1012
|
+
if (correctnessA >= correctnessB + STRONG_CORRECTNESS_GAP && scoreB > scoreA) {
|
|
1013
|
+
constraints.push({
|
|
1014
|
+
type: "correctnessDominance",
|
|
1015
|
+
reason: `${specB.id} (FC=${correctnessB.toFixed(1)}) capped below ${specA.id} (FC=${correctnessA.toFixed(1)}) due to strong correctness gap (legacy)`
|
|
1016
|
+
});
|
|
1017
|
+
expectedScores[specB.id] = clamp2(Math.max(0, scoreA - 0.1));
|
|
1018
|
+
} else if (correctnessB >= correctnessA + STRONG_CORRECTNESS_GAP && scoreA > scoreB) {
|
|
1019
|
+
constraints.push({
|
|
1020
|
+
type: "correctnessDominance",
|
|
1021
|
+
reason: `${specA.id} (FC=${correctnessA.toFixed(1)}) capped below ${specB.id} (FC=${correctnessB.toFixed(1)}) due to strong correctness gap (legacy)`
|
|
1022
|
+
});
|
|
1023
|
+
expectedScores[specA.id] = clamp2(Math.max(0, scoreB - 0.1));
|
|
1024
|
+
}
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
const ranked = [...specs].sort(
|
|
1028
|
+
(a, b) => (expectedScores[b.id] ?? 0) - (expectedScores[a.id] ?? 0) || a.id.localeCompare(b.id)
|
|
1029
|
+
).map((spec) => spec.id);
|
|
1030
|
+
const expectedConfidence = computeExpectedConfidence(specs, expectedScores);
|
|
1031
|
+
return {
|
|
1032
|
+
expectedRanking: ranked,
|
|
1033
|
+
expectedWinner: ranked[0] ?? specs[0]?.id ?? "unknown",
|
|
1034
|
+
expectedScores,
|
|
1035
|
+
expectedStrategyScores,
|
|
1036
|
+
expectedCategoryScores,
|
|
1037
|
+
constraints,
|
|
1038
|
+
expectedConfidence,
|
|
1039
|
+
policyModels: {
|
|
1040
|
+
hybrid: computeHybridGroundTruth(specs)
|
|
1041
|
+
}
|
|
1042
|
+
};
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
// scripts/simulation/runner.ts
|
|
1046
|
+
async function safeEvaluate(evaluator, variants, prompt, options, label) {
|
|
1047
|
+
try {
|
|
1048
|
+
return await evaluator(variants, prompt, options);
|
|
1049
|
+
} catch (error) {
|
|
1050
|
+
console.warn(`[simulation] ${label} judge failed:`, error);
|
|
1051
|
+
return void 0;
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
async function runScenario(scenario, config, context) {
|
|
1055
|
+
const variants = scenario.variants.map(createVariantResult);
|
|
1056
|
+
const groundTruth = calculateGroundTruth(scenario.variants);
|
|
1057
|
+
const prompt = scenario.prompt ?? config.prompt;
|
|
1058
|
+
const options = {
|
|
1059
|
+
timeoutSeconds: 120,
|
|
1060
|
+
// Simulation benchmarks should be strict/single-attempt for signal purity and runtime control.
|
|
1061
|
+
maxAttempts: 1
|
|
1062
|
+
};
|
|
1063
|
+
if (config.dryRun) {
|
|
1064
|
+
const multiLensResult2 = simulateJudgeSynthesisResult("multiLens", variants, prompt);
|
|
1065
|
+
const hybridResult = simulateJudgeSynthesisResult("hybrid", variants, prompt);
|
|
1066
|
+
return {
|
|
1067
|
+
scenario,
|
|
1068
|
+
variants,
|
|
1069
|
+
groundTruth,
|
|
1070
|
+
multiLensResult: multiLensResult2,
|
|
1071
|
+
hybridResult,
|
|
1072
|
+
runDir: context.runDir
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
const multiLensJudge = new MultiLensJudge({ telemetryLogger: context.telemetryLogger });
|
|
1076
|
+
const multiLensResult = await safeEvaluate(
|
|
1077
|
+
multiLensJudge.evaluate.bind(multiLensJudge),
|
|
1078
|
+
variants,
|
|
1079
|
+
prompt,
|
|
1080
|
+
options,
|
|
1081
|
+
"multiLens"
|
|
1082
|
+
);
|
|
1083
|
+
return {
|
|
1084
|
+
scenario,
|
|
1085
|
+
variants,
|
|
1086
|
+
groundTruth,
|
|
1087
|
+
multiLensResult,
|
|
1088
|
+
runDir: context.runDir
|
|
1089
|
+
};
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
// scripts/simulation/scenarios/edge-cases.ts
|
|
1093
|
+
var createSpec = (baseId, overrides) => ({
|
|
1094
|
+
id: `${baseId}-${overrides.variantStrategy ?? "variant"}`,
|
|
1095
|
+
variantLabel: overrides.variantLabel ?? overrides.variantStrategy ?? "variant",
|
|
1096
|
+
variantStrategy: overrides.variantStrategy ?? "conservative",
|
|
1097
|
+
provider: overrides.provider ?? "claude",
|
|
1098
|
+
codeQuality: overrides.codeQuality ?? 65,
|
|
1099
|
+
correctness: overrides.correctness ?? 70,
|
|
1100
|
+
completeness: overrides.completeness ?? 70,
|
|
1101
|
+
innovation: overrides.innovation ?? 50,
|
|
1102
|
+
executionMode: overrides.executionMode ?? "local",
|
|
1103
|
+
durationMs: overrides.durationMs ?? 12e3,
|
|
1104
|
+
files: overrides.files ?? ["src/lib/main.ts"],
|
|
1105
|
+
description: overrides.description,
|
|
1106
|
+
edgeModifiers: overrides.edgeModifiers,
|
|
1107
|
+
outcomeType: overrides.outcomeType
|
|
1108
|
+
});
|
|
1109
|
+
var EDGE_CASE_SCENARIOS = [
|
|
1110
|
+
{
|
|
1111
|
+
id: "close-scores",
|
|
1112
|
+
description: "Variants with near-identical metrics to test tie handling",
|
|
1113
|
+
type: "edge",
|
|
1114
|
+
prompt: "Implement a small feature in FILE: src/lib/main.ts. Keep changes minimal but complete, and ensure tests pass.",
|
|
1115
|
+
variants: [
|
|
1116
|
+
createSpec("close", {
|
|
1117
|
+
variantStrategy: "stable",
|
|
1118
|
+
codeQuality: 75,
|
|
1119
|
+
completeness: 78,
|
|
1120
|
+
correctness: 79,
|
|
1121
|
+
innovation: 69,
|
|
1122
|
+
durationMs: 8e3
|
|
1123
|
+
}),
|
|
1124
|
+
createSpec("close", {
|
|
1125
|
+
variantStrategy: "innovative",
|
|
1126
|
+
codeQuality: 77,
|
|
1127
|
+
completeness: 77,
|
|
1128
|
+
correctness: 78,
|
|
1129
|
+
innovation: 72,
|
|
1130
|
+
durationMs: 9e3
|
|
1131
|
+
}),
|
|
1132
|
+
createSpec("close", {
|
|
1133
|
+
variantStrategy: "balanced",
|
|
1134
|
+
codeQuality: 76,
|
|
1135
|
+
completeness: 79,
|
|
1136
|
+
correctness: 77,
|
|
1137
|
+
innovation: 70,
|
|
1138
|
+
durationMs: 1e4
|
|
1139
|
+
})
|
|
1140
|
+
]
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
id: "tie-breaker",
|
|
1144
|
+
description: "Scores tie after caps to exercise deterministic ordering",
|
|
1145
|
+
type: "edge",
|
|
1146
|
+
prompt: "Refactor FILE: src/lib/main.ts for readability without changing behavior. Keep changes minimal and well-scoped.",
|
|
1147
|
+
variants: [
|
|
1148
|
+
createSpec("tie", {
|
|
1149
|
+
variantStrategy: "alpha",
|
|
1150
|
+
codeQuality: 80,
|
|
1151
|
+
correctness: 80,
|
|
1152
|
+
completeness: 70,
|
|
1153
|
+
innovation: 60
|
|
1154
|
+
}),
|
|
1155
|
+
createSpec("tie", {
|
|
1156
|
+
variantStrategy: "beta",
|
|
1157
|
+
codeQuality: 80,
|
|
1158
|
+
correctness: 80,
|
|
1159
|
+
completeness: 70,
|
|
1160
|
+
innovation: 60
|
|
1161
|
+
})
|
|
1162
|
+
]
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
id: "planning-only",
|
|
1166
|
+
description: "One variant only produces a plan (no code)",
|
|
1167
|
+
type: "edge",
|
|
1168
|
+
prompt: "Implement the requested change in code (not just a plan). Modify FILE: src/lib/main.ts and ensure tests pass.",
|
|
1169
|
+
variants: [
|
|
1170
|
+
createSpec("plan", {
|
|
1171
|
+
variantStrategy: "planner",
|
|
1172
|
+
outcomeType: "planning-only",
|
|
1173
|
+
edgeModifiers: { isPlanningOnly: true, hasEmptyChanges: true },
|
|
1174
|
+
files: [],
|
|
1175
|
+
codeQuality: 30,
|
|
1176
|
+
correctness: 20,
|
|
1177
|
+
completeness: 10,
|
|
1178
|
+
innovation: 40
|
|
1179
|
+
}),
|
|
1180
|
+
createSpec("plan", {
|
|
1181
|
+
variantStrategy: "executor",
|
|
1182
|
+
codeQuality: 70,
|
|
1183
|
+
correctness: 85,
|
|
1184
|
+
completeness: 80,
|
|
1185
|
+
innovation: 60
|
|
1186
|
+
})
|
|
1187
|
+
]
|
|
1188
|
+
},
|
|
1189
|
+
{
|
|
1190
|
+
id: "empty-result",
|
|
1191
|
+
description: "Provider reported success but made zero edits",
|
|
1192
|
+
type: "edge",
|
|
1193
|
+
prompt: "Fix the bug in FILE: src/lib/main.ts and ensure tests pass.",
|
|
1194
|
+
variants: [
|
|
1195
|
+
createSpec("empty", {
|
|
1196
|
+
variantStrategy: "silent",
|
|
1197
|
+
edgeModifiers: { hasEmptyChanges: true },
|
|
1198
|
+
codeQuality: 10,
|
|
1199
|
+
correctness: 10,
|
|
1200
|
+
completeness: 0,
|
|
1201
|
+
innovation: 5
|
|
1202
|
+
}),
|
|
1203
|
+
createSpec("empty", {
|
|
1204
|
+
variantStrategy: "no-op",
|
|
1205
|
+
codeQuality: 50,
|
|
1206
|
+
correctness: 60,
|
|
1207
|
+
completeness: 65,
|
|
1208
|
+
innovation: 45
|
|
1209
|
+
})
|
|
1210
|
+
]
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
id: "docs-only",
|
|
1214
|
+
description: "Variants that only touch documentation",
|
|
1215
|
+
type: "edge",
|
|
1216
|
+
prompt: "Update documentation in FILE: docs/guide.md. Do not change runtime code. Keep the update accurate and concise.",
|
|
1217
|
+
variants: [
|
|
1218
|
+
createSpec("docs", {
|
|
1219
|
+
variantStrategy: "docs",
|
|
1220
|
+
edgeModifiers: { isDocsOnly: true },
|
|
1221
|
+
files: ["docs/guide.md"],
|
|
1222
|
+
codeQuality: 65,
|
|
1223
|
+
correctness: 55,
|
|
1224
|
+
completeness: 70,
|
|
1225
|
+
innovation: 30
|
|
1226
|
+
}),
|
|
1227
|
+
createSpec("docs", {
|
|
1228
|
+
variantStrategy: "docs-plus",
|
|
1229
|
+
edgeModifiers: { isDocsOnly: true },
|
|
1230
|
+
files: ["docs/reference.md"],
|
|
1231
|
+
codeQuality: 70,
|
|
1232
|
+
correctness: 58,
|
|
1233
|
+
completeness: 72,
|
|
1234
|
+
innovation: 35
|
|
1235
|
+
})
|
|
1236
|
+
]
|
|
1237
|
+
},
|
|
1238
|
+
{
|
|
1239
|
+
id: "high-quality-failed-tests",
|
|
1240
|
+
description: "High code quality but failing tests",
|
|
1241
|
+
type: "edge",
|
|
1242
|
+
prompt: "Implement the change in FILE: src/lib/main.ts and ensure tests pass. Correctness is more important than novelty.",
|
|
1243
|
+
variants: [
|
|
1244
|
+
createSpec("hqfail", {
|
|
1245
|
+
variantStrategy: "alpha",
|
|
1246
|
+
edgeModifiers: { hasTestFailures: true },
|
|
1247
|
+
codeQuality: 90,
|
|
1248
|
+
correctness: 45,
|
|
1249
|
+
completeness: 80,
|
|
1250
|
+
innovation: 85
|
|
1251
|
+
}),
|
|
1252
|
+
createSpec("hqfail", {
|
|
1253
|
+
variantStrategy: "beta",
|
|
1254
|
+
codeQuality: 85,
|
|
1255
|
+
correctness: 70,
|
|
1256
|
+
completeness: 85,
|
|
1257
|
+
innovation: 65
|
|
1258
|
+
})
|
|
1259
|
+
]
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
id: "orphaned-test-imports",
|
|
1263
|
+
description: "Tests introduce orphaned relative imports (incomplete scaffolding)",
|
|
1264
|
+
type: "edge",
|
|
1265
|
+
prompt: "Add feature foo",
|
|
1266
|
+
variants: [
|
|
1267
|
+
createSpec("orphaned", {
|
|
1268
|
+
variantStrategy: "scaffold",
|
|
1269
|
+
files: ["src/lib/main.test.ts"],
|
|
1270
|
+
edgeModifiers: { addsExecutableLines: true, hasOrphanedTestImports: true },
|
|
1271
|
+
codeQuality: 92,
|
|
1272
|
+
correctness: 85,
|
|
1273
|
+
completeness: 88,
|
|
1274
|
+
innovation: 75
|
|
1275
|
+
}),
|
|
1276
|
+
createSpec("orphaned", {
|
|
1277
|
+
variantStrategy: "implemented",
|
|
1278
|
+
files: ["src/lib/main.ts"],
|
|
1279
|
+
edgeModifiers: { addsExecutableLines: true },
|
|
1280
|
+
codeQuality: 82,
|
|
1281
|
+
correctness: 90,
|
|
1282
|
+
completeness: 80,
|
|
1283
|
+
innovation: 60
|
|
1284
|
+
})
|
|
1285
|
+
]
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
id: "all-fail",
|
|
1289
|
+
description: "Every variant fails (syntactic or test issues)",
|
|
1290
|
+
type: "edge",
|
|
1291
|
+
prompt: "Fix the code in FILE: src/lib/main.ts and ensure it runs and tests pass.",
|
|
1292
|
+
variants: [
|
|
1293
|
+
createSpec("fail", {
|
|
1294
|
+
variantStrategy: "syntax",
|
|
1295
|
+
edgeModifiers: { hasSyntaxErrors: true },
|
|
1296
|
+
codeQuality: 30,
|
|
1297
|
+
correctness: 40,
|
|
1298
|
+
completeness: 30,
|
|
1299
|
+
innovation: 20
|
|
1300
|
+
}),
|
|
1301
|
+
createSpec("fail", {
|
|
1302
|
+
variantStrategy: "tests",
|
|
1303
|
+
edgeModifiers: { hasTestFailures: true },
|
|
1304
|
+
codeQuality: 40,
|
|
1305
|
+
correctness: 35,
|
|
1306
|
+
completeness: 45,
|
|
1307
|
+
innovation: 25
|
|
1308
|
+
})
|
|
1309
|
+
]
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
id: "single-variant",
|
|
1313
|
+
description: "Only one variant is available for evaluation",
|
|
1314
|
+
type: "edge",
|
|
1315
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Ensure code is correct.",
|
|
1316
|
+
variants: [
|
|
1317
|
+
createSpec("single", {
|
|
1318
|
+
variantStrategy: "solo",
|
|
1319
|
+
codeQuality: 70,
|
|
1320
|
+
correctness: 75,
|
|
1321
|
+
completeness: 80,
|
|
1322
|
+
innovation: 60
|
|
1323
|
+
})
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
id: "file-target-violation",
|
|
1328
|
+
description: "Variants violate FILE: targets to test caps",
|
|
1329
|
+
type: "edge",
|
|
1330
|
+
prompt: "Make a change ONLY in FILE: src/lib/main.ts. Do not modify other files. Keep changes minimal.",
|
|
1331
|
+
variants: [
|
|
1332
|
+
createSpec("files", {
|
|
1333
|
+
variantStrategy: "misaligned",
|
|
1334
|
+
files: ["src/unused.ts"],
|
|
1335
|
+
codeQuality: 60,
|
|
1336
|
+
correctness: 80,
|
|
1337
|
+
completeness: 65,
|
|
1338
|
+
innovation: 55
|
|
1339
|
+
}),
|
|
1340
|
+
createSpec("files", {
|
|
1341
|
+
variantStrategy: "aligned",
|
|
1342
|
+
files: ["src/lib/main.ts"],
|
|
1343
|
+
codeQuality: 65,
|
|
1344
|
+
correctness: 82,
|
|
1345
|
+
completeness: 70,
|
|
1346
|
+
innovation: 58
|
|
1347
|
+
})
|
|
1348
|
+
]
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
id: "long-duration",
|
|
1352
|
+
description: "Variants run for an unusually long time",
|
|
1353
|
+
type: "edge",
|
|
1354
|
+
prompt: "Implement the change efficiently in FILE: src/lib/main.ts. Avoid long-running operations and keep runtime fast.",
|
|
1355
|
+
variants: [
|
|
1356
|
+
createSpec("slow", {
|
|
1357
|
+
variantStrategy: "timeout",
|
|
1358
|
+
durationMs: 18e4,
|
|
1359
|
+
codeQuality: 75,
|
|
1360
|
+
correctness: 70,
|
|
1361
|
+
completeness: 72,
|
|
1362
|
+
innovation: 60
|
|
1363
|
+
}),
|
|
1364
|
+
createSpec("slow", {
|
|
1365
|
+
variantStrategy: "steady",
|
|
1366
|
+
durationMs: 12e4,
|
|
1367
|
+
codeQuality: 78,
|
|
1368
|
+
correctness: 75,
|
|
1369
|
+
completeness: 76,
|
|
1370
|
+
innovation: 65
|
|
1371
|
+
})
|
|
1372
|
+
]
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
id: "conflicting-tradeoffs",
|
|
1376
|
+
description: "One variant prioritizes completeness, another correctness",
|
|
1377
|
+
type: "edge",
|
|
1378
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Prioritize correctness and safety over breadth; tests should pass.",
|
|
1379
|
+
variants: [
|
|
1380
|
+
createSpec("tradeoff", {
|
|
1381
|
+
variantStrategy: "completeness",
|
|
1382
|
+
codeQuality: 65,
|
|
1383
|
+
correctness: 60,
|
|
1384
|
+
completeness: 90,
|
|
1385
|
+
innovation: 50
|
|
1386
|
+
}),
|
|
1387
|
+
createSpec("tradeoff", {
|
|
1388
|
+
variantStrategy: "correctness",
|
|
1389
|
+
codeQuality: 60,
|
|
1390
|
+
correctness: 92,
|
|
1391
|
+
completeness: 55,
|
|
1392
|
+
innovation: 45
|
|
1393
|
+
})
|
|
1394
|
+
]
|
|
1395
|
+
},
|
|
1396
|
+
{
|
|
1397
|
+
id: "high-innovation-low-correctness",
|
|
1398
|
+
description: "Innovative approaches that may sacrifice correctness",
|
|
1399
|
+
type: "edge",
|
|
1400
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Prefer correct, maintainable solutions over cleverness. Tests should pass.",
|
|
1401
|
+
variants: [
|
|
1402
|
+
createSpec("innovate", {
|
|
1403
|
+
variantStrategy: "creative",
|
|
1404
|
+
codeQuality: 85,
|
|
1405
|
+
correctness: 50,
|
|
1406
|
+
completeness: 65,
|
|
1407
|
+
innovation: 95
|
|
1408
|
+
}),
|
|
1409
|
+
createSpec("innovate", {
|
|
1410
|
+
variantStrategy: "safe",
|
|
1411
|
+
codeQuality: 70,
|
|
1412
|
+
correctness: 85,
|
|
1413
|
+
completeness: 80,
|
|
1414
|
+
innovation: 55
|
|
1415
|
+
})
|
|
1416
|
+
]
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
id: "stable-high-quality",
|
|
1420
|
+
description: "Variants that maximize maintainability and change discipline",
|
|
1421
|
+
type: "edge",
|
|
1422
|
+
prompt: "Refactor FILE: src/lib/main.ts for maintainability. Preserve behavior; avoid unnecessary changes.",
|
|
1423
|
+
variants: [
|
|
1424
|
+
createSpec("stable", {
|
|
1425
|
+
variantStrategy: "refined",
|
|
1426
|
+
codeQuality: 90,
|
|
1427
|
+
correctness: 88,
|
|
1428
|
+
completeness: 85,
|
|
1429
|
+
innovation: 60
|
|
1430
|
+
}),
|
|
1431
|
+
createSpec("stable", {
|
|
1432
|
+
variantStrategy: "polished",
|
|
1433
|
+
codeQuality: 88,
|
|
1434
|
+
correctness: 90,
|
|
1435
|
+
completeness: 80,
|
|
1436
|
+
innovation: 65
|
|
1437
|
+
})
|
|
1438
|
+
]
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
id: "partial-success",
|
|
1442
|
+
description: "One variant produces half the required changes",
|
|
1443
|
+
type: "edge",
|
|
1444
|
+
prompt: "Implement the full set of requested changes in FILE: src/lib/main.ts. Completeness matters; ensure tests pass.",
|
|
1445
|
+
variants: [
|
|
1446
|
+
createSpec("partial", {
|
|
1447
|
+
variantStrategy: "half",
|
|
1448
|
+
codeQuality: 70,
|
|
1449
|
+
correctness: 60,
|
|
1450
|
+
completeness: 40,
|
|
1451
|
+
innovation: 50
|
|
1452
|
+
}),
|
|
1453
|
+
createSpec("partial", {
|
|
1454
|
+
variantStrategy: "complete",
|
|
1455
|
+
codeQuality: 75,
|
|
1456
|
+
correctness: 70,
|
|
1457
|
+
completeness: 85,
|
|
1458
|
+
innovation: 55
|
|
1459
|
+
})
|
|
1460
|
+
]
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
id: "planning-intent",
|
|
1464
|
+
description: "Prompt suggests planning, but edit exists",
|
|
1465
|
+
type: "edge",
|
|
1466
|
+
prompt: "Create a plan for the change. Do not modify code. Explain steps clearly and comprehensively.",
|
|
1467
|
+
variants: [
|
|
1468
|
+
createSpec("intent", {
|
|
1469
|
+
variantStrategy: "plan",
|
|
1470
|
+
edgeModifiers: { isPlanningOnly: true },
|
|
1471
|
+
codeQuality: 50,
|
|
1472
|
+
correctness: 55,
|
|
1473
|
+
completeness: 40,
|
|
1474
|
+
innovation: 45
|
|
1475
|
+
}),
|
|
1476
|
+
createSpec("intent", {
|
|
1477
|
+
variantStrategy: "execute",
|
|
1478
|
+
codeQuality: 75,
|
|
1479
|
+
correctness: 80,
|
|
1480
|
+
completeness: 82,
|
|
1481
|
+
innovation: 60
|
|
1482
|
+
})
|
|
1483
|
+
]
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
id: "missing-files",
|
|
1487
|
+
description: "Variants touched no tracked files (workspace empty)",
|
|
1488
|
+
type: "edge",
|
|
1489
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Ensure code is updated.",
|
|
1490
|
+
variants: [
|
|
1491
|
+
createSpec("missing", {
|
|
1492
|
+
variantStrategy: "ghost",
|
|
1493
|
+
edgeModifiers: { hasEmptyChanges: true },
|
|
1494
|
+
codeQuality: 20,
|
|
1495
|
+
correctness: 30,
|
|
1496
|
+
completeness: 10,
|
|
1497
|
+
innovation: 20
|
|
1498
|
+
}),
|
|
1499
|
+
createSpec("missing", {
|
|
1500
|
+
variantStrategy: "minimal",
|
|
1501
|
+
codeQuality: 55,
|
|
1502
|
+
correctness: 60,
|
|
1503
|
+
completeness: 45,
|
|
1504
|
+
innovation: 35
|
|
1505
|
+
})
|
|
1506
|
+
]
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
id: "multiple-weak",
|
|
1510
|
+
description: "Many low-quality variants force judge to pick the least bad",
|
|
1511
|
+
type: "edge",
|
|
1512
|
+
prompt: "Fix the bug in FILE: src/lib/main.ts. Even among weak attempts, prefer the most correct and complete result.",
|
|
1513
|
+
variants: [
|
|
1514
|
+
createSpec("weak", {
|
|
1515
|
+
variantStrategy: "alpha",
|
|
1516
|
+
codeQuality: 30,
|
|
1517
|
+
correctness: 40,
|
|
1518
|
+
completeness: 35,
|
|
1519
|
+
innovation: 25
|
|
1520
|
+
}),
|
|
1521
|
+
createSpec("weak", {
|
|
1522
|
+
variantStrategy: "beta",
|
|
1523
|
+
codeQuality: 32,
|
|
1524
|
+
correctness: 45,
|
|
1525
|
+
completeness: 38,
|
|
1526
|
+
innovation: 28
|
|
1527
|
+
}),
|
|
1528
|
+
createSpec("weak", {
|
|
1529
|
+
variantStrategy: "gamma",
|
|
1530
|
+
codeQuality: 29,
|
|
1531
|
+
correctness: 42,
|
|
1532
|
+
completeness: 34,
|
|
1533
|
+
innovation: 24
|
|
1534
|
+
})
|
|
1535
|
+
]
|
|
1536
|
+
},
|
|
1537
|
+
{
|
|
1538
|
+
id: "strong-tests-low-quality",
|
|
1539
|
+
description: "Variants with perfect pass rates but mediocre code quality",
|
|
1540
|
+
type: "edge",
|
|
1541
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Correctness matters, but prefer maintainable production code. Tests should pass.",
|
|
1542
|
+
variants: [
|
|
1543
|
+
createSpec("tests", {
|
|
1544
|
+
variantStrategy: "test-first",
|
|
1545
|
+
codeQuality: 50,
|
|
1546
|
+
correctness: 95,
|
|
1547
|
+
completeness: 70,
|
|
1548
|
+
innovation: 45
|
|
1549
|
+
}),
|
|
1550
|
+
createSpec("tests", {
|
|
1551
|
+
variantStrategy: "code-first",
|
|
1552
|
+
codeQuality: 65,
|
|
1553
|
+
correctness: 88,
|
|
1554
|
+
completeness: 75,
|
|
1555
|
+
innovation: 55
|
|
1556
|
+
})
|
|
1557
|
+
]
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
id: "tests-only-implementation",
|
|
1561
|
+
description: "Tests-only changes should not beat real implementation work on feature tasks",
|
|
1562
|
+
type: "edge",
|
|
1563
|
+
prompt: "Implement the feature in FILE: src/lib/main.ts. Ensure tests pass.",
|
|
1564
|
+
variants: [
|
|
1565
|
+
createSpec("tests-only", {
|
|
1566
|
+
variantStrategy: "tests-only",
|
|
1567
|
+
files: ["src/lib/main.test.ts"],
|
|
1568
|
+
edgeModifiers: { addsExecutableLines: true, isTestsOnly: true },
|
|
1569
|
+
// Make this variant look tempting on correctness, but it should be capped for being tests-only.
|
|
1570
|
+
codeQuality: 70,
|
|
1571
|
+
correctness: 95,
|
|
1572
|
+
completeness: 65,
|
|
1573
|
+
innovation: 55
|
|
1574
|
+
}),
|
|
1575
|
+
createSpec("tests-only", {
|
|
1576
|
+
variantStrategy: "implemented",
|
|
1577
|
+
files: ["src/lib/main.ts", "src/lib/main.test.ts"],
|
|
1578
|
+
edgeModifiers: { addsExecutableLines: true },
|
|
1579
|
+
codeQuality: 72,
|
|
1580
|
+
correctness: 90,
|
|
1581
|
+
completeness: 80,
|
|
1582
|
+
innovation: 55
|
|
1583
|
+
})
|
|
1584
|
+
]
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
id: "docs-tests",
|
|
1588
|
+
description: "Combination of documentation work and test scaffolding",
|
|
1589
|
+
type: "edge",
|
|
1590
|
+
prompt: "Update documentation in FILE: docs/guide.md and add a unit test in FILE: src/lib/main.test.ts. Ensure tests pass.",
|
|
1591
|
+
variants: [
|
|
1592
|
+
createSpec("docs-tests", {
|
|
1593
|
+
variantStrategy: "docs",
|
|
1594
|
+
edgeModifiers: { isDocsOnly: true },
|
|
1595
|
+
files: ["docs/guide.md"],
|
|
1596
|
+
codeQuality: 60,
|
|
1597
|
+
correctness: 60,
|
|
1598
|
+
completeness: 60,
|
|
1599
|
+
innovation: 40
|
|
1600
|
+
}),
|
|
1601
|
+
createSpec("docs-tests", {
|
|
1602
|
+
variantStrategy: "tests",
|
|
1603
|
+
files: ["src/lib/main.ts", "src/lib/main.test.ts"],
|
|
1604
|
+
edgeModifiers: { addsExecutableLines: true },
|
|
1605
|
+
codeQuality: 70,
|
|
1606
|
+
correctness: 90,
|
|
1607
|
+
completeness: 65,
|
|
1608
|
+
innovation: 50
|
|
1609
|
+
})
|
|
1610
|
+
]
|
|
1611
|
+
},
|
|
1612
|
+
{
|
|
1613
|
+
id: "jsdoc-only-codefile",
|
|
1614
|
+
description: "Doc-only (JSDoc/comment) changes inside a code file should not be penalized as no-op for doc-intent prompts",
|
|
1615
|
+
type: "edge",
|
|
1616
|
+
prompt: "Add JSDoc/TSDoc comments ONLY (no runtime logic changes) in FILE: src/lib/main.ts. Keep changes limited to comments/docs.",
|
|
1617
|
+
variants: [
|
|
1618
|
+
createSpec("jsdoc", {
|
|
1619
|
+
variantStrategy: "docs",
|
|
1620
|
+
files: ["src/lib/main.ts"],
|
|
1621
|
+
edgeModifiers: { docOnlyInCodeFiles: true },
|
|
1622
|
+
codeQuality: 75,
|
|
1623
|
+
correctness: 80,
|
|
1624
|
+
completeness: 75,
|
|
1625
|
+
innovation: 30
|
|
1626
|
+
}),
|
|
1627
|
+
createSpec("jsdoc", {
|
|
1628
|
+
variantStrategy: "code",
|
|
1629
|
+
files: ["src/lib/main.ts"],
|
|
1630
|
+
edgeModifiers: { addsExecutableLines: true },
|
|
1631
|
+
codeQuality: 65,
|
|
1632
|
+
correctness: 78,
|
|
1633
|
+
completeness: 78,
|
|
1634
|
+
innovation: 50
|
|
1635
|
+
})
|
|
1636
|
+
]
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
id: "jsdoc-only-vs-noop",
|
|
1640
|
+
description: "Doc-only in code file vs empty/no-op result",
|
|
1641
|
+
type: "edge",
|
|
1642
|
+
prompt: "Add JSDoc comments ONLY in FILE: src/lib/main.ts (no runtime logic changes). Do not add new files.",
|
|
1643
|
+
variants: [
|
|
1644
|
+
createSpec("jsdoc-noop", {
|
|
1645
|
+
variantStrategy: "docs",
|
|
1646
|
+
files: ["src/lib/main.ts"],
|
|
1647
|
+
edgeModifiers: { docOnlyInCodeFiles: true },
|
|
1648
|
+
codeQuality: 70,
|
|
1649
|
+
correctness: 75,
|
|
1650
|
+
completeness: 70,
|
|
1651
|
+
innovation: 25
|
|
1652
|
+
}),
|
|
1653
|
+
createSpec("jsdoc-noop", {
|
|
1654
|
+
variantStrategy: "silent",
|
|
1655
|
+
files: ["src/lib/main.ts"],
|
|
1656
|
+
edgeModifiers: { hasEmptyChanges: true },
|
|
1657
|
+
codeQuality: 60,
|
|
1658
|
+
correctness: 60,
|
|
1659
|
+
completeness: 60,
|
|
1660
|
+
innovation: 20
|
|
1661
|
+
})
|
|
1662
|
+
]
|
|
1663
|
+
},
|
|
1664
|
+
{
|
|
1665
|
+
id: "docs-and-tests-required",
|
|
1666
|
+
description: "Prompt requests both docs and tests; tests variant should win over docs-only",
|
|
1667
|
+
type: "edge",
|
|
1668
|
+
prompt: "Update documentation and add tests for the change. Add a new unit test file and ensure tests pass.",
|
|
1669
|
+
variants: [
|
|
1670
|
+
createSpec("docs-tests-req", {
|
|
1671
|
+
variantStrategy: "docs",
|
|
1672
|
+
files: ["docs/guide.md"],
|
|
1673
|
+
edgeModifiers: { isDocsOnly: true },
|
|
1674
|
+
codeQuality: 70,
|
|
1675
|
+
correctness: 60,
|
|
1676
|
+
completeness: 75,
|
|
1677
|
+
innovation: 35
|
|
1678
|
+
}),
|
|
1679
|
+
createSpec("docs-tests-req", {
|
|
1680
|
+
variantStrategy: "tests",
|
|
1681
|
+
files: ["src/lib/main.ts", "tests/unit/main.test.ts"],
|
|
1682
|
+
edgeModifiers: { addsExecutableLines: true },
|
|
1683
|
+
codeQuality: 68,
|
|
1684
|
+
correctness: 85,
|
|
1685
|
+
completeness: 78,
|
|
1686
|
+
innovation: 45
|
|
1687
|
+
})
|
|
1688
|
+
]
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
id: "syntax-error",
|
|
1692
|
+
description: "Syntax problems limit functional correctness",
|
|
1693
|
+
type: "edge",
|
|
1694
|
+
prompt: "Fix the syntax error in FILE: src/lib/main.ts and ensure code runs.",
|
|
1695
|
+
variants: [
|
|
1696
|
+
createSpec("syntax", {
|
|
1697
|
+
variantStrategy: "broken",
|
|
1698
|
+
edgeModifiers: { hasSyntaxErrors: true },
|
|
1699
|
+
codeQuality: 40,
|
|
1700
|
+
correctness: 30,
|
|
1701
|
+
completeness: 45,
|
|
1702
|
+
innovation: 35
|
|
1703
|
+
}),
|
|
1704
|
+
createSpec("syntax", {
|
|
1705
|
+
variantStrategy: "fixed",
|
|
1706
|
+
codeQuality: 70,
|
|
1707
|
+
correctness: 75,
|
|
1708
|
+
completeness: 78,
|
|
1709
|
+
innovation: 50
|
|
1710
|
+
})
|
|
1711
|
+
]
|
|
1712
|
+
},
|
|
1713
|
+
{
|
|
1714
|
+
id: "mixed-signals",
|
|
1715
|
+
description: "Inconsistent data with high innovation but partial success",
|
|
1716
|
+
type: "edge",
|
|
1717
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Prefer correct, practical solutions over novelty; ensure tests pass.",
|
|
1718
|
+
variants: [
|
|
1719
|
+
createSpec("mixed", {
|
|
1720
|
+
variantStrategy: "creative",
|
|
1721
|
+
codeQuality: 85,
|
|
1722
|
+
correctness: 55,
|
|
1723
|
+
completeness: 60,
|
|
1724
|
+
innovation: 90
|
|
1725
|
+
}),
|
|
1726
|
+
createSpec("mixed", {
|
|
1727
|
+
variantStrategy: "practical",
|
|
1728
|
+
codeQuality: 65,
|
|
1729
|
+
correctness: 80,
|
|
1730
|
+
completeness: 75,
|
|
1731
|
+
innovation: 55
|
|
1732
|
+
})
|
|
1733
|
+
]
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
id: "spread-out",
|
|
1737
|
+
description: "Variants spaced across low/high metrics to test spread",
|
|
1738
|
+
type: "edge",
|
|
1739
|
+
prompt: "Implement the change in FILE: src/lib/main.ts. Prefer the most complete and correct implementation; tests should pass.",
|
|
1740
|
+
variants: [
|
|
1741
|
+
createSpec("spread", {
|
|
1742
|
+
variantStrategy: "low",
|
|
1743
|
+
codeQuality: 35,
|
|
1744
|
+
correctness: 40,
|
|
1745
|
+
completeness: 45,
|
|
1746
|
+
innovation: 30
|
|
1747
|
+
}),
|
|
1748
|
+
createSpec("spread", {
|
|
1749
|
+
variantStrategy: "mid",
|
|
1750
|
+
codeQuality: 60,
|
|
1751
|
+
correctness: 65,
|
|
1752
|
+
completeness: 60,
|
|
1753
|
+
innovation: 55
|
|
1754
|
+
}),
|
|
1755
|
+
createSpec("spread", {
|
|
1756
|
+
variantStrategy: "high",
|
|
1757
|
+
codeQuality: 88,
|
|
1758
|
+
correctness: 90,
|
|
1759
|
+
completeness: 85,
|
|
1760
|
+
innovation: 70
|
|
1761
|
+
})
|
|
1762
|
+
]
|
|
1763
|
+
}
|
|
1764
|
+
];
|
|
1765
|
+
|
|
1766
|
+
// scripts/simulation/types.ts
|
|
1767
|
+
import fs from "fs";
|
|
1768
|
+
import os from "os";
|
|
1769
|
+
import path3 from "path";
|
|
1770
|
+
var SIMULATION_ROOT = process.env.POETIC_SIMULATION_ROOT ?? path3.join(os.tmpdir(), "poetic-simulation");
|
|
1771
|
+
function createIsolatedRun(runId) {
|
|
1772
|
+
const runDir = path3.join(SIMULATION_ROOT, runId);
|
|
1773
|
+
fs.mkdirSync(runDir, { recursive: true });
|
|
1774
|
+
const telemetryLogger = TelemetryLogger.getInstance({ poeticDir: runDir });
|
|
1775
|
+
return { runDir, telemetryLogger };
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
export {
|
|
1779
|
+
analyzeSimulationResults,
|
|
1780
|
+
runScenario,
|
|
1781
|
+
EDGE_CASE_SCENARIOS,
|
|
1782
|
+
createIsolatedRun
|
|
1783
|
+
};
|
|
1784
|
+
//# sourceMappingURL=chunk-3VABAKT2.js.map
|