@trygentic/agentloop 0.17.0-alpha.11 → 0.19.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/package.json +3 -3
- package/templates/agents/chat/chat.bt.json +36 -3
- package/templates/agents/chat/chat.md +11 -3
- package/templates/agents/engineer/engineer.bt.json +671 -103
- package/templates/agents/engineer/engineer.md +40 -10
- package/templates/agents/merge-resolver/merge-resolver.bt.json +217 -0
- package/templates/agents/merge-resolver/merge-resolver.md +297 -0
- package/templates/agents/orchestrator/orchestrator.md +0 -1
- package/templates/agents/product-manager/product-manager.bt.json +210 -63
- package/templates/agents/product-manager/product-manager.md +77 -7
- package/templates/agents/qa-tester/qa-tester.bt.json +39 -9
- package/templates/agents/qa-tester/qa-tester.md +44 -4
- package/templates/agents/release/release.bt.json +32 -18
- package/templates/agents/release/release.md +53 -8
- package/templates/plugins/qa-e2e-maestro/qa-e2e-maestro.bt.json +1191 -0
- package/templates/plugins/qa-e2e-maestro/qa-e2e-maestro.md +923 -0
- package/templates/plugins/qa-e2e-scenario/qa-e2e-scenario.md +85 -0
|
@@ -101,14 +101,24 @@
|
|
|
101
101
|
{
|
|
102
102
|
"type": "llm-action",
|
|
103
103
|
"name": "AnalyzeQAFeedbackAndFix",
|
|
104
|
-
"prompt": "You are an engineer agent handling a QA rejection. The task was previously submitted for review but QA found issues that need to be fixed.\n\nTask: {{taskDescription}}\n\nQA Feedback and Previous Comments:\n{{taskComments}}\n\nCodebase Context:\n{{codebaseContext}}\n\nPrevious Analysis (if any):\n{{taskAnalysis}}\n\
|
|
105
|
-
"
|
|
104
|
+
"prompt": "You are an engineer agent handling a QA rejection. The task was previously submitted for review but QA found issues that need to be fixed.\n\nTask: {{taskDescription}}\n\nQA Feedback and Previous Comments:\n{{taskComments}}\n\nCodebase Context:\n{{codebaseContext}}\n\nPrevious Analysis (if any):\n{{taskAnalysis}}\n\n## CRITICAL: YOU MUST MAKE CODE CHANGES\nQA found issues during actual app testing (E2E/runtime). This means the current code has bugs that MUST be fixed with code changes. DO NOT just run unit tests and conclude nothing needs fixing. Unit tests passing does NOT mean runtime errors are fixed \u2014 QA tests the actual running app and found real problems.\n\nIf unit tests pass but QA reported runtime errors, that means:\n- The unit tests don't cover the failing scenario, OR\n- The bug only manifests at runtime (wrong imports, missing props, incorrect component rendering, etc.)\n\nYou MUST:\n1. Read the QA feedback carefully to understand the EXACT runtime error\n2. Find the root cause in the source code (not just the test code)\n3. Make actual code changes to fix the issue\n4. If the bug isn't obvious, add a NEW test that reproduces the QA-reported failure\n5. Verify your fix with tests\n\nDO NOT conclude 'no changes needed' \u2014 QA rejected this task because something is broken. Find it and fix it.\n\n**Codebase Exploration Strategy (FOLLOW THIS ORDER):**\n1. FIRST use agentloop-memory MCP tools for intelligent code discovery (the code graph was already indexed):\n - `mcp__agentloop-memory__semantic_search` \u2014 find relevant code by natural language description\n - `mcp__agentloop-memory__query` \u2014 combined semantic + structural search\n - `mcp__agentloop-memory__find_similar_code` \u2014 find existing patterns similar to what you need\n - `mcp__agentloop-memory__list_file_entities` \u2014 enumerate functions, classes, and exports in a file\n - `mcp__agentloop-memory__list_entity_relationships` \u2014 trace imports, references, and dependencies\n - `mcp__agentloop-memory__analyze_code_impact` \u2014 understand what depends on code you plan to change\n2. THEN use Read to examine specific file contents, and Grep/Glob for targeted text searches or file pattern matching\n3. If agentloop-memory tools fail or return no results after 2-3 attempts, fall back to Grep/Glob\n\nIMPORTANT: Each change must include the full 'code' field with the complete file content to write. Address ALL QA feedback - partial fixes will result in another rejection.\n\nYou MUST produce at least one code change. If you cannot find the exact bug, at minimum add a regression test that verifies the scenario QA reported.",
|
|
105
|
+
"minTurns": 5,
|
|
106
|
+
"contextKeys": [
|
|
107
|
+
"taskDescription",
|
|
108
|
+
"taskTitle",
|
|
109
|
+
"taskComments",
|
|
110
|
+
"codebaseContext",
|
|
111
|
+
"taskAnalysis"
|
|
112
|
+
],
|
|
106
113
|
"subagent": "engineer",
|
|
107
114
|
"maxTurns": 50,
|
|
108
115
|
"outputSchema": {
|
|
109
116
|
"type": "object",
|
|
110
117
|
"properties": {
|
|
111
|
-
"qaFeedbackSummary": {
|
|
118
|
+
"qaFeedbackSummary": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"description": "Summary of QA feedback that needed to be addressed"
|
|
121
|
+
},
|
|
112
122
|
"changes": {
|
|
113
123
|
"type": "array",
|
|
114
124
|
"minItems": 1,
|
|
@@ -116,23 +126,105 @@
|
|
|
116
126
|
"items": {
|
|
117
127
|
"type": "object",
|
|
118
128
|
"properties": {
|
|
119
|
-
"filePath": {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
"
|
|
129
|
+
"filePath": {
|
|
130
|
+
"type": "string",
|
|
131
|
+
"description": "Absolute or relative path to the file"
|
|
132
|
+
},
|
|
133
|
+
"action": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": [
|
|
136
|
+
"create",
|
|
137
|
+
"modify",
|
|
138
|
+
"delete"
|
|
139
|
+
],
|
|
140
|
+
"description": "The type of file operation"
|
|
141
|
+
},
|
|
142
|
+
"description": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "Brief description of what this change fixes"
|
|
145
|
+
},
|
|
146
|
+
"code": {
|
|
147
|
+
"type": "string",
|
|
148
|
+
"description": "The complete file content to write (required for create/modify)"
|
|
149
|
+
},
|
|
150
|
+
"qaIssueAddressed": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "Which QA issue this change addresses"
|
|
153
|
+
}
|
|
124
154
|
},
|
|
125
|
-
"required": [
|
|
155
|
+
"required": [
|
|
156
|
+
"filePath",
|
|
157
|
+
"action",
|
|
158
|
+
"description",
|
|
159
|
+
"code"
|
|
160
|
+
]
|
|
126
161
|
}
|
|
127
162
|
},
|
|
128
|
-
"summary": {
|
|
129
|
-
|
|
130
|
-
|
|
163
|
+
"summary": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "Brief summary of all fixes made"
|
|
166
|
+
},
|
|
167
|
+
"allQAIssuesAddressed": {
|
|
168
|
+
"type": "boolean",
|
|
169
|
+
"description": "Whether all QA issues have been addressed"
|
|
170
|
+
},
|
|
171
|
+
"testsVerified": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"description": "Whether tests were run to verify the fixes"
|
|
174
|
+
}
|
|
131
175
|
},
|
|
132
|
-
"required": [
|
|
176
|
+
"required": [
|
|
177
|
+
"qaFeedbackSummary",
|
|
178
|
+
"changes",
|
|
179
|
+
"summary",
|
|
180
|
+
"allQAIssuesAddressed"
|
|
181
|
+
]
|
|
133
182
|
},
|
|
134
183
|
"outputKey": "implementation",
|
|
135
|
-
"temperature": 0.5
|
|
184
|
+
"temperature": 0.5,
|
|
185
|
+
"allowedTools": [
|
|
186
|
+
"read",
|
|
187
|
+
"edit",
|
|
188
|
+
"write",
|
|
189
|
+
"bash",
|
|
190
|
+
"glob",
|
|
191
|
+
"grep",
|
|
192
|
+
"webfetch",
|
|
193
|
+
"websearch",
|
|
194
|
+
"question",
|
|
195
|
+
"skill",
|
|
196
|
+
"plan_enter",
|
|
197
|
+
"plan_exit",
|
|
198
|
+
"mcp__agentloop__get_task",
|
|
199
|
+
"mcp__agentloop__list_tasks",
|
|
200
|
+
"mcp__agentloop__send_agent_message",
|
|
201
|
+
"mcp__agentloop__receive_messages",
|
|
202
|
+
"mcp__agentloop__broadcast_message",
|
|
203
|
+
"mcp__git-worktree-toolbox__listProjects",
|
|
204
|
+
"mcp__git-worktree-toolbox__worktreeChanges",
|
|
205
|
+
"mcp__git-worktree-toolbox__generateMrLink",
|
|
206
|
+
"mcp__git-worktree-toolbox__mergeRemoteWorktreeChangesIntoLocal",
|
|
207
|
+
"mcp__agentloop-memory__index",
|
|
208
|
+
"mcp__agentloop-memory__semantic_search",
|
|
209
|
+
"mcp__agentloop-memory__find_similar_code",
|
|
210
|
+
"mcp__agentloop-memory__query",
|
|
211
|
+
"mcp__agentloop-memory__list_file_entities",
|
|
212
|
+
"mcp__agentloop-memory__list_entity_relationships",
|
|
213
|
+
"mcp__agentloop-memory__find_related_concepts",
|
|
214
|
+
"mcp__agentloop-memory__analyze_code_impact",
|
|
215
|
+
"mcp__agentloop-memory__analyze_hotspots",
|
|
216
|
+
"mcp__agentloop-memory__detect_code_clones",
|
|
217
|
+
"mcp__agentloop-memory__jscpd_detect_clones",
|
|
218
|
+
"mcp__agentloop-memory__suggest_refactoring",
|
|
219
|
+
"mcp__agentloop-memory__cross_language_search",
|
|
220
|
+
"mcp__agentloop-memory__get_graph_stats",
|
|
221
|
+
"mcp__agentloop-memory__get_graph_health",
|
|
222
|
+
"mcp__agentloop-memory__get_metrics",
|
|
223
|
+
"mcp__agentloop-memory__get_version",
|
|
224
|
+
"mcp__agentloop-memory__clean_index",
|
|
225
|
+
"mcp__agentloop-memory__reset_graph",
|
|
226
|
+
"mcp__agentloop-memory__get_graph"
|
|
227
|
+
]
|
|
136
228
|
}
|
|
137
229
|
]
|
|
138
230
|
},
|
|
@@ -143,37 +235,92 @@
|
|
|
143
235
|
{
|
|
144
236
|
"type": "llm-action",
|
|
145
237
|
"name": "AnalyzeTask",
|
|
146
|
-
"prompt": "You are an engineer agent analyzing a task. Examine the task requirements and the codebase context provided. Determine the complexity of the task and identify which files will likely need to be modified.\n\nTask: {{taskDescription}}\n\n{{taskComments}}\n\nIMPORTANT: Only reference files and directories that appear in the codebase context. Do NOT guess or hallucinate file paths that are not listed there.\n\nIf this task was previously rejected by QA, pay close attention to the feedback in the comments above. Address ALL issues mentioned by QA in your implementation.\n\nIMPORTANT: Always plan to include tests for your implementation. Use the project's EXISTING test framework
|
|
147
|
-
"contextKeys": [
|
|
238
|
+
"prompt": "You are an engineer agent analyzing a task. Examine the task requirements and the codebase context provided. Determine the complexity of the task and identify which files will likely need to be modified.\n\nTask: {{taskDescription}}\n\n{{taskComments}}\n\nIMPORTANT: Only reference files and directories that appear in the codebase context. Do NOT guess or hallucinate file paths that are not listed there.\n\nIf this task was previously rejected by QA, pay close attention to the feedback in the comments above. Address ALL issues mentioned by QA in your implementation.\n\nIMPORTANT: Always plan to include tests for your implementation. Use the project's EXISTING test framework \u2014 check codebase context for test runner, test scripts, and existing test files. Do NOT add a new test framework or test runner configuration (no jest.config, vitest.config, etc.). Follow the naming conventions and import patterns found in existing test files.\n\nProvide a thorough analysis of what needs to be done, including what tests you will create.",
|
|
239
|
+
"contextKeys": [
|
|
240
|
+
"taskDescription",
|
|
241
|
+
"taskTitle",
|
|
242
|
+
"codebaseContext",
|
|
243
|
+
"taskComments"
|
|
244
|
+
],
|
|
148
245
|
"outputSchema": {
|
|
149
246
|
"type": "object",
|
|
150
247
|
"properties": {
|
|
151
|
-
"analysis": {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
248
|
+
"analysis": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Detailed analysis of the task requirements"
|
|
251
|
+
},
|
|
252
|
+
"complexity": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"enum": [
|
|
255
|
+
"simple",
|
|
256
|
+
"moderate",
|
|
257
|
+
"complex"
|
|
258
|
+
],
|
|
259
|
+
"description": "Task complexity assessment"
|
|
260
|
+
},
|
|
261
|
+
"affectedFiles": {
|
|
262
|
+
"type": "array",
|
|
263
|
+
"items": {
|
|
264
|
+
"type": "string"
|
|
265
|
+
},
|
|
266
|
+
"description": "List of files that will likely need modification"
|
|
267
|
+
},
|
|
268
|
+
"estimatedSteps": {
|
|
269
|
+
"type": "number",
|
|
270
|
+
"description": "Estimated number of implementation steps"
|
|
271
|
+
},
|
|
272
|
+
"risks": {
|
|
273
|
+
"type": "array",
|
|
274
|
+
"items": {
|
|
275
|
+
"type": "string"
|
|
276
|
+
},
|
|
277
|
+
"description": "Potential risks or challenges"
|
|
278
|
+
},
|
|
279
|
+
"qaFeedbackAddressed": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "If QA rejected this task before, summarize how you will address their feedback"
|
|
282
|
+
},
|
|
283
|
+
"testsPlanned": {
|
|
284
|
+
"type": "array",
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"description": "List of tests that will be created to verify the implementation"
|
|
289
|
+
}
|
|
158
290
|
},
|
|
159
|
-
"required": [
|
|
291
|
+
"required": [
|
|
292
|
+
"analysis",
|
|
293
|
+
"complexity",
|
|
294
|
+
"affectedFiles",
|
|
295
|
+
"testsPlanned"
|
|
296
|
+
]
|
|
160
297
|
},
|
|
161
298
|
"outputKey": "taskAnalysis",
|
|
162
|
-
"temperature": 0.3
|
|
299
|
+
"temperature": 0.3,
|
|
300
|
+
"allowedTools": []
|
|
163
301
|
},
|
|
164
302
|
{
|
|
165
303
|
"type": "llm-selector",
|
|
166
304
|
"name": "ChooseImplementationStrategy",
|
|
167
305
|
"prompt": "Based on the task analysis, choose the best implementation strategy.\n\nAnalysis: {{taskAnalysis}}\n\nSimple changes can be implemented directly. Complex changes need a detailed plan first.",
|
|
168
|
-
"contextKeys": [
|
|
306
|
+
"contextKeys": [
|
|
307
|
+
"taskAnalysis",
|
|
308
|
+
"taskDescription",
|
|
309
|
+
"taskComments"
|
|
310
|
+
],
|
|
169
311
|
"branches": {
|
|
170
312
|
"direct": {
|
|
171
313
|
"description": "Implement directly - for simple, straightforward changes with low risk",
|
|
172
314
|
"child": {
|
|
173
315
|
"type": "llm-action",
|
|
174
316
|
"name": "ImplementDirectly",
|
|
175
|
-
"prompt": "Implement the task directly. Generate the code changes needed.\n\nTask: {{taskDescription}}\nAnalysis: {{taskAnalysis}}\n\n{{taskComments}}\n\nIf this task was previously rejected by QA, make sure your implementation addresses ALL the issues mentioned in their feedback.\n\nYou already have codebase context, task analysis, and task details in your context. Start implementing immediately
|
|
176
|
-
"contextKeys": [
|
|
317
|
+
"prompt": "Implement the task directly. Generate the code changes needed.\n\nTask: {{taskDescription}}\nAnalysis: {{taskAnalysis}}\n\n{{taskComments}}\n\nIf this task was previously rejected by QA, make sure your implementation addresses ALL the issues mentioned in their feedback.\n\nYou already have codebase context, task analysis, and task details in your context. Start implementing immediately \u2014 do NOT return empty changes or claim you need more exploration.\n\n**Codebase Exploration Strategy (FOLLOW THIS ORDER):**\n1. FIRST use agentloop-memory MCP tools for intelligent code discovery (the code graph was already indexed):\n - `mcp__agentloop-memory__semantic_search` \u2014 find relevant code by natural language description (e.g., search for concepts, function purposes, feature areas)\n - `mcp__agentloop-memory__query` \u2014 combined semantic + structural search for broader discovery\n - `mcp__agentloop-memory__find_similar_code` \u2014 find existing patterns similar to what you need to implement\n - `mcp__agentloop-memory__list_file_entities` \u2014 enumerate functions, classes, and exports in a specific file\n - `mcp__agentloop-memory__list_entity_relationships` \u2014 trace imports, references, and dependencies between entities\n - `mcp__agentloop-memory__analyze_code_impact` \u2014 understand what depends on code you plan to change (blast radius)\n2. THEN use Read to examine specific file contents, and Grep/Glob for targeted text searches or file pattern matching\n3. If agentloop-memory tools fail or return no results after 2-3 attempts, fall back to Grep/Glob\n\nIMPORTANT: Always include test files alongside your implementation. Create at least one test file that verifies the core functionality. Use the project's EXISTING test framework and test runner \u2014 check codebase context for what test framework the project uses, what test scripts are available, and how existing test files are structured. Do NOT install or configure a new test framework (no jest.config.js, no vitest.config.ts, etc.). Follow the naming conventions, import patterns, and directory structure of existing test files in the project.\n\n**CRITICAL: Read Before Edit Rule:**\nYou MUST call the `read` tool on any existing file BEFORE calling `edit` on it. The edit tool validates that you've read the file first. If you skip the read, the edit will fail with \"You must read file X before overwriting it.\" For new files, use the `write` tool instead of `edit`.\n\nProvide the implementation with file paths and complete code content for each file.\n\nIMPORTANT: Each change must include the full 'code' field with the complete file content to write. Include both implementation files AND test files in the changes array. You MUST produce at least one file change.\n\n**Test Configuration Rules (CRITICAL):**\n- Tests run in a non-interactive CI-like environment. NEVER configure tests to use watch mode.\n- When creating vitest.config.ts/js, always set `test: { watch: false }` or use `defineConfig({ test: { watch: false } })`.\n- When writing package.json test scripts with vitest, ALWAYS use `\"test\": \"vitest run\"` (NOT `\"test\": \"vitest\"`).\n- For jest, always include `--watchAll=false` in the test script if needed.\n- Never add `--watch` or `--watchAll` flags to test scripts.",
|
|
318
|
+
"contextKeys": [
|
|
319
|
+
"taskDescription",
|
|
320
|
+
"taskAnalysis",
|
|
321
|
+
"codebaseContext",
|
|
322
|
+
"taskComments"
|
|
323
|
+
],
|
|
177
324
|
"subagent": "engineer",
|
|
178
325
|
"maxTurns": 500,
|
|
179
326
|
"outputSchema": {
|
|
@@ -186,23 +333,107 @@
|
|
|
186
333
|
"items": {
|
|
187
334
|
"type": "object",
|
|
188
335
|
"properties": {
|
|
189
|
-
"filePath": {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
"
|
|
336
|
+
"filePath": {
|
|
337
|
+
"type": "string",
|
|
338
|
+
"description": "Absolute or relative path to the file"
|
|
339
|
+
},
|
|
340
|
+
"action": {
|
|
341
|
+
"type": "string",
|
|
342
|
+
"enum": [
|
|
343
|
+
"create",
|
|
344
|
+
"modify",
|
|
345
|
+
"delete"
|
|
346
|
+
],
|
|
347
|
+
"description": "The type of file operation"
|
|
348
|
+
},
|
|
349
|
+
"description": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"description": "Brief description of what this change does"
|
|
352
|
+
},
|
|
353
|
+
"code": {
|
|
354
|
+
"type": "string",
|
|
355
|
+
"description": "The complete file content to write (required for create/modify)"
|
|
356
|
+
},
|
|
357
|
+
"isTest": {
|
|
358
|
+
"type": "boolean",
|
|
359
|
+
"description": "Whether this file is a test file"
|
|
360
|
+
}
|
|
194
361
|
},
|
|
195
|
-
"required": [
|
|
362
|
+
"required": [
|
|
363
|
+
"filePath",
|
|
364
|
+
"action",
|
|
365
|
+
"description",
|
|
366
|
+
"code"
|
|
367
|
+
]
|
|
196
368
|
}
|
|
197
369
|
},
|
|
198
|
-
"summary": {
|
|
199
|
-
|
|
200
|
-
|
|
370
|
+
"summary": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"description": "Brief summary of all changes made"
|
|
373
|
+
},
|
|
374
|
+
"qaFeedbackAddressed": {
|
|
375
|
+
"type": "string",
|
|
376
|
+
"description": "If QA rejected this task before, explain how you addressed their feedback"
|
|
377
|
+
},
|
|
378
|
+
"testsCreated": {
|
|
379
|
+
"type": "array",
|
|
380
|
+
"items": {
|
|
381
|
+
"type": "string"
|
|
382
|
+
},
|
|
383
|
+
"description": "List of test files created"
|
|
384
|
+
}
|
|
201
385
|
},
|
|
202
|
-
"required": [
|
|
386
|
+
"required": [
|
|
387
|
+
"changes",
|
|
388
|
+
"summary",
|
|
389
|
+
"testsCreated"
|
|
390
|
+
]
|
|
203
391
|
},
|
|
204
392
|
"outputKey": "implementation",
|
|
205
|
-
"temperature": 0.5
|
|
393
|
+
"temperature": 0.5,
|
|
394
|
+
"allowedTools": [
|
|
395
|
+
"read",
|
|
396
|
+
"edit",
|
|
397
|
+
"write",
|
|
398
|
+
"bash",
|
|
399
|
+
"glob",
|
|
400
|
+
"grep",
|
|
401
|
+
"webfetch",
|
|
402
|
+
"websearch",
|
|
403
|
+
"question",
|
|
404
|
+
"skill",
|
|
405
|
+
"plan_enter",
|
|
406
|
+
"plan_exit",
|
|
407
|
+
"mcp__agentloop__get_task",
|
|
408
|
+
"mcp__agentloop__list_tasks",
|
|
409
|
+
"mcp__agentloop__send_agent_message",
|
|
410
|
+
"mcp__agentloop__receive_messages",
|
|
411
|
+
"mcp__agentloop__broadcast_message",
|
|
412
|
+
"mcp__git-worktree-toolbox__listProjects",
|
|
413
|
+
"mcp__git-worktree-toolbox__worktreeChanges",
|
|
414
|
+
"mcp__git-worktree-toolbox__generateMrLink",
|
|
415
|
+
"mcp__git-worktree-toolbox__mergeRemoteWorktreeChangesIntoLocal",
|
|
416
|
+
"mcp__agentloop-memory__index",
|
|
417
|
+
"mcp__agentloop-memory__semantic_search",
|
|
418
|
+
"mcp__agentloop-memory__find_similar_code",
|
|
419
|
+
"mcp__agentloop-memory__query",
|
|
420
|
+
"mcp__agentloop-memory__list_file_entities",
|
|
421
|
+
"mcp__agentloop-memory__list_entity_relationships",
|
|
422
|
+
"mcp__agentloop-memory__find_related_concepts",
|
|
423
|
+
"mcp__agentloop-memory__analyze_code_impact",
|
|
424
|
+
"mcp__agentloop-memory__analyze_hotspots",
|
|
425
|
+
"mcp__agentloop-memory__detect_code_clones",
|
|
426
|
+
"mcp__agentloop-memory__jscpd_detect_clones",
|
|
427
|
+
"mcp__agentloop-memory__suggest_refactoring",
|
|
428
|
+
"mcp__agentloop-memory__cross_language_search",
|
|
429
|
+
"mcp__agentloop-memory__get_graph_stats",
|
|
430
|
+
"mcp__agentloop-memory__get_graph_health",
|
|
431
|
+
"mcp__agentloop-memory__get_metrics",
|
|
432
|
+
"mcp__agentloop-memory__get_version",
|
|
433
|
+
"mcp__agentloop-memory__clean_index",
|
|
434
|
+
"mcp__agentloop-memory__reset_graph",
|
|
435
|
+
"mcp__agentloop-memory__get_graph"
|
|
436
|
+
]
|
|
206
437
|
}
|
|
207
438
|
},
|
|
208
439
|
"planned": {
|
|
@@ -214,7 +445,12 @@
|
|
|
214
445
|
"type": "llm-action",
|
|
215
446
|
"name": "CreateImplementationPlan",
|
|
216
447
|
"prompt": "Create a detailed implementation plan for this complex task.\n\nTask: {{taskDescription}}\nAnalysis: {{taskAnalysis}}\n\n{{taskComments}}\n\nIMPORTANT: Only reference files and directories that appear in the codebase context. Do NOT guess or hallucinate file paths that are not listed there. Adapt your plan to match the actual project layout.\n\nIf this task was previously rejected by QA, incorporate their feedback into your plan.\n\nIMPORTANT: Include test creation as part of your implementation steps. Each step that creates functionality should have a corresponding test step or include tests within it.\n\nBreak down the implementation into clear steps with dependencies.",
|
|
217
|
-
"contextKeys": [
|
|
448
|
+
"contextKeys": [
|
|
449
|
+
"taskDescription",
|
|
450
|
+
"taskAnalysis",
|
|
451
|
+
"codebaseContext",
|
|
452
|
+
"taskComments"
|
|
453
|
+
],
|
|
218
454
|
"outputSchema": {
|
|
219
455
|
"type": "object",
|
|
220
456
|
"properties": {
|
|
@@ -223,30 +459,73 @@
|
|
|
223
459
|
"items": {
|
|
224
460
|
"type": "object",
|
|
225
461
|
"properties": {
|
|
226
|
-
"stepNumber": {
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
|
|
462
|
+
"stepNumber": {
|
|
463
|
+
"type": "number"
|
|
464
|
+
},
|
|
465
|
+
"description": {
|
|
466
|
+
"type": "string"
|
|
467
|
+
},
|
|
468
|
+
"files": {
|
|
469
|
+
"type": "array",
|
|
470
|
+
"items": {
|
|
471
|
+
"type": "string"
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"dependencies": {
|
|
475
|
+
"type": "array",
|
|
476
|
+
"items": {
|
|
477
|
+
"type": "number"
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
"testStrategy": {
|
|
481
|
+
"type": "string"
|
|
482
|
+
},
|
|
483
|
+
"includesTests": {
|
|
484
|
+
"type": "boolean",
|
|
485
|
+
"description": "Whether this step creates or modifies test files"
|
|
486
|
+
}
|
|
232
487
|
},
|
|
233
|
-
"required": [
|
|
488
|
+
"required": [
|
|
489
|
+
"stepNumber",
|
|
490
|
+
"description",
|
|
491
|
+
"files",
|
|
492
|
+
"includesTests"
|
|
493
|
+
]
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"totalEstimate": {
|
|
497
|
+
"type": "string"
|
|
498
|
+
},
|
|
499
|
+
"criticalPath": {
|
|
500
|
+
"type": "array",
|
|
501
|
+
"items": {
|
|
502
|
+
"type": "number"
|
|
234
503
|
}
|
|
235
504
|
},
|
|
236
|
-
"
|
|
237
|
-
|
|
238
|
-
|
|
505
|
+
"qaFeedbackAddressed": {
|
|
506
|
+
"type": "string",
|
|
507
|
+
"description": "If QA rejected this task before, explain how your plan addresses their feedback"
|
|
508
|
+
}
|
|
239
509
|
},
|
|
240
|
-
"required": [
|
|
510
|
+
"required": [
|
|
511
|
+
"steps"
|
|
512
|
+
]
|
|
241
513
|
},
|
|
242
514
|
"outputKey": "implementationPlan",
|
|
243
|
-
"temperature": 0.3
|
|
515
|
+
"temperature": 0.3,
|
|
516
|
+
"allowedTools": []
|
|
244
517
|
},
|
|
245
518
|
{
|
|
246
519
|
"type": "llm-action",
|
|
247
520
|
"name": "ImplementIncrementally",
|
|
248
|
-
"prompt": "Execute the implementation plan step by step.\n\nPlan: {{implementationPlan}}\nTask: {{taskDescription}}\n\n{{taskComments}}\n\nGenerate all the code changes according to the plan. Make sure to address any QA feedback from previous attempts.\n\nYou already have the codebase context, task analysis, and implementation plan in your context. Start implementing immediately
|
|
249
|
-
"contextKeys": [
|
|
521
|
+
"prompt": "Execute the implementation plan step by step.\n\nPlan: {{implementationPlan}}\nTask: {{taskDescription}}\n\n{{taskComments}}\n\nGenerate all the code changes according to the plan. Make sure to address any QA feedback from previous attempts.\n\nYou already have the codebase context, task analysis, and implementation plan in your context. Start implementing immediately \u2014 do NOT return empty changes or claim you need more exploration.\n\n**Codebase Exploration Strategy (FOLLOW THIS ORDER):**\n1. FIRST use agentloop-memory MCP tools for intelligent code discovery (the code graph was already indexed):\n - `mcp__agentloop-memory__semantic_search` \u2014 find relevant code by natural language description (e.g., search for concepts, function purposes, feature areas)\n - `mcp__agentloop-memory__query` \u2014 combined semantic + structural search for broader discovery\n - `mcp__agentloop-memory__find_similar_code` \u2014 find existing patterns similar to what you need to implement\n - `mcp__agentloop-memory__list_file_entities` \u2014 enumerate functions, classes, and exports in a specific file\n - `mcp__agentloop-memory__list_entity_relationships` \u2014 trace imports, references, and dependencies between entities\n - `mcp__agentloop-memory__analyze_code_impact` \u2014 understand what depends on code you plan to change (blast radius)\n2. THEN use Read to examine specific file contents, and Grep/Glob for targeted text searches or file pattern matching\n3. If agentloop-memory tools fail or return no results after 2-3 attempts, fall back to Grep/Glob\n\nIMPORTANT: Always include test files alongside your implementation. Create at least one test file that verifies the core functionality. Use the project's EXISTING test framework and test runner \u2014 check codebase context for what test framework the project uses, what test scripts are available, and how existing test files are structured. Do NOT install or configure a new test framework (no jest.config.js, no vitest.config.ts, etc.). Follow the naming conventions, import patterns, and directory structure of existing test files in the project.\n\n**CRITICAL: Read Before Edit Rule:**\nYou MUST call the `read` tool on any existing file BEFORE calling `edit` on it. The edit tool validates that you've read the file first. If you skip the read, the edit will fail with \"You must read file X before overwriting it.\" For new files, use the `write` tool instead of `edit`.\n\nIMPORTANT: Each change must include the full 'code' field with the complete file content to write. Include both implementation files AND test files in the changes array. You MUST produce at least one file change.\n\n**Test Configuration Rules (CRITICAL):**\n- Tests run in a non-interactive CI-like environment. NEVER configure tests to use watch mode.\n- When creating vitest.config.ts/js, always set `test: { watch: false }` or use `defineConfig({ test: { watch: false } })`.\n- When writing package.json test scripts with vitest, ALWAYS use `\"test\": \"vitest run\"` (NOT `\"test\": \"vitest\"`).\n- For jest, always include `--watchAll=false` in the test script if needed.\n- Never add `--watch` or `--watchAll` flags to test scripts.",
|
|
522
|
+
"contextKeys": [
|
|
523
|
+
"implementationPlan",
|
|
524
|
+
"taskDescription",
|
|
525
|
+
"taskAnalysis",
|
|
526
|
+
"codebaseContext",
|
|
527
|
+
"taskComments"
|
|
528
|
+
],
|
|
250
529
|
"subagent": "engineer",
|
|
251
530
|
"maxTurns": 500,
|
|
252
531
|
"outputSchema": {
|
|
@@ -258,32 +537,126 @@
|
|
|
258
537
|
"items": {
|
|
259
538
|
"type": "object",
|
|
260
539
|
"properties": {
|
|
261
|
-
"filePath": {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
"
|
|
266
|
-
|
|
540
|
+
"filePath": {
|
|
541
|
+
"type": "string",
|
|
542
|
+
"description": "Absolute or relative path to the file"
|
|
543
|
+
},
|
|
544
|
+
"action": {
|
|
545
|
+
"type": "string",
|
|
546
|
+
"enum": [
|
|
547
|
+
"create",
|
|
548
|
+
"modify",
|
|
549
|
+
"delete"
|
|
550
|
+
],
|
|
551
|
+
"description": "The type of file operation"
|
|
552
|
+
},
|
|
553
|
+
"description": {
|
|
554
|
+
"type": "string",
|
|
555
|
+
"description": "Brief description of what this change does"
|
|
556
|
+
},
|
|
557
|
+
"code": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"description": "The complete file content to write (required for create/modify)"
|
|
560
|
+
},
|
|
561
|
+
"stepNumber": {
|
|
562
|
+
"type": "number",
|
|
563
|
+
"description": "Which plan step this change implements"
|
|
564
|
+
},
|
|
565
|
+
"isTest": {
|
|
566
|
+
"type": "boolean",
|
|
567
|
+
"description": "Whether this file is a test file"
|
|
568
|
+
}
|
|
267
569
|
},
|
|
268
|
-
"required": [
|
|
570
|
+
"required": [
|
|
571
|
+
"filePath",
|
|
572
|
+
"action",
|
|
573
|
+
"description",
|
|
574
|
+
"code"
|
|
575
|
+
]
|
|
269
576
|
}
|
|
270
577
|
},
|
|
271
|
-
"summary": {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
578
|
+
"summary": {
|
|
579
|
+
"type": "string",
|
|
580
|
+
"description": "Brief summary of all changes made"
|
|
581
|
+
},
|
|
582
|
+
"completedSteps": {
|
|
583
|
+
"type": "array",
|
|
584
|
+
"items": {
|
|
585
|
+
"type": "number"
|
|
586
|
+
},
|
|
587
|
+
"description": "List of step numbers completed"
|
|
588
|
+
},
|
|
589
|
+
"qaFeedbackAddressed": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"description": "If QA rejected this task before, explain how you addressed their feedback"
|
|
592
|
+
},
|
|
593
|
+
"testsCreated": {
|
|
594
|
+
"type": "array",
|
|
595
|
+
"items": {
|
|
596
|
+
"type": "string"
|
|
597
|
+
},
|
|
598
|
+
"description": "List of test files created"
|
|
599
|
+
}
|
|
275
600
|
},
|
|
276
|
-
"required": [
|
|
601
|
+
"required": [
|
|
602
|
+
"changes",
|
|
603
|
+
"summary",
|
|
604
|
+
"testsCreated"
|
|
605
|
+
]
|
|
277
606
|
},
|
|
278
607
|
"outputKey": "implementation",
|
|
279
|
-
"temperature": 0.5
|
|
608
|
+
"temperature": 0.5,
|
|
609
|
+
"allowedTools": [
|
|
610
|
+
"read",
|
|
611
|
+
"edit",
|
|
612
|
+
"write",
|
|
613
|
+
"bash",
|
|
614
|
+
"glob",
|
|
615
|
+
"grep",
|
|
616
|
+
"webfetch",
|
|
617
|
+
"websearch",
|
|
618
|
+
"question",
|
|
619
|
+
"skill",
|
|
620
|
+
"plan_enter",
|
|
621
|
+
"plan_exit",
|
|
622
|
+
"mcp__agentloop__get_task",
|
|
623
|
+
"mcp__agentloop__list_tasks",
|
|
624
|
+
"mcp__agentloop__send_agent_message",
|
|
625
|
+
"mcp__agentloop__receive_messages",
|
|
626
|
+
"mcp__agentloop__broadcast_message",
|
|
627
|
+
"mcp__git-worktree-toolbox__listProjects",
|
|
628
|
+
"mcp__git-worktree-toolbox__worktreeChanges",
|
|
629
|
+
"mcp__git-worktree-toolbox__generateMrLink",
|
|
630
|
+
"mcp__git-worktree-toolbox__mergeRemoteWorktreeChangesIntoLocal",
|
|
631
|
+
"mcp__agentloop-memory__index",
|
|
632
|
+
"mcp__agentloop-memory__semantic_search",
|
|
633
|
+
"mcp__agentloop-memory__find_similar_code",
|
|
634
|
+
"mcp__agentloop-memory__query",
|
|
635
|
+
"mcp__agentloop-memory__list_file_entities",
|
|
636
|
+
"mcp__agentloop-memory__list_entity_relationships",
|
|
637
|
+
"mcp__agentloop-memory__find_related_concepts",
|
|
638
|
+
"mcp__agentloop-memory__analyze_code_impact",
|
|
639
|
+
"mcp__agentloop-memory__analyze_hotspots",
|
|
640
|
+
"mcp__agentloop-memory__detect_code_clones",
|
|
641
|
+
"mcp__agentloop-memory__jscpd_detect_clones",
|
|
642
|
+
"mcp__agentloop-memory__suggest_refactoring",
|
|
643
|
+
"mcp__agentloop-memory__cross_language_search",
|
|
644
|
+
"mcp__agentloop-memory__get_graph_stats",
|
|
645
|
+
"mcp__agentloop-memory__get_graph_health",
|
|
646
|
+
"mcp__agentloop-memory__get_metrics",
|
|
647
|
+
"mcp__agentloop-memory__get_version",
|
|
648
|
+
"mcp__agentloop-memory__clean_index",
|
|
649
|
+
"mcp__agentloop-memory__reset_graph",
|
|
650
|
+
"mcp__agentloop-memory__get_graph"
|
|
651
|
+
]
|
|
280
652
|
}
|
|
281
653
|
]
|
|
282
654
|
}
|
|
283
655
|
}
|
|
284
656
|
},
|
|
285
657
|
"defaultBranch": "planned",
|
|
286
|
-
"confidenceThreshold": 0.7
|
|
658
|
+
"confidenceThreshold": 0.7,
|
|
659
|
+
"allowedTools": []
|
|
287
660
|
}
|
|
288
661
|
]
|
|
289
662
|
}
|
|
@@ -316,8 +689,16 @@
|
|
|
316
689
|
{
|
|
317
690
|
"type": "llm-action",
|
|
318
691
|
"name": "FixValidationFailures",
|
|
319
|
-
"prompt": "You are an engineer agent fixing validation failures from a pre-commit code review. The previous implementation attempt had issues that need to be resolved.\n\nTask: {{taskDescription}}\n\nPrevious Implementation:\n{{implementation}}\n\nValidation Results (ISSUES TO FIX):\n{{preCommitValidation}}\n\nCodebase Context:\n{{codebaseContext}}\n\n{{taskComments}}\n\
|
|
320
|
-
"
|
|
692
|
+
"prompt": "You are an engineer agent fixing validation failures from a pre-commit code review. The previous implementation attempt had issues that need to be resolved.\n\nTask: {{taskDescription}}\n\nPrevious Implementation:\n{{implementation}}\n\nValidation Results (ISSUES TO FIX):\n{{preCommitValidation}}\n\nCodebase Context:\n{{codebaseContext}}\n\n{{taskComments}}\n\n## CRITICAL: YOU MUST PRODUCE CODE CHANGES\nIf the validation error is 'No changes detected', your previous attempt made ZERO code modifications. This is unacceptable \u2014 the task requires actual code changes. Do NOT just run tests and conclude nothing needs fixing.\n\nIf this task was rejected by QA:\n- QA tested the RUNNING APP and found real bugs (runtime errors, crashes, wrong UI)\n- Unit tests passing does NOT mean the bug is fixed \u2014 the bug may only manifest at runtime\n- You MUST find the root cause in the source code and fix it\n- If you can't find the bug, add a regression test that reproduces the QA-reported failure\n\nYour job is to:\n1. Read the validation results and QA feedback \u2014 they contain specific issues to fix\n2. Read the actual source files on disk to find the bug\n3. Make actual code changes (edit/write files) to fix the issue\n4. Run tests to verify your fix works\n5. Make sure no regressions are introduced\n\n**Codebase Exploration Strategy (FOLLOW THIS ORDER):**\n1. FIRST use agentloop-memory MCP tools for intelligent code discovery (the code graph was already indexed):\n - `mcp__agentloop-memory__semantic_search` \u2014 find relevant code by natural language description\n - `mcp__agentloop-memory__query` \u2014 combined semantic + structural search\n - `mcp__agentloop-memory__find_similar_code` \u2014 find existing patterns similar to what you need\n - `mcp__agentloop-memory__list_file_entities` \u2014 enumerate functions, classes, and exports in a file\n - `mcp__agentloop-memory__list_entity_relationships` \u2014 trace imports, references, and dependencies\n - `mcp__agentloop-memory__analyze_code_impact` \u2014 understand what depends on code you plan to change\n2. THEN use Read to examine specific file contents, and Grep/Glob for targeted text searches or file pattern matching\n3. If agentloop-memory tools fail or return no results after 2-3 attempts, fall back to Grep/Glob\n\n**CRITICAL: Read Before Edit Rule:**\nYou MUST call the `read` tool on any existing file BEFORE calling `edit` on it. The edit tool validates that you've read the file first. If you skip the read, the edit will fail with \"You must read file X before overwriting it.\" For new files, use the `write` tool instead of `edit`.\n\nIMPORTANT: You MUST produce at least one file change. Fix ALL validation issues - partial fixes will result in another retry.",
|
|
693
|
+
"minTurns": 5,
|
|
694
|
+
"contextKeys": [
|
|
695
|
+
"taskDescription",
|
|
696
|
+
"implementation",
|
|
697
|
+
"preCommitValidation",
|
|
698
|
+
"codebaseContext",
|
|
699
|
+
"taskComments",
|
|
700
|
+
"taskAnalysis"
|
|
701
|
+
],
|
|
321
702
|
"subagent": "engineer",
|
|
322
703
|
"maxTurns": 40,
|
|
323
704
|
"outputSchema": {
|
|
@@ -330,23 +711,110 @@
|
|
|
330
711
|
"items": {
|
|
331
712
|
"type": "object",
|
|
332
713
|
"properties": {
|
|
333
|
-
"filePath": {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
"
|
|
714
|
+
"filePath": {
|
|
715
|
+
"type": "string",
|
|
716
|
+
"description": "Absolute or relative path to the file"
|
|
717
|
+
},
|
|
718
|
+
"action": {
|
|
719
|
+
"type": "string",
|
|
720
|
+
"enum": [
|
|
721
|
+
"create",
|
|
722
|
+
"modify",
|
|
723
|
+
"delete"
|
|
724
|
+
],
|
|
725
|
+
"description": "The type of file operation"
|
|
726
|
+
},
|
|
727
|
+
"description": {
|
|
728
|
+
"type": "string",
|
|
729
|
+
"description": "Brief description of what this change fixes"
|
|
730
|
+
},
|
|
731
|
+
"code": {
|
|
732
|
+
"type": "string",
|
|
733
|
+
"description": "The complete file content to write (required for create/modify)"
|
|
734
|
+
},
|
|
735
|
+
"isTest": {
|
|
736
|
+
"type": "boolean",
|
|
737
|
+
"description": "Whether this file is a test file"
|
|
738
|
+
}
|
|
338
739
|
},
|
|
339
|
-
"required": [
|
|
740
|
+
"required": [
|
|
741
|
+
"filePath",
|
|
742
|
+
"action",
|
|
743
|
+
"description",
|
|
744
|
+
"code"
|
|
745
|
+
]
|
|
340
746
|
}
|
|
341
747
|
},
|
|
342
|
-
"summary": {
|
|
343
|
-
|
|
344
|
-
|
|
748
|
+
"summary": {
|
|
749
|
+
"type": "string",
|
|
750
|
+
"description": "Brief summary of all fixes made"
|
|
751
|
+
},
|
|
752
|
+
"validationIssuesFixed": {
|
|
753
|
+
"type": "array",
|
|
754
|
+
"items": {
|
|
755
|
+
"type": "string"
|
|
756
|
+
},
|
|
757
|
+
"description": "List of validation issues that were fixed"
|
|
758
|
+
},
|
|
759
|
+
"testsCreated": {
|
|
760
|
+
"type": "array",
|
|
761
|
+
"items": {
|
|
762
|
+
"type": "string"
|
|
763
|
+
},
|
|
764
|
+
"description": "List of test files created or modified"
|
|
765
|
+
}
|
|
345
766
|
},
|
|
346
|
-
"required": [
|
|
767
|
+
"required": [
|
|
768
|
+
"changes",
|
|
769
|
+
"summary",
|
|
770
|
+
"validationIssuesFixed"
|
|
771
|
+
]
|
|
347
772
|
},
|
|
348
773
|
"outputKey": "implementation",
|
|
349
|
-
"temperature": 0.5
|
|
774
|
+
"temperature": 0.5,
|
|
775
|
+
"allowedTools": [
|
|
776
|
+
"read",
|
|
777
|
+
"edit",
|
|
778
|
+
"write",
|
|
779
|
+
"bash",
|
|
780
|
+
"glob",
|
|
781
|
+
"grep",
|
|
782
|
+
"webfetch",
|
|
783
|
+
"websearch",
|
|
784
|
+
"question",
|
|
785
|
+
"skill",
|
|
786
|
+
"plan_enter",
|
|
787
|
+
"plan_exit",
|
|
788
|
+
"mcp__agentloop__get_task",
|
|
789
|
+
"mcp__agentloop__list_tasks",
|
|
790
|
+
"mcp__agentloop__send_agent_message",
|
|
791
|
+
"mcp__agentloop__receive_messages",
|
|
792
|
+
"mcp__agentloop__broadcast_message",
|
|
793
|
+
"mcp__git-worktree-toolbox__listProjects",
|
|
794
|
+
"mcp__git-worktree-toolbox__worktreeChanges",
|
|
795
|
+
"mcp__git-worktree-toolbox__generateMrLink",
|
|
796
|
+
"mcp__git-worktree-toolbox__mergeRemoteWorktreeChangesIntoLocal",
|
|
797
|
+
"mcp__agentloop-memory__index",
|
|
798
|
+
"mcp__agentloop-memory__semantic_search",
|
|
799
|
+
"mcp__agentloop-memory__find_similar_code",
|
|
800
|
+
"mcp__agentloop-memory__query",
|
|
801
|
+
"mcp__agentloop-memory__list_file_entities",
|
|
802
|
+
"mcp__agentloop-memory__list_entity_relationships",
|
|
803
|
+
"mcp__agentloop-memory__find_related_concepts",
|
|
804
|
+
"mcp__agentloop-memory__analyze_code_impact",
|
|
805
|
+
"mcp__agentloop-memory__analyze_hotspots",
|
|
806
|
+
"mcp__agentloop-memory__detect_code_clones",
|
|
807
|
+
"mcp__agentloop-memory__jscpd_detect_clones",
|
|
808
|
+
"mcp__agentloop-memory__suggest_refactoring",
|
|
809
|
+
"mcp__agentloop-memory__cross_language_search",
|
|
810
|
+
"mcp__agentloop-memory__get_graph_stats",
|
|
811
|
+
"mcp__agentloop-memory__get_graph_health",
|
|
812
|
+
"mcp__agentloop-memory__get_metrics",
|
|
813
|
+
"mcp__agentloop-memory__get_version",
|
|
814
|
+
"mcp__agentloop-memory__clean_index",
|
|
815
|
+
"mcp__agentloop-memory__reset_graph",
|
|
816
|
+
"mcp__agentloop-memory__get_graph"
|
|
817
|
+
]
|
|
350
818
|
}
|
|
351
819
|
]
|
|
352
820
|
},
|
|
@@ -408,8 +876,14 @@
|
|
|
408
876
|
{
|
|
409
877
|
"type": "llm-action",
|
|
410
878
|
"name": "PreCommitCodeReview",
|
|
411
|
-
"prompt": "You are performing pre-commit code quality validation. Your job is to catch and fix issues BEFORE the code is sent to QA review.\n\nThe implementation has been applied to disk. You MUST read the actual files from disk using Read/Grep/Glob tools, run the test suite (if one exists), and fix any issues found.\n\n## Required Checks\n\n### 1. Import/Export Verification\nFor every source and test file in the implementation, verify that all imports reference actual exports:\n- Read each file and identify all imports\n- Read the corresponding source modules and verify those exports exist\n- Common issues: tests importing non-existent functions, selectors, types, or constants\n- Fix: Add missing exports to source files, or correct invalid imports in tests\n\n### 2. Test Isolation\nVerify each test file properly isolates state between test cases:\n- State stores (Redux, Zustand, MobX, etc.): Each test must create a fresh store or reset state in beforeEach/afterEach\n- Mocks: Cleared between tests (jest.clearAllMocks, sinon.restore, vi.restoreAllMocks, etc.)\n- Singletons: Reset between tests if tested\n- Global/module-level state: No test should depend on side effects from previous tests\n- Database/API mocks: Mock responses scoped per-test, not shared\n- Fix: Add proper setup/teardown hooks to test files\n\n### 3. Implementation Completeness\nCross-reference the task acceptance criteria with actual code:\n- Verify functions and methods have real logic, not empty shells or stubs\n- Check that event listeners, callbacks, and subscriptions are actually wired up and functional\n- Ensure all integration points are connected, not just type-correct\n- Verify module wiring: if module A should respond to events from module B, trace the actual connection\n- Fix: Complete any incomplete implementations\n\n### 4. Run Tests\nExecute the project test suite and analyze results:\n- Use the detected test command for this project type\n- If tests fail, analyze failure output to identify root causes (not just symptoms)\n- Fix the root causes in source or test files\n- Re-run tests to confirm fixes work\n- Repeat fix-and-rerun up to 2 cycles\n\n**IMPORTANT: Greenfield / New Projects Without Test Infrastructure**\nIf this is a brand-new project being created from scratch (greenfield) and there is NO existing test framework, test runner, or test configuration:\n- Set `testsRun: false` and `testsPassed: false`\n- Set `noTestInfrastructure: true`\n- Set `allIssuesResolved: true` if the code review checks (import/export, completeness, isolation) all pass\n- In `testOutput`, explain that no test framework exists in the project\n- Do NOT waste retries trying to install a test framework just to pass validation\n- The implementation itself (created files, working code, proper structure) is what matters for greenfield tasks\n\nSigns that a project has no test infrastructure:\n- No test runner configured (no jest, vitest, mocha, pytest, etc. in dependencies)\n- No test scripts in package.json (no \"test\" script, or test script is the default npm placeholder)\n- No test configuration files (no jest.config.*, vitest.config.*, etc.)\n- No existing test files in the project\n- Project was just created by the engineer in this task\n\n### 5. Distinguish Pre-Existing Failures from Task-Related Failures\nWhen analyzing test results, carefully distinguish between:\n- **Task-related failures**: Tests that fail because of code YOU changed or created in this task. These MUST be fixed.\n- **Pre-existing failures**: Tests that were already failing BEFORE your changes
|
|
412
|
-
"contextKeys": [
|
|
879
|
+
"prompt": "You are performing pre-commit code quality validation. Your job is to catch and fix issues BEFORE the code is sent to QA review.\n\nThe implementation has been applied to disk. You MUST read the actual files from disk using Read/Grep/Glob tools, run the test suite (if one exists), and fix any issues found.\n\n## Required Checks\n\n### 1. Import/Export Verification\nFor every source and test file in the implementation, verify that all imports reference actual exports:\n- Read each file and identify all imports\n- Read the corresponding source modules and verify those exports exist\n- Common issues: tests importing non-existent functions, selectors, types, or constants\n- Fix: Add missing exports to source files, or correct invalid imports in tests\n\n### 2. Test Isolation\nVerify each test file properly isolates state between test cases:\n- State stores (Redux, Zustand, MobX, etc.): Each test must create a fresh store or reset state in beforeEach/afterEach\n- Mocks: Cleared between tests (jest.clearAllMocks, sinon.restore, vi.restoreAllMocks, etc.)\n- Singletons: Reset between tests if tested\n- Global/module-level state: No test should depend on side effects from previous tests\n- Database/API mocks: Mock responses scoped per-test, not shared\n- Fix: Add proper setup/teardown hooks to test files\n\n### 3. Implementation Completeness\nCross-reference the task acceptance criteria with actual code:\n- Verify functions and methods have real logic, not empty shells or stubs\n- Check that event listeners, callbacks, and subscriptions are actually wired up and functional\n- Ensure all integration points are connected, not just type-correct\n- Verify module wiring: if module A should respond to events from module B, trace the actual connection\n- Fix: Complete any incomplete implementations\n\n### 4. Run Tests\nExecute the project test suite and analyze results:\n- Use the detected test command for this project type\n- If tests fail, analyze failure output to identify root causes (not just symptoms)\n- Fix the root causes in source or test files\n- Re-run tests to confirm fixes work\n- Repeat fix-and-rerun up to 2 cycles\n\n**IMPORTANT: Greenfield / New Projects Without Test Infrastructure**\nIf this is a brand-new project being created from scratch (greenfield) and there is NO existing test framework, test runner, or test configuration:\n- Set `testsRun: false` and `testsPassed: false`\n- Set `noTestInfrastructure: true`\n- Set `allIssuesResolved: true` if the code review checks (import/export, completeness, isolation) all pass\n- In `testOutput`, explain that no test framework exists in the project\n- Do NOT waste retries trying to install a test framework just to pass validation\n- The implementation itself (created files, working code, proper structure) is what matters for greenfield tasks\n\nSigns that a project has no test infrastructure:\n- No test runner configured (no jest, vitest, mocha, pytest, etc. in dependencies)\n- No test scripts in package.json (no \"test\" script, or test script is the default npm placeholder)\n- No test configuration files (no jest.config.*, vitest.config.*, etc.)\n- No existing test files in the project\n- Project was just created by the engineer in this task\n\n### 5. Distinguish Pre-Existing Failures from Task-Related Failures\nWhen analyzing test results, carefully distinguish between:\n- **Task-related failures**: Tests that fail because of code YOU changed or created in this task. These MUST be fixed.\n- **Pre-existing failures**: Tests that were already failing BEFORE your changes \u2014 e.g., dependency version mismatches, flaky infrastructure tests, tests for features not yet implemented by other tasks, environment-specific issues. These are NOT your responsibility to fix.\n\nTo determine if a failure is pre-existing:\n- Check if the failing test file is unrelated to any files you modified\n- Check if the error is about missing dependencies, version mismatches, or environment issues that exist independently of your changes\n- If ALL test failures are pre-existing and unrelated to your task, set `testsPassed: true` (your task's tests pass) and `preExistingFailuresOnly: true`\n- If ANY failure is related to your task changes, set `testsPassed: false` and `preExistingFailuresOnly: false`\n\nTask: {{taskDescription}}\nImplementation: {{implementation}}\n\n{{taskComments}}\n\nFix all task-related issues you find. Report what was found and fixed. For pre-existing failures, document them in testOutput but do not waste time trying to fix them.",
|
|
880
|
+
"contextKeys": [
|
|
881
|
+
"implementation",
|
|
882
|
+
"taskDescription",
|
|
883
|
+
"codebaseContext",
|
|
884
|
+
"projectInfo",
|
|
885
|
+
"taskComments"
|
|
886
|
+
],
|
|
413
887
|
"subagent": "engineer",
|
|
414
888
|
"maxTurns": 200,
|
|
415
889
|
"outputSchema": {
|
|
@@ -417,35 +891,111 @@
|
|
|
417
891
|
"properties": {
|
|
418
892
|
"importExportIssues": {
|
|
419
893
|
"type": "array",
|
|
420
|
-
"items": {
|
|
894
|
+
"items": {
|
|
895
|
+
"type": "string"
|
|
896
|
+
},
|
|
421
897
|
"description": "Import/export issues found and fixed"
|
|
422
898
|
},
|
|
423
899
|
"testIsolationIssues": {
|
|
424
900
|
"type": "array",
|
|
425
|
-
"items": {
|
|
901
|
+
"items": {
|
|
902
|
+
"type": "string"
|
|
903
|
+
},
|
|
426
904
|
"description": "Test isolation issues found and fixed"
|
|
427
905
|
},
|
|
428
906
|
"completenessIssues": {
|
|
429
907
|
"type": "array",
|
|
430
|
-
"items": {
|
|
908
|
+
"items": {
|
|
909
|
+
"type": "string"
|
|
910
|
+
},
|
|
431
911
|
"description": "Implementation completeness issues found and fixed"
|
|
432
912
|
},
|
|
433
|
-
"testsRun": {
|
|
434
|
-
|
|
435
|
-
|
|
913
|
+
"testsRun": {
|
|
914
|
+
"type": "boolean",
|
|
915
|
+
"description": "Whether tests were executed"
|
|
916
|
+
},
|
|
917
|
+
"testsPassed": {
|
|
918
|
+
"type": "boolean",
|
|
919
|
+
"description": "Whether all tests passed after fixes"
|
|
920
|
+
},
|
|
921
|
+
"testOutput": {
|
|
922
|
+
"type": "string",
|
|
923
|
+
"description": "Summary of final test run output including any error messages. Always provide this even if tests were not run - describe what prevented them from running."
|
|
924
|
+
},
|
|
436
925
|
"filesModified": {
|
|
437
926
|
"type": "array",
|
|
438
|
-
"items": {
|
|
927
|
+
"items": {
|
|
928
|
+
"type": "string"
|
|
929
|
+
},
|
|
439
930
|
"description": "Files modified during validation"
|
|
440
931
|
},
|
|
441
|
-
"allIssuesResolved": {
|
|
442
|
-
|
|
443
|
-
|
|
932
|
+
"allIssuesResolved": {
|
|
933
|
+
"type": "boolean",
|
|
934
|
+
"description": "Whether all found issues were successfully resolved"
|
|
935
|
+
},
|
|
936
|
+
"preExistingFailuresOnly": {
|
|
937
|
+
"type": "boolean",
|
|
938
|
+
"description": "Set to true ONLY when testsPassed is false AND every single test failure is a pre-existing issue completely unrelated to this task's changes (e.g., dependency version mismatches, environment issues, tests for other features). If ANY failure is related to your task changes, this MUST be false. Defaults to false.",
|
|
939
|
+
"default": false
|
|
940
|
+
},
|
|
941
|
+
"noTestInfrastructure": {
|
|
942
|
+
"type": "boolean",
|
|
943
|
+
"description": "Set to true when the project has NO test framework, test runner, or test configuration installed. This is expected for greenfield projects created from scratch. When true, testsRun should be false and allIssuesResolved can be true if code review checks pass. Defaults to false.",
|
|
944
|
+
"default": false
|
|
945
|
+
}
|
|
444
946
|
},
|
|
445
|
-
"required": [
|
|
947
|
+
"required": [
|
|
948
|
+
"testsRun",
|
|
949
|
+
"testsPassed",
|
|
950
|
+
"testOutput",
|
|
951
|
+
"allIssuesResolved"
|
|
952
|
+
]
|
|
446
953
|
},
|
|
447
954
|
"outputKey": "preCommitValidation",
|
|
448
|
-
"temperature": 0.3
|
|
955
|
+
"temperature": 0.3,
|
|
956
|
+
"allowedTools": [
|
|
957
|
+
"read",
|
|
958
|
+
"edit",
|
|
959
|
+
"write",
|
|
960
|
+
"bash",
|
|
961
|
+
"glob",
|
|
962
|
+
"grep",
|
|
963
|
+
"webfetch",
|
|
964
|
+
"websearch",
|
|
965
|
+
"question",
|
|
966
|
+
"skill",
|
|
967
|
+
"plan_enter",
|
|
968
|
+
"plan_exit",
|
|
969
|
+
"mcp__agentloop__get_task",
|
|
970
|
+
"mcp__agentloop__list_tasks",
|
|
971
|
+
"mcp__agentloop__send_agent_message",
|
|
972
|
+
"mcp__agentloop__receive_messages",
|
|
973
|
+
"mcp__agentloop__broadcast_message",
|
|
974
|
+
"mcp__git-worktree-toolbox__listProjects",
|
|
975
|
+
"mcp__git-worktree-toolbox__worktreeChanges",
|
|
976
|
+
"mcp__git-worktree-toolbox__generateMrLink",
|
|
977
|
+
"mcp__git-worktree-toolbox__mergeRemoteWorktreeChangesIntoLocal",
|
|
978
|
+
"mcp__agentloop-memory__index",
|
|
979
|
+
"mcp__agentloop-memory__semantic_search",
|
|
980
|
+
"mcp__agentloop-memory__find_similar_code",
|
|
981
|
+
"mcp__agentloop-memory__query",
|
|
982
|
+
"mcp__agentloop-memory__list_file_entities",
|
|
983
|
+
"mcp__agentloop-memory__list_entity_relationships",
|
|
984
|
+
"mcp__agentloop-memory__find_related_concepts",
|
|
985
|
+
"mcp__agentloop-memory__analyze_code_impact",
|
|
986
|
+
"mcp__agentloop-memory__analyze_hotspots",
|
|
987
|
+
"mcp__agentloop-memory__detect_code_clones",
|
|
988
|
+
"mcp__agentloop-memory__jscpd_detect_clones",
|
|
989
|
+
"mcp__agentloop-memory__suggest_refactoring",
|
|
990
|
+
"mcp__agentloop-memory__cross_language_search",
|
|
991
|
+
"mcp__agentloop-memory__get_graph_stats",
|
|
992
|
+
"mcp__agentloop-memory__get_graph_health",
|
|
993
|
+
"mcp__agentloop-memory__get_metrics",
|
|
994
|
+
"mcp__agentloop-memory__get_version",
|
|
995
|
+
"mcp__agentloop-memory__clean_index",
|
|
996
|
+
"mcp__agentloop-memory__reset_graph",
|
|
997
|
+
"mcp__agentloop-memory__get_graph"
|
|
998
|
+
]
|
|
449
999
|
},
|
|
450
1000
|
{
|
|
451
1001
|
"type": "action",
|
|
@@ -462,17 +1012,17 @@
|
|
|
462
1012
|
},
|
|
463
1013
|
{
|
|
464
1014
|
"type": "sequence",
|
|
465
|
-
"comment": "Escalation fallback - all 3 retry attempts failed validation.
|
|
1015
|
+
"comment": "Escalation fallback - all 3 retry attempts failed validation. Record the failure, return the task for a fresh engineer retry, and continue to next task.",
|
|
466
1016
|
"children": [
|
|
467
1017
|
{
|
|
468
1018
|
"type": "action",
|
|
469
1019
|
"call": "EscalateValidationFailure",
|
|
470
|
-
"comment": "Add detailed validation failure
|
|
1020
|
+
"comment": "Add detailed validation failure context and prepare a fresh engineer retry"
|
|
471
1021
|
},
|
|
472
1022
|
{
|
|
473
1023
|
"type": "action",
|
|
474
1024
|
"call": "ReportTriggerFail",
|
|
475
|
-
"comment": "Report trigger fail after validation exhaustion -
|
|
1025
|
+
"comment": "Report trigger fail after validation exhaustion - the task will be returned for a fresh engineer retry"
|
|
476
1026
|
},
|
|
477
1027
|
{
|
|
478
1028
|
"type": "action",
|
|
@@ -526,17 +1076,35 @@
|
|
|
526
1076
|
"type": "llm-action",
|
|
527
1077
|
"name": "PrepareCommit",
|
|
528
1078
|
"prompt": "Prepare a commit message for the changes.\n\nImplementation: {{implementation}}\nTask: {{taskDescription}}\n\n{{taskComments}}\n\nWrite a clear, concise commit message following conventional commits format. If this was a re-work due to QA feedback, mention that in the commit message.",
|
|
529
|
-
"contextKeys": [
|
|
1079
|
+
"contextKeys": [
|
|
1080
|
+
"implementation",
|
|
1081
|
+
"taskDescription",
|
|
1082
|
+
"taskAnalysis",
|
|
1083
|
+
"taskComments"
|
|
1084
|
+
],
|
|
530
1085
|
"outputSchema": {
|
|
531
1086
|
"type": "object",
|
|
532
1087
|
"properties": {
|
|
533
|
-
"commitMessage": {
|
|
534
|
-
|
|
1088
|
+
"commitMessage": {
|
|
1089
|
+
"type": "string",
|
|
1090
|
+
"description": "The commit message"
|
|
1091
|
+
},
|
|
1092
|
+
"files": {
|
|
1093
|
+
"type": "array",
|
|
1094
|
+
"items": {
|
|
1095
|
+
"type": "string"
|
|
1096
|
+
},
|
|
1097
|
+
"description": "Files to be committed"
|
|
1098
|
+
}
|
|
535
1099
|
},
|
|
536
|
-
"required": [
|
|
1100
|
+
"required": [
|
|
1101
|
+
"commitMessage",
|
|
1102
|
+
"files"
|
|
1103
|
+
]
|
|
537
1104
|
},
|
|
538
1105
|
"outputKey": "commitInfo",
|
|
539
|
-
"temperature": 0.3
|
|
1106
|
+
"temperature": 0.3,
|
|
1107
|
+
"allowedTools": []
|
|
540
1108
|
},
|
|
541
1109
|
{
|
|
542
1110
|
"type": "action",
|