@poetic-ai/poetic 1.42.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.
Files changed (782) hide show
  1. package/.github/SECURITY.md +47 -0
  2. package/.nvmrc +1 -0
  3. package/.poetic/README.md +37 -0
  4. package/.poetic/providers/catalog.json +12051 -0
  5. package/.poetic/providers/pricing.json +1272 -0
  6. package/.poetic/providers/registry.json +3369 -0
  7. package/CHANGELOG.md +552 -0
  8. package/CODE_OF_CONDUCT.md +40 -0
  9. package/CONTRIBUTING.md +23 -0
  10. package/INSTALL.md +454 -0
  11. package/LICENSE +21 -0
  12. package/README.md +474 -0
  13. package/dist/BasicOptimizationCompetitionRunner-5H5TBYO4.js +153 -0
  14. package/dist/ExecutionTracker-UVONC4C6.js +16 -0
  15. package/dist/OptimizationConfig-7DFY2TST.js +17 -0
  16. package/dist/OptimizationEngine-JIMGP3LY.js +1597 -0
  17. package/dist/PromptStore-U6ZD3ZMQ.js +18 -0
  18. package/dist/actions-LUJPINLJ.js +322 -0
  19. package/dist/agent-ingest-3DJUJ7FU.js +53 -0
  20. package/dist/aggregator-DNCBINFO.js +12 -0
  21. package/dist/ai-judge-5QT5QJVU.js +156 -0
  22. package/dist/allowlist-grounding-RO6HKUFI.js +16 -0
  23. package/dist/allowlist-utils-23V7TJ3G.js +28 -0
  24. package/dist/anchored-turn-service-JULUCUIK.js +489 -0
  25. package/dist/api-transport-4TYTNLTJ.js +1087 -0
  26. package/dist/apply-completion-mode-AW2MOS3R.js +89 -0
  27. package/dist/artifact-migrator-23L45ISD.js +267 -0
  28. package/dist/ask-HWVV6QFR.js +135 -0
  29. package/dist/auth-5KEDKAPP.js +67 -0
  30. package/dist/auth-7TT3JINV.js +78 -0
  31. package/dist/auth-E6XUNZ5M.js +68 -0
  32. package/dist/auth-H3XDZE22.js +134 -0
  33. package/dist/auth-OC4E6633.js +71 -0
  34. package/dist/auth-S4CTX4GQ.js +44 -0
  35. package/dist/auth-YLH3S7EY.js +69 -0
  36. package/dist/auth-liveness-TDDEZY3T.js +46 -0
  37. package/dist/auto-optimizer-VPRWOWGU.js +80 -0
  38. package/dist/autoloop-cleanup-JOGKTLWA.js +109 -0
  39. package/dist/autoloop-evidence-gates-PCDALGVJ.js +38 -0
  40. package/dist/autoloop-gate-policy-Z7FVJVXV.js +175 -0
  41. package/dist/autoloop-helpers-2KTK43GL.js +22 -0
  42. package/dist/autoloop-ledger-W7QO62PX.js +96 -0
  43. package/dist/autoloop-ledger-subscriber-Z5RW5EIE.js +162 -0
  44. package/dist/autoloop-run-defaults-FERGRZGP.js +19 -0
  45. package/dist/autoloop-run-lock-CT2NWSV3.js +197 -0
  46. package/dist/autoloop-success-J2VKKBXQ.js +85 -0
  47. package/dist/autoloop-termination-summary-RN75F422.js +58 -0
  48. package/dist/autoloop-trajectory-XFIEXP5Z.js +282 -0
  49. package/dist/autoloop-wall-clock-T7ZVIQOC.js +12 -0
  50. package/dist/autonomous-loop-controller-PW4XVFGQ.js +4120 -0
  51. package/dist/backend-P3DAYRP7.js +29 -0
  52. package/dist/background-executor-CBN552V4.js +257 -0
  53. package/dist/backlog-execution-intent-U4XYPTV6.js +15 -0
  54. package/dist/backup-active-store-5WXG6SXT.js +17 -0
  55. package/dist/backup-telemetry-db-XGLXAA3N.js +254 -0
  56. package/dist/basic-competition-master-VCSBJVRN.js +344 -0
  57. package/dist/branch-archive-manager-RP6FP3ZC.js +254 -0
  58. package/dist/branch-cleanup-manager-RSHAI7YR.js +20 -0
  59. package/dist/build-gate-YHGRB4QB.js +71 -0
  60. package/dist/change-summary-WY7J5TOX.js +33 -0
  61. package/dist/chunk-23A26CSN.js +123 -0
  62. package/dist/chunk-27UTJD3M.js +265 -0
  63. package/dist/chunk-2A5CILN3.js +310 -0
  64. package/dist/chunk-2AQUWJPW.js +225 -0
  65. package/dist/chunk-2BZ53J6J.js +2344 -0
  66. package/dist/chunk-2DY5KNVM.js +276 -0
  67. package/dist/chunk-2EIA4RBE.js +659 -0
  68. package/dist/chunk-2IUXIGQD.js +1064 -0
  69. package/dist/chunk-2N42MS2Z.js +2193 -0
  70. package/dist/chunk-2QJ3H3L7.js +42 -0
  71. package/dist/chunk-2QLYTVYX.js +791 -0
  72. package/dist/chunk-2VSQMRCB.js +18 -0
  73. package/dist/chunk-2XQXYBM2.js +130 -0
  74. package/dist/chunk-2YFUIER7.js +426 -0
  75. package/dist/chunk-34CNP2HB.js +148 -0
  76. package/dist/chunk-35P3W3JX.js +456 -0
  77. package/dist/chunk-36PEBZAF.js +18 -0
  78. package/dist/chunk-3AOKYKA7.js +22 -0
  79. package/dist/chunk-3BCUNHKF.js +475 -0
  80. package/dist/chunk-3FLXLLB7.js +26 -0
  81. package/dist/chunk-3FOZ2VHV.js +100 -0
  82. package/dist/chunk-3G6FZCRF.js +106 -0
  83. package/dist/chunk-3M57DADF.js +44 -0
  84. package/dist/chunk-3S62LLWJ.js +543 -0
  85. package/dist/chunk-3ZPQLGV7.js +2904 -0
  86. package/dist/chunk-44N5WZZH.js +45 -0
  87. package/dist/chunk-45FPSA3B.js +125 -0
  88. package/dist/chunk-4BJ3O4RQ.js +929 -0
  89. package/dist/chunk-4BOP7T6L.js +2321 -0
  90. package/dist/chunk-4BTDUT2S.js +42 -0
  91. package/dist/chunk-4CSS7WVI.js +143 -0
  92. package/dist/chunk-4CUY7AFY.js +247 -0
  93. package/dist/chunk-4GSN5O5J.js +62 -0
  94. package/dist/chunk-4HN6DF7V.js +1027 -0
  95. package/dist/chunk-4IAPOG5V.js +415 -0
  96. package/dist/chunk-4IYIZQWV.js +48 -0
  97. package/dist/chunk-4NXPXE62.js +84 -0
  98. package/dist/chunk-4RCCF5BR.js +712 -0
  99. package/dist/chunk-4V7NAQ4R.js +19527 -0
  100. package/dist/chunk-4VJITV4P.js +445 -0
  101. package/dist/chunk-4YX7J6QL.js +1859 -0
  102. package/dist/chunk-527OBWQB.js +338 -0
  103. package/dist/chunk-5D4A7E3D.js +448 -0
  104. package/dist/chunk-5DLKYTQX.js +4003 -0
  105. package/dist/chunk-5EERLVZB.js +139 -0
  106. package/dist/chunk-5H72XE4H.js +256 -0
  107. package/dist/chunk-5HDP7XZG.js +91 -0
  108. package/dist/chunk-5LAMRH4X.js +969 -0
  109. package/dist/chunk-5LTN43AS.js +1972 -0
  110. package/dist/chunk-5RBHQYDB.js +2206 -0
  111. package/dist/chunk-5WCQRDRB.js +588 -0
  112. package/dist/chunk-5WRLK5KW.js +700 -0
  113. package/dist/chunk-5ZCXC23G.js +595 -0
  114. package/dist/chunk-6BM72ZMG.js +31 -0
  115. package/dist/chunk-6EDAJH2I.js +68 -0
  116. package/dist/chunk-6EQKFDBH.js +457 -0
  117. package/dist/chunk-6MFRHTRI.js +115 -0
  118. package/dist/chunk-6TZJRKNW.js +321 -0
  119. package/dist/chunk-6V7HGQFZ.js +20 -0
  120. package/dist/chunk-6VWVO2TU.js +3746 -0
  121. package/dist/chunk-6Y5TWI7H.js +146 -0
  122. package/dist/chunk-6Y5U7UFY.js +91 -0
  123. package/dist/chunk-6ZLAK3XG.js +14 -0
  124. package/dist/chunk-72XCRQED.js +34 -0
  125. package/dist/chunk-72YTZMAM.js +589 -0
  126. package/dist/chunk-73BBJOKA.js +263 -0
  127. package/dist/chunk-73NCTWKL.js +188 -0
  128. package/dist/chunk-77I6G4CO.js +1 -0
  129. package/dist/chunk-7DHRDWFS.js +3104 -0
  130. package/dist/chunk-7DNSNKJV.js +78 -0
  131. package/dist/chunk-7FMJVYBS.js +307 -0
  132. package/dist/chunk-7GDRQBQC.js +419 -0
  133. package/dist/chunk-7GPCEFUV.js +270 -0
  134. package/dist/chunk-7IL4A2PP.js +948 -0
  135. package/dist/chunk-7MMLMXO6.js +3679 -0
  136. package/dist/chunk-7QCZSLBH.js +1 -0
  137. package/dist/chunk-7R2WLDOS.js +62 -0
  138. package/dist/chunk-7T7RUJI7.js +949 -0
  139. package/dist/chunk-A2WKSVX7.js +43 -0
  140. package/dist/chunk-A3YGID55.js +133 -0
  141. package/dist/chunk-A722DEVA.js +14 -0
  142. package/dist/chunk-ACDIT7OP.js +1376 -0
  143. package/dist/chunk-ACKIPAOJ.js +302 -0
  144. package/dist/chunk-APPNGGN7.js +365 -0
  145. package/dist/chunk-APV6MK5E.js +137 -0
  146. package/dist/chunk-ASEP3M2W.js +968 -0
  147. package/dist/chunk-AT4TNPWW.js +2931 -0
  148. package/dist/chunk-ATVKCSGT.js +250 -0
  149. package/dist/chunk-AURFMVCD.js +899 -0
  150. package/dist/chunk-AX6GWE7V.js +47 -0
  151. package/dist/chunk-AY5EWJPF.js +385 -0
  152. package/dist/chunk-BAV2HJXS.js +194 -0
  153. package/dist/chunk-BBHRN366.js +89 -0
  154. package/dist/chunk-BBPSTTPA.js +1004 -0
  155. package/dist/chunk-BDATUDDJ.js +992 -0
  156. package/dist/chunk-BKE5PG5L.js +20414 -0
  157. package/dist/chunk-BLPHWMDK.js +797 -0
  158. package/dist/chunk-BSE4R6XD.js +322 -0
  159. package/dist/chunk-BXGMAU4A.js +396 -0
  160. package/dist/chunk-BXI4NXL3.js +507 -0
  161. package/dist/chunk-BZU2O43F.js +1125 -0
  162. package/dist/chunk-C3L6YQ7P.js +147 -0
  163. package/dist/chunk-C57KJOUQ.js +121 -0
  164. package/dist/chunk-CCV7BPSY.js +118 -0
  165. package/dist/chunk-CD7ISXA4.js +826 -0
  166. package/dist/chunk-CE5OZBYY.js +21 -0
  167. package/dist/chunk-CFBIG37O.js +154 -0
  168. package/dist/chunk-CJC6GZ46.js +457 -0
  169. package/dist/chunk-CKCDGXIV.js +408 -0
  170. package/dist/chunk-CKNX3TTP.js +10338 -0
  171. package/dist/chunk-CLKSETWE.js +10 -0
  172. package/dist/chunk-CP7H3HSP.js +1552 -0
  173. package/dist/chunk-CPLEWXNZ.js +66 -0
  174. package/dist/chunk-CQM3A35X.js +844 -0
  175. package/dist/chunk-CS6P76D3.js +103 -0
  176. package/dist/chunk-CTLUBNCW.js +622 -0
  177. package/dist/chunk-CUSRN6RJ.js +632 -0
  178. package/dist/chunk-D5EP5D2W.js +26 -0
  179. package/dist/chunk-D5RYINO7.js +412 -0
  180. package/dist/chunk-DBFS4HMH.js +751 -0
  181. package/dist/chunk-DC4ZYMXJ.js +115 -0
  182. package/dist/chunk-DCBZP442.js +9243 -0
  183. package/dist/chunk-DCYF7EKG.js +26 -0
  184. package/dist/chunk-DDMAFNUK.js +5351 -0
  185. package/dist/chunk-DF5SLDE4.js +966 -0
  186. package/dist/chunk-DJFW7SMX.js +348 -0
  187. package/dist/chunk-DQFLLBJW.js +121 -0
  188. package/dist/chunk-DSFM56OA.js +1203 -0
  189. package/dist/chunk-DTY4APYV.js +218 -0
  190. package/dist/chunk-DXH5JBRS.js +437 -0
  191. package/dist/chunk-E3NTPHEO.js +194 -0
  192. package/dist/chunk-E74LUIID.js +302 -0
  193. package/dist/chunk-EI57M5BI.js +194 -0
  194. package/dist/chunk-EJ4ZAWLV.js +305 -0
  195. package/dist/chunk-EJGCZGUF.js +1483 -0
  196. package/dist/chunk-EK2U3YEG.js +486 -0
  197. package/dist/chunk-ELMFYNV7.js +109 -0
  198. package/dist/chunk-ENRGKNR5.js +25 -0
  199. package/dist/chunk-ETYDXCK7.js +679 -0
  200. package/dist/chunk-EYRH3W74.js +239 -0
  201. package/dist/chunk-F23DIWNN.js +1024 -0
  202. package/dist/chunk-F5JO7HAS.js +94 -0
  203. package/dist/chunk-F7ER6ANO.js +174 -0
  204. package/dist/chunk-FATUVIIN.js +374 -0
  205. package/dist/chunk-FC23CTXV.js +322 -0
  206. package/dist/chunk-FD4ERYEG.js +22 -0
  207. package/dist/chunk-FH7WOJAE.js +79 -0
  208. package/dist/chunk-FHOWVDF5.js +1342 -0
  209. package/dist/chunk-FKAUPHMR.js +96 -0
  210. package/dist/chunk-FONNFJXA.js +137 -0
  211. package/dist/chunk-FQ7FSZRW.js +75 -0
  212. package/dist/chunk-FRG57FPM.js +240 -0
  213. package/dist/chunk-FUVP64ER.js +31 -0
  214. package/dist/chunk-FYOILAN5.js +6818 -0
  215. package/dist/chunk-G35UYQ6Z.js +69 -0
  216. package/dist/chunk-G36W2T2S.js +1143 -0
  217. package/dist/chunk-G3L2L5XZ.js +49 -0
  218. package/dist/chunk-G4THLFV3.js +148 -0
  219. package/dist/chunk-GAFJEYLK.js +29 -0
  220. package/dist/chunk-GFGYB2ZU.js +1689 -0
  221. package/dist/chunk-GG6KJYW6.js +85 -0
  222. package/dist/chunk-GHHFDU2U.js +55 -0
  223. package/dist/chunk-GHTZSQB7.js +57 -0
  224. package/dist/chunk-GK37ILCX.js +1231 -0
  225. package/dist/chunk-GKN3HMN4.js +2809 -0
  226. package/dist/chunk-GNVDBVJP.js +156 -0
  227. package/dist/chunk-GPEL3FBM.js +924 -0
  228. package/dist/chunk-GPSNGPZS.js +1604 -0
  229. package/dist/chunk-GSGD5E4C.js +30 -0
  230. package/dist/chunk-GSUQJJXQ.js +331 -0
  231. package/dist/chunk-GSV226X6.js +110 -0
  232. package/dist/chunk-H2AYQIHW.js +224 -0
  233. package/dist/chunk-H66DXFS5.js +1374 -0
  234. package/dist/chunk-H6G7QRMQ.js +35 -0
  235. package/dist/chunk-H7JAGHZT.js +59 -0
  236. package/dist/chunk-H7ZEFECA.js +316 -0
  237. package/dist/chunk-HAC6EHZZ.js +79 -0
  238. package/dist/chunk-HIO33P3G.js +19 -0
  239. package/dist/chunk-HMVQIPH3.js +547 -0
  240. package/dist/chunk-HOYBYAOA.js +257 -0
  241. package/dist/chunk-HX5P3CSP.js +1784 -0
  242. package/dist/chunk-I46EG2XQ.js +65 -0
  243. package/dist/chunk-I4NPDSCB.js +279 -0
  244. package/dist/chunk-I5WRT7ZR.js +514 -0
  245. package/dist/chunk-IC7I6YIJ.js +301 -0
  246. package/dist/chunk-IDCSOZVN.js +78 -0
  247. package/dist/chunk-IFCBYECK.js +112 -0
  248. package/dist/chunk-IFZCPEY2.js +66 -0
  249. package/dist/chunk-IKFP2KUR.js +48 -0
  250. package/dist/chunk-IRFBN336.js +878 -0
  251. package/dist/chunk-IUXNGKA6.js +152 -0
  252. package/dist/chunk-IV2RVAN7.js +1356 -0
  253. package/dist/chunk-IZYIQQ7X.js +53 -0
  254. package/dist/chunk-J3UUR7DE.js +210 -0
  255. package/dist/chunk-J54VUAY2.js +566 -0
  256. package/dist/chunk-J62KPGII.js +464 -0
  257. package/dist/chunk-J6P3FWWW.js +130 -0
  258. package/dist/chunk-JKBHJQMT.js +434 -0
  259. package/dist/chunk-JLS65NUQ.js +14 -0
  260. package/dist/chunk-JOSYEJKY.js +141 -0
  261. package/dist/chunk-JPKSXKNB.js +94 -0
  262. package/dist/chunk-JQNJB2BB.js +2440 -0
  263. package/dist/chunk-JRVNSWSQ.js +2626 -0
  264. package/dist/chunk-JSWMRQYG.js +28 -0
  265. package/dist/chunk-JZKNBBIB.js +152 -0
  266. package/dist/chunk-K54Y7MLK.js +160 -0
  267. package/dist/chunk-K65546RE.js +183 -0
  268. package/dist/chunk-KM3F7SYE.js +702 -0
  269. package/dist/chunk-KNDYMVWN.js +102 -0
  270. package/dist/chunk-KNT72VR6.js +132 -0
  271. package/dist/chunk-KP6YILMU.js +482 -0
  272. package/dist/chunk-KQEBSK3T.js +274 -0
  273. package/dist/chunk-KT6VHSPF.js +84 -0
  274. package/dist/chunk-KTMW65UX.js +14 -0
  275. package/dist/chunk-KZ5CJVBP.js +1813 -0
  276. package/dist/chunk-L4427KOE.js +26 -0
  277. package/dist/chunk-L6OM4A22.js +189 -0
  278. package/dist/chunk-L7E6XCRA.js +1042 -0
  279. package/dist/chunk-L7JZLXQL.js +173 -0
  280. package/dist/chunk-LAMKBTXX.js +40 -0
  281. package/dist/chunk-LDCF2MKN.js +132 -0
  282. package/dist/chunk-LEIIWPWQ.js +78 -0
  283. package/dist/chunk-LFTQVYBB.js +31 -0
  284. package/dist/chunk-LG3PDRTR.js +2872 -0
  285. package/dist/chunk-LGHII5ET.js +23 -0
  286. package/dist/chunk-LH5QY22X.js +1205 -0
  287. package/dist/chunk-LIVJ6266.js +438 -0
  288. package/dist/chunk-LKRAR3IH.js +276 -0
  289. package/dist/chunk-LO23NABI.js +3063 -0
  290. package/dist/chunk-LO3X5NLS.js +326 -0
  291. package/dist/chunk-LPITVM7M.js +339 -0
  292. package/dist/chunk-LR5IJIGV.js +810 -0
  293. package/dist/chunk-LRGMHROI.js +79 -0
  294. package/dist/chunk-LUVKFFWR.js +315 -0
  295. package/dist/chunk-LWCBNGH6.js +35 -0
  296. package/dist/chunk-LWTN3WRV.js +260 -0
  297. package/dist/chunk-M3HQYKQX.js +308 -0
  298. package/dist/chunk-M6GVSPEH.js +1016 -0
  299. package/dist/chunk-MF5HP6XV.js +221 -0
  300. package/dist/chunk-MHLCBZJB.js +328 -0
  301. package/dist/chunk-MN6PL4AN.js +120 -0
  302. package/dist/chunk-MOEY65Z6.js +5678 -0
  303. package/dist/chunk-MQ4WA34C.js +206 -0
  304. package/dist/chunk-MWHF5V7U.js +223 -0
  305. package/dist/chunk-MWHLBPNU.js +211 -0
  306. package/dist/chunk-MWK5UZQ3.js +1068 -0
  307. package/dist/chunk-MYLH2S4G.js +64 -0
  308. package/dist/chunk-MZ5WYKNA.js +28 -0
  309. package/dist/chunk-N4VTRA7K.js +131 -0
  310. package/dist/chunk-N5DX4JAK.js +12 -0
  311. package/dist/chunk-N65O4XTH.js +5011 -0
  312. package/dist/chunk-NEQUQHOX.js +223 -0
  313. package/dist/chunk-NGK6PEOG.js +25 -0
  314. package/dist/chunk-NJVD4PWE.js +1033 -0
  315. package/dist/chunk-NM6PMYY4.js +768 -0
  316. package/dist/chunk-NN4PJDHP.js +708 -0
  317. package/dist/chunk-NP2V3L7K.js +226 -0
  318. package/dist/chunk-NRLY536M.js +260 -0
  319. package/dist/chunk-NRNE225N.js +1270 -0
  320. package/dist/chunk-NS2K2GTP.js +605 -0
  321. package/dist/chunk-NS33V3IM.js +51 -0
  322. package/dist/chunk-NSHASMZZ.js +71 -0
  323. package/dist/chunk-NWOYOA6H.js +378 -0
  324. package/dist/chunk-NWRUSEXG.js +322 -0
  325. package/dist/chunk-NZGDAWIP.js +1905 -0
  326. package/dist/chunk-O47UOKU3.js +395 -0
  327. package/dist/chunk-O4G2W3ST.js +9831 -0
  328. package/dist/chunk-O6V4PNLO.js +63 -0
  329. package/dist/chunk-OA4GPILI.js +624 -0
  330. package/dist/chunk-OGMSYL6J.js +227 -0
  331. package/dist/chunk-OIS7J26S.js +319 -0
  332. package/dist/chunk-OMX5VL43.js +79 -0
  333. package/dist/chunk-ON3G73BU.js +264 -0
  334. package/dist/chunk-OPYFYTWQ.js +220 -0
  335. package/dist/chunk-OQ6K46CK.js +1734 -0
  336. package/dist/chunk-OYZYO7TV.js +47 -0
  337. package/dist/chunk-OZ4REHIN.js +4386 -0
  338. package/dist/chunk-P47VN5F4.js +282 -0
  339. package/dist/chunk-P5I4X7A7.js +353 -0
  340. package/dist/chunk-P6VQROCO.js +594 -0
  341. package/dist/chunk-P7CQGPLS.js +30 -0
  342. package/dist/chunk-PCAGC5MR.js +1763 -0
  343. package/dist/chunk-PFTQBXS6.js +5181 -0
  344. package/dist/chunk-PGSPX4SU.js +15 -0
  345. package/dist/chunk-PIKLF7BM.js +432 -0
  346. package/dist/chunk-PJWJ3SAV.js +22 -0
  347. package/dist/chunk-PKIFMV72.js +100 -0
  348. package/dist/chunk-PL37JDNA.js +189 -0
  349. package/dist/chunk-PTH5E5XO.js +195 -0
  350. package/dist/chunk-PW6AXLQC.js +4128 -0
  351. package/dist/chunk-PYITM4N2.js +79 -0
  352. package/dist/chunk-PZ5AY32C.js +10 -0
  353. package/dist/chunk-Q3RO7N35.js +45 -0
  354. package/dist/chunk-Q3WIC6GQ.js +2670 -0
  355. package/dist/chunk-Q5XIXSHX.js +271 -0
  356. package/dist/chunk-QGJDMEOV.js +34 -0
  357. package/dist/chunk-QNOB37UH.js +58 -0
  358. package/dist/chunk-QOCOVLUH.js +462 -0
  359. package/dist/chunk-QTCJ5CC5.js +172 -0
  360. package/dist/chunk-QVFV5IP2.js +232 -0
  361. package/dist/chunk-QVZMFDYG.js +29 -0
  362. package/dist/chunk-R35PEUKH.js +511 -0
  363. package/dist/chunk-R4UWBC35.js +200 -0
  364. package/dist/chunk-R6MLCREW.js +44 -0
  365. package/dist/chunk-R6W23LKN.js +254 -0
  366. package/dist/chunk-R7XDDX2A.js +4007 -0
  367. package/dist/chunk-RDFRCT64.js +168 -0
  368. package/dist/chunk-RE5VZDFQ.js +58 -0
  369. package/dist/chunk-RGROYC2G.js +638 -0
  370. package/dist/chunk-RGWHUI5E.js +68 -0
  371. package/dist/chunk-RHVG6UNL.js +205 -0
  372. package/dist/chunk-RI4EX2QE.js +18 -0
  373. package/dist/chunk-RJAAKDRX.js +17 -0
  374. package/dist/chunk-ROMHOSMQ.js +185 -0
  375. package/dist/chunk-RWREC3KJ.js +517 -0
  376. package/dist/chunk-RYNETRDJ.js +118 -0
  377. package/dist/chunk-RZY7RKM5.js +500 -0
  378. package/dist/chunk-S2MNWFAG.js +52 -0
  379. package/dist/chunk-S2VQCZO4.js +22 -0
  380. package/dist/chunk-S54MKU6V.js +117 -0
  381. package/dist/chunk-S5OIDFRM.js +302 -0
  382. package/dist/chunk-SCW4ZF6R.js +150 -0
  383. package/dist/chunk-SLS2N4PH.js +2213 -0
  384. package/dist/chunk-SNLBO4BF.js +247 -0
  385. package/dist/chunk-SP3LFU6B.js +60 -0
  386. package/dist/chunk-SQQTDDQA.js +537 -0
  387. package/dist/chunk-STV6LYYE.js +45 -0
  388. package/dist/chunk-SURZ2WFE.js +326 -0
  389. package/dist/chunk-SZ7DL357.js +1047 -0
  390. package/dist/chunk-T5E4NQCM.js +5742 -0
  391. package/dist/chunk-TAJPCXSB.js +13 -0
  392. package/dist/chunk-TAOOYK3P.js +358 -0
  393. package/dist/chunk-TDSEX5CF.js +24 -0
  394. package/dist/chunk-TFTGP7Z7.js +174 -0
  395. package/dist/chunk-TGON4N4O.js +197 -0
  396. package/dist/chunk-TGQZHDY2.js +2373 -0
  397. package/dist/chunk-TJJZ2OKV.js +6783 -0
  398. package/dist/chunk-TRSVUPCX.js +25 -0
  399. package/dist/chunk-TSXGRLPR.js +107 -0
  400. package/dist/chunk-U2S3YEX3.js +224 -0
  401. package/dist/chunk-U45RTRGY.js +818 -0
  402. package/dist/chunk-U6C3VVWS.js +13 -0
  403. package/dist/chunk-UDMS5AD3.js +307 -0
  404. package/dist/chunk-UGX7GI37.js +94 -0
  405. package/dist/chunk-UH3JJSHK.js +1 -0
  406. package/dist/chunk-UHRBTZYY.js +208 -0
  407. package/dist/chunk-UHT2KRG5.js +193 -0
  408. package/dist/chunk-UI2F6DJ5.js +118 -0
  409. package/dist/chunk-UMAKSB4Z.js +284 -0
  410. package/dist/chunk-UR2IBGIM.js +521 -0
  411. package/dist/chunk-UUH2RVKS.js +585 -0
  412. package/dist/chunk-UVJ4PJDK.js +4533 -0
  413. package/dist/chunk-V53UG2OT.js +9924 -0
  414. package/dist/chunk-V72RMBM4.js +48 -0
  415. package/dist/chunk-VBNCKCCI.js +16 -0
  416. package/dist/chunk-VNSYKC25.js +24 -0
  417. package/dist/chunk-VPHVFK4A.js +1984 -0
  418. package/dist/chunk-VTLNJQ44.js +133 -0
  419. package/dist/chunk-VTW7HP3R.js +100 -0
  420. package/dist/chunk-VVGEPBPS.js +218 -0
  421. package/dist/chunk-VVLLL7I4.js +166 -0
  422. package/dist/chunk-VX3UMWB7.js +483 -0
  423. package/dist/chunk-VXF4Q3FW.js +20 -0
  424. package/dist/chunk-W3JMT2YY.js +712 -0
  425. package/dist/chunk-WDUORIHF.js +877 -0
  426. package/dist/chunk-WDVTY4U6.js +148 -0
  427. package/dist/chunk-WIFZCHEG.js +12566 -0
  428. package/dist/chunk-WIRN3F75.js +736 -0
  429. package/dist/chunk-WMPU2UOV.js +82 -0
  430. package/dist/chunk-WTOKKE2V.js +784 -0
  431. package/dist/chunk-WX5IRLF6.js +740 -0
  432. package/dist/chunk-WZ6U3O7I.js +1581 -0
  433. package/dist/chunk-XAONGNST.js +57 -0
  434. package/dist/chunk-XB5YLCLB.js +13 -0
  435. package/dist/chunk-XEP5NQ5Y.js +688 -0
  436. package/dist/chunk-XGYF2QMZ.js +351 -0
  437. package/dist/chunk-XHEKQENB.js +255 -0
  438. package/dist/chunk-XNO4FM6X.js +1124 -0
  439. package/dist/chunk-XPHKYHO4.js +878 -0
  440. package/dist/chunk-XPK2I4NC.js +405 -0
  441. package/dist/chunk-XPU2XADL.js +2175 -0
  442. package/dist/chunk-XQD2B6BB.js +507 -0
  443. package/dist/chunk-XT2ZQVTC.js +558 -0
  444. package/dist/chunk-XTXJGGUV.js +351 -0
  445. package/dist/chunk-XUXVDPSZ.js +50 -0
  446. package/dist/chunk-XV7NZL4B.js +57 -0
  447. package/dist/chunk-XZE4XARH.js +563 -0
  448. package/dist/chunk-XZYR5EDO.js +152 -0
  449. package/dist/chunk-Y3J4JMTU.js +61 -0
  450. package/dist/chunk-Y55LZN5U.js +52 -0
  451. package/dist/chunk-Y5VN7DMP.js +112 -0
  452. package/dist/chunk-Y67VAHN4.js +459 -0
  453. package/dist/chunk-YAXSKEUH.js +3544 -0
  454. package/dist/chunk-YB3JD4E6.js +975 -0
  455. package/dist/chunk-YESZJFK6.js +220 -0
  456. package/dist/chunk-YGXKOBQQ.js +292 -0
  457. package/dist/chunk-YMX76IOS.js +31 -0
  458. package/dist/chunk-YOTXESEH.js +257 -0
  459. package/dist/chunk-YTYIEZQY.js +119 -0
  460. package/dist/chunk-YVORHQ2S.js +579 -0
  461. package/dist/chunk-Z2CUQDAR.js +3429 -0
  462. package/dist/chunk-Z2KYOFHS.js +7000 -0
  463. package/dist/chunk-Z6PC7QX6.js +161 -0
  464. package/dist/chunk-ZDTGECTN.js +235 -0
  465. package/dist/chunk-ZIPWI2LY.js +151 -0
  466. package/dist/chunk-ZSKKMTQJ.js +554 -0
  467. package/dist/chunk-ZTT5IVPY.js +1160 -0
  468. package/dist/chunk-ZX65UI5W.js +78 -0
  469. package/dist/chunk-ZYG7GGKO.js +218 -0
  470. package/dist/chunk-ZZZUL4OF.js +38 -0
  471. package/dist/cli-utils-IXL26KJT.js +40 -0
  472. package/dist/cli-validation-WLXWLUJL.js +111 -0
  473. package/dist/commit-utils-P7CRJF5N.js +202 -0
  474. package/dist/compete-config-resolver-R5ULXMYH.js +76 -0
  475. package/dist/compete-request-62JESVET.js +364 -0
  476. package/dist/compete-results-QEPG6FZX.js +208 -0
  477. package/dist/competition-outcome-tracker-R32OOZ43.js +38 -0
  478. package/dist/config-JCOKXOQT.js +166 -0
  479. package/dist/config-audit-EL3GHXS7.js +360 -0
  480. package/dist/config-explain-TNILDEVJ.js +12 -0
  481. package/dist/config-loader-VPFPFO4B.js +38 -0
  482. package/dist/config-manager-7T4E2BQO.js +67 -0
  483. package/dist/config-validator-KKOHOW7O.js +72 -0
  484. package/dist/cost-YC42XUF3.js +53 -0
  485. package/dist/coverage-orchestrator-CISNKJC2.js +772 -0
  486. package/dist/coverage-scanner-YVD62MLH.js +12 -0
  487. package/dist/createCompetitionRunner-LJG6ZQSO.js +46 -0
  488. package/dist/data-migration-state-VJK64DLT.js +31 -0
  489. package/dist/db-migrator-XSEIOGWY.js +34 -0
  490. package/dist/discovery-JGYGDD25.js +25 -0
  491. package/dist/doctor-GJOYE7AE.js +186 -0
  492. package/dist/domain-analyzer-AWF3RP6E.js +29 -0
  493. package/dist/ensure-initialized-744DIZEZ.js +52 -0
  494. package/dist/entry.js +940 -0
  495. package/dist/environment-YS45U5ZI.js +81 -0
  496. package/dist/error-parser-core-PPZ36A4S.js +50 -0
  497. package/dist/escalation-ladder-MKTCEGSA.js +130 -0
  498. package/dist/evaluation-context-KV4GZNN7.js +35 -0
  499. package/dist/evidence-plan-resolver-GBSYSAPX.js +85 -0
  500. package/dist/execution-data-writer-3ODTBDLH.js +53 -0
  501. package/dist/execution-policy-applier-ZHD3DCF3.js +31 -0
  502. package/dist/execution-preflight-Z4Y64V3I.js +209 -0
  503. package/dist/execution-roles-R3DPPMD3.js +66 -0
  504. package/dist/exit-code-error-Z4SW2DVK.js +14 -0
  505. package/dist/external-temp-cleanup-N2RZH4QP.js +311 -0
  506. package/dist/factory-XBN7DFIM.js +149 -0
  507. package/dist/file-utils-XIVR2ZMA.js +47 -0
  508. package/dist/flywheel-autoloop-executor-UILGOFFK.js +249 -0
  509. package/dist/flywheel-competition-executor-JOBEXTRB.js +259 -0
  510. package/dist/flywheel-executor-6JFLA6J5.js +369 -0
  511. package/dist/flywheel-git-isolation-UC5NIEVU.js +48 -0
  512. package/dist/flywheel-manifest-5UC4VBMA.js +108 -0
  513. package/dist/flywheel-model-defaults-7CVKP53V.js +27 -0
  514. package/dist/flywheel-preflight-XEY5SHM6.js +104 -0
  515. package/dist/flywheel-resume-7HELH7QS.js +23 -0
  516. package/dist/flywheel-safety-7U7DPOAP.js +28 -0
  517. package/dist/flywheel-scope-decision-ZHKF6ZIN.js +11 -0
  518. package/dist/get-telemetry-logger-DPVWWIYY.js +73 -0
  519. package/dist/git-worktree-IY6V6DUO.js +18 -0
  520. package/dist/github-pr-manager-4LXEKJTA.js +211 -0
  521. package/dist/guidance-profile-config-E7XJL2VP.js +117 -0
  522. package/dist/guidance-profile-renderer-QK2YMAAP.js +21 -0
  523. package/dist/index-query-4JEUKA44.js +31 -0
  524. package/dist/index.js +108661 -0
  525. package/dist/instructions-6BURLQJC.js +64 -0
  526. package/dist/invoke-provider-auth-GRUYP44M.js +223 -0
  527. package/dist/judge-scoring.json +80 -0
  528. package/dist/judge-test.js +555 -0
  529. package/dist/lab-mode-OTWVHN63.js +39 -0
  530. package/dist/lab-utils-BJRFLGK4.js +23 -0
  531. package/dist/linux-host-class-UY4KVLFD.js +29 -0
  532. package/dist/llm-judge-executor-F7Z3HO77.js +133 -0
  533. package/dist/local-executor-CEHWE2PL.js +223 -0
  534. package/dist/logger-33TR6EE5.js +72 -0
  535. package/dist/loop-spec-XTLQAVZ7.js +191 -0
  536. package/dist/manager-2HJG5CLT.js +25 -0
  537. package/dist/matrix-prompt-builder-6UDN5X3F.js +497 -0
  538. package/dist/matrix-result-parser-7W35EUOV.js +15 -0
  539. package/dist/metadata-HQ43NDEK.js +22 -0
  540. package/dist/model-invocations-db-QBO4Y7WZ.js +38 -0
  541. package/dist/monitor-XGYBG2DW.js +72 -0
  542. package/dist/next-PB5ZXZKB.js +90 -0
  543. package/dist/next-ZBDK725T.js +69 -0
  544. package/dist/optimization-config-resolver-O6WKR47U.js +75 -0
  545. package/dist/package-3YCWIQQ5.js +10 -0
  546. package/dist/parallel-orchestrator-NL7YJJU2.js +297 -0
  547. package/dist/parallel-worker.js +279 -0
  548. package/dist/parse-git-status-PIAF3OTP.js +10 -0
  549. package/dist/path-security-ETTH6TZL.js +39 -0
  550. package/dist/pattern-bank-UNJR5ADV.js +15 -0
  551. package/dist/plan-backlog-list-fast-VAGYBV3J.js +270 -0
  552. package/dist/plan-backlog-show-fast-SG2CZPW3.js +406 -0
  553. package/dist/plan-sprint-list-fast-LURAX47V.js +162 -0
  554. package/dist/plan-sprint-status-fast-FJAODCHD.js +208 -0
  555. package/dist/plan-task-status-fast-HNYBMQI4.js +349 -0
  556. package/dist/plan-to-flywheel-Z4U3GWPN.js +456 -0
  557. package/dist/planning-backlog-3CQ5QQBQ.js +319 -0
  558. package/dist/poetic-root-V5DNXEAE.js +17 -0
  559. package/dist/preflight-OPANWMME.js +12 -0
  560. package/dist/process-registry-PDZJPTAS.js +27 -0
  561. package/dist/process-scanner-C22SYXYD.js +22 -0
  562. package/dist/processes-KMQUD7HY.js +29 -0
  563. package/dist/processes-json-fast-IBDXZ6WW.js +135 -0
  564. package/dist/profile-SE5EVXAP.js +149 -0
  565. package/dist/prompts-WZZPGWBX.js +168 -0
  566. package/dist/protected-branches-RNTEX7ET.js +57 -0
  567. package/dist/provider-aware-resource-manager-QBTZJMNP.js +18 -0
  568. package/dist/provider-matrix-N5X57V3Y.js +154 -0
  569. package/dist/provider-matrix-renderer-MZDWKKID.js +139 -0
  570. package/dist/provider-output-forwarding-DERID3TP.js +30 -0
  571. package/dist/provider-registry-J5NRBJKI.js +128 -0
  572. package/dist/provider-temp-cleanup-KYGLF6YU.js +14 -0
  573. package/dist/prune-engine-Q6E2DXBN.js +451 -0
  574. package/dist/quality-gate-YRHMQAEI.js +70 -0
  575. package/dist/quickstart-FIRLKGJI.js +62 -0
  576. package/dist/readiness-VZTMSG6J.js +96 -0
  577. package/dist/registry-YODFY77A.js +153 -0
  578. package/dist/repair-helpers-TTV5FEF4.js +117 -0
  579. package/dist/repo-root-2IGD4H7X.js +22 -0
  580. package/dist/resolution-engine-D6TX6FRG.js +127 -0
  581. package/dist/resolve-provider-cli-O2P6XZBZ.js +35 -0
  582. package/dist/restore-telemetry-db-BQL6DTQF.js +360 -0
  583. package/dist/result-streamer-WEHW476R.js +19 -0
  584. package/dist/routing-events-DHPUZDDF.js +27 -0
  585. package/dist/routing-history-store-UWCEXAP3.js +46 -0
  586. package/dist/routing-planner-F5WQEUOM.js +160 -0
  587. package/dist/run-poetic-tui-J6LWRJUP.js +13517 -0
  588. package/dist/run-simulation.js +376 -0
  589. package/dist/runner-CS2TNGHA.js +1092 -0
  590. package/dist/runner-HHH7ZN2Z.js +1571 -0
  591. package/dist/safety-OCC4KJJR.js +64 -0
  592. package/dist/safety-stanza-7SV3HGG3.js +60 -0
  593. package/dist/sandbox-32QXJEMV.js +81 -0
  594. package/dist/sandbox-RSO7VP6V.js +94 -0
  595. package/dist/schema-extensions.sql +234 -0
  596. package/dist/security-2KI5XNDG.js +17 -0
  597. package/dist/setup-bb-plugin-QAQWZCV5.js +738 -0
  598. package/dist/setup-claude-code-P7BTTSPO.js +317 -0
  599. package/dist/setup-temp-cleanup-GASCWZ2I.js +20 -0
  600. package/dist/shared-utils-D6U6UREP.js +37 -0
  601. package/dist/simple-artifact-goal-OTXNGZY6.js +25 -0
  602. package/dist/sprint-UIXPYOXQ.js +338 -0
  603. package/dist/sprint-bridge-4BHMSC3M.js +68 -0
  604. package/dist/sprint-execution-service-2B7WHL5L.js +311 -0
  605. package/dist/sprint-manager-IDQUDNQI.js +91 -0
  606. package/dist/sqlite-wrapper-UDWCTNLJ.js +17 -0
  607. package/dist/stale-cleanup-orchestrator-XWXV7KCZ.js +62 -0
  608. package/dist/storage-access-F6ALDN4S.js +22 -0
  609. package/dist/synthesis-XD6EDVHF.js +185 -0
  610. package/dist/task-classifier-LNLXSHOM.js +494 -0
  611. package/dist/task-list-fast-PTMA4LUC.js +147 -0
  612. package/dist/task-manager-XAT7GOWB.js +93 -0
  613. package/dist/task-splitter-U7DJ7W6A.js +79 -0
  614. package/dist/task-type-detector-OLVOMXZO.js +21 -0
  615. package/dist/task-type-resolver-KKNQYSB4.js +42 -0
  616. package/dist/telemetry-5HWBBXLX.js +131 -0
  617. package/dist/telemetry-health-tracker-DMSSGBZ2.js +11 -0
  618. package/dist/telemetry-path-resolver-7ICSG276.js +28 -0
  619. package/dist/telemetry-reliability-XUOZNZZ6.js +125 -0
  620. package/dist/token-estimator-MEQUL3EJ.js +37 -0
  621. package/dist/transports-KNSSV2V4.js +255 -0
  622. package/dist/unified-cost-tracker-4TFRBVPR.js +35 -0
  623. package/dist/unified-state-cleanup-LJPF2BOW.js +276 -0
  624. package/dist/universal-cost-calculator-BAJV35GA.js +42 -0
  625. package/dist/user-agents-GHUGCSKN.js +22 -0
  626. package/dist/variant-delivery-state-KLRNG6XA.js +33 -0
  627. package/dist/variant-state-cleanup-MZGGLQAJ.js +280 -0
  628. package/dist/variant-success-PJXWE3ZV.js +12 -0
  629. package/dist/variant-worker-KUWKBLAH.js +4196 -0
  630. package/dist/variant-worker.js +24 -0
  631. package/dist/variants-JE2FSAQS.js +233 -0
  632. package/dist/verification-toolchains-V24UHW6Q.js +28 -0
  633. package/dist/verify-commands-H3DTCSGI.js +37 -0
  634. package/dist/warning-EGQGUUIO.js +12 -0
  635. package/dist/work-edge-RWEDWJZF.js +49 -0
  636. package/dist/work-item-writer-WHAVZXAY.js +19 -0
  637. package/dist/worker-7SA2VS2Y.js +1435 -0
  638. package/dist/worker.js +19 -0
  639. package/dist/worktree-metrics-3DFUYVYE.js +26 -0
  640. package/dist/writeback-VZKHYHSN.js +44 -0
  641. package/docs/CLI_REFERENCE.md +7042 -0
  642. package/docs/PROVIDER_SETUP.md +1570 -0
  643. package/docs/README.md +96 -0
  644. package/docs/TROUBLESHOOTING.md +2232 -0
  645. package/docs/getting-started/QUICK_START.md +294 -0
  646. package/docs/getting-started/README.md +188 -0
  647. package/docs/getting-started/SETUP.md +52 -0
  648. package/docs/reference/AGENT_CONTEXT.md +38 -0
  649. package/docs/reference/PROVIDER_RELEASE_TIERS.md +34 -0
  650. package/docs/reference/README.md +381 -0
  651. package/docs/reference/SECURITY.md +262 -0
  652. package/integrations/bb-plugin-poetic/README.md +362 -0
  653. package/integrations/bb-plugin-poetic/app.css +341 -0
  654. package/integrations/bb-plugin-poetic/app.tsx +5059 -0
  655. package/integrations/bb-plugin-poetic/package.json +45 -0
  656. package/integrations/bb-plugin-poetic/server.ts +444 -0
  657. package/integrations/bb-plugin-poetic/src/adapter.ts +3312 -0
  658. package/integrations/bb-plugin-poetic/src/backlog-authoring-model.ts +150 -0
  659. package/integrations/bb-plugin-poetic/src/backlog-authoring-schema.ts +355 -0
  660. package/integrations/bb-plugin-poetic/src/backlog-authoring-service.ts +419 -0
  661. package/integrations/bb-plugin-poetic/src/backlog-authoring-view.ts +1026 -0
  662. package/integrations/bb-plugin-poetic/src/competition-defaults-schema.ts +122 -0
  663. package/integrations/bb-plugin-poetic/src/competition-defaults-service.ts +105 -0
  664. package/integrations/bb-plugin-poetic/src/competition-defaults-view.ts +138 -0
  665. package/integrations/bb-plugin-poetic/src/contract.ts +615 -0
  666. package/integrations/bb-plugin-poetic/src/finalize-model.ts +205 -0
  667. package/integrations/bb-plugin-poetic/src/finalize-schema.ts +158 -0
  668. package/integrations/bb-plugin-poetic/src/finalize-service.ts +382 -0
  669. package/integrations/bb-plugin-poetic/src/finalize-view.ts +159 -0
  670. package/integrations/bb-plugin-poetic/src/judge-operations-readback.ts +303 -0
  671. package/integrations/bb-plugin-poetic/src/judge-operations-schema.ts +33 -0
  672. package/integrations/bb-plugin-poetic/src/judge-operations-view.ts +459 -0
  673. package/integrations/bb-plugin-poetic/src/model.ts +1302 -0
  674. package/integrations/bb-plugin-poetic/src/monitor-service.ts +233 -0
  675. package/integrations/bb-plugin-poetic/src/panel-read-ux.ts +97 -0
  676. package/integrations/bb-plugin-poetic/src/patch-preview-schema.ts +166 -0
  677. package/integrations/bb-plugin-poetic/src/patch-preview-service.ts +480 -0
  678. package/integrations/bb-plugin-poetic/src/patch-preview-view.ts +109 -0
  679. package/integrations/bb-plugin-poetic/src/planning-readback.ts +204 -0
  680. package/integrations/bb-plugin-poetic/src/planning-service.ts +594 -0
  681. package/integrations/bb-plugin-poetic/src/planning-workspace-schema.ts +95 -0
  682. package/integrations/bb-plugin-poetic/src/planning-workspace.ts +323 -0
  683. package/integrations/bb-plugin-poetic/src/poll-handoff.ts +136 -0
  684. package/integrations/bb-plugin-poetic/src/project-target-server.ts +21 -0
  685. package/integrations/bb-plugin-poetic/src/project-target.ts +45 -0
  686. package/integrations/bb-plugin-poetic/src/reference-index.ts +192 -0
  687. package/integrations/bb-plugin-poetic/src/repository-schema.ts +30 -0
  688. package/integrations/bb-plugin-poetic/src/result-explorer-view.ts +597 -0
  689. package/integrations/bb-plugin-poetic/src/result-readback-model.ts +163 -0
  690. package/integrations/bb-plugin-poetic/src/result-readback-schema.ts +319 -0
  691. package/integrations/bb-plugin-poetic/src/result-readback-service.ts +333 -0
  692. package/integrations/bb-plugin-poetic/src/run-page-view.ts +177 -0
  693. package/integrations/bb-plugin-poetic/src/setup-config-schema.ts +291 -0
  694. package/integrations/bb-plugin-poetic/src/setup-config-service.ts +590 -0
  695. package/integrations/bb-plugin-poetic/src/setup-config-view.ts +413 -0
  696. package/integrations/bb-plugin-poetic/src/sprint-close-model.ts +150 -0
  697. package/integrations/bb-plugin-poetic/src/sprint-close-schema.ts +136 -0
  698. package/integrations/bb-plugin-poetic/src/sprint-close-service.ts +341 -0
  699. package/integrations/bb-plugin-poetic/src/sprint-close-view.ts +116 -0
  700. package/integrations/bb-plugin-poetic/src/sprint-composition-model.ts +714 -0
  701. package/integrations/bb-plugin-poetic/src/sprint-composition-readback.ts +231 -0
  702. package/integrations/bb-plugin-poetic/src/sprint-composition-schema.ts +601 -0
  703. package/integrations/bb-plugin-poetic/src/sprint-composition-service.ts +775 -0
  704. package/integrations/bb-plugin-poetic/src/sprint-composition-view.ts +1221 -0
  705. package/integrations/bb-plugin-poetic/src/task-authoring-model.ts +567 -0
  706. package/integrations/bb-plugin-poetic/src/task-authoring-schema.ts +635 -0
  707. package/integrations/bb-plugin-poetic/src/task-authoring-service.ts +842 -0
  708. package/integrations/bb-plugin-poetic/src/task-authoring-view.ts +1227 -0
  709. package/integrations/bb-plugin-poetic/src/task-detail-readback.ts +56 -0
  710. package/integrations/bb-plugin-poetic/src/task-detail-schema.ts +144 -0
  711. package/integrations/bb-plugin-poetic/src/task-navigation.ts +446 -0
  712. package/integrations/bb-plugin-poetic/src/workbench-route.ts +74 -0
  713. package/integrations/bb-plugin-poetic/tests/host-contract.test.ts +773 -0
  714. package/integrations/bb-plugin-poetic/tsconfig.json +18 -0
  715. package/integrations/bb-plugin-poetic/types/PROVENANCE.json +52 -0
  716. package/integrations/bb-plugin-poetic/types/bb-plugin-sdk-app.d.ts +1444 -0
  717. package/integrations/bb-plugin-poetic/types/bb-plugin-sdk.d.ts +13030 -0
  718. package/integrations/bb-plugin-poetic/vitest.host.config.ts +71 -0
  719. package/npm-shrinkwrap.json +4950 -0
  720. package/package.json +331 -0
  721. package/schemas/README.md +80 -0
  722. package/schemas/config-v1.schema.json +136 -0
  723. package/schemas/execution-config.schema.json +47 -0
  724. package/schemas/judge-scoring.schema.json +370 -0
  725. package/schemas/poetic.config.schema.json +2214 -0
  726. package/schemas/provider-config.schema.json +203 -0
  727. package/schemas/telemetry-config.schema.json +79 -0
  728. package/schemas/user-preferences.schema.json +141 -0
  729. package/scripts/assert-node-runtime.mjs +140 -0
  730. package/scripts/preflight-native.mjs +49 -0
  731. package/scripts/preinstall-node-check.mjs +78 -0
  732. package/scripts/setup-git-hooks.mjs +24 -0
  733. package/scripts/sync.sh +2722 -0
  734. package/scripts/write-node-launcher.sh +108 -0
  735. package/src/resources/gemini/slash-packs/default/plan.toml +15 -0
  736. package/src/resources/gemini/slash-packs/default/summary.toml +16 -0
  737. package/src/resources/gemini/slash-packs/default/tests.toml +16 -0
  738. package/templates/.poetic/README.md +37 -0
  739. package/templates/.poetic/agents/README.md +296 -0
  740. package/templates/.poetic/agents/api-documenter.md +147 -0
  741. package/templates/.poetic/agents/backend-architect.md +31 -0
  742. package/templates/.poetic/agents/code-reviewer.md +157 -0
  743. package/templates/.poetic/agents/data-scientist.md +179 -0
  744. package/templates/.poetic/agents/database-optimizer.md +145 -0
  745. package/templates/.poetic/agents/debugger.md +31 -0
  746. package/templates/.poetic/agents/deployment-engineer.md +164 -0
  747. package/templates/.poetic/agents/devops-troubleshooter.md +139 -0
  748. package/templates/.poetic/agents/frontend-developer.md +150 -0
  749. package/templates/.poetic/agents/javascript-pro.md +36 -0
  750. package/templates/.poetic/agents/performance-engineer.md +151 -0
  751. package/templates/.poetic/agents/python-pro.md +137 -0
  752. package/templates/.poetic/agents/test-automator.md +147 -0
  753. package/templates/.poetic/agents/typescript-pro.md +34 -0
  754. package/templates/.poetic/config/poetic.config.jsonc +69 -0
  755. package/templates/.poetic/config/project-context.template.json +6 -0
  756. package/templates/.poetic/config/task-type-aliases.presets/kanban.yaml +14 -0
  757. package/templates/.poetic/config/task-type-aliases.presets/scrum.yaml +17 -0
  758. package/templates/.poetic/config/task-type-aliases.presets/xp.yaml +12 -0
  759. package/templates/.poetic/config/task-type-aliases.yaml +28 -0
  760. package/templates/.poetic/gitignore.template +55 -0
  761. package/templates/.poetic/task-types/analysis.yaml +40 -0
  762. package/templates/.poetic/task-types/architecture.yaml +38 -0
  763. package/templates/.poetic/task-types/doc.yaml +35 -0
  764. package/templates/.poetic/task-types/feature.yaml +23 -0
  765. package/templates/.poetic/task-types/general.yaml +6 -0
  766. package/templates/.poetic/task-types/security.yaml +39 -0
  767. package/templates/AGENTS.template.md +99 -0
  768. package/templates/CLAUDE.template.md +1 -0
  769. package/templates/GEMINI.template.md +1 -0
  770. package/templates/builtin-workflows/code-review.yaml +73 -0
  771. package/templates/builtin-workflows/compete-streak.yaml +78 -0
  772. package/templates/builtin-workflows/hello-verify.yaml +10 -0
  773. package/templates/builtin-workflows/judge-regression.yaml +114 -0
  774. package/templates/builtin-workflows/skills/code-review/SKILL.md +60 -0
  775. package/templates/builtin-workflows/skills/hello-verify/SKILL.md +6 -0
  776. package/templates/guard-kit/GUARD_SETUP.md.template +255 -0
  777. package/templates/guard-kit/check.mjs.template +777 -0
  778. package/templates/guard-kit/config.json.template +6 -0
  779. package/templates/guard-kit/poetic-guard.yml.template +189 -0
  780. package/templates/profiles/README.md +56 -0
  781. package/templates/profiles/frontier-claude.json +27 -0
  782. package/templates/profiles/frontier-codex.json +26 -0
