agentweaver 0.1.14 → 0.1.16

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 (100) hide show
  1. package/README.md +29 -7
  2. package/dist/artifact-manifest.js +219 -0
  3. package/dist/artifacts.js +21 -1
  4. package/dist/doctor/checks/cwd-context.js +4 -3
  5. package/dist/doctor/checks/env-diagnostics.js +193 -71
  6. package/dist/doctor/checks/flow-readiness.js +212 -203
  7. package/dist/doctor/index.js +1 -1
  8. package/dist/doctor/orchestrator.js +18 -7
  9. package/dist/doctor/runner.js +9 -8
  10. package/dist/doctor/types.js +12 -0
  11. package/dist/flow-state.js +75 -15
  12. package/dist/index.js +499 -199
  13. package/dist/interactive/blessed-session.js +361 -0
  14. package/dist/interactive/controller.js +1293 -0
  15. package/dist/interactive/create-interactive-session.js +5 -0
  16. package/dist/interactive/ink/index.js +576 -0
  17. package/dist/interactive/progress.js +245 -0
  18. package/dist/interactive/selectors.js +14 -0
  19. package/dist/interactive/session.js +1 -0
  20. package/dist/interactive/state.js +34 -0
  21. package/dist/interactive/tree.js +155 -0
  22. package/dist/interactive/types.js +1 -0
  23. package/dist/interactive/view-model.js +1 -0
  24. package/dist/interactive-ui.js +159 -194
  25. package/dist/pipeline/context.js +1 -0
  26. package/dist/pipeline/declarative-flow-runner.js +212 -6
  27. package/dist/pipeline/declarative-flows.js +27 -0
  28. package/dist/pipeline/execution-routing-config.js +15 -0
  29. package/dist/pipeline/flow-catalog.js +23 -3
  30. package/dist/pipeline/flow-run-resume.js +29 -0
  31. package/dist/pipeline/flow-specs/auto-common.json +89 -360
  32. package/dist/pipeline/flow-specs/auto-golang.json +58 -363
  33. package/dist/pipeline/flow-specs/auto-simple.json +141 -0
  34. package/dist/pipeline/flow-specs/bugz/bug-analyze.json +2 -0
  35. package/dist/pipeline/flow-specs/bugz/bug-fix.json +1 -0
  36. package/dist/pipeline/flow-specs/design-review/design-review-loop.json +304 -0
  37. package/dist/pipeline/flow-specs/design-review.json +249 -0
  38. package/dist/pipeline/flow-specs/gitlab/gitlab-diff-review.json +11 -0
  39. package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +2 -0
  40. package/dist/pipeline/flow-specs/gitlab/mr-description.json +1 -0
  41. package/dist/pipeline/flow-specs/go/run-go-linter-loop.json +2 -0
  42. package/dist/pipeline/flow-specs/go/run-go-tests-loop.json +2 -0
  43. package/dist/pipeline/flow-specs/implement.json +24 -5
  44. package/dist/pipeline/flow-specs/instant-task.json +177 -0
  45. package/dist/pipeline/flow-specs/normalize-task-source.json +311 -0
  46. package/dist/pipeline/flow-specs/plan-revise.json +267 -0
  47. package/dist/pipeline/flow-specs/plan.json +48 -70
  48. package/dist/pipeline/flow-specs/review/review-fix.json +24 -4
  49. package/dist/pipeline/flow-specs/review/review-loop.json +351 -45
  50. package/dist/pipeline/flow-specs/review/review-project-loop.json +590 -0
  51. package/dist/pipeline/flow-specs/review/review-project.json +12 -0
  52. package/dist/pipeline/flow-specs/review/review.json +37 -31
  53. package/dist/pipeline/flow-specs/task-describe.json +62 -2
  54. package/dist/pipeline/flow-specs/task-source/jira-fetch.json +70 -0
  55. package/dist/pipeline/flow-specs/task-source/manual-input.json +216 -0
  56. package/dist/pipeline/node-registry.js +49 -1
  57. package/dist/pipeline/node-runner.js +3 -2
  58. package/dist/pipeline/nodes/build-review-fix-prompt-node.js +5 -1
  59. package/dist/pipeline/nodes/clear-ready-to-merge-node.js +11 -0
  60. package/dist/pipeline/nodes/commit-message-form-node.js +8 -0
  61. package/dist/pipeline/nodes/design-review-verdict-node.js +36 -0
  62. package/dist/pipeline/nodes/ensure-summary-json-node.js +70 -0
  63. package/dist/pipeline/nodes/fetch-gitlab-diff-node.js +19 -2
  64. package/dist/pipeline/nodes/fetch-gitlab-review-node.js +19 -2
  65. package/dist/pipeline/nodes/flow-run-node.js +226 -7
  66. package/dist/pipeline/nodes/git-commit-form-node.js +8 -0
  67. package/dist/pipeline/nodes/gitlab-review-artifacts-node.js +19 -2
  68. package/dist/pipeline/nodes/jira-fetch-node.js +50 -4
  69. package/dist/pipeline/nodes/llm-prompt-node.js +32 -12
  70. package/dist/pipeline/nodes/planning-bundle-node.js +10 -0
  71. package/dist/pipeline/nodes/review-verdict-node.js +86 -0
  72. package/dist/pipeline/nodes/select-files-form-node.js +8 -0
  73. package/dist/pipeline/nodes/structured-summary-node.js +24 -0
  74. package/dist/pipeline/nodes/user-input-node.js +38 -3
  75. package/dist/pipeline/nodes/write-selection-file-node.js +20 -4
  76. package/dist/pipeline/prompt-registry.js +5 -1
  77. package/dist/pipeline/prompt-runtime.js +4 -1
  78. package/dist/pipeline/review-iteration.js +26 -0
  79. package/dist/pipeline/spec-compiler.js +2 -0
  80. package/dist/pipeline/spec-types.js +5 -0
  81. package/dist/pipeline/spec-validator.js +14 -0
  82. package/dist/pipeline/value-resolver.js +84 -1
  83. package/dist/prompts.js +82 -13
  84. package/dist/review-severity.js +45 -0
  85. package/dist/runtime/artifact-registry.js +402 -0
  86. package/dist/runtime/design-review-input-contract.js +113 -0
  87. package/dist/runtime/env-loader.js +3 -0
  88. package/dist/runtime/execution-routing-store.js +134 -0
  89. package/dist/runtime/execution-routing.js +227 -0
  90. package/dist/runtime/interactive-execution-routing.js +462 -0
  91. package/dist/runtime/plan-revise-input-contract.js +147 -0
  92. package/dist/runtime/planning-bundle.js +123 -0
  93. package/dist/runtime/ready-to-merge.js +31 -0
  94. package/dist/runtime/review-input-contract.js +100 -0
  95. package/dist/scope.js +11 -2
  96. package/dist/structured-artifact-schema-registry.js +10 -0
  97. package/dist/structured-artifact-schemas.json +257 -1
  98. package/dist/structured-artifacts.js +83 -6
  99. package/dist/user-input.js +70 -3
  100. package/package.json +6 -3
