You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENT_FEEDBACK.md
+80-1Lines changed: 80 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -99,12 +99,91 @@ If this verification fails, the PR will target the wrong release branch.
99
99
}
100
100
```
101
101
102
+
## 4. Clarify How to Find Default Branch for Reading Instructions
103
+
104
+
**Issue**: The agent instructions assume the default branch is "master" when reading instruction files, but this may not always be correct. The agent should determine the default branch dynamically.
105
+
106
+
**Current state** (in "Required Reading" section):
107
+
```powershell
108
+
# Read instruction files from default branch
109
+
git show upstream/master:.github/instructions/backports/pr-template.instructions.md
110
+
```
111
+
112
+
**Problem**:
113
+
- Assumes default branch is named "master"
114
+
- Assumes upstream remote exists and is named "upstream"
115
+
- Instructions may not exist on master if they're in a different branch
116
+
117
+
**Suggested improvement**: Add a section that explains how to find the correct branch for reading instructions:
118
+
119
+
```markdown
120
+
## Reading Instruction Files
121
+
122
+
**IMPORTANT**: Instruction files must be read from the branch where they exist, which may not be the default branch (master/main).
123
+
124
+
### Step 1: Determine where instruction files exist
125
+
126
+
First, check if the instruction files exist in various branches:
git show origin/travisez13-main:.github/agents/backport-agent.md
162
+
```
163
+
164
+
### Why this matters
165
+
166
+
Instruction files and agent prompts may be:
167
+
- In a feature/development branch before being merged to default branch
168
+
- In a fork's main branch (like `origin/travisez13-main`)
169
+
- Have different content between default branch and development branches
170
+
- Not exist at all in older release branches
171
+
172
+
**Don't assume**:
173
+
- Default branch is named "master" (could be "main")
174
+
- Instructions exist in the default branch
175
+
- Remote is named "upstream" (might be "origin")
176
+
177
+
**Always verify** where the files exist before trying to read them.
178
+
```
179
+
102
180
## Summary
103
181
104
182
These improvements focus on:
105
183
106
184
1. **Explicit PR description handling**: Making it clear that the PR body must be passed to `report_progress`, not just saved to a file
107
185
2. **Template validation**: Adding a checklist to ensure all required sections are included
108
186
3. **Better error messages**: Providing clearer guidance when branch name verification fails
187
+
4. **Dynamic branch discovery**: Teaching the agent to find instruction files rather than assuming they're in "upstream/master"
109
188
110
-
These changes would help ensure backport PRs follow the correct template on the first attempt and reduce confusion about how to properly format and submit the PR description.
189
+
These changes would help ensure backport PRs follow the correct template on the first attempt and reduce confusion about how to properly format and submit the PR description, while also making the agent more robust when instruction files are in non-standard locations.
0 commit comments