agentweaver 0.1.13 → 0.1.15
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 +24 -19
- package/dist/artifacts.js +6 -1
- package/dist/doctor/checks/cwd-context.js +4 -3
- package/dist/doctor/checks/env-diagnostics.js +168 -71
- package/dist/doctor/checks/flow-readiness.js +210 -198
- 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/index.js +119 -55
- package/dist/interactive-ui.js +25 -25
- package/dist/pipeline/declarative-flows.js +1 -0
- package/dist/pipeline/flow-catalog.js +4 -0
- package/dist/pipeline/flow-specs/auto-common.json +1 -0
- package/dist/pipeline/flow-specs/auto-golang.json +2 -1
- package/dist/pipeline/flow-specs/bugz/bug-analyze.json +1 -0
- package/dist/pipeline/flow-specs/bugz/bug-fix.json +1 -0
- package/dist/pipeline/flow-specs/design-review.json +239 -0
- package/dist/pipeline/flow-specs/git-commit.json +1 -0
- package/dist/pipeline/flow-specs/gitlab/gitlab-diff-review.json +3 -2
- package/dist/pipeline/flow-specs/gitlab/gitlab-review.json +3 -2
- package/dist/pipeline/flow-specs/gitlab/mr-description.json +1 -0
- package/dist/pipeline/flow-specs/go/run-go-linter-loop.json +3 -2
- package/dist/pipeline/flow-specs/go/run-go-tests-loop.json +3 -2
- package/dist/pipeline/flow-specs/implement.json +13 -0
- package/dist/pipeline/flow-specs/plan-revise.json +261 -0
- package/dist/pipeline/flow-specs/plan.json +2 -1
- package/dist/pipeline/flow-specs/review/review-fix.json +1 -0
- package/dist/pipeline/flow-specs/review/review-loop.json +1 -0
- package/dist/pipeline/flow-specs/review/review-project.json +1 -0
- package/dist/pipeline/flow-specs/review/review.json +2 -1
- package/dist/pipeline/flow-specs/task-describe.json +67 -8
- package/dist/pipeline/node-registry.js +8 -0
- package/dist/pipeline/nodes/ensure-summary-json-node.js +59 -0
- package/dist/pipeline/nodes/git-commit-node.js +1 -1
- package/dist/pipeline/nodes/git-status-node.js +1 -1
- package/dist/pipeline/nodes/review-findings-form-node.js +8 -8
- package/dist/pipeline/nodes/user-input-node.js +2 -2
- package/dist/pipeline/prompt-registry.js +3 -1
- package/dist/pipeline/spec-types.js +2 -0
- package/dist/pipeline/value-resolver.js +11 -1
- package/dist/prompts.js +49 -2
- package/dist/runtime/design-review-input-contract.js +112 -0
- package/dist/runtime/plan-revise-input-contract.js +144 -0
- package/dist/runtime/process-runner.js +2 -2
- package/dist/runtime/ready-to-merge.js +10 -0
- package/dist/scope.js +13 -4
- package/dist/structured-artifact-schema-registry.js +1 -0
- package/dist/structured-artifact-schemas.json +117 -0
- package/dist/structured-artifacts.js +6 -0
- package/package.json +3 -2
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "design-review-flow",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "Performs a structured planning critique of the latest completed planning artifacts against the task context available in the scope. Produces a verdict-oriented design review artifact and treats approved_with_warnings as ready to proceed.",
|
|
5
|
+
"phases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "phase_1_load_contract",
|
|
8
|
+
"steps": [
|
|
9
|
+
{
|
|
10
|
+
"id": "validate_design_markdown_artifact",
|
|
11
|
+
"node": "file-check",
|
|
12
|
+
"params": {
|
|
13
|
+
"path": { "ref": "params.designFile" },
|
|
14
|
+
"panelTitle": { "const": "Design Markdown Artifact" },
|
|
15
|
+
"foundMessage": { "const": "Design markdown artifact found for the resolved planning iteration." },
|
|
16
|
+
"tone": { "const": "cyan" }
|
|
17
|
+
},
|
|
18
|
+
"expect": [
|
|
19
|
+
{
|
|
20
|
+
"kind": "require-file",
|
|
21
|
+
"path": { "ref": "params.designFile" },
|
|
22
|
+
"message": "Design-review contract is missing the required design markdown artifact."
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "validate_design_json_artifact",
|
|
28
|
+
"node": "file-check",
|
|
29
|
+
"params": {
|
|
30
|
+
"path": { "ref": "params.designJsonFile" },
|
|
31
|
+
"panelTitle": { "const": "Design Structured Artifact" },
|
|
32
|
+
"foundMessage": { "const": "Design structured artifact found for the resolved planning iteration." },
|
|
33
|
+
"tone": { "const": "cyan" }
|
|
34
|
+
},
|
|
35
|
+
"expect": [
|
|
36
|
+
{
|
|
37
|
+
"kind": "require-file",
|
|
38
|
+
"path": { "ref": "params.designJsonFile" },
|
|
39
|
+
"message": "Design-review contract is missing the required design structured artifact."
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "validate_plan_markdown_artifact",
|
|
45
|
+
"node": "file-check",
|
|
46
|
+
"params": {
|
|
47
|
+
"path": { "ref": "params.planFile" },
|
|
48
|
+
"panelTitle": { "const": "Plan Markdown Artifact" },
|
|
49
|
+
"foundMessage": { "const": "Implementation plan markdown artifact found for the resolved planning iteration." },
|
|
50
|
+
"tone": { "const": "cyan" }
|
|
51
|
+
},
|
|
52
|
+
"expect": [
|
|
53
|
+
{
|
|
54
|
+
"kind": "require-file",
|
|
55
|
+
"path": { "ref": "params.planFile" },
|
|
56
|
+
"message": "Design-review contract is missing the required implementation plan markdown artifact."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "validate_plan_json_artifact",
|
|
62
|
+
"node": "file-check",
|
|
63
|
+
"params": {
|
|
64
|
+
"path": { "ref": "params.planJsonFile" },
|
|
65
|
+
"panelTitle": { "const": "Plan Structured Artifact" },
|
|
66
|
+
"foundMessage": { "const": "Implementation plan structured artifact found for the resolved planning iteration." },
|
|
67
|
+
"tone": { "const": "cyan" }
|
|
68
|
+
},
|
|
69
|
+
"expect": [
|
|
70
|
+
{
|
|
71
|
+
"kind": "require-file",
|
|
72
|
+
"path": { "ref": "params.planJsonFile" },
|
|
73
|
+
"message": "Design-review contract is missing the required implementation plan structured artifact."
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "validate_qa_markdown_artifact",
|
|
79
|
+
"when": { "ref": "params.hasQaArtifacts" },
|
|
80
|
+
"node": "file-check",
|
|
81
|
+
"params": {
|
|
82
|
+
"path": { "ref": "params.qaFilePath" },
|
|
83
|
+
"panelTitle": { "const": "QA Markdown Artifact" },
|
|
84
|
+
"foundMessage": { "const": "QA markdown artifact found and will be included in the critique." },
|
|
85
|
+
"tone": { "const": "cyan" }
|
|
86
|
+
},
|
|
87
|
+
"expect": [
|
|
88
|
+
{
|
|
89
|
+
"kind": "require-file",
|
|
90
|
+
"path": { "ref": "params.qaFilePath" },
|
|
91
|
+
"message": "Design-review contract expected a QA markdown artifact, but the file is missing."
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "validate_qa_json_artifact",
|
|
97
|
+
"when": { "ref": "params.hasQaArtifacts" },
|
|
98
|
+
"node": "file-check",
|
|
99
|
+
"params": {
|
|
100
|
+
"path": { "ref": "params.qaJsonFilePath" },
|
|
101
|
+
"panelTitle": { "const": "QA Structured Artifact" },
|
|
102
|
+
"foundMessage": { "const": "QA structured artifact found and will be included in the critique." },
|
|
103
|
+
"tone": { "const": "cyan" }
|
|
104
|
+
},
|
|
105
|
+
"expect": [
|
|
106
|
+
{
|
|
107
|
+
"kind": "require-file",
|
|
108
|
+
"path": { "ref": "params.qaJsonFilePath" },
|
|
109
|
+
"message": "Design-review contract expected a QA structured artifact, but the file is missing."
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"id": "phase_2_review",
|
|
117
|
+
"steps": [
|
|
118
|
+
{
|
|
119
|
+
"id": "run_design_review",
|
|
120
|
+
"node": "llm-prompt",
|
|
121
|
+
"prompt": {
|
|
122
|
+
"templateRef": "design-review",
|
|
123
|
+
"vars": {
|
|
124
|
+
"jira_task_file": { "ref": "params.jiraTaskFile" },
|
|
125
|
+
"jira_attachments_manifest_file": { "ref": "params.jiraAttachmentsManifestFile" },
|
|
126
|
+
"jira_attachments_context_file": { "ref": "params.jiraAttachmentsContextFile" },
|
|
127
|
+
"planning_answers_json_file": { "ref": "params.planningAnswersJsonFile" },
|
|
128
|
+
"design_file": { "ref": "params.designFile" },
|
|
129
|
+
"design_json_file": { "ref": "params.designJsonFile" },
|
|
130
|
+
"plan_file": { "ref": "params.planFile" },
|
|
131
|
+
"plan_json_file": { "ref": "params.planJsonFile" },
|
|
132
|
+
"qa_file": { "ref": "params.qaFile" },
|
|
133
|
+
"qa_json_file": { "ref": "params.qaJsonFile" },
|
|
134
|
+
"review_file": {
|
|
135
|
+
"artifact": {
|
|
136
|
+
"kind": "design-review-file",
|
|
137
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
138
|
+
"iteration": { "ref": "params.iteration" }
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"review_json_file": {
|
|
142
|
+
"artifact": {
|
|
143
|
+
"kind": "design-review-json-file",
|
|
144
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
145
|
+
"iteration": { "ref": "params.iteration" }
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
150
|
+
"format": "task-prompt"
|
|
151
|
+
},
|
|
152
|
+
"params": {
|
|
153
|
+
"labelText": {
|
|
154
|
+
"template": "Running design review (iteration {iteration})",
|
|
155
|
+
"vars": {
|
|
156
|
+
"iteration": { "ref": "params.iteration" }
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"model": { "ref": "params.llmModel" },
|
|
160
|
+
"executor": { "ref": "params.llmExecutor" },
|
|
161
|
+
"requiredArtifacts": {
|
|
162
|
+
"list": [
|
|
163
|
+
{
|
|
164
|
+
"artifact": {
|
|
165
|
+
"kind": "design-review-file",
|
|
166
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
167
|
+
"iteration": { "ref": "params.iteration" }
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"expect": [
|
|
174
|
+
{
|
|
175
|
+
"kind": "require-artifacts",
|
|
176
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
177
|
+
"paths": {
|
|
178
|
+
"list": [
|
|
179
|
+
{
|
|
180
|
+
"artifact": {
|
|
181
|
+
"kind": "design-review-file",
|
|
182
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
183
|
+
"iteration": { "ref": "params.iteration" }
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
"message": "Design review did not produce the required review artifact."
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"kind": "require-structured-artifacts",
|
|
192
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
193
|
+
"items": [
|
|
194
|
+
{
|
|
195
|
+
"path": {
|
|
196
|
+
"artifact": {
|
|
197
|
+
"kind": "design-review-json-file",
|
|
198
|
+
"taskKey": { "ref": "params.taskKey" },
|
|
199
|
+
"iteration": { "ref": "params.iteration" }
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"schemaId": "design-review/v1"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"message": "Design review produced invalid structured artifacts."
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"id": "phase_3_finalize",
|
|
213
|
+
"steps": [
|
|
214
|
+
{
|
|
215
|
+
"id": "check_ready_to_merge",
|
|
216
|
+
"node": "file-check",
|
|
217
|
+
"params": {
|
|
218
|
+
"path": {
|
|
219
|
+
"artifact": {
|
|
220
|
+
"kind": "ready-to-merge-file",
|
|
221
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"panelTitle": { "const": "Ready To Merge" },
|
|
225
|
+
"foundMessage": { "const": "Design review is ready to proceed. File ready-to-merge.md has been created." },
|
|
226
|
+
"tone": { "const": "green" }
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"id": "notify_review_complete",
|
|
231
|
+
"node": "telegram-notify",
|
|
232
|
+
"params": {
|
|
233
|
+
"message": { "const": "Design review phase complete" }
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
]
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "git-commit-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Four-phase commit workflow: collects git status and diff, generates a commit message via LLM, presents a file selection form, then shows the editable message for confirmation and executes the commit.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "collect_status",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "gitlab-diff-review-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Prompts for a GitLab merge request URL, fetches the MR diff via GitLab API, and runs LLM-backed code review producing structured findings with severity levels and a ready-to-merge verdict.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "gitlab_diff_review",
|
|
@@ -11,14 +12,14 @@
|
|
|
11
12
|
"params": {
|
|
12
13
|
"formId": { "const": "gitlab-diff-review-input" },
|
|
13
14
|
"title": { "const": "GitLab Diff Review" },
|
|
14
|
-
"description": { "const": "
|
|
15
|
+
"description": { "const": "Provide a GitLab merge request URL to fetch the diff and run code review." },
|
|
15
16
|
"fields": {
|
|
16
17
|
"const": [
|
|
17
18
|
{
|
|
18
19
|
"id": "merge_request_url",
|
|
19
20
|
"type": "text",
|
|
20
21
|
"label": "GitLab MR URL",
|
|
21
|
-
"help": "
|
|
22
|
+
"help": "Example: https://gitlab.example.com/group/project/-/merge_requests/123",
|
|
22
23
|
"required": true,
|
|
23
24
|
"placeholder": "https://gitlab.example.com/group/project/-/merge_requests/123"
|
|
24
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "gitlab-review-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Prompts for a GitLab merge request URL, fetches existing code review comments via GitLab API, assesses which findings are fair and which can be dismissed, then runs review-fix to apply fixes for the accepted findings.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "gitlab_review",
|
|
@@ -11,14 +12,14 @@
|
|
|
11
12
|
"params": {
|
|
12
13
|
"formId": { "const": "gitlab-review-input" },
|
|
13
14
|
"title": { "const": "GitLab Review" },
|
|
14
|
-
"description": { "const": "
|
|
15
|
+
"description": { "const": "Provide a GitLab merge request URL to fetch code review comments." },
|
|
15
16
|
"fields": {
|
|
16
17
|
"const": [
|
|
17
18
|
{
|
|
18
19
|
"id": "merge_request_url",
|
|
19
20
|
"type": "text",
|
|
20
21
|
"label": "GitLab MR URL",
|
|
21
|
-
"help": "
|
|
22
|
+
"help": "Example: https://gitlab.example.com/group/project/-/merge_requests/123",
|
|
22
23
|
"required": true,
|
|
23
24
|
"placeholder": "https://gitlab.example.com/group/project/-/merge_requests/123"
|
|
24
25
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "run-go-linter-loop-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Runs run_go_linter.py and analyzes output. If the linter reports issues, sends them to LLM for a fix and retries. Repeats up to 5 attempts, stopping early on success. Asserts success after the final attempt.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "run_go_linter_try_1",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"appendPrompt": {
|
|
71
72
|
"base": { "ref": "params.extraPrompt" },
|
|
72
73
|
"suffix": {
|
|
73
|
-
"template": "
|
|
74
|
+
"template": "Latest run_go_linter.py result saved in {result_file}. exitCode={exit_code}, summary={summary}.\nFull raw output of the last run:\n{raw_output}\nFix only what prevents the check from passing.",
|
|
74
75
|
"vars": {
|
|
75
76
|
"result_file": {
|
|
76
77
|
"artifact": {
|
|
@@ -197,7 +198,7 @@
|
|
|
197
198
|
"appendPrompt": {
|
|
198
199
|
"base": { "ref": "params.extraPrompt" },
|
|
199
200
|
"suffix": {
|
|
200
|
-
"template": "
|
|
201
|
+
"template": "Latest run_go_linter.py result saved in {result_file}. exitCode={exit_code}, summary={summary}.\nFull raw output of the last run:\n{raw_output}\nFix only what prevents the check from passing.",
|
|
201
202
|
"vars": {
|
|
202
203
|
"result_file": {
|
|
203
204
|
"artifact": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "run-go-tests-loop-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Runs run_go_tests.py and analyzes failures. If tests fail, sends the error output to LLM for a fix and retries. Repeats up to 5 attempts, stopping early on success. Asserts success after the final attempt.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "run_go_tests_try_1",
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
"appendPrompt": {
|
|
71
72
|
"base": { "ref": "params.extraPrompt" },
|
|
72
73
|
"suffix": {
|
|
73
|
-
"template": "
|
|
74
|
+
"template": "Latest run_go_tests.py result saved in {result_file}. exitCode={exit_code}, summary={summary}.\nFull raw output of the last run:\n{raw_output}\nFix only what prevents the check from passing.",
|
|
74
75
|
"vars": {
|
|
75
76
|
"result_file": {
|
|
76
77
|
"artifact": {
|
|
@@ -197,7 +198,7 @@
|
|
|
197
198
|
"appendPrompt": {
|
|
198
199
|
"base": { "ref": "params.extraPrompt" },
|
|
199
200
|
"suffix": {
|
|
200
|
-
"template": "
|
|
201
|
+
"template": "Latest run_go_tests.py result saved in {result_file}. exitCode={exit_code}, summary={summary}.\nFull raw output of the last run:\n{raw_output}\nFix only what prevents the check from passing.",
|
|
201
202
|
"vars": {
|
|
202
203
|
"result_file": {
|
|
203
204
|
"artifact": {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"kind": "implement-flow",
|
|
3
3
|
"version": 1,
|
|
4
|
+
"description": "Runs LLM-backed implementation based on previously approved design, plan, and QA artifacts. Executes code changes locally in the project working directory.",
|
|
4
5
|
"phases": [
|
|
5
6
|
{
|
|
6
7
|
"id": "implement",
|
|
@@ -34,6 +35,18 @@
|
|
|
34
35
|
"kind": "plan-json-file",
|
|
35
36
|
"taskKey": { "ref": "params.taskKey" }
|
|
36
37
|
}
|
|
38
|
+
},
|
|
39
|
+
"qa_file": {
|
|
40
|
+
"artifact": {
|
|
41
|
+
"kind": "qa-file",
|
|
42
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"qa_json_file": {
|
|
46
|
+
"artifact": {
|
|
47
|
+
"kind": "qa-json-file",
|
|
48
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
49
|
+
}
|
|
37
50
|
}
|
|
38
51
|
},
|
|
39
52
|
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
{
|
|
2
|
+
"kind": "plan-revise-flow",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"description": "Consumes a design-review verdict artifact and the latest planning artifacts, then produces revised design, implementation plan, and QA artifacts at the next iteration number without modifying originals.",
|
|
5
|
+
"phases": [
|
|
6
|
+
{
|
|
7
|
+
"id": "phase_1_load_contract",
|
|
8
|
+
"steps": [
|
|
9
|
+
{
|
|
10
|
+
"id": "validate_review_markdown",
|
|
11
|
+
"node": "file-check",
|
|
12
|
+
"params": {
|
|
13
|
+
"path": { "ref": "params.reviewFile" },
|
|
14
|
+
"panelTitle": { "const": "Design Review Verdict Markdown" },
|
|
15
|
+
"foundMessage": { "const": "Design review verdict markdown found." },
|
|
16
|
+
"tone": { "const": "cyan" }
|
|
17
|
+
},
|
|
18
|
+
"expect": [
|
|
19
|
+
{
|
|
20
|
+
"kind": "require-file",
|
|
21
|
+
"path": { "ref": "params.reviewFile" },
|
|
22
|
+
"message": "Plan-revise contract is missing the required design-review verdict markdown."
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "validate_review_json",
|
|
28
|
+
"node": "file-check",
|
|
29
|
+
"params": {
|
|
30
|
+
"path": { "ref": "params.reviewJsonFile" },
|
|
31
|
+
"panelTitle": { "const": "Design Review Verdict JSON" },
|
|
32
|
+
"foundMessage": { "const": "Design review verdict JSON found." },
|
|
33
|
+
"tone": { "const": "cyan" }
|
|
34
|
+
},
|
|
35
|
+
"expect": [
|
|
36
|
+
{
|
|
37
|
+
"kind": "require-file",
|
|
38
|
+
"path": { "ref": "params.reviewJsonFile" },
|
|
39
|
+
"message": "Plan-revise contract is missing the required design-review verdict JSON."
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"id": "validate_source_design_markdown",
|
|
45
|
+
"node": "file-check",
|
|
46
|
+
"params": {
|
|
47
|
+
"path": { "ref": "params.designFile" },
|
|
48
|
+
"panelTitle": { "const": "Source Design Markdown" },
|
|
49
|
+
"foundMessage": { "const": "Source design markdown artifact found." },
|
|
50
|
+
"tone": { "const": "cyan" }
|
|
51
|
+
},
|
|
52
|
+
"expect": [
|
|
53
|
+
{
|
|
54
|
+
"kind": "require-file",
|
|
55
|
+
"path": { "ref": "params.designFile" },
|
|
56
|
+
"message": "Plan-revise contract is missing the required source design markdown."
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"id": "validate_source_design_json",
|
|
62
|
+
"node": "file-check",
|
|
63
|
+
"params": {
|
|
64
|
+
"path": { "ref": "params.designJsonFile" },
|
|
65
|
+
"panelTitle": { "const": "Source Design JSON" },
|
|
66
|
+
"foundMessage": { "const": "Source design structured artifact found." },
|
|
67
|
+
"tone": { "const": "cyan" }
|
|
68
|
+
},
|
|
69
|
+
"expect": [
|
|
70
|
+
{
|
|
71
|
+
"kind": "require-file",
|
|
72
|
+
"path": { "ref": "params.designJsonFile" },
|
|
73
|
+
"message": "Plan-revise contract is missing the required source design JSON."
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "validate_source_plan_markdown",
|
|
79
|
+
"node": "file-check",
|
|
80
|
+
"params": {
|
|
81
|
+
"path": { "ref": "params.planFile" },
|
|
82
|
+
"panelTitle": { "const": "Source Plan Markdown" },
|
|
83
|
+
"foundMessage": { "const": "Source implementation plan markdown found." },
|
|
84
|
+
"tone": { "const": "cyan" }
|
|
85
|
+
},
|
|
86
|
+
"expect": [
|
|
87
|
+
{
|
|
88
|
+
"kind": "require-file",
|
|
89
|
+
"path": { "ref": "params.planFile" },
|
|
90
|
+
"message": "Plan-revise contract is missing the required source plan markdown."
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"id": "validate_source_plan_json",
|
|
96
|
+
"node": "file-check",
|
|
97
|
+
"params": {
|
|
98
|
+
"path": { "ref": "params.planJsonFile" },
|
|
99
|
+
"panelTitle": { "const": "Source Plan JSON" },
|
|
100
|
+
"foundMessage": { "const": "Source implementation plan structured artifact found." },
|
|
101
|
+
"tone": { "const": "cyan" }
|
|
102
|
+
},
|
|
103
|
+
"expect": [
|
|
104
|
+
{
|
|
105
|
+
"kind": "require-file",
|
|
106
|
+
"path": { "ref": "params.planJsonFile" },
|
|
107
|
+
"message": "Plan-revise contract is missing the required source plan JSON."
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"id": "validate_source_qa_markdown",
|
|
113
|
+
"when": { "ref": "params.hasQaArtifacts" },
|
|
114
|
+
"node": "file-check",
|
|
115
|
+
"params": {
|
|
116
|
+
"path": { "ref": "params.qaFilePath" },
|
|
117
|
+
"panelTitle": { "const": "Source QA Markdown" },
|
|
118
|
+
"foundMessage": { "const": "Source QA markdown artifact found." },
|
|
119
|
+
"tone": { "const": "cyan" }
|
|
120
|
+
},
|
|
121
|
+
"expect": [
|
|
122
|
+
{
|
|
123
|
+
"kind": "require-file",
|
|
124
|
+
"path": { "ref": "params.qaFilePath" },
|
|
125
|
+
"message": "Plan-revise contract expected a source QA markdown artifact, but the file is missing."
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"id": "validate_source_qa_json",
|
|
131
|
+
"when": { "ref": "params.hasQaArtifacts" },
|
|
132
|
+
"node": "file-check",
|
|
133
|
+
"params": {
|
|
134
|
+
"path": { "ref": "params.qaJsonFilePath" },
|
|
135
|
+
"panelTitle": { "const": "Source QA JSON" },
|
|
136
|
+
"foundMessage": { "const": "Source QA structured artifact found." },
|
|
137
|
+
"tone": { "const": "cyan" }
|
|
138
|
+
},
|
|
139
|
+
"expect": [
|
|
140
|
+
{
|
|
141
|
+
"kind": "require-file",
|
|
142
|
+
"path": { "ref": "params.qaJsonFilePath" },
|
|
143
|
+
"message": "Plan-revise contract expected a source QA JSON artifact, but the file is missing."
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "phase_2_revise",
|
|
151
|
+
"steps": [
|
|
152
|
+
{
|
|
153
|
+
"id": "run_plan_revise",
|
|
154
|
+
"node": "llm-prompt",
|
|
155
|
+
"prompt": {
|
|
156
|
+
"templateRef": "plan-revise",
|
|
157
|
+
"vars": {
|
|
158
|
+
"review_file": { "ref": "params.reviewFile" },
|
|
159
|
+
"review_json_file": { "ref": "params.reviewJsonFile" },
|
|
160
|
+
"design_file": { "ref": "params.designFile" },
|
|
161
|
+
"design_json_file": { "ref": "params.designJsonFile" },
|
|
162
|
+
"plan_file": { "ref": "params.planFile" },
|
|
163
|
+
"plan_json_file": { "ref": "params.planJsonFile" },
|
|
164
|
+
"qa_file": { "ref": "params.qaFile" },
|
|
165
|
+
"qa_json_file": { "ref": "params.qaJsonFile" },
|
|
166
|
+
"jira_task_file": { "ref": "params.jiraTaskFile" },
|
|
167
|
+
"jira_attachments_manifest_file": { "ref": "params.jiraAttachmentsManifestFile" },
|
|
168
|
+
"jira_attachments_context_file": { "ref": "params.jiraAttachmentsContextFile" },
|
|
169
|
+
"planning_answers_json_file": { "ref": "params.planningAnswersJsonFile" },
|
|
170
|
+
"revised_design_file": { "ref": "params.revisedDesignFile" },
|
|
171
|
+
"revised_design_json_file": { "ref": "params.revisedDesignJsonFile" },
|
|
172
|
+
"revised_plan_file": { "ref": "params.revisedPlanFile" },
|
|
173
|
+
"revised_plan_json_file": { "ref": "params.revisedPlanJsonFile" },
|
|
174
|
+
"revised_qa_file": { "ref": "params.revisedQaFile" },
|
|
175
|
+
"revised_qa_json_file": { "ref": "params.revisedQaJsonFile" }
|
|
176
|
+
},
|
|
177
|
+
"extraPrompt": { "ref": "params.extraPrompt" },
|
|
178
|
+
"format": "task-prompt"
|
|
179
|
+
},
|
|
180
|
+
"params": {
|
|
181
|
+
"labelText": {
|
|
182
|
+
"template": "Revising planning artifacts (iteration {outputIteration})",
|
|
183
|
+
"vars": {
|
|
184
|
+
"outputIteration": { "ref": "params.outputIteration" }
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"model": { "ref": "params.llmModel" },
|
|
188
|
+
"executor": { "ref": "params.llmExecutor" },
|
|
189
|
+
"requiredArtifacts": {
|
|
190
|
+
"list": [
|
|
191
|
+
{ "ref": "params.revisedDesignFile" },
|
|
192
|
+
{ "ref": "params.revisedPlanFile" },
|
|
193
|
+
{ "ref": "params.revisedQaFile" }
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
"expect": [
|
|
198
|
+
{
|
|
199
|
+
"kind": "require-artifacts",
|
|
200
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
201
|
+
"paths": {
|
|
202
|
+
"list": [
|
|
203
|
+
{ "ref": "params.revisedDesignFile" },
|
|
204
|
+
{ "ref": "params.revisedPlanFile" },
|
|
205
|
+
{ "ref": "params.revisedQaFile" }
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"message": "Plan-revise did not produce the required revised markdown artifacts."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "require-structured-artifacts",
|
|
212
|
+
"when": { "not": { "ref": "context.dryRun" } },
|
|
213
|
+
"items": [
|
|
214
|
+
{
|
|
215
|
+
"path": { "ref": "params.revisedDesignJsonFile" },
|
|
216
|
+
"schemaId": "implementation-design/v1"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"path": { "ref": "params.revisedPlanJsonFile" },
|
|
220
|
+
"schemaId": "implementation-plan/v1"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"path": { "ref": "params.revisedQaJsonFile" },
|
|
224
|
+
"schemaId": "qa-plan/v1"
|
|
225
|
+
}
|
|
226
|
+
],
|
|
227
|
+
"message": "Plan-revise produced invalid structured artifacts."
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"id": "phase_3_finalize",
|
|
235
|
+
"steps": [
|
|
236
|
+
{
|
|
237
|
+
"id": "check_ready_to_merge",
|
|
238
|
+
"node": "file-check",
|
|
239
|
+
"params": {
|
|
240
|
+
"path": {
|
|
241
|
+
"artifact": {
|
|
242
|
+
"kind": "ready-to-merge-file",
|
|
243
|
+
"taskKey": { "ref": "params.taskKey" }
|
|
244
|
+
}
|
|
245
|
+
},
|
|
246
|
+
"panelTitle": { "const": "Ready To Merge" },
|
|
247
|
+
"foundMessage": { "const": "Plan-revise completed and all blocking findings addressed. File ready-to-merge.md has been created." },
|
|
248
|
+
"tone": { "const": "green" }
|
|
249
|
+
}
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "notify_revise_complete",
|
|
253
|
+
"node": "telegram-notify",
|
|
254
|
+
"params": {
|
|
255
|
+
"message": { "const": "Plan-revise phase complete" }
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
}
|