issue-flow 0.18.0 → 0.20.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 (235) hide show
  1. package/README.md +43 -97
  2. package/dist/agent-4DHRKZ2Z.js +32 -0
  3. package/dist/{analyze-Q4ONIWRZ.js → analyze-UEJ2R3H5.js} +42 -41
  4. package/dist/analyze-UEJ2R3H5.js.map +1 -0
  5. package/dist/{apply-EEFPY2W4.js → apply-QDYNQMUX.js} +22 -24
  6. package/dist/apply-QDYNQMUX.js.map +1 -0
  7. package/dist/artifacts-AMJQJFFV.js +82 -0
  8. package/dist/artifacts-AMJQJFFV.js.map +1 -0
  9. package/dist/{bench-WWWXLTFH.js → bench-RNRXVEFK.js} +42 -42
  10. package/dist/{chunk-RYOUZ6EK.js → chunk-23VHVVKW.js} +3 -3
  11. package/dist/chunk-2EYLOS5I.js +99 -0
  12. package/dist/chunk-2EYLOS5I.js.map +1 -0
  13. package/dist/{chunk-C5TL7T4V.js → chunk-2YM2VH6R.js} +2 -2
  14. package/dist/{chunk-XUEMATVY.js → chunk-37O2FMAN.js} +28 -25
  15. package/dist/chunk-37O2FMAN.js.map +1 -0
  16. package/dist/chunk-44RF3VFG.js +717 -0
  17. package/dist/chunk-44RF3VFG.js.map +1 -0
  18. package/dist/chunk-6AOZCWN2.js +21 -0
  19. package/dist/chunk-6AOZCWN2.js.map +1 -0
  20. package/dist/chunk-7MJGYPHF.js +1571 -0
  21. package/dist/chunk-7MJGYPHF.js.map +1 -0
  22. package/dist/{chunk-SA6HXL4Y.js → chunk-7WBUEBD5.js} +9 -9
  23. package/dist/chunk-7WBUEBD5.js.map +1 -0
  24. package/dist/chunk-7ZZUSMBJ.js +35 -0
  25. package/dist/chunk-7ZZUSMBJ.js.map +1 -0
  26. package/dist/{chunk-QJ44VG5G.js → chunk-ADH6RJNX.js} +3 -3
  27. package/dist/{chunk-34OCSKOB.js → chunk-AKL5UPR6.js} +159 -114
  28. package/dist/chunk-AKL5UPR6.js.map +1 -0
  29. package/dist/{chunk-7F7LGMVO.js → chunk-BTBJ5UOO.js} +12 -12
  30. package/dist/{chunk-7F7LGMVO.js.map → chunk-BTBJ5UOO.js.map} +1 -1
  31. package/dist/{chunk-HOAHMERN.js → chunk-CLZ6RRZL.js} +21 -21
  32. package/dist/chunk-DBLXLKGU.js +1201 -0
  33. package/dist/chunk-DBLXLKGU.js.map +1 -0
  34. package/dist/{chunk-DUS5ZNKL.js → chunk-DIMDAYZS.js} +7 -6
  35. package/dist/chunk-DZ3DZ3EN.js +278 -0
  36. package/dist/chunk-DZ3DZ3EN.js.map +1 -0
  37. package/dist/{chunk-CRGIQFUQ.js → chunk-E2H3JV2E.js} +3 -1
  38. package/dist/chunk-E2H3JV2E.js.map +1 -0
  39. package/dist/{chunk-45WZ6GMI.js → chunk-EORDSKWZ.js} +17 -17
  40. package/dist/chunk-EORDSKWZ.js.map +1 -0
  41. package/dist/{chunk-LTH6XYZ3.js → chunk-EYKPWHT7.js} +40 -30
  42. package/dist/chunk-EYKPWHT7.js.map +1 -0
  43. package/dist/{chunk-OODXFCQV.js → chunk-FU2FQ4JE.js} +14 -16
  44. package/dist/{chunk-OODXFCQV.js.map → chunk-FU2FQ4JE.js.map} +1 -1
  45. package/dist/{chunk-V7QOIQYC.js → chunk-G442RDFX.js} +9 -23
  46. package/dist/{chunk-V7QOIQYC.js.map → chunk-G442RDFX.js.map} +1 -1
  47. package/dist/{chunk-QPGEFLMY.js → chunk-I64N6RL6.js} +7 -7
  48. package/dist/{chunk-KRAGAUKD.js → chunk-JBYXJOJJ.js} +201 -64
  49. package/dist/chunk-JBYXJOJJ.js.map +1 -0
  50. package/dist/{chunk-SOM4QA6C.js → chunk-JCR5C5A7.js} +93 -18
  51. package/dist/chunk-JCR5C5A7.js.map +1 -0
  52. package/dist/{chunk-RNFUVKC3.js → chunk-K5NM26NV.js} +30 -13
  53. package/dist/chunk-K5NM26NV.js.map +1 -0
  54. package/dist/{chunk-YVPZUN6X.js → chunk-KUA6KBBD.js} +335 -38
  55. package/dist/chunk-KUA6KBBD.js.map +1 -0
  56. package/dist/{chunk-KMCS76ZW.js → chunk-KUL64XUF.js} +44 -12
  57. package/dist/chunk-KUL64XUF.js.map +1 -0
  58. package/dist/{chunk-HAKDLR6N.js → chunk-MAJ6QDRL.js} +65 -78
  59. package/dist/chunk-MAJ6QDRL.js.map +1 -0
  60. package/dist/{chunk-DGRTJD5R.js → chunk-MML2G7IC.js} +7 -7
  61. package/dist/chunk-NP47HRX2.js +136 -0
  62. package/dist/chunk-NP47HRX2.js.map +1 -0
  63. package/dist/{chunk-3R27MJ5R.js → chunk-PFWHHYEO.js} +3 -3
  64. package/dist/{chunk-ECU7YO7S.js → chunk-PM5YWJYO.js} +22 -6
  65. package/dist/chunk-PM5YWJYO.js.map +1 -0
  66. package/dist/{chunk-E4I6MMHD.js → chunk-PXPTIXJF.js} +154 -101
  67. package/dist/chunk-PXPTIXJF.js.map +1 -0
  68. package/dist/{chunk-CWSQVHVV.js → chunk-QJHZ3HYJ.js} +248 -102
  69. package/dist/chunk-QJHZ3HYJ.js.map +1 -0
  70. package/dist/{chunk-LI35PIIS.js → chunk-RDPK7LYK.js} +20 -117
  71. package/dist/chunk-RDPK7LYK.js.map +1 -0
  72. package/dist/{chunk-PMLE7KAQ.js → chunk-RMIBLFG3.js} +30 -14
  73. package/dist/chunk-RMIBLFG3.js.map +1 -0
  74. package/dist/{chunk-62GVVZQO.js → chunk-T736DSZI.js} +32 -316
  75. package/dist/chunk-T736DSZI.js.map +1 -0
  76. package/dist/{chunk-TZYINKCC.js → chunk-UDUUUFQF.js} +57 -29
  77. package/dist/chunk-UDUUUFQF.js.map +1 -0
  78. package/dist/{chunk-NEWNXZ65.js → chunk-V7GETODQ.js} +36 -28
  79. package/dist/{chunk-NEWNXZ65.js.map → chunk-V7GETODQ.js.map} +1 -1
  80. package/dist/{chunk-PPZ3K4YM.js → chunk-VHQMMY2D.js} +2 -2
  81. package/dist/{chunk-ZVZMWNCG.js → chunk-VJ3PF6B7.js} +50 -16
  82. package/dist/chunk-VJ3PF6B7.js.map +1 -0
  83. package/dist/{chunk-L6HSKTQE.js → chunk-W7LZLJAF.js} +4 -4
  84. package/dist/{chunk-6K2LCFG6.js → chunk-WB4FA2EH.js} +70 -81
  85. package/dist/chunk-WB4FA2EH.js.map +1 -0
  86. package/dist/{chunk-LGHND47K.js → chunk-WQSGL5LX.js} +22 -16
  87. package/dist/chunk-WQSGL5LX.js.map +1 -0
  88. package/dist/{chunk-ICM463EO.js → chunk-XNK5UN2D.js} +5 -649
  89. package/dist/chunk-XNK5UN2D.js.map +1 -0
  90. package/dist/{chunk-7UMMFOL2.js → chunk-Y2KOWABB.js} +39 -24
  91. package/dist/chunk-Y2KOWABB.js.map +1 -0
  92. package/dist/{chunk-QF7VEL3M.js → chunk-YC24E66P.js} +568 -158
  93. package/dist/chunk-YC24E66P.js.map +1 -0
  94. package/dist/{chunk-EG2MGDP5.js → chunk-Z6RCKCVB.js} +52 -46
  95. package/dist/chunk-Z6RCKCVB.js.map +1 -0
  96. package/dist/{chunk-YUNBOUQH.js → chunk-ZPGNVBWY.js} +8 -8
  97. package/dist/cli.js +132 -62
  98. package/dist/cli.js.map +1 -1
  99. package/dist/compat-OJG76J4I.js +24 -0
  100. package/dist/{config-LEBZZCJP.js → config-6YTWPDBK.js} +20 -17
  101. package/dist/{contract-JH2WBIO6.js → contract-HWLFFL3F.js} +2 -2
  102. package/dist/{conventions-XOT6YW5L.js → conventions-5UPOTU42.js} +20 -16
  103. package/dist/{conventions-XOT6YW5L.js.map → conventions-5UPOTU42.js.map} +1 -1
  104. package/dist/db-QAZG4LQD.js +264 -0
  105. package/dist/db-QAZG4LQD.js.map +1 -0
  106. package/dist/diagnostics-YEFB42E5.js +25 -0
  107. package/dist/execute-QCT64D37.js +38 -0
  108. package/dist/{generate-JGW5JSKB.js → generate-QATMDKOK.js} +46 -43
  109. package/dist/generate-QATMDKOK.js.map +1 -0
  110. package/dist/{git-A2IP32PQ.js → git-XGOECXWG.js} +2 -3
  111. package/dist/history-NBPUZVGQ.js +101 -0
  112. package/dist/history-NBPUZVGQ.js.map +1 -0
  113. package/dist/init-4LB2YKWP.js +28 -0
  114. package/dist/{operations-O4FORFIH.js → operations-RUQP2Y2F.js} +78 -52
  115. package/dist/operations-RUQP2Y2F.js.map +1 -0
  116. package/dist/{permissions-G4XCAESF.js → permissions-QZPUUBSO.js} +5 -6
  117. package/dist/plan-2NMSHTMD.js +38 -0
  118. package/dist/{policy-U5NBFAO5.js → policy-RKKFF5A2.js} +17 -15
  119. package/dist/{policy-U5NBFAO5.js.map → policy-RKKFF5A2.js.map} +1 -1
  120. package/dist/pr-QKFO5HI3.js +42 -0
  121. package/dist/pr-review-H2BFD6F2.js +33 -0
  122. package/dist/prd-ET6XKYRS.js +37 -0
  123. package/dist/{ps-76L6ZAZL.js → ps-UIKSOUAQ.js} +26 -15
  124. package/dist/ps-UIKSOUAQ.js.map +1 -0
  125. package/dist/{recorder-2BAKPBRA.js → recorder-LOU3PTIE.js} +11 -7
  126. package/dist/registry-HV7M6MAH.js +17 -0
  127. package/dist/repository-RCRR6RDE.js +80 -0
  128. package/dist/resume-BWJZGBLZ.js +278 -0
  129. package/dist/resume-BWJZGBLZ.js.map +1 -0
  130. package/dist/review-2MTZLNSS.js +38 -0
  131. package/dist/routing-RM5ABHHD.js +35 -0
  132. package/dist/run-XMACQBRJ.js +61 -0
  133. package/dist/{session-publisher-KAJQRHNZ.js → session-publisher-Q5TNEZPX.js} +3 -3
  134. package/dist/session-publisher-Q5TNEZPX.js.map +1 -0
  135. package/dist/{state-manager-UPHO2EA2.js → state-manager-SRN4VJSX.js} +9 -4
  136. package/dist/state-manager-SRN4VJSX.js.map +1 -0
  137. package/dist/{usage-KTMYXAPF.js → usage-JOODVE5O.js} +69 -63
  138. package/dist/usage-JOODVE5O.js.map +1 -0
  139. package/dist/web-TLMWJ2BM.js +205 -0
  140. package/dist/web-TLMWJ2BM.js.map +1 -0
  141. package/package.json +22 -8
  142. package/prompts/analyze.md +16 -19
  143. package/prompts/execute.md +73 -144
  144. package/prompts/generate.md +23 -10
  145. package/prompts/plan.md +32 -60
  146. package/prompts/pr-review.md +58 -40
  147. package/prompts/pr.md +50 -16
  148. package/prompts/prd.md +26 -19
  149. package/prompts/review.md +41 -18
  150. package/web/public/app.js +111 -112
  151. package/dist/agent-HMZTXCRT.js +0 -30
  152. package/dist/analyze-Q4ONIWRZ.js.map +0 -1
  153. package/dist/apply-EEFPY2W4.js.map +0 -1
  154. package/dist/chunk-34OCSKOB.js.map +0 -1
  155. package/dist/chunk-45WZ6GMI.js.map +0 -1
  156. package/dist/chunk-62GVVZQO.js.map +0 -1
  157. package/dist/chunk-6K2LCFG6.js.map +0 -1
  158. package/dist/chunk-7UMMFOL2.js.map +0 -1
  159. package/dist/chunk-CRGIQFUQ.js.map +0 -1
  160. package/dist/chunk-CWSQVHVV.js.map +0 -1
  161. package/dist/chunk-E4I6MMHD.js.map +0 -1
  162. package/dist/chunk-ECU7YO7S.js.map +0 -1
  163. package/dist/chunk-EG2MGDP5.js.map +0 -1
  164. package/dist/chunk-HAKDLR6N.js.map +0 -1
  165. package/dist/chunk-ICM463EO.js.map +0 -1
  166. package/dist/chunk-KMCS76ZW.js.map +0 -1
  167. package/dist/chunk-KRAGAUKD.js.map +0 -1
  168. package/dist/chunk-LGHND47K.js.map +0 -1
  169. package/dist/chunk-LI35PIIS.js.map +0 -1
  170. package/dist/chunk-LTH6XYZ3.js.map +0 -1
  171. package/dist/chunk-PMLE7KAQ.js.map +0 -1
  172. package/dist/chunk-QF7VEL3M.js.map +0 -1
  173. package/dist/chunk-RNFUVKC3.js.map +0 -1
  174. package/dist/chunk-SA6HXL4Y.js.map +0 -1
  175. package/dist/chunk-SOM4QA6C.js.map +0 -1
  176. package/dist/chunk-TZYINKCC.js.map +0 -1
  177. package/dist/chunk-WCCZJL7W.js +0 -141
  178. package/dist/chunk-WCCZJL7W.js.map +0 -1
  179. package/dist/chunk-XEYH6ZZI.js +0 -289
  180. package/dist/chunk-XEYH6ZZI.js.map +0 -1
  181. package/dist/chunk-XUEMATVY.js.map +0 -1
  182. package/dist/chunk-XZUEFTUP.js +0 -243
  183. package/dist/chunk-XZUEFTUP.js.map +0 -1
  184. package/dist/chunk-YVPZUN6X.js.map +0 -1
  185. package/dist/chunk-ZVZMWNCG.js.map +0 -1
  186. package/dist/diagnostics-HTCWF7F4.js +0 -23
  187. package/dist/execute-LELOSR5T.js +0 -37
  188. package/dist/generate-JGW5JSKB.js.map +0 -1
  189. package/dist/init-TO6MUXO4.js +0 -26
  190. package/dist/operations-O4FORFIH.js.map +0 -1
  191. package/dist/plan-OXAT344Q.js +0 -34
  192. package/dist/pr-UZHNKKZC.js +0 -39
  193. package/dist/pr-review-Q4ACAWDM.js +0 -32
  194. package/dist/prd-6CYEMLDY.js +0 -33
  195. package/dist/ps-76L6ZAZL.js.map +0 -1
  196. package/dist/registry-XLHHYLTR.js +0 -15
  197. package/dist/resume-URCU6CIJ.js +0 -244
  198. package/dist/resume-URCU6CIJ.js.map +0 -1
  199. package/dist/review-LVZT2TMW.js +0 -35
  200. package/dist/routing-EK6RBZM4.js +0 -33
  201. package/dist/run-2RXJCJKT.js +0 -56
  202. package/dist/usage-KTMYXAPF.js.map +0 -1
  203. package/dist/web-B5UPHHR5.js +0 -172
  204. package/dist/web-B5UPHHR5.js.map +0 -1
  205. /package/dist/{agent-HMZTXCRT.js.map → agent-4DHRKZ2Z.js.map} +0 -0
  206. /package/dist/{bench-WWWXLTFH.js.map → bench-RNRXVEFK.js.map} +0 -0
  207. /package/dist/{chunk-RYOUZ6EK.js.map → chunk-23VHVVKW.js.map} +0 -0
  208. /package/dist/{chunk-C5TL7T4V.js.map → chunk-2YM2VH6R.js.map} +0 -0
  209. /package/dist/{chunk-QJ44VG5G.js.map → chunk-ADH6RJNX.js.map} +0 -0
  210. /package/dist/{chunk-HOAHMERN.js.map → chunk-CLZ6RRZL.js.map} +0 -0
  211. /package/dist/{chunk-DUS5ZNKL.js.map → chunk-DIMDAYZS.js.map} +0 -0
  212. /package/dist/{chunk-QPGEFLMY.js.map → chunk-I64N6RL6.js.map} +0 -0
  213. /package/dist/{chunk-DGRTJD5R.js.map → chunk-MML2G7IC.js.map} +0 -0
  214. /package/dist/{chunk-3R27MJ5R.js.map → chunk-PFWHHYEO.js.map} +0 -0
  215. /package/dist/{chunk-PPZ3K4YM.js.map → chunk-VHQMMY2D.js.map} +0 -0
  216. /package/dist/{chunk-L6HSKTQE.js.map → chunk-W7LZLJAF.js.map} +0 -0
  217. /package/dist/{chunk-YUNBOUQH.js.map → chunk-ZPGNVBWY.js.map} +0 -0
  218. /package/dist/{config-LEBZZCJP.js.map → compat-OJG76J4I.js.map} +0 -0
  219. /package/dist/{contract-JH2WBIO6.js.map → config-6YTWPDBK.js.map} +0 -0
  220. /package/dist/{diagnostics-HTCWF7F4.js.map → contract-HWLFFL3F.js.map} +0 -0
  221. /package/dist/{execute-LELOSR5T.js.map → diagnostics-YEFB42E5.js.map} +0 -0
  222. /package/dist/{git-A2IP32PQ.js.map → execute-QCT64D37.js.map} +0 -0
  223. /package/dist/{init-TO6MUXO4.js.map → git-XGOECXWG.js.map} +0 -0
  224. /package/dist/{permissions-G4XCAESF.js.map → init-4LB2YKWP.js.map} +0 -0
  225. /package/dist/{plan-OXAT344Q.js.map → permissions-QZPUUBSO.js.map} +0 -0
  226. /package/dist/{pr-UZHNKKZC.js.map → plan-2NMSHTMD.js.map} +0 -0
  227. /package/dist/{pr-review-Q4ACAWDM.js.map → pr-QKFO5HI3.js.map} +0 -0
  228. /package/dist/{prd-6CYEMLDY.js.map → pr-review-H2BFD6F2.js.map} +0 -0
  229. /package/dist/{recorder-2BAKPBRA.js.map → prd-ET6XKYRS.js.map} +0 -0
  230. /package/dist/{registry-XLHHYLTR.js.map → recorder-LOU3PTIE.js.map} +0 -0
  231. /package/dist/{review-LVZT2TMW.js.map → registry-HV7M6MAH.js.map} +0 -0
  232. /package/dist/{routing-EK6RBZM4.js.map → repository-RCRR6RDE.js.map} +0 -0
  233. /package/dist/{run-2RXJCJKT.js.map → review-2MTZLNSS.js.map} +0 -0
  234. /package/dist/{session-publisher-KAJQRHNZ.js.map → routing-RM5ABHHD.js.map} +0 -0
  235. /package/dist/{state-manager-UPHO2EA2.js.map → run-XMACQBRJ.js.map} +0 -0
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  getPackageVersion
4
- } from "./chunk-C5TL7T4V.js";
4
+ } from "./chunk-2YM2VH6R.js";
5
5
  import {
6
6
  DEFAULT_INACTIVITY_TIMEOUT_MS,
7
7
  installShutdownHandlers,
@@ -12,27 +12,29 @@ import {
12
12
  setRoutingCliOverrides,
13
13
  setVerifyCliOverrides,
14
14
  setWebCliOverrides
15
- } from "./chunk-QF7VEL3M.js";
16
- import "./chunk-LI35PIIS.js";
15
+ } from "./chunk-YC24E66P.js";
17
16
  import {
18
17
  printError,
19
18
  setGlobalTimeout,
20
19
  setInactivityTimeout,
21
20
  setVerbose
22
- } from "./chunk-XZUEFTUP.js";
23
- import "./chunk-QPGEFLMY.js";
24
- import "./chunk-HAKDLR6N.js";
25
- import "./chunk-YVPZUN6X.js";
26
- import "./chunk-DUS5ZNKL.js";
27
- import "./chunk-6K2LCFG6.js";
28
- import "./chunk-PPZ3K4YM.js";
29
- import "./chunk-SOM4QA6C.js";
21
+ } from "./chunk-DBLXLKGU.js";
22
+ import "./chunk-I64N6RL6.js";
23
+ import "./chunk-DIMDAYZS.js";
24
+ import "./chunk-WB4FA2EH.js";
25
+ import "./chunk-VHQMMY2D.js";
26
+ import "./chunk-P3LRUNC6.js";
27
+ import "./chunk-RDPK7LYK.js";
28
+ import "./chunk-JCR5C5A7.js";
29
+ import "./chunk-NP47HRX2.js";
30
30
  import {
31
31
  isAgentProviderId
32
- } from "./chunk-ICM463EO.js";
33
- import "./chunk-XEYH6ZZI.js";
34
- import "./chunk-P3LRUNC6.js";
35
- import "./chunk-3R27MJ5R.js";
32
+ } from "./chunk-44RF3VFG.js";
33
+ import "./chunk-7MJGYPHF.js";
34
+ import "./chunk-XNK5UN2D.js";
35
+ import "./chunk-MAJ6QDRL.js";
36
+ import "./chunk-KUA6KBBD.js";
37
+ import "./chunk-PFWHHYEO.js";
36
38
 
