agentweaver 0.1.15 → 0.1.17
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 +76 -19
- package/dist/artifact-manifest.js +219 -0
- package/dist/artifacts.js +88 -3
- package/dist/doctor/checks/env-diagnostics.js +25 -0
- package/dist/doctor/checks/executors.js +2 -2
- package/dist/doctor/checks/flow-readiness.js +15 -18
- package/dist/flow-state.js +212 -15
- package/dist/index.js +539 -209
- package/dist/interactive/blessed-session.js +361 -0
- package/dist/interactive/controller.js +1326 -0
- package/dist/interactive/create-interactive-session.js +5 -0
- package/dist/interactive/ink/index.js +597 -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/auto-flow.js +9 -6
- package/dist/pipeline/context.js +7 -5
- package/dist/pipeline/declarative-flow-runner.js +212 -6
- package/dist/pipeline/declarative-flows.js +63 -17
- package/dist/pipeline/execution-routing-config.js +15 -0
- package/dist/pipeline/flow-catalog.js +50 -12
- package/dist/pipeline/flow-run-resume.js +29 -0
- package/dist/pipeline/flow-specs/auto-common.json +90 -360
- package/dist/pipeline/flow-specs/auto-golang.json +81 -360
- 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 +316 -0
- package/dist/pipeline/flow-specs/design-review.json +10 -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 +13 -6
- 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 +7 -1
- package/dist/pipeline/flow-specs/plan.json +51 -71
- 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 +2 -0
- 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/launch-profile-config.js +30 -18
- package/dist/pipeline/node-contract.js +1 -0
- package/dist/pipeline/node-registry.js +115 -6
- 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 +13 -2
- 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 +242 -8
- 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 +38 -36
- 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/plugin-loader.js +389 -0
- package/dist/pipeline/plugin-types.js +1 -0
- package/dist/pipeline/prompt-registry.js +3 -1
- package/dist/pipeline/prompt-runtime.js +4 -1
- package/dist/pipeline/registry.js +71 -4
- package/dist/pipeline/review-iteration.js +26 -0
- package/dist/pipeline/spec-compiler.js +3 -0
- package/dist/pipeline/spec-loader.js +14 -0
- package/dist/pipeline/spec-types.js +3 -0
- package/dist/pipeline/spec-validator.js +20 -0
- package/dist/pipeline/value-resolver.js +76 -2
- package/dist/plugin-sdk.js +1 -0
- package/dist/prompts.js +36 -14
- package/dist/review-severity.js +45 -0
- package/dist/runtime/artifact-registry.js +405 -0
- package/dist/runtime/design-review-input-contract.js +17 -16
- package/dist/runtime/env-loader.js +3 -0
- package/dist/runtime/execution-routing-store.js +134 -0
- package/dist/runtime/execution-routing.js +233 -0
- package/dist/runtime/interactive-execution-routing.js +471 -0
- package/dist/runtime/plan-revise-input-contract.js +35 -32
- package/dist/runtime/planning-bundle.js +123 -0
- package/dist/runtime/ready-to-merge.js +22 -1
- package/dist/runtime/review-input-contract.js +100 -0
- package/dist/structured-artifact-schema-registry.js +9 -0
- package/dist/structured-artifact-schemas.json +140 -1
- package/dist/structured-artifacts.js +77 -6
- package/dist/user-input.js +70 -3
- package/docs/example/.flows/examples/claude-example.json +50 -0
- package/docs/example/.plugins/claude-example-plugin/index.js +149 -0
- package/docs/example/.plugins/claude-example-plugin/plugin.json +8 -0
- package/docs/examples/.flows/claude-example.json +50 -0
- package/docs/examples/.plugins/claude-example-plugin/index.js +149 -0
- package/docs/examples/.plugins/claude-example-plugin/plugin.json +8 -0
- package/docs/plugin-sdk.md +731 -0
- package/package.json +11 -4
|
@@ -0,0 +1,316 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "design-review-loop-flow",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "Runs design-review and plan-revise for up to 3 iterations. Stops early on approval. If the final design review still requires revision, notifies the user and asks whether to continue with the latest planning artifacts or stop the parent flow.",
|
|
5
|
+
"catalogVisibility": "hidden",
|
|
6
|
+
"phases": [
|
|
7
|
+
{
|
|
8
|
+
"repeat": {
|
|
9
|
+
"var": "iteration",
|
|
10
|
+
"from": 1,
|
|
11
|
+
"to": 3
|
|
12
|
+
},
|
|
13
|
+
"phases": [
|
|
14
|
+
{
|
|
15
|
+
"id": "design_review_iteration_${iteration}",
|
|
16
|
+
"steps": [
|
|
17
|
+
{
|
|
18
|
+
"id": "run_design_review",
|
|
19
|
+
"node": "flow-run",
|
|
20
|
+
"params": {
|
|
21
|
+
"fileName": { "const": "design-review.json" },
|
|
22
|
+
"labelText": {
|
|
23
|
+
"template": "Running design review (iteration ${iteration})"
|
|
24
|
+
},
|
|
25
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
26
|
+
"iteration": {
|
|
27
|
+
"add": [
|
|
28
|
+
{ "ref": "params.baseIteration" },
|
|
29
|
+
{ "add": [{ "ref": "repeat.iteration" }, { "const": -1 }] }
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"workspaceDir": { "ref": "params.workspaceDir" },
|
|
33
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
34
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
35
|
+
"llmModel": { "ref": "params.llmModel" }
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"id": "check_design_review_verdict",
|
|
40
|
+
"node": "design-review-verdict",
|
|
41
|
+
"params": {
|
|
42
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
43
|
+
"iteration": {
|
|
44
|
+
"add": [
|
|
45
|
+
{ "ref": "params.baseIteration" },
|
|
46
|
+
{ "add": [{ "ref": "repeat.iteration" }, { "const": -1 }] }
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "notify_review_complete",
|
|
53
|
+
"node": "telegram-notify",
|
|
54
|
+
"params": {
|
|
55
|
+
"message": {
|
|
56
|
+
"template": "Design review iteration ${iteration} verdict: {verdict}",
|
|
57
|
+
"vars": {
|
|
58
|
+
"iteration": { "ref": "repeat.iteration" },
|
|
59
|
+
"verdict": { "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.verdict" }
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "stop_on_approved",
|
|
66
|
+
"when": {
|
|
67
|
+
"equals": [
|
|
68
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
69
|
+
{ "const": false }
|
|
70
|
+
]
|
|
71
|
+
},
|
|
72
|
+
"node": "telegram-notify",
|
|
73
|
+
"params": {
|
|
74
|
+
"message": {
|
|
75
|
+
"template": "Design review approved on iteration ${iteration}. Proceeding with implementation.",
|
|
76
|
+
"vars": {
|
|
77
|
+
"iteration": { "ref": "repeat.iteration" }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"stopFlowIf": {
|
|
82
|
+
"equals": [
|
|
83
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
84
|
+
{ "const": false }
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
"stopFlowOutcome": "success"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "run_plan_revise",
|
|
91
|
+
"when": {
|
|
92
|
+
"all": [
|
|
93
|
+
{
|
|
94
|
+
"equals": [
|
|
95
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
96
|
+
{ "const": true }
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"not": {
|
|
101
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"node": "flow-run",
|
|
107
|
+
"params": {
|
|
108
|
+
"fileName": { "const": "plan-revise.json" },
|
|
109
|
+
"labelText": {
|
|
110
|
+
"template": "Running plan revision (iteration ${iteration})"
|
|
111
|
+
},
|
|
112
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
113
|
+
"workspaceDir": { "ref": "params.workspaceDir" },
|
|
114
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
115
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
116
|
+
"llmModel": { "ref": "params.llmModel" }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "notify_revise_complete",
|
|
121
|
+
"when": {
|
|
122
|
+
"all": [
|
|
123
|
+
{
|
|
124
|
+
"equals": [
|
|
125
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
126
|
+
{ "const": true }
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"not": {
|
|
131
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
"node": "telegram-notify",
|
|
137
|
+
"params": {
|
|
138
|
+
"message": {
|
|
139
|
+
"template": "Plan revision after design review iteration ${iteration} is complete.",
|
|
140
|
+
"vars": {
|
|
141
|
+
"iteration": { "ref": "repeat.iteration" }
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"id": "notify_max_iterations_reached",
|
|
148
|
+
"when": {
|
|
149
|
+
"all": [
|
|
150
|
+
{
|
|
151
|
+
"equals": [
|
|
152
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
153
|
+
{ "const": true }
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
158
|
+
}
|
|
159
|
+
]
|
|
160
|
+
},
|
|
161
|
+
"node": "telegram-notify",
|
|
162
|
+
"params": {
|
|
163
|
+
"message": { "const": "Design review still requires revision after 3 iterations. User confirmation is required to continue with the latest planning artifacts." }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"id": "collect_continue_decision",
|
|
168
|
+
"when": {
|
|
169
|
+
"all": [
|
|
170
|
+
{
|
|
171
|
+
"equals": [
|
|
172
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
173
|
+
{ "const": true }
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
"node": "user-input",
|
|
182
|
+
"params": {
|
|
183
|
+
"formId": { "const": "design-review-loop-final-decision" },
|
|
184
|
+
"title": { "const": "Design Review Requires Revision" },
|
|
185
|
+
"description": { "const": "The latest design review still requires revision after 3 iterations. Decide whether to continue with the latest design and plan artifacts or stop the flow." },
|
|
186
|
+
"submitLabel": { "const": "Confirm decision" },
|
|
187
|
+
"fields": {
|
|
188
|
+
"list": [
|
|
189
|
+
{
|
|
190
|
+
"const": {
|
|
191
|
+
"id": "decision",
|
|
192
|
+
"type": "single-select",
|
|
193
|
+
"label": "How to proceed",
|
|
194
|
+
"required": true,
|
|
195
|
+
"default": "continue",
|
|
196
|
+
"options": [
|
|
197
|
+
{
|
|
198
|
+
"value": "continue",
|
|
199
|
+
"label": "Continue with latest artifacts",
|
|
200
|
+
"description": "Proceed to implementation using the most recently revised design and plan."
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"value": "stop",
|
|
204
|
+
"label": "Stop the flow",
|
|
205
|
+
"description": "Do not continue automatically. Review and revise the planning artifacts manually."
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
"outputFile": {
|
|
213
|
+
"template": "{workspace}/design-review-loop-decision-{taskKey}.json",
|
|
214
|
+
"vars": {
|
|
215
|
+
"workspace": { "ref": "params.workspaceDir" },
|
|
216
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"expect": [
|
|
221
|
+
{
|
|
222
|
+
"kind": "require-structured-artifacts",
|
|
223
|
+
"items": [
|
|
224
|
+
{
|
|
225
|
+
"path": {
|
|
226
|
+
"template": "{workspace}/design-review-loop-decision-{taskKey}.json",
|
|
227
|
+
"vars": {
|
|
228
|
+
"workspace": { "ref": "params.workspaceDir" },
|
|
229
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"schemaId": "user-input/v1"
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
"message": "Design-review loop final decision input is missing or invalid."
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"id": "notify_continue_with_latest_artifacts",
|
|
241
|
+
"when": {
|
|
242
|
+
"all": [
|
|
243
|
+
{
|
|
244
|
+
"equals": [
|
|
245
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
246
|
+
{ "const": true }
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"equals": [
|
|
254
|
+
{ "ref": "steps.design_review_iteration_${iteration}.collect_continue_decision.value.values.decision" },
|
|
255
|
+
{ "const": "continue" }
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"node": "telegram-notify",
|
|
261
|
+
"params": {
|
|
262
|
+
"message": { "const": "User chose to continue with the latest planning artifacts despite the final design-review verdict." }
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"id": "stop_after_user_declined",
|
|
267
|
+
"when": {
|
|
268
|
+
"all": [
|
|
269
|
+
{
|
|
270
|
+
"equals": [
|
|
271
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
272
|
+
{ "const": true }
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"equals": [
|
|
280
|
+
{ "ref": "steps.design_review_iteration_${iteration}.collect_continue_decision.value.values.decision" },
|
|
281
|
+
{ "const": "stop" }
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"node": "telegram-notify",
|
|
287
|
+
"params": {
|
|
288
|
+
"message": { "const": "User chose to stop after the final design-review verdict still required revision." }
|
|
289
|
+
},
|
|
290
|
+
"stopFlowIf": {
|
|
291
|
+
"all": [
|
|
292
|
+
{
|
|
293
|
+
"equals": [
|
|
294
|
+
{ "ref": "steps.design_review_iteration_${iteration}.check_design_review_verdict.value.needsRevision" },
|
|
295
|
+
{ "const": true }
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"equals": [{ "ref": "repeat.iteration" }, { "const": 3 }]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"equals": [
|
|
303
|
+
{ "ref": "steps.design_review_iteration_${iteration}.collect_continue_decision.value.values.decision" },
|
|
304
|
+
{ "const": "stop" }
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
]
|
|
308
|
+
},
|
|
309
|
+
"stopFlowOutcome": "stopped"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
]
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}
|
|
@@ -118,13 +118,16 @@
|
|
|
118
118
|
{
|
|
119
119
|
"id": "run_design_review",
|
|
120
120
|
"node": "llm-prompt",
|
|
121
|
+
"routingGroup": "design-review",
|
|
121
122
|
"prompt": {
|
|
122
123
|
"templateRef": "design-review",
|
|
123
124
|
"vars": {
|
|
125
|
+
"task_context_json_file": { "ref": "params.taskContextJsonFile" },
|
|
124
126
|
"jira_task_file": { "ref": "params.jiraTaskFile" },
|
|
125
127
|
"jira_attachments_manifest_file": { "ref": "params.jiraAttachmentsManifestFile" },
|
|
126
128
|
"jira_attachments_context_file": { "ref": "params.jiraAttachmentsContextFile" },
|
|
127
129
|
"planning_answers_json_file": { "ref": "params.planningAnswersJsonFile" },
|
|
130
|
+
"task_input_json_file": { "ref": "params.taskInputJsonFile" },
|
|
128
131
|
"design_file": { "ref": "params.designFile" },
|
|
129
132
|
"design_json_file": { "ref": "params.designJsonFile" },
|
|
130
133
|
"plan_file": { "ref": "params.planFile" },
|
|
@@ -166,6 +169,13 @@
|
|
|
166
169
|
"taskKey": { "ref": "params.taskKey" },
|
|
167
170
|
"iteration": { "ref": "params.iteration" }
|
|
168
171
|
}
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"artifact": {
|
|
175
|
+
"kind": "design-review-json-file",
|
|
176
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
177
|
+
"iteration": { "ref": "params.iteration" }
|
|
178
|
+
}
|
|
169
179
|
}
|
|
170
180
|
]
|
|
171
181
|
}
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
"id": "run_diff_review",
|
|
105
105
|
"when": { "not": { "ref": "context.dryRun" } },
|
|
106
106
|
"node": "llm-prompt",
|
|
107
|
+
"routingGroup": "review",
|
|
107
108
|
"prompt": {
|
|
108
109
|
"templateRef": "gitlab-diff-review",
|
|
109
110
|
"vars": {
|
|
@@ -190,6 +191,16 @@
|
|
|
190
191
|
"message": "Diff review produced invalid structured artifacts."
|
|
191
192
|
}
|
|
192
193
|
]
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "review_verdict",
|
|
197
|
+
"node": "review-verdict",
|
|
198
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
199
|
+
"params": {
|
|
200
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
201
|
+
"iteration": { "ref": "params.iteration" },
|
|
202
|
+
"blockingSeverities": { "ref": "params.reviewBlockingSeverities" }
|
|
203
|
+
}
|
|
193
204
|
}
|
|
194
205
|
]
|
|
195
206
|
}
|
|
@@ -104,6 +104,7 @@
|
|
|
104
104
|
"id": "assess_gitlab_review",
|
|
105
105
|
"when": { "not": { "ref": "context.dryRun" } },
|
|
106
106
|
"node": "llm-prompt",
|
|
107
|
+
"routingGroup": "review",
|
|
107
108
|
"prompt": {
|
|
108
109
|
"templateRef": "gitlab-review",
|
|
109
110
|
"vars": {
|
|
@@ -239,6 +240,7 @@
|
|
|
239
240
|
},
|
|
240
241
|
"reviewFixSelectionJsonFile": { "ref": "params.reviewFixSelectionJsonFile" },
|
|
241
242
|
"reviewFixPoints": { "ref": "params.reviewFixPoints" },
|
|
243
|
+
"reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
|
|
242
244
|
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
243
245
|
"llmModel": { "ref": "params.llmModel" },
|
|
244
246
|
"llmExecutor": { "ref": "params.llmExecutor" }
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"node": "llm-prompt",
|
|
59
|
+
"routingGroup": "local-fix-loop",
|
|
59
60
|
"prompt": {
|
|
60
61
|
"templateRef": "run-go-linter-loop-fix",
|
|
61
62
|
"vars": {
|
|
@@ -177,6 +178,7 @@
|
|
|
177
178
|
]
|
|
178
179
|
},
|
|
179
180
|
"node": "llm-prompt",
|
|
181
|
+
"routingGroup": "local-fix-loop",
|
|
180
182
|
"prompt": {
|
|
181
183
|
"templateRef": "run-go-linter-loop-fix",
|
|
182
184
|
"vars": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
]
|
|
57
57
|
},
|
|
58
58
|
"node": "llm-prompt",
|
|
59
|
+
"routingGroup": "local-fix-loop",
|
|
59
60
|
"prompt": {
|
|
60
61
|
"templateRef": "run-go-tests-loop-fix",
|
|
61
62
|
"vars": {
|
|
@@ -177,6 +178,7 @@
|
|
|
177
178
|
]
|
|
178
179
|
},
|
|
179
180
|
"node": "llm-prompt",
|
|
181
|
+
"routingGroup": "local-fix-loop",
|
|
180
182
|
"prompt": {
|
|
181
183
|
"templateRef": "run-go-tests-loop-fix",
|
|
182
184
|
"vars": {
|
|
@@ -9,43 +9,50 @@
|
|
|
9
9
|
{
|
|
10
10
|
"id": "run_implement",
|
|
11
11
|
"node": "llm-prompt",
|
|
12
|
+
"routingGroup": "implementation",
|
|
12
13
|
"prompt": {
|
|
13
14
|
"templateRef": "implement",
|
|
14
15
|
"vars": {
|
|
15
16
|
"design_file": {
|
|
16
17
|
"artifact": {
|
|
17
18
|
"kind": "design-file",
|
|
18
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
19
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
20
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
19
21
|
}
|
|
20
22
|
},
|
|
21
23
|
"design_json_file": {
|
|
22
24
|
"artifact": {
|
|
23
25
|
"kind": "design-json-file",
|
|
24
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
26
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
27
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
25
28
|
}
|
|
26
29
|
},
|
|
27
30
|
"plan_file": {
|
|
28
31
|
"artifact": {
|
|
29
32
|
"kind": "plan-file",
|
|
30
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
33
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
34
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
31
35
|
}
|
|
32
36
|
},
|
|
33
37
|
"plan_json_file": {
|
|
34
38
|
"artifact": {
|
|
35
39
|
"kind": "plan-json-file",
|
|
36
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
40
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
41
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
37
42
|
}
|
|
38
43
|
},
|
|
39
44
|
"qa_file": {
|
|
40
45
|
"artifact": {
|
|
41
46
|
"kind": "qa-file",
|
|
42
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
47
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
48
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
43
49
|
}
|
|
44
50
|
},
|
|
45
51
|
"qa_json_file": {
|
|
46
52
|
"artifact": {
|
|
47
53
|
"kind": "qa-json-file",
|
|
48
|
-
"taskKey": { "ref": "params.taskKey" }
|
|
54
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
55
|
+
"iteration": { "ref": "params.planningIteration" }
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
},
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "instant-task-flow",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "End-to-end resumable pipeline for ad-hoc work in the current branch-derived scope. Runs: manual source input → task source normalization → plan → design-review loop → implement → review loop, without Jira fetch.",
|
|
5
|
+
"phases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "source",
|
|
8
|
+
"steps": [
|
|
9
|
+
{
|
|
10
|
+
"id": "collect_manual_source",
|
|
11
|
+
"node": "flow-run",
|
|
12
|
+
"params": {
|
|
13
|
+
"fileName": { "const": "manual-input.json" },
|
|
14
|
+
"labelText": { "const": "Collecting manual task source" },
|
|
15
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
16
|
+
"repromptInstantTaskInput": { "ref": "params.repromptInstantTaskInput" },
|
|
17
|
+
"prefilledInstantTaskInputValues": { "ref": "params.prefilledInstantTaskInputValues" }
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"id": "normalize",
|
|
24
|
+
"steps": [
|
|
25
|
+
{
|
|
26
|
+
"id": "run_normalize_source",
|
|
27
|
+
"node": "flow-run",
|
|
28
|
+
"params": {
|
|
29
|
+
"fileName": { "const": "normalize-task-source.json" },
|
|
30
|
+
"labelText": { "const": "Normalizing task source" },
|
|
31
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
32
|
+
"iteration": { "ref": "params.taskContextIteration" },
|
|
33
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
34
|
+
"llmModel": { "ref": "params.llmModel" },
|
|
35
|
+
"extraPrompt": { "ref": "params.extraPrompt" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"id": "plan",
|
|
42
|
+
"steps": [
|
|
43
|
+
{
|
|
44
|
+
"id": "run_plan_flow",
|
|
45
|
+
"node": "flow-run",
|
|
46
|
+
"params": {
|
|
47
|
+
"fileName": { "const": "plan.json" },
|
|
48
|
+
"labelText": { "const": "Running planning flow" },
|
|
49
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
50
|
+
"taskContextIteration": { "ref": "params.taskContextIteration" },
|
|
51
|
+
"designIteration": { "ref": "params.designIteration" },
|
|
52
|
+
"planIteration": { "ref": "params.planIteration" },
|
|
53
|
+
"qaIteration": { "ref": "params.qaIteration" },
|
|
54
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
55
|
+
"llmModel": { "ref": "params.llmModel" },
|
|
56
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
57
|
+
"mdLang": { "ref": "params.mdLang" }
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"id": "design_review_loop",
|
|
64
|
+
"steps": [
|
|
65
|
+
{
|
|
66
|
+
"id": "run_design_review_loop",
|
|
67
|
+
"node": "flow-run",
|
|
68
|
+
"params": {
|
|
69
|
+
"fileName": { "const": "design-review-loop.json" },
|
|
70
|
+
"labelText": { "const": "Running design-review loop" },
|
|
71
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
72
|
+
"workspaceDir": { "ref": "params.workspaceDir" },
|
|
73
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
74
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
75
|
+
"llmModel": { "ref": "params.llmModel" }
|
|
76
|
+
},
|
|
77
|
+
"stopFlowIf": {
|
|
78
|
+
"equals": [
|
|
79
|
+
{ "ref": "steps.design_review_loop.run_design_review_loop.value.executionState.terminationOutcome" },
|
|
80
|
+
{ "const": "stopped" }
|
|
81
|
+
]
|
|
82
|
+
},
|
|
83
|
+
"stopFlowOutcome": "stopped"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"id": "implement",
|
|
89
|
+
"steps": [
|
|
90
|
+
{
|
|
91
|
+
"id": "resolve_planning_bundle",
|
|
92
|
+
"node": "planning-bundle",
|
|
93
|
+
"params": {
|
|
94
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "run_implement",
|
|
99
|
+
"node": "llm-prompt",
|
|
100
|
+
"routingGroup": "implementation",
|
|
101
|
+
"prompt": {
|
|
102
|
+
"templateRef": "implement",
|
|
103
|
+
"vars": {
|
|
104
|
+
"design_file": { "ref": "steps.implement.resolve_planning_bundle.value.designFile" },
|
|
105
|
+
"design_json_file": { "ref": "steps.implement.resolve_planning_bundle.value.designJsonFile" },
|
|
106
|
+
"plan_file": { "ref": "steps.implement.resolve_planning_bundle.value.planFile" },
|
|
107
|
+
"plan_json_file": { "ref": "steps.implement.resolve_planning_bundle.value.planJsonFile" },
|
|
108
|
+
"qa_file": { "ref": "steps.implement.resolve_planning_bundle.value.qaFile" },
|
|
109
|
+
"qa_json_file": { "ref": "steps.implement.resolve_planning_bundle.value.qaJsonFile" }
|
|
110
|
+
},
|
|
111
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
112
|
+
"format": "task-prompt"
|
|
113
|
+
},
|
|
114
|
+
"params": {
|
|
115
|
+
"labelText": { "const": "Running implementation mode locally" },
|
|
116
|
+
"model": { "ref": "params.llmModel" },
|
|
117
|
+
"executor": { "ref": "params.llmExecutor" }
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"id": "notify_implement_complete",
|
|
122
|
+
"node": "telegram-notify",
|
|
123
|
+
"params": {
|
|
124
|
+
"message": {
|
|
125
|
+
"template": "Implementation phase for {taskKey} complete.",
|
|
126
|
+
"vars": {
|
|
127
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"id": "review-loop",
|
|
136
|
+
"steps": [
|
|
137
|
+
{
|
|
138
|
+
"id": "run_review_loop",
|
|
139
|
+
"node": "flow-run",
|
|
140
|
+
"stopFlowIf": {
|
|
141
|
+
"not": {
|
|
142
|
+
"equals": [
|
|
143
|
+
{ "ref": "steps.review-loop.run_review_loop.value.executionState.terminationOutcome" },
|
|
144
|
+
{ "const": "success" }
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"stopFlowOutcome": "stopped",
|
|
149
|
+
"params": {
|
|
150
|
+
"fileName": { "const": "review-loop.json" },
|
|
151
|
+
"labelText": { "const": "Running review-loop" },
|
|
152
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
153
|
+
"baseIteration": { "ref": "params.baseIteration" },
|
|
154
|
+
"workspaceDir": { "ref": "params.workspaceDir" },
|
|
155
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
156
|
+
"reviewFixPoints": { "ref": "params.reviewFixPoints" },
|
|
157
|
+
"reviewBlockingSeverities": { "ref": "params.reviewBlockingSeverities" },
|
|
158
|
+
"llmExecutor": { "ref": "params.llmExecutor" },
|
|
159
|
+
"llmModel": { "ref": "params.llmModel" }
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"id": "notify_task_complete",
|
|
164
|
+
"node": "telegram-notify",
|
|
165
|
+
"params": {
|
|
166
|
+
"message": {
|
|
167
|
+
"template": "Task {taskKey} complete.",
|
|
168
|
+
"vars": {
|
|
169
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|