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
- If the review body contains actionable feedback, include it as an additional general comment. Review summary bodies cannot use the `/replies` endpoint; post those responses as general PR comments (see step 7).
- Include actionable review summary bodies from `/pulls/{PR_NUMBER}/reviews` as additional general comments. Like specific review bodies, they cannot use the `/replies` endpoint and must be answered as general PR comments (see step 7).
62
62
- For all review-comment paths, fetch thread metadata and match `thread_id` by `node_id`:
@@ -88,25 +88,58 @@ Execution flow when terminal access is available:
88
88
- Use the subject format: `"{file}:{line} - {comment_summary} (@{username})"`.
89
89
- For general comments, extract the must-fix action from the body.
90
90
91
-
6. Present triage and wait:
91
+
6. Present triage and quick-action menu:
92
92
- Use a single numbering sequence across all categories.
93
93
- Show counts for `MUST-FIX`, `DISCUSS`, and `SKIPPED`.
94
-
- Ask which items I want addressed.
95
-
- If there are skipped or declined discuss items, also ask which ones should receive rationale replies.
94
+
- After the triage list, present this quick-action menu:
95
+
```
96
+
Quick actions:
97
+
f — Fix must-fix items, then confirm whether to reply/resolve skipped items before deciding discuss items
d — Discuss specific items before deciding (e.g., "d2,4"). Bare "d" presents all DISCUSS items.
100
+
r — Reply with rationale to items (e.g., "r3,5", "r7-9", "r all skipped", "r all discuss"); add `+ resolve` to also resolve threads
101
+
m — Skip code changes + create follow-up issue for must-fix/discuss/non-trivial skipped items
102
+
103
+
Or pick items by number: "1,2", "all must-fix", "1,3-5"
104
+
```
105
+
- Support range syntax: `N-M` expands to individual items (e.g., `3-5` → `3,4,5`).
106
+
- If a range is malformed, reversed, or out of bounds, show a validation message and ask the user to retry (do not silently coerce it).
96
107
- Do not edit code yet.
97
108
98
-
7. After I choose items:
99
-
- Address the selected items in code, tests, or docs.
100
-
- Run relevant checks when possible.
101
-
- If the user selects `DISCUSS` items to address, treat them the same as `MUST-FIX`: make the change, reply, and resolve the thread.
102
-
- If the user selects `SKIPPED` or declined `DISCUSS` items for rationale replies, post the rationale reply without making code changes. Resolve those threads only with explicit user approval.
109
+
7. Execute the chosen action:
110
+
- **`f`**: Fix all must-fix items (if none exist, skip fix phase). If local changes exist, commit, ask for push confirmation, then push; if no local changes, skip commit/push and continue decision flow. Then reply/resolve addressed must-fix threads. If skipped items exist, ask for explicit confirmation before posting rationale replies/resolving skipped threads. Keep discuss items for an explicit follow-up decision (`d`, `f+i`, or `r all discuss + resolve`).
111
+
- **`f+i`**: Same must-fix handling as `f`, plus create a follow-up GitHub issue bundling discuss and non-trivial skipped items; still reply/resolve trivial skipped items that are excluded from the follow-up issue. For general PR comments and review summary bodies (which have no thread), the reply alone is sufficient. If there are no deferred items, skip issue creation and behave like `f`. No additional commit is needed unless later steps introduce local changes.
112
+
- **`d`**: Present requested items with full context, ask for a decision on each. Bare `d` presents all DISCUSS items. Approved → fix like must-fix (use the same commit/push-before-reply ordering as `f` when code changes occur). Declined → optionally reply with rationale.
113
+
- **`r`**: Post rationale replies only for `SKIPPED`/`DISCUSS` items. Do not resolve threads unless the user explicitly asks to resolve them. If selection includes any `MUST-FIX` item (including `r all must-fix`), direct the user to `f` or explicit deferral (`f+i`/`m`) instead of replying.
114
+
- **`m`**: Create a follow-up issue for deferred items, reply in the original location for each deferred item (review-comment replies for inline comments; issue comments for general/review-summary comments), and resolve `DISCUSS`/`SKIPPED` threads when threads exist. Keep deferred `MUST-FIX` threads open by default unless the user explicitly asks to close them. If any `MUST-FIX` items are deferred, signal that the PR is **not merge-ready** without an override decision.
115
+
- **Direct selection** (e.g., "1,2", "all must-fix", "1,3-5"): Address only selected items; if code changes were made, commit/push with confirmation before replying/resolving; then ask about remaining items.
116
+
- Users can chain actions (e.g., `f+i` then `r7-9`).
103
117
- Reply to each addressed review comment:
104
118
- Issue comments: `gh api repos/${REPO}/issues/{PR_NUMBER}/comments -X POST -f body="<response>"`
105
119
- Review comment replies: `gh api repos/${REPO}/pulls/{PR_NUMBER}/comments/{COMMENT_ID}/replies -X POST -f body="<response>"`
106
120
- Review summary body replies: `gh api repos/${REPO}/issues/{PR_NUMBER}/comments -X POST -f body="<response>"`
107
121
- Resolve threads only when the issue is actually handled or explicitly declined with my approval:
108
122
`gh api graphql -f query='mutation($threadId:ID!) { resolveReviewThread(input:{threadId:$threadId}) { thread { id isResolved } } }' -f threadId="<THREAD_ID>"`
109
123
- Do not resolve anything still in progress or uncertain.
124
+
- Ask for push confirmation before running `git push`.
125
+
126
+
8. Create follow-up issue (when `f+i` or `m` is chosen):
127
+
- Use `gh issue create --repo "${REPO}"` with title "Follow-up: Review feedback from PR #N"
128
+
- For `f+i`, include discuss items and non-trivial skipped items (must-fix is already addressed)
129
+
- For `m`, include deferred must-fix items, discuss items, and non-trivial skipped items
130
+
- Keep issue body structure consistent: use an optional `### Must-fix items (deferred)` section (for `m` only), then `### Discuss items`, then `### Skipped items (non-trivial)`, plus the original PR link at the bottom
131
+
- Omit any section heading whose content bucket is empty
132
+
- Reference the issue in thread replies
133
+
- Return the issue URL
134
+
135
+
9. Merge-ready signal:
136
+
- After `f`, tell me the PR is merge-ready only when no `DISCUSS` items remain unresolved
137
+
- After `f+i`, tell me the PR is merge-ready
138
+
- After `m`, only tell me the PR is merge-ready when no must-fix items were deferred; otherwise explicitly say it is not merge-ready
139
+
- After direct selection, do not signal merge-ready automatically; first evaluate remaining `MUST-FIX`/`DISCUSS` items and ask whether to continue with `f`, `f+i`, `d`, `r`, or `m`
140
+
- After `d` or `r`, if unresolved `MUST-FIX`/`DISCUSS` items remain, do not signal merge-ready automatically; re-offer `f`, `f+i`, `d`, `r`, or `m`
141
+
- Show the follow-up issue URL if one was created
142
+
- Do not auto-merge
110
143
111
144
Output format for the triage:
112
145
@@ -120,7 +153,12 @@ DISCUSS (count):
120
153
SKIPPED (count):
121
154
3. item - short reason
122
155
123
-
Then ask:
124
-
- Which items should I address?
125
-
- Optional: which skipped or declined items should get rationale replies?
126
-
```
156
+
Quick actions:
157
+
f — Fix #N, then confirm whether to reply/resolve skipped items before deciding discuss items
0 commit comments