37
39
  // src/cli.ts
38
40
  import { Command, InvalidArgumentError, Option } from "commander";
@@ -228,7 +230,7 @@ function withGlobalOptions(cmd) {
228
230
  parseInteger
229
231
  ).option(
230
232
  "--agent <provider>",
231
- "Run every phase on this agent (claude|codex|cursor|antigravity)"
233
+ "Run every phase on this agent (claude|codex|cursor|antigravity|opencode)"
232
234
  ).option("--agent-model <model>", "Override the model for every phase").option(
233
235
  "--agent-phase <phase>=<provider>[:<model>]",
234
236
  "Override one phase (repeatable)",
@@ -244,7 +246,9 @@ function resolveAgentOverrides(opts) {
244
246
  const overrides = {};
245
247
  if (typeof opts.agent === "string") {
246
248
  if (!isAgentProviderId(opts.agent)) {
247
- throw new InvalidArgumentError("Must be one of: claude, codex, cursor, antigravity.");
249
+ throw new InvalidArgumentError(
250
+ "Must be one of: claude, codex, cursor, antigravity, opencode."
251
+ );
248
252
  }
249
253
  overrides.forceProvider = opts.agent;
250
254
  }
@@ -353,8 +357,8 @@ withIssueOptions(
353
357
  )
354
358
  ).action(
355
359
  async (options) => {
356
- const { loadIssuesConfig } = await import("./config-LEBZZCJP.js");
357
- const { runInit } = await import("./init-TO6MUXO4.js");
360
+ const { loadIssuesConfig } = await import("./config-6YTWPDBK.js");
361
+ const { runInit } = await import("./init-4LB2YKWP.js");
358
362
  const { preferredProvider } = await loadIssuesConfig();
359
363
  const code = await runInit(preferredProvider, {
360
364
  ...options,
@@ -376,7 +380,7 @@ withGlobalOptions(
376
380
  }
377
381
  throw error;
378
382
  }
379
- const { runGenerate } = await import("./generate-JGW5JSKB.js");
383
+ const { runGenerate } = await import("./generate-QATMDKOK.js");
380
384
  const code = await runGenerate(options.prompt, target);
381
385
  process.exit(code);
382
386
  });
@@ -390,7 +394,7 @@ withUserStoryNumberingOptions(
390
394
  ).argument("<issues...>", 'Issue number(s): 42, "42,43" or 42 43').option("--mode <mode>", "Execution mode: auto | manual", "auto").option("--from <phase>", "Resume from a specific phase").option(
391
395
  "--no-branch",
392
396
  "Run pipeline on current branch without creating a new branch or PR"
393
- ).option("--pr-review", "Review the created Pull Request after the pr phase").option("-y, --yes", "Run the whole discovered hierarchy without confirmation").option("--cascade", "Run the children of a container, without implementing it").option("--only", "Run just the issues informed, without their hierarchy").option(
397
+ ).option("--pr-review", "Review the created Pull Request after the pr phase").option("--close-issue", "Close issues after successful delivery; remember this choice").option("--no-close-issue", "Revoke automatic issue closure").option("-y, --yes", "Run the whole discovered hierarchy without confirmation").option("--cascade", "Run the children of a container, without implementing it").option("--only", "Run just the issues informed, without their hierarchy").option(
394
398
  "--retry-limit <number>",
395
399
  "Retry transient Claude failures up to N consecutive times",
396
400
  parseInteger
@@ -419,7 +423,7 @@ withUserStoryNumberingOptions(
419
423
  }
420
424
  throw error;
421
425
  }
422
- const { runPipeline } = await import("./run-2RXJCJKT.js");
426
+ const { runPipeline } = await import("./run-XMACQBRJ.js");
423
427
  const code = await runPipeline(
424
428
  issues,
425
429
  options.mode,
@@ -427,6 +431,7 @@ withUserStoryNumberingOptions(
427
431
  phases.noBranch,
428
432
  phases.prReview,
429
433
  {
434
+ closeIssue: options.closeIssue,
430
435
  yes: scope.yes,
431
436
  only: scope.only,
432
437
  cascade: scope.cascade,
@@ -445,32 +450,66 @@ withUserStoryNumberingOptions(
445
450
  );
446
451
  withIssueOptions(
447
452
  withGlobalOptions(
448
- program.command("resume").description("Resume an interrupted pipeline from the phase it stopped at").argument("[issue]", "Issue to resume. Omitted: the most recently attempted one").option("--all", "Resume every unfinished issue of this project, in order").option("--mode <mode>", "Execution mode: auto | manual", "auto")
453
+ program.command("resume").description("Resume an interrupted pipeline from the phase it stopped at").argument("[issue]", "Issue to resume. Omitted: the most recently attempted one").option("--all", "Resume every unfinished issue of this project, in order").option("--close-issue", "Close issues after successful delivery; remember this choice").option("--no-close-issue", "Revoke automatic issue closure").option("--mode <mode>", "Execution mode: auto | manual", "auto")
449
454
  )
450
- ).action(async (issue, options) => {
451
- const { runResume } = await import("./resume-URCU6CIJ.js");
452
- const code = await runResume(issue, {
453
- ...options.all === void 0 ? {} : { all: options.all },
454
- ...options.mode === void 0 ? {} : { mode: options.mode }
455
+ ).action(
456
+ async (issue, options) => {
457
+ const { runResume } = await import("./resume-BWJZGBLZ.js");
458
+ const code = await runResume(issue, {
459
+ ...options.closeIssue === void 0 ? {} : { closeIssue: options.closeIssue },
460
+ ...options.all === void 0 ? {} : { all: options.all },
461
+ ...options.mode === void 0 ? {} : { mode: options.mode }
462
+ });
463
+ process.exit(code);
464
+ }
465
+ );
466
+ var artifactsCommand = program.command("artifacts").description("Inspect local artifacts without changing files or CLI state");
467
+ if (process.argv.includes("--json")) {
468
+ artifactsCommand.configureOutput({ writeErr: () => {
469
+ } }).exitOverride((error) => {
470
+ if (error.exitCode === 0) process.exit(0);
471
+ console.log(
472
+ JSON.stringify({
473
+ schemaVersion: 1,
474
+ ok: false,
475
+ data: null,
476
+ errors: [{ code: "arguments", path: "", message: error.message }]
477
+ })
478
+ );
479
+ process.exit(1);
455
480
  });
456
- process.exit(code);
457
- });
481
+ }
482
+ for (const operation of ["plan", "issue"]) {
483
+ const command = artifactsCommand.command(operation).argument("[file]", "Artifact path");
484
+ if (operation === "issue") command.argument("[metadata]", "Optional metadata.json");
485
+ else command.option("--context", "Select current execution facts without history");
486
+ command.option("--json", "Emit a versioned JSON inspection").allowExcessArguments(false);
487
+ command.action(async (...args) => {
488
+ const file = args[0];
489
+ const metadata = operation === "issue" ? args[1] : void 0;
490
+ const options = args[operation === "issue" ? 2 : 1];
491
+ const { runArtifacts } = await import("./artifacts-AMJQJFFV.js");
492
+ process.exit(
493
+ await runArtifacts(options.context ? "context" : operation, file, metadata, options.json)
494
+ );
495
+ });
496
+ }
458
497
  withGlobalOptions(
459
498
  program.command("status").description("What is running right now, in which phase, and since when").argument("[issue]", "Restrict the report to one issue").option("--json", "Emit the assembled state as JSON")
460
499
  ).action(async (issue, options) => {
461
- const { runStatus } = await import("./operations-O4FORFIH.js");
500
+ const { runStatus } = await import("./operations-RUQP2Y2F.js");
462
501
  process.exit(
463
502
  await runStatus(issue, { ...options.json === void 0 ? {} : { json: options.json } })
464
503
  );
465
504
  });
466
505
  withGlobalOptions(
467
- program.command("usage").description("Aggregate execution telemetry from tasks.json").argument("[issue]", "Restrict the report to one issue").option("--issue <issue>", "Same as the positional argument").option("--since <date>", "Only executions started on or after this ISO date").option("--by <key>", "Group by harness, provider, model, purpose or status").option("--json", "Emit the assembled totals as JSON")
506
+ program.command("usage").description("Aggregate execution telemetry from SQLite").argument("[issue]", "Restrict the report to one issue").option("--issue <issue>", "Same as the positional argument").option("--since <date>", "Only executions started on or after this ISO date").option("--by <key>", "Group by harness, provider, model, purpose, trigger or status").option("--json", "Emit the assembled totals as JSON")
468
507
  ).action(
469
508
  async (issue, options) => {
470
- const { runUsage, USAGE_GROUP_KEYS } = await import("./usage-KTMYXAPF.js");
509
+ const { runUsage, USAGE_GROUP_KEYS } = await import("./usage-JOODVE5O.js");
471
510
  const by = options.by;
472
511
  if (by !== void 0 && !USAGE_GROUP_KEYS.includes(by)) {
473
- printError("Must be one of: harness, provider, model, purpose, status.");
512
+ printError("Must be one of: harness, provider, model, purpose, trigger, status.");
474
513
  process.exit(1);
475
514
  }
476
515
  process.exit(
@@ -485,20 +524,51 @@ withGlobalOptions(
485
524
  withGlobalOptions(
486
525
  program.command("ps").description("Every issue-flow run active on this machine").option("--json", "Emit the listing as JSON").option("--watch", "Refresh the listing until interrupted")
487
526
  ).action(async (options) => {
488
- const { runPs } = await import("./ps-76L6ZAZL.js");
527
+ const { runPs } = await import("./ps-UIKSOUAQ.js");
489
528
  process.exit(await runPs(options));
490
529
  });
530
+ var db = program.command("db").description("Inspect and maintain the Issue Flow SQLite database");
531
+ db.command("check").description("Run SQLite integrity_check").action(async () => {
532
+ const { runDbCheck } = await import("./db-QAZG4LQD.js");
533
+ process.exit(await runDbCheck());
534
+ });
535
+ db.command("backup").description("Create a consistent SQLite backup").option("--destination <path>", "Where to write the backup").action(async (options) => {
536
+ const { runDbBackup } = await import("./db-QAZG4LQD.js");
537
+ process.exit(await runDbBackup(options.destination));
538
+ });
539
+ db.command("vacuum").description("Rebuild the SQLite database to reclaim unused space").action(async () => {
540
+ const { runDbVacuum } = await import("./db-QAZG4LQD.js");
541
+ process.exit(await runDbVacuum());
542
+ });
543
+ db.command("export").description("Export structured SQLite state as readable JSON").option("--destination <path>", "Where to write the JSON export (stdout by default)").action(async (options) => {
544
+ const { runDbExport } = await import("./db-QAZG4LQD.js");
545
+ process.exit(await runDbExport(options.destination));
546
+ });
547
+ db.command("verify").description("Compare task and queue projections with canonical SQLite state").action(async () => {
548
+ const { runDbVerify } = await import("./db-QAZG4LQD.js");
549
+ process.exit(await runDbVerify());
550
+ });
551
+ db.command("import").description("Import preserved compatibility artifacts").option("--with-events", "Also import the potentially large JSONL journal").action(async (options) => {
552
+ const { runDbImport } = await import("./db-QAZG4LQD.js");
553
+ process.exit(await runDbImport(options));
554
+ });
491
555
  withGlobalOptions(
492
556
  program.command("runs").description("History of the runs of this project, with how each ended")
493
557
  ).action(async () => {
494
- const { runRuns } = await import("./operations-O4FORFIH.js");
558
+ const { runRuns } = await import("./operations-RUQP2Y2F.js");
495
559
  process.exit(await runRuns());
496
560
  });
561
+ withGlobalOptions(
562
+ program.command("history").description("Relational phase, invocation and verdict history for one issue").argument("<issue>", "Issue identifier").option("--json", "Emit the complete history as JSON")
563
+ ).action(async (issue, options) => {
564
+ const { runHistory } = await import("./history-NBPUZVGQ.js");
565
+ process.exit(await runHistory(issue, options));
566
+ });
497
567
  withGlobalOptions(
498
568
  program.command("logs").description("Read the execution journal (events.jsonl), filtered and readable").argument("[issue]", "Issue to read. Omitted: the most recently attempted one").option("--issue <issue>", "Same as the positional argument").option("--follow", "Keep reading as the journal grows").option("--tail <n>", "How many entries to show first (default 50)", parseInteger).option("--kind <kinds>", "Only these event types, comma separated (retry, phase:end, \u2026)")
499
569
  ).action(
500
570
  async (issue, options) => {
501
- const { runLogs } = await import("./operations-O4FORFIH.js");
571
+ const { runLogs } = await import("./operations-RUQP2Y2F.js");
502
572
  const kinds = options.kind === void 0 ? void 0 : options.kind.split(",").map((kind) => kind.trim()).filter((kind) => kind !== "");
503
573
  process.exit(
504
574
  await runLogs(issue ?? options.issue, {
@@ -512,13 +582,13 @@ withGlobalOptions(
512
582
  withGlobalOptions(
513
583
  program.command("pause").description("Ask the running pipeline to stop after writing a checkpoint")
514
584
  ).action(async () => {
515
- const { runPause } = await import("./operations-O4FORFIH.js");
585
+ const { runPause } = await import("./operations-RUQP2Y2F.js");
516
586
  process.exit(await runPause());
517
587
  });
518
588
  withGlobalOptions(
519
589
  program.command("cancel").description("Stop the run and mark the issue so a resume does not pick it up").argument("[issue]", "Issue to cancel. Omitted: the most recently attempted one")
520
590
  ).action(async (issue) => {
521
- const { runCancel } = await import("./operations-O4FORFIH.js");
591
+ const { runCancel } = await import("./operations-RUQP2Y2F.js");
522
592
  process.exit(await runCancel(issue));
523
593
  });
524
594
  withIssueOptions(
@@ -526,7 +596,7 @@ withIssueOptions(
526
596
  program.command("analyze").description("Analyze an issue with the configured agent").argument("<issue>", "Issue number")
527
597
  )
528
598
  ).action(async (issue) => {
529
- const { runAnalyze } = await import("./analyze-Q4ONIWRZ.js");
599
+ const { runAnalyze } = await import("./analyze-UEJ2R3H5.js");
530
600
  const code = await runAnalyze(issue);
531
601
  process.exit(code);
532
602
  });
@@ -535,7 +605,7 @@ withIssueOptions(
535
605
  program.command("prd").description("Generate a PRD from an analyzed issue with the configured agent").argument("<issue>", "Issue number")
536
606
  )
537
607
  ).action(async (issue) => {
538
- const { runPrd } = await import("./prd-6CYEMLDY.js");
608
+ const { runPrd } = await import("./prd-ET6XKYRS.js");
539
609
  const code = await runPrd(issue);
540
610
  process.exit(code);
541
611
  });
@@ -556,7 +626,7 @@ withUserStoryNumberingOptions(
556
626
  }
557
627
  throw error;
558
628
  }
559
- const { runPlan } = await import("./plan-OXAT344Q.js");
629
+ const { runPlan } = await import("./plan-2NMSHTMD.js");
560
630
  const code = await runPlan(issue, void 0, numbering);
561
631
  process.exit(code);
562
632
  });
@@ -575,7 +645,7 @@ withWebOptions(
575
645
  ).action(
576
646
  async (positionalMaxIter, options) => {
577
647
  try {
578
- const { runExecute } = await import("./execute-LELOSR5T.js");
648
+ const { runExecute } = await import("./execute-QCT64D37.js");
579
649
  const code = await runExecute(positionalMaxIter, options);
580
650
  process.exit(code);
581
651
  } catch (error) {
@@ -589,7 +659,7 @@ withIssueOptions(
589
659
  program.command("review").description("Validate an issue resolution with the configured agent").argument("<issue>", "Issue number")
590
660
  )
591
661
  ).action(async (issue) => {
592
- const { runReview } = await import("./review-LVZT2TMW.js");
662
+ const { runReview } = await import("./review-2MTZLNSS.js");
593
663
  const code = await runReview(issue);
594
664
  process.exit(code);
595
665
  });
@@ -598,7 +668,7 @@ withIssueOptions(
598
668
  program.command("pr").description("Create a pull request with the configured agent").argument("<issue>", "Issue number")
599
669
  )
600
670
  ).action(async (issue) => {
601
- const { runPr } = await import("./pr-UZHNKKZC.js");
671
+ const { runPr } = await import("./pr-QKFO5HI3.js");
602
672
  const code = await runPr(issue);
603
673
  process.exit(code);
604
674
  });
@@ -606,21 +676,21 @@ var webCommand = program.command("web").description("Manage the web monitoring s
606
676
  webCommand.command("serve").description(
607
677
  "Run the web monitor server in the foreground (internal \u2014 spawned detached by --web)"
608
678
  ).option("--port <n>", "Web server port (default: 3737)", parseInteger).option("--host <h>", "Web server host (default: 0.0.0.0)").option("--refresh <s>", "Suggested UI polling interval in seconds", parseInteger).action(async (options) => {
609
- const { runWebServe } = await import("./web-B5UPHHR5.js");
679
+ const { runWebServe } = await import("./web-TLMWJ2BM.js");
610
680
  const code = await runWebServe(options);
611
681
  if (code !== 0) {
612
682
  process.exit(code);
613
683
  }
614
684
  });
615
685
  webCommand.command("stop").description("Stop the running web monitor server").action(async () => {
616
- const { runWebStop } = await import("./web-B5UPHHR5.js");
686
+ const { runWebStop } = await import("./web-TLMWJ2BM.js");
617
687
  const code = await runWebStop();
618
688
  process.exit(code);
619
689
  });
620
690
  withGlobalOptions(
621
691
  program.command("policy").description("Inspect the policies discovered in this repository and their provenance").option("--scope <dir>", "Resolve the policy for a subdirectory (monorepo)").option("--json", "Emit the resolved policy as JSON")
622
692
  ).action(async (options) => {
623
- const { runPolicy } = await import("./policy-U5NBFAO5.js");
693
+ const { runPolicy } = await import("./policy-RKKFF5A2.js");
624
694
  const code = await runPolicy(options);
625
695
  process.exit(code);
626
696
  });
@@ -628,49 +698,49 @@ var routingCommand = withGlobalOptions(
628
698
  program.command("routing").description("Inspect and configure adaptive harness/model routing")
629
699
  );
630
700
  routingCommand.option("--json", "Emit the resolved routing config as JSON").action(async (_options, command) => {
631
- const { runRoutingInspect } = await import("./routing-EK6RBZM4.js");
701
+ const { runRoutingInspect } = await import("./routing-RM5ABHHD.js");
632
702
  process.exit(await runRoutingInspect(command.opts()));
633
703
  });
634
704
  routingCommand.command("explain").description("Explain the resolved routing target for every phase").option("--json", "Emit JSON").action(async (_options, command) => {
635
- const { runRoutingExplain } = await import("./routing-EK6RBZM4.js");
705
+ const { runRoutingExplain } = await import("./routing-RM5ABHHD.js");
636
706
  process.exit(await runRoutingExplain(command.optsWithGlobals()));
637
707
  });
638
708
  routingCommand.command("use").description("Enable an embedded routing policy").argument("<policy>", "Policy name (recommended)").option("--global", "Write ~/.issue-flow/config.json (default)").option("--project", "Write .issue-flow.json instead").option("--active", "Apply the policy to future runs instead of leaving routing in shadow mode").action(async (policy, _options, command) => {
639
- const { runRoutingUse } = await import("./routing-EK6RBZM4.js");
709
+ const { runRoutingUse } = await import("./routing-RM5ABHHD.js");
640
710
  process.exit(await runRoutingUse(policy, command.optsWithGlobals()));
641
711
  });
642
712
  routingCommand.command("report").description("Shadow agreement between selected and actual harness").option("--issue <n>", "Issue number").option("--json", "Emit JSON").action(async (_options, command) => {
643
- const { runRoutingReport } = await import("./routing-EK6RBZM4.js");
713
+ const { runRoutingReport } = await import("./routing-RM5ABHHD.js");
644
714
  process.exit(await runRoutingReport(command.optsWithGlobals()));
645
715
  });
646
716
  var conventionsCommand = withGlobalOptions(
647
717
  program.command("conventions").description("Compute the repository Git convention (branch, commit, PR title)")
648
718
  );
649
719
  conventionsCommand.command("branch").description("Print the deterministic branch name for an issue").option("--issue <n>", "Issue number").option("--title <text>", "Issue title, when the issue cannot be resolved").option("--json", "Emit JSON").action(async (options) => {
650
- const { runConventionsBranch } = await import("./conventions-XOT6YW5L.js");
720
+ const { runConventionsBranch } = await import("./conventions-5UPOTU42.js");
651
721
  process.exit(await runConventionsBranch(options));
652
722
  });
653
723
  conventionsCommand.command("commit").description("Print a Conventional Commit message").requiredOption("--type <type>", "Change type (feat, fix, docs, \u2026)").option("--scope <scope>", "Optional scope").requiredOption("--subject <text>", "Commit subject").option("--issue <n>", "Issue number for the Refs trailer").option("--story <id>", "Story id (US-010)").option("--breaking <text>", "Breaking change description").option("--json", "Emit JSON").action(
654
724
  async (options) => {
655
- const { runConventionsCommit } = await import("./conventions-XOT6YW5L.js");
725
+ const { runConventionsCommit } = await import("./conventions-5UPOTU42.js");
656
726
  process.exit(await runConventionsCommit(options));
657
727
  }
658
728
  );
659
729
  conventionsCommand.command("pr-title").description("Print the Conventional Commit Pull Request title").option("--issue <n>", "Issue number").option("--title <text>", "Issue title, when the issue cannot be resolved").option("--json", "Emit JSON").action(async (options) => {
660
- const { runConventionsPrTitle } = await import("./conventions-XOT6YW5L.js");
730
+ const { runConventionsPrTitle } = await import("./conventions-5UPOTU42.js");
661
731
  process.exit(await runConventionsPrTitle(options));
662
732
  });
663
733
  var agentCommand = withGlobalOptions(
664
734
  program.command("agent").description("Inspect the resolved agent and model for each phase").option("--json", "Emit the resolved agent configuration as JSON")
665
735
  );
666
736
  agentCommand.action(async (options) => {
667
- const { runAgent } = await import("./agent-HMZTXCRT.js");
737
+ const { runAgent } = await import("./agent-4DHRKZ2Z.js");
668
738
  const code = await runAgent(options);
669
739
  process.exit(code);
670
740
  });
671
- agentCommand.command("use").description("Write an agent preference to config.json or .issue-flow.json").argument("<provider>", "claude, codex, cursor or antigravity").option("--model <model>", "Model identifier for this preference").option("--global", "Write to ~/.issue-flow/config.json (default)").option("--project", "Write to .issue-flow.json in the repository").option("--phase <phase>", "Write only the override for this phase").action(
741
+ agentCommand.command("use").description("Write an agent preference to config.json or .issue-flow.json").argument("<provider>", "claude, codex, cursor, antigravity or opencode").option("--model <model>", "Model identifier for this preference").option("--global", "Write to ~/.issue-flow/config.json (default)").option("--project", "Write to .issue-flow.json in the repository").option("--phase <phase>", "Write only the override for this phase").action(
672
742
  async (provider, options) => {
673
- const { runAgentUse } = await import("./agent-HMZTXCRT.js");
743
+ const { runAgentUse } = await import("./agent-4DHRKZ2Z.js");
674
744
  const code = await runAgentUse(provider, options);
675
745
  process.exit(code);
676
746
  }
@@ -682,7 +752,7 @@ withGlobalOptions(
682
752
  )
683
753
  ).action(
684
754
  async (pr, options) => {
685
- const { runPrReview } = await import("./pr-review-Q4ACAWDM.js");
755
+ const { runPrReview } = await import("./pr-review-H2BFD6F2.js");
686
756
  const code = await runPrReview(pr, options);
687
757
  process.exit(code);
688
758
  }
@@ -708,7 +778,7 @@ withGlobalOptions(
708
778
  printError("Unknown bench mode. Use 'synthetic' or 'real'.");
709
779
  process.exit(1);
710
780
  }
711
- const { runBench } = await import("./bench-WWWXLTFH.js");
781
+ const { runBench } = await import("./bench-RNRXVEFK.js");
712
782
  process.exit(
713
783
  await runBench({
714
784
  ...options.mode === void 0 ? {} : { mode: options.mode },
@@ -726,13 +796,13 @@ withGlobalOptions(
726
796
  }
727
797
  );
728
798
  program.action(async () => {
729
- const { listLiveRuns } = await import("./registry-XLHHYLTR.js");
799
+ const { listLiveRuns } = await import("./registry-HV7M6MAH.js");
730
800
  const runs = await listLiveRuns();
731
801
  if (runs.length === 0) {
732
802
  program.help();
733
803
  return;
734
804
  }
735
- const { runPs } = await import("./ps-76L6ZAZL.js");
805
+ const { runPs } = await import("./ps-UIKSOUAQ.js");
736
806
  process.exit(await runPs());
737
807
  });
738
808
  program.parse();