@revisium/orchestrator 0.1.0-alpha.4 → 0.1.0-alpha.6

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 (465) hide show
  1. package/README.md +149 -1
  2. package/control-plane/bootstrap.config.json +1 -0
  3. package/control-plane/default-playbook/catalog/pipelines.json +289 -52
  4. package/control-plane/default-playbook/catalog/roles.json +9 -0
  5. package/control-plane/default-playbook/prompts/analyst.md +3 -1
  6. package/control-plane/default-playbook/prompts/reviewer.md +2 -2
  7. package/control-plane/default-playbook/prompts/triager.md +51 -0
  8. package/control-plane/default-playbook/prompts/watcher.md +2 -2
  9. package/dist/api/graphql-api/filters/agent-observability-exception.filter.js +24 -0
  10. package/dist/api/graphql-api/filters/agent-observability-exception.filter.js.map +1 -0
  11. package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js +36 -0
  12. package/dist/api/graphql-api/filters/graphql-validation-exception.filter.js.map +1 -0
  13. package/dist/api/graphql-api/graphql-api.module.js +77 -0
  14. package/dist/api/graphql-api/graphql-api.module.js.map +1 -0
  15. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js +296 -0
  16. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-bridge.service.js.map +1 -0
  17. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js +64 -0
  18. package/dist/api/graphql-api/graphql-ws/agent-observability-subscription-mappers.js.map +1 -0
  19. package/dist/api/graphql-api/graphql-ws/constants.js +11 -0
  20. package/dist/api/graphql-api/graphql-ws/constants.js.map +1 -0
  21. package/dist/api/graphql-api/graphql-ws/pubsub.module.js +32 -0
  22. package/dist/api/graphql-api/graphql-ws/pubsub.module.js.map +1 -0
  23. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js +101 -0
  24. package/dist/api/graphql-api/graphql-ws/run-progress-subscription-poller.service.js.map +1 -0
  25. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js +115 -0
  26. package/dist/api/graphql-api/graphql-ws/subscription-bridge.service.js.map +1 -0
  27. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js +85 -0
  28. package/dist/api/graphql-api/graphql-ws/subscription-mappers.js.map +1 -0
  29. package/dist/api/graphql-api/graphql-ws/ws.js +22 -0
  30. package/dist/api/graphql-api/graphql-ws/ws.js.map +1 -0
  31. package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js +56 -0
  32. package/dist/api/graphql-api/inbox/inbox-subscription.resolver.js.map +1 -0
  33. package/dist/api/graphql-api/inbox/inbox.resolver.js +125 -0
  34. package/dist/api/graphql-api/inbox/inbox.resolver.js.map +1 -0
  35. package/dist/api/graphql-api/inbox/inputs/answer-question.input.js +33 -0
  36. package/dist/api/graphql-api/inbox/inputs/answer-question.input.js.map +1 -0
  37. package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js +27 -0
  38. package/dist/api/graphql-api/inbox/inputs/gate-decision.input.js.map +1 -0
  39. package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js +28 -0
  40. package/dist/api/graphql-api/inbox/inputs/list-inbox.input.js.map +1 -0
  41. package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js +38 -0
  42. package/dist/api/graphql-api/inbox/inputs/resolve-inbox-item.input.js.map +1 -0
  43. package/dist/api/graphql-api/inbox/model/gate-risk.model.js +53 -0
  44. package/dist/api/graphql-api/inbox/model/gate-risk.model.js.map +1 -0
  45. package/dist/api/graphql-api/inbox/model/inbox-connection.model.js +16 -0
  46. package/dist/api/graphql-api/inbox/model/inbox-connection.model.js.map +1 -0
  47. package/dist/api/graphql-api/inbox/model/inbox-item.model.js +88 -0
  48. package/dist/api/graphql-api/inbox/model/inbox-item.model.js.map +1 -0
  49. package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js +48 -0
  50. package/dist/api/graphql-api/inbox/model/inbox-resolution.model.js.map +1 -0
  51. package/dist/api/graphql-api/method/inputs/list-method.input.js +15 -0
  52. package/dist/api/graphql-api/method/inputs/list-method.input.js.map +1 -0
  53. package/dist/api/graphql-api/method/method.resolver.js +90 -0
  54. package/dist/api/graphql-api/method/method.resolver.js.map +1 -0
  55. package/dist/api/graphql-api/method/model/alternative-role-group.model.js +32 -0
  56. package/dist/api/graphql-api/method/model/alternative-role-group.model.js.map +1 -0
  57. package/dist/api/graphql-api/method/model/pipeline-connection.model.js +16 -0
  58. package/dist/api/graphql-api/method/model/pipeline-connection.model.js.map +1 -0
  59. package/dist/api/graphql-api/method/model/pipeline.model.js +69 -0
  60. package/dist/api/graphql-api/method/model/pipeline.model.js.map +1 -0
  61. package/dist/api/graphql-api/method/model/playbook-connection.model.js +16 -0
  62. package/dist/api/graphql-api/method/model/playbook-connection.model.js.map +1 -0
  63. package/dist/api/graphql-api/method/model/playbook.model.js +47 -0
  64. package/dist/api/graphql-api/method/model/playbook.model.js.map +1 -0
  65. package/dist/api/graphql-api/method/model/role-connection.model.js +16 -0
  66. package/dist/api/graphql-api/method/model/role-connection.model.js.map +1 -0
  67. package/dist/api/graphql-api/method/model/role.model.js +98 -0
  68. package/dist/api/graphql-api/method/model/role.model.js.map +1 -0
  69. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js +52 -0
  70. package/dist/api/graphql-api/pr/inputs/pr-readiness.input.js.map +1 -0
  71. package/dist/api/graphql-api/pr/model/pr-readiness.model.js +403 -0
  72. package/dist/api/graphql-api/pr/model/pr-readiness.model.js.map +1 -0
  73. package/dist/api/graphql-api/pr/pr.resolver.js +76 -0
  74. package/dist/api/graphql-api/pr/pr.resolver.js.map +1 -0
  75. package/dist/api/graphql-api/registerGraphqlEnums.js +9 -0
  76. package/dist/api/graphql-api/registerGraphqlEnums.js.map +1 -0
  77. package/dist/api/graphql-api/runs/inputs/create-run.input.js +63 -0
  78. package/dist/api/graphql-api/runs/inputs/create-run.input.js.map +1 -0
  79. package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js +48 -0
  80. package/dist/api/graphql-api/runs/inputs/get-agent-log.input.js.map +1 -0
  81. package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js +32 -0
  82. package/dist/api/graphql-api/runs/inputs/get-run-attempts.input.js.map +1 -0
  83. package/dist/api/graphql-api/runs/inputs/get-run-events.input.js +28 -0
  84. package/dist/api/graphql-api/runs/inputs/get-run-events.input.js.map +1 -0
  85. package/dist/api/graphql-api/runs/inputs/list-runs.input.js +23 -0
  86. package/dist/api/graphql-api/runs/inputs/list-runs.input.js.map +1 -0
  87. package/dist/api/graphql-api/runs/inputs/simulate-route.input.js +43 -0
  88. package/dist/api/graphql-api/runs/inputs/simulate-route.input.js.map +1 -0
  89. package/dist/api/graphql-api/runs/model/agent-activity.model.js +367 -0
  90. package/dist/api/graphql-api/runs/model/agent-activity.model.js.map +1 -0
  91. package/dist/api/graphql-api/runs/model/create-run-result.model.js +53 -0
  92. package/dist/api/graphql-api/runs/model/create-run-result.model.js.map +1 -0
  93. package/dist/api/graphql-api/runs/model/run-attempt.model.js +114 -0
  94. package/dist/api/graphql-api/runs/model/run-attempt.model.js.map +1 -0
  95. package/dist/api/graphql-api/runs/model/run-connection.model.js +16 -0
  96. package/dist/api/graphql-api/runs/model/run-connection.model.js.map +1 -0
  97. package/dist/api/graphql-api/runs/model/run-cost.model.js +67 -0
  98. package/dist/api/graphql-api/runs/model/run-cost.model.js.map +1 -0
  99. package/dist/api/graphql-api/runs/model/run-digest.model.js +41 -0
  100. package/dist/api/graphql-api/runs/model/run-digest.model.js.map +1 -0
  101. package/dist/api/graphql-api/runs/model/run-event-connection.model.js +16 -0
  102. package/dist/api/graphql-api/runs/model/run-event-connection.model.js.map +1 -0
  103. package/dist/api/graphql-api/runs/model/run-event.model.js +58 -0
  104. package/dist/api/graphql-api/runs/model/run-event.model.js.map +1 -0
  105. package/dist/api/graphql-api/runs/model/run-progress.model.js +33 -0
  106. package/dist/api/graphql-api/runs/model/run-progress.model.js.map +1 -0
  107. package/dist/api/graphql-api/runs/model/run-workflow.model.js +287 -0
  108. package/dist/api/graphql-api/runs/model/run-workflow.model.js.map +1 -0
  109. package/dist/api/graphql-api/runs/model/run.model.js +57 -0
  110. package/dist/api/graphql-api/runs/model/run.model.js.map +1 -0
  111. package/dist/api/graphql-api/runs/model/usage.model.js +32 -0
  112. package/dist/api/graphql-api/runs/model/usage.model.js.map +1 -0
  113. package/dist/api/graphql-api/runs/run-digest.resolver.js +40 -0
  114. package/dist/api/graphql-api/runs/run-digest.resolver.js.map +1 -0
  115. package/dist/api/graphql-api/runs/run-events.resolver.js +45 -0
  116. package/dist/api/graphql-api/runs/run-events.resolver.js.map +1 -0
  117. package/dist/api/graphql-api/runs/run-progress.resolver.js +53 -0
  118. package/dist/api/graphql-api/runs/run-progress.resolver.js.map +1 -0
  119. package/dist/api/graphql-api/runs/runs-subscription.resolver.js +124 -0
  120. package/dist/api/graphql-api/runs/runs-subscription.resolver.js.map +1 -0
  121. package/dist/api/graphql-api/runs/runs.resolver.js +165 -0
  122. package/dist/api/graphql-api/runs/runs.resolver.js.map +1 -0
  123. package/dist/api/graphql-api/share/graphql-param-types.js +6 -0
  124. package/dist/api/graphql-api/share/graphql-param-types.js.map +1 -0
  125. package/dist/api/graphql-api/share/inputs/connection.input.js +27 -0
  126. package/dist/api/graphql-api/share/inputs/connection.input.js.map +1 -0
  127. package/dist/api/graphql-api/share/inputs/run-subscription.input.js +22 -0
  128. package/dist/api/graphql-api/share/inputs/run-subscription.input.js.map +1 -0
  129. package/dist/api/graphql-api/share/model/paginated.model.js +75 -0
  130. package/dist/api/graphql-api/share/model/paginated.model.js.map +1 -0
  131. package/dist/api/graphql-api/system/model/daemon-status.model.js +47 -0
  132. package/dist/api/graphql-api/system/model/daemon-status.model.js.map +1 -0
  133. package/dist/api/graphql-api/system/model/doctor-result.model.js +33 -0
  134. package/dist/api/graphql-api/system/model/doctor-result.model.js.map +1 -0
  135. package/dist/api/graphql-api/system/model/project.model.js +37 -0
  136. package/dist/api/graphql-api/system/model/project.model.js.map +1 -0
  137. package/dist/api/graphql-api/system/model/repository-context.model.js +70 -0
  138. package/dist/api/graphql-api/system/model/repository-context.model.js.map +1 -0
  139. package/dist/api/graphql-api/system/model/repository-validation.model.js +62 -0
  140. package/dist/api/graphql-api/system/model/repository-validation.model.js.map +1 -0
  141. package/dist/api/graphql-api/system/model/system-status.model.js +29 -0
  142. package/dist/api/graphql-api/system/model/system-status.model.js.map +1 -0
  143. package/dist/api/graphql-api/system/system.resolver.js +83 -0
  144. package/dist/api/graphql-api/system/system.resolver.js.map +1 -0
  145. package/dist/cli/commands/doctor-report.js +39 -0
  146. package/dist/cli/commands/doctor-report.js.map +1 -0
  147. package/dist/cli/commands/lifecycle.js +237 -0
  148. package/dist/cli/commands/lifecycle.js.map +1 -0
  149. package/dist/cli/commands/mcp.js +46 -8
  150. package/dist/cli/commands/mcp.js.map +1 -1
  151. package/dist/cli/commands/revisium-helpers.js +2 -2
  152. package/dist/cli/index.js +5 -29
  153. package/dist/cli/index.js.map +1 -1
  154. package/dist/cli/program.js +7 -21
  155. package/dist/cli/program.js.map +1 -1
  156. package/dist/config.js +57 -5
  157. package/dist/config.js.map +1 -1
  158. package/dist/control-plane/bootstrap.js +93 -0
  159. package/dist/control-plane/bootstrap.js.map +1 -0
  160. package/dist/control-plane/change-notifications.js +35 -0
  161. package/dist/control-plane/change-notifications.js.map +1 -0
  162. package/dist/control-plane/data-access.js +10 -3
  163. package/dist/control-plane/data-access.js.map +1 -1
  164. package/dist/control-plane/inbox.js +5 -31
  165. package/dist/control-plane/inbox.js.map +1 -1
  166. package/dist/control-plane/index.js +1 -1
  167. package/dist/control-plane/index.js.map +1 -1
  168. package/dist/control-plane/resolve-cwd.js +76 -8
  169. package/dist/control-plane/resolve-cwd.js.map +1 -1
  170. package/dist/control-plane/schema-migration.js +7 -11
  171. package/dist/control-plane/schema-migration.js.map +1 -1
  172. package/dist/control-plane/seed-default-playbook.js +23 -0
  173. package/dist/control-plane/seed-default-playbook.js.map +1 -1
  174. package/dist/control-plane/steps.js +15 -349
  175. package/dist/control-plane/steps.js.map +1 -1
  176. package/dist/e2e/kit/agents.js +43 -8
  177. package/dist/e2e/kit/agents.js.map +1 -1
  178. package/dist/e2e/kit/assertions.js +57 -14
  179. package/dist/e2e/kit/assertions.js.map +1 -1
  180. package/dist/e2e/kit/drive.js +0 -4
  181. package/dist/e2e/kit/drive.js.map +1 -1
  182. package/dist/e2e/kit/fake-integrator.js +16 -1
  183. package/dist/e2e/kit/fake-integrator.js.map +1 -1
  184. package/dist/e2e/kit/gh-emulator.js +173 -10
  185. package/dist/e2e/kit/gh-emulator.js.map +1 -1
  186. package/dist/e2e/kit/git-target-repo.js +35 -3
  187. package/dist/e2e/kit/git-target-repo.js.map +1 -1
  188. package/dist/e2e/kit/harness.js +16 -3
  189. package/dist/e2e/kit/harness.js.map +1 -1
  190. package/dist/e2e/kit/scenarios.js +1 -1
  191. package/dist/e2e/recovery-dd-crash-child.js +3 -2
  192. package/dist/e2e/recovery-dd-crash-child.js.map +1 -1
  193. package/dist/engine/dbos.module.js +2 -1
  194. package/dist/engine/dbos.module.js.map +1 -1
  195. package/dist/engine/dbos.service.js +89 -18
  196. package/dist/engine/dbos.service.js.map +1 -1
  197. package/dist/engine/ensure-postgres.js +11 -9
  198. package/dist/engine/ensure-postgres.js.map +1 -1
  199. package/dist/features/inbox/commands/handlers/inbox-command.handlers.js +80 -0
  200. package/dist/features/inbox/commands/handlers/inbox-command.handlers.js.map +1 -0
  201. package/dist/features/inbox/commands/impl/answer-question.command.js +7 -0
  202. package/dist/features/inbox/commands/impl/answer-question.command.js.map +1 -0
  203. package/dist/features/inbox/commands/impl/approve-gate.command.js +7 -0
  204. package/dist/features/inbox/commands/impl/approve-gate.command.js.map +1 -0
  205. package/dist/features/inbox/commands/impl/reject-gate.command.js +7 -0
  206. package/dist/features/inbox/commands/impl/reject-gate.command.js.map +1 -0
  207. package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js +7 -0
  208. package/dist/features/inbox/commands/impl/resolve-inbox-item.command.js.map +1 -0
  209. package/dist/features/inbox/commands/index.js +8 -0
  210. package/dist/features/inbox/commands/index.js.map +1 -0
  211. package/dist/features/inbox/inbox-api.module.js +23 -0
  212. package/dist/features/inbox/inbox-api.module.js.map +1 -0
  213. package/dist/features/inbox/inbox-api.service.js +63 -0
  214. package/dist/features/inbox/inbox-api.service.js.map +1 -0
  215. package/dist/features/inbox/queries/handlers/inbox-query.handlers.js +111 -0
  216. package/dist/features/inbox/queries/handlers/inbox-query.handlers.js.map +1 -0
  217. package/dist/features/inbox/queries/impl/get-inbox-item.query.js +7 -0
  218. package/dist/features/inbox/queries/impl/get-inbox-item.query.js.map +1 -0
  219. package/dist/features/inbox/queries/impl/get-pending-decisions.query.js +7 -0
  220. package/dist/features/inbox/queries/impl/get-pending-decisions.query.js.map +1 -0
  221. package/dist/features/inbox/queries/impl/list-inbox.query.js +7 -0
  222. package/dist/features/inbox/queries/impl/list-inbox.query.js.map +1 -0
  223. package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js +7 -0
  224. package/dist/features/inbox/queries/impl/summarize-gate-risk.query.js.map +1 -0
  225. package/dist/features/inbox/queries/index.js +8 -0
  226. package/dist/features/inbox/queries/index.js.map +1 -0
  227. package/dist/features/method/commands/index.js +2 -0
  228. package/dist/features/method/commands/index.js.map +1 -0
  229. package/dist/features/method/method-api.module.js +23 -0
  230. package/dist/features/method/method-api.module.js.map +1 -0
  231. package/dist/features/method/method-api.service.js +47 -0
  232. package/dist/features/method/method-api.service.js.map +1 -0
  233. package/dist/features/method/queries/handlers/method-query.handlers.js +115 -0
  234. package/dist/features/method/queries/handlers/method-query.handlers.js.map +1 -0
  235. package/dist/features/method/queries/impl/get-pipeline.query.js +7 -0
  236. package/dist/features/method/queries/impl/get-pipeline.query.js.map +1 -0
  237. package/dist/features/method/queries/impl/get-role.query.js +7 -0
  238. package/dist/features/method/queries/impl/get-role.query.js.map +1 -0
  239. package/dist/features/method/queries/impl/list-pipelines.query.js +7 -0
  240. package/dist/features/method/queries/impl/list-pipelines.query.js.map +1 -0
  241. package/dist/features/method/queries/impl/list-playbooks.query.js +7 -0
  242. package/dist/features/method/queries/impl/list-playbooks.query.js.map +1 -0
  243. package/dist/features/method/queries/impl/list-roles.query.js +7 -0
  244. package/dist/features/method/queries/impl/list-roles.query.js.map +1 -0
  245. package/dist/features/method/queries/index.js +9 -0
  246. package/dist/features/method/queries/index.js.map +1 -0
  247. package/dist/features/pr/commands/index.js +2 -0
  248. package/dist/features/pr/commands/index.js.map +1 -0
  249. package/dist/features/pr/pr-api.module.js +23 -0
  250. package/dist/features/pr/pr-api.module.js.map +1 -0
  251. package/dist/features/pr/pr-api.service.js +35 -0
  252. package/dist/features/pr/pr-api.service.js.map +1 -0
  253. package/dist/features/pr/queries/handlers/pr-query.handlers.js +48 -0
  254. package/dist/features/pr/queries/handlers/pr-query.handlers.js.map +1 -0
  255. package/dist/features/pr/queries/impl/get-pr-readiness.query.js +7 -0
  256. package/dist/features/pr/queries/impl/get-pr-readiness.query.js.map +1 -0
  257. package/dist/features/pr/queries/impl/list-pr-feedback.query.js +7 -0
  258. package/dist/features/pr/queries/impl/list-pr-feedback.query.js.map +1 -0
  259. package/dist/features/pr/queries/index.js +3 -0
  260. package/dist/features/pr/queries/index.js.map +1 -0
  261. package/dist/features/runs/commands/handlers/runs-command.handlers.js +32 -0
  262. package/dist/features/runs/commands/handlers/runs-command.handlers.js.map +1 -0
  263. package/dist/features/runs/commands/impl/create-run.command.js +7 -0
  264. package/dist/features/runs/commands/impl/create-run.command.js.map +1 -0
  265. package/dist/features/runs/commands/index.js +3 -0
  266. package/dist/features/runs/commands/index.js.map +1 -0
  267. package/dist/features/runs/queries/handlers/runs-query.handlers.js +359 -0
  268. package/dist/features/runs/queries/handlers/runs-query.handlers.js.map +1 -0
  269. package/dist/features/runs/queries/impl/get-agent-activity.query.js +7 -0
  270. package/dist/features/runs/queries/impl/get-agent-activity.query.js.map +1 -0
  271. package/dist/features/runs/queries/impl/get-agent-attempts.query.js +7 -0
  272. package/dist/features/runs/queries/impl/get-agent-attempts.query.js.map +1 -0
  273. package/dist/features/runs/queries/impl/get-agent-log.query.js +7 -0
  274. package/dist/features/runs/queries/impl/get-agent-log.query.js.map +1 -0
  275. package/dist/features/runs/queries/impl/get-run-attempts.query.js +7 -0
  276. package/dist/features/runs/queries/impl/get-run-attempts.query.js.map +1 -0
  277. package/dist/features/runs/queries/impl/get-run-digest.query.js +7 -0
  278. package/dist/features/runs/queries/impl/get-run-digest.query.js.map +1 -0
  279. package/dist/features/runs/queries/impl/get-run-events.query.js +7 -0
  280. package/dist/features/runs/queries/impl/get-run-events.query.js.map +1 -0
  281. package/dist/features/runs/queries/impl/get-run-progress.query.js +7 -0
  282. package/dist/features/runs/queries/impl/get-run-progress.query.js.map +1 -0
  283. package/dist/features/runs/queries/impl/get-run-workflow.query.js +7 -0
  284. package/dist/features/runs/queries/impl/get-run-workflow.query.js.map +1 -0
  285. package/dist/features/runs/queries/impl/get-run.query.js +7 -0
  286. package/dist/features/runs/queries/impl/get-run.query.js.map +1 -0
  287. package/dist/features/runs/queries/impl/list-runs.query.js +7 -0
  288. package/dist/features/runs/queries/impl/list-runs.query.js.map +1 -0
  289. package/dist/features/runs/queries/impl/simulate-route.query.js +7 -0
  290. package/dist/features/runs/queries/impl/simulate-route.query.js.map +1 -0
  291. package/dist/features/runs/queries/index.js +15 -0
  292. package/dist/features/runs/queries/index.js.map +1 -0
  293. package/dist/features/runs/runs-api.module.js +23 -0
  294. package/dist/features/runs/runs-api.module.js.map +1 -0
  295. package/dist/features/runs/runs-api.service.js +79 -0
  296. package/dist/features/runs/runs-api.service.js.map +1 -0
  297. package/dist/features/shared/connection.js +39 -0
  298. package/dist/features/shared/connection.js.map +1 -0
  299. package/dist/features/system/commands/index.js +2 -0
  300. package/dist/features/system/commands/index.js.map +1 -0
  301. package/dist/features/system/queries/handlers/system-query.handlers.js +96 -0
  302. package/dist/features/system/queries/handlers/system-query.handlers.js.map +1 -0
  303. package/dist/features/system/queries/impl/doctor.query.js +4 -0
  304. package/dist/features/system/queries/impl/doctor.query.js.map +1 -0
  305. package/dist/features/system/queries/impl/get-project.query.js +4 -0
  306. package/dist/features/system/queries/impl/get-project.query.js.map +1 -0
  307. package/dist/features/system/queries/impl/get-repository-context.query.js +7 -0
  308. package/dist/features/system/queries/impl/get-repository-context.query.js.map +1 -0
  309. package/dist/features/system/queries/impl/get-status.query.js +4 -0
  310. package/dist/features/system/queries/impl/get-status.query.js.map +1 -0
  311. package/dist/features/system/queries/impl/validate-repository.query.js +7 -0
  312. package/dist/features/system/queries/impl/validate-repository.query.js.map +1 -0
  313. package/dist/features/system/queries/index.js +9 -0
  314. package/dist/features/system/queries/index.js.map +1 -0
  315. package/dist/features/system/system-api.module.js +23 -0
  316. package/dist/features/system/system-api.module.js.map +1 -0
  317. package/dist/features/system/system-api.service.js +47 -0
  318. package/dist/features/system/system-api.service.js.map +1 -0
  319. package/dist/host/daemon.js +68 -0
  320. package/dist/host/daemon.js.map +1 -0
  321. package/dist/host/ensure-host.js +109 -0
  322. package/dist/host/ensure-host.js.map +1 -0
  323. package/dist/host/host-runtime.js +52 -0
  324. package/dist/host/host-runtime.js.map +1 -0
  325. package/dist/host/host.lifecycle.js +16 -3
  326. package/dist/host/host.lifecycle.js.map +1 -1
  327. package/dist/http/graphql-host.js +56 -0
  328. package/dist/http/graphql-host.js.map +1 -0
  329. package/dist/{mcp/mcp.module.js → http/graphql-host.module.js} +12 -10
  330. package/dist/http/graphql-host.module.js.map +1 -0
  331. package/dist/infrastructure/metrics/graphql/graphql-metrics.js +91 -0
  332. package/dist/infrastructure/metrics/graphql/graphql-metrics.js.map +1 -0
  333. package/dist/mcp/mcp-capabilities.js +6 -1
  334. package/dist/mcp/mcp-capabilities.js.map +1 -1
  335. package/dist/mcp/mcp-facade.service.js +24 -0
  336. package/dist/mcp/mcp-facade.service.js.map +1 -1
  337. package/dist/mcp/mcp-http.service.js +95 -0
  338. package/dist/mcp/mcp-http.service.js.map +1 -0
  339. package/dist/mcp/mcp-tools.js +58 -0
  340. package/dist/mcp/mcp-tools.js.map +1 -1
  341. package/dist/observability/agent-activity-reporter.js +185 -0
  342. package/dist/observability/agent-activity-reporter.js.map +1 -0
  343. package/dist/observability/agent-observability.service.js +1142 -0
  344. package/dist/observability/agent-observability.service.js.map +1 -0
  345. package/dist/observability/index.js +4 -0
  346. package/dist/observability/index.js.map +1 -0
  347. package/dist/observability/types.js +11 -0
  348. package/dist/observability/types.js.map +1 -0
  349. package/dist/pipeline/await-human.js +8 -4
  350. package/dist/pipeline/await-human.js.map +1 -1
  351. package/dist/pipeline/data-driven-task.workflow.js +184 -73
  352. package/dist/pipeline/data-driven-task.workflow.js.map +1 -1
  353. package/dist/pipeline/data-driven-template.js +3 -3
  354. package/dist/pipeline/pipeline.module.js +1 -1
  355. package/dist/pipeline/pipeline.module.js.map +1 -1
  356. package/dist/pipeline/{develop-task.workflow.js → pipeline.service.js} +97 -26
  357. package/dist/pipeline/pipeline.service.js.map +1 -0
  358. package/dist/pipeline-core/kit/fixtures.js +94 -0
  359. package/dist/pipeline-core/kit/fixtures.js.map +1 -1
  360. package/dist/pipeline-core/validate-capability.js +23 -0
  361. package/dist/pipeline-core/validate-capability.js.map +1 -0
  362. package/dist/pipeline-core/validate-conflicts.js +37 -0
  363. package/dist/pipeline-core/validate-conflicts.js.map +1 -0
  364. package/dist/pipeline-core/validate-dataflow.js +180 -0
  365. package/dist/pipeline-core/validate-dataflow.js.map +1 -0
  366. package/dist/pipeline-core/validate-diff.js +158 -0
  367. package/dist/pipeline-core/validate-diff.js.map +1 -0
  368. package/dist/pipeline-core/validate-edges.js +44 -0
  369. package/dist/pipeline-core/validate-edges.js.map +1 -0
  370. package/dist/pipeline-core/validate-graph.js +123 -0
  371. package/dist/pipeline-core/validate-graph.js.map +1 -0
  372. package/dist/pipeline-core/validate-loops.js +226 -0
  373. package/dist/pipeline-core/validate-loops.js.map +1 -0
  374. package/dist/pipeline-core/validate-parallel.js +132 -0
  375. package/dist/pipeline-core/validate-parallel.js.map +1 -0
  376. package/dist/pipeline-core/validate-sink.js +27 -0
  377. package/dist/pipeline-core/validate-sink.js.map +1 -0
  378. package/dist/pipeline-core/validate-topology.js +140 -0
  379. package/dist/pipeline-core/validate-topology.js.map +1 -0
  380. package/dist/pipeline-core/validate-verdict.js +72 -0
  381. package/dist/pipeline-core/validate-verdict.js.map +1 -0
  382. package/dist/pipeline-core/validate.js +34 -1107
  383. package/dist/pipeline-core/validate.js.map +1 -1
  384. package/dist/revisium/run.service.js +31 -8
  385. package/dist/revisium/run.service.js.map +1 -1
  386. package/dist/run/create-run.js +5 -31
  387. package/dist/run/create-run.js.map +1 -1
  388. package/dist/run/inspect-run.js +2 -29
  389. package/dist/run/inspect-run.js.map +1 -1
  390. package/dist/run/terminal-run-status.js +7 -30
  391. package/dist/run/terminal-run-status.js.map +1 -1
  392. package/dist/runners/claude-code.service.js +1 -0
  393. package/dist/runners/claude-code.service.js.map +1 -1
  394. package/dist/runners/codex.service.js +51 -0
  395. package/dist/runners/codex.service.js.map +1 -0
  396. package/dist/runners/integrator-branch-naming.js +24 -0
  397. package/dist/runners/integrator-branch-naming.js.map +1 -0
  398. package/dist/runners/integrator-git.js +84 -0
  399. package/dist/runners/integrator-git.js.map +1 -0
  400. package/dist/runners/integrator-remote.js +34 -0
  401. package/dist/runners/integrator-remote.js.map +1 -0
  402. package/dist/runners/integrator-types.js +9 -0
  403. package/dist/runners/integrator-types.js.map +1 -0
  404. package/dist/runners/integrator.js +250 -134
  405. package/dist/runners/integrator.js.map +1 -1
  406. package/dist/runners/runner.module.js +7 -3
  407. package/dist/runners/runner.module.js.map +1 -1
  408. package/dist/runners/worktree.service.js +63 -0
  409. package/dist/runners/worktree.service.js.map +1 -0
  410. package/dist/smoke/cli.js +47 -0
  411. package/dist/smoke/cli.js.map +1 -0
  412. package/dist/smoke/isolation.js +113 -0
  413. package/dist/smoke/isolation.js.map +1 -0
  414. package/dist/task-control-plane/task-control-plane-api.service.js +317 -4
  415. package/dist/task-control-plane/task-control-plane-api.service.js.map +1 -1
  416. package/dist/task-control-plane/task-control-plane.module.js +22 -3
  417. package/dist/task-control-plane/task-control-plane.module.js.map +1 -1
  418. package/dist/worker/artifact-store.js +6 -1
  419. package/dist/worker/artifact-store.js.map +1 -1
  420. package/dist/worker/build-context.js +135 -1
  421. package/dist/worker/build-context.js.map +1 -1
  422. package/dist/worker/claude-code-runner.js +79 -82
  423. package/dist/worker/claude-code-runner.js.map +1 -1
  424. package/dist/worker/codex-runner.js +474 -0
  425. package/dist/worker/codex-runner.js.map +1 -0
  426. package/dist/worker/git-worktree-manager.js +148 -0
  427. package/dist/worker/git-worktree-manager.js.map +1 -0
  428. package/dist/worker/result-envelope.js +75 -63
  429. package/dist/worker/result-envelope.js.map +1 -1
  430. package/dist/worker/runner-common.js +106 -0
  431. package/dist/worker/runner-common.js.map +1 -0
  432. package/dist/worker/runner-dispatch.js +3 -1
  433. package/dist/worker/runner-dispatch.js.map +1 -1
  434. package/dist/worker/runner.js.map +1 -1
  435. package/dist/worker/stub-runner.js +3 -3
  436. package/dist/worker/stub-runner.js.map +1 -1
  437. package/package.json +15 -7
  438. package/dist/app.module.js +0 -28
  439. package/dist/app.module.js.map +0 -1
  440. package/dist/cli/commands/bootstrap.js +0 -100
  441. package/dist/cli/commands/bootstrap.js.map +0 -1
  442. package/dist/cli/commands/dev.js +0 -143
  443. package/dist/cli/commands/dev.js.map +0 -1
  444. package/dist/cli/commands/inbox.js +0 -288
  445. package/dist/cli/commands/inbox.js.map +0 -1
  446. package/dist/cli/commands/playbook.js +0 -74
  447. package/dist/cli/commands/playbook.js.map +0 -1
  448. package/dist/cli/commands/poll-workflow-state.js +0 -144
  449. package/dist/cli/commands/poll-workflow-state.js.map +0 -1
  450. package/dist/cli/commands/revisium-context.js +0 -23
  451. package/dist/cli/commands/revisium-context.js.map +0 -1
  452. package/dist/cli/commands/revisium.js +0 -89
  453. package/dist/cli/commands/revisium.js.map +0 -1
  454. package/dist/cli/commands/run.js +0 -453
  455. package/dist/cli/commands/run.js.map +0 -1
  456. package/dist/cli/live-guard.js +0 -49
  457. package/dist/cli/live-guard.js.map +0 -1
  458. package/dist/cli/needs-host.js +0 -77
  459. package/dist/cli/needs-host.js.map +0 -1
  460. package/dist/mcp/mcp-stdio.service.js +0 -48
  461. package/dist/mcp/mcp-stdio.service.js.map +0 -1
  462. package/dist/mcp/mcp.module.js.map +0 -1
  463. package/dist/pipeline/develop-task.workflow.js.map +0 -1
  464. package/dist/worker/worktree-manager.js +0 -7
  465. package/dist/worker/worktree-manager.js.map +0 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ reviewer → integrator), hosted in **NestJS**. **DBOS** owns durable progress
