@trygentic/agentloop 0.17.0-alpha.11 → 0.18.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
|
@@ -20,71 +20,218 @@
|
|
|
20
20
|
"comment": "Load task details if a real DB task was assigned, or use the request data already on the blackboard (for both agent messages and direct requests)"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"type": "
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"properties": {
|
|
35
|
-
"subprojectId": {
|
|
36
|
-
"type": "number",
|
|
37
|
-
"description": "ID of the created or reused subproject"
|
|
38
|
-
},
|
|
39
|
-
"subprojectName": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Name of the subproject"
|
|
42
|
-
},
|
|
43
|
-
"tasksCreated": {
|
|
44
|
-
"type": "number",
|
|
45
|
-
"description": "Number of tasks created"
|
|
46
|
-
},
|
|
47
|
-
"taskIds": {
|
|
48
|
-
"type": "array",
|
|
49
|
-
"items": {
|
|
50
|
-
"type": "number"
|
|
23
|
+
"type": "selector",
|
|
24
|
+
"comment": "Route based on message type: pre-existing bug escalation, existing subproject update, or normal task planning",
|
|
25
|
+
"children": [
|
|
26
|
+
{
|
|
27
|
+
"type": "sequence",
|
|
28
|
+
"comment": "Handle pre-existing bug escalation from QA agent",
|
|
29
|
+
"children": [
|
|
30
|
+
{
|
|
31
|
+
"type": "condition",
|
|
32
|
+
"call": "IsPreExistingBugEscalation",
|
|
33
|
+
"comment": "Check if this is a pre-existing bug escalation message from QA"
|
|
51
34
|
},
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
35
|
+
{
|
|
36
|
+
"type": "llm-action",
|
|
37
|
+
"name": "HandlePreExistingBugEscalation",
|
|
38
|
+
"allowedTools": [
|
|
39
|
+
"mcp__agentloop__list_subprojects",
|
|
40
|
+
"mcp__agentloop__list_tasks",
|
|
41
|
+
"mcp__agentloop__get_task",
|
|
42
|
+
"mcp__agentloop__create_task",
|
|
43
|
+
"mcp__agentloop__add_task_dependency",
|
|
44
|
+
"mcp__agentloop__pause_subproject",
|
|
45
|
+
"mcp__agentloop__resume_subproject",
|
|
46
|
+
"mcp__agentloop__reorganize_dag",
|
|
47
|
+
"mcp__agentloop__validate_dag",
|
|
48
|
+
"mcp__agentloop__send_agent_message"
|
|
49
|
+
],
|
|
50
|
+
"prompt": "You are handling a pre-existing bug escalation from QA testing.\n\n## Bug Details\nTitle: {{taskTitle}}\nDetails: {{taskDescription}}\n\n## What Happened\nA QA agent found that testing of an unrelated task is completely blocked by a pre-existing bug.\nThe bug is NOT related to the task's changes - it is a pre-existing issue in the codebase.\n\n## Your Workflow\n\n### Turn 1 - Gather Context (parallel reads)\nCall BOTH tools in a SINGLE response:\n- `mcp__agentloop__list_subprojects` - find the subproject for the blocked task\n- `mcp__agentloop__list_tasks` with `limit: 100` - check for existing tasks that might already address this bug\n\n### Turn 2 - Pause Subproject\nCall `mcp__agentloop__pause_subproject` with:\n- subprojectId: the blocked task's subproject ID (from Turn 1)\n- reason: \"Reorganizing DAG for pre-existing bug fix\"\n- timeoutSeconds: 120\n\nThis prevents the orchestrator from picking up tasks that could conflict with the DAG reorganization.\n\n### Turn 3 - Check for Existing Fix Task\nIf there is already a task to fix this bug, just add a dependency and skip to Turn 5.\nOtherwise, proceed to Turn 4.\n\n### Turn 4 - Create Fix Task\nCall `mcp__agentloop__create_task` with:\n- title: \"Fix pre-existing bug: [brief description]\"\n- description: Include the bug file, error message, and context from the escalation\n- priority: \"high\" (blocking other tasks)\n- assigned_agent: \"engineer\"\n- subprojectId: same as the blocked task's subproject\n- tags: \"bug-fix,pre-existing,blocking\"\n\nRecord the returned task ID.\n\n### Turn 5 - Add Dependency and Reorganize DAG\nCall these in a SINGLE response:\n- `mcp__agentloop__add_task_dependency` - make the blocked task depend on the fix task\n (dependentTaskId = blocked task ID, prerequisiteTaskId = new fix task ID)\n- `mcp__agentloop__update_task_status` - move the blocked task to 'todo' if it is not already\n- `mcp__agentloop__reorganize_dag` - recalculate execution order\n\n### Turn 6 - Resume Subproject\nALWAYS call `mcp__agentloop__resume_subproject` with the subprojectId, even if previous steps failed.\nFailing to resume will leave the subproject permanently paused and block all future task scheduling.\n\n### Turn 7 - Notify Merge Resolver\nSend a coordination message to the merge-resolver:\n- `mcp__agentloop__send_agent_message` with to: \"merge-resolver\", type: \"coordination\"\n- content: { event: \"prerequisite_fix_created\", fixTaskId, blockedTaskId, bugDescription }\n\n### Turn 8 - Validate\nCall `mcp__agentloop__validate_dag` to ensure no cycles were introduced.\n\nProvide a summary when done.",
|
|
51
|
+
"contextKeys": [
|
|
52
|
+
"taskTitle",
|
|
53
|
+
"taskDescription"
|
|
54
|
+
],
|
|
55
|
+
"subagent": "product-manager",
|
|
56
|
+
"outputSchema": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"fixTaskId": {
|
|
60
|
+
"type": "number",
|
|
61
|
+
"description": "ID of the created or found fix task"
|
|
62
|
+
},
|
|
63
|
+
"blockedTaskId": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"description": "ID of the blocked task that depends on the fix"
|
|
66
|
+
},
|
|
67
|
+
"existingFixFound": {
|
|
68
|
+
"type": "boolean",
|
|
69
|
+
"description": "Whether an existing fix task was found (true) or a new one was created (false)"
|
|
70
|
+
},
|
|
71
|
+
"dependencyAdded": {
|
|
72
|
+
"type": "boolean",
|
|
73
|
+
"description": "Whether the dependency was successfully added"
|
|
74
|
+
},
|
|
75
|
+
"dagValidated": {
|
|
76
|
+
"type": "boolean",
|
|
77
|
+
"description": "Whether DAG validation passed after changes"
|
|
78
|
+
},
|
|
79
|
+
"tasksCreated": {
|
|
80
|
+
"type": "number",
|
|
81
|
+
"description": "Number of tasks created (0 if existing fix found, 1 if new fix created)"
|
|
82
|
+
},
|
|
83
|
+
"summary": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"description": "Summary of actions taken to handle the pre-existing bug"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": [
|
|
89
|
+
"tasksCreated",
|
|
90
|
+
"summary",
|
|
91
|
+
"dagValidated"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"outputKey": "pmResult",
|
|
95
|
+
"temperature": 0.3
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"type": "sequence",
|
|
101
|
+
"comment": "Handle update/modification of existing subproject tasks",
|
|
102
|
+
"children": [
|
|
103
|
+
{
|
|
104
|
+
"type": "condition",
|
|
105
|
+
"call": "IsExistingSubprojectUpdate",
|
|
106
|
+
"comment": "Check if this message targets an existing subproject for modification"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "llm-action",
|
|
110
|
+
"name": "UpdateExistingSubprojectTasks",
|
|
111
|
+
"allowedTools": [
|
|
112
|
+
"mcp__agentloop__get_subproject",
|
|
113
|
+
"mcp__agentloop__list_subprojects",
|
|
114
|
+
"mcp__agentloop__list_tasks",
|
|
115
|
+
"mcp__agentloop__get_task",
|
|
116
|
+
"mcp__agentloop__update_task",
|
|
117
|
+
"mcp__agentloop__create_task",
|
|
118
|
+
"mcp__agentloop__add_task_dependency",
|
|
119
|
+
"mcp__agentloop__pause_subproject",
|
|
120
|
+
"mcp__agentloop__resume_subproject",
|
|
121
|
+
"mcp__agentloop__reorganize_dag",
|
|
122
|
+
"mcp__agentloop__validate_dag",
|
|
123
|
+
"mcp__agentloop__visualize_dag",
|
|
124
|
+
"mcp__agentloop__send_agent_message"
|
|
125
|
+
],
|
|
126
|
+
"prompt": "You are updating tasks in an existing subproject based on a user request.\n\n## Request\nTitle: {{taskTitle}}\nDescription: {{taskDescription}}\n\n## CRITICAL: Minimize Tool Call Turns\nBatch independent tool calls in the SAME response.\n\n## Your Workflow\n\n### Turn 1 — Gather Context (parallel reads)\nCall ALL of these in a SINGLE response:\n- `mcp__agentloop__get_subproject` with the subprojectId from the message\n- `mcp__agentloop__list_tasks` with `limit: 100` to see all tasks\n- `mcp__agentloop__list_subprojects` for full context\n\n### Turn 2 — Analyze What Needs to Change\nCompare the user's request against existing tasks in the subproject.\nDetermine:\n- Which existing tasks need modification (title, description, priority changes)\n- Which new tasks need to be created\n- Which existing tasks are now unnecessary and should be deleted/blocked\n- Which dependencies need to change\n\n### Turn 3 — Pause if Active\nIf the subproject has ANY tasks in 'in-progress' or 'done' status:\n- Call `mcp__agentloop__pause_subproject` with reason: \"Updating subproject tasks\" and timeoutSeconds: 120\n\n### Turn 4 — Apply Changes (SINGLE response)\nBatch ALL changes in a SINGLE response:\n- `mcp__agentloop__update_task` for each task that needs modification\n- `mcp__agentloop__create_task` for new tasks (with subprojectId)\n- `mcp__agentloop__update_task_status` to block tasks that are no longer needed\n- `mcp__agentloop__add_task_dependency` for new dependencies\n\n### Turn 5 — Reorganize and Validate (parallel)\nCall in a SINGLE response:\n- `mcp__agentloop__reorganize_dag`\n- `mcp__agentloop__validate_dag`\n- `mcp__agentloop__visualize_dag`\n\n### Turn 6 — Resume and Notify\nCall in a SINGLE response:\n- `mcp__agentloop__resume_subproject` (if paused)\n- `mcp__agentloop__send_agent_message` to merge-resolver if the subproject is active\n\nProvide a summary of all changes made.",
|
|
127
|
+
"contextKeys": ["taskTitle", "taskDescription", "taskComments"],
|
|
128
|
+
"subagent": "product-manager",
|
|
129
|
+
"outputSchema": {
|
|
130
|
+
"type": "object",
|
|
131
|
+
"properties": {
|
|
132
|
+
"subprojectId": { "type": "number" },
|
|
133
|
+
"tasksModified": { "type": "number", "description": "Number of existing tasks modified" },
|
|
134
|
+
"tasksCreated": { "type": "number", "description": "Number of new tasks created" },
|
|
135
|
+
"tasksRemoved": { "type": "number", "description": "Number of tasks blocked/removed" },
|
|
136
|
+
"dependenciesChanged": { "type": "number", "description": "Number of dependency changes" },
|
|
137
|
+
"dagValidated": { "type": "boolean" },
|
|
138
|
+
"summary": { "type": "string" }
|
|
139
|
+
},
|
|
140
|
+
"required": ["summary", "dagValidated"]
|
|
141
|
+
},
|
|
142
|
+
"outputKey": "pmResult",
|
|
143
|
+
"temperature": 0.3
|
|
144
|
+
}
|
|
145
|
+
]
|
|
79
146
|
},
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
147
|
+
{
|
|
148
|
+
"type": "llm-action",
|
|
149
|
+
"name": "PlanAndCreateTasks",
|
|
150
|
+
"comment": "Normal task planning - break down feature requests into tasks with DAG dependencies",
|
|
151
|
+
"allowedTools": [
|
|
152
|
+
"mcp__agentloop__list_subprojects",
|
|
153
|
+
"mcp__agentloop__get_subproject",
|
|
154
|
+
"mcp__agentloop__list_tasks",
|
|
155
|
+
"mcp__agentloop__get_task",
|
|
156
|
+
"mcp__agentloop__create_subproject",
|
|
157
|
+
"mcp__agentloop__create_task",
|
|
158
|
+
"mcp__agentloop__add_task_dependency",
|
|
159
|
+
"mcp__agentloop__pause_subproject",
|
|
160
|
+
"mcp__agentloop__resume_subproject",
|
|
161
|
+
"mcp__agentloop__validate_dag",
|
|
162
|
+
"mcp__agentloop__visualize_dag",
|
|
163
|
+
"mcp__agentloop__reorganize_dag",
|
|
164
|
+
"mcp__agentloop__send_agent_message"
|
|
165
|
+
],
|
|
166
|
+
"prompt": "You are a product manager agent. Your job is to break down a high-level feature request into actionable AGILE tasks with proper DAG dependencies.\n\n## Feature Request\nTitle: {{taskTitle}}\nDescription: {{taskDescription}}\n\n## CRITICAL: Maximize Parallel Tool Calls\nYou MUST minimize the number of LLM turns by batching independent tool calls into the SAME response.\nEvery extra turn adds ~5-10 seconds of latency. Batch aggressively.\n\n## Your Workflow\n\n### Turn 1 \u2014 Gather Context (parallel reads)\nCall BOTH of these tools in a SINGLE response:\n- `mcp__agentloop__list_subprojects` \u2014 check for existing subprojects\n- `mcp__agentloop__list_tasks` with `limit: 100` \u2014 check existing tasks (omit status to get all)\n\n### Turn 1.5 \u2014 Analyze Existing Subprojects (CRITICAL)\nReview the results from Turn 1. For each existing subproject:\n- Check its name and description against the new work request\n- If tasks already cover this work, report \"Work already planned\" and STOP\n- If the subproject is RELATED to the new work:\n - Reuse this subproject's ID for new tasks (do NOT create a new subproject)\n - When adding dependencies, include dependencies on EXISTING tasks in the subproject if appropriate\n - After adding all tasks and dependencies, call `mcp__agentloop__reorganize_dag`\n\n### Turn 2 \u2014 Create Subproject (if needed)\nIf the delegation message included a subprojectId, reuse it. Otherwise call `mcp__agentloop__create_subproject`.\nIf a subproject already exists for this work (determined in Turn 1.5), skip creation and reuse its ID.\nSave the subprojectId for ALL subsequent create_task calls.\nIf tasks already cover this work, report that instead of creating duplicates and stop.\n\n### Turn 3 \u2014 Analyze & Create ALL Tasks (SINGLE response)\nDetermine task count based on ACTUAL complexity:\n- Simple (1-5 tasks): \"add logout button\" -> 1-2 tasks\n- Medium (5-15 tasks): \"add user authentication\" -> 8-12 tasks\n- Large (20-30 tasks): \"build payment system\" -> 25-30 tasks\n\nDO NOT inflate task counts artificially.\n\n**IMPORTANT: Call ALL `mcp__agentloop__create_task` tools in a SINGLE response as parallel tool_use blocks.**\nDo NOT create tasks one at a time across multiple turns. Include all of them in one message.\nEach call needs: title, description, priority, tags, sequence, subprojectId.\nRecord all returned task IDs from the results.\n\n### Turn 4 \u2014 Add ALL Dependencies (SINGLE response)\n**IMPORTANT: Call ALL `mcp__agentloop__add_task_dependency` tools in a SINGLE response as parallel tool_use blocks.**\nDo NOT add dependencies one at a time across multiple turns.\nUse the task IDs returned from Turn 3. Maximize parallelism \u2014 engineers work in isolated worktrees.\n\n### Turn 4.5 \u2014 Pause if Active Subproject\nIf you are adding tasks to an existing subproject that has ANY tasks in 'in-progress' or 'done' status:\n1. Call `mcp__agentloop__pause_subproject` with reason: \"Adding new tasks and reorganizing DAG\" and timeoutSeconds: 120\n\nIf the subproject has NO active tasks (all todo or none started), skip pause/resume.\n\n### Turn 5 \u2014 Validate and Reorganize\nCall in a SINGLE response:\n- `mcp__agentloop__validate_dag`\n- `mcp__agentloop__visualize_dag`\n- `mcp__agentloop__reorganize_dag` (MANDATORY if tasks were added to an existing subproject)\n\n### Turn 5.5 \u2014 Resume Subproject & Notify Merge Resolver (if paused in Turn 4.5)\nIf you paused the subproject in Turn 4.5, you MUST resume it now.\nCall in a SINGLE response:\n- `mcp__agentloop__resume_subproject` - ALWAYS resume, even if reorganization failed\n- `mcp__agentloop__send_agent_message` with:\n - to: \"merge-resolver\"\n - type: \"coordination\"\n - content: { event: \"subproject_tasks_added\", subprojectId: <id>, newTaskIds: [<ids>], message: \"New tasks added to active subproject. Merge ordering may need adjustment.\" }\n\n**CRITICAL: You MUST call `mcp__agentloop__resume_subproject` if you called `pause_subproject` earlier. Failing to resume will leave the subproject permanently paused.**\n\nIf the subproject was NOT paused (not active), just notify the merge-resolver:\nIf you added tasks to an existing subproject that has any tasks in 'in-progress' or 'done' status:\nCall `mcp__agentloop__send_agent_message` with:\n- to: \"merge-resolver\"\n- type: \"coordination\"\n- content: { event: \"subproject_tasks_added\", subprojectId: <id>, newTaskIds: [<ids>], message: \"New tasks added to active subproject. Merge ordering may need adjustment.\" }\n\n## Critical Rules\n- You are a PLANNER, not an implementer. NEVER write code or create files.\n- ALWAYS create tasks using mcp__agentloop__create_task\n- ALWAYS build DAG dependencies using mcp__agentloop__add_task_dependency\n- ALWAYS include subprojectId in every create_task call\n- Engineers work in project root (.) - NEVER include commands that create subdirectories\n- Explicitly specify tech stack in task descriptions\n- NEVER make sequential tool calls when they can be parallel. This is a performance-critical agent.\n- When adding to an existing subproject, call reorganize_dag AFTER adding tasks and dependencies.\n- Notify merge-resolver when modifying active subprojects (those with in-progress or done tasks).\n\nProvide a summary when done.",
|
|
167
|
+
"contextKeys": [
|
|
168
|
+
"taskTitle",
|
|
169
|
+
"taskDescription",
|
|
170
|
+
"taskComments"
|
|
171
|
+
],
|
|
172
|
+
"subagent": "product-manager",
|
|
173
|
+
"outputSchema": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"subprojectId": {
|
|
177
|
+
"type": "number",
|
|
178
|
+
"description": "ID of the created or reused subproject"
|
|
179
|
+
},
|
|
180
|
+
"subprojectName": {
|
|
181
|
+
"type": "string",
|
|
182
|
+
"description": "Name of the subproject"
|
|
183
|
+
},
|
|
184
|
+
"tasksCreated": {
|
|
185
|
+
"type": "number",
|
|
186
|
+
"description": "Number of tasks created"
|
|
187
|
+
},
|
|
188
|
+
"taskIds": {
|
|
189
|
+
"type": "array",
|
|
190
|
+
"items": {
|
|
191
|
+
"type": "number"
|
|
192
|
+
},
|
|
193
|
+
"description": "IDs of created tasks"
|
|
194
|
+
},
|
|
195
|
+
"dependenciesAdded": {
|
|
196
|
+
"type": "number",
|
|
197
|
+
"description": "Number of DAG dependencies added"
|
|
198
|
+
},
|
|
199
|
+
"maxParallelism": {
|
|
200
|
+
"type": "number",
|
|
201
|
+
"description": "Maximum parallelism achieved in the DAG"
|
|
202
|
+
},
|
|
203
|
+
"dagValidated": {
|
|
204
|
+
"type": "boolean",
|
|
205
|
+
"description": "Whether DAG validation passed"
|
|
206
|
+
},
|
|
207
|
+
"summary": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"description": "Summary of work done"
|
|
210
|
+
},
|
|
211
|
+
"complexityLevel": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"enum": [
|
|
214
|
+
"simple",
|
|
215
|
+
"medium",
|
|
216
|
+
"large"
|
|
217
|
+
],
|
|
218
|
+
"description": "Assessed complexity level"
|
|
219
|
+
},
|
|
220
|
+
"addedToExistingSubproject": {
|
|
221
|
+
"type": "boolean",
|
|
222
|
+
"description": "Whether tasks were added to an existing subproject vs a new one"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
"required": [
|
|
226
|
+
"tasksCreated",
|
|
227
|
+
"summary",
|
|
228
|
+
"dagValidated"
|
|
229
|
+
]
|
|
230
|
+
},
|
|
231
|
+
"outputKey": "pmResult",
|
|
232
|
+
"temperature": 0.3
|
|
233
|
+
}
|
|
234
|
+
]
|
|
88
235
|
},
|
|
89
236
|
{
|
|
90
237
|
"type": "action",
|
|
@@ -15,9 +15,9 @@ tools:
|
|
|
15
15
|
- question
|
|
16
16
|
# MCP tools - agentloop
|
|
17
17
|
- mcp__agentloop__create_task
|
|
18
|
+
- mcp__agentloop__update_task
|
|
18
19
|
- mcp__agentloop__update_task_status
|
|
19
20
|
- mcp__agentloop__report_trigger_result
|
|
20
|
-
- mcp__agentloop__report_trigger_result
|
|
21
21
|
- mcp__agentloop__get_task
|
|
22
22
|
- mcp__agentloop__list_tasks
|
|
23
23
|
- mcp__agentloop__add_task_comment
|
|
@@ -25,10 +25,15 @@ tools:
|
|
|
25
25
|
- mcp__agentloop__get_parallel_tasks
|
|
26
26
|
- mcp__agentloop__visualize_dag
|
|
27
27
|
- mcp__agentloop__validate_dag
|
|
28
|
+
- mcp__agentloop__reorganize_dag
|
|
29
|
+
- mcp__agentloop__send_agent_message
|
|
28
30
|
- mcp__agentloop__create_subproject
|
|
29
31
|
- mcp__agentloop__list_subprojects
|
|
30
32
|
- mcp__agentloop__get_subproject
|
|
31
|
-
|
|
33
|
+
- mcp__agentloop__receive_messages
|
|
34
|
+
# MCP tools - agentloop subproject pause/resume
|
|
35
|
+
- mcp__agentloop__pause_subproject
|
|
36
|
+
- mcp__agentloop__resume_subproject
|
|
32
37
|
mcpServers:
|
|
33
38
|
agentloop:
|
|
34
39
|
# Internal MCP server - handled by the agent worker
|
|
@@ -104,6 +109,42 @@ mcp:
|
|
|
104
109
|
required: true
|
|
105
110
|
- name: get_subproject
|
|
106
111
|
instructions: Get subproject details including associated tasks and progress.
|
|
112
|
+
- name: reorganize_dag
|
|
113
|
+
instructions: |
|
|
114
|
+
Call AFTER adding tasks or dependencies to an existing subproject.
|
|
115
|
+
This recalculates sequence numbers based on the updated dependency graph.
|
|
116
|
+
MANDATORY when inserting tasks into an existing DAG.
|
|
117
|
+
required: true
|
|
118
|
+
- name: send_agent_message
|
|
119
|
+
instructions: |
|
|
120
|
+
Use to notify the merge-resolver agent when:
|
|
121
|
+
1. Tasks are added to an active subproject (the merge order may change)
|
|
122
|
+
2. Dependencies are modified in an active subproject
|
|
123
|
+
Send coordination messages with event type and relevant task/subproject IDs.
|
|
124
|
+
- name: update_task
|
|
125
|
+
instructions: |
|
|
126
|
+
Use to modify existing tasks when the user requests changes to planned work.
|
|
127
|
+
Can update: title, description, priority, assigned agent, tags, estimation hours.
|
|
128
|
+
Use when adding to or modifying an existing subproject's tasks.
|
|
129
|
+
ONLY modify tasks that need to change - don't touch tasks that are fine as-is.
|
|
130
|
+
- name: update_task_status
|
|
131
|
+
instructions: |
|
|
132
|
+
Use to move tasks back to 'todo' when reorganizing the DAG after
|
|
133
|
+
pre-existing bug fixes are created as prerequisites.
|
|
134
|
+
- name: receive_messages
|
|
135
|
+
instructions: |
|
|
136
|
+
Check for incoming agent messages. Used to receive coordination
|
|
137
|
+
messages from other agents, including pre-existing bug escalations
|
|
138
|
+
from QA agents that need fix tasks created.
|
|
139
|
+
- name: pause_subproject
|
|
140
|
+
instructions: |
|
|
141
|
+
Pause the subproject BEFORE reorganizing the DAG when adding prerequisite tasks.
|
|
142
|
+
Prevents race conditions where tasks are picked up before dependencies are established.
|
|
143
|
+
Use timeoutSeconds: 120 (2 minutes) for DAG reorganization.
|
|
144
|
+
- name: resume_subproject
|
|
145
|
+
instructions: |
|
|
146
|
+
Resume the subproject AFTER DAG reorganization is complete.
|
|
147
|
+
Always resume even if reorganization failed.
|
|
107
148
|
---
|
|
108
149
|
|
|
109
150
|
# Product Manager Agent
|
|
@@ -150,12 +191,21 @@ ALWAYS explicitly specify the technology stack in task descriptions:
|
|
|
150
191
|
|
|
151
192
|
## Workflow
|
|
152
193
|
|
|
153
|
-
0. **
|
|
154
|
-
|
|
194
|
+
0. **list_subprojects** + **list_tasks** - ALWAYS check BOTH before doing anything
|
|
195
|
+
- Analyze each existing subproject: What is it about? What tasks does it have? What status?
|
|
196
|
+
- Determine if the new work request relates to ANY existing subproject
|
|
197
|
+
|
|
198
|
+
0.5. **Route decision** - Based on analysis:
|
|
199
|
+
- If work fits an existing subproject, add tasks to THAT subproject (don't create a new one)
|
|
200
|
+
- If work is completely new, create a new subproject
|
|
201
|
+
- If work spans multiple subprojects, choose the most relevant one, or create a new one
|
|
202
|
+
|
|
203
|
+
1. **create_subproject** (if needed) - Only create if no existing subproject fits. Use `mcp__agentloop__create_subproject` with a descriptive name and summary.
|
|
155
204
|
2. **create_task** - Create appropriately-sized tasks (record IDs!). Assign all tasks to the subproject using the `subprojectId` parameter.
|
|
156
|
-
3. **add_task_dependency** - MANDATORY: Build DAG structure
|
|
157
|
-
4. **
|
|
158
|
-
5. **visualize_dag** -
|
|
205
|
+
3. **add_task_dependency** - MANDATORY: Build DAG structure. When adding to an existing subproject, include dependencies on existing tasks if appropriate.
|
|
206
|
+
4. **reorganize_dag** - MANDATORY if adding to an existing subproject. Recalculates sequence numbers.
|
|
207
|
+
5. **validate_dag** + **visualize_dag** - Verify no cycles and show execution levels.
|
|
208
|
+
6. **send_agent_message** - Notify merge-resolver if the subproject is active (has in-progress or done tasks).
|
|
159
209
|
|
|
160
210
|
## Subproject Management (MANDATORY)
|
|
161
211
|
|
|
@@ -200,6 +250,26 @@ Level 5: [255, 256] Validation, Tests
|
|
|
200
250
|
Max Parallelism: 3
|
|
201
251
|
```
|
|
202
252
|
|
|
253
|
+
## Pre-Existing Bug Escalation Handling
|
|
254
|
+
|
|
255
|
+
When a QA agent detects a pre-existing bug that blocks testing of an unrelated task, it sends a
|
|
256
|
+
`pre_existing_bug_escalation` coordination message to the product-manager. The PM behavior tree
|
|
257
|
+
automatically routes these messages to the `HandlePreExistingBugEscalation` handler.
|
|
258
|
+
|
|
259
|
+
**Workflow for pre-existing bug escalations:**
|
|
260
|
+
1. Check for existing tasks that might already fix this bug
|
|
261
|
+
2. If no existing fix task, create a high-priority bug-fix task assigned to an engineer
|
|
262
|
+
3. Add the fix task as a prerequisite of the blocked task (DAG dependency)
|
|
263
|
+
4. Reorganize the DAG to recalculate execution order
|
|
264
|
+
5. Notify the merge-resolver about the new prerequisite
|
|
265
|
+
6. Validate the DAG to ensure no cycles
|
|
266
|
+
|
|
267
|
+
**Key rules for bug-fix tasks:**
|
|
268
|
+
- Tag with `bug-fix,pre-existing,blocking`
|
|
269
|
+
- Set priority to `high` (they block other work)
|
|
270
|
+
- Place in the same subproject as the blocked task
|
|
271
|
+
- Always add as a prerequisite dependency, not just a sibling task
|
|
272
|
+
|
|
203
273
|
## Output Requirements
|
|
204
274
|
|
|
205
275
|
Include in summary:
|
|
@@ -139,7 +139,8 @@
|
|
|
139
139
|
]
|
|
140
140
|
},
|
|
141
141
|
"outputKey": "changeAnalysis",
|
|
142
|
-
"temperature": 0.3
|
|
142
|
+
"temperature": 0.3,
|
|
143
|
+
"allowedTools": []
|
|
143
144
|
},
|
|
144
145
|
{
|
|
145
146
|
"type": "action",
|
|
@@ -202,7 +203,8 @@
|
|
|
202
203
|
]
|
|
203
204
|
},
|
|
204
205
|
"outputKey": "testCommandInfo",
|
|
205
|
-
"temperature": 0.2
|
|
206
|
+
"temperature": 0.2,
|
|
207
|
+
"allowedTools": []
|
|
206
208
|
},
|
|
207
209
|
{
|
|
208
210
|
"type": "action",
|
|
@@ -325,7 +327,8 @@
|
|
|
325
327
|
]
|
|
326
328
|
},
|
|
327
329
|
"outputKey": "analyzedTestResults",
|
|
328
|
-
"temperature": 0.2
|
|
330
|
+
"temperature": 0.2,
|
|
331
|
+
"allowedTools": []
|
|
329
332
|
},
|
|
330
333
|
{
|
|
331
334
|
"type": "action",
|
|
@@ -420,7 +423,8 @@
|
|
|
420
423
|
"envRetryCount"
|
|
421
424
|
],
|
|
422
425
|
"confidenceThreshold": 0.8,
|
|
423
|
-
"fallbackValue": true
|
|
426
|
+
"fallbackValue": true,
|
|
427
|
+
"allowedTools": []
|
|
424
428
|
},
|
|
425
429
|
{
|
|
426
430
|
"type": "llm-action",
|
|
@@ -442,7 +446,8 @@
|
|
|
442
446
|
]
|
|
443
447
|
},
|
|
444
448
|
"outputKey": "approvalComment",
|
|
445
|
-
"temperature": 0.4
|
|
449
|
+
"temperature": 0.4,
|
|
450
|
+
"allowedTools": []
|
|
446
451
|
},
|
|
447
452
|
{
|
|
448
453
|
"type": "action",
|
|
@@ -493,6 +498,27 @@
|
|
|
493
498
|
}
|
|
494
499
|
]
|
|
495
500
|
},
|
|
501
|
+
{
|
|
502
|
+
"type": "sequence",
|
|
503
|
+
"comment": "ALL failures are pre-existing (unrelated to task) and block testing completely - escalate rather than bouncing to engineer",
|
|
504
|
+
"children": [
|
|
505
|
+
{
|
|
506
|
+
"type": "condition",
|
|
507
|
+
"call": "IsPreExistingBugBlocking",
|
|
508
|
+
"comment": "Check if ALL failures are pre-existing with 0 task-related failures"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
"type": "action",
|
|
512
|
+
"call": "EscalatePreExistingBug",
|
|
513
|
+
"comment": "Create bug-fix task, add DAG dependency blocking original task, notify PM and merge-resolver"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"type": "action",
|
|
517
|
+
"call": "ReportTriggerFail",
|
|
518
|
+
"comment": "Move task to todo - DAG dependency on the bug-fix task prevents orchestrator from re-assigning until fix is done. NOT a rejection of engineer's work."
|
|
519
|
+
}
|
|
520
|
+
]
|
|
521
|
+
},
|
|
496
522
|
{
|
|
497
523
|
"type": "sequence",
|
|
498
524
|
"comment": "Tests failed or did not execute - handle appropriately",
|
|
@@ -550,7 +576,8 @@
|
|
|
550
576
|
]
|
|
551
577
|
},
|
|
552
578
|
"outputKey": "rejectionDetails",
|
|
553
|
-
"temperature": 0.3
|
|
579
|
+
"temperature": 0.3,
|
|
580
|
+
"allowedTools": []
|
|
554
581
|
},
|
|
555
582
|
{
|
|
556
583
|
"type": "action",
|
|
@@ -615,7 +642,8 @@
|
|
|
615
642
|
]
|
|
616
643
|
},
|
|
617
644
|
"outputKey": "rejectionDetails",
|
|
618
|
-
"temperature": 0.3
|
|
645
|
+
"temperature": 0.3,
|
|
646
|
+
"allowedTools": []
|
|
619
647
|
},
|
|
620
648
|
{
|
|
621
649
|
"type": "action",
|
|
@@ -648,7 +676,8 @@
|
|
|
648
676
|
"taskDescription"
|
|
649
677
|
],
|
|
650
678
|
"confidenceThreshold": 0.7,
|
|
651
|
-
"fallbackValue": false
|
|
679
|
+
"fallbackValue": false,
|
|
680
|
+
"allowedTools": []
|
|
652
681
|
},
|
|
653
682
|
{
|
|
654
683
|
"type": "action",
|
|
@@ -749,7 +778,8 @@
|
|
|
749
778
|
]
|
|
750
779
|
},
|
|
751
780
|
"outputKey": "rejectionDetails",
|
|
752
|
-
"temperature": 0.3
|
|
781
|
+
"temperature": 0.3,
|
|
782
|
+
"allowedTools": []
|
|
753
783
|
},
|
|
754
784
|
{
|
|
755
785
|
"type": "action",
|
|
@@ -4,7 +4,7 @@ description: >-
|
|
|
4
4
|
QA automation engineer that runs existing test suites and validates code changes.
|
|
5
5
|
Use after code changes are completed and ready for verification.
|
|
6
6
|
Can communicate with engineers via messaging to clarify implementation details.
|
|
7
|
-
|
|
7
|
+
instanceCount: 5
|
|
8
8
|
mcpServers:
|
|
9
9
|
agentloop:
|
|
10
10
|
# Internal MCP server - handled by the agent worker
|
|
@@ -18,6 +18,7 @@ tools:
|
|
|
18
18
|
- question
|
|
19
19
|
# MCP tools - agentloop
|
|
20
20
|
- mcp__agentloop__create_task
|
|
21
|
+
- mcp__agentloop__add_task_dependency
|
|
21
22
|
- mcp__agentloop__report_trigger_result
|
|
22
23
|
- mcp__agentloop__report_trigger_result
|
|
23
24
|
- mcp__agentloop__get_task
|
|
@@ -181,9 +182,48 @@ Many projects have subdirectory structures where the main application and tests
|
|
|
181
182
|
|
|
182
183
|
**CRITICAL: Pre-existing failures do NOT block approval.** If 1288/1290 tests pass and the 2 failures are in modules the engineer did NOT touch, that is a PASS. Only reject if the engineer's specific changes caused new test failures.
|
|
183
184
|
|
|
185
|
+
## MANDATORY: Commit and Push ALL Changes Before Finishing (CRITICAL)
|
|
186
|
+
|
|
187
|
+
**You MUST commit and push ALL changes before reporting results. This is NON-NEGOTIABLE.**
|
|
188
|
+
|
|
189
|
+
Agents work in worktree branches. Any files left unstaged, uncommitted, or unpushed will be LOST when the worktree is cleaned up. This includes screenshots, test artifacts, log files, coverage reports, and any other files generated during testing.
|
|
190
|
+
|
|
191
|
+
**Before calling `add_task_comment` or `report_trigger_result`, you MUST execute these steps IN ORDER:**
|
|
192
|
+
|
|
193
|
+
### Step 1: Check for uncommitted changes
|
|
194
|
+
```bash
|
|
195
|
+
git status
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Step 2: Stage ALL changes (including untracked files)
|
|
199
|
+
```bash
|
|
200
|
+
git add -A
|
|
201
|
+
```
|
|
202
|
+
This stages everything: new files (screenshots, test artifacts), modified files, and deleted files. Do NOT cherry-pick files — use `git add -A` to capture everything.
|
|
203
|
+
|
|
204
|
+
### Step 3: Commit with a descriptive message
|
|
205
|
+
```bash
|
|
206
|
+
git commit -m "chore: add QA test artifacts and screenshots"
|
|
207
|
+
```
|
|
208
|
+
If there are no changes to commit, `git commit` will exit with a non-zero code — that is fine, it means everything was already committed. Continue to the next step.
|
|
209
|
+
|
|
210
|
+
### Step 4: Push to the remote branch
|
|
211
|
+
```bash
|
|
212
|
+
git push
|
|
213
|
+
```
|
|
214
|
+
If the branch has no upstream, use:
|
|
215
|
+
```bash
|
|
216
|
+
git push -u origin HEAD
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**EVERY time you finish work — whether the tests PASSED or FAILED — you MUST run all four steps above.** No exceptions. Even if you think there are no changes, run `git status` to verify. Test artifacts, screenshots, coverage files, and temporary outputs are commonly left behind and MUST be committed.
|
|
220
|
+
|
|
221
|
+
**If you skip this, your test evidence (screenshots, logs, artifacts) will be permanently lost.**
|
|
222
|
+
|
|
184
223
|
## Mandatory Workflow
|
|
185
224
|
|
|
186
|
-
1. `
|
|
187
|
-
2. `
|
|
225
|
+
1. **Commit and push all changes** (see section above — run `git status`, `git add -A`, `git commit`, `git push`)
|
|
226
|
+
2. `add_task_comment` - Document test results
|
|
227
|
+
3. `report_trigger_result` - Request final status
|
|
188
228
|
|
|
189
|
-
**DO NOT FINISH WITHOUT
|
|
229
|
+
**DO NOT FINISH WITHOUT COMPLETING ALL THREE STEPS. Skipping the commit/push step is a critical failure.**
|