opencastle 1.3.0 → 1.4.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 (577) hide show
  1. package/README.md +102 -131
  2. package/bin/cli.mjs +20 -10
  3. package/dist/cli/adapters/claude-code.d.ts +5 -3
  4. package/dist/cli/adapters/claude-code.d.ts.map +1 -1
  5. package/dist/cli/adapters/claude-code.js +7 -3
  6. package/dist/cli/adapters/claude-code.js.map +1 -1
  7. package/dist/cli/adapters/single-file-base.d.ts +18 -0
  8. package/dist/cli/adapters/single-file-base.d.ts.map +1 -1
  9. package/dist/cli/adapters/single-file-base.js +29 -4
  10. package/dist/cli/adapters/single-file-base.js.map +1 -1
  11. package/dist/cli/agent-plugin.test.js +12 -0
  12. package/dist/cli/agent-plugin.test.js.map +1 -1
  13. package/dist/cli/agent-roster.test.js +0 -48
  14. package/dist/cli/agent-roster.test.js.map +1 -1
  15. package/dist/cli/bootstrap.d.ts.map +1 -1
  16. package/dist/cli/bootstrap.js +20 -0
  17. package/dist/cli/bootstrap.js.map +1 -1
  18. package/dist/cli/boundary.test.js +9 -7
  19. package/dist/cli/boundary.test.js.map +1 -1
  20. package/dist/cli/ci.d.ts.map +1 -1
  21. package/dist/cli/ci.js +6 -4
  22. package/dist/cli/ci.js.map +1 -1
  23. package/dist/cli/command-namespace.test.js +33 -0
  24. package/dist/cli/command-namespace.test.js.map +1 -1
  25. package/dist/cli/convoy/artifacts.d.ts +9 -2
  26. package/dist/cli/convoy/artifacts.d.ts.map +1 -1
  27. package/dist/cli/convoy/artifacts.js +13 -10
  28. package/dist/cli/convoy/artifacts.js.map +1 -1
  29. package/dist/cli/convoy/artifacts.test.js +4 -2
  30. package/dist/cli/convoy/artifacts.test.js.map +1 -1
  31. package/dist/cli/convoy/engine.d.ts +53 -23
  32. package/dist/cli/convoy/engine.d.ts.map +1 -1
  33. package/dist/cli/convoy/engine.git.test.d.ts +2 -0
  34. package/dist/cli/convoy/engine.git.test.d.ts.map +1 -0
  35. package/dist/cli/convoy/engine.git.test.js +435 -0
  36. package/dist/cli/convoy/engine.git.test.js.map +1 -0
  37. package/dist/cli/convoy/engine.js +1746 -2305
  38. package/dist/cli/convoy/engine.js.map +1 -1
  39. package/dist/cli/convoy/engine.test.js +698 -678
  40. package/dist/cli/convoy/engine.test.js.map +1 -1
  41. package/dist/cli/convoy/event-schemas.d.ts +2 -0
  42. package/dist/cli/convoy/event-schemas.d.ts.map +1 -1
  43. package/dist/cli/convoy/event-schemas.js +59 -57
  44. package/dist/cli/convoy/event-schemas.js.map +1 -1
  45. package/dist/cli/convoy/events.d.ts +4 -1
  46. package/dist/cli/convoy/events.d.ts.map +1 -1
  47. package/dist/cli/convoy/events.js +69 -84
  48. package/dist/cli/convoy/events.js.map +1 -1
  49. package/dist/cli/convoy/events.test.js +50 -9
  50. package/dist/cli/convoy/events.test.js.map +1 -1
  51. package/dist/cli/convoy/gates.d.ts +9 -4
  52. package/dist/cli/convoy/gates.d.ts.map +1 -1
  53. package/dist/cli/convoy/gates.js +29 -14
  54. package/dist/cli/convoy/gates.js.map +1 -1
  55. package/dist/cli/convoy/isolation.d.ts +32 -6
  56. package/dist/cli/convoy/isolation.d.ts.map +1 -1
  57. package/dist/cli/convoy/isolation.js +72 -34
  58. package/dist/cli/convoy/isolation.js.map +1 -1
  59. package/dist/cli/convoy/isolation.test.js +66 -42
  60. package/dist/cli/convoy/isolation.test.js.map +1 -1
  61. package/dist/cli/convoy/lock.d.ts.map +1 -1
  62. package/dist/cli/convoy/lock.js +25 -10
  63. package/dist/cli/convoy/lock.js.map +1 -1
  64. package/dist/cli/convoy/lock.test.js +12 -0
  65. package/dist/cli/convoy/lock.test.js.map +1 -1
  66. package/dist/cli/convoy/merge.d.ts +21 -4
  67. package/dist/cli/convoy/merge.d.ts.map +1 -1
  68. package/dist/cli/convoy/merge.js +69 -53
  69. package/dist/cli/convoy/merge.js.map +1 -1
  70. package/dist/cli/convoy/merge.test.js +23 -1
  71. package/dist/cli/convoy/merge.test.js.map +1 -1
  72. package/dist/cli/convoy/progress.d.ts +35 -0
  73. package/dist/cli/convoy/progress.d.ts.map +1 -0
  74. package/dist/cli/convoy/progress.js +103 -0
  75. package/dist/cli/convoy/progress.js.map +1 -0
  76. package/dist/cli/convoy/progress.test.d.ts +2 -0
  77. package/dist/cli/convoy/progress.test.d.ts.map +1 -0
  78. package/dist/cli/convoy/progress.test.js +53 -0
  79. package/dist/cli/convoy/progress.test.js.map +1 -0
  80. package/dist/cli/convoy/read-model.d.ts +468 -0
  81. package/dist/cli/convoy/read-model.d.ts.map +1 -0
  82. package/dist/cli/convoy/read-model.js +1132 -0
  83. package/dist/cli/convoy/read-model.js.map +1 -0
  84. package/dist/cli/convoy/read-model.test.d.ts +2 -0
  85. package/dist/cli/convoy/read-model.test.d.ts.map +1 -0
  86. package/dist/cli/convoy/read-model.test.js +609 -0
  87. package/dist/cli/convoy/read-model.test.js.map +1 -0
  88. package/dist/cli/convoy/redact.d.ts +34 -0
  89. package/dist/cli/convoy/redact.d.ts.map +1 -0
  90. package/dist/cli/convoy/redact.js +66 -0
  91. package/dist/cli/convoy/redact.js.map +1 -0
  92. package/dist/cli/convoy/redact.test.d.ts +2 -0
  93. package/dist/cli/convoy/redact.test.d.ts.map +1 -0
  94. package/dist/cli/convoy/redact.test.js +43 -0
  95. package/dist/cli/convoy/redact.test.js.map +1 -0
  96. package/dist/cli/convoy/reviewer.d.ts +65 -0
  97. package/dist/cli/convoy/reviewer.d.ts.map +1 -0
  98. package/dist/cli/convoy/reviewer.js +141 -0
  99. package/dist/cli/convoy/reviewer.js.map +1 -0
  100. package/dist/cli/convoy/reviewer.test.d.ts +2 -0
  101. package/dist/cli/convoy/reviewer.test.d.ts.map +1 -0
  102. package/dist/cli/convoy/reviewer.test.js +96 -0
  103. package/dist/cli/convoy/reviewer.test.js.map +1 -0
  104. package/dist/cli/convoy/schedule.d.ts +30 -0
  105. package/dist/cli/convoy/schedule.d.ts.map +1 -0
  106. package/dist/cli/convoy/schedule.js +111 -0
  107. package/dist/cli/convoy/schedule.js.map +1 -0
  108. package/dist/cli/convoy/schedule.test.d.ts +2 -0
  109. package/dist/cli/convoy/schedule.test.d.ts.map +1 -0
  110. package/dist/cli/convoy/schedule.test.js +45 -0
  111. package/dist/cli/convoy/schedule.test.js.map +1 -0
  112. package/dist/cli/convoy/spec-builder.d.ts +120 -30
  113. package/dist/cli/convoy/spec-builder.d.ts.map +1 -1
  114. package/dist/cli/convoy/spec-builder.js +438 -114
  115. package/dist/cli/convoy/spec-builder.js.map +1 -1
  116. package/dist/cli/convoy/spec-builder.test.js +419 -435
  117. package/dist/cli/convoy/spec-builder.test.js.map +1 -1
  118. package/dist/cli/convoy/spec-types.d.ts +46 -92
  119. package/dist/cli/convoy/spec-types.d.ts.map +1 -1
  120. package/dist/cli/convoy/store.d.ts +6 -1
  121. package/dist/cli/convoy/store.d.ts.map +1 -1
  122. package/dist/cli/convoy/store.js +111 -15
  123. package/dist/cli/convoy/store.js.map +1 -1
  124. package/dist/cli/convoy/store.test.js +59 -13
  125. package/dist/cli/convoy/store.test.js.map +1 -1
  126. package/dist/cli/convoy/types.d.ts +76 -113
  127. package/dist/cli/convoy/types.d.ts.map +1 -1
  128. package/dist/cli/convoy/types.js +6 -13
  129. package/dist/cli/convoy/types.js.map +1 -1
  130. package/dist/cli/convoy/worktree.d.ts +88 -3
  131. package/dist/cli/convoy/worktree.d.ts.map +1 -1
  132. package/dist/cli/convoy/worktree.js +282 -56
  133. package/dist/cli/convoy/worktree.js.map +1 -1
  134. package/dist/cli/convoy/worktree.test.js +132 -1
  135. package/dist/cli/convoy/worktree.test.js.map +1 -1
  136. package/dist/cli/convoy-args.test.js +9 -27
  137. package/dist/cli/convoy-args.test.js.map +1 -1
  138. package/dist/cli/convoy-cmd.d.ts +31 -6
  139. package/dist/cli/convoy-cmd.d.ts.map +1 -1
  140. package/dist/cli/convoy-cmd.js +150 -200
  141. package/dist/cli/convoy-cmd.js.map +1 -1
  142. package/dist/cli/convoy-cmd.test.d.ts +2 -0
  143. package/dist/cli/convoy-cmd.test.d.ts.map +1 -0
  144. package/dist/cli/convoy-cmd.test.js +144 -0
  145. package/dist/cli/convoy-cmd.test.js.map +1 -0
  146. package/dist/cli/dashboard.d.ts +24 -11
  147. package/dist/cli/dashboard.d.ts.map +1 -1
  148. package/dist/cli/dashboard.js +241 -303
  149. package/dist/cli/dashboard.js.map +1 -1
  150. package/dist/cli/dashboard.test.d.ts +2 -0
  151. package/dist/cli/dashboard.test.d.ts.map +1 -0
  152. package/dist/cli/dashboard.test.js +340 -0
  153. package/dist/cli/dashboard.test.js.map +1 -0
  154. package/dist/cli/dispatcher.test.js +41 -2
  155. package/dist/cli/dispatcher.test.js.map +1 -1
  156. package/dist/cli/docs-accuracy.test.js +36 -11
  157. package/dist/cli/docs-accuracy.test.js.map +1 -1
  158. package/dist/cli/doctor.d.ts.map +1 -1
  159. package/dist/cli/doctor.js +9 -6
  160. package/dist/cli/doctor.js.map +1 -1
  161. package/dist/cli/init-own-files.test.d.ts +2 -0
  162. package/dist/cli/init-own-files.test.d.ts.map +1 -0
  163. package/dist/cli/init-own-files.test.js +133 -0
  164. package/dist/cli/init-own-files.test.js.map +1 -0
  165. package/dist/cli/init.d.ts.map +1 -1
  166. package/dist/cli/init.js +106 -7
  167. package/dist/cli/init.js.map +1 -1
  168. package/dist/cli/init.test.js +5 -4
  169. package/dist/cli/init.test.js.map +1 -1
  170. package/dist/cli/layers.d.ts.map +1 -1
  171. package/dist/cli/layers.js +13 -4
  172. package/dist/cli/layers.js.map +1 -1
  173. package/dist/cli/lesson.d.ts.map +1 -1
  174. package/dist/cli/lesson.js +6 -5
  175. package/dist/cli/lesson.js.map +1 -1
  176. package/dist/cli/log.d.ts +39 -0
  177. package/dist/cli/log.d.ts.map +1 -1
  178. package/dist/cli/log.js +267 -93
  179. package/dist/cli/log.js.map +1 -1
  180. package/dist/cli/log.test.d.ts +2 -0
  181. package/dist/cli/log.test.d.ts.map +1 -0
  182. package/dist/cli/log.test.js +208 -0
  183. package/dist/cli/log.test.js.map +1 -0
  184. package/dist/cli/nearest.d.ts +18 -0
  185. package/dist/cli/nearest.d.ts.map +1 -0
  186. package/dist/cli/nearest.js +38 -0
  187. package/dist/cli/nearest.js.map +1 -0
  188. package/dist/cli/nearest.test.d.ts +2 -0
  189. package/dist/cli/nearest.test.d.ts.map +1 -0
  190. package/dist/cli/nearest.test.js +24 -0
  191. package/dist/cli/nearest.test.js.map +1 -0
  192. package/dist/cli/pipeline.d.ts +61 -0
  193. package/dist/cli/pipeline.d.ts.map +1 -1
  194. package/dist/cli/pipeline.flow.test.d.ts +2 -0
  195. package/dist/cli/pipeline.flow.test.d.ts.map +1 -0
  196. package/dist/cli/pipeline.flow.test.js +524 -0
  197. package/dist/cli/pipeline.flow.test.js.map +1 -0
  198. package/dist/cli/pipeline.js +471 -690
  199. package/dist/cli/pipeline.js.map +1 -1
  200. package/dist/cli/plan.d.ts +82 -31
  201. package/dist/cli/plan.d.ts.map +1 -1
  202. package/dist/cli/plan.js +167 -507
  203. package/dist/cli/plan.js.map +1 -1
  204. package/dist/cli/plan.test.d.ts +2 -0
  205. package/dist/cli/plan.test.d.ts.map +1 -0
  206. package/dist/cli/plan.test.js +158 -0
  207. package/dist/cli/plan.test.js.map +1 -0
  208. package/dist/cli/prompt.d.ts.map +1 -1
  209. package/dist/cli/prompt.js +9 -7
  210. package/dist/cli/prompt.js.map +1 -1
  211. package/dist/cli/prompt.test.js +20 -2
  212. package/dist/cli/prompt.test.js.map +1 -1
  213. package/dist/cli/remove.d.ts.map +1 -1
  214. package/dist/cli/remove.js +3 -1
  215. package/dist/cli/remove.js.map +1 -1
  216. package/dist/cli/review.d.ts.map +1 -1
  217. package/dist/cli/review.js +7 -1
  218. package/dist/cli/review.js.map +1 -1
  219. package/dist/cli/run/adapters/agent-process.d.ts +82 -0
  220. package/dist/cli/run/adapters/agent-process.d.ts.map +1 -0
  221. package/dist/cli/run/adapters/agent-process.js +224 -0
  222. package/dist/cli/run/adapters/agent-process.js.map +1 -0
  223. package/dist/cli/run/adapters/agent-process.test.d.ts +2 -0
  224. package/dist/cli/run/adapters/agent-process.test.d.ts.map +1 -0
  225. package/dist/cli/run/adapters/agent-process.test.js +159 -0
  226. package/dist/cli/run/adapters/agent-process.test.js.map +1 -0
  227. package/dist/cli/run/adapters/claude.d.ts +53 -2
  228. package/dist/cli/run/adapters/claude.d.ts.map +1 -1
  229. package/dist/cli/run/adapters/claude.js +147 -171
  230. package/dist/cli/run/adapters/claude.js.map +1 -1
  231. package/dist/cli/run/adapters/claude.test.js +197 -254
  232. package/dist/cli/run/adapters/claude.test.js.map +1 -1
  233. package/dist/cli/run/adapters/codex.d.ts +25 -2
  234. package/dist/cli/run/adapters/codex.d.ts.map +1 -1
  235. package/dist/cli/run/adapters/codex.js +113 -81
  236. package/dist/cli/run/adapters/codex.js.map +1 -1
  237. package/dist/cli/run/adapters/codex.test.js +116 -95
  238. package/dist/cli/run/adapters/codex.test.js.map +1 -1
  239. package/dist/cli/run/adapters/copilot.d.ts +35 -1
  240. package/dist/cli/run/adapters/copilot.d.ts.map +1 -1
  241. package/dist/cli/run/adapters/copilot.js +104 -287
  242. package/dist/cli/run/adapters/copilot.js.map +1 -1
  243. package/dist/cli/run/adapters/copilot.test.js +122 -282
  244. package/dist/cli/run/adapters/copilot.test.js.map +1 -1
  245. package/dist/cli/run/adapters/cursor.d.ts +25 -7
  246. package/dist/cli/run/adapters/cursor.d.ts.map +1 -1
  247. package/dist/cli/run/adapters/cursor.js +103 -156
  248. package/dist/cli/run/adapters/cursor.js.map +1 -1
  249. package/dist/cli/run/adapters/cursor.test.js +106 -218
  250. package/dist/cli/run/adapters/cursor.test.js.map +1 -1
  251. package/dist/cli/run/adapters/index.d.ts +34 -5
  252. package/dist/cli/run/adapters/index.d.ts.map +1 -1
  253. package/dist/cli/run/adapters/index.js +147 -21
  254. package/dist/cli/run/adapters/index.js.map +1 -1
  255. package/dist/cli/run/adapters/index.test.d.ts +2 -0
  256. package/dist/cli/run/adapters/index.test.d.ts.map +1 -0
  257. package/dist/cli/run/adapters/index.test.js +129 -0
  258. package/dist/cli/run/adapters/index.test.js.map +1 -0
  259. package/dist/cli/run/adapters/opencode.d.ts +25 -9
  260. package/dist/cli/run/adapters/opencode.d.ts.map +1 -1
  261. package/dist/cli/run/adapters/opencode.js +136 -152
  262. package/dist/cli/run/adapters/opencode.js.map +1 -1
  263. package/dist/cli/run/adapters/opencode.test.js +99 -218
  264. package/dist/cli/run/adapters/opencode.test.js.map +1 -1
  265. package/dist/cli/run/adapters/permission-modes.d.ts +47 -4
  266. package/dist/cli/run/adapters/permission-modes.d.ts.map +1 -1
  267. package/dist/cli/run/adapters/permission-modes.js +113 -37
  268. package/dist/cli/run/adapters/permission-modes.js.map +1 -1
  269. package/dist/cli/run/adapters/permission-modes.test.js +55 -40
  270. package/dist/cli/run/adapters/permission-modes.test.js.map +1 -1
  271. package/dist/cli/run/adapters/stub-cli.test-helper.d.ts +22 -0
  272. package/dist/cli/run/adapters/stub-cli.test-helper.d.ts.map +1 -0
  273. package/dist/cli/run/adapters/stub-cli.test-helper.js +73 -0
  274. package/dist/cli/run/adapters/stub-cli.test-helper.js.map +1 -0
  275. package/dist/cli/run/platform.d.ts +52 -0
  276. package/dist/cli/run/platform.d.ts.map +1 -0
  277. package/dist/cli/run/platform.js +207 -0
  278. package/dist/cli/run/platform.js.map +1 -0
  279. package/dist/cli/run/platform.test.d.ts +2 -0
  280. package/dist/cli/run/platform.test.d.ts.map +1 -0
  281. package/dist/cli/run/platform.test.js +119 -0
  282. package/dist/cli/run/platform.test.js.map +1 -0
  283. package/dist/cli/run/schema.d.ts +6 -8
  284. package/dist/cli/run/schema.d.ts.map +1 -1
  285. package/dist/cli/run/schema.js +44 -68
  286. package/dist/cli/run/schema.js.map +1 -1
  287. package/dist/cli/run/schema.test.js +59 -279
  288. package/dist/cli/run/schema.test.js.map +1 -1
  289. package/dist/cli/run.d.ts +34 -56
  290. package/dist/cli/run.d.ts.map +1 -1
  291. package/dist/cli/run.js +379 -1132
  292. package/dist/cli/run.js.map +1 -1
  293. package/dist/cli/run.test.d.ts +2 -0
  294. package/dist/cli/run.test.d.ts.map +1 -0
  295. package/dist/cli/run.test.js +318 -0
  296. package/dist/cli/run.test.js.map +1 -0
  297. package/dist/cli/sync-check.d.ts.map +1 -1
  298. package/dist/cli/sync-check.js +12 -3
  299. package/dist/cli/sync-check.js.map +1 -1
  300. package/dist/cli/sync.d.ts.map +1 -1
  301. package/dist/cli/sync.js +3 -2
  302. package/dist/cli/sync.js.map +1 -1
  303. package/dist/cli/team-config.d.ts.map +1 -1
  304. package/dist/cli/team-config.js +2 -21
  305. package/dist/cli/team-config.js.map +1 -1
  306. package/dist/cli/tiers.test.js +4 -13
  307. package/dist/cli/tiers.test.js.map +1 -1
  308. package/dist/cli/update.d.ts.map +1 -1
  309. package/dist/cli/update.js +4 -3
  310. package/dist/cli/update.js.map +1 -1
  311. package/dist/cli/website-plugins.test.js +51 -2
  312. package/dist/cli/website-plugins.test.js.map +1 -1
  313. package/dist/orchestrator/plugins/coolify/config.d.ts.map +1 -1
  314. package/dist/orchestrator/plugins/coolify/config.js +13 -0
  315. package/dist/orchestrator/plugins/coolify/config.js.map +1 -1
  316. package/dist/orchestrator/plugins/sentry/config.d.ts.map +1 -1
  317. package/dist/orchestrator/plugins/sentry/config.js +13 -0
  318. package/dist/orchestrator/plugins/sentry/config.js.map +1 -1
  319. package/package.json +3 -10
  320. package/src/cli/adapters/claude-code.ts +7 -3
  321. package/src/cli/adapters/single-file-base.ts +47 -4
  322. package/src/cli/agent-plugin.test.ts +14 -0
  323. package/src/cli/agent-roster.test.ts +0 -55
  324. package/src/cli/bootstrap.ts +23 -0
  325. package/src/cli/boundary.test.ts +9 -7
  326. package/src/cli/ci.ts +6 -4
  327. package/src/cli/command-namespace.test.ts +35 -0
  328. package/src/cli/convoy/TELEMETRY.md +138 -130
  329. package/src/cli/convoy/artifacts.test.ts +4 -2
  330. package/src/cli/convoy/artifacts.ts +13 -12
  331. package/src/cli/convoy/engine.git.test.ts +462 -0
  332. package/src/cli/convoy/engine.test.ts +817 -850
  333. package/src/cli/convoy/engine.ts +1864 -2596
  334. package/src/cli/convoy/event-schemas.ts +63 -59
  335. package/src/cli/convoy/events.test.ts +58 -9
  336. package/src/cli/convoy/events.ts +69 -91
  337. package/src/cli/convoy/gates.ts +31 -12
  338. package/src/cli/convoy/isolation.test.ts +76 -43
  339. package/src/cli/convoy/isolation.ts +100 -38
  340. package/src/cli/convoy/lock.test.ts +16 -0
  341. package/src/cli/convoy/lock.ts +25 -8
  342. package/src/cli/convoy/merge.test.ts +25 -1
  343. package/src/cli/convoy/merge.ts +74 -61
  344. package/src/cli/convoy/progress.test.ts +59 -0
  345. package/src/cli/convoy/progress.ts +121 -0
  346. package/src/cli/convoy/read-model.test.ts +685 -0
  347. package/src/cli/convoy/read-model.ts +1469 -0
  348. package/src/cli/convoy/redact.test.ts +49 -0
  349. package/src/cli/convoy/redact.ts +73 -0
  350. package/src/cli/convoy/reviewer.test.ts +112 -0
  351. package/src/cli/convoy/reviewer.ts +196 -0
  352. package/src/cli/convoy/schedule.test.ts +56 -0
  353. package/src/cli/convoy/schedule.ts +109 -0
  354. package/src/cli/convoy/spec-builder.test.ts +460 -464
  355. package/src/cli/convoy/spec-builder.ts +460 -129
  356. package/src/cli/convoy/spec-types.ts +46 -108
  357. package/src/cli/convoy/store.test.ts +64 -13
  358. package/src/cli/convoy/store.ts +143 -33
  359. package/src/cli/convoy/types.ts +59 -71
  360. package/src/cli/convoy/worktree.test.ts +140 -1
  361. package/src/cli/convoy/worktree.ts +311 -61
  362. package/src/cli/convoy-args.test.ts +10 -30
  363. package/src/cli/convoy-cmd.test.ts +163 -0
  364. package/src/cli/convoy-cmd.ts +173 -215
  365. package/src/cli/dashboard/dashboard.css +2086 -0
  366. package/src/cli/dashboard/dashboard.js +1687 -0
  367. package/src/cli/dashboard/index.html +307 -0
  368. package/src/cli/dashboard.test.ts +382 -0
  369. package/src/cli/dashboard.ts +243 -339
  370. package/src/cli/dispatcher.test.ts +43 -2
  371. package/src/cli/docs-accuracy.test.ts +37 -10
  372. package/src/cli/doctor.ts +9 -6
  373. package/src/cli/init-own-files.test.ts +156 -0
  374. package/src/cli/init.test.ts +5 -4
  375. package/src/cli/init.ts +104 -7
  376. package/src/cli/layers.ts +13 -4
  377. package/src/cli/lesson.ts +6 -5
  378. package/src/cli/log.test.ts +228 -0
  379. package/src/cli/log.ts +302 -83
  380. package/src/cli/nearest.test.ts +27 -0
  381. package/src/cli/nearest.ts +38 -0
  382. package/src/cli/pipeline.flow.test.ts +607 -0
  383. package/src/cli/pipeline.ts +544 -759
  384. package/src/cli/plan.test.ts +193 -0
  385. package/src/cli/plan.ts +209 -545
  386. package/src/cli/prompt.test.ts +21 -2
  387. package/src/cli/prompt.ts +11 -7
  388. package/src/cli/remove.ts +3 -0
  389. package/src/cli/review.ts +7 -1
  390. package/src/cli/run/adapters/agent-process.test.ts +175 -0
  391. package/src/cli/run/adapters/agent-process.ts +252 -0
  392. package/src/cli/run/adapters/claude.test.ts +205 -260
  393. package/src/cli/run/adapters/claude.ts +151 -162
  394. package/src/cli/run/adapters/codex.test.ts +120 -100
  395. package/src/cli/run/adapters/codex.ts +115 -91
  396. package/src/cli/run/adapters/copilot.test.ts +135 -306
  397. package/src/cli/run/adapters/copilot.ts +105 -274
  398. package/src/cli/run/adapters/cursor.test.ts +111 -220
  399. package/src/cli/run/adapters/cursor.ts +105 -156
  400. package/src/cli/run/adapters/index.test.ts +148 -0
  401. package/src/cli/run/adapters/index.ts +168 -20
  402. package/src/cli/run/adapters/opencode.test.ts +106 -227
  403. package/src/cli/run/adapters/opencode.ts +139 -151
  404. package/src/cli/run/adapters/permission-modes.test.ts +63 -41
  405. package/src/cli/run/adapters/permission-modes.ts +118 -37
  406. package/src/cli/run/adapters/stub-cli.test-helper.ts +88 -0
  407. package/src/cli/run/platform.test.ts +128 -0
  408. package/src/cli/run/platform.ts +213 -0
  409. package/src/cli/run/schema.test.ts +62 -344
  410. package/src/cli/run/schema.ts +48 -78
  411. package/src/cli/run.test.ts +351 -0
  412. package/src/cli/run.ts +366 -1151
  413. package/src/cli/sync-check.ts +12 -3
  414. package/src/cli/sync.ts +3 -2
  415. package/src/cli/team-config.ts +2 -21
  416. package/src/cli/tiers.test.ts +4 -17
  417. package/src/cli/update.ts +4 -3
  418. package/src/cli/website-plugins.test.ts +55 -5
  419. package/src/orchestrator/agents/team-lead.agent.md +2 -2
  420. package/src/orchestrator/customizations/README.md +58 -13
  421. package/src/orchestrator/customizations/logs/README.md +23 -18
  422. package/src/orchestrator/instructions/general.instructions.md +1 -1
  423. package/src/orchestrator/plugins/coolify/config.ts +13 -0
  424. package/src/orchestrator/plugins/sentry/config.ts +13 -0
  425. package/src/orchestrator/prompts/assess-complexity.prompt.md +43 -26
  426. package/src/orchestrator/prompts/bootstrap-customizations.prompt.md +44 -49
  427. package/src/orchestrator/prompts/brainstorm.prompt.md +2 -2
  428. package/src/orchestrator/prompts/bug-fix.prompt.md +5 -4
  429. package/src/orchestrator/prompts/create-skill.prompt.md +29 -39
  430. package/src/orchestrator/prompts/fix-convoy.prompt.md +43 -29
  431. package/src/orchestrator/prompts/fix-prd.prompt.md +26 -22
  432. package/src/orchestrator/prompts/generate-convoy.prompt.md +139 -147
  433. package/src/orchestrator/prompts/generate-prd.prompt.md +75 -68
  434. package/src/orchestrator/prompts/implement-feature.prompt.md +7 -6
  435. package/src/orchestrator/prompts/validate-convoy.prompt.md +29 -28
  436. package/src/orchestrator/prompts/validate-prd.prompt.md +28 -21
  437. package/src/orchestrator/skills/agent-hooks/HOOKS-REFERENCE.md +3 -3
  438. package/src/orchestrator/skills/agent-hooks/SKILL.md +1 -1
  439. package/src/orchestrator/skills/fast-review/SKILL.md +3 -1
  440. package/src/orchestrator/skills/orchestration-protocols/SKILL.md +7 -8
  441. package/dist/cli/convoy/dag-analysis.d.ts +0 -39
  442. package/dist/cli/convoy/dag-analysis.d.ts.map +0 -1
  443. package/dist/cli/convoy/dag-analysis.js +0 -279
  444. package/dist/cli/convoy/dag-analysis.js.map +0 -1
  445. package/dist/cli/convoy/dag-analysis.test.d.ts +0 -2
  446. package/dist/cli/convoy/dag-analysis.test.d.ts.map +0 -1
  447. package/dist/cli/convoy/dag-analysis.test.js +0 -289
  448. package/dist/cli/convoy/dag-analysis.test.js.map +0 -1
  449. package/dist/cli/convoy/formula.d.ts +0 -19
  450. package/dist/cli/convoy/formula.d.ts.map +0 -1
  451. package/dist/cli/convoy/formula.js +0 -142
  452. package/dist/cli/convoy/formula.js.map +0 -1
  453. package/dist/cli/convoy/formula.test.d.ts +0 -2
  454. package/dist/cli/convoy/formula.test.d.ts.map +0 -1
  455. package/dist/cli/convoy/formula.test.js +0 -342
  456. package/dist/cli/convoy/formula.test.js.map +0 -1
  457. package/dist/cli/convoy/health.d.ts +0 -34
  458. package/dist/cli/convoy/health.d.ts.map +0 -1
  459. package/dist/cli/convoy/health.js +0 -123
  460. package/dist/cli/convoy/health.js.map +0 -1
  461. package/dist/cli/convoy/health.test.d.ts +0 -2
  462. package/dist/cli/convoy/health.test.d.ts.map +0 -1
  463. package/dist/cli/convoy/health.test.js +0 -448
  464. package/dist/cli/convoy/health.test.js.map +0 -1
  465. package/dist/cli/convoy/last-run.d.ts +0 -53
  466. package/dist/cli/convoy/last-run.d.ts.map +0 -1
  467. package/dist/cli/convoy/last-run.js +0 -54
  468. package/dist/cli/convoy/last-run.js.map +0 -1
  469. package/dist/cli/convoy/last-run.test.d.ts +0 -2
  470. package/dist/cli/convoy/last-run.test.d.ts.map +0 -1
  471. package/dist/cli/convoy/last-run.test.js +0 -110
  472. package/dist/cli/convoy/last-run.test.js.map +0 -1
  473. package/dist/cli/convoy/pipeline.d.ts +0 -41
  474. package/dist/cli/convoy/pipeline.d.ts.map +0 -1
  475. package/dist/cli/convoy/pipeline.js +0 -414
  476. package/dist/cli/convoy/pipeline.js.map +0 -1
  477. package/dist/cli/convoy/pipeline.test.d.ts +0 -2
  478. package/dist/cli/convoy/pipeline.test.d.ts.map +0 -1
  479. package/dist/cli/convoy/pipeline.test.js +0 -837
  480. package/dist/cli/convoy/pipeline.test.js.map +0 -1
  481. package/dist/cli/convoy/review-stages.d.ts +0 -9
  482. package/dist/cli/convoy/review-stages.d.ts.map +0 -1
  483. package/dist/cli/convoy/review-stages.js +0 -134
  484. package/dist/cli/convoy/review-stages.js.map +0 -1
  485. package/dist/cli/convoy/review-stages.test.d.ts +0 -2
  486. package/dist/cli/convoy/review-stages.test.d.ts.map +0 -1
  487. package/dist/cli/convoy/review-stages.test.js +0 -197
  488. package/dist/cli/convoy/review-stages.test.js.map +0 -1
  489. package/dist/cli/run/executor.d.ts +0 -15
  490. package/dist/cli/run/executor.d.ts.map +0 -1
  491. package/dist/cli/run/executor.js +0 -249
  492. package/dist/cli/run/executor.js.map +0 -1
  493. package/dist/cli/run/executor.test.d.ts +0 -2
  494. package/dist/cli/run/executor.test.d.ts.map +0 -1
  495. package/dist/cli/run/executor.test.js +0 -297
  496. package/dist/cli/run/executor.test.js.map +0 -1
  497. package/dist/cli/run/reporter.d.ts +0 -10
  498. package/dist/cli/run/reporter.d.ts.map +0 -1
  499. package/dist/cli/run/reporter.js +0 -142
  500. package/dist/cli/run/reporter.js.map +0 -1
  501. package/dist/cli/run-dry-run.test.d.ts +0 -2
  502. package/dist/cli/run-dry-run.test.d.ts.map +0 -1
  503. package/dist/cli/run-dry-run.test.js +0 -83
  504. package/dist/cli/run-dry-run.test.js.map +0 -1
  505. package/dist/cli/run-executor-flags.test.d.ts +0 -2
  506. package/dist/cli/run-executor-flags.test.d.ts.map +0 -1
  507. package/dist/cli/run-executor-flags.test.js +0 -31
  508. package/dist/cli/run-executor-flags.test.js.map +0 -1
  509. package/dist/cli/run-finish.test.d.ts +0 -2
  510. package/dist/cli/run-finish.test.d.ts.map +0 -1
  511. package/dist/cli/run-finish.test.js +0 -77
  512. package/dist/cli/run-finish.test.js.map +0 -1
  513. package/dist/cli/watch.d.ts +0 -15
  514. package/dist/cli/watch.d.ts.map +0 -1
  515. package/dist/cli/watch.js +0 -277
  516. package/dist/cli/watch.js.map +0 -1
  517. package/dist/dashboard/scripts/etl.d.ts +0 -10
  518. package/dist/dashboard/scripts/etl.d.ts.map +0 -1
  519. package/dist/dashboard/scripts/etl.js +0 -141
  520. package/dist/dashboard/scripts/etl.js.map +0 -1
  521. package/src/cli/convoy/dag-analysis.test.ts +0 -349
  522. package/src/cli/convoy/dag-analysis.ts +0 -367
  523. package/src/cli/convoy/formula.test.ts +0 -404
  524. package/src/cli/convoy/formula.ts +0 -174
  525. package/src/cli/convoy/health.test.ts +0 -519
  526. package/src/cli/convoy/health.ts +0 -189
  527. package/src/cli/convoy/last-run.test.ts +0 -130
  528. package/src/cli/convoy/last-run.ts +0 -87
  529. package/src/cli/convoy/pipeline.test.ts +0 -999
  530. package/src/cli/convoy/pipeline.ts +0 -492
  531. package/src/cli/convoy/review-stages.test.ts +0 -235
  532. package/src/cli/convoy/review-stages.ts +0 -166
  533. package/src/cli/run/executor.test.ts +0 -338
  534. package/src/cli/run/executor.ts +0 -292
  535. package/src/cli/run/reporter.ts +0 -160
  536. package/src/cli/run-dry-run.test.ts +0 -97
  537. package/src/cli/run-executor-flags.test.ts +0 -38
  538. package/src/cli/run-finish.test.ts +0 -91
  539. package/src/cli/watch.ts +0 -295
  540. package/src/dashboard/astro.config.mjs +0 -6
  541. package/src/dashboard/dist/_astro/index.CADNhRPS.css +0 -1
  542. package/src/dashboard/dist/data/.gitkeep +0 -0
  543. package/src/dashboard/dist/data/convoy-list.json +0 -1
  544. package/src/dashboard/dist/data/overall-stats.json +0 -29
  545. package/src/dashboard/dist/index.html +0 -1963
  546. package/src/dashboard/node_modules/.vite/deps/_metadata.json +0 -31
  547. package/src/dashboard/node_modules/.vite/deps/astro___aria-query.js +0 -6776
  548. package/src/dashboard/node_modules/.vite/deps/astro___aria-query.js.map +0 -7
  549. package/src/dashboard/node_modules/.vite/deps/astro___axobject-query.js +0 -3754
  550. package/src/dashboard/node_modules/.vite/deps/astro___axobject-query.js.map +0 -7
  551. package/src/dashboard/node_modules/.vite/deps/astro___cssesc.js +0 -99
  552. package/src/dashboard/node_modules/.vite/deps/astro___cssesc.js.map +0 -7
  553. package/src/dashboard/node_modules/.vite/deps/chunk-BUSYA2B4.js +0 -8
  554. package/src/dashboard/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +0 -7
  555. package/src/dashboard/node_modules/.vite/deps/package.json +0 -3
  556. package/src/dashboard/package-lock.json +0 -6
  557. package/src/dashboard/public/data/.gitkeep +0 -0
  558. package/src/dashboard/public/data/convoy-list.json +0 -1
  559. package/src/dashboard/public/data/overall-stats.json +0 -29
  560. package/src/dashboard/public/icon-192.png +0 -0
  561. package/src/dashboard/scripts/etl.test.ts +0 -166
  562. package/src/dashboard/scripts/etl.ts +0 -170
  563. package/src/dashboard/scripts/generate-demo-db.test.ts +0 -30
  564. package/src/dashboard/scripts/generate-demo-db.ts +0 -529
  565. package/src/dashboard/scripts/integration-test.ts +0 -504
  566. package/src/dashboard/scripts/verify-demo-data.sh +0 -51
  567. package/src/dashboard/seed-data/delegations.ndjson +0 -35
  568. package/src/dashboard/seed-data/events.ndjson +0 -104
  569. package/src/dashboard/seed-data/panels.ndjson +0 -13
  570. package/src/dashboard/seed-data/reviews.ndjson +0 -6
  571. package/src/dashboard/seed-data/sessions.ndjson +0 -50
  572. package/src/dashboard/src/env.d.ts +0 -1
  573. package/src/dashboard/src/layouts/Layout.astro +0 -25
  574. package/src/dashboard/src/pages/index.astro +0 -2313
  575. package/src/dashboard/src/styles/dashboard.css +0 -2943
  576. package/src/dashboard/tsconfig.json +0 -6
  577. /package/src/{dashboard/dist → cli/dashboard}/icon-192.png +0 -0
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: 'Assess PRD complexity and recommend convoy strategy (single vs chain). Returns structured JSON consumed by the pipeline.'
2
+ description: 'Size the work in a PRD, score each workstream, and say whether to plan it in one go or as groups planned side by side. Returns JSON.'
3
3
  agent: 'Reviewer'