5
5
  from the first unfinished step — while **Revisium** owns meaning: roles, policy, inbox, events. Workflow-as-data is
6
6
  a post-MVP goal; see [`docs/architecture-overview.md`](./docs/architecture-overview.md).
7
7
 
8
- > 🚧 **Early alpha.** The end-to-end MVP works — `run create` → plan gate → implement → review → PR → merge
8
+ > 🚧 **Early alpha.** The end-to-end MVP works — create a run → plan gate → implement → review → PR → merge
9
9
  > gate — see [`docs/roadmap.md`](./docs/roadmap.md).
10
10
 
11
11
  ## Start here
@@ -15,6 +15,154 @@ a post-MVP goal; see [`docs/architecture-overview.md`](./docs/architecture-overv
15
15
  - Architecture & invariants: [`docs/architecture-overview.md`](./docs/architecture-overview.md)
16
16
  - Docs index & roadmap: [`docs/README.md`](./docs/README.md) · [`docs/roadmap.md`](./docs/roadmap.md)
17
17
 
18
+ ## Local Development
19
+
20
+ `revo` is one daemonized product. **`revo start`** brings up the whole stack — the standalone
21
+ Revisium daemon plus the Revo host daemon that owns DBOS and serves the GraphQL + MCP front doors —
22
+ and bootstraps the control-plane so it is ready to use. The CLI is lifecycle-only
23
+ (`start` / `stop` / `status` / `restart` / `doctor` / `logs`); orchestration (runs, inbox, …) is
24
+ reached over **MCP** (agents) or **GraphQL** (UI/scripts), both served by the daemon.
25
+
26
+ Run a source checkout alongside an installed package without collisions via a named **profile**
27
+ (`--profile dev`, or `REVO_PROFILE=dev`): the `dev` profile shifts the whole port band off the
28
+ `default` profile, so the two never share a port, data dir, or `dbos` database.
29
+
30
+ ```sh
31
+ pnpm install
32
+ pnpm run revo -- start --profile dev # standalone + host daemon, bootstrapped & ready
33
+ pnpm run revo -- status --profile dev # stack health summary
34
+ pnpm run revo -- doctor --profile dev # diagnose process / port / profile issues
35
+ pnpm run revo -- logs --profile dev # tail host + standalone logs; add -f to follow
36
+ pnpm run revo -- restart --profile dev # stop, then start
37
+ pnpm run revo -- stop --profile dev
38
+ ```
39
+
40
+ | Knob | `default` (installed package) | `dev` (source checkout) |
41
+ | --- | --- | --- |
42
+ | data dir | `~/.revisium-orchestrator` | `~/.revisium-orchestrator-dev` |
43
+ | standalone HTTP / Postgres | `19222` / `15440` | `19622` / `15840` |
44
+ | Revo GraphQL | `19223` | `19623` |
45
+ | DBOS database | `dbos` | `dbos_dev` |
46
+
47
+ Any single knob can be overridden explicitly — `REVO_DATA_DIR` / `REVO_PORT` / `REVO_PG_PORT` /
48
+ `REVO_GRAPHQL_PORT` / `REVO_DBOS_DB` — and an explicit env var always wins over the profile band.
49
+
50
+ Connect an agent over MCP (a thin stdio bridge that forwards to the running daemon):
51
+
52
+ ```sh
53
+ claude mcp add revo -- pnpm --dir "$PWD" run revo -- mcp
54
+ ```
55
+
56
+ Run the local verification gates:
57
+
58
+ ```sh
59
+ pnpm run typecheck
60
+ pnpm run lint:ci
61
+ pnpm run test:cov
62
+ pnpm run verify
63
+ ```
64
+
65
+ The smoke scripts are guarded: they require a non-default `REVO_DATA_DIR`,
66
+ `REVO_PORT`, `REVO_PG_PORT`, and `REVO_DBOS_DB`; GraphQL smoke paths also require
67
+ `REVO_GRAPHQL_PORT`.
68
+
69
+ ```sh
70
+ pnpm run smoke:control-plane
71
+ pnpm run smoke:create-run
72
+ pnpm run smoke:inspect-run
73
+ ```
74
+
75
+ ### Live Run Observability Smoke
76
+
77
+ This smoke runs a real agent. It can call provider CLIs and incur cost. Use it
78
+ only when that is intentional.
79
+
80
+ ```sh
81
+ export REVO_SMOKE_REPO=/path/to/local/sandbox-repo
82
+ pnpm run revo -- start --profile dev # standalone + host daemon (serves GraphQL + MCP), ready
83
+ ```
84
+
85
+ Drive and observe a run through the daemon's front doors — there are no `run`/`serve` CLI commands.
86
+ From an agent, use the MCP tools (`create_run`, `start_run`, then `get_agent_activity` /
87
+ `get_agent_log`). From a UI or script, use the GraphQL front door the daemon already serves at
88
+ `http://127.0.0.1:$REVO_GRAPHQL_PORT/graphql` — create a run:
89
+
90
+ ```graphql
91
+ mutation Create($data: CreateRunInput!) {
92
+ createRun(data: $data) {
93
+ runId
94
+ }
95
+ }
96
+ ```
97
+
98
+ Then observe it over the same endpoint:
99
+
100
+ ```graphql
101
+ query Activity($runId: ID!) {
102
+ runAgentActivity(runId: $runId) {
103
+ runId
104
+ aggregateStatus
105
+ latestOutputAt
106
+ attempts {
107
+ attemptId
108
+ runner
109
+ status
110
+ stdoutBytes
111
+ stderrBytes
112
+ artifactRef
113
+ }
114
+ }
115
+ }
116
+
117
+ query Log($data: GetAgentLogInput!) {
118
+ runAgentLog(data: $data) {
119
+ runId
120
+ attemptId
121
+ stream
122
+ offsetBytes
123
+ nextOffsetBytes
124
+ totalBytes
125
+ truncated
126
+ content
127
+ }
128
+ }
129
+ ```
130
+
131
+ For MCP, configure the MCP client to launch this checkout's local binary with the
132
+ same environment. The MCP tools do not accept per-call profile arguments; the
133
+ profile comes from the process environment.
134
+
135
+ ```json
136
+ {
137
+ "mcpServers": {
138
+ "revo-dev": {
139
+ "command": "/path/to/agent-orchestrator/bin/revo.js",
140
+ "args": ["mcp"],
141
+ "env": {
142
+ "REVO_DATA_DIR": "/path/to/.revisium-orchestrator-dev",
143
+ "REVO_PORT": "19622",
144
+ "REVO_PG_PORT": "15840",
145
+ "REVO_GRAPHQL_PORT": "19623",
146
+ "REVO_DBOS_DB": "dbos_dev"
147
+ }
148
+ }
149
+ }
150
+ }
151
+ ```
152
+
153
+ Useful MCP observability tools for the same run:
154
+
155
+ - `get_agent_activity`
156
+ - `get_agent_attempts`
157
+ - `get_agent_log`
158
+ - `read_agent_output_events`
159
+ - `tail_agent_log`
160
+
161
+ If running from a sandboxed automation environment, local server checks may fail
162
+ with `listen EPERM` or a misleading `No free port found from <port>`. Re-run the
163
+ daemon, GraphQL, and MCP smoke commands from a normal terminal or an approved
164
+ unsandboxed execution context.
165
+
18
166
  ## License
19
167
 
20
168
  See [LICENSE](./LICENSE).
@@ -149,6 +149,7 @@
149
149
  "id": "steps",
150
150
  "schema": {
151
151
  "type": "object",
152
+ "description": "DEPRECATED/unused — runtime path retired (audit §3.1, #86); no live path writes or reads a steps row (DBOS owns progress). Table drop deferred — a schema drop on existing control-planes is riskier than retiring the writes; tracked in docs/roadmap.md → Post-MVP cleanup.",
152
153
  "additionalProperties": false,
153
154
  "properties": {
154
155
  "id": {
@@ -11,6 +11,7 @@
11
11
  "orchestrator",
12
12
  "analyst",
13
13
  "reviewer",
14
+ "triager",
14
15
  "developer",
15
16
  "integrator",
16
17
  "watcher"
@@ -36,7 +37,12 @@
36
37
  "approved",
37
38
  "clean",
38
39
  "blocker",
39
- "changes_requested"
40
+ "changes_requested",
41
+ "review_changes",
42
+ "ci_changes",
43
+ "fix",
44
+ "wontfix",
45
+ "question"
40
46
  ]
41
47
  },
42
48
  "nodes": {
@@ -47,8 +53,12 @@
47
53
  "next": "planReviewer",
48
54
  "onFailure": "abort",
49
55
  "resultSchema": "schema:plan",
50
- "produces": { "name": "plan" },
51
- "incrementCounters": ["planReviewLoop"]
56
+ "produces": {
57
+ "name": "plan"
58
+ },
59
+ "incrementCounters": [
60
+ "planReviewLoop"
61
+ ]
52
62
  },
53
63
  "planReviewer": {
54
64
  "id": "planReviewer",
@@ -57,22 +67,43 @@
57
67
  "next": "planReviewRouter",
58
68
  "onFailure": "abort",
59
69
  "resultSchema": "schema:reviewVerdict",
60
- "consumes": [{ "node": "analyst", "as": "plan" }]
70
+ "consumes": [
71
+ {
72
+ "node": "analyst",
73
+ "as": "plan"
74
+ }
75
+ ]
61
76
  },
62
77
  "planReviewRouter": {
63
78
  "id": "planReviewRouter",
64
79
  "kind": "choice",
65
80
  "branches": [
66
81
  {
67
- "when": { "op": "verdict.in", "value": ["approved", "clean"] },
82
+ "when": {
83
+ "op": "verdict.in",
84
+ "value": [
85
+ "approved",
86
+ "clean"
87
+ ]
88
+ },
68
89
  "goto": "planGate"
69
90
  },
70
91
  {
71
92
  "when": {
72
93
  "op": "all",
73
94
  "of": [
74
- { "op": "verdict.in", "value": ["blocker", "changes_requested"] },
75
- { "op": "counter.lt", "scope": "planReviewLoop", "value": 4 }
95
+ {
96
+ "op": "verdict.in",
97
+ "value": [
98
+ "blocker",
99
+ "changes_requested"
100
+ ]
101
+ },
102
+ {
103
+ "op": "counter.lt",
104
+ "scope": "planReviewLoop",
105
+ "value": 4
106
+ }
76
107
  ]
77
108
  },
78
109
  "goto": "analyst"
@@ -109,7 +140,12 @@
109
140
  "next": "codeReview",
110
141
  "onFailure": "abort",
111
142
  "resultSchema": "schema:change",
112
- "consumes": [{ "node": "analyst", "as": "plan" }]
143
+ "consumes": [
144
+ {
145
+ "node": "analyst",
146
+ "as": "plan"
147
+ }
148
+ ]
113
149
  },
114
150
  "codeReview": {
115
151
  "id": "codeReview",
@@ -173,7 +209,7 @@
173
209
  "id": "integrator",
174
210
  "kind": "script",
175
211
  "scriptRef": "script:integrator",
176
- "next": "watcherPost",
212
+ "next": "pollPr",
177
213
  "catch": [
178
214
  {
179
215
  "onError": "revo.ScriptBlocked",
@@ -187,70 +223,219 @@
187
223
  "onFailure": "route",
188
224
  "resultSchema": "schema:integration"
189
225
  },
190
- "watcherPost": {
191
- "id": "watcherPost",
192
- "kind": "agent",
193
- "roleRef": "role:watcher",
194
- "next": "watcherRouter",
195
- "onFailure": "abort",
196
- "resultSchema": "schema:watchVerdict"
226
+ "mergeGate": {
227
+ "id": "mergeGate",
228
+ "kind": "humanGate",
229
+ "reason": "merge-review",
230
+ "outcomes": [
231
+ "approved"
232
+ ],
233
+ "branches": [
234
+ {
235
+ "when": {
236
+ "op": "verdict.eq",
237
+ "value": "approved"
238
+ },
239
+ "goto": "confirmMerge"
240
+ },
241
+ {
242
+ "default": "blockedEnd"
243
+ }
244
+ ]
197
245
  },
198
- "watcherRouter": {
199
- "id": "watcherRouter",
246
+ "confirmMerge": {
247
+ "id": "confirmMerge",
248
+ "kind": "script",
249
+ "scriptRef": "script:confirmMerge",
250
+ "next": "mergedEnd",
251
+ "catch": [
252
+ {
253
+ "onError": "revo.ScriptBlocked",
254
+ "goto": "blockedEnd"
255
+ },
256
+ {
257
+ "onError": "revo.ScriptFailed",
258
+ "goto": "failedEnd"
259
+ }
260
+ ],
261
+ "onFailure": "route",
262
+ "resultSchema": "schema:integration"
263
+ },
264
+ "mergedEnd": {
265
+ "id": "mergedEnd",
266
+ "kind": "terminal",
267
+ "status": "succeeded"
268
+ },
269
+ "failedEnd": {
270
+ "id": "failedEnd",
271
+ "kind": "terminal",
272
+ "status": "failed"
273
+ },
274
+ "blockedEnd": {
275
+ "id": "blockedEnd",
276
+ "kind": "terminal",
277
+ "status": "blocked"
278
+ },
279
+ "pollPr": {
280
+ "id": "pollPr",
281
+ "kind": "script",
282
+ "scriptRef": "script:pollPr",
283
+ "next": "prRouter",
284
+ "onFailure": "route",
285
+ "resultSchema": "schema:prFeedback",
286
+ "produces": {
287
+ "name": "prFeedback"
288
+ },
289
+ "catch": [
290
+ {
291
+ "onError": "revo.ScriptBlocked",
292
+ "goto": "blockedEnd"
293
+ },
294
+ {
295
+ "onError": "revo.ScriptFailed",
296
+ "goto": "failedEnd"
297
+ }
298
+ ]
299
+ },
300
+ "prRouter": {
301
+ "id": "prRouter",
200
302
  "kind": "choice",
201
303
  "branches": [
202
304
  {
203
305
  "when": {
204
- "op": "verdict.in",
205
- "value": [
206
- "approved",
207
- "clean"
208
- ]
306
+ "op": "verdict.eq",
307
+ "value": "clean"
209
308
  },
210
309
  "goto": "mergeGate"
211
310
  },
311
+ {
312
+ "when": {
313
+ "op": "verdict.eq",
314
+ "value": "review_changes"
315
+ },
316
+ "goto": "triage"
317
+ },
212
318
  {
213
319
  "when": {
214
320
  "op": "all",
215
321
  "of": [
216
322
  {
217
- "op": "verdict.in",
218
- "value": [
219
- "blocker",
220
- "changes_requested"
221
- ]
323
+ "op": "verdict.eq",
324
+ "value": "ci_changes"
222
325
  },
223
326
  {
224
327
  "op": "counter.lt",
225
- "scope": "watcherLoop",
328
+ "scope": "ciLoop",
226
329
  "value": 3
227
330
  }
228
331
  ]
229
332
  },
230
- "goto": "watcherRework"
333
+ "goto": "ciRework"
231
334
  },
232
335
  {
233
336
  "default": "blockedEnd"
234
337
  }
235
338
  ]
236
339
  },
237
- "watcherRework": {
238
- "id": "watcherRework",
340
+ "ciRework": {
341
+ "id": "ciRework",
239
342
  "kind": "agent",
240
343
  "roleRef": "role:developer",
241
344
  "next": "integrator",
242
345
  "onFailure": "abort",
243
346
  "resultSchema": "schema:change",
244
347
  "incrementCounters": [
245
- "watcherLoop"
348
+ "ciLoop"
349
+ ],
350
+ "consumes": [
351
+ {
352
+ "node": "pollPr",
353
+ "as": "feedback"
354
+ }
246
355
  ]
247
356
  },
248
- "mergeGate": {
249
- "id": "mergeGate",
357
+ "triage": {
358
+ "id": "triage",
359
+ "kind": "agent",
360
+ "roleRef": "role:triager",
361
+ "next": "triageRouter",
362
+ "onFailure": "abort",
363
+ "resultSchema": "schema:triage",
364
+ "produces": {
365
+ "name": "triage"
366
+ },
367
+ "consumes": [
368
+ {
369
+ "node": "analyst",
370
+ "as": "plan",
371
+ "staleOk": true
372
+ },
373
+ {
374
+ "node": "pollPr",
375
+ "as": "feedback"
376
+ }
377
+ ]
378
+ },
379
+ "triageRouter": {
380
+ "id": "triageRouter",
381
+ "kind": "choice",
382
+ "branches": [
383
+ {
384
+ "when": {
385
+ "op": "all",
386
+ "of": [
387
+ {
388
+ "op": "verdict.eq",
389
+ "value": "question"
390
+ },
391
+ {
392
+ "op": "counter.lt",
393
+ "scope": "questionLoop",
394
+ "value": 3
395
+ }
396
+ ]
397
+ },
398
+ "goto": "questionGate"
399
+ },
400
+ {
401
+ "when": {
402
+ "op": "all",
403
+ "of": [
404
+ {
405
+ "op": "verdict.eq",
406
+ "value": "fix"
407
+ },
408
+ {
409
+ "op": "counter.lt",
410
+ "scope": "reviewLoop",
411
+ "value": 3
412
+ }
413
+ ]
414
+ },
415
+ "goto": "reviewRework"
416
+ },
417
+ {
418
+ "when": {
419
+ "op": "verdict.eq",
420
+ "value": "wontfix"
421
+ },
422
+ "goto": "respondThreads"
423
+ },
424
+ {
425
+ "default": "blockedEnd"
426
+ }
427
+ ]
428
+ },
429
+ "questionGate": {
430
+ "id": "questionGate",
250
431
  "kind": "humanGate",
251
- "reason": "merge-review",
432
+ "reason": "review-question",
252
433
  "outcomes": [
253
- "approved"
434
+ "approved",
435
+ "changes_requested"
436
+ ],
437
+ "incrementCounters": [
438
+ "questionLoop"
254
439
  ],
255
440
  "branches": [
256
441
  {
@@ -258,30 +443,74 @@
258
443
  "op": "verdict.eq",
259
444
  "value": "approved"
260
445
  },
261
- "goto": "mergedEnd"
446
+ "goto": "triage"
262
447
  },
263
448
  {
264
449
  "default": "blockedEnd"
265
450
  }
266
451
  ]
267
452
  },
268
- "mergedEnd": {
269
- "id": "mergedEnd",
270
- "kind": "terminal",
271
- "status": "succeeded"
453
+ "reviewRework": {
454
+ "id": "reviewRework",
455
+ "kind": "agent",
456
+ "roleRef": "role:developer",
457
+ "next": "reviewIntegrator",
458
+ "onFailure": "abort",
459
+ "resultSchema": "schema:change",
460
+ "incrementCounters": [
461
+ "reviewLoop"
462
+ ],
463
+ "consumes": [
464
+ {
465
+ "node": "triage",
466
+ "as": "triage"
467
+ }
468
+ ]
272
469
  },
273
- "failedEnd": {
274
- "id": "failedEnd",
275
- "kind": "terminal",
276
- "status": "failed"
470
+ "reviewIntegrator": {
471
+ "id": "reviewIntegrator",
472
+ "kind": "script",
473
+ "scriptRef": "script:integrator",
474
+ "next": "respondThreads",
475
+ "onFailure": "route",
476
+ "resultSchema": "schema:integration",
477
+ "catch": [
478
+ {
479
+ "onError": "revo.ScriptBlocked",
480
+ "goto": "blockedEnd"
481
+ },
482
+ {
483
+ "onError": "revo.ScriptFailed",
484
+ "goto": "failedEnd"
485
+ }
486
+ ]
277
487
  },
278
- "blockedEnd": {
279
- "id": "blockedEnd",
280
- "kind": "terminal",
281
- "status": "blocked"
488
+ "respondThreads": {
489
+ "id": "respondThreads",
490
+ "kind": "script",
491
+ "scriptRef": "script:respondThreads",
492
+ "next": "pollPr",
493
+ "onFailure": "route",
494
+ "resultSchema": "schema:respond",
495
+ "consumes": [
496
+ {
497
+ "node": "triage",
498
+ "as": "triage"
499
+ }
500
+ ],
501
+ "catch": [
502
+ {
503
+ "onError": "revo.ScriptBlocked",
504
+ "goto": "blockedEnd"
505
+ },
506
+ {
507
+ "onError": "revo.ScriptFailed",
508
+ "goto": "failedEnd"
509
+ }
510
+ ]
282
511
  }
283
512
  },
284
- "title": "Feature development — plan + merge gates, bounded code-review + watcher rework",
513
+ "title": "Feature development — plan + merge gates, bounded code-review rework, and a PR review-feedback loop (plan 0018)",
285
514
  "policy": {
286
515
  "conflicts": [
287
516
  [
@@ -300,7 +529,15 @@
300
529
  "cap": 3,
301
530
  "parent": null
302
531
  },
303
- "watcherLoop": {
532
+ "ciLoop": {
533
+ "cap": 3,
534
+ "parent": null
535
+ },
536
+ "reviewLoop": {
537
+ "cap": 3,
538
+ "parent": null
539
+ },
540
+ "questionLoop": {
304
541
  "cap": 3,
305
542
  "parent": null
306
543
  }
@@ -52,5 +52,14 @@
52
52
  "allowed_tools": ["Read", "Grep", "Glob", "Bash"],
53
53
  "default_model_level": "cheap",
54
54
  "runner_id": "claude-code"
55
+ },
56
+ {
57
+ "id": "triager",
58
+ "path": "prompts/triager.md",
59
+ "surface": "repo",
60
+ "rights": "read-only",
61
+ "allowed_tools": ["Read", "Grep", "Glob", "Bash"],
62
+ "default_model_level": "deep",
63
+ "runner_id": "claude-code"
55
64
  }
56
65
  ]
@@ -18,7 +18,9 @@ reviewer can check against. The plan is the artifact a human approves at the pla
18
18
 
19
19
  ## Output
20
20
 
21
- Emit a structured plan. End your output with a single clear verdict token:
21
+ Put the full ordered plan (problem, scope, files to change, steps, risks, verification) in the result
22
+ `output` — the plan reviewer and the developer receive it verbatim as their input. Set the `verdict` field
23
+ to EXACTLY one of:
22
24
 
23
25
  - `approved` — the task is well understood and the plan is ready for a developer.
24
26
  - `changes_requested` — the request is ambiguous or under-specified; explain what is missing.
@@ -19,10 +19,10 @@ are invoked in the pipeline.
19
19
 
20
20
  ## Output
21
21
 
22
- End your output with a single clear verdict token:
22
+ Set the result `verdict` field (the pipeline routes on it) to EXACTLY one of these tokens:
23
23
 
24
24
  - `approved` — proceed; the work is correct and complete (nits are acceptable to defer).
25
25
  - `changes_requested` — fixable issues that must be addressed before proceeding.
26
26
  - `blocker` — a serious defect or risk that must be resolved (drives the bounded rework loop).
27
27
 
28
- Keep findings actionable. You are read-only: never modify the working tree.
28
+ Put your actionable findings in `output`. You are read-only: never modify the working tree.