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