4
4
  output: json
5
5
  ---
@@ -8,21 +8,29 @@ output: json
8
8
 
9
9
  # Assess PRD Complexity
10
10
 
11
- Analyze the PRD below; produce complexity assessment as **single JSON object**. Consumed programmatically by pipeline to decide whether to generate one convoy spec or chain of convoy specs.
11
+ Analyze the PRD at the end of this prompt — or, before a PRD exists, the request itself — and answer with a **single JSON object**.
12
12
 
13
- ## PRD to Analyze
13
+ ## What Happens to Your Answer
14
14
 
15
- {{goal}}
15
+ `opencastle convoy` runs this step first on the request:
16
16
 
17
- ## Original User Prompt
17
+ - `"complexity": "low"` with `"recommended_strategy": "single"` means the plan is written straight from the request, with no PRD. Answer `low` only when one or two agents can do the whole change in a session each.
18
+ - Otherwise a PRD is written, and your answer is used for it, unless you recommend `"chain"`: then the PRD is sized again, beside its review, so the groups can name its phases.
18
19
 
19
- {{context}}
20
+ What the answer drives:
20
21
 
21
- ---
22
+ - The `task_complexity` scores go to the planner, which uses them to set each task's timeout, retries and review level.
23
+ - With `"recommended_strategy": "chain"` and groups that pass the checks below, each group is planned in a session of its own, all at the same time, each seeing only its own phases of the PRD. The plans are then joined into one spec: a group's first tasks wait for the last tasks of every group in its `depends_on`, and groups that do not depend on each other run side by side.
24
+ - Otherwise — `"single"`, or groups that fail the checks — the whole PRD is planned in one session.
25
+ - Your answer is cached against the PRD's exact text, so an unchanged PRD is not assessed twice.
26
+
27
+ The group checks: at most 3 groups when `total_tasks` is 15 or fewer, at most 4 above that; every group has at least one phase; no phase is in two groups; `depends_on` names only groups in the list; no cycles; names are kebab-case.
28
+
29
+ This session is read-only; answer in text.
22
30
 