@@ -0,0 +1,2232 @@
1
+ # Troubleshooting Guide
2
+
3
+ > **Comprehensive troubleshooting guide for Poetic AI orchestration CLI**
4
+ >
5
+ > Common errors, solutions, and debugging techniques based on real-world issues
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ - [Quick Reference](#quick-reference)
12
+ - [Disk Filled by Provider Temp Files](#disk-filled-by-provider-temp-files)
13
+ - [Recovering Competition Results](#recovering-competition-results)
14
+ - [Flywheel Operator Recovery](#flywheel-operator-recovery)
15
+ - [Common Errors & Solutions](#common-errors--solutions)
16
+ - [Error Codes & Meanings](#error-codes--meanings)
17
+ - [Provider-Specific Issues](#provider-specific-issues)
18
+ - [Installation & Setup Problems](#installation--setup-problems)
19
+ - [Debugging Tips](#debugging-tips)
20
+ - [Advanced Troubleshooting](#advanced-troubleshooting)
21
+
22
+ ---
23
+
24
+ ## Quick Reference
25
+
26
+ | Issue Type | Quick Fix | Full Guide |
27
+ |------------|-----------|------------|
28
+ | **Disk pressure** | `poetic cleanup provider-temp --use-default-roots` | [Disk Filled by Provider Temp Files](#disk-filled-by-provider-temp-files) |
29
+ | **LaunchAgent stale** | `poetic cleanup temp-agent --status` | [LaunchAgent Stale After Repo Move](#launchagent-stale-after-repo-move) |
30
+ | **Stale CLI Build** | `./scripts/build-poetic.sh` | [Stale CLI Build](#stale-cli-build) |
31
+ | **Missing Dependencies** | `npm ci` | [Missing Runtime Dependencies](#missing-runtime-dependencies) |
32
+ | **Authentication** | Check API keys | [Provider-Specific Issues](#provider-specific-issues) |
33
+ | **Grok auth/readiness** | `grok login --device-auth` (or `grok login` / `grok`); optional `XAI_API_KEY` for CI/headless | [Grok Issues](#grok-issues) |
34
+ | **Installation** | Verify CLI tools | [Installation & Setup Problems](#installation--setup-problems) |
35
+ | **Execution** | Use `--verbose` flag | [Debugging Tips](#debugging-tips) |
36
+ | **Codex Timeout** | Check bot comments | [Codex Issues](#codex-issues) |
37
+ | **Parallel Failures** | Reduce concurrency | [Parallel Execution Problems](#parallel-execution-problems) |
38
+ | **Worktree cleaned up** | Use `poetic compete apply` | [Recovering Competition Results](#recovering-competition-results) |
39
+ | **Autoloop stuck or unclear** | `poetic loop explain <taskId>` | [Autoloop Diagnosis](#autoloop-diagnosis) |
40
+
41
+ ---
42
+
43
+ ## Disk Filled by Provider Temp Files
44
+
45
+ **Symptoms**: Disk full warnings on a development machine, or `df -h` shows `/` or `/private` near capacity. Common on always-on machines that run long Claude Code sessions.
46
+
47
+ **Cause**: AI providers write temp files during execution and don't always clean up after themselves. Two directories are the primary culprits:
48
+
49
+ - `/private/tmp/claude-<UID>/` — Claude Code writes sandbox isolation files here during sessions
50
+ - `/private/tmp/claude-mcp-npm-cache` — npm package cache used by MCP server processes (e.g. brave-search, exa-api, tavily); redirected here intentionally to keep it out of `~/.npm`
51
+
52
+ > macOS may clear `/private/tmp` on its own schedule, but this is not reliable on always-on machines and should not be relied upon when disk pressure is active.
53
+
54
+ ### Quick fix (one-time dry-run)
55
+
56
+ ```bash
57
+ # Preview what would be deleted (no changes made)
58
+ poetic cleanup provider-temp --use-default-roots
59
+
60
+ # Run the actual cleanup (files older than 24h by default)
61
+ poetic cleanup provider-temp --use-default-roots --execute
62
+ ```
63
+
64
+ ### Automated cleanup (recommended for long-running machines)
65
+
66
+ Install a macOS LaunchAgent that runs cleanup daily in the background by default:
67
+
68
+ ```bash
69
+ poetic cleanup temp-agent --install-launchagent --use-default-roots
70
+ ```
71
+
72
+ Logs are written to `~/.poetic/logs/temp-cleanup.log`. To check status:
73
+
74
+ ```bash
75
+ poetic cleanup temp-agent --status
76
+ ```
77
+
78
+ ### Configuration
79
+
80
+ Override the defaults in `.poetic/config/poetic.config.jsonc`:
81
+
82
+ ```js
83
+ cleanup: {
84
+ providerTemp: {
85
+ roots: ['/private/tmp/claude-501', '/private/tmp/claude-mcp-npm-cache'],
86
+ maxAgeHours: 24, // default: 24
87
+ }
88
+ }
89
+ ```
90
+
91
+ When `cleanup.providerTemp.roots` is set in config, `poetic cleanup temp-agent --install-launchagent` uses those roots without requiring `--use-default-roots`.
92
+
93
+ ### LaunchAgent stale after repo move
94
+
95
+ If you move or rebuild the Poetic repo, the LaunchAgent wrapper embeds the old binary path and silently skips cleanup. Check for staleness:
96
+
97
+ ```bash
98
+ poetic cleanup temp-agent --status
99
+ # Shows "MISSING" next to Binary or Node if the embedded paths are gone
100
+ ```
101
+
102
+ Fix:
103
+
104
+ ```bash
105
+ poetic cleanup temp-agent --install-launchagent --use-default-roots
106
+ # Reinstalls the wrapper with current binary and Node paths
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Recovering Competition Results
112
+
113
+ If the worktree was cleaned up before you could apply competition results (e.g. the output showed "Worktree cleaned up. Recover via: ..."):
114
+
115
+ Before applying, check out a delivery branch. Non-dry-run
116
+ `poetic compete apply` is intentionally blocked on `run/*`, `validation/*`, and
117
+ generated `poetic/*` artifact branches. Use `fix/*` for product code, `docs/*`
118
+ for documentation-only patches, or `test/*` for test-only patches.
119
+
120
+ ### Method 1: Use `poetic compete apply` (Recommended)
121
+
122
+ ```bash
123
+ # Apply winner's changes from most recent competition
124
+ poetic compete apply
125
+
126
+ # Apply specific competition
127
+ poetic compete apply <task-id>
128
+
129
+ # Preview without applying
130
+ poetic compete apply <task-id> --dry-run
131
+ ```
132
+
133
+ The command recovers the diff from telemetry (state/variants) when the worktree directory no longer exists.
134
+
135
+ ### Method 2: Manual recovery from telemetry
136
+
137
+ If `poetic compete apply` is unavailable or you need to inspect the raw diff:
138
+
139
+ 1. Find the variant state file: `ls .poetic/telemetry/state/variants/ | grep <task-id>`
140
+ 2. Extract the diff: `cat .poetic/telemetry/state/variants/<filename>.json | jq -r '.worktreeDiff' > changes.patch`
141
+ 3. Apply the patch: `git apply changes.patch`
142
+
143
+ ---
144
+
145
+ ## Autoloop Diagnosis
146
+
147
+ Use these commands when `poetic run --autoloop` stops unexpectedly, appears
148
+ stuck, or reports an unclear completion status:
149
+
150
+ ```bash
151
+ poetic run autoloop history --last 10
152
+ poetic run autoloop stats
153
+ poetic loop explain <taskId>
154
+ ```
155
+
156
+ `poetic run autoloop history` lists recent CLI and Flywheel autoloop runs.
157
+ `poetic run autoloop stats` summarizes aggregate outcomes. `poetic loop explain`
158
+ shows a run's termination reason, completion summary, blocking issues, gate
159
+ state, semantic validation state, artifact paths, and worktree path when
160
+ available.
161
+
162
+ If durable run artifacts exist but `poetic run autoloop history` is incomplete,
163
+ rebuild the append-only ledger:
164
+
165
+ ```bash
166
+ poetic run autoloop backfill
167
+ ```
168
+
169
+ Timebox units differ by surface: `--autoloop-timebox` is whole minutes, while
170
+ `POETIC_AUTOLOOP_TIMEBOX_MS` is milliseconds. `POETIC_AUTOLOOP_TIMEBOX` remains
171
+ supported as a legacy millisecond alias. If an env value was intended as
172
+ minutes, convert it before retrying. When both environment variables are set,
173
+ the explicit `_MS` variable takes precedence.
174
+
175
+ Autoloop uses an isolated worktree by default. Use `--preserve-worktrees` before
176
+ retrying when you need to inspect failed or partial edits. Use `--in-place` only
177
+ when direct writes to the current working tree are intended; it refuses a dirty
178
+ tree unless `--allow-dirty` is also set.
179
+
180
+ Only one CLI autoloop can hold the per-repo lock at a time. If a new run reports
181
+ an active lock after a crash, inspect recent history and check that no owning
182
+ process is still running. The lock is `.poetic/autoloop/.run.lock`; remove it
183
+ only when the process is gone and the lock is older than the 90-minute stale
184
+ window.
185
+
186
+ ---
187
+
188
+ ## Flywheel Operator Recovery
189
+
190
+ Use this sequence when operating an independent Flywheel workflow or recovering
191
+ from an incomplete run:
192
+
193
+ ```bash
194
+ # Before provider execution
195
+ poetic run flywheel catalog
196
+ poetic run flywheel validate <workflow>
197
+ poetic run flywheel plan <workflow>
198
+ poetic run flywheel run <workflow> # preview only
199
+ poetic run flywheel run <workflow> --execute
200
+
201
+ # After the run prints a workflowId
202
+ poetic run flywheel status <workflow-id>
203
+ poetic run flywheel inspect <workflow-id>
204
+
205
+ # Review before integrating
206
+ git diff <baseSha>..poetic/flywheel/<workflow-id>
207
+ poetic run flywheel merge-result <workflow-id> --dry-run
208
+ poetic run flywheel merge-result <workflow-id>
209
+
210
+ # Cleanup is preview-only by default
211
+ poetic run flywheel cleanup <workflow-id>
212
+ poetic run flywheel cleanup <workflow-id> --execute
213
+ ```
214
+
215
+ If a stage needs manual repair, fix the run branch and then re-run persisted
216
+ quality gates with `poetic run flywheel reverify <workflow-id> <stage-id> --dry-run`.
217
+ After reviewing the commands, use `--yes` for non-interactive reverification.
218
+
219
+ ---
220
+
221
+ ## Common Errors & Solutions
222
+
223
+ ### CLI Task Description Quoting Issues
224
+
225
+ **Error**: `Error: Too many arguments provided` when running `poetic compete` or `poetic run`
226
+
227
+ **Symptoms**: Command fails immediately with "too many arguments" error message.
228
+
229
+ **Cause**: Task descriptions containing spaces must be quoted. Without quotes, the shell splits the description into multiple arguments.
230
+
231
+ **Resolution**:
232
+ ```bash
233
+ # Wrong (unquoted task description):
234
+ poetic compete Add error handling to auth.ts --variant claude:conservative:local
235
+
236
+ # Correct (quoted task description):
237
+ poetic compete "Add error handling to auth.ts" --variant claude:conservative:local
238
+ ```
239
+
240
+ **Improved Error Messages (v0.1.0+):**
241
+ The CLI now provides helpful guidance when this error occurs:
242
+ ```
243
+ Error: Too many arguments provided
244
+
245
+ Tip: Task description must be quoted if it contains spaces:
246
+ Correct: poetic compete "Task description here" --variant ...
247
+ Wrong: poetic compete Task description here --variant ...
248
+ ```
249
+
250
+ **Prevention:**
251
+ - Always quote task descriptions that contain spaces
252
+ - Use single quotes if description contains double quotes: `'Task with "quoted" text'`
253
+ - Use backslash escaping for complex cases: `"Task with \"nested\" quotes"`
254
+ - For long or multiline tasks, prefer `--task-file`:
255
+ - `poetic run --task-file task.txt`
256
+ - `poetic compete --task-file task.txt --variant ...`
257
+
258
+ ### Stale CLI Build
259
+
260
+ **Error**: `Failed to load CLI: Dynamic require of "fs" is not supported` or `Cannot find module './index.js'`
261
+
262
+ **Symptoms**:
263
+ - CLI commands fail immediately on startup
264
+ - Error message mentions "Dynamic require" or missing modules
265
+ - Occurs after `git pull`, `git checkout`, or editing source files
266
+
267
+ **Cause**: The compiled CLI in `dist/` is missing or outdated. This happens because:
268
+ - `dist/` is gitignored (not tracked in version control)
269
+ - Source files (`src/`) changed after your last build
270
+ - The `prepare` hook only runs during `npm install`, not after git operations
271
+
272
+ **Resolution**:
273
+
274
+ 1. **Quick fix** - Rebuild and rewire the local CLI:
275
+ ```bash
276
+ ./scripts/build-poetic.sh
277
+ ```
278
+
279
+ 2. **Compilation-only alternative** - Rebuild `dist/` without relinking:
280
+ ```bash
281
+ npm run build
282
+ ```
283
+
284
+ 3. **Verify the build**:
285
+ ```bash
286
+ # Check that dist/ was created and is recent
287
+ ls -la dist/entry.js
288
+ ```
289
+
290
+ **When to rebuild**:
291
+ - After `git pull` or `git fetch && git merge`
292
+ - After `git checkout` to a different branch
293
+ - After editing any files in `src/` directory
294
+ - After `git cherry-pick`, `git rebase`, or similar operations
295
+ - NOT needed after `npm install` (automatic via `prepare` hook)
296
+
297
+ **Improved error message (v0.1.0+)**:
298
+
299
+ The CLI now detects stale builds and provides clear instructions:
300
+
301
+ ```
302
+ CLI build is missing or outdated
303
+
304
+ How to fix:
305
+ 1) Rebuild and rewire the CLI:
306
+ ./scripts/build-poetic.sh
307
+
308
+ 2) Or compile dist/ only:
309
+ npm run build
310
+
311
+ Common causes:
312
+ • git pull/checkout changed source files
313
+ • Local edits to src/ directory
314
+ • Deleted dist/ directory
315
+
316
+ For more help: docs/TROUBLESHOOTING.md#stale-cli-build
317
+ ```
318
+
319
+ **Prevention**:
320
+ - Remember to run `./scripts/build-poetic.sh` after pulling source changes
321
+ - Add to your workflow: `git pull && ./scripts/build-poetic.sh`
322
+ - Consider setting up a git post-merge hook for automatic rebuilds
323
+
324
+ **Technical details**:
325
+ - The CLI uses ESM modules with dynamic imports for performance
326
+ - When `dist/` is stale, the import chain fails with cryptic Node.js module errors
327
+ - The build process (via tsup) bundles TypeScript source into optimized JavaScript
328
+
329
+ ### Missing Runtime Dependencies
330
+
331
+ **Error**: `Missing runtime dependencies for Poetic CLI in /path/to/install: @anthropic-ai/sdk, ...` or `Cannot find package '@anthropic-ai/sdk'`
332
+
333
+ **Symptoms**:
334
+ - `poetic compete` or `poetic run` fails immediately with a missing dependencies message
335
+ - Claude provider variant crashes at startup (4s) with an opaque SDK import error
336
+ - AI judges fail with `Cannot find package '@anthropic-ai/sdk' imported from dist/transports-*.js`
337
+
338
+ **Cause**: Node.js runtime dependencies declared in `package.json` are not installed. This typically happens after:
339
+ - Cloning the repo without running `npm ci`
340
+ - Switching branches where `package.json` changed
341
+ - Deleted or corrupt `node_modules/`
342
+
343
+ **Resolution**:
344
+ ```bash
345
+ npm ci
346
+ npm run build
347
+ ```
348
+
349
+ **Bypass** (for test/mock environments):
350
+
351
+ | Variable | Effect |
352
+ |----------|--------|
353
+ | `POETIC_SKIP_RUNTIME_DEP_CHECKS=1` | Skip only the runtime dependency preflight |
354
+ | `POETIC_SKIP_TOOLING_CHECKS=1` | Skip all tooling preflight checks (includes dependency check) |
355
+ | `POETIC_E2E_TEST=1` | Skip preflight (end-to-end test harness) |
356
+ | `POETIC_MOCK_PROVIDERS=1` (with test runner or `POETIC_ALLOW_MOCK_PROVIDERS=1`) | Skip preflight when mock providers are actually permitted; outside tests, both flags are required or startup scrubs the mock flag |
357
+
358
+ These env vars are intended for CI, test harnesses, and environments where dependencies are lazily or externally provided. Do not use them to mask a broken local install.
359
+
360
+ ### `poetic do` Apply Conflicts
361
+
362
+ **Error**: `Failed to apply worktree diff to repo` or `Cannot apply patch - conflicts detected`
363
+
364
+ **Symptoms**:
365
+ - `poetic do` execution completes successfully in the isolated worktree
366
+ - Quality gates pass (if enabled)
367
+ - Apply step fails with conflict errors
368
+ - Worktree is preserved for inspection
369
+ - Patch file saved to `.poetic/tmp/do-apply-failures/`
370
+
371
+ **Cause**: The changes made in the isolated worktree conflict with the current state of your repository. This happens when:
372
+ - Repository HEAD moved during `poetic do` execution (someone pushed changes)
373
+ - Working tree has uncommitted changes that conflict with worktree changes
374
+ - File was modified/deleted in repo since worktree was created
375
+ - Merge conflict between worktree patch and current repo state
376
+
377
+ **Resolution**:
378
+
379
+ The error output provides four recovery options:
380
+
381
+ **Option 1: Inspect Changes (Recommended first step)**
382
+ ```bash
383
+ # Navigate to the preserved worktree
384
+ cd <preserved-worktree-path-from-output>
385
+
386
+ # View all changes made
387
+ git diff <baseline-sha>
388
+
389
+ # View specific file changes
390
+ git diff <baseline-sha> -- path/to/file.ts
391
+ ```
392
+
393
+ **Option 2: Manual Apply with 3-Way Merge**
394
+ ```bash
395
+ # Attempt manual apply with conflict resolution
396
+ git apply --3way .poetic/tmp/do-apply-failures/apply-failed-<timestamp>.patch
397
+
398
+ # If conflicts occur, you'll see markers in files:
399
+ # <<<<<<< ours (current repo state)
400
+ # =======
401
+ # >>>>>>> theirs (worktree changes)
402
+
403
+ # Fix conflicts manually, then:
404
+ git add <conflicted-files>
405
+ git status # Verify resolution
406
+ ```
407
+
408
+ **Option 3: View Patch Content**
409
+ ```bash
410
+ # Inspect what the patch would do
411
+ cat .poetic/tmp/do-apply-failures/apply-failed-<timestamp>.patch
412
+
413
+ # Or use less for large patches
414
+ less .poetic/tmp/do-apply-failures/apply-failed-<timestamp>.patch
415
+ ```
416
+
417
+ **Option 4: Cherry-Pick from Worktree**
418
+ ```bash
419
+ # Navigate to worktree
420
+ cd <preserved-worktree-path-from-output>
421
+
422
+ # Find the commit(s) made by the provider
423
+ git log --oneline -n 5
424
+
425
+ # Cherry-pick specific commit(s) into main repo
426
+ cd <back-to-main-repo>
427
+ git cherry-pick <commit-sha-from-worktree>
428
+ ```
429
+
430
+ **After Recovery:**
431
+ ```bash
432
+ # Clean up the preserved worktree
433
+ poetic cleanup stale --only worktrees --worktree-age 0 --execute
434
+ ```
435
+
436
+ **Prevention:**
437
+
438
+ 1. **Keep repo clean** - Commit or stash changes before running `poetic do`:
439
+ ```bash
440
+ git status # Check for uncommitted changes
441
+ git stash # Or commit them
442
+ poetic do "task"
443
+ ```
444
+
445
+ 2. **Use `--allow-dirty` carefully** - Only when you understand the risk:
446
+ ```bash
447
+ poetic do "task" --allow-dirty
448
+ ```
449
+
450
+ 3. **Check for upstream changes** - Pull latest before long-running tasks:
451
+ ```bash
452
+ git pull
453
+ poetic do "task"
454
+ ```
455
+
456
+ 4. **Use `--preserve-worktree` for debugging** - Inspect without auto-cleanup:
457
+ ```bash
458
+ poetic do "task" --preserve-worktree --verbose
459
+ ```
460
+
461
+ **Related:**
462
+ - [poetic do](CLI_REFERENCE.md#poetic-do) command reference
463
+ - Worktree isolation behavior and its limits; isolation is not a comprehensive safety guarantee
464
+
465
+ ### Claude CLI variants always fail with "empty changes"
466
+
467
+ **Symptoms**: Claude CLI variants complete execution but are marked as failed with error "Variant produced no changes (empty result)" despite actually modifying files.
468
+
469
+ **Error**:
470
+ ```
471
+ claude default-model conservative: Completed in 24.4s (local)
472
+ Competition failed: No variants succeeded
473
+ ```
474
+
475
+ **Cause**: This is a critical architectural issue with two different workspace edit models:
476
+
477
+ 1. **JSONL Protocol** (Cursor, Codex, GLM): Provider emits edits to `.poetic/edits.jsonl` during execution
478
+ 2. **Git-Detection** (Claude CLI): Provider writes files directly, changes detected via `git status` after execution
479
+
480
+ The issue occurs when code uses `workspaceEditsApplied` (count of edits we wrote) instead of `workspaceEditsRequested` (count of edits provider reported) for success validation. Git-detected edits are filtered before applying (since files already exist on disk), resulting in `workspaceEditsApplied = 0` even when Claude made real changes.
481
+
482
+ **Resolution**:
483
+ 1. Ensure `local-executor.ts:1260-1263` uses `workspaceEditsRequested` not `workspaceEditsApplied`:
484
+ ```typescript
485
+ // CORRECT - counts all edits including git-detected
486
+ const emptyChanges = workspaceEditsRequested === 0 && completeness === 0;
487
+
488
+ // WRONG - misses git-detected edits
489
+ const emptyChanges = workspaceEditsApplied === 0 && completeness === 0;
490
+ ```
491
+
492
+ 2. If you see this after a code update, rebuild: `./scripts/build-poetic.sh`
493
+
494
+ **Technical details**:
495
+ - See comprehensive comments in `src/orchestrator/executors/pipeline/variant-execution-pipeline.ts:42-67`
496
+ - Git-detected edits are marked with `_source: 'git-detection'`
497
+ - These edits represent real work but don't need re-application (files already on disk)
498
+ - Success validation must account for both edit models
499
+
500
+ **History**:
501
+ - **Breaking commit**: `5642c9ec` (2025-11-26) - introduced git-detection filtering without updating success check
502
+ - **Fix commit**: Current - updated success check to use `workspaceEditsRequested`
503
+
504
+ ### Cursor polling appears hung or times out
505
+
506
+ **Symptoms**: Waiting for Cursor completion seems to stall; eventually times out.
507
+
508
+ **What’s happening**: The poller is resilient to transient GitHub/`gh` errors and continues iterating until the timeout. If commits aren’t detected, it exits cleanly. It may log warnings when `--verbose` is enabled.
509
+
510
+ **Quick checks**:
511
+ - Run with `--verbose` to see per-iteration progress and transient error warnings.
512
+ - Verify commits: `gh pr view <PR#> --json commits` and look for Cursor bot author patterns.
513
+ - Ensure PR number and branch are correct; check that `git remote get-url origin` points to GitHub.
514
+
515
+ **If it truly times out**:
516
+ - Re-run with more time if the task is complex.
517
+ - Re-issue the `@cursor` instruction if needed.
518
+
519
+ ### Authentication Failures
520
+
521
+ > **Info: Authentication at Runtime**
522
+ >
523
+ > Provider execution defers authentication to the underlying CLI. Auth errors surface at
524
+ > execution time with actionable guidance. Routing and dry-run may perform advisory
525
+ > pre-verification, but are not a universal gate. Use `poetic provider list` for readiness verification.
526
+
527
+ #### Claude Authentication Issues
528
+
529
+ **Error**: `Authentication failed` or CLI reports not authenticated
530
+
531
+ **Solutions**:
532
+ ```bash
533
+ # 1. Re-authenticate via Claude CLI
534
+ claude auth logout
535
+ claude auth login
536
+
537
+ # 2. Verify CLI installation
538
+ which claude
539
+ claude --version
540
+ ```
541
+
542
+ **Common Causes**:
543
+ - Claude CLI session expired
544
+ - Claude CLI not installed or not in PATH
545
+ - Wrong config directory
546
+
547
+ #### Gemini Authentication Issues
548
+
549
+ **Error**: `GEMINI_API_KEY not found` or `Authentication failed`
550
+
551
+ **Solutions**:
552
+ ```bash
553
+ # 1. Set API key
554
+ export GEMINI_API_KEY='your-api-key-here'
555
+
556
+ # 2. Verify key format (should start with AIza...)
557
+ echo $GEMINI_API_KEY | head -c 10
558
+
559
+ # 3. Test with simple request
560
+ poetic run "test" --engine gemini --model gemini-2.5-flash
561
+ ```
562
+
563
+ **Common Causes**:
564
+ - Missing `GEMINI_API_KEY` environment variable
565
+ - Invalid API key format
566
+ - Quota exceeded (check Google AI Studio)
567
+
568
+ #### Grok Authentication Issues
569
+
570
+ **Error**: `XAI_API_KEY not found`, Grok readiness is `unknown`, or browser auth is required
571
+
572
+ **Solutions**:
573
+ ```bash
574
+ # 1. Install Grok through Poetic's guarded setup path
575
+ POETIC_ALLOW_CURL_BASH=1 poetic provider setup --providers grok
576
+
577
+ # 2. Primary for local use: cached OAuth / device login via the Grok CLI
578
+ grok login --device-auth
579
+ # or: grok login
580
+ # or first interactive launch: grok
581
+
582
+ # 3. Optional for CI/headless automation (official key)
583
+ export XAI_API_KEY='your-key-here'
584
+ # Deprecated Poetic compatibility alias (still accepted; not preferred):
585
+ # export GROK_CODE_XAI_API_KEY='your-key-here'
586
+
587
+ # 4. Inspect passive readiness (key presence remains unverified)
588
+ poetic provider list
589
+ poetic doctor --provider grok
590
+ ```
591
+
592
+ **Common Causes**:
593
+ - Grok CLI is not installed or not on `PATH`
594
+ - Cached CLI OAuth / device login has not been completed (`~/.grok` auth missing)
595
+ - CI/headless runs have neither a usable CLI auth cache nor `XAI_API_KEY` (or the deprecated `GROK_CODE_XAI_API_KEY` alias)
596
+ - Sandboxed agent sessions cannot read Grok's CLI auth state
597
+ - `POETIC_GROK_ALLOW_BROWSER_AUTH=1` was not set when deliberately allowing browser auth probes (opt-in only; not safe by default in headless/CI)
598
+
599
+ #### Cursor Authentication Issues
600
+
601
+ **Error**: `ConnectError: [invalid_argument]` or `Cursor CLI not found`
602
+
603
+ **Solutions**:
604
+ ```bash
605
+ # 1. Install Cursor Agent
606
+ curl https://cursor.com/install -fsS | bash
607
+
608
+ # 2. Verify installation
609
+ cursor-agent --version
610
+ ```
611
+
612
+ **Common Causes**:
613
+ - Cursor CLI not installed
614
+ - Invalid API key
615
+ - Plan mode conflicts (try disabling)
616
+
617
+ #### Codex Authentication Issues
618
+
619
+ **Error**: `Invalid token` or `Command not found: codex`
620
+
621
+ **Solutions**:
622
+ ```bash
623
+ # 1. Install Codex CLI
624
+ npm install -g @openai/codex
625
+
626
+ # 2. Verify installation
627
+ codex --version
628
+
629
+ # 3. Authenticate
630
+ codex login
631
+
632
+ # 4. Verify via Poetic
633
+ poetic doctor --provider codex
634
+ ```
635
+
636
+ **Common Causes**:
637
+ - Codex CLI not installed
638
+ - Invalid or expired token
639
+ - Wrong environment variable name
640
+
641
+ ### Installation Issues
642
+
643
+ #### Missing CLIs
644
+
645
+ **Error**: `'claude' is not available on this system` or similar
646
+
647
+ **Solutions**:
648
+ ```bash
649
+ # 1. Install all required CLIs
650
+ npm install -g @anthropic-ai/claude-code
651
+ npm install -g @openai/codex
652
+ curl https://cursor.com/install -fsS | bash
653
+
654
+ # 2. Verify installations
655
+ claude --version
656
+ codex --version
657
+ cursor-agent --version
658
+
659
+ # 3. Add to PATH if needed
660
+ export PATH="$PATH:$(npm config get prefix)/bin"
661
+ ```
662
+
663
+ #### PATH Problems
664
+
665
+ **Error**: `Command not found` despite installation
666
+
667
+ **Solutions**:
668
+ ```bash
669
+ # 1. Find where npm installs global packages
670
+ npm config get prefix
671
+
672
+ # 2. Add to PATH
673
+ export PATH="$PATH:$(npm config get prefix)/bin"
674
+
675
+ # 3. Make permanent (add to ~/.bashrc or ~/.zshrc)
676
+ echo 'export PATH="$PATH:$(npm config get prefix)/bin"' >> ~/.bashrc
677
+ source ~/.bashrc
678
+
679
+ # 4. Verify PATH
680
+ which claude
681
+ which codex
682
+ which cursor-agent
683
+ ```
684
+
685
+ #### Node.js Version Issues
686
+
687
+ **Error**: `Unsupported Node.js version` or `Module not found`
688
+
689
+ **Solutions**:
690
+ ```bash
691
+ # 1. Check Node.js version
692
+ node --version
693
+ # Requires: Node.js 24.x (see .nvmrc)
694
+
695
+ # 2. Update Node.js (using nvm)
696
+ nvm install 24
697
+ nvm use 24
698
+
699
+ # 3. Rebuild native dependencies (better-sqlite3)
700
+ npm rebuild better-sqlite3
701
+
702
+ # 4. Clear npm cache
703
+ npm cache clean --force
704
+
705
+ # 5. Reinstall dependencies
706
+ rm -rf node_modules package-lock.json
707
+ npm install
708
+ ```
709
+
710
+ ### Execution Failures
711
+
712
+ #### Timeout Errors
713
+
714
+ **Error**: `Timeout waiting for task to complete`
715
+
716
+ **Solutions**:
717
+ ```bash
718
+ # 1. Increase timeout
719
+ poetic run "task" --timeout 60
720
+
721
+ # 2. Use faster model
722
+ poetic run "task" --model gemini-2.5-flash
723
+
724
+ # 3. Check provider status
725
+ poetic providers
726
+
727
+ # 4. Use verbose mode for details
728
+ poetic run "task" --verbose
729
+ ```
730
+
731
+ **Common Causes**:
732
+ - Task too complex for timeout limit
733
+ - Provider rate limiting
734
+ - Network connectivity issues
735
+ - Memory pressure (check system resources)
736
+
737
+ #### Memory Issues
738
+
739
+ **Error**: `Memory limit exceeded` or `Out of memory`
740
+
741
+ **Solutions**:
742
+ ```bash
743
+ # 1. Check memory usage
744
+ poetic run "task" --verbose
745
+ # Look for: "Memory: XX% heap"
746
+
747
+ # 2. Reduce parallel execution
748
+ poetic run "task" --fan-out 2 --max-concurrent 2
749
+
750
+ # 3. Configure guardian behavior
751
+ # - Log-only (observe without killing)
752
+ export POETIC_MEMORY_KILL=0
753
+ # - Aggressive kill mode (stress testing)
754
+ export POETIC_MEMORY_KILL=1
755
+ # - Container-aware RSS cap (e.g., 2GB)
756
+ export POETIC_RSS_LIMIT_MB=2048
757
+
758
+ # 4. Disable memory guardian (development only)
759
+ export POETIC_MEMORY_GUARD=0
760
+
761
+ # 5. Increase Node.js memory limit
762
+ node --max-old-space-size=4096 poetic.js run "task"
763
+ ```
764
+
765
+ **Common Causes**:
766
+ - Large codebase processing
767
+ - Too many parallel executions
768
+ - Memory leaks in provider code
769
+ - Insufficient system RAM
770
+
771
+ #### Crashes
772
+
773
+ **Error**: `Process exited with code 1` or `Segmentation fault`
774
+
775
+ **Solutions**:
776
+ ```bash
777
+ # 1. Check system resources
778
+ free -h
779
+ df -h
780
+
781
+ # 2. Run with verbose logging
782
+ poetic run "task" --verbose
783
+
784
+ # 3. Check logs
785
+ ls -la .poetic/telemetry/logs/
786
+
787
+ # 4. Test with simple task
788
+ poetic run "Create hello.js" --engine claude
789
+ ```
790
+
791
+ **Common Causes**:
792
+ - System resource exhaustion
793
+ - Provider-specific bugs
794
+ - Corrupted configuration
795
+ - Node.js version incompatibility
796
+
797
+ #### Token Analysis Failures
798
+
799
+ **Error**: `Token analysis failed` or unexpected split decisions during parallel decomposition
800
+
801
+ **Solutions**:
802
+ ```bash
803
+ # 1. Check token analysis output
804
+ POETIC_DEBUG=1 poetic compete "task" --variant claude:conservative
805
+
806
+ # 2. Disable token-aware splitting
807
+ poetic compete "task" --context-mode off --variant claude:conservative
808
+
809
+ # 3. Verify model is recognized by token estimator
810
+ # Unknown models fall back to 128K context window and 0.5 confidence
811
+ ```
812
+
813
+ **Common Causes**:
814
+ - Unknown model ID (not in token estimator registry) → conservative 128K estimate
815
+ - Very short prompts below the 60% threshold → no split even when expected
816
+ - tiktoken unavailable → character-based estimation (less accurate)
817
+
818
+ #### Partial Result Corruption
819
+
820
+ **Error**: Aggregated results contain incomplete or garbled output from parallel subtasks
821
+
822
+ **Solutions**:
823
+ ```bash
824
+ # 1. Reduce parallelism to isolate the failing subtask
825
+ poetic compete "task" --fan-out 2 --variant claude:conservative
826
+
827
+ # 2. Check for memory pressure (backpressure threshold is 70% RSS by default)
828
+ POETIC_MEMORY_BACKPRESSURE_PCT=50 poetic compete "task" --variant claude:conservative
829
+
830
+ # 3. Increase subtask timeout (subtask may be timing out mid-output)
831
+ POETIC_SUBTASK_TIMEOUT_MS=1800000 poetic compete "task" --variant claude:conservative
832
+
833
+ # 4. Run with verbose to see per-subtask output
834
+ poetic compete "task" --verbose --variant claude:conservative
835
+ ```
836
+
837
+ **Common Causes**:
838
+ - Subtask timeout triggered mid-generation (output truncated)
839
+ - Memory backpressure killing workers under load
840
+ - Provider returning partial responses on network errors
841
+
842
+ ### Git/GitHub Integration Errors
843
+
844
+ #### Git Conflicts
845
+
846
+ **Error**: `The following untracked working tree files would be overwritten by merge`
847
+
848
+ **Solutions**:
849
+ ```bash
850
+ # 1. Inspect the working directory before changing it
851
+ git status
852
+
853
+ # 2. Preserve tracked and untracked changes
854
+ git stash push --include-untracked -m "pre-merge recovery"
855
+
856
+ # 3. Pull latest changes
857
+ git pull origin main
858
+
859
+ # 4. Apply stash
860
+ git stash pop
861
+
862
+ # 5. Retry task
863
+ poetic run "task"
864
+ ```
865
+
866
+ **Common Causes**:
867
+ - Parallel executions creating overlapping files
868
+ - Uncommitted changes in working directory
869
+ - Git lock file conflicts
870
+ - Branch synchronization issues
871
+
872
+ #### GitHub API Errors
873
+
874
+ **Error**: `GitHub API rate limit exceeded` or `403 Forbidden`
875
+
876
+ **Solutions**:
877
+ ```bash
878
+ # 1. Check GitHub token
879
+ echo $GITHUB_TOKEN
880
+
881
+ # 2. Wait for rate limit reset (usually 1 hour)
882
+ gh api rate_limit
883
+
884
+ # 3. Use personal access token
885
+ export GITHUB_TOKEN='your-token-here'
886
+ ```
887
+
888
+ **Common Causes**:
889
+ - GitHub API rate limiting
890
+ - Invalid or expired token
891
+ - Insufficient token permissions
892
+ - Network connectivity issues
893
+
894
+ ### Parallel Execution Problems
895
+
896
+ #### Concurrency Issues
897
+
898
+ **Error**: `Too many concurrent executions` or `Resource exhausted`
899
+
900
+ **Solutions**:
901
+ ```bash
902
+ # 1. Reduce concurrency
903
+ poetic run "task" --fan-out 2 --max-concurrent 2
904
+
905
+ # 2. Use sequential execution
906
+ poetic run "task" --fan-out 1
907
+
908
+ # 3. Check system resources
909
+ htop
910
+ free -h
911
+
912
+ # 4. Cap per-provider concurrency
913
+ poetic run "task" --fan-out 4 --provider-limit claude=2
914
+ ```
915
+
916
+ **Common Causes**:
917
+ - System resource limits
918
+ - Provider rate limiting
919
+ - Memory pressure
920
+ - Network bandwidth constraints
921
+
922
+ #### Worktree Conflicts
923
+
924
+ **Error**: `Git worktree already exists` or `Branch already exists`
925
+
926
+ **Solutions**:
927
+ ```bash
928
+ # 1. Clean up worktrees
929
+ git worktree prune
930
+
931
+ # 2. Remove specific worktree
932
+ git worktree remove <path>
933
+
934
+ # 3. Check for existing branches
935
+ git branch -a
936
+
937
+ # 4. Let Poetic choose a unique managed branch name for a new run
938
+ poetic run "task"
939
+ ```
940
+
941
+ **Common Causes**:
942
+ - Previous execution didn't clean up properly
943
+ - Manual git operations interfering
944
+ - Concurrent executions using same branch names
945
+ - Git lock file issues
946
+
947
+ ---
948
+
949
+ ## Error Codes & Meanings
950
+
951
+ ### Exit Codes
952
+
953
+ | Code | Meaning | Common Causes | Solutions |
954
+ |------|---------|---------------|-----------|
955
+ | `0` | Success | All tasks completed successfully | - |
956
+ | `1` | General failure | Task failed, quality gate failed | Check logs, use `--verbose` |
957
+ | `2` | Invalid arguments | Wrong CLI syntax | Check command format |
958
+
959
+ ### Provider-Specific Error Messages
960
+
961
+ #### Claude Errors
962
+
963
+ | Error Message | Cause | Solution |
964
+ |---------------|-------|----------|
965
+ | `Authentication failed` | Invalid API key | Re-authenticate with `claude auth login` |
966
+ | `Rate limit exceeded` | Too many requests | Wait 60 seconds or upgrade plan |
967
+ | `Model not available` | Invalid model name | Use a model reported by `poetic provider show claude` or omit the model to use the configured default |
968
+ | `Context length exceeded` | Task too large | Split into smaller tasks |
969
+
970
+ #### Gemini Errors
971
+
972
+ | Error Message | Cause | Solution |
973
+ |---------------|-------|----------|
974
+ | `GEMINI_API_KEY not found` | Missing API key | Set `export GEMINI_API_KEY='key'` |
975
+ | `Quota exceeded` | API quota limit | Check Google AI Studio quotas |
976
+ | `Invalid model` | Wrong model name | Use `gemini-2.5-flash` or `gemini-2.5-pro` |
977
+ | `Permission denied` | API key permissions | Regenerate key with correct permissions |
978
+
979
+ #### Grok Errors
980
+
981
+ | Error Message | Cause | Solution |
982
+ |---------------|-------|----------|
983
+ | `Command not found: grok` | Grok CLI not installed or not on `PATH` | Run `POETIC_ALLOW_CURL_BASH=1 poetic provider setup --providers grok` or install with xAI's installer |
984
+ | `Authentication unknown` | Passive readiness cannot verify a configured key or cached CLI auth | Primary: `grok login --device-auth` (or `grok login` / `grok`). Optional for CI/headless: set `XAI_API_KEY`. Key presence remains unverified until requested execution or `poetic doctor --probe --provider grok` succeeds. |
985
+ | `XAI_API_KEY not found` / headless requires key | Headless path has no key and no usable CLI auth cache | Prefer CLI OAuth for local use; keys are optional only when a cache exists. For CI/headless without cache set `XAI_API_KEY` (deprecated alias `GROK_CODE_XAI_API_KEY` still accepted). Do not rely on browser auth unless you opt in |
986
+ | Requested Grok execution reports an auth failure | The Grok CLI could not authenticate the requested run | Re-run `grok login --device-auth` or `grok login`; for CI set optional `XAI_API_KEY`. Poetic does not run a separate auth preflight. |
987
+ | `Browser auth required` | The Grok CLI wants to start an interactive auth flow | Complete cached login in a terminal (`grok login --device-auth` / `grok`). Set `POETIC_GROK_ALLOW_BROWSER_AUTH=1` only when browser auth is acceptable (opt-in; not automatically safe in headless/CI) |
988
+ | `unsafe for Grok headless execution` | `POETIC_GROK_PERMISSION_MODE` is `acceptEdits` or `auto` | Unset the variable (omit `--permission-mode`) or use locked native read-only posture (`dontAsk` + allow rules + tool/MCP/subagent locks; CLI >= 0.2.93) / `bypassPermissions` only when policy permits |
989
+ | `reasoningEffort` rejected | The selected Grok model does not declare native effort support, or `auto` discovery could not establish it | Use `grok-4.6`, or leave effort unset. With `auto`, confirm `grok models` exposes an effort-capable default. |
990
+ | `max_turns exceeded` / early Cancelled | Explicit `--max-turns` too low, or transport death under a bad permission mode | Leave `POETIC_GROK_MAX_TURNS` unset for normal runs; do not use `acceptEdits`/`auto` headless. Auth/edit probes may set a low turn cap deliberately |
991
+
992
+ #### Cursor Errors
993
+
994
+ | Error Message | Cause | Solution |
995
+ |---------------|-------|----------|
996
+ | `ConnectError: [invalid_argument]` | Plan mode conflict | Disable plan mode or use different model |
997
+ | `Cursor CLI not found` | CLI not installed | Install with `curl https://cursor.com/install -fsS | bash` |
998
+ | `Workspace not found` | Wrong directory | Run from project root |
999
+
1000
+ #### Codex Errors
1001
+
1002
+ | Error Message | Cause | Solution |
1003
+ |---------------|-------|----------|
1004
+ | `Command not found: codex` | CLI not installed | Install with `npm install -g @openai/codex` |
1005
+ | `Authentication required` | Not logged in | Run `codex login`, then `poetic doctor --provider codex` |
1006
+ | `Codex execution timed out` | Local CLI exceeded the execution deadline | Inspect the retained worktree/branch, then retry with a suitable executor timeout |
1007
+ | `Codex CLI terminated without an exit code` | Local process or transport ended unexpectedly | Inspect stderr and retained git changes before retrying |
1008
+
1009
+ ### File Compliance Failure Messages
1010
+
1011
+ | Error Message | Cause | Solution |
1012
+ |---------------|-------|----------|
1013
+ | `FILE: specification missing` | No FILE: in task | Add `FILE: path/to/file` to task description |
1014
+ | `File not found: <path>` | Invalid file path | Check file exists and path is correct |
1015
+ | `Compliance check failed` | Wrong file edited | Use exact FILE: specification |
1016
+ | `Multiple files not supported` | Too many files | Use single file or split into multiple tasks |
1017
+
1018
+ ### Timeout Error Patterns
1019
+
1020
+ | Pattern | Cause | Solution |
1021
+ |---------|-------|----------|
1022
+ | `Timeout after 30 minutes` | Provider execution timeout | Inspect retained local changes, then retry or simplify the task |
1023
+ | `Timeout after 10 minutes` | Provider execution timeout | Use faster model or simpler task |
1024
+ | `Timeout after 5 minutes` | Network connectivity | Check internet connection |
1025
+ | `Timeout after 1 minute` | Provider rate limiting | Wait and retry |
1026
+
1027
+ ---
1028
+
1029
+ ## Provider-Specific Issues
1030
+
1031
+ ### Grok Issues
1032
+
1033
+ Grok is a supported validated provider, but Poetic does
1034
+ not manage Grok credentials. **Primary for local use:** cached OAuth / device
1035
+ login via the Grok CLI (`grok login --device-auth`, `grok login`, or an initial
1036
+ `grok`). Keys are **optional** and only needed when there is no usable CLI auth
1037
+ cache (typical CI/headless): official `XAI_API_KEY`.
1038
+ `GROK_CODE_XAI_API_KEY` is a deprecated Poetic compatibility alias (still
1039
+ accepted; not preferred for new setup). Provider-scoped keys are accepted via
1040
+ Poetic's provider policy when present; they are not mandatory for local OAuth.
1041
+
1042
+ #### Authentication at execution
1043
+
1044
+ Poetic does not infer Grok authentication from keys or local auth files before a
1045
+ run. It starts the requested `grok --prompt-file` invocation and reports the
1046
+ CLI's actual authentication or transport error. This supports CLI-owned auth
1047
+ state without coupling execution to a particular cache-file layout.
1048
+
1049
+ Passive `poetic doctor --provider grok` never spawns `grok` and may report auth
1050
+ as unknown; that cold state is not a blocker. Use
1051
+ `poetic doctor --probe --provider grok` only when you intentionally want an
1052
+ active readiness probe. `POETIC_GROK_ALLOW_BROWSER_AUTH=1` remains an explicit
1053
+ opt-in when a requested execution or probe may open a browser.
1054
+
1055
+ Headless defaults (no operator action required): `--max-turns` is **not** set unless you opt in with `POETIC_GROK_MAX_TURNS`; output defaults to `streaming-json` when provider streaming is on; `--permission-mode` is omitted for normal edit runs. Do not set `POETIC_GROK_PERMISSION_MODE=acceptEdits` or `auto` for headless automation.
1056
+
1057
+ #### First-Task Check with Grok
1058
+
1059
+ Prefer `poetic run` for straightforward single-provider execution. Use
1060
+ `poetic compete` when you want judge scores/rationale or multi-variant
1061
+ comparison. Claude and Codex are primary validated providers; Grok is a
1062
+ supported validated alternative.
1063
+
1064
+ ```bash
1065
+ poetic provider setup --providers grok
1066
+ grok login --device-auth
1067
+ # or: grok login / grok
1068
+ poetic provider list
1069
+
1070
+ git checkout -b run/my-task
1071
+ # Preferred default: straightforward single-provider execution
1072
+ poetic run "Create a small marker file"
1073
+ # Delivery caveat: changes may stay in a worktree or patch under .poetic/
1074
+
1075
+ # Graded evaluation (AI judge default — omit --judge ai)
1076
+ poetic compete "Create a small marker file" --variant grok:conservative
1077
+ git checkout -b fix/my-task
1078
+ poetic compete apply <competition-id>
1079
+ git status
1080
+ ```
1081
+
1082
+ If `poetic provider list` reports Grok auth as unknown, that is expected when
1083
+ Poetic can see the binary but cannot verify a usable CLI auth cache without an
1084
+ active probe. Complete cached CLI login for local use, or set optional
1085
+ `XAI_API_KEY` for non-interactive/CI runs. Set
1086
+ `POETIC_GROK_ALLOW_BROWSER_AUTH=1` only when you deliberately accept active Grok
1087
+ CLI auth probes that may open a browser (opt-in; not automatically safe in
1088
+ headless/CI).
1089
+
1090
+ If `poetic run` succeeds but your repository root is unchanged, inspect the
1091
+ printed worktree and/or patch paths (default isolation). If you used
1092
+ `poetic compete` and stopped after the `run/*` execution branch, note the
1093
+ competition ID, create a `fix/*`, `docs/*`, or `test/*` branch, and run
1094
+ `poetic compete apply <competition-id>`.
1095
+
1096
+ For validation-only checks from `main`, use:
1097
+
1098
+ ```bash
1099
+ poetic compete --validation-run "Validate first-task provider readiness" \
1100
+ --variant grok:conservative
1101
+ ```
1102
+
1103
+ That creates a disposable `validation/<date>-<slug>` branch. Do not use that
1104
+ branch as the product apply target; move real fixes to a focused delivery
1105
+ branch first.
1106
+
1107
+ ### Claude Issues
1108
+
1109
+ > **Info: Authentication at Runtime**
1110
+ >
1111
+ > Provider execution defers authentication to the Claude CLI. Auth errors surface at
1112
+ > execution time with actionable guidance. Use `poetic provider list` for readiness verification.
1113
+ > The manual verification commands below are useful for deeper troubleshooting.
1114
+
1115
+ #### Authentication Problems
1116
+
1117
+ **Symptoms**:
1118
+ - `Authentication failed` errors
1119
+ - CLI reports not authenticated
1120
+ - Tasks fail immediately
1121
+
1122
+ **Diagnosis**:
1123
+ ```bash
1124
+ # Verify CLI installation
1125
+ which claude
1126
+ claude --version
1127
+ ```
1128
+
1129
+ **Solutions**:
1130
+ ```bash
1131
+ # 1. Re-authenticate via Claude CLI
1132
+ claude auth logout
1133
+ claude auth login
1134
+
1135
+ # 2. Test with simple task
1136
+ poetic run "Create hello.js" --engine claude
1137
+ ```
1138
+
1139
+ #### Rate Limits
1140
+
1141
+ **Symptoms**:
1142
+ - `Rate limit exceeded` errors
1143
+ - Tasks fail after working initially
1144
+ - 429 HTTP status codes
1145
+
1146
+ **Solutions**:
1147
+ ```bash
1148
+ # 1. Wait for rate limit reset (usually 60 seconds)
1149
+ sleep 60
1150
+
1151
+ # 2. Upgrade Anthropic plan for higher limits
1152
+ # Visit: https://console.anthropic.com/
1153
+
1154
+ # 4. Use different provider temporarily
1155
+ poetic run "task" --engine gemini
1156
+ ```
1157
+
1158
+
1159
+
1160
+ ### Gemini Issues
1161
+
1162
+ > **Info: Authentication at Runtime**
1163
+ >
1164
+ > Provider execution defers authentication to the Gemini CLI. Auth errors surface at
1165
+ > execution time with actionable guidance. Use `poetic provider list` for readiness verification.
1166
+ > The manual verification commands below are useful for deeper troubleshooting.
1167
+
1168
+ #### Auth Flow Problems
1169
+
1170
+ **Symptoms**:
1171
+ - `GEMINI_API_KEY not found` errors
1172
+ - Authentication failures
1173
+ - Model not available errors
1174
+
1175
+ **Diagnosis**:
1176
+ ```bash
1177
+ # Check API key format
1178
+ echo $GEMINI_API_KEY | head -c 10
1179
+ # Should start with "AIza"
1180
+
1181
+ # Test API key
1182
+ curl -H "Authorization: Bearer $GEMINI_API_KEY" \
1183
+ "https://generativelanguage.googleapis.com/v1/models"
1184
+ ```
1185
+
1186
+ **Solutions**:
1187
+ ```bash
1188
+ # 1. Get API key from Google AI Studio
1189
+ # https://aistudio.google.com/
1190
+
1191
+ # 2. Set environment variable
1192
+ export GEMINI_API_KEY='AIza...'
1193
+
1194
+ # 3. Test with simple request
1195
+ poetic run "test" --engine gemini --model gemini-2.5-flash
1196
+
1197
+ # 4. Check quotas in Google AI Studio
1198
+ ```
1199
+
1200
+ #### Model Availability
1201
+
1202
+ **Symptoms**:
1203
+ - `Model not available` errors
1204
+ - `Invalid model` messages
1205
+ - Tasks fail with model-specific errors
1206
+
1207
+ **Solutions**:
1208
+ ```bash
1209
+ # 1. Use supported models only
1210
+ poetic run "task" --model gemini-2.5-flash
1211
+ poetic run "task" --model gemini-2.5-pro
1212
+
1213
+ # 2. Check model availability
1214
+ poetic providers --json
1215
+
1216
+ # 3. Use auto-detection
1217
+ poetic run "task" --engine gemini
1218
+ ```
1219
+
1220
+ #### Legacy command syntax errors
1221
+
1222
+ **Symptoms**:
1223
+ - `bash: gemini: command not found: code`
1224
+ - Shell prints `no matches found: --allowed-tools=[]`
1225
+ - Command succeeds manually but fails when invoked by Poetic
1226
+
1227
+ **Diagnosis**:
1228
+ ```bash
1229
+ # Compare against Poetic's invocation
1230
+ poetic --verbose run "Say hello" --engine gemini
1231
+
1232
+ # Reproduce directly
1233
+ gemini --output-format json --model gemini-2.5-flash "Say hello"
1234
+ ```
1235
+
1236
+ **Solutions**:
1237
+ ```bash
1238
+ # 1. Drop removed flags and the legacy subcommand (v0.8+)
1239
+ gemini --output-format json --model gemini-2.5-flash "prompt"
1240
+
1241
+ # 2. Quote brackets if you must pass arrays (advanced usage only)
1242
+ gemini --output-format json --model gemini-2.5-flash --allowed-tools '[]' "prompt"
1243
+
1244
+ # 3. Prefer Poetic defaults unless a flag is officially documented
1245
+ ```
1246
+
1247
+ #### Gemini CLI stderr handling
1248
+
1249
+ **Symptoms**:
1250
+ - Poetic reports `Loaded cached credentials.` as an error
1251
+ - CLI exits with code 1 when run from Poetic but succeeds directly
1252
+ - Retry loop runs 15 times without additional diagnostics
1253
+
1254
+ **Diagnosis**:
1255
+ ```bash
1256
+ # Run with verbose logging to capture the exact command
1257
+ POETIC_DEBUG=1 poetic run "test" --engine gemini --verbose
1258
+
1259
+ # Check exit code from manual invocation
1260
+ gemini --output-format json --model gemini-2.5-flash "test"
1261
+ echo $? # Should be 0 on success
1262
+ ```
1263
+
1264
+ **Solutions**:
1265
+ ```bash
1266
+ # 1. Trust the exit code, not stderr noise
1267
+ # (Poetic filters the message internally; treat exitCode===0 as success)
1268
+
1269
+ # 2. Failures that look like retries: inspect verbose process I/O
1270
+ # (there is no live --max-retries CLI flag on poetic run)
1271
+ POETIC_DEBUG=1 poetic run "task" --engine gemini --verbose
1272
+
1273
+ # 3. Confirm the provider CLI succeeds outside Poetic
1274
+ gemini --output-format json --model gemini-2.5-flash "test"
1275
+ echo $?
1276
+
1277
+ # 4. See docs/GEMINI_BEST_PRACTICES.md § CLI Invocation Requirements for context
1278
+ ```
1279
+
1280
+ ### Cursor Issues
1281
+
1282
+ #### Agent Selection Problems
1283
+
1284
+ **Symptoms**:
1285
+ - Wrong agent selected for task
1286
+ - Poor task execution quality
1287
+ - Inconsistent results
1288
+
1289
+ **Diagnosis**:
1290
+ ```bash
1291
+ # Agent selection is provider-native; there is no live --explain-agents flag.
1292
+ # Check run output for agent labels when present, then routing status:
1293
+ poetic routing status
1294
+ poetic routing status --provider cursor
1295
+
1296
+ # After competitions, inspect recorded outcomes:
1297
+ poetic compete results <task-id>
1298
+ ```
1299
+
1300
+ **Solutions**:
1301
+ ```bash
1302
+ # 1. Pin provider/model when automatic selection is a poor fit
1303
+ poetic run "task" --engine cursor --model auto
1304
+
1305
+ # 2. Check agent/provider performance telemetry
1306
+ poetic telemetry leaderboard
1307
+ ```
1308
+
1309
+ #### Workspace Issues
1310
+
1311
+ **Symptoms**:
1312
+ - `Workspace not found` errors
1313
+ - File not found errors
1314
+ - Context not loaded properly
1315
+
1316
+ **Solutions**:
1317
+ ```bash
1318
+ # 1. Run from project root
1319
+ cd /path/to/your/project
1320
+ poetic run "task"
1321
+
1322
+ # 2. Check workspace structure
1323
+ ls -la
1324
+ ls -la .poetic/
1325
+
1326
+ # 3. Initialize if needed
1327
+ poetic init
1328
+ ```
1329
+
1330
+ ### Codex Issues
1331
+
1332
+ #### Local Result Recovery
1333
+
1334
+ Codex runs locally in the selected workspace or isolated worktree. There is no
1335
+ Codex cloud task to poll or apply.
1336
+
1337
+ ```bash
1338
+ # Confirm CLI availability and authentication
1339
+ poetic doctor --provider codex
1340
+
1341
+ # Inspect durable local delivery after a timeout or interrupted process
1342
+ git status
1343
+ git diff
1344
+ git log --oneline --max-count=10
1345
+ ```
1346
+
1347
+ For competition runs, inspect the retained variant branch/worktree reported by
1348
+ Poetic. Codex executors respect `--executor-timeout-minutes`; `--timeout`
1349
+ controls the overall competition deadline. Do not use `codex apply` recovery
1350
+ instructions from historical run records.
1351
+
1352
+ ---
1353
+
1354
+ ## Installation & Setup Problems
1355
+
1356
+ ### Node.js Version Issues
1357
+
1358
+ #### Unsupported Version
1359
+
1360
+ **Error**: `Unsupported Node.js version` or `Module not found`
1361
+
1362
+ **Diagnosis**:
1363
+ ```bash
1364
+ # Check current version
1365
+ node --version
1366
+ # Requires: Node.js 24.x (see .nvmrc)
1367
+
1368
+ # Check npm version
1369
+ npm --version
1370
+ ```
1371
+
1372
+ **Solutions**:
1373
+ ```bash
1374
+ # 1. Install Node.js LTS (using nvm)
1375
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
1376
+ source ~/.bashrc
1377
+ nvm install 24
1378
+ nvm use 24
1379
+
1380
+ # Rebuild native dependencies (better-sqlite3)
1381
+ npm rebuild better-sqlite3
1382
+
1383
+ # 2. Verify installation
1384
+ node --version
1385
+ npm --version
1386
+
1387
+ # 3. Clear npm cache
1388
+ npm cache clean --force
1389
+
1390
+ # 4. Reinstall dependencies
1391
+ rm -rf node_modules package-lock.json
1392
+ npm install
1393
+ ```
1394
+
1395
+ #### Version Conflicts
1396
+
1397
+ **Error**: `Module version mismatch` or `Incompatible versions`
1398
+
1399
+ **Solutions**:
1400
+ ```bash
1401
+ # 1. Use Node.js 24 (the version Poetic is built and tested against)
1402
+ nvm install 24
1403
+ nvm use 24
1404
+
1405
+ # 2. Clear all caches
1406
+ npm cache clean --force
1407
+ rm -rf node_modules package-lock.json
1408
+
1409
+ # 3. Reinstall with exact versions
1410
+ npm install
1411
+
1412
+ # 4. Verify compatibility
1413
+ npm ls
1414
+ ```
1415
+
1416
+ #### Replicate the Node 24 Fix on Another Computer
1417
+
1418
+ Pulling the repository propagates the runtime guards, installer, launcher generator,
1419
+ workflow checks, and documentation. It does not change that computer's shell `PATH`,
1420
+ installed Node executable, native modules, or generated `poetic` launcher.
1421
+
1422
+ On every development computer:
1423
+
1424
+ ```bash
1425
+ git pull
1426
+ nvm install 24
1427
+ nvm use 24
1428
+ node --version
1429
+ node -p 'process.versions.modules'
1430
+ npm ci
1431
+ npm rebuild better-sqlite3
1432
+ ./scripts/build-poetic.sh
1433
+ poetic doctor --json
1434
+ poetic provider list --json
1435
+ ```
1436
+
1437
+ `./scripts/build-poetic.sh` installs a launcher pinned to the verified Node 24
1438
+ executable into `~/.local/bin` (override with `POETIC_BIN_DIR`) and puts that
1439
+ executable first in child `PATH`. An existing launcher the script did not
1440
+ generate is left in place, so a hand-maintained wrapper is never overwritten.
1441
+ If Node 24 is moved or reinstalled, rerun the build. Package installations should
1442
+ be refreshed with `bash install.sh --force` for the same reason.
1443
+
1444
+ For a temporary override, point the launcher at another Node 24 executable:
1445
+
1446
+ ```bash
1447
+ POETIC_NODE_BIN=/path/to/node poetic doctor --json
1448
+ ```
1449
+
1450
+ The launcher validates that override on every invocation and rejects non-Node-24
1451
+ executables. Set it in the service or editor environment as well when those
1452
+ processes do not inherit the interactive shell's `PATH`.
1453
+
1454
+ Claude readiness is the native Claude CLI (`poetic provider list` /
1455
+ `poetic doctor`), not a Poetic Claude Code plugin. Pre-1.42 installs that
1456
+ still have a leftover plugin registration can remove it with
1457
+ `poetic provider disconnect claude --scope user|project|local`. That cleanup does
1458
+ not sign out, revoke credentials, or disable Claude. Project and local scopes
1459
+ must be cleaned from each affected repository.
1460
+
1461
+ For Homebrew without `nvm`, put `/opt/homebrew/opt/node@24/bin` before other Node
1462
+ locations in the shell startup file, reopen the shell, then run the rebuild and
1463
+ verification commands above. Shell profile edits and generated launchers are
1464
+ machine-local and must be repeated on each computer.
1465
+
1466
+ ### npm Install Failures
1467
+
1468
+ #### Network Issues
1469
+
1470
+ **Error**: `npm ERR! network timeout` or `npm ERR! fetch failed`
1471
+
1472
+ **Solutions**:
1473
+ ```bash
1474
+ # 1. Check internet connection
1475
+ ping google.com
1476
+
1477
+ # 2. Clear npm cache
1478
+ npm cache clean --force
1479
+
1480
+ # 3. Use different registry
1481
+ npm config set registry https://registry.npmjs.org/
1482
+
1483
+ # 4. Increase timeout
1484
+ npm config set timeout 300000
1485
+
1486
+ # 5. Retry installation
1487
+ npm install
1488
+ ```
1489
+
1490
+ #### Permission Issues
1491
+
1492
+ **Error**: `npm ERR! EACCES: permission denied` or `npm ERR! EPERM`
1493
+
1494
+ **Solutions**:
1495
+ ```bash
1496
+ # 1. Fix npm permissions (recommended)
1497
+ mkdir ~/.npm-global
1498
+ npm config set prefix '~/.npm-global'
1499
+ echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
1500
+ source ~/.bashrc
1501
+
1502
+ # 2. Or use sudo (not recommended)
1503
+ sudo npm install -g @anthropic-ai/claude-code
1504
+
1505
+ # 3. Or use nvm with Node 24 (best practice)
1506
+ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
1507
+ source ~/.bashrc
1508
+ nvm install 24
1509
+ nvm use 24
1510
+ ```
1511
+
1512
+ #### Dependency Conflicts
1513
+
1514
+ **Error**: `npm ERR! peer dep missing` or `npm ERR! conflict`
1515
+
1516
+ **Solutions**:
1517
+ ```bash
1518
+ # 1. Check for conflicts
1519
+ npm ls
1520
+
1521
+ # 2. Install missing peer dependencies
1522
+ npm install --save-dev <missing-package>
1523
+
1524
+ # 3. Use --force to override conflicts
1525
+ npm install --force
1526
+
1527
+ # 4. Or use --legacy-peer-deps
1528
+ npm install --legacy-peer-deps
1529
+ ```
1530
+
1531
+ ### CLI Installation Verification
1532
+
1533
+ #### Claude CLI
1534
+
1535
+ **Verification**:
1536
+ ```bash
1537
+ # Check installation
1538
+ which claude
1539
+ claude --version
1540
+
1541
+ # Test execution
1542
+ claude run "Create hello.js"
1543
+ ```
1544
+
1545
+ **Common Issues**:
1546
+ - Not in PATH
1547
+ - Wrong version installed
1548
+ - Authentication not configured
1549
+
1550
+ #### Codex CLI
1551
+
1552
+ **Verification**:
1553
+ ```bash
1554
+ # Check installation
1555
+ which codex
1556
+ codex --version
1557
+
1558
+ # Test authentication
1559
+ codex login
1560
+
1561
+ # Verify via Poetic
1562
+ poetic doctor --provider codex
1563
+ ```
1564
+
1565
+ **Common Issues**:
1566
+ - Not in PATH
1567
+ - Wrong package name
1568
+ - Authentication not configured
1569
+
1570
+ #### Cursor CLI
1571
+
1572
+ **Verification**:
1573
+ ```bash
1574
+ # Check installation
1575
+ which cursor-agent
1576
+ cursor-agent --version
1577
+ ```
1578
+
1579
+ **Common Issues**:
1580
+ - Not in PATH
1581
+ - Wrong package name
1582
+ - Authentication not configured
1583
+
1584
+ ### Configuration File Errors
1585
+
1586
+ #### Invalid JSONC
1587
+
1588
+ **Error**: `JSONC parse error`, `SyntaxError: Unexpected token`, or `Invalid JSON`
1589
+
1590
+ **Diagnosis**:
1591
+ ```bash
1592
+ # JSONC is JSON with comments and trailing commas.
1593
+ # Validate config with Poetic's JSONC-aware parser.
1594
+ poetic config validate
1595
+ poetic config diagnose
1596
+ ```
1597
+
1598
+ **Solutions**:
1599
+ ```bash
1600
+ # Repair fixable validation issues first
1601
+ poetic config validate --fix
1602
+ ```
1603
+
1604
+ If the file remains unparseable, follow [Configuration Corruption](#configuration-corruption).
1605
+ That procedure preserves the original project configuration before regenerating it.
1606
+
1607
+ #### Missing Configuration
1608
+
1609
+ **Error**: `Configuration not found` or `Config file missing`
1610
+
1611
+ **Solutions**:
1612
+ ```bash
1613
+ # 1. Initialize configuration
1614
+ poetic init
1615
+
1616
+ # 2. Check if .poetic directory exists
1617
+ ls -la .poetic/
1618
+
1619
+ # 3. Create manually if needed
1620
+ mkdir -p .poetic/config
1621
+ touch .poetic/config/poetic.config.jsonc
1622
+ ```
1623
+
1624
+ #### Permission Issues
1625
+
1626
+ **Error**: `EACCES: permission denied` or `Cannot write to config`
1627
+
1628
+ **Solutions**:
1629
+ ```bash
1630
+ # 1. Fix directory permissions
1631
+ chmod 755 .poetic/
1632
+ chmod 644 .poetic/config/poetic.config.jsonc
1633
+
1634
+ # 2. Check ownership
1635
+ ls -la .poetic/
1636
+
1637
+ # 3. Fix ownership if needed
1638
+ sudo chown -R $USER:$USER .poetic/
1639
+ ```
1640
+
1641
+ ---
1642
+
1643
+ ## Debugging Tips
1644
+
1645
+ ### Using --verbose Flag
1646
+
1647
+ **Enable detailed logging**:
1648
+ ```bash
1649
+ # Basic verbose mode
1650
+ poetic run "task" --verbose
1651
+
1652
+ # Verbose with specific provider
1653
+ poetic run "task" --engine claude --verbose
1654
+
1655
+ # Verbose with parallel execution
1656
+ poetic run "task" --fan-out 2 --verbose
1657
+ ```
1658
+
1659
+ **What verbose mode shows**:
1660
+ - Provider selection reasoning
1661
+ - API request/response details
1662
+ - File operations and git commands
1663
+ - Error stack traces
1664
+ - Performance metrics
1665
+
1666
+ ### Checking Telemetry Logs
1667
+
1668
+ **View execution logs**:
1669
+ ```bash
1670
+ # List log files (durable JSONL, organized by month)
1671
+ ls -la .poetic/telemetry/logs/
1672
+
1673
+ # Follow today's events
1674
+ tail -f .poetic/telemetry/logs/<YYYY-MM>/<YYYY-MM-DD>.jsonl
1675
+
1676
+ # Search for errors
1677
+ grep -i error .poetic/telemetry/logs/*/*.jsonl
1678
+
1679
+ # View a specific day's events
1680
+ cat .poetic/telemetry/logs/<YYYY-MM>/<YYYY-MM-DD>.jsonl | jq .
1681
+ ```
1682
+
1683
+ **Log file locations**:
1684
+ - `.poetic/telemetry/logs/<YYYY-MM>/<YYYY-MM-DD>.jsonl` - Durable execution event logs
1685
+ - `.poetic/telemetry/db/` - SQLite databases (`variants.db`, `validations.db`)
1686
+ - `.poetic/telemetry/artifacts/` - Per-run generated files and artifacts
1687
+
1688
+ ### Reviewing PR Comments
1689
+
1690
+ **For ordinary PR review or historical cloud-record recovery**:
1691
+ ```bash
1692
+ # List recent PRs
1693
+ gh pr list --limit 10
1694
+
1695
+ # View specific PR
1696
+ gh pr view <PR_NUMBER>
1697
+
1698
+ # Check for bot comments
1699
+ gh pr view <PR_NUMBER> --json comments \
1700
+ --jq '.comments[] | select(.author.login | contains("bot"))'
1701
+
1702
+ # View PR diff
1703
+ gh pr diff <PR_NUMBER>
1704
+ ```
1705
+
1706
+ **Common bot comment patterns** (including historical cloud records):
1707
+ - `chatgpt-codex-connector` - Codex bot (historical cloud comments)
1708
+ - `cursor-agent` - Cursor bot (historical cloud comments)
1709
+ - Look for `Summary:` sections
1710
+ - Extract historical task IDs from comments when recovering old records
1711
+
1712
+ ### Using Evaluation Scripts
1713
+
1714
+ **Check if evaluation scripts exist**:
1715
+ ```bash
1716
+ # Look for evaluation scripts
1717
+ find . -name "*evaluate*" -type f
1718
+ find . -name "*evaluation*" -type f
1719
+
1720
+ # Check scripts directory
1721
+ ls -la scripts/
1722
+
1723
+ # Run evaluation if available
1724
+ ./scripts/evaluate-agent.sh <TASK_ID> <PROVIDER>
1725
+ ```
1726
+
1727
+ **Manual evaluation process**:
1728
+ ```bash
1729
+ # 1. Find agent's implementation commit
1730
+ git log --author="Cursor Agent" --grep="feat:\|Implement\|Refactor" --oneline
1731
+
1732
+ # 2. Show actual changes
1733
+ git show <commit_hash> --stat
1734
+
1735
+ # 3. Check if merged to main
1736
+ git branch --contains <commit_hash> | grep main
1737
+
1738
+ # 4. For Codex and other local providers, inspect the variant branch
1739
+ git log <variant_branch> --oneline --max-count=10
1740
+ git diff main...<variant_branch>
1741
+ ```
1742
+
1743
+ ### System Resource Monitoring
1744
+
1745
+ **Check system resources**:
1746
+ ```bash
1747
+ # Memory usage
1748
+ free -h
1749
+ htop
1750
+
1751
+ # Disk space
1752
+ df -h
1753
+
1754
+ # CPU usage
1755
+ top
1756
+ htop
1757
+
1758
+ # Network connectivity
1759
+ ping google.com
1760
+ curl -I https://api.anthropic.com
1761
+ ```
1762
+
1763
+ **Common resource issues**:
1764
+ - Low memory (causes crashes)
1765
+ - Full disk (prevents file operations)
1766
+ - High CPU usage (causes timeouts)
1767
+ - Network issues (causes API failures)
1768
+
1769
+ ### Provider-Specific Debugging
1770
+
1771
+ #### Claude Debugging
1772
+
1773
+ ```bash
1774
+ # Test with simple request
1775
+ claude run "Create hello.js"
1776
+
1777
+ # Check logs
1778
+ claude logs
1779
+
1780
+ # Verify API key (only for direct HTTP debugging; Poetic uses Claude CLI auth by default)
1781
+ curl -H "Authorization: Bearer $ANTHROPIC_API_KEY" \
1782
+ "https://api.anthropic.com/v1/messages" \
1783
+ -d '{"model":"claude-3-sonnet-20240229","max_tokens":10,"messages":[{"role":"user","content":"test"}]}'
1784
+ ```
1785
+
1786
+ #### Gemini Debugging
1787
+
1788
+ ```bash
1789
+ # Test API key
1790
+ curl -H "Authorization: Bearer $GEMINI_API_KEY" \
1791
+ "https://generativelanguage.googleapis.com/v1/models"
1792
+
1793
+ # Check quotas
1794
+ curl -H "Authorization: Bearer $GEMINI_API_KEY" \
1795
+ "https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash"
1796
+
1797
+ # Test with simple request
1798
+ poetic run "test" --engine gemini --model gemini-2.5-flash
1799
+ ```
1800
+
1801
+ #### Cursor Debugging
1802
+
1803
+ ```bash
1804
+ # Verify Poetic can find Cursor Agent
1805
+ poetic doctor --provider cursor
1806
+
1807
+ # If you installed Cursor Agent somewhere non-standard, override the binary:
1808
+ export CURSOR_CLI_COMMAND=/path/to/cursor-agent
1809
+ ```
1810
+
1811
+ #### Grok Debugging
1812
+
1813
+ ```bash
1814
+ # Verify Poetic can find Grok and evaluate passive readiness
1815
+ poetic doctor --provider grok
1816
+
1817
+ # Local primary path: confirm CLI login / auth cache exists
1818
+ test -f "${HOME}/.grok/auth.json" && echo "Grok CLI auth cache present"
1819
+
1820
+ # Optional CI/headless path: confirm the official key is present without printing it
1821
+ test -n "$XAI_API_KEY" && echo "XAI_API_KEY is set"
1822
+ # Deprecated compatibility alias (still accepted):
1823
+ # test -n "$GROK_CODE_XAI_API_KEY" && echo "GROK_CODE_XAI_API_KEY is set"
1824
+ ```
1825
+
1826
+ #### Codex Debugging
1827
+
1828
+ ```bash
1829
+ # Verify Poetic can find Codex CLI + your login state
1830
+ poetic doctor --provider codex
1831
+
1832
+ # Inspect local delivery
1833
+ git status
1834
+ git diff
1835
+ git log --oneline --max-count=10
1836
+ ```
1837
+
1838
+ ---
1839
+
1840
+ ## Advanced Troubleshooting
1841
+
1842
+ ### Memory Guardian Issues
1843
+
1844
+ **Symptoms**:
1845
+ - `Memory: XX% heap` warnings
1846
+ - Process kills due to memory pressure
1847
+ - Performance degradation
1848
+
1849
+ **Diagnosis**:
1850
+ ```bash
1851
+ # Check memory usage
1852
+ poetic run "task" --verbose
1853
+ # Look for: "Memory: XX% heap"
1854
+
1855
+ # Check memory guardian logs
1856
+ grep -i "memory" .poetic/telemetry/logs/*/*.jsonl
1857
+ ```
1858
+
1859
+ **Solutions**:
1860
+ ```bash
1861
+ # 1. Reduce parallel execution
1862
+ poetic run "task" --fan-out 2 --max-concurrent 2
1863
+
1864
+ # 2. Configure guardian behavior
1865
+ export POETIC_MEMORY_KILL=0 # Log-only
1866
+ export POETIC_MEMORY_KILL=1 # Aggressive kills
1867
+ export POETIC_RSS_LIMIT_MB=2048 # RSS cap (MB)
1868
+ export POETIC_RSS_LIMIT_PCT=75 # RSS cap (% of total RAM; ignored if POETIC_RSS_LIMIT_MB is set)
1869
+
1870
+ # 3. Disable memory guardian (development only)
1871
+ export POETIC_MEMORY_GUARD=0
1872
+
1873
+ # 4. Increase Node.js memory limit
1874
+ node --max-old-space-size=4096 poetic.js run "task"
1875
+
1876
+ # 5. Use faster model
1877
+ poetic run "task" --model gemini-2.5-flash
1878
+ ```
1879
+
1880
+ #### Memory Guardian Stress Harness
1881
+
1882
+ Use the stress harness to reproduce memory pressure locally or during scheduled health checks:
1883
+
1884
+ ```bash
1885
+ # Developer workstation
1886
+ npm run test:stress
1887
+
1888
+ # CI / cron job (uses gentler thresholds)
1889
+ npm run ci:stress
1890
+ ```
1891
+
1892
+ The script streams heap usage as it allocates memory and exits automatically when the guardian intervenes or the target threshold is reached. Capture the console output when reporting memory regressions.
1893
+
1894
+ ### Recursion Detection Issues
1895
+
1896
+ **Symptoms**:
1897
+ - `Recursion depth exceeded` errors
1898
+ - Infinite loops in parallel execution
1899
+ - Process hangs
1900
+
1901
+ **Diagnosis**:
1902
+ ```bash
1903
+ # Check recursion depth
1904
+ echo $POETIC_MAX_RECURSION_DEPTH
1905
+
1906
+ # Look for recursion warnings
1907
+ grep -i "recursion" .poetic/telemetry/logs/*/*.jsonl
1908
+ ```
1909
+
1910
+ **Solutions**:
1911
+ ```bash
1912
+ # 1. Increase recursion limit (careful!)
1913
+ export POETIC_MAX_RECURSION_DEPTH=3
1914
+
1915
+ # 2. Use sequential execution
1916
+ poetic run "task" --fan-out 1
1917
+
1918
+ # 3. Check for recursive calls
1919
+ grep -r "poetic run" .poetic/
1920
+ ```
1921
+
1922
+ ### Git Lock Issues
1923
+
1924
+ **Symptoms**:
1925
+ - `fatal: Unable to create '.../index.lock'` errors
1926
+ - Git operations fail
1927
+ - Parallel execution conflicts
1928
+
1929
+ **Diagnosis**:
1930
+ ```bash
1931
+ # Resolve the lock for this checkout, including linked worktrees
1932
+ git_dir="$(git rev-parse --path-format=absolute --git-dir)"
1933
+ lock_path="$git_dir/index.lock"
1934
+ ls -l "$lock_path"
1935
+
1936
+ # Check for active Git operations
1937
+ ps -axo pid=,command= | grep '[g]it'
1938
+ ```
1939
+
1940
+ Do not move the lock while any Git process is active. If no Git process is active and the
1941
+ lock is older than the failed operation, quarantine only that exact lock, then verify the
1942
+ worktree:
1943
+
1944
+ ```bash
1945
+ mv "$lock_path" "${lock_path}.stale.$(date +%Y%m%dT%H%M%S)"
1946
+ git status
1947
+ ```
1948
+
1949
+ Poetic automatically removes only a stale `index.lock`, and it refuses recovery when any
1950
+ Git process is live. Moving the lock aside preserves it for inspection and avoids changing
1951
+ tracked or untracked work.
1952
+
1953
+ ### Provider Rate Limiting
1954
+
1955
+ **Symptoms**:
1956
+ - `Rate limit exceeded` errors
1957
+ - 429 HTTP status codes
1958
+ - Tasks fail after working initially
1959
+
1960
+ **Solutions**:
1961
+ ```bash
1962
+ # 1. Wait for rate limit reset
1963
+ sleep 60
1964
+
1965
+ # 2. Use different provider
1966
+ poetic run "task" --engine gemini
1967
+
1968
+ # 3. Reduce concurrency
1969
+ poetic run "task" --fan-out 1
1970
+
1971
+ # 4. Check provider quotas
1972
+ # Claude: https://console.anthropic.com/
1973
+ # Gemini: https://aistudio.google.com/
1974
+ # Cursor: https://cursor.sh/settings
1975
+ ```
1976
+
1977
+ ### Network Connectivity Issues
1978
+
1979
+ **Symptoms**:
1980
+ - `Network timeout` errors
1981
+ - `Connection refused` errors
1982
+ - API requests fail
1983
+
1984
+ **Diagnosis**:
1985
+ ```bash
1986
+ # Test basic connectivity
1987
+ ping google.com
1988
+
1989
+ # Test provider APIs
1990
+ curl -I https://api.anthropic.com
1991
+ curl -I https://generativelanguage.googleapis.com
1992
+ curl -I https://api.cursor.sh
1993
+
1994
+ # Check DNS resolution
1995
+ nslookup api.anthropic.com
1996
+ ```
1997
+
1998
+ **Solutions**:
1999
+ ```bash
2000
+ # 1. Check internet connection
2001
+ ping google.com
2002
+
2003
+ # 2. Check DNS settings
2004
+ cat /etc/resolv.conf
2005
+
2006
+ # 3. Use different DNS
2007
+ echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
2008
+
2009
+ # 4. Check firewall settings
2010
+ sudo ufw status
2011
+
2012
+ # 5. Use proxy if needed
2013
+ export HTTP_PROXY=http://proxy:port
2014
+ export HTTPS_PROXY=http://proxy:port
2015
+ ```
2016
+
2017
+ ### Configuration Corruption
2018
+
2019
+ **Symptoms**:
2020
+ - `Invalid configuration` errors
2021
+ - Unexpected behavior
2022
+ - Settings not applied
2023
+
2024
+ **Diagnosis**:
2025
+ ```bash
2026
+ poetic config validate
2027
+ poetic config diagnose
2028
+ ```
2029
+
2030
+ First try the parser-aware repair:
2031
+
2032
+ ```bash
2033
+ poetic config validate --fix
2034
+ poetic config validate
2035
+ ```
2036
+
2037
+ If the project configuration is still unparseable, stop active Poetic runs and copy that
2038
+ exact file to a location outside the repository before resetting it:
2039
+
2040
+ ```bash
2041
+ cp .poetic/config/poetic.config.jsonc /path/outside/repo/poetic.config.jsonc.saved
2042
+ poetic config reset --level project --backup
2043
+ poetic init --force
2044
+ poetic config validate
2045
+ ```
2046
+
2047
+ `poetic config reset --backup` prints the name of a `poetic-config-backup-<timestamp>.json`
2048
+ file created in the current directory. Move that exact printed file outside the repository
2049
+ if you need to retain it. Restore individual custom settings only after validation passes.
2050
+
2051
+ ### Telemetry Database Not Initialized
2052
+
2053
+ **Symptoms**:
2054
+ - `poetic compete results` fails with "No evaluation found" or "Database not initialized"
2055
+ - AI Judge evaluation commands fail
2056
+ - SQLite error messages when querying results
2057
+
2058
+ **Cause**:
2059
+ The database may be missing, corrupt, or missing its schema. This can occur after an
2060
+ interrupted write, incomplete restore, or removal of ignored runtime state.
2061
+
2062
+ **Diagnosis**:
2063
+ ```bash
2064
+ poetic doctor --json
2065
+ poetic telemetry-checkpoint --verify --json
2066
+ ```
2067
+
2068
+ `poetic telemetry-checkpoint --repair` reports corruption but does not rebuild the database
2069
+ automatically.
2070
+
2071
+ If the database is missing, initialize it and verify the result:
2072
+
2073
+ ```bash
2074
+ poetic init --db
2075
+ poetic telemetry-checkpoint --verify --json
2076
+ ```
2077
+
2078
+ If the database is corrupt and a Poetic backup exists, inspect the restore before applying
2079
+ it:
2080
+
2081
+ ```bash
2082
+ poetic backup list
2083
+ poetic backup restore --latest --dry-run
2084
+ ```
2085
+
2086
+ After reviewing the dry-run, stop active Poetic, provider, and agent processes, apply the
2087
+ restore, and verify:
2088
+
2089
+ ```bash
2090
+ poetic backup restore --latest --force
2091
+ poetic telemetry-checkpoint --verify --json
2092
+ ```
2093
+
2094
+ If no usable backup exists, stop all Poetic, provider, and agent activity before moving
2095
+ database files. Attempt a database backup first:
2096
+
2097
+ ```bash
2098
+ poetic backup
2099
+ ```
2100
+
2101
+ The backup command uses the external `sqlite3` executable. If it is unavailable or the
2102
+ corruption prevents a backup, copy the database and any SQLite sidecars together to a
2103
+ location outside the repository:
2104
+
2105
+ ```bash
2106
+ mkdir -p /path/outside/repo/poetic-db-saved
2107
+ cp .poetic/telemetry/db/variants.db* /path/outside/repo/poetic-db-saved/
2108
+ ```
2109
+
2110
+ Only after activity has stopped and the snapshot or copy has completed, quarantine the
2111
+ database and any sidecars rather than deleting them:
2112
+
2113
+ ```bash
2114
+ mkdir -p .poetic/telemetry/db/quarantine
2115
+ mv .poetic/telemetry/db/variants.db .poetic/telemetry/db/quarantine/
2116
+ test ! -e .poetic/telemetry/db/variants.db-wal || mv .poetic/telemetry/db/variants.db-wal .poetic/telemetry/db/quarantine/
2117
+ test ! -e .poetic/telemetry/db/variants.db-shm || mv .poetic/telemetry/db/variants.db-shm .poetic/telemetry/db/quarantine/
2118
+ poetic init --db
2119
+ poetic telemetry-checkpoint --verify --json
2120
+ ```
2121
+
2122
+ Keep the quarantined files until you have confirmed that the rebuilt database is usable
2123
+ and decided whether historical telemetry needs recovery.
2124
+
2125
+ **Common causes**:
2126
+ - Force-cleaning ignored files with Git, which can remove the `.poetic/` directory
2127
+ - Insufficient disk space during database creation
2128
+ - File permission issues on `.poetic/` directory
2129
+ - Corrupted SQLite database file (rare)
2130
+
2131
+ ---
2132
+
2133
+ ## Implementation Artifacts (.poetic/implementations/)
2134
+
2135
+ ### "Implementation files missing" Warning
2136
+
2137
+ **Status**: **This is normal and healthy**
2138
+
2139
+ Implementation artifacts are **ephemeral files** created only in variant worktrees during execution (including historical cloud-era runs). The main working directory should NOT contain `.poetic/implementations/*.md` files.
2140
+
2141
+ **Why you're seeing this**:
2142
+ - Empty `.poetic/implementations/` directory - **Normal**
2143
+ - Missing `.poetic/implementations/` directory - **Normal**
2144
+ - Old stale files - **Run `poetic cleanup prune`**
2145
+
2146
+ **What to do**:
2147
+ ```bash
2148
+ # Check artifact status
2149
+ poetic doctor --verbose
2150
+
2151
+ # Clean up governed runtime artifacts
2152
+ poetic cleanup prune
2153
+ poetic cleanup prune --execute
2154
+ ```
2155
+
2156
+ **See also**: Placeholder implementation files are ephemeral worktree artifacts and should not persist in the main working tree.
2157
+
2158
+ ### CLI Load Failures ("Dynamic require" Errors)
2159
+
2160
+ **Error**: `Dynamic require of "fs" is not supported`
2161
+
2162
+ **Cause**: ESM/CommonJS incompatibility in bundled CLI
2163
+
2164
+ **Status**: **Fixed** (as of 2025-11-15)
2165
+
2166
+ **If you still see this error**:
2167
+ ```bash
2168
+ # Rebuild the CLI
2169
+ npm run build
2170
+
2171
+ # Verify ESM compliance
2172
+ npm run check:esm
2173
+
2174
+ # If error persists, report issue with:
2175
+ node --version # Node.js version
2176
+ npm list better-sqlite3 # Module versions
2177
+ ```
2178
+
2179
+ **Make sure you're running the repo-local CLI build**
2180
+
2181
+ ```bash
2182
+ # 1) Inspect every poetic binary on PATH + global installs
2183
+ which -a poetic
2184
+ npm ls -g @poetic-ai/poetic
2185
+
2186
+ # 2) Remove stale global installs (safe to run even if none exist)
2187
+ npm uninstall -g @poetic-ai/poetic || true
2188
+ which -a poetic
2189
+
2190
+ # 3) Always launch competitions via the repo wrapper (rebuilds + logs version/SHA)
2191
+ ./scripts/run-competition-local.sh "Task description" --variant claude:conservative:local
2192
+ ```
2193
+
2194
+ ---
2195
+
2196
+ ## Getting Help
2197
+
2198
+ ### Self-Service Resources
2199
+
2200
+ 1. **Check this guide first** - Most common issues are covered
2201
+ 2. **Use `--verbose` flag** - Get detailed error information
2202
+ 3. **Check telemetry logs** - Review execution history
2203
+ 4. **Test with simple tasks** - Isolate the problem
2204
+
2205
+ ### Community Support
2206
+
2207
+ - **GitHub Issues**: [Report bugs and request features](https://github.com/your-org/poetic/issues)
2208
+ - **Documentation**: [Complete documentation](https://github.com/your-org/poetic/docs)
2209
+ - **Examples**: [Usage examples and patterns](https://github.com/your-org/poetic/examples)
2210
+
2211
+ ### Provider Support
2212
+
2213
+ - **Claude**: [Anthropic Support](https://support.anthropic.com/)
2214
+ - **Gemini**: [Google AI Studio Support](https://aistudio.google.com/)
2215
+ - **Cursor**: [Cursor Support](https://cursor.sh/support)
2216
+ - **Codex**: [Codex Platform Support](https://codex.example.com/support)
2217
+
2218
+ ### Reporting Issues
2219
+
2220
+ When reporting issues, include:
2221
+
2222
+ 1. **Error message** (exact text)
2223
+ 2. **Command used** (with all flags)
2224
+ 3. **Verbose output** (use `--verbose`)
2225
+ 4. **System information** (OS, Node.js version)
2226
+ 5. **Provider status** (authentication, quotas)
2227
+ 6. **Log files** (relevant entries from `.poetic/telemetry/logs/`)
2228
+
2229
+ ---
2230
+
2231
+ **Last Updated**: 2025-10-15 (Session 51 - T626314)
2232
+ **Version**: 0.1.0