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: .agents/workflows/address-review.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,7 @@ Execution flow when terminal access is available:
112
112
- If a claim is wrong, classify it as `SKIPPED` and say why.
113
113
- Preserve comment IDs and thread IDs for later replies and thread resolution.
114
114
- Treat actionable review summary bodies as normal feedback to classify (`MUST-FIX`/`DISCUSS` as appropriate); skip only boilerplate or status-only summaries.
115
+
- **Claim verification**: Before finalizing `MUST-FIX` classification, verify the reviewer's factual claims against the actual codebase. If local code inspection confirms the code already handles the concern (claim is demonstrably wrong), classify as `SKIPPED` per the rule above. If the evidence is ambiguous or you have only partial confidence the claim is wrong, downgrade to `DISCUSS` and note the discrepancy. If you have access to AI-powered codebase search tools (e.g., Greptile), use them to cross-reference claims for additional confidence, but treat their output as a signal — corroborated claims stay `MUST-FIX`, clearly contradicted claims go to `SKIPPED`, and inconclusive results go to `DISCUSS`.
115
116
- Track only `MUST-FIX` items as your working checklist.
116
117
- Use one checklist entry per must-fix item or deduplicated issue.
117
118
- Use the subject format: `"{file}:{line} - {comment_summary} (@{username})"`.
@@ -151,7 +152,9 @@ Execution flow when terminal access is available:
151
152
- Resolve threads only when the issue is actually handled or explicitly declined with my approval:
152
153
`gh api graphql -f query='mutation($threadId:ID!) { resolveReviewThread(input:{threadId:$threadId}) { thread { id isResolved } } }' -f threadId="<THREAD_ID>"`
153
154
- Do not resolve anything still in progress or uncertain.
155
+
- **Self-review gate**: After making all code changes but before committing, review the diff for issues introduced by the fixes themselves. Check for correctness bugs, style violations, and inconsistencies with surrounding code. Fix critical issues immediately. This prevents new review cycles caused by the fixes. If you have access to a code-review agent or tool, use it; otherwise, do a manual diff review.
154
156
- Ask for push confirmation before running `git push`.
157
+
- **Parallel fixes**: When there are 2+ items to fix that touch different files with no logical dependencies, process them in parallel if your environment supports concurrent execution (e.g., sub-agents, background tasks). Items in the same file or with cross-file dependencies must be fixed sequentially. Instruct each sub-agent **not to commit** — all changes must remain unstaged so the self-review gate can run on the combined diff. After parallel fixes complete, verify no conflicts exist between the changes by checking whether any sub-agents touched the same files (`git diff --name-only`).
155
158
156
159
9. Create follow-up issue (when `f+i` or `m` is chosen):
157
160
- Use `gh issue create --repo "${REPO}"` with title "Follow-up: Review feedback from PR #N"
Copy file name to clipboardExpand all lines: .claude/commands/address-review.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -151,6 +151,18 @@ Triage rules:
151
151
- Preserve the original review comment ID and thread ID when available so the command can reply to the correct place and resolve the correct thread later.
152
152
- Treat actionable review summary bodies as normal feedback to classify (`MUST-FIX`/`DISCUSS` as appropriate); skip only boilerplate or status-only summaries.
153
153
154
+
**Greptile claim verification:**
155
+
156
+
When Greptile MCP tools are available (`mcp__plugin_greptile_greptile__*`), cross-reference reviewer claims against Greptile's codebase analysis before finalizing triage classifications:
157
+
158
+
1. For each reviewer comment that asserts a factual claim about the codebase (e.g., "this function doesn't handle null", "this breaks the existing API contract"), query Greptile to verify the claim:
159
+
- Use `mcp__plugin_greptile_greptile__search_greptile_comments` to find prior Greptile analysis of the same code area
160
+
- Use `mcp__plugin_greptile_greptile__search_custom_context` to check project-specific context that may confirm or contradict the claim
161
+
2. If Greptile's analysis clearly contradicts the reviewer's claim and local code inspection confirms the code already handles the concern, classify as `SKIPPED` per the existing triage rule (claim is demonstrably wrong). If the analysis is inconclusive or only partially contradicts the claim, downgrade to `DISCUSS` and note the discrepancy (e.g., "Greptile analysis suggests current handling may be correct — needs verification").
162
+
3. If Greptile's analysis corroborates the reviewer's claim, keep the `MUST-FIX` classification with higher confidence.
163
+
4. If Greptile has no relevant data, fall back to local verification only.
164
+
5. Do not block triage on Greptile availability — if the tools are not configured or the API fails, proceed with local verification alone.
165
+
154
166
## Step 6: Create Todo List
155
167
156
168
Create a task list with TodoWrite containing **only the `MUST-FIX` items**:
@@ -250,6 +262,34 @@ When addressing items, after completing each selected item (whether `MUST-FIX` o
250
262
If the user selects `DISCUSS` items to address, treat them the same as `MUST-FIX`: make the code change, reply, and resolve the thread.
251
263
If the user selects skipped/declined items for rationale replies, post those replies too.
252
264
265
+
**Parallel sub-agents for independent fixes:**
266
+
267
+
When there are 2+ items to fix that touch different files with no logical dependencies between them, use the Task tool to spawn parallel sub-agents for faster execution:
268
+
269
+
1. Group items by file path. Items in different files with no cross-file dependencies (e.g., a type change in file A that affects callers in file B) are independent.
270
+
2. For each independent group, spawn a sub-agent via the Task tool with:
271
+
- The full review comment text and context
272
+
- The file path and line number
273
+
- Instructions to make the specific fix and run any relevant file-level checks
274
+
- A reminder not to modify files outside the assigned scope
275
+
- An explicit instruction **not to commit** the changes — leave all modifications unstaged so the orchestrator can run the self-review gate on the combined diff before committing
276
+
3. After all sub-agents complete, verify there are no conflicts between their changes by checking whether any sub-agents touched the same files (e.g., `git diff --name-only` to list changed files, then check for overlaps).
277
+
4. If conflicts exist, resolve them sequentially before proceeding.
278
+
5. If a sub-agent fails (crashes, hits a tool error, or produces an incorrect edit), fall back to fixing that item sequentially in the parent agent before proceeding.
279
+
6. Items that touch the same file or have logical dependencies must be fixed sequentially, not in parallel.
280
+
7. If only 1 item needs fixing or all items are in the same file, skip parallel dispatch and fix sequentially as before.
281
+
282
+
**Self-review gate before pushing:**
283
+
284
+
After making all code changes but before committing, run a self-review on the diff to prevent new review cycles caused by the fixes themselves:
285
+
286
+
1. Use the Task tool to launch a code-review sub-agent (e.g., `pr-review-toolkit:code-reviewer` if available, or a general-purpose review agent) against the uncommitted changes (`git diff`).
287
+
2. The self-review should check for: correctness bugs introduced by the fixes, style violations against project standards (CLAUDE.md, linter rules), missing error handling, and inconsistencies with surrounding code.
288
+
3. If the self-review finds critical issues (bugs, security problems, or clear correctness errors), fix them immediately before committing. These are issues that would likely trigger a new review round.
289
+
4. If the self-review finds only minor issues (style nits, naming suggestions), note them but proceed — do not block the push for optional improvements.
290
+
5. If the self-review catches and fixes additional issues, mention this in the commit message (e.g., "also fixed: null check in adjacent error path caught by self-review").
291
+
6. Skip the self-review gate for non-code actions (rationale replies, follow-up issue creation, thread resolution).
0 commit comments