23
31
  ## Output Rules
24
32
 
25
- **CRITICAL:** Return ONLY single fenced JSON block — no prose, no explanation, no markdown headings. Start with opening fence; end with closing fence.
33
+ **CRITICAL:** Return ONLY a single fenced JSON block — no prose, no explanation, no headings. Start with the opening fence and end with the closing fence.
26
34
 
27
35
  ## Required JSON Schema
28
36
 
@@ -57,24 +65,33 @@ Analyze the PRD below; produce complexity assessment as **single JSON object**.
57
65
 
58
66
  ## Field Rules
59
67
 
60
- - `original_prompt`: Copy user's original feature request verbatim from "Original User Prompt" section above. If empty, extract one-sentence summary from PRD's Overview section.
61
- - `total_tasks`: Count of individual workstreams in the Task Breakdown.
62
- - `total_phases`: Count of phases in the Task Breakdown.
63
- - `domains`: List of technical domains involved (e.g., "frontend", "api", "database", "testing", "config").
64
- - `estimated_duration_minutes`: Rough estimate assuming AI agent execution (not human).
65
- - `complexity`: `"low"` (1–4 tasks), `"medium"` (5–8 tasks), `"high"` (9+ tasks).
68
+ - `original_prompt`: The user's request, copied verbatim from "Original User Prompt" below. If that section is empty, a one-sentence summary of the PRD's Overview.
69
+ - `total_tasks`: Number of workstreams in the Task Breakdown.
70
+ - `total_phases`: Number of phases in the Task Breakdown.
71
+ - `domains`: Technical domains involved (e.g. "frontend", "api", "database", "testing", "config").
72
+ - `estimated_duration_minutes`: A rough estimate for AI agents doing the work, not people.
73
+ - `complexity`: `"low"` (1–4 workstreams), `"medium"` (5–8), `"high"` (9+).
66
74
  - `recommended_strategy`:
67
- - `"single"` when: total tasks ≤ 8, OR total phases ≤ 3, OR all tasks are tightly coupled with heavy cross-phase file sharing.
68
- - `"chain"` when: total tasks > 8 AND total phases > 3 AND domains have natural boundaries — AND splitting improves failure isolation, observability, or retry granularity.
69
- - `chain_rationale`: Only filled when `recommended_strategy` is `"chain"` — explain WHY splitting benefits this feature.
75
+ - `"single"` when: 8 or fewer workstreams, OR 3 or fewer phases, OR the workstreams share files heavily across phases.
76
+ - `"chain"` when: more than 8 workstreams AND more than 3 phases AND the work splits along real domain boundaries — so the groups can be planned in parallel, each from a smaller part of the PRD.
77
+ - `chain_rationale`: Only for `"chain"` — why splitting helps this feature.
70
78
  - `convoy_groups`:
71
- - When `"single"`: exactly one group covering all phases.
72
- - When `"chain"`: 2–4 groups with explicit `depends_on` order. Each group covers a coherent domain boundary.
73
- - **Minimum 3 tasks per group.** Never create a group producing a convoy with only 1–2 tasks — merge small groups with adjacent ones. Single-task convoy is pointless overhead.
74
- - **Do NOT map phases 1:1 to groups.** Bundle multiple related phases when tasks are tightly coupled (e.g., config + data in one group, components + pages in another). Only split at genuine domain boundaries where failure isolation matters.
75
- - Maximum 3 groups for projects with ≤ 15 tasks. Maximum 4 groups for 16+ tasks.
76
- - `task_complexity`: Array of per-workstream complexity assessments using Fibonacci scale.
77
- - `workstream`: Exact workstream title from PRD's Task Breakdown section.
78
- - `phase`: Phase number workstream belongs to.
79
- - `complexity`: Fibonacci score: `1` (trivial — single file edit), `2` (simple — small fix, one test), `3` (moderate — new component/endpoint), `5` (significant — multi-file feature), `8` (complex — cross-cutting), `13` (epic — architecture-level).
79
+ - For `"single"`: exactly one group covering every phase.
80
+ - For `"chain"`: 2–4 groups. Use `depends_on` only where a group really needs another's output — groups without it run side by side.
81
+ - **At least 3 workstreams per group.** Merge a smaller group into a neighbour.
82
+ - **Do not map phases 1:1 to groups.** Bundle related phases (e.g. config + data in one group, components + pages in another). Split only at real domain boundaries.
83
+ - `task_complexity`: One entry per workstream, on a Fibonacci scale.
84
+ - `workstream`: The workstream's exact title from the Task Breakdown.
85
+ - `phase`: The phase it belongs to.
86
+ - `complexity`: `1` (trivial — one file), `2` (simple — small fix, one test), `3` (moderate — new component or endpoint), `5` (significant — multi-file feature), `8` (complex — cross-cutting), `13` (epic — architecture-level).
80
87
  - `rationale`: One sentence explaining the score.