@@ -0,0 +1,590 @@
1
+ {
2
+ "kind": "review-project-loop-flow",
3
+ "version": 1,
4
+ "description": "Iteratively runs project review → review-fix cycles up to 5 times when no structured planning context is available. Stops early when ready-to-merge is achieved. Each iteration auto-selects the configured blocking severities for fixing. After iteration 5, runs a terminal verification project review to confirm the post-fix state.",
5
+ "catalogVisibility": "hidden",
6
+ "constants": {
7
+ "autoReviewFixExtraPrompt": "Fix only configured blocking severities."
8
+ },
9
+ "phases": [
10
+ {
11
+ "id": "entry_cleanup",
12
+ "steps": [
13
+ {
14
+ "id": "clear_stale_ready_to_merge",
15
+ "node": "clear-ready-to-merge",
16
+ "when": {
17
+ "not": { "ref": "context.dryRun" }
18
+ },
19
+ "params": {
20
+ "taskKey": { "ref": "params.taskKey" }
21
+ }
22
+ }
23
+ ]
24
+ },
25
+ {
26
+ "id": "review_iteration_1",
27
+ "steps": [
28
+ {
29
+ "id": "run_review",
30
+ "node": "flow-run",
31
+ "params": {
32
+ "fileName": { "const": "review-project.json" },
33
+ "labelText": {
34
+ "template": "Running project review (iteration {iteration})",
35
+ "vars": {
36
+ "iteration": { "ref": "params.baseIteration" }
37
+ }
38
+ },
39
+ "taskKey": { "ref": "params.taskKey" },
40
+ "iteration": { "ref": "params.baseIteration" },
41
+ "extraPrompt": { "ref": "params.extraPrompt" },
42
+ "reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
43
+ "llmModel": { "ref": "params.llmModel" },
44
+ "llmExecutor": { "ref": "params.llmExecutor" }
45
+ }
46
+ },
47
+ {
48
+ "id": "load_review_summary",
49
+ "node": "structured-summary",
50
+ "when": {
51
+ "not": { "ref": "context.dryRun" }
52
+ },
53
+ "params": {
54
+ "path": {
55
+ "artifact": {
56
+ "kind": "review-json-file",
57
+ "taskKey": { "ref": "params.taskKey" },
58
+ "iteration": { "ref": "params.baseIteration" }
59
+ }
60
+ }
61
+ }
62
+ },
63
+ {
64
+ "id": "notify_review_complete",
65
+ "node": "telegram-notify",
66
+ "when": {
67
+ "not": { "ref": "context.dryRun" }
68
+ },
69
+ "params": {
70
+ "message": {
71
+ "template": "Review iteration {iteration}: {summary}",
72
+ "vars": {
73
+ "iteration": { "ref": "params.baseIteration" },
74
+ "summary": { "ref": "steps.review_iteration_1.load_review_summary.value.summary" }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ {
80
+ "id": "check_ready_to_merge",
81
+ "node": "file-check",
82
+ "when": {
83
+ "not": { "ref": "context.dryRun" }
84
+ },
85
+ "params": {
86
+ "path": {
87
+ "artifact": {
88
+ "kind": "ready-to-merge-file",
89
+ "taskKey": { "ref": "params.taskKey" }
90
+ }
91
+ },
92
+ "panelTitle": { "const": "Ready To Merge" },
93
+ "foundMessage": { "const": "Changes are ready to merge.\nready-to-merge.md file created." },
94
+ "tone": { "const": "green" }
95
+ },
96
+ "stopFlowIf": {
97
+ "equals": [
98
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
99
+ { "const": true }
100
+ ]
101
+ }
102
+ },
103
+ {
104
+ "id": "write_auto_selection",
105
+ "node": "write-selection-file",
106
+ "when": {
107
+ "all": [
108
+ { "not": { "ref": "context.dryRun" } },
109
+ { "equals": [
110
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
111
+ { "const": false }
112
+ ]}
113
+ ]
114
+ },
115
+ "params": {
116
+ "outputFile": {
117
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
118
+ "vars": {
119
+ "workspace": { "ref": "params.workspaceDir" },
120
+ "taskKey": { "ref": "params.taskKey" },
121
+ "iteration": { "ref": "params.baseIteration" }
122
+ }
123
+ },
124
+ "reviewFindingsJsonFile": {
125
+ "artifact": {
126
+ "kind": "review-json-file",
127
+ "taskKey": { "ref": "params.taskKey" },
128
+ "iteration": { "ref": "params.baseIteration" }
129
+ }
130
+ },
131
+ "selectionMode": { "const": "auto-blocking-severities" },
132
+ "blockingSeverities": { "ref": "params.reviewBlockingSeverities" }
133
+ }
134
+ },
135
+ {
136
+ "id": "run_review_fix",
137
+ "node": "flow-run",
138
+ "when": {
139
+ "all": [
140
+ { "not": { "ref": "context.dryRun" } },
141
+ { "equals": [
142
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
143
+ { "const": false }
144
+ ]}
145
+ ]
146
+ },
147
+ "params": {
148
+ "fileName": { "const": "review-fix.json" },
149
+ "labelText": {
150
+ "template": "Running review-fix (iteration {iteration})",
151
+ "vars": {
152
+ "iteration": { "ref": "params.baseIteration" }
153
+ }
154
+ },
155
+ "taskKey": { "ref": "params.taskKey" },
156
+ "latestIteration": { "ref": "params.baseIteration" },
157
+ "reviewAssessmentJsonFile": { "const": null },
158
+ "reviewFixSelectionJsonFile": {
159
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
160
+ "vars": {
161
+ "workspace": { "ref": "params.workspaceDir" },
162
+ "taskKey": { "ref": "params.taskKey" },
163
+ "iteration": { "ref": "params.baseIteration" }
164
+ }
165
+ },
166
+ "reviewFixPoints": { "ref": "params.reviewFixPoints" },
167
+ "reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
168
+ "extraPrompt": {
169
+ "appendPrompt": {
170
+ "base": { "ref": "params.extraPrompt" },
171
+ "suffix": { "const": "Fix only configured blocking severities." }
172
+ }
173
+ },
174
+ "llmModel": { "ref": "params.llmModel" },
175
+ "llmExecutor": { "ref": "params.llmExecutor" }
176
+ }
177
+ },
178
+ {
179
+ "id": "load_review_fix_summary",
180
+ "node": "structured-summary",
181
+ "when": {
182
+ "all": [
183
+ { "not": { "ref": "context.dryRun" } },
184
+ { "equals": [
185
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
186
+ { "const": false }
187
+ ]}
188
+ ]
189
+ },
190
+ "params": {
191
+ "path": {
192
+ "artifact": {
193
+ "kind": "review-fix-json-file",
194
+ "taskKey": { "ref": "params.taskKey" },
195
+ "iteration": { "ref": "params.baseIteration" }
196
+ }
197
+ }
198
+ }
199
+ },
200
+ {
201
+ "id": "notify_review_fix_complete",
202
+ "node": "telegram-notify",
203
+ "when": {
204
+ "all": [
205
+ { "not": { "ref": "context.dryRun" } },
206
+ { "equals": [
207
+ { "ref": "steps.review_iteration_1.check_ready_to_merge.value.exists" },
208
+ { "const": false }
209
+ ]}
210
+ ]
211
+ },
212
+ "params": {
213
+ "message": {
214
+ "template": "Review fix iteration {iteration}: {summary}",
215
+ "vars": {
216
+ "iteration": { "ref": "params.baseIteration" },
217
+ "summary": { "ref": "steps.review_iteration_1.load_review_fix_summary.value.summary" }
218
+ }
219
+ }
220
+ }
221
+ }
222
+ ]
223
+ },
224
+ {
225
+ "repeat": {
226
+ "var": "iteration",
227
+ "from": 2,
228
+ "to": 5
229
+ },
230
+ "phases": [
231
+ {
232
+ "id": "review_iteration_${iteration}",
233
+ "steps": [
234
+ {
235
+ "id": "run_review",
236
+ "node": "flow-run",
237
+ "params": {
238
+ "fileName": { "const": "review-project.json" },
239
+ "labelText": {
240
+ "template": "Running project review (iteration {iteration})",
241
+ "vars": {
242
+ "iteration": {
243
+ "add": [
244
+ { "ref": "params.baseIteration" },
245
+ { "ref": "repeat.iteration" },
246
+ { "const": -1 }
247
+ ]
248
+ }
249
+ }
250
+ },
251
+ "taskKey": { "ref": "params.taskKey" },
252
+ "iteration": {
253
+ "add": [
254
+ { "ref": "params.baseIteration" },
255
+ { "ref": "repeat.iteration" },
256
+ { "const": -1 }
257
+ ]
258
+ },
259
+ "extraPrompt": { "ref": "params.extraPrompt" },
260
+ "reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
261
+ "llmModel": { "ref": "params.llmModel" },
262
+ "llmExecutor": { "ref": "params.llmExecutor" }
263
+ }
264
+ },
265
+ {
266
+ "id": "load_review_summary",
267
+ "node": "structured-summary",
268
+ "when": {
269
+ "not": { "ref": "context.dryRun" }
270
+ },
271
+ "params": {
272
+ "path": {
273
+ "artifact": {
274
+ "kind": "review-json-file",
275
+ "taskKey": { "ref": "params.taskKey" },
276
+ "iteration": {
277
+ "add": [
278
+ { "ref": "params.baseIteration" },
279
+ { "ref": "repeat.iteration" },
280
+ { "const": -1 }
281
+ ]
282
+ }
283
+ }
284
+ }
285
+ }
286
+ },
287
+ {
288
+ "id": "notify_review_complete",
289
+ "node": "telegram-notify",
290
+ "when": {
291
+ "not": { "ref": "context.dryRun" }
292
+ },
293
+ "params": {
294
+ "message": {
295
+ "template": "Review iteration {iteration}: {summary}",
296
+ "vars": {
297
+ "summary": { "ref": "steps.review_iteration_${iteration}.load_review_summary.value.summary" },
298
+ "iteration": {
299
+ "add": [
300
+ { "ref": "params.baseIteration" },
301
+ { "ref": "repeat.iteration" },
302
+ { "const": -1 }
303
+ ]
304
+ }
305
+ }
306
+ }
307
+ }
308
+ },
309
+ {
310
+ "id": "check_ready_to_merge",
311
+ "node": "file-check",
312
+ "when": {
313
+ "not": { "ref": "context.dryRun" }
314
+ },
315
+ "params": {
316
+ "path": {
317
+ "artifact": {
318
+ "kind": "ready-to-merge-file",
319
+ "taskKey": { "ref": "params.taskKey" }
320
+ }
321
+ },
322
+ "panelTitle": { "const": "Ready To Merge" },
323
+ "foundMessage": { "const": "Changes are ready to merge.\nready-to-merge.md file created." },
324
+ "tone": { "const": "green" }
325
+ },
326
+ "stopFlowIf": {
327
+ "equals": [
328
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
329
+ { "const": true }
330
+ ]
331
+ }
332
+ },
333
+ {
334
+ "id": "write_auto_selection",
335
+ "node": "write-selection-file",
336
+ "when": {
337
+ "all": [
338
+ { "not": { "ref": "context.dryRun" } },
339
+ { "equals": [
340
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
341
+ { "const": false }
342
+ ]}
343
+ ]
344
+ },
345
+ "params": {
346
+ "outputFile": {
347
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
348
+ "vars": {
349
+ "workspace": { "ref": "params.workspaceDir" },
350
+ "taskKey": { "ref": "params.taskKey" },
351
+ "iteration": {
352
+ "add": [
353
+ { "ref": "params.baseIteration" },
354
+ { "ref": "repeat.iteration" },
355
+ { "const": -1 }
356
+ ]
357
+ }
358
+ }
359
+ },
360
+ "reviewFindingsJsonFile": {
361
+ "artifact": {
362
+ "kind": "review-json-file",
363
+ "taskKey": { "ref": "params.taskKey" },
364
+ "iteration": {
365
+ "add": [
366
+ { "ref": "params.baseIteration" },
367
+ { "ref": "repeat.iteration" },
368
+ { "const": -1 }
369
+ ]
370
+ }
371
+ }
372
+ },
373
+ "selectionMode": { "const": "auto-blocking-severities" },
374
+ "blockingSeverities": { "ref": "params.reviewBlockingSeverities" }
375
+ }
376
+ },
377
+ {
378
+ "id": "run_review_fix",
379
+ "when": {
380
+ "all": [
381
+ { "not": { "ref": "context.dryRun" } },
382
+ { "equals": [
383
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
384
+ { "const": false }
385
+ ]}
386
+ ]
387
+ },
388
+ "node": "flow-run",
389
+ "params": {
390
+ "fileName": { "const": "review-fix.json" },
391
+ "labelText": {
392
+ "template": "Running review-fix (iteration {iteration})",
393
+ "vars": {
394
+ "iteration": {
395
+ "add": [
396
+ { "ref": "params.baseIteration" },
397
+ { "ref": "repeat.iteration" },
398
+ { "const": -1 }
399
+ ]
400
+ }
401
+ }
402
+ },
403
+ "taskKey": { "ref": "params.taskKey" },
404
+ "latestIteration": {
405
+ "add": [
406
+ { "ref": "params.baseIteration" },
407
+ { "ref": "repeat.iteration" },
408
+ { "const": -1 }
409
+ ]
410
+ },
411
+ "reviewAssessmentJsonFile": { "const": null },
412
+ "reviewFixSelectionJsonFile": {
413
+ "template": "{workspace}/review-fix-selection-{taskKey}-iter-{iteration}.json",
414
+ "vars": {
415
+ "workspace": { "ref": "params.workspaceDir" },
416
+ "taskKey": { "ref": "params.taskKey" },
417
+ "iteration": {
418
+ "add": [
419
+ { "ref": "params.baseIteration" },
420
+ { "ref": "repeat.iteration" },
421
+ { "const": -1 }
422
+ ]
423
+ }
424
+ }
425
+ },
426
+ "reviewFixPoints": { "ref": "params.reviewFixPoints" },
427
+ "reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
428
+ "extraPrompt": {
429
+ "appendPrompt": {
430
+ "base": { "ref": "params.extraPrompt" },
431
+ "suffix": { "const": "Fix only configured blocking severities." }
432
+ }
433
+ },
434
+ "llmModel": { "ref": "params.llmModel" },
435
+ "llmExecutor": { "ref": "params.llmExecutor" }
436
+ }
437
+ },
438
+ {
439
+ "id": "load_review_fix_summary",
440
+ "node": "structured-summary",
441
+ "when": {
442
+ "all": [
443
+ { "not": { "ref": "context.dryRun" } },
444
+ { "equals": [
445
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
446
+ { "const": false }
447
+ ]}
448
+ ]
449
+ },
450
+ "params": {
451
+ "path": {
452
+ "artifact": {
453
+ "kind": "review-fix-json-file",
454
+ "taskKey": { "ref": "params.taskKey" },
455
+ "iteration": {
456
+ "add": [
457
+ { "ref": "params.baseIteration" },
458
+ { "ref": "repeat.iteration" },
459
+ { "const": -1 }
460
+ ]
461
+ }
462
+ }
463
+ }
464
+ }
465
+ },
466
+ {
467
+ "id": "notify_review_fix_complete",
468
+ "node": "telegram-notify",
469
+ "when": {
470
+ "all": [
471
+ { "not": { "ref": "context.dryRun" } },
472
+ { "equals": [
473
+ { "ref": "steps.review_iteration_${iteration}.check_ready_to_merge.value.exists" },
474
+ { "const": false }
475
+ ]}
476
+ ]
477
+ },
478
+ "params": {
479
+ "message": {
480
+ "template": "Review fix iteration {iteration}: {summary}",
481
+ "vars": {
482
+ "summary": { "ref": "steps.review_iteration_${iteration}.load_review_fix_summary.value.summary" },
483
+ "iteration": {
484
+ "add": [
485
+ { "ref": "params.baseIteration" },
486
+ { "ref": "repeat.iteration" },
487
+ { "const": -1 }
488
+ ]
489
+ }
490
+ }
491
+ }
492
+ }
493
+ }
494
+ ]
495
+ }
496
+ ]
497
+ },
498
+ {
499
+ "id": "terminal_verification",
500
+ "when": {
501
+ "not": { "ref": "context.dryRun" }
502
+ },
503
+ "steps": [
504
+ {
505
+ "id": "clear_ready_to_merge_before_verification",
506
+ "node": "clear-ready-to-merge",
507
+ "when": {
508
+ "not": { "ref": "context.dryRun" }
509
+ },
510
+ "params": {
511
+ "taskKey": { "ref": "params.taskKey" }
512
+ }
513
+ },
514
+ {
515
+ "id": "run_terminal_review",
516
+ "node": "flow-run",
517
+ "params": {
518
+ "fileName": { "const": "review-project.json" },
519
+ "labelText": {
520
+ "template": "Running terminal verification project review (iteration {iteration})",
521
+ "vars": {
522
+ "iteration": {
523
+ "add": [
524
+ { "ref": "params.baseIteration" },
525
+ { "const": 5 }
526
+ ]
527
+ }
528
+ }
529
+ },
530
+ "taskKey": { "ref": "params.taskKey" },
531
+ "iteration": {
532
+ "add": [
533
+ { "ref": "params.baseIteration" },
534
+ { "const": 5 }
535
+ ]
536
+ },
537
+ "extraPrompt": { "ref": "params.extraPrompt" },
538
+ "reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
539
+ "llmModel": { "ref": "params.llmModel" },
540
+ "llmExecutor": { "ref": "params.llmExecutor" }
541
+ }
542
+ },
543
+ {
544
+ "id": "check_terminal_ready_to_merge",
545
+ "node": "file-check",
546
+ "when": {
547
+ "not": { "ref": "context.dryRun" }
548
+ },
549
+ "params": {
550
+ "path": {
551
+ "artifact": {
552
+ "kind": "ready-to-merge-file",
553
+ "taskKey": { "ref": "params.taskKey" }
554
+ }
555
+ },
556
+ "panelTitle": { "const": "Ready To Merge" },
557
+ "foundMessage": { "const": "Changes are ready to merge.\nready-to-merge.md file created." },
558
+ "tone": { "const": "green" }
559
+ }
560
+ },
561
+ {
562
+ "id": "assert_terminal_success",
563
+ "node": "file-check",
564
+ "when": {
565
+ "not": { "ref": "context.dryRun" }
566
+ },
567
+ "params": {
568
+ "path": {
569
+ "artifact": {
570
+ "kind": "ready-to-merge-file",
571
+ "taskKey": { "ref": "params.taskKey" }
572
+ }
573
+ },
574
+ "panelTitle": { "const": "Terminal Verification" },
575
+ "foundMessage": { "const": "Terminal verification passed." },
576
+ "tone": { "const": "green" }
577
+ },
578
+ "expect": [
579
+ {
580
+ "kind": "step-output",
581
+ "value": { "ref": "steps.terminal_verification.check_terminal_ready_to_merge.value.exists" },
582
+ "equals": { "const": true },
583
+ "message": "Terminal verification failed: ready-to-merge.md was not produced after the terminal review iteration. review-project-loop must fail."
584
+ }
585
+ ]
586
+ }
587
+ ]
588
+ }
589
+ ]
590
+ }
@@ -2,6 +2,7 @@
2
2
  "kind": "review-project-flow",
3
3
  "version": 1,
4
4
  "description": "Project-level code review. Runs a single LLM review step using the review-project prompt template. Used internally by the review command when no prior design/plan artifacts are present.",
5
+ "catalogVisibility": "hidden",
5
6
  "phases": [
6
7
  {
7
8
  "id": "review",
@@ -9,6 +10,7 @@
9
10
  {
10
11
  "id": "run_review",
11
12
  "node": "llm-prompt",
13
+ "routingGroup": "review",
12
14
  "prompt": {
13
15
  "templateRef": "review-project",
14
16
  "vars": {
@@ -81,6 +83,16 @@
81
83
  "message": "Project review produced invalid structured artifacts."
82
84
  }
83
85
  ]
86
+ },
87
+ {
88
+ "id": "review_verdict",
89
+ "node": "review-verdict",
90
+ "when": { "not": { "ref": "context.dryRun" } },
91
+ "params": {
92
+ "taskKey": { "ref": "params.taskKey" },
93
+ "iteration": { "ref": "params.iteration" },
94
+ "blockingSeverities": { "ref": "params.reviewBlockingSeverities" }
95
+ }
84
96
  }
85
97
  ]
86
98
  }