@trygentic/agentloop 0.15.1-alpha.11 → 0.17.0-alpha.11
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 +1 -12
- package/package.json +3 -3
- package/templates/agents/_base/proactive.bt.json +43 -0
- package/templates/agents/_base/reactive-delegation.bt.json +73 -0
- package/templates/agents/_base/reactive-message.bt.json +58 -0
- package/templates/agents/_base/reactive-task.bt.json +51 -0
- package/templates/agents/chat/chat.bt.json +34 -17
- package/templates/agents/chat/chat.md +27 -18
- package/templates/agents/engineer/engineer.bt.json +383 -330
- package/templates/agents/engineer/engineer.md +63 -24
- package/templates/agents/orchestrator/orchestrator.bt.json +1 -0
- package/templates/agents/orchestrator/orchestrator.md +17 -91
- package/templates/agents/product-manager/product-manager.bt.json +59 -16
- package/templates/agents/product-manager/product-manager.md +12 -9
- package/templates/agents/qa-tester/qa-tester.bt.json +263 -81
- package/templates/agents/qa-tester/qa-tester.md +55 -9
- package/templates/agents/release/release.bt.json +205 -0
- package/templates/agents/release/release.md +119 -0
- package/templates/examples/engineer.md.example +4 -4
- package/templates/examples/example-custom-agent.md.example +4 -4
- package/templates/examples/example-plugin.js.example +1 -1
- package/templates/non-core-templates/container.md +0 -173
- package/templates/non-core-templates/dag-planner.md +0 -96
- package/templates/non-core-templates/internal/cli-tester.md +0 -218
- package/templates/non-core-templates/internal/qa-tester.md +0 -300
- package/templates/non-core-templates/internal/tui-designer.md +0 -370
- package/templates/non-core-templates/internal/tui-tester.md +0 -125
- package/templates/non-core-templates/maestro-qa.md +0 -240
- package/templates/non-core-templates/merge-resolver.md +0 -150
- package/templates/non-core-templates/project-detection.md +0 -75
- package/templates/non-core-templates/questionnaire.md +0 -124
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
"name": "qa-tester-continuous-agent-tree",
|
|
3
3
|
"description": "Continuous behavior tree for the QA Tester agent. Loops forever, waiting for task assignments from the orchestrator. Handles test execution, environment issues, and provides feedback to engineers without process restarts.",
|
|
4
4
|
"version": "1.0.0",
|
|
5
|
+
"mode": "reactive",
|
|
5
6
|
"tree": {
|
|
6
7
|
"type": "root",
|
|
7
8
|
"child": {
|
|
@@ -89,7 +90,7 @@
|
|
|
89
90
|
},
|
|
90
91
|
{
|
|
91
92
|
"type": "action",
|
|
92
|
-
"call": "
|
|
93
|
+
"call": "ReportTriggerPass"
|
|
93
94
|
}
|
|
94
95
|
]
|
|
95
96
|
},
|
|
@@ -105,15 +106,37 @@
|
|
|
105
106
|
"type": "llm-action",
|
|
106
107
|
"name": "AnalyzeChanges",
|
|
107
108
|
"prompt": "You are a QA agent analyzing changes. Review the task and git diff.\n\nTask: {{taskDescription}}\nGit Diff: {{gitDiff}}\nProject Info: {{projectInfo}}\n\nBriefly summarize what was changed.",
|
|
108
|
-
"contextKeys": [
|
|
109
|
+
"contextKeys": [
|
|
110
|
+
"taskDescription",
|
|
111
|
+
"taskTitle",
|
|
112
|
+
"gitDiff",
|
|
113
|
+
"projectInfo"
|
|
114
|
+
],
|
|
109
115
|
"outputSchema": {
|
|
110
116
|
"type": "object",
|
|
111
117
|
"properties": {
|
|
112
|
-
"changesSummary": {
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
"changesSummary": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"affectedAreas": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"items": {
|
|
124
|
+
"type": "string"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"riskLevel": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"enum": [
|
|
130
|
+
"low",
|
|
131
|
+
"medium",
|
|
132
|
+
"high"
|
|
133
|
+
]
|
|
134
|
+
}
|
|
115
135
|
},
|
|
116
|
-
"required": [
|
|
136
|
+
"required": [
|
|
137
|
+
"changesSummary",
|
|
138
|
+
"riskLevel"
|
|
139
|
+
]
|
|
117
140
|
},
|
|
118
141
|
"outputKey": "changeAnalysis",
|
|
119
142
|
"temperature": 0.3
|
|
@@ -137,16 +160,46 @@
|
|
|
137
160
|
{
|
|
138
161
|
"type": "llm-action",
|
|
139
162
|
"name": "DetermineTestCommand",
|
|
140
|
-
"prompt": "Determine the correct test command for this project.\n\nProject Info: {{projectInfo}}\n\nCRITICAL: Check the runtime/package manager FIRST before choosing a test command.\n\nRuntime detection priority (check in this order):\n1. If projectInfo.primaryType is 'bun' OR detectedFiles include 'bun.lockb', 'bun.lock', or 'bunfig.toml' OR packageManager is 'bun': this is a BUN project. Use 'bun test'. Set projectType to 'bun'.\n2. If detectedFiles include 'yarn.lock': use 'yarn test'. Set projectType to 'node-yarn'.\n3. If detectedFiles include 'pnpm-lock.yaml': use 'pnpm test'. Set projectType to 'node-pnpm'.\n4. If only 'package.json' is detected with no specific lock file: use 'npm test'. Set projectType to 'node'.\n\nOther project types:\n- Rust (Cargo.toml): cargo test\n- Python (pyproject.toml, setup.py): pytest\n- Go (go.mod): go test ./...\n\nDo NOT default to 'npm test' when Bun indicators are present. A project with bun.lock or bun.lockb is a Bun project, not a Node.js project.",
|
|
141
|
-
"contextKeys": [
|
|
163
|
+
"prompt": "Determine the correct test command for this project.\n\nProject Info: {{projectInfo}}\n\nEngineer Test Setup (from engineer's completion comment): {{engineerTestSetup}}\n\nIMPORTANT: If engineerTestSetup is provided by the engineer, PREFER using their testCommand and testDirectory. The engineer already verified these work. Only override if you detect an obvious error.\n\nIf engineerTestSetup.testDirectory is set (e.g., \"frontend\"), the test command must be run from that subdirectory. Prefix with: cd <testDirectory> && <testCommand>\n\nCRITICAL: Check the runtime/package manager FIRST before choosing a test command.\n\nRuntime detection priority (check in this order):\n1. If projectInfo.primaryType is 'bun' OR detectedFiles include 'bun.lockb', 'bun.lock', or 'bunfig.toml' OR packageManager is 'bun': this is a BUN project. Use 'bun test'. Set projectType to 'bun'.\n2. If detectedFiles include 'yarn.lock': use 'yarn test'. Set projectType to 'node-yarn'.\n3. If detectedFiles include 'pnpm-lock.yaml': use 'pnpm test'. Set projectType to 'node-pnpm'.\n4. If only 'package.json' is detected with no specific lock file: use 'npm test'. Set projectType to 'node'.\n5. If projectInfo.primaryType is 'expo' OR detectedFiles include 'app.json' with 'expo' key, 'app.config.js', 'app.config.ts', OR package.json has 'expo' dependency: this is an EXPO/React Native project. Set projectType to 'expo'.\n - If package.json has a 'test' script that is valid (not a placeholder), use that (e.g., 'npm test' or 'jest')\n - If jest-expo is in dependencies/devDependencies, use 'npx jest'\n - If @testing-library/react-native is present, use 'npx jest'\n - If no test runner is found, use 'npx jest --passWithNoTests'\n\nOther project types:\n- Rust (Cargo.toml): cargo test\n- Python (pyproject.toml, setup.py): pytest\n- Go (go.mod): go test ./...\n\nDo NOT default to 'npm test' when Bun indicators are present. A project with bun.lock or bun.lockb is a Bun project, not a Node.js project.\nDo NOT default to 'npm test' for Expo projects that have no test script. Use 'npx jest' instead.",
|
|
164
|
+
"contextKeys": [
|
|
165
|
+
"projectInfo",
|
|
166
|
+
"testFilesFound",
|
|
167
|
+
"engineerTestSetup"
|
|
168
|
+
],
|
|
142
169
|
"outputSchema": {
|
|
143
170
|
"type": "object",
|
|
144
171
|
"properties": {
|
|
145
|
-
"projectType": {
|
|
146
|
-
|
|
147
|
-
|
|
172
|
+
"projectType": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": [
|
|
175
|
+
"bun",
|
|
176
|
+
"node",
|
|
177
|
+
"node-yarn",
|
|
178
|
+
"node-pnpm",
|
|
179
|
+
"expo",
|
|
180
|
+
"rust",
|
|
181
|
+
"python",
|
|
182
|
+
"go",
|
|
183
|
+
"java-maven",
|
|
184
|
+
"java-gradle",
|
|
185
|
+
"ruby",
|
|
186
|
+
"php",
|
|
187
|
+
"elixir",
|
|
188
|
+
"other"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"testCommand": {
|
|
192
|
+
"type": "string"
|
|
193
|
+
},
|
|
194
|
+
"reasoning": {
|
|
195
|
+
"type": "string"
|
|
196
|
+
}
|
|
148
197
|
},
|
|
149
|
-
"required": [
|
|
198
|
+
"required": [
|
|
199
|
+
"projectType",
|
|
200
|
+
"testCommand",
|
|
201
|
+
"reasoning"
|
|
202
|
+
]
|
|
150
203
|
},
|
|
151
204
|
"outputKey": "testCommandInfo",
|
|
152
205
|
"temperature": 0.2
|
|
@@ -180,33 +233,96 @@
|
|
|
180
233
|
{
|
|
181
234
|
"type": "llm-action",
|
|
182
235
|
"name": "AnalyzeTestResults",
|
|
183
|
-
"prompt": "Analyze the test results in the context of what files were changed.\n\nTest Output: {{testResults}}\nTest Command: {{testCommandInfo}}\nGit Diff (files changed by engineer): {{gitDiff}}\nTask Files: {{taskFiles}}\nChange Analysis: {{changeAnalysis}}\n\nYour job is to determine if the engineer's changes CAUSED any test failures. You MUST distinguish between:\n\n1. **Task-related failures**: Tests that fail because of code the engineer changed or added. These are in files listed in the git diff or task files, or test files that directly import/test those changed modules. These are legitimate failures.\n\n2. **Pre-existing/unrelated failures**: Tests that fail in modules the engineer did NOT touch. These failures existed BEFORE the engineer's changes and are NOT the engineer's responsibility. Do NOT count these as failures.\n\n3. **Environment issues**: Test runner not found (exit code 127), dependencies not installed, 'command not found' errors, missing optional dependencies (@rollup/rollup-*, @esbuild/*), module resolution errors. These are QA environment issues, NOT code issues.\n\nIMPORTANT: If ONLY environment issues occurred (
|
|
184
|
-
"contextKeys": [
|
|
236
|
+
"prompt": "Analyze the test results in the context of what files were changed.\n\nTest Output: {{testResults}}\nTest Command: {{testCommandInfo}}\nGit Diff (files changed by engineer): {{gitDiff}}\nTask Files: {{taskFiles}}\nChange Analysis: {{changeAnalysis}}\n\nYour job is to determine if the engineer's changes CAUSED any test failures. You MUST distinguish between:\n\n1. **Task-related failures**: Tests that fail because of code the engineer changed or added. These are in files listed in the git diff or task files, or test files that directly import/test those changed modules. These are legitimate failures.\n\n2. **Pre-existing/unrelated failures**: Tests that fail in modules the engineer did NOT touch. These failures existed BEFORE the engineer's changes and are NOT the engineer's responsibility. Do NOT count these as failures.\n\n3. **Environment issues**: Test runner not found (exit code 127), dependencies not installed, 'command not found' errors, missing optional dependencies (@rollup/rollup-*, @esbuild/*), module resolution errors. These are QA environment issues, NOT code issues.\n\nIMPORTANT: If ONLY environment issues occurred and there are NO indications of task-related failures (taskRelatedFailures is 0 or null), set 'passed' to true \u2014 the engineer's code is not at fault for environment problems. Classify failures as 'environment'.\n\nSet 'passed' to true if:\n- Tests actually executed AND there are NO task-related failures, OR\n- Tests did NOT execute due to environment issues AND there are NO task-related failures detected\n\nSet 'passed' to false if:\n- There are task-related failures (regardless of whether other environment issues exist)\n\nFor each failure, classify it as 'task-related', 'pre-existing', or 'environment' in the classification field.",
|
|
237
|
+
"contextKeys": [
|
|
238
|
+
"testResults",
|
|
239
|
+
"testCommandInfo",
|
|
240
|
+
"changeAnalysis",
|
|
241
|
+
"gitDiff",
|
|
242
|
+
"taskFiles",
|
|
243
|
+
"engineerTestSetup"
|
|
244
|
+
],
|
|
185
245
|
"outputSchema": {
|
|
186
246
|
"type": "object",
|
|
187
247
|
"properties": {
|
|
188
|
-
"passed": {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
248
|
+
"passed": {
|
|
249
|
+
"type": "boolean",
|
|
250
|
+
"description": "true if no task-related failures exist (even if tests did not run due to environment issues). false only if there are task-related failures."
|
|
251
|
+
},
|
|
252
|
+
"testsActuallyRan": {
|
|
253
|
+
"type": "boolean",
|
|
254
|
+
"description": "true if tests actually executed, false if blocked by environment issues"
|
|
255
|
+
},
|
|
256
|
+
"totalTests": {
|
|
257
|
+
"type": [
|
|
258
|
+
"number",
|
|
259
|
+
"null"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"passedTests": {
|
|
263
|
+
"type": [
|
|
264
|
+
"number",
|
|
265
|
+
"null"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"failedTests": {
|
|
269
|
+
"type": [
|
|
270
|
+
"number",
|
|
271
|
+
"null"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
"taskRelatedFailures": {
|
|
275
|
+
"type": [
|
|
276
|
+
"number",
|
|
277
|
+
"null"
|
|
278
|
+
],
|
|
279
|
+
"description": "Number of failures caused by the engineer's changes"
|
|
280
|
+
},
|
|
281
|
+
"preExistingFailures": {
|
|
282
|
+
"type": [
|
|
283
|
+
"number",
|
|
284
|
+
"null"
|
|
285
|
+
],
|
|
286
|
+
"description": "Number of failures that existed before the engineer's changes"
|
|
287
|
+
},
|
|
288
|
+
"environmentIssues": {
|
|
289
|
+
"type": [
|
|
290
|
+
"number",
|
|
291
|
+
"null"
|
|
292
|
+
],
|
|
293
|
+
"description": "Number of environment-related issues (missing deps, command not found, etc.)"
|
|
294
|
+
},
|
|
196
295
|
"failures": {
|
|
197
296
|
"type": "array",
|
|
198
297
|
"items": {
|
|
199
298
|
"type": "object",
|
|
200
299
|
"properties": {
|
|
201
|
-
"testName": {
|
|
202
|
-
|
|
203
|
-
|
|
300
|
+
"testName": {
|
|
301
|
+
"type": "string"
|
|
302
|
+
},
|
|
303
|
+
"error": {
|
|
304
|
+
"type": "string"
|
|
305
|
+
},
|
|
306
|
+
"classification": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"enum": [
|
|
309
|
+
"task-related",
|
|
310
|
+
"pre-existing",
|
|
311
|
+
"environment"
|
|
312
|
+
],
|
|
313
|
+
"description": "Whether this failure is caused by the engineer's changes, pre-existing, or an environment issue"
|
|
314
|
+
}
|
|
204
315
|
}
|
|
205
316
|
}
|
|
206
317
|
},
|
|
207
|
-
"summary": {
|
|
318
|
+
"summary": {
|
|
319
|
+
"type": "string"
|
|
320
|
+
}
|
|
208
321
|
},
|
|
209
|
-
"required": [
|
|
322
|
+
"required": [
|
|
323
|
+
"passed",
|
|
324
|
+
"summary"
|
|
325
|
+
]
|
|
210
326
|
},
|
|
211
327
|
"outputKey": "analyzedTestResults",
|
|
212
328
|
"temperature": 0.2
|
|
@@ -296,22 +412,34 @@
|
|
|
296
412
|
{
|
|
297
413
|
"type": "llm-condition",
|
|
298
414
|
"name": "TestsPassed",
|
|
299
|
-
"prompt": "Based on the analyzed test results, did the engineer's changes pass QA?\n\nTest Results: {{analyzedTestResults}}\nGit Diff: {{gitDiff}}\nTask Files: {{taskFiles}}\nEnvironment Retry Count: {{envRetryCount}}\n\nReturn true if the engineer's changes did NOT introduce any new test failures
|
|
300
|
-
"contextKeys": [
|
|
415
|
+
"prompt": "Based on the analyzed test results, did the engineer's changes pass QA?\n\nTest Results: {{analyzedTestResults}}\nGit Diff: {{gitDiff}}\nTask Files: {{taskFiles}}\nEnvironment Retry Count: {{envRetryCount}}\n\nReturn true if the engineer's changes did NOT introduce any new test failures. Environment issues alone should NOT cause rejection.\n\nCRITICAL RULES:\n1. If 'passed' is true in analyzedTestResults, return true.\n2. If 'taskRelatedFailures' is 0 or null, return true \u2014 even if there are pre-existing failures or environment issues. The engineer's code is not at fault.\n3. Pre-existing failures (tests failing in code the engineer did NOT touch) do NOT count as the engineer's fault. Return true.\n4. ONLY return false if there are actual task-related failures (classification: 'task-related') \u2014 failures directly caused by the engineer's changes.\n5. If 'testsActuallyRan' is false AND 'taskRelatedFailures' is 0 or null, return true \u2014 environment issues that prevented tests from running are NOT the engineer's fault. The task should be approved.\n6. If 'testsActuallyRan' is false AND there ARE task-related failures detected, return false.",
|
|
416
|
+
"contextKeys": [
|
|
417
|
+
"analyzedTestResults",
|
|
418
|
+
"gitDiff",
|
|
419
|
+
"taskFiles",
|
|
420
|
+
"envRetryCount"
|
|
421
|
+
],
|
|
301
422
|
"confidenceThreshold": 0.8,
|
|
302
|
-
"fallbackValue":
|
|
423
|
+
"fallbackValue": true
|
|
303
424
|
},
|
|
304
425
|
{
|
|
305
426
|
"type": "llm-action",
|
|
306
427
|
"name": "WriteApprovalComment",
|
|
307
428
|
"prompt": "Write a brief approval comment.\n\nTask: {{taskDescription}}\nTest Results: {{analyzedTestResults}}\n\nKeep it short. If there were pre-existing test failures (not caused by the engineer), mention them briefly as known pre-existing issues that are not blocking.",
|
|
308
|
-
"contextKeys": [
|
|
429
|
+
"contextKeys": [
|
|
430
|
+
"taskDescription",
|
|
431
|
+
"analyzedTestResults"
|
|
432
|
+
],
|
|
309
433
|
"outputSchema": {
|
|
310
434
|
"type": "object",
|
|
311
435
|
"properties": {
|
|
312
|
-
"comment": {
|
|
436
|
+
"comment": {
|
|
437
|
+
"type": "string"
|
|
438
|
+
}
|
|
313
439
|
},
|
|
314
|
-
"required": [
|
|
440
|
+
"required": [
|
|
441
|
+
"comment"
|
|
442
|
+
]
|
|
315
443
|
},
|
|
316
444
|
"outputKey": "approvalComment",
|
|
317
445
|
"temperature": 0.4
|
|
@@ -331,7 +459,7 @@
|
|
|
331
459
|
"children": [
|
|
332
460
|
{
|
|
333
461
|
"type": "sequence",
|
|
334
|
-
"comment": "Lint passed (or no linter) -
|
|
462
|
+
"comment": "Lint passed (or no linter) - approve (PR creation handled by release agent)",
|
|
335
463
|
"children": [
|
|
336
464
|
{
|
|
337
465
|
"type": "condition",
|
|
@@ -339,15 +467,7 @@
|
|
|
339
467
|
},
|
|
340
468
|
{
|
|
341
469
|
"type": "action",
|
|
342
|
-
"call": "
|
|
343
|
-
},
|
|
344
|
-
{
|
|
345
|
-
"type": "action",
|
|
346
|
-
"call": "GitCreatePR"
|
|
347
|
-
},
|
|
348
|
-
{
|
|
349
|
-
"type": "action",
|
|
350
|
-
"call": "RequestStatusDone"
|
|
470
|
+
"call": "ReportTriggerPass"
|
|
351
471
|
}
|
|
352
472
|
]
|
|
353
473
|
},
|
|
@@ -365,7 +485,7 @@
|
|
|
365
485
|
},
|
|
366
486
|
{
|
|
367
487
|
"type": "action",
|
|
368
|
-
"call": "
|
|
488
|
+
"call": "ReportTriggerFail"
|
|
369
489
|
}
|
|
370
490
|
]
|
|
371
491
|
}
|
|
@@ -397,16 +517,37 @@
|
|
|
397
517
|
"type": "llm-action",
|
|
398
518
|
"name": "DocumentEnvironmentBlocker",
|
|
399
519
|
"prompt": "Document that the task is blocked due to unresolved environment issues.\n\nTask: {{taskDescription}}\nTest Results: {{analyzedTestResults}}\nRaw Test Output: {{testResults}}\nFix Attempts: {{environmentFixResults}}\nRetry Count: {{envRetryCount}}\n\nExplain that:\n1. The QA agent attempted to run tests but encountered environment issues\n2. Multiple attempts to fix the environment (installing dependencies, etc.) failed\n3. This is NOT a code issue with the engineer's changes\n4. Human intervention is needed to resolve the test environment\n\nBe specific about what environment issue occurred (missing dependency, command not found, etc.).",
|
|
400
|
-
"contextKeys": [
|
|
520
|
+
"contextKeys": [
|
|
521
|
+
"taskDescription",
|
|
522
|
+
"analyzedTestResults",
|
|
523
|
+
"testResults",
|
|
524
|
+
"environmentFixResults",
|
|
525
|
+
"envRetryCount"
|
|
526
|
+
],
|
|
401
527
|
"outputSchema": {
|
|
402
528
|
"type": "object",
|
|
403
529
|
"properties": {
|
|
404
|
-
"rejectionReason": {
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
"
|
|
530
|
+
"rejectionReason": {
|
|
531
|
+
"type": "string"
|
|
532
|
+
},
|
|
533
|
+
"environmentIssue": {
|
|
534
|
+
"type": "string"
|
|
535
|
+
},
|
|
536
|
+
"fixAttempts": {
|
|
537
|
+
"type": "array",
|
|
538
|
+
"items": {
|
|
539
|
+
"type": "string"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"comment": {
|
|
543
|
+
"type": "string"
|
|
544
|
+
}
|
|
408
545
|
},
|
|
409
|
-
"required": [
|
|
546
|
+
"required": [
|
|
547
|
+
"rejectionReason",
|
|
548
|
+
"environmentIssue",
|
|
549
|
+
"comment"
|
|
550
|
+
]
|
|
410
551
|
},
|
|
411
552
|
"outputKey": "rejectionDetails",
|
|
412
553
|
"temperature": 0.3
|
|
@@ -417,7 +558,7 @@
|
|
|
417
558
|
},
|
|
418
559
|
{
|
|
419
560
|
"type": "action",
|
|
420
|
-
"call": "
|
|
561
|
+
"call": "ReportTriggerFail"
|
|
421
562
|
}
|
|
422
563
|
]
|
|
423
564
|
},
|
|
@@ -428,26 +569,50 @@
|
|
|
428
569
|
{
|
|
429
570
|
"type": "llm-action",
|
|
430
571
|
"name": "DocumentRejection",
|
|
431
|
-
"prompt": "Document why the task is rejected based ONLY on task-related test failures.\n\nTask: {{taskDescription}}\nTest Results: {{analyzedTestResults}}\nGit Diff: {{gitDiff}}\nTask Files: {{taskFiles}}\n\nExplain what failed and what needs fixing. ONLY include failures that are classified as 'task-related'
|
|
432
|
-
"contextKeys": [
|
|
572
|
+
"prompt": "Document why the task is rejected based ONLY on task-related test failures.\n\nTask: {{taskDescription}}\nTest Results: {{analyzedTestResults}}\nGit Diff: {{gitDiff}}\nTask Files: {{taskFiles}}\n\nExplain what failed and what needs fixing. ONLY include failures that are classified as 'task-related' \u2014 failures in code the engineer actually changed.\n\nCRITICAL RULES:\n1. NEVER reject for pre-existing failures (tests failing in code the engineer did NOT touch).\n2. NEVER reject because dependencies were not installed, test runners were not found (exit code 127), or the test environment was not set up.\n3. ONLY reject for actual code failures in the engineer's changed files: tests that fail due to bugs, missing implementations, incorrect logic, or code that does not meet acceptance criteria.\n4. If the only failures are pre-existing or environment-related, this rejection should NOT have been reached \u2014 but if it was, explain that the failures are not task-related and recommend approval.",
|
|
573
|
+
"contextKeys": [
|
|
574
|
+
"taskDescription",
|
|
575
|
+
"analyzedTestResults",
|
|
576
|
+
"testResults",
|
|
577
|
+
"gitDiff",
|
|
578
|
+
"taskFiles"
|
|
579
|
+
],
|
|
433
580
|
"outputSchema": {
|
|
434
581
|
"type": "object",
|
|
435
582
|
"properties": {
|
|
436
|
-
"rejectionReason": {
|
|
583
|
+
"rejectionReason": {
|
|
584
|
+
"type": "string"
|
|
585
|
+
},
|
|
437
586
|
"requiredFixes": {
|
|
438
587
|
"type": "array",
|
|
439
588
|
"items": {
|
|
440
589
|
"type": "object",
|
|
441
590
|
"properties": {
|
|
442
|
-
"issue": {
|
|
443
|
-
|
|
444
|
-
|
|
591
|
+
"issue": {
|
|
592
|
+
"type": "string"
|
|
593
|
+
},
|
|
594
|
+
"suggestedFix": {
|
|
595
|
+
"type": "string"
|
|
596
|
+
},
|
|
597
|
+
"priority": {
|
|
598
|
+
"type": "string",
|
|
599
|
+
"enum": [
|
|
600
|
+
"high",
|
|
601
|
+
"medium",
|
|
602
|
+
"low"
|
|
603
|
+
]
|
|
604
|
+
}
|
|
445
605
|
}
|
|
446
606
|
}
|
|
447
607
|
},
|
|
448
|
-
"comment": {
|
|
608
|
+
"comment": {
|
|
609
|
+
"type": "string"
|
|
610
|
+
}
|
|
449
611
|
},
|
|
450
|
-
"required": [
|
|
612
|
+
"required": [
|
|
613
|
+
"rejectionReason",
|
|
614
|
+
"comment"
|
|
615
|
+
]
|
|
451
616
|
},
|
|
452
617
|
"outputKey": "rejectionDetails",
|
|
453
618
|
"temperature": 0.3
|
|
@@ -458,7 +623,7 @@
|
|
|
458
623
|
},
|
|
459
624
|
{
|
|
460
625
|
"type": "action",
|
|
461
|
-
"call": "
|
|
626
|
+
"call": "ReportTriggerFail"
|
|
462
627
|
}
|
|
463
628
|
]
|
|
464
629
|
}
|
|
@@ -478,7 +643,10 @@
|
|
|
478
643
|
"type": "llm-condition",
|
|
479
644
|
"name": "IsLowRisk",
|
|
480
645
|
"prompt": "Is this a low-risk change that can be approved without tests?\n\nChange Analysis: {{changeAnalysis}}\nTask: {{taskDescription}}\n\nLow risk = docs, config, minor refactoring.\nHigh risk = core logic, security, data.\n\nReturn true if low risk.",
|
|
481
|
-
"contextKeys": [
|
|
646
|
+
"contextKeys": [
|
|
647
|
+
"changeAnalysis",
|
|
648
|
+
"taskDescription"
|
|
649
|
+
],
|
|
482
650
|
"confidenceThreshold": 0.7,
|
|
483
651
|
"fallbackValue": false
|
|
484
652
|
},
|
|
@@ -497,7 +665,7 @@
|
|
|
497
665
|
"children": [
|
|
498
666
|
{
|
|
499
667
|
"type": "sequence",
|
|
500
|
-
"comment": "Lint passed (or no linter) -
|
|
668
|
+
"comment": "Lint passed (or no linter) - approve (PR creation handled by release agent)",
|
|
501
669
|
"children": [
|
|
502
670
|
{
|
|
503
671
|
"type": "condition",
|
|
@@ -505,15 +673,7 @@
|
|
|
505
673
|
},
|
|
506
674
|
{
|
|
507
675
|
"type": "action",
|
|
508
|
-
"call": "
|
|
509
|
-
},
|
|
510
|
-
{
|
|
511
|
-
"type": "action",
|
|
512
|
-
"call": "GitCreatePR"
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
"type": "action",
|
|
516
|
-
"call": "RequestStatusDone"
|
|
676
|
+
"call": "ReportTriggerPass"
|
|
517
677
|
}
|
|
518
678
|
]
|
|
519
679
|
},
|
|
@@ -531,7 +691,7 @@
|
|
|
531
691
|
},
|
|
532
692
|
{
|
|
533
693
|
"type": "action",
|
|
534
|
-
"call": "
|
|
694
|
+
"call": "ReportTriggerFail"
|
|
535
695
|
}
|
|
536
696
|
]
|
|
537
697
|
}
|
|
@@ -547,25 +707,46 @@
|
|
|
547
707
|
"type": "llm-action",
|
|
548
708
|
"name": "DocumentTestsRequired",
|
|
549
709
|
"prompt": "Explain why tests are needed.\n\nTask: {{taskDescription}}\nChange Analysis: {{changeAnalysis}}\n\nThis is a high-risk change that needs tests.",
|
|
550
|
-
"contextKeys": [
|
|
710
|
+
"contextKeys": [
|
|
711
|
+
"taskDescription",
|
|
712
|
+
"changeAnalysis"
|
|
713
|
+
],
|
|
551
714
|
"outputSchema": {
|
|
552
715
|
"type": "object",
|
|
553
716
|
"properties": {
|
|
554
|
-
"rejectionReason": {
|
|
717
|
+
"rejectionReason": {
|
|
718
|
+
"type": "string"
|
|
719
|
+
},
|
|
555
720
|
"requiredFixes": {
|
|
556
721
|
"type": "array",
|
|
557
722
|
"items": {
|
|
558
723
|
"type": "object",
|
|
559
724
|
"properties": {
|
|
560
|
-
"issue": {
|
|
561
|
-
|
|
562
|
-
|
|
725
|
+
"issue": {
|
|
726
|
+
"type": "string"
|
|
727
|
+
},
|
|
728
|
+
"suggestedFix": {
|
|
729
|
+
"type": "string"
|
|
730
|
+
},
|
|
731
|
+
"priority": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"enum": [
|
|
734
|
+
"high",
|
|
735
|
+
"medium",
|
|
736
|
+
"low"
|
|
737
|
+
]
|
|
738
|
+
}
|
|
563
739
|
}
|
|
564
740
|
}
|
|
565
741
|
},
|
|
566
|
-
"comment": {
|
|
742
|
+
"comment": {
|
|
743
|
+
"type": "string"
|
|
744
|
+
}
|
|
567
745
|
},
|
|
568
|
-
"required": [
|
|
746
|
+
"required": [
|
|
747
|
+
"rejectionReason",
|
|
748
|
+
"comment"
|
|
749
|
+
]
|
|
569
750
|
},
|
|
570
751
|
"outputKey": "rejectionDetails",
|
|
571
752
|
"temperature": 0.3
|
|
@@ -576,7 +757,7 @@
|
|
|
576
757
|
},
|
|
577
758
|
{
|
|
578
759
|
"type": "action",
|
|
579
|
-
"call": "
|
|
760
|
+
"call": "ReportTriggerFail"
|
|
580
761
|
}
|
|
581
762
|
]
|
|
582
763
|
}
|
|
@@ -598,7 +779,7 @@
|
|
|
598
779
|
},
|
|
599
780
|
{
|
|
600
781
|
"type": "action",
|
|
601
|
-
"call": "
|
|
782
|
+
"call": "ReportTriggerFail"
|
|
602
783
|
}
|
|
603
784
|
]
|
|
604
785
|
}
|
|
@@ -650,6 +831,7 @@
|
|
|
650
831
|
"environmentFixAttempted": false,
|
|
651
832
|
"environmentFixResults": null,
|
|
652
833
|
"projectInfo": null,
|
|
834
|
+
"engineerTestSetup": null,
|
|
653
835
|
"testCommandInfo": null,
|
|
654
836
|
"testExitCode": null,
|
|
655
837
|
"requestedStatus": null,
|