88
+
89
+ ---
90
+
91
+ ## PRD to Analyze
92
+
93
+ {{goal}}
94
+
95
+ ## Original User Prompt
96
+
97
+ {{context}}
@@ -23,39 +23,32 @@ Without customizations, agents operate blind — they don't know project's table
23
23
 
24
24
  ## Pre-Existing Setup
25
25
 
26
- ### `.opencastle.json` — Detection Data
26
+ ### `.opencastle/manifest.json` — Detection Data
27
27
 
28
- The project root contains **`.opencastle.json`** with a `repoInfo` field populated by `opencastle init`. It merges two sources:
28
+ `opencastle init` writes **`.opencastle/manifest.json`**. Two of its fields matter here:
29
29
 
30
- 1. **Auto-detected tooling** — init command scanned config files, `package.json` dependencies, and directory structures
31
- 2. **User-declared choices** — user selected CMS, database, project management, notifications via interactive questionnaire
30
+ 1. **`repoInfo`** — what init detected by scanning config files, `package.json` dependencies, and directory structures
31
+ 2. **`stack`** — the integrations installed: the ones init detected and the user confirmed, picked with `opencastle init --customize`, or added later with `opencastle add <pack>`
32
32
 
33
- Result: single unified view of project's tech stack:
33
+ Example:
34
34
 
