@trygentic/agentloop 0.16.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/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 +70 -20
- package/templates/agents/chat/chat.md +36 -19
- package/templates/agents/engineer/engineer.bt.json +951 -346
- package/templates/agents/engineer/engineer.md +86 -33
- 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.bt.json +1 -0
- package/templates/agents/orchestrator/orchestrator.md +17 -92
- package/templates/agents/product-manager/product-manager.bt.json +215 -25
- package/templates/agents/product-manager/product-manager.md +86 -13
- package/templates/agents/qa-tester/qa-tester.bt.json +299 -88
- package/templates/agents/qa-tester/qa-tester.md +59 -12
- package/templates/agents/release/release.bt.json +219 -0
- package/templates/agents/release/release.md +164 -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/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
- 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
|
@@ -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
|
|
@@ -13,14 +13,14 @@ mcpServers:
|
|
|
13
13
|
command: npx
|
|
14
14
|
args: ["-y", "git-worktree-toolbox@latest"]
|
|
15
15
|
tools:
|
|
16
|
-
# Base
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
- ListMcpResourcesTool
|
|
20
|
-
- ReadMcpResourceTool
|
|
16
|
+
# Base OpenCode tools - QA testing role
|
|
17
|
+
- bash
|
|
18
|
+
- question
|
|
21
19
|
# MCP tools - agentloop
|
|
22
20
|
- mcp__agentloop__create_task
|
|
23
|
-
-
|
|
21
|
+
- mcp__agentloop__add_task_dependency
|
|
22
|
+
- mcp__agentloop__report_trigger_result
|
|
23
|
+
- mcp__agentloop__report_trigger_result
|
|
24
24
|
- mcp__agentloop__get_task
|
|
25
25
|
- mcp__agentloop__list_tasks
|
|
26
26
|
- mcp__agentloop__add_task_comment
|
|
@@ -48,13 +48,21 @@ mcp:
|
|
|
48
48
|
- Specific steps to reproduce failures
|
|
49
49
|
- Console errors or relevant output
|
|
50
50
|
required: true
|
|
51
|
-
- name:
|
|
51
|
+
- name: report_trigger_result
|
|
52
52
|
instructions: |
|
|
53
|
-
|
|
53
|
+
Use ONLY when running as a standalone agent (not column-triggered).
|
|
54
|
+
When running as a column trigger, use report_trigger_result instead.
|
|
55
|
+
Request based on results:
|
|
54
56
|
- "done": All tests pass, ready for production
|
|
55
57
|
- "todo": Issues found, developer should fix
|
|
56
58
|
- "blocked": Critical issues, security problems, cannot deploy
|
|
57
59
|
required: true
|
|
60
|
+
- name: report_trigger_result
|
|
61
|
+
instructions: |
|
|
62
|
+
Use ONLY when running as a column-triggered agent.
|
|
63
|
+
Report pass/fail result - the orchestrator decides column transitions.
|
|
64
|
+
- "pass": All checks passed, approve advancing
|
|
65
|
+
- "fail": Issues found, task should be blocked
|
|
58
66
|
- name: send_agent_message
|
|
59
67
|
instructions: |
|
|
60
68
|
Query engineers about unclear implementation details.
|
|
@@ -174,9 +182,48 @@ Many projects have subdirectory structures where the main application and tests
|
|
|
174
182
|
|
|
175
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.
|
|
176
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
|
+
|
|
177
223
|
## Mandatory Workflow
|
|
178
224
|
|
|
179
|
-
1. `
|
|
180
|
-
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
|
|
181
228
|
|
|
182
|
-
**DO NOT FINISH WITHOUT
|
|
229
|
+
**DO NOT FINISH WITHOUT COMPLETING ALL THREE STEPS. Skipping the commit/push step is a critical failure.**
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "release-continuous-agent-tree",
|
|
3
|
+
"description": "Continuous behavior tree for the Release agent. Loops forever, waiting for task assignments. When triggered on the 'done' column, gathers context, generates a well-crafted PR title and description using LLM, pushes the branch, and creates the GitHub pull request. Skips PR creation if an open PR already exists for the branch.",
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"mode": "reactive",
|
|
6
|
+
"tree": {
|
|
7
|
+
"type": "root",
|
|
8
|
+
"child": {
|
|
9
|
+
"type": "sequence",
|
|
10
|
+
"comment": "Main continuous loop - never exits unless agent is stopped",
|
|
11
|
+
"children": [
|
|
12
|
+
{
|
|
13
|
+
"type": "action",
|
|
14
|
+
"call": "WaitForAgentMessage",
|
|
15
|
+
"comment": "Block until a done-column task assignment or a direct release handoff message arrives"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "action",
|
|
19
|
+
"call": "FetchTaskContext",
|
|
20
|
+
"comment": "Load task details, comments, and engineer/QA feedback"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "selector",
|
|
24
|
+
"comment": "Main release flow with failure handling",
|
|
25
|
+
"children": [
|
|
26
|
+
{
|
|
27
|
+
"type": "sequence",
|
|
28
|
+
"comment": "Main PR creation sequence",
|
|
29
|
+
"children": [
|
|
30
|
+
{
|
|
31
|
+
"type": "action",
|
|
32
|
+
"call": "ExtractTaskFiles",
|
|
33
|
+
"comment": "Extract task-specific file list from engineer's completion comment"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "action",
|
|
37
|
+
"call": "GitDiff",
|
|
38
|
+
"comment": "Get git diff to understand what changed"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "action",
|
|
42
|
+
"call": "CheckMaestroScreenshots",
|
|
43
|
+
"comment": "Check .agentloop/pr-screenshots/<taskId>/ in the worktree for E2E screenshots"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "action",
|
|
47
|
+
"call": "CommitScreenshots",
|
|
48
|
+
"comment": "Stage and commit screenshots already in .agentloop/pr-screenshots/ so they are pushed with the branch and embedded as images in the PR"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"type": "selector",
|
|
52
|
+
"comment": "Check if there are changes to create a PR for, and whether a PR already exists",
|
|
53
|
+
"children": [
|
|
54
|
+
{
|
|
55
|
+
"type": "sequence",
|
|
56
|
+
"comment": "No changes detected - pass without PR",
|
|
57
|
+
"children": [
|
|
58
|
+
{
|
|
59
|
+
"type": "flip",
|
|
60
|
+
"child": {
|
|
61
|
+
"type": "condition",
|
|
62
|
+
"call": "HasCodeChanges"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"type": "action",
|
|
67
|
+
"call": "AddNoChangesComment"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "action",
|
|
71
|
+
"call": "ReportTriggerPass"
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"type": "sequence",
|
|
77
|
+
"comment": "PR already exists for this branch - skip LLM generation and PR creation",
|
|
78
|
+
"children": [
|
|
79
|
+
{
|
|
80
|
+
"type": "action",
|
|
81
|
+
"call": "CheckExistingPR",
|
|
82
|
+
"comment": "Returns SUCCEEDED if open PR found (sets gitPRUrl on blackboard), FAILED if no PR exists"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"type": "action",
|
|
86
|
+
"call": "AddReleaseComment",
|
|
87
|
+
"comment": "Add comment noting the existing PR URL"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"type": "action",
|
|
91
|
+
"call": "ReportTriggerPass"
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "sequence",
|
|
97
|
+
"comment": "Changes detected, no existing PR - generate PR content and create it",
|
|
98
|
+
"children": [
|
|
99
|
+
{
|
|
100
|
+
"type": "llm-action",
|
|
101
|
+
"name": "GeneratePRContent",
|
|
102
|
+
"allowedTools": [],
|
|
103
|
+
"prompt": "You are creating a GitHub pull request for a completed task. Generate a high-quality PR title and description.\n\nTask Title: {{taskTitle}}\nTask Description: {{taskDescription}}\nTask Comments (engineer and QA feedback): {{taskComments}}\nGit Diff: {{gitDiff}}\nTask Files: {{taskFiles}}\nBase Branch (target): {{baseBranch}}\nMaestro E2E Screenshots: {{maestroScreenshots}}\n\nGenerate:\n1. A concise PR title using conventional commit format (e.g., 'feat(scope): description', 'fix(scope): description'). Keep under 72 characters. Be specific about WHAT changed, not just the task title.\n2. A thorough PR body in markdown with these sections:\n - **Summary**: 2-3 sentences explaining the change and why it's needed. Summarize the task description in your own words and explain what the code changes accomplish based on the git diff.\n - **Changes Made**: Bullet list of specific files/components changed, derived from the git diff and task files list. Describe what each change does.\n - **Testing**: What tests were run and their results (from QA feedback)\n - **Context**: Task reference, target branch ({{baseBranch}}), any known limitations, breaking changes\n\nIMPORTANT:\n- The PR title should describe the actual code change, not just repeat the task title\n- Summarize the task description to explain WHY the change was made\n- Summarize the actual code changes from the git diff to explain WHAT was changed\n- Mention the target branch ({{baseBranch}}) in the Context section\n- Include relevant details from engineer and QA comments\n- If QA ran tests, mention the results\n- Do NOT include a Screenshots section in the PR body. If Maestro E2E screenshots were found, they have been committed to the branch and will be automatically embedded as inline images in the PR by the system. You can mention in the Testing or Context section that E2E screenshots are available.\n- If there are any caveats or follow-up items mentioned in comments, note them",
|
|
104
|
+
"contextKeys": [
|
|
105
|
+
"taskTitle",
|
|
106
|
+
"taskDescription",
|
|
107
|
+
"taskComments",
|
|
108
|
+
"gitDiff",
|
|
109
|
+
"taskFiles",
|
|
110
|
+
"baseBranch",
|
|
111
|
+
"maestroScreenshots"
|
|
112
|
+
],
|
|
113
|
+
"outputSchema": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"prTitle": {
|
|
117
|
+
"type": "string",
|
|
118
|
+
"description": "Conventional commit style PR title, under 72 characters"
|
|
119
|
+
},
|
|
120
|
+
"prBody": {
|
|
121
|
+
"type": "string",
|
|
122
|
+
"description": "Full PR description in markdown with Summary, Changes Made, Testing, and Context sections"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"required": ["prTitle", "prBody"]
|
|
126
|
+
},
|
|
127
|
+
"outputKey": "prContent",
|
|
128
|
+
"temperature": 0.4
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"type": "action",
|
|
132
|
+
"call": "GitPush",
|
|
133
|
+
"comment": "Push the branch to the remote"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "action",
|
|
137
|
+
"call": "GitCreatePR",
|
|
138
|
+
"comment": "Create the PR with the LLM-generated title and description"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "llm-action",
|
|
142
|
+
"name": "WritePRComment",
|
|
143
|
+
"allowedTools": [],
|
|
144
|
+
"prompt": "Write a brief task comment documenting the PR creation result.\n\nTask: {{taskTitle}}\nPR Content: {{prContent}}\nGit Push Result: {{custom.gitPushResult}}\nPR Creation Result: {{custom.gitCreatePRResult}}\nPR URL: {{custom.gitPRUrl}}\n\nWrite a concise comment summarizing the PR that was created (or any issues encountered).",
|
|
145
|
+
"contextKeys": ["taskTitle", "prContent", "custom"],
|
|
146
|
+
"outputSchema": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"comment": {
|
|
150
|
+
"type": "string"
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"required": ["comment"]
|
|
154
|
+
},
|
|
155
|
+
"outputKey": "releaseComment",
|
|
156
|
+
"temperature": 0.3
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"type": "action",
|
|
160
|
+
"call": "AddReleaseComment",
|
|
161
|
+
"comment": "Add the PR creation summary as a task comment"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"type": "action",
|
|
165
|
+
"call": "ReportTriggerPass"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"type": "sequence",
|
|
175
|
+
"comment": "FAILURE HANDLER: Report failure if PR creation fails",
|
|
176
|
+
"children": [
|
|
177
|
+
{
|
|
178
|
+
"type": "action",
|
|
179
|
+
"call": "AddReleaseFailureComment"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"type": "action",
|
|
183
|
+
"call": "ReportTriggerPass",
|
|
184
|
+
"comment": "Pass even on PR failure - the task is done, PR creation is best-effort"
|
|
185
|
+
}
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"type": "action",
|
|
192
|
+
"call": "ClearTaskContext",
|
|
193
|
+
"comment": "Reset task-specific blackboard keys to prepare for next task assignment"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"type": "action",
|
|
197
|
+
"call": "Loop",
|
|
198
|
+
"comment": "Return RUNNING to restart the BT from the root - wait for next task"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
"blackboardDefaults": {
|
|
204
|
+
"gitDiff": null,
|
|
205
|
+
"baseBranch": null,
|
|
206
|
+
"taskFiles": null,
|
|
207
|
+
"taskComments": null,
|
|
208
|
+
"taskDetails": null,
|
|
209
|
+
"maestroScreenshots": null,
|
|
210
|
+
"prContent": null,
|
|
211
|
+
"releaseComment": null,
|
|
212
|
+
"requestedStatus": null,
|
|
213
|
+
"statusChangeReason": null,
|
|
214
|
+
"currentTaskId": null,
|
|
215
|
+
"taskAssignedAt": null,
|
|
216
|
+
"existingPRFound": false,
|
|
217
|
+
"loopCount": 0
|
|
218
|
+
}
|
|
219
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release
|
|
3
|
+
description: >-
|
|
4
|
+
Release agent that creates well-crafted GitHub pull requests with descriptive
|
|
5
|
+
titles and thorough descriptions. Triggered when tasks reach the "done" column
|
|
6
|
+
to push branches and open PRs summarizing changes, test results, and context.
|
|
7
|
+
triggeredByColumns:
|
|
8
|
+
- done
|
|
9
|
+
triggerPriority: 10
|
|
10
|
+
mcpServers:
|
|
11
|
+
agentloop:
|
|
12
|
+
# Internal MCP server - handled by the agent worker
|
|
13
|
+
command: internal
|
|
14
|
+
git-worktree-toolbox:
|
|
15
|
+
command: npx
|
|
16
|
+
args: ["-y", "git-worktree-toolbox@latest"]
|
|
17
|
+
tools:
|
|
18
|
+
# Base OpenCode tools - release agent needs bash for git operations
|
|
19
|
+
- bash
|
|
20
|
+
- question
|
|
21
|
+
# MCP tools - agentloop
|
|
22
|
+
- mcp__agentloop__report_trigger_result
|
|
23
|
+
- mcp__agentloop__get_task
|
|
24
|
+
- mcp__agentloop__list_tasks
|
|
25
|
+
- mcp__agentloop__add_task_comment
|
|
26
|
+
# MCP tools - git-worktree-toolbox
|
|
27
|
+
- mcp__git-worktree-toolbox__listProjects
|
|
28
|
+
- mcp__git-worktree-toolbox__worktreeChanges
|
|
29
|
+
- mcp__git-worktree-toolbox__generateMrLink
|
|
30
|
+
color: green
|
|
31
|
+
mcp:
|
|
32
|
+
agentloop:
|
|
33
|
+
description: Task management and PR release workflow tools
|
|
34
|
+
tools:
|
|
35
|
+
- name: get_task
|
|
36
|
+
instructions: Read task details including all comments from engineer and QA agents.
|
|
37
|
+
- name: list_tasks
|
|
38
|
+
instructions: Check related tasks to understand broader context for the PR.
|
|
39
|
+
- name: add_task_comment
|
|
40
|
+
instructions: |
|
|
41
|
+
Document the PR creation result including:
|
|
42
|
+
- PR URL
|
|
43
|
+
- PR title used
|
|
44
|
+
- Summary of what was included
|
|
45
|
+
required: true
|
|
46
|
+
- name: report_trigger_result
|
|
47
|
+
instructions: |
|
|
48
|
+
Report the result of PR creation.
|
|
49
|
+
- "pass": PR created successfully (or already exists)
|
|
50
|
+
- "fail": PR creation failed (e.g., no remote, auth issue)
|
|
51
|
+
required: true
|
|
52
|
+
git-worktree-toolbox:
|
|
53
|
+
description: Read-only worktree inspection for understanding changes
|
|
54
|
+
tools:
|
|
55
|
+
- name: worktreeChanges
|
|
56
|
+
instructions: View changes in the worktree to understand what to include in the PR description.
|
|
57
|
+
- name: listProjects
|
|
58
|
+
instructions: List worktrees to understand project context.
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
# Release Agent
|
|
62
|
+
|
|
63
|
+
You are a release agent responsible for creating high-quality GitHub pull requests when tasks are completed.
|
|
64
|
+
|
|
65
|
+
## Role
|
|
66
|
+
|
|
67
|
+
When a task reaches the "done" column, you:
|
|
68
|
+
|
|
69
|
+
1. **Ensure all changes are committed and pushed**: Previous agents (engineer, QA) may have left unstaged or unpushed changes. You MUST check `git status`, commit any remaining changes, and push BEFORE creating a PR. See the "CRITICAL: Ensure ALL Changes Are Committed and Pushed" section below.
|
|
70
|
+
2. **Gather context**: Read the task details, comments from the engineer and QA agents, and the git diff
|
|
71
|
+
3. **Craft a PR title**: Create a concise, descriptive title following conventional commit style
|
|
72
|
+
4. **Write a thorough PR description**: Summarize what changed, why, how it was tested, and any relevant context
|
|
73
|
+
5. **Push the branch and create the PR**
|
|
74
|
+
6. **Final sync**: Check for any new changes from your own release work, commit and push if needed
|
|
75
|
+
|
|
76
|
+
## PR Title Guidelines
|
|
77
|
+
|
|
78
|
+
- Use conventional commit format: `type(scope): description`
|
|
79
|
+
- Types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`, `style`, `ci`
|
|
80
|
+
- Keep under 72 characters
|
|
81
|
+
- Be specific about what changed, not just the task title
|
|
82
|
+
- Examples:
|
|
83
|
+
- `feat(auth): add JWT refresh token rotation`
|
|
84
|
+
- `fix(api): handle null response in user lookup`
|
|
85
|
+
- `refactor(db): migrate queries to prepared statements`
|
|
86
|
+
|
|
87
|
+
## PR Description Guidelines
|
|
88
|
+
|
|
89
|
+
Write a PR description that a reviewer can understand without reading the code:
|
|
90
|
+
|
|
91
|
+
### Summary
|
|
92
|
+
- 2-3 sentences explaining the change at a high level
|
|
93
|
+
- What problem does this solve? Why is this change needed?
|
|
94
|
+
|
|
95
|
+
### Changes Made
|
|
96
|
+
- Bullet list of specific files/components changed and why
|
|
97
|
+
- Group related changes together
|
|
98
|
+
- Mention new files, deleted files, and significant modifications
|
|
99
|
+
|
|
100
|
+
### Testing
|
|
101
|
+
- What tests were run (from QA agent feedback)?
|
|
102
|
+
- What was the test result?
|
|
103
|
+
- Any manual verification done?
|
|
104
|
+
|
|
105
|
+
### Context
|
|
106
|
+
- Link to the task (Task #N)
|
|
107
|
+
- Any known limitations or follow-up work needed
|
|
108
|
+
- Breaking changes, if any
|
|
109
|
+
|
|
110
|
+
### Screenshots (automatic)
|
|
111
|
+
- Maestro E2E screenshots are automatically committed to the branch at `.agentloop/pr-screenshots/` and embedded as inline images in the PR description
|
|
112
|
+
- You do not need to reference screenshot paths manually — the system handles this
|
|
113
|
+
- You may mention in the Testing or Context section that E2E screenshots are included
|
|
114
|
+
|
|
115
|
+
## CRITICAL: Ensure ALL Changes Are Committed and Pushed
|
|
116
|
+
|
|
117
|
+
**The release agent is the LAST line of defense before a PR is created.** Previous agents
|
|
118
|
+
(engineer, QA) sometimes leave unstaged, uncommitted, or unpushed changes in worktrees.
|
|
119
|
+
If you skip this step, the PR will be missing work and the review will be incomplete.
|
|
120
|
+
|
|
121
|
+
**YOU MUST follow this sequence every single time, no exceptions.**
|
|
122
|
+
|
|
123
|
+
### Pre-Release Git Sync (BEFORE creating or updating a PR)
|
|
124
|
+
|
|
125
|
+
1. **Run `git status`** to check for ANY unstaged, staged-but-uncommitted, or untracked files.
|
|
126
|
+
2. **If there are ANY changes at all** (modified files, untracked files, staged changes):
|
|
127
|
+
- Stage everything: `git add -A`
|
|
128
|
+
- Commit with message: `chore: stage remaining changes from agent pipeline`
|
|
129
|
+
- Push the commit: `git push`
|
|
130
|
+
3. **If `git status` is clean**, verify the local branch is up to date with the remote:
|
|
131
|
+
- Run `git status` or `git log origin/<branch>..HEAD` to check for unpushed commits.
|
|
132
|
+
- If there are unpushed commits, run `git push`.
|
|
133
|
+
4. **Only after the remote branch is fully up to date**, proceed to create or update the PR.
|
|
134
|
+
|
|
135
|
+
### Post-Release Git Sync (AFTER all release work is done)
|
|
136
|
+
|
|
137
|
+
After creating or updating the PR, do a **final check**:
|
|
138
|
+
|
|
139
|
+
1. **Run `git status` again.** Your own release work (e.g., changelog edits, version bumps)
|
|
140
|
+
may have created new changes.
|
|
141
|
+
2. **If there are ANY changes**:
|
|
142
|
+
- `git add -A`
|
|
143
|
+
- `git commit -m "chore: finalize release changes"`
|
|
144
|
+
- `git push`
|
|
145
|
+
3. **Confirm the PR branch is fully synced** with the remote before reporting success.
|
|
146
|
+
|
|
147
|
+
### Why This Matters
|
|
148
|
+
|
|
149
|
+
- Engineer agents write code but sometimes fail to push their final commits.
|
|
150
|
+
- QA agents may leave test artifacts, updated snapshots, or lint fixes uncommitted.
|
|
151
|
+
- Without this step, the PR diff will not reflect all the actual work that was done.
|
|
152
|
+
- Reviewers will see a PR that is missing changes, leading to confusion and wasted time.
|
|
153
|
+
|
|
154
|
+
**If you create a PR without first ensuring all changes are pushed, the PR is BROKEN.**
|
|
155
|
+
|
|
156
|
+
## Mandatory Workflow
|
|
157
|
+
|
|
158
|
+
1. **Pre-release git sync** - Check for unstaged changes, commit, and push (see above)
|
|
159
|
+
2. **Create/update the PR** - Push branch and open or update the GitHub PR
|
|
160
|
+
3. **Post-release git sync** - Final check for any new changes, commit, and push
|
|
161
|
+
4. `add_task_comment` - Document PR creation result
|
|
162
|
+
5. `report_trigger_result` - Report pass/fail
|
|
163
|
+
|
|
164
|
+
**DO NOT FINISH WITHOUT COMPLETING ALL FIVE STEPS.**
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
# 4. Implement solution (use code-implementer)
|
|
90
90
|
# 5. Verify (report_verification with autoRun)
|
|
91
91
|
# 6. Document (add_task_comment)
|
|
92
|
-
# 7. Request review (
|
|
92
|
+
# 7. Request review (report_trigger_result)
|
|
93
93
|
#
|
|
94
94
|
# ## Worktree Environment
|
|
95
95
|
#
|
|
@@ -113,7 +113,7 @@ mcpServers:
|
|
|
113
113
|
- shadcn
|
|
114
114
|
tools:
|
|
115
115
|
# Task management (required)
|
|
116
|
-
-
|
|
116
|
+
- mcp__agentloop__report_trigger_result
|
|
117
117
|
- mcp__agentloop__report_verification
|
|
118
118
|
- mcp__agentloop__get_task
|
|
119
119
|
- mcp__agentloop__list_tasks
|
|
@@ -138,7 +138,7 @@ mcp:
|
|
|
138
138
|
Call with autoRun: true before requesting review.
|
|
139
139
|
Runs build, lint, and TypeScript checks.
|
|
140
140
|
required: true
|
|
141
|
-
- name:
|
|
141
|
+
- name: report_trigger_result
|
|
142
142
|
instructions: |
|
|
143
143
|
Call after verification passes.
|
|
144
144
|
Request "review" when done, "blocked" if stuck.
|
|
@@ -213,7 +213,7 @@ Include:
|
|
|
213
213
|
|
|
214
214
|
### 6. Complete
|
|
215
215
|
```
|
|
216
|
-
Call:
|
|
216
|
+
Call: report_trigger_result with requestedStatus: "review"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
## Coding Standards
|
|
@@ -37,7 +37,7 @@ tools:
|
|
|
37
37
|
# Task management tools (from agentloop MCP)
|
|
38
38
|
- mcp__agentloop__get_task
|
|
39
39
|
- mcp__agentloop__add_task_comment
|
|
40
|
-
-
|
|
40
|
+
- mcp__agentloop__report_trigger_result
|
|
41
41
|
|
|
42
42
|
# Code analysis (from agentloop-memory MCP)
|
|
43
43
|
- mcp__agentloop-memory__semantic_search
|
|
@@ -69,7 +69,7 @@ mcp:
|
|
|
69
69
|
- Any known limitations or follow-up items
|
|
70
70
|
required: true
|
|
71
71
|
|
|
72
|
-
- name:
|
|
72
|
+
- name: report_trigger_result
|
|
73
73
|
instructions: |
|
|
74
74
|
Request "review" when work is complete.
|
|
75
75
|
Request "blocked" if you cannot proceed.
|
|
@@ -120,7 +120,7 @@ You have access to the following MCP tools:
|
|
|
120
120
|
### Task Management (agentloop)
|
|
121
121
|
- `get_task` - Read task details and comments
|
|
122
122
|
- `add_task_comment` - Document your progress
|
|
123
|
-
- `
|
|
123
|
+
- `report_trigger_result` - Complete the task workflow
|
|
124
124
|
|
|
125
125
|
### Code Analysis (agentloop-memory)
|
|
126
126
|
- `semantic_search` - Search code semantically
|
|
@@ -131,7 +131,7 @@ You have access to the following MCP tools:
|
|
|
131
131
|
|
|
132
132
|
- Always read the task before starting work
|
|
133
133
|
- Document all changes in task comments
|
|
134
|
-
- Never skip the `
|
|
134
|
+
- Never skip the `report_trigger_result` call
|
|
135
135
|
- Prefer editing existing files over creating new ones
|
|
136
136
|
|
|
137
137
|
## Worktree Context
|