Skip to content

Commit cfb5f34

Browse files
committed
fix: agents must check PR comments, not just formal reviews
Priority A workflow only checked for `review:changes_requested` status, missing comment-only feedback entirely. Now agents also scan for PRs with unresolved comments and treat actionable feedback the same way. Also requires agents to present feedback summary and wait for user confirmation before applying changes — prevents autonomous misinterpretation.
1 parent 9eeb17d commit cfb5f34

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

‎AGENTS.md‎

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,23 @@ bd list --status in_progress --json | jq '.[] | select(.notes == "" or .notes ==
6565
```
6666
For each stale task: check how long it's been `in_progress` (compare `updated_at`). If >1 hour and no PR, it's safe to reclaim or reset to `open`.
6767

68-
**Priority A — Fix "changes requested" PRs** (unblocks reviews, highest value)
68+
**Priority A — Address PR feedback** (unblocks reviews, highest value)
69+
70+
Check for PRs with formal "changes requested" reviews OR unresolved comment threads:
6971
```bash
72+
# Formal change requests
7073
gh pr list --search "review:changes_requested" --json number,title,headRefName
74+
75+
# PRs with unresolved comments (catches comment-only feedback)
76+
gh pr list --state open --json number,title,headRefName,comments \
77+
--jq '.[] | select(.comments | length > 0) | {number, title, headRefName}'
7178
```
79+
For PRs with comments but no formal review status, read the comments:
80+
```bash
81+
gh pr view <PR#> --comments
82+
```
83+
If comments contain actionable feedback (bug reports, broken links, requested changes), treat them the same as a formal "changes requested" review. **Present the feedback to the user for confirmation before making changes** — the user decides which comments to address and how.
84+
7285
Cross-reference with Beads: the task should be in `draft` status. If it's `in_progress`, another agent is already on it — skip.
7386

7487
**Priority B — Rebase approved PRs with merge conflicts** (quick, unblocks merges)
@@ -113,7 +126,11 @@ Three outcomes:
113126
### Doing the work
114127

115128
- **Fresh task:** Follow the "Content authoring workflow" below (for content pages) or task-specific instructions in `migration-plan.md` (for infrastructure)
116-
- **Changes requested:** Read review comments via `gh pr view <PR#> --json reviews`, address each comment, push fixes to the existing branch
129+
- **PR feedback (formal reviews or comments):**
130+
1. Read all feedback: `gh pr view <PR#> --comments` and `gh api repos/{owner}/{repo}/pulls/<PR#>/reviews --jq '.[] | {state, body}'`
131+
2. **Present a summary of the feedback to the user** — list each actionable item and your proposed fix
132+
3. **Wait for the user to confirm** which changes to make. Do not apply changes autonomously.
133+
4. After confirmation, check out the branch, apply the fixes, and push to the existing branch
117134

118135
### Submitting
119136

0 commit comments

Comments
 (0)