35
35
  ```json
36
36
  {
37
+ "stack": {
38
+ "ides": ["vscode"],
39
+ "techTools": ["nextjs", "supabase", "vitest", "chrome-devtools"],
40
+ "teamTools": ["linear", "slack"]
41
+ },
37
42
  "repoInfo": {
38
43
  "packageManager": "pnpm",
39
- "monorepo": "nx",
40
44
  "language": "typescript",
41
- "frameworks": ["next", "astro"],
42
- "databases": ["prisma", "supabase"],
43
- "cms": ["sanity"],
45
+ "frameworks": ["next"],
46
+ "databases": ["supabase"],
44
47
  "deployment": ["vercel"],
45
- "testing": ["playwright", "vitest"],
46
- "cicd": ["github-actions"],
47
- "styling": ["css-modules", "tailwind"],
48
- "auth": ["next-auth", "supabase-auth"],
49
- "pm": ["linear"],
50
- "notifications": ["slack"],
48
+ "testing": ["vitest", "chrome-devtools"],
49
+ "styling": ["tailwind"],
51
50
  "mcpConfig": true,
52
- "configFiles": ["nx.json", "package.json", "tsconfig.json", "vercel.json"]
53
- },
54
- "stack": {
55
- "cms": "sanity",
56
- "db": "supabase",
57
- "pm": "linear",
58
- "notifications": "slack"
51
+ "configFiles": ["package.json", "tsconfig.json", "vercel.json", "vitest.config.ts"]
59
52
  }
60
53
  }
61
54
  ```
@@ -63,9 +56,8 @@ Result: single unified view of project's tech stack:
63
56
  **Use `repoInfo` to:**
64
57
  - Know which technologies are present — skip re-scanning, go straight to reading their config files
65
58
  - Identify `configFiles` to read for deep inspection
66
- - Know which `project/` config files to create if missing (e.g., if `repoInfo.pm` includes `"linear"`, ensure `project/linear-config.md` exists)
67
59
 
68
- **`stack` vs `repoInfo`:** The `stack` field holds the raw user questionnaire answers (used internally for MCP server filtering and skill selection). The `repoInfo` field is the combined view you should use — it includes everything from `stack` plus all auto-detected tooling.
60
+ **Use `stack` to:** know which integrations are installed. If `stack.teamTools` or `repoInfo.pm` names a tracker (`linear`, `jira`, `trello`), ensure `project/<tracker>-config.md` exists — init creates it only for a tracker it knew about at the time; one added later with `opencastle add` has none yet.
69
61
 
70
62
  **Still inspect:** `repoInfo` detects presence, not configuration details. You still need to read the actual config files for schemas, IDs, routes, etc.
71
63
 
@@ -82,15 +74,17 @@ Programmatic bootstrap running during `opencastle init` already created, partial
82
74
  | `stack/deployment-config.md` | Deployment platforms and config file paths | Env var names, cron jobs, security headers, caching strategy |
83
75
  | `stack/<provider>-config.md` | Database provider name and config file paths (e.g., `supabase-config.md`) | Table/schema inventory, RLS policies, auth integration details |
84
76
  | `stack/<provider>-config.md` | CMS provider name and config file paths (e.g., `sanity-config.md`) | Content model inventory, query patterns, project IDs |
77
+ | `stack/api-config.md` | Framework name and empty endpoint tables (only when init detected a framework) | Route handler and Server Action inventory |
78
+ | `project/<tracker>-config.md` | Template (only when init knew about the tracker) | Team IDs, workflow states, labels |
79
+ | `project/docs-structure.md` | The `.opencastle/` documentation files | The project's own docs directory |
80
+ | `agents/agent-registry.md`, `agents/skill-matrix.json`, `agents/skill-matrix.md` | Agent tiers and skill bindings for the installed integrations | Nothing in most projects — verify bindings |
85
81
  | `README.md`, `LESSONS-LEARNED.md`, `AGENT-FAILURES.md`, `AGENT-PERFORMANCE.md` | Full template content | Nothing — these are complete, just verify |
86
82
  | `logs/README.md`, `logs/events.ndjson` | Schema docs + empty log file | Nothing — these are complete |
87
83
 
88
- **Files that DON'T exist yet** (because they can't be auto-populated and must be created by you):
89
- - `stack/api-config.md` — requires reading actual route handlers and Server Actions
90
- - `project/linear-config.md` (or other tracker) — requires reading docs or team IDs
91
- - `project/docs-structure.md` — requires mapping the docs directory
92
- - `stack/data-pipeline-config.md` — requires reading pipeline scripts
93
- - `agents/agent-registry.md`, `agents/skill-matrix.json`, `agents/skill-matrix.md` — if `.github/agents/` and `.github/skills/` exist
84
+ **Files that may not exist yet** (create them only if the project needs them):
85
+ - `stack/api-config.md` — if the project has API routes or Server Actions but init detected no framework
86
+ - `project/<tracker>-config.md` — if a tracker is in use but has no config file (see `stack` above)
87
+ - `stack/data-pipeline-config.md` — init never creates it; requires reading pipeline scripts
94
88
 
95
89
  Any template file for technology NOT detected (no DB, no CMS, etc.) already removed.
96
90
 
@@ -105,7 +99,7 @@ Programmatic bootstrap already detected tech stack. **Skip re-scanning** — foc
105
99
  - **First**: Read all existing `.opencastle/` files to understand what's already filled in
106
100
  - Read `.opencastle/project.instructions.md` to see current tech stack table, gaps
107
101
  - Read each `stack/*.md` file — note any `<!-- TODO: verify -->` markers and empty table rows
108
- - Read `.opencastle.json` for `repoInfo` and `configFiles` — use `configFiles` as your reading list
102
+ - Read `.opencastle/manifest.json` for `repoInfo` and `configFiles` — use `configFiles` as your reading list
109
103
  - Note what's missing (empty sections, placeholders, TODO markers)
110
104
 
111
105
  #### 1.2 Deep Inspection
@@ -133,20 +127,20 @@ Target file structure for reference:
133
127
  ├── LESSONS-LEARNED.md # Already created — verify
134
128
  ├── AGENT-FAILURES.md # Already created — verify
135
129
  ├── AGENT-PERFORMANCE.md # Already created — verify
136
- ├── agents/ # Create if .github/agents/ and .github/skills/ exist
130
+ ├── agents/ # Already created — verify
137
131
  │ ├── agent-registry.md
138
132
  │ ├── skill-matrix.json
139
133
  │ └── skill-matrix.md
140
134
  ├── stack/ # Partial — update existing, create missing
141
- │ ├── api-config.md # Create — cannot be auto-populated
135
+ │ ├── api-config.md # Complete, or create if the project has API routes and it is missing
142
136
  │ ├── deployment-config.md # Already created — complete missing sections
143
137
  │ ├── testing-config.md # Already created — complete missing sections
144
138
  │ ├── <database>-config.md # Already created — complete schema/RLS details
145
139
  │ ├── <cms>-config.md # Already created — complete content model details
146
140
  │ └── data-pipeline-config.md # Create if pipelines exist
147
- ├── project/ # Create files that don't yet exist
148
- │ ├── docs-structure.md # Create if docs directory exists
149
- │ └── <tracker>-config.md # Create if task tracker configured
141
+ ├── project/ # Partial — update existing, create missing
142
+ │ ├── docs-structure.md # Already created — add the docs directory if one exists
143
+ │ └── <tracker>-config.md # Complete, or create if a tracker is in use and it is missing
150
144
  └── logs/ # Already created — do not touch
151
145
  ├── README.md
152
146
  └── events.ndjson
@@ -164,21 +158,22 @@ Target file structure for reference:
164
158
 
165
159
  3. **`LESSONS-LEARNED.md`**, **`AGENT-FAILURES.md`**, **`AGENT-PERFORMANCE.md`** — Already exist as templates. Verify they look correct — no changes needed.
166
160
 
167
- #### `agents/` — Agent Framework Config (create if `.github/agents/` exists)
161
+ #### `agents/` — Agent Framework Config (already created — verify)
162
+
163
+ `npx opencastle explain` lists the agents and skills compiled for this project, and where each assistant reads them.
168
164
 
169
- 4. **`agents/agent-registry.md`** — If `.github/agents/` exists with agent definitions:
170
- - List of agents with assigned model tiers
171
- - Scope descriptions
172
- - File partition examples
165
+ 4. **`agents/agent-registry.md`** — Already lists the agents with their tiers. **Complete**:
166
+ - Scope descriptions for this project
167
+ - File partition examples using this project's real paths
173
168
 
174
- 5. **`agents/skill-matrix.json`** — If `.github/skills/` exists with skill definitions:
175
- - Capability slot bindings and `directSkills` per agent role (in JSON format)
176
- - Which agents load which skills (slots for plugin skills, directSkills for process skills)
169
+ 5. **`agents/skill-matrix.json`** — Already holds capability slot bindings and `directSkills` per agent. **Verify**:
170
+ - Slot bindings point at skills that exist (`npx opencastle doctor` reports unresolved slots)
171
+ - Which agents load which skills (slots for integration skills, `directSkills` for process skills)
177
172
  - Note: `skill-matrix.md` is companion documentation file — JSON is source of truth
178
173
 
179
174
  #### `stack/` — Update Existing, Create Missing
180
175
 
181
- 6. **`stack/api-config.md`** — **Create** (cannot be auto-populated). If the project has API routes or Server Actions:
176
+ 6. **`stack/api-config.md`** — **Complete** it, or **create** it if the project has API routes or Server Actions and init did not:
182
177
  - Route handler inventory with HTTP methods
183
178
  - Server Actions inventory
184
179
  - External API integrations
@@ -223,12 +218,12 @@ Target file structure for reference:
223
218
 
224
219
  #### `project/` — Project Management Config (create missing files)
225
220
 
226
- 12. **`project/docs-structure.md`** — **Create** if a documentation directory exists:
221
+ 12. **`project/docs-structure.md`** — Already exists. **Complete** if the project has its own documentation directory:
227
222
  - Full directory tree
228
223
  - Purpose of each document
229
224
  - Documentation conventions
230
225
 
231
- 13. **Task tracker config** in `project/` (e.g., `project/linear-config.md`, `project/jira-config.md`) — **Create** if task tracking is configured:
226
+ 13. **Task tracker config** in `project/` (e.g., `project/linear-config.md`, `project/jira-config.md`) — **Complete** it, or **create** it if task tracking is in use and it is missing:
232
227
  - Team / project IDs
233
228
  - Workflow state IDs
234
229
  - Label / category IDs
@@ -242,7 +237,7 @@ Target file structure for reference:
242
237
 
243
238
  After generating all files:
244
239
 
245
- 1. **Check skill references** — For each skill in `.github/skills/`, verify it references the correct customization file (or note if a reference needs to be added)
240
+ 1. **Check skill references** — For each skill `npx opencastle explain` lists, verify it references the correct customization file (or note if a reference needs to be added)
246
241
  2. **Check for gaps** — Is there project-specific knowledge that doesn't fit any file? Create an appropriate new file
247
242
  3. **Check for staleness** — Does the generated content match the current state of the code? Flag anything uncertain with `<!-- TODO: verify -->`
248
243
 
@@ -265,7 +260,7 @@ Now that your `.opencastle/` configuration is complete, here's what you can do:
265
260
  2. **Implement a feature** — Use the **"Implement Feature"** prompt (`/oc:implement-feature` in Claude Code and Copilot) to have the Team Lead orchestrate a full feature build with task tracking, delegation, and verification
266
261
  3. **Fix a bug** — Use the **"Bug Fix"** prompt (`/oc:bug-fix`) for structured triage, root cause analysis, and fix with tracker tracking
267
262
  4. **Brainstorm first** — Not sure how to approach something? Use the **"Brainstorm"** prompt (`/oc:brainstorm`) to explore requirements and trade-offs before committing to a plan
268
- 5. **Generate a convoy spec** — Use the **"Generate Convoy"** prompt (`/oc:generate-convoy`) to create a `.convoy.yml` spec for autonomous convoy execution with `npx opencastle convoy run --file <spec>` CLI command.
263
+ 5. **Plan a larger change with the convoy engine (experimental)** — `npx opencastle convoy "<task>"` writes a PRD and a convoy spec to `.opencastle/convoys/<name>.convoy.yml`, then asks before running it
269
264
 
270
265
  ## Guidelines
271
266
 
@@ -126,12 +126,12 @@ Not every task needs brainstorm. Skip this prompt; go directly to `implement-fea
126
126
  - The task is a simple config change or docs update
127
127
  - Technical approach is obvious and unambiguous
128
128
  - The scope is a single file or component with no design decisions
129
- - The task is well-understood and can be expressed as a convoy spec directly → use `generate-convoy` instead
129
+ - The task is well-understood and can be expressed as a convoy spec directly → use `implement-feature`, which writes the spec
130
130
 
131
131
  ## After Brainstorming
132
132
 
133
133
  Once the brainstorm is complete and the user confirms (or you're confident in the approach):
134
134
 
135
- 1. **Transition to planning** — use the brainstorm report as input for `implement-feature` (which will choose between direct delegation and convoy execution based on task count)
135
+ 1. **Transition to planning** — use the brainstorm report as input for `implement-feature`, which writes a convoy spec for all project work, whatever its size, for the user to run with `npx opencastle convoy run .opencastle/convoys/<name>.convoy.yml` (the convoy engine is experimental)
136
136
  2. **Preserve context** — include the brainstorm report in delegation prompts so agents understand *why* an approach was chosen
137
137
  3. **Reference in tracker** — link the brainstorm findings in the tracker issue description
@@ -56,11 +56,12 @@ Every bug gets tracked. Create tracker issue with:
56
56
 
57
57
  ### 4. Implement the Fix
58
58
 
59
- All bug fixes execute via convoy engine — even single-task fixes — for observability, crash recovery.
59
+ All bug fixes execute via OpenCastle's convoy engine — even single-task fixes — for observability, crash recovery. The convoy engine is experimental; say so when you hand the spec over.
60
60
 
61
- 1. **Generate a convoy spec** — use the `generate-convoy` prompt with the root cause analysis, fix approach, and file paths as context.
62
- 2. **Hand the spec to the user** — tell them to run: `npx opencastle convoy run -f .opencastle/convoys/<name>.convoy.yml`
63
- 3. **After convoy completes** — proceed to Step 5 (validation).
61
+ 1. **Write the convoy spec** — plan the fix by the rules in the `generate-convoy` prompt, with the root cause analysis, fix approach, and file paths as context. That prompt returns JSON, which the CLI converts only when `npx opencastle convoy "<task>"` runs it; here, write the spec yourself as YAML to `.opencastle/convoys/<name>.convoy.yml`, with `version: 1` and the same fields. Use plain file paths (no `*` or `?`).
62
+ 2. **Check the spec** — run `npx opencastle convoy run .opencastle/convoys/<name>.convoy.yml --dry-run`. It runs the same checks a run does and prints what would run, without starting an agent or recording anything.
63
+ 3. **Hand the spec to the user** — tell them the convoy engine is experimental, and to run: `npx opencastle convoy run .opencastle/convoys/<name>.convoy.yml`. It runs each task in a git worktree made from the last commit, so the work it builds on must be committed; it runs on the agent runtime `opencastle init` set up, which must be installed and signed in (`--adapter <name>` picks another: claude, codex, cursor, opencode or copilot). The work lands on a branch of its own.
64
+ 4. **After convoy completes** — proceed to Step 5 (validation).
64
65
 
65
66
  #### Convoy Task Prompt Must Include
66
67
 
@@ -15,42 +15,42 @@ Scaffold new skill for AI agent configuration. Skills encode domain-specific kno
15
15
 
16
16
  ---
17
17
 
18
- ## Skill Types
18
+ ## Where Team Skills Live
19
19
 
20
- OpenCastle has two skill kinds with different locations, registration paths:
20
+ A skill you create is a team skill: one source file, compiled for every assistant in the project.
21
21
 
22
- | Type | Location | Bound Via | Purpose |
23
- |------|----------|-----------|---------|
24
- | **Process skill** | `skills/<name>/SKILL.md` | `directSkills` in skill-matrix.json | Stack-agnostic methodology (testing workflow, self-improvement, validation gates) |
25
- | **Plugin skill** | `plugins/<plugin>/SKILL.md` | Capability slot in the skill matrix | Technology-specific knowledge (CMS queries, database patterns, deployment config) |
22
+ | What | Where |
23
+ |------|-------|
24
+ | **The skill** | `.opencastle/skills/<name>/SKILL.md`, plus any companion files (e.g. `REFERENCE.md`) beside it |
25
+ | **Compiled copies** | Written by `npx opencastle sync` into each assistant's skill directory, and listed in each assistant's skill index — never edit them; the next sync replaces them |
26
26
 
27
- > **Rule of thumb:** If skill would need rewriting when switching technologies (e.g., Supabase → Convex), it belongs in a **plugin**. If useful regardless of stack, it's a **process skill**.
27
+ Agents load a skill when a task matches its `description`, so the description is what makes it found.
28
+
29
+ > **Rule of thumb:** If skill would need rewriting when switching technologies (e.g., Supabase → Convex), it is **technology-specific**: name the technology in its name and description. If useful regardless of stack, it is a **process skill**: keep it stack-agnostic.
28
30
 
29
31
  ---
30
32
 
31
33
  ## Workflow
32
34
 
33
- ### Step 1: Classify the Skill
34
-
35
- Determine the type:
35
+ ### Step 1: Check What Exists
36
36
 
37
- | Question | If Yes → | If No → |
38
- |----------|----------|---------|
39
- | Is this tied to a specific technology/tool? | Plugin skill | Process skill |
40
- | Would switching tech stacks invalidate this content? | Plugin skill | Process skill |
41
- | Does a plugin already exist for this tool in `plugins/`? | Add `SKILL.md` to existing plugin | Create new plugin or process skill |
37
+ | Question | If Yes → |
38
+ |----------|----------|
39
+ | Does a compiled skill already cover this? (`npx opencastle explain` lists every skill) | Improve it instead of adding a second one. A team skill with the same name as one of OpenCastle's replaces it for every assistant — copy the compiled `SKILL.md` into `.opencastle/skills/<name>/` and edit it there |
40
+ | Is it about a tool OpenCastle has an integration for? (`npx opencastle add --list`) | `npx opencastle add <pack>` installs that integration's skill; write a team skill only for what it lacks |
41
+ | Is it tied to a specific technology? | Technology-specific skill |
42
+ | Would switching tech stacks invalidate this content? | Technology-specific skill |
42
43
 
43
44
  ### Step 2: Name the Skill
44
45
 
45
- - Use `kebab-case`
46
- - **Process skills:** descriptive domain name (e.g., `testing-workflow`, `context-map`, `security-hardening`)
47
- - **Plugin skills:** `skillName` field in the plugin's `config.ts` (e.g., `sanity-cms`, `supabase-database`, `nx-workspace`)
48
- - Check existing skills in `skills/`, `plugins/` to avoid overlap
46
+ - Use `kebab-case`; the directory name is the skill's name
47
+ - **Process skills:** descriptive domain name (e.g., `deploy-runbook`, `release-checklist`, `incident-triage`)
48
+ - **Technology-specific skills:** lead with the technology (e.g., `supabase-rls`, `stripe-webhooks`)
49
+ - Check `.opencastle/skills/` and `npx opencastle explain` to avoid overlap
49
50
 
50
51
  ### Step 3: Create the Skill File
51
52
 
52
- **Process skill:** Create `skills/<skill-name>/SKILL.md`
53
- **Plugin skill:** Create `plugins/<plugin-name>/SKILL.md`
53
+ Create `.opencastle/skills/<skill-name>/SKILL.md`.
54
54
 
55
55
  Use this template:
56
56
 
@@ -98,31 +98,21 @@ description: "<Verb1> X, <verb2> Y, and <verb3> Z. Use when <scenario1>, <scenar
98
98
 
99
99
  If skill has large code examples (>30 lines), schema tables, or verbose reference material, create companion `REFERENCE.md` in same directory; link to it from SKILL.md. Keep SKILL.md as lean operational overview. Companion files must start with backlink: `> Parent: [SKILL.md](./SKILL.md)`.
100
100
 
101
- ### Step 4: Register the Skill
102
-
103
- Registration differs by type:
104
-
105
- #### Process Skill
106
-
107
- 1. **Add to skill matrix** — Add skill name to `directSkills` array of each relevant agent in `.opencastle/agents/skill-matrix.json`
108
- 2. **Optional: reference in instructions** — If skill should load by default, add to appropriate `.github/instructions/` file
109
-
110
- #### Plugin Skill
101
+ ### Step 4: Compile the Skill
111
102
 
112
- 1. **Set `skillName` in plugin's `config.ts`** — Connects skill to plugin
113
- 2. **Update skill matrix** — Add entry to matching capability slot's `entries` array in `.opencastle/agents/skill-matrix.json`
114
- 3. **No agent changes** — Agents resolve plugin skills through capability slots automatically
103
+ 1. **Run `npx opencastle sync`** — compiles the skill for every assistant in the project and adds it to each skill index. It reports `Compiled this project's own sources`.
104
+ 2. **Optional: load it by default** — to have an agent load the skill for every task rather than when a task matches it, add the skill name to that agent's `directSkills` array in `.opencastle/agents/skill-matrix.json` (agents are keyed by display name, e.g. `"Developer"`). Sync keeps this edit.
105
+ 3. **Commit** `.opencastle/skills/<skill-name>/` with the compiled files, so teammates get the skill on clone.
115
106
 
116
107
  ### Step 5: Validate
117
108
 
118
- - [ ] File created at correct path (`skills/` or `plugins/`)
119
- - [ ] Frontmatter has `name` and `description` fields
109
+ - [ ] File created at `.opencastle/skills/<skill-name>/SKILL.md`
110
+ - [ ] Frontmatter has `name` and `description` fields; `name` equals the directory name
120
111
  - [ ] Description is single line (no line breaks)
121
112
  - [ ] Content follows template structure
122
113
  - [ ] No overlap with existing skills
123
- - [ ] Skill matrix updated (`directSkills` array or capability slot binding)
124
- - [ ] For process skills: at least one agent's `directSkills` array includes it in skill-matrix.json
125
- - [ ] For plugin skills: `config.ts` `skillName` matches `name` in frontmatter
114
+ - [ ] `npx opencastle sync --check` passes — the compiled copies match the source
115
+ - [ ] `npx opencastle doctor` passes — it checks that every script and path a team skill names exists
126
116
  - [ ] Run `npx tessl skill review <path>` — target 100 score (see Scoring Criteria below)
127
117
 
128
118
  ## Scoring Criteria
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: 'Fix validation errors in convoy task plan by outputting targeted JSON patches.'
2
+ description: 'Fix the problems found in a convoy task plan with targeted JSON patches. Goal is the plan as JSON, context is the list of problems.'
3
3
  agent: 'Team Lead (OpenCastle)'
4
4
  output: json
5
5
  ---
@@ -8,30 +8,27 @@ output: json
8
8
 
9
9
  # Fix Task Plan
10
10
 
11
- You are the Team Lead. Task plan below has validation errors. Fix every error by outputting targeted JSON patches.
11
+ You are the Team Lead. The task plan at the end of this prompt has problems. Fix every one with targeted JSON patches.
12
12
 
13
- ## Task Plan
14
-
15
- ```json
16
- {{goal}}
17
- ```
13
+ ## What Happens to Your Answer
18
14
 
19
- ## Validation Errors
15
+ When `opencastle convoy` runs this step, your patches are applied to the plan, any glob in `files` is cut back to its directory, and the code checks the plan again:
20
16
 
21
- {{context}}
17
+ - **Problems from the code's checks** come back to you if they remain — at most twice in all. After that, if two tasks still claim the same file, the later one is made to wait for the earlier; any other problem stops the plan from running.
18
+ - **Problems from a reviewer** get one round, and your patches are kept only if the plan still passes the code's checks.
22
19
 
23
- ---
20
+ This session is read-only; answer in text.
24
21
 
25
22
  ## Instructions
26
23
 
27
- 1. Read every error before writing patches.
28
- 2. Fix ALL reported errors; do not partially fix.
29
- 3. Preserve intent, agent assignments, task scope. Only fix what is broken.
30
- 4. Each patch replaces ONE field on ONE task.
24
+ 1. Read every problem before writing patches.
25
+ 2. Fix ALL of them; do not fix some.
26
+ 3. Keep the plan's intent, agents and task scope. Change only what is broken.
27
+ 4. Each patch replaces ONE field of ONE task. You can change existing tasks, not add or remove them.
31
28
 
32
29
  ## Patch Format
33
30
 
34
- Output single `json` fenced code block with array of patches:
31
+ One `json` fenced block holding an array of patches:
35
32
 
36
33
  ```json
37
34
  [
@@ -46,25 +43,42 @@ Output single `json` fenced code block with array of patches:
46
43
  "value": ["project-scaffold", "shared-ui-components"]
47
44
  },
48
45
  {
49
- "task_id": "_plan",
50
- "field": "concurrency",
51
- "value": 2
46
+ "task_id": "a-third-task",
47
+ "field": "files",
48
+ "value": ["components/Hero.tsx"]
52
49
  }
53
50
  ]
54
51
  ```
55
52
 
56
- ### Patch fields
57
- - `task_id`: Task ID to modify, or `"_plan"` for top-level plan fields (`name`, `branch`, `concurrency`, `on_failure`, `gates`, `gate_retries`)
58
- - `field`: Field name to replace (`prompt`, `files`, `depends_on`, `agent`, `timeout`, `description`, `max_retries`, `review`, `gates`)
59
- - `value`: Complete new value (replaces old value entirely)
53
+ ### Patch Fields
54
+
55
+ - `task_id`: The id of the task to change, or `"_plan"` to rename the plan (`field: "name"`).
56
+ - `field`: `prompt`, `files`, `depends_on`, `agent`, `description`, `complexity` or `timeout`.
57
+ - `value`: The complete new value. It replaces the old one entirely.
60
58
 
61
- ### Common fixes
62
- - **Truncated prompt** → patch `field: "prompt"` with complete, self-contained prompt text
63
- - **Missing dependency** → patch `field: "depends_on"` with corrected array
64
- - **Partition conflict** → patch `field: "files"` to use specific paths, or patch `field: "depends_on"` to add sequencing
65
- - **Wrong agent** → patch `field: "agent"` with correct value from roster
66
- - **Vague prompt** → patch with detailed, file-specific prompt including acceptance criteria
59
+ ### Common Fixes
60
+
61
+ - **Two tasks claim the same file** → give each the specific files it changes (patch `files`), or patch `depends_on` so one runs after the other.
62
+ - **A pattern in `files`** → patch `files` with the actual files or their directory.
63
+ - **Unknown dependency** → patch `depends_on` with the right id, or without it.
64
+ - **Dependency cycle** → patch `depends_on` to drop the edge that points backwards.
65
+ - **Missing dependency** → patch `depends_on` to add it.
66
+ - **Missing work** → fold it into the closest task's `prompt` and `files`.
67
+ - **Truncated or vague prompt** → patch `prompt` with a complete, file-specific prompt that includes acceptance criteria.
68
+ - **Wrong agent** → patch `agent` with the right role.
67
69
 
68
70
  ## Output
69
71
 
70
- Your entire response must be single `json` fenced code block with patches array. No text before or after.
72
+ Your whole answer is one `json` fenced block holding the patch array. Nothing before or after it.
73
+
74
+ ---
75
+
76
+ ## Task Plan
77
+
78
+ ```json
79
+ {{goal}}
80
+ ```
81
+
82
+ ## Problems to Fix
83
+
84
+ {{context}}