Skip to content

Commit e78cbd1

Browse files
TechNickAINick Sullivanclaude
authored
✨ Enhance address-pr-comments with more bots and async productivity (#28)
* ✨ Enhance address-pr-comments with more bots and async productivity Add support for chatgpt-codex-connector and greptile bots - fixes issue where Codex comments were being ignored. Made bot detection flexible to handle any [bot] username posting code reviews. Replaced line-count sizing with complexity-based assessment (conceptual scope, risk, novelty, cross-cutting impact). A 500-line migration is trivial; a 20-line auth change needs attention. Revamped productive-waiting to encourage product thinking while bots run - brainstorm ideas, spot opportunities, find fun facts. Removed generic research and quality tasks. Added check-in guidance before starting large undertakings. Made reactions the primary feedback signal with replies optional - only reply when it adds value (non-obvious decline, different fix, crediting great catch). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🐛 Add polling interval guidance to execution-model Cursor bot correctly identified that removing the specific sleep intervals left no guidance on when to poll bot status. Added clear polling intervals: 60-90 seconds normally, extending to 2-3 minutes when only slow bots remain. This prevents both excessive API calls and missed completions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * 🔖 Bump plugin version to 8.7.0 / marketplace to 9.3.0 --------- Co-authored-by: Nick Sullivan <nick@technick.ai> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0f26e51 commit e78cbd1

2 files changed

Lines changed: 118 additions & 44 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"metadata": {
88
"description": "Professional AI coding configurations, agents, skills, and context for Claude Code and Cursor",
9-
"version": "9.2.0",
9+
"version": "9.3.0",
1010
"license": "MIT",
1111
"repository": "https://github.com/TechNickAI/ai-coding-config"
1212
},
@@ -15,7 +15,7 @@
1515
"name": "ai-coding-config",
1616
"source": "./plugins/core",
1717
"description": "Commands, agents, skills, and context for AI-assisted development workflows",
18-
"version": "8.6.0",
18+
"version": "8.7.0",
1919
"tags": ["commands", "agents", "skills", "workflows", "essential"]
2020
}
2121
]

plugins/core/commands/address-pr-comments.md

Lines changed: 116 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Triage and address PR comments from code review bots intelligently
33
argument-hint: [pr-number]
44
model: sonnet
5-
version: 1.5.0
5+
version: 1.6.0
66
---
77

88
# Address PR Comments
@@ -17,8 +17,7 @@ articulate why the bot is mistaken given context it lacks.
1717

1818
Read @rules/code-review-standards.mdc for patterns where bot suggestions typically don't
1919
apply. Use these to identify incorrect suggestions - explain why the bot is wrong in
20-
this specific case, not just that the issue is "minor" or "not blocking."
21-
</objective>
20+
this specific case, not just that the issue is "minor" or "not blocking." </objective>
2221

2322
<usage>
2423
/address-pr-comments - Auto-detect PR from current branch
@@ -29,6 +28,26 @@ this specific case, not just that the issue is "minor" or "not blocking."
2928
Use provided PR number, or detect from current branch. Exit if no PR exists.
3029
</pr-detection>
3130

31+
<scale-with-complexity>
32+
Match thoroughness to the PR's actual complexity, not line count. A 500-line generated
33+
migration is trivial. A 20-line auth change needs careful attention.
34+
35+
Assess complexity by:
36+
37+
- Conceptual scope: Single focused change vs. multiple interrelated concerns
38+
- Risk/blast radius: Does it touch auth, payments, data migrations, core abstractions?
39+
- Novelty: Well-trodden patterns vs. new architectural territory
40+
- Cross-cutting impact: Isolated change vs. affects multiple systems
41+
42+
Simple changes (rename, config tweak, obvious bug fix): Process comments quickly, skip
43+
productive-waiting, get to completion fast.
44+
45+
Complex changes (new patterns, security-sensitive, architectural): Take time to
46+
understand context, explore documentation impacts, consider creating follow-up issues.
47+
48+
The goal is always getting the PR merged. Don't let thoroughness become an excuse for
49+
delay on straightforward changes. </scale-with-complexity>
50+
3251
<conflict-resolution>
3352
Check if the PR has merge conflicts with its base branch before processing comments.
3453
Conflicts block merging and should be resolved first.
@@ -37,65 +56,110 @@ Detect conflicts via `gh pr view {number} --json mergeable,mergeStateStatus`. If
3756
mergeable is false, fetch the base branch and rebase or merge to resolve conflicts.
3857

3958
When resolving conflicts:
59+
4060
- Preserve the intent of both sets of changes
4161
- Keep bot comments in context - some may become obsolete after conflict resolution
4262
- Push the resolved changes before continuing with comment review
4363

44-
If conflicts involve complex decisions (architectural changes, competing features),
45-
flag for user attention rather than auto-resolving.
46-
</conflict-resolution>
64+
If conflicts involve complex decisions (architectural changes, competing features), flag
65+
for user attention rather than auto-resolving. </conflict-resolution>
4766

4867
<hotfix-mode>
4968
If the branch name starts with `hotfix/`, switch to expedited review mode:
5069

5170
- Focus on security vulnerabilities and bugs that could break production
5271
- Speed and correctness take priority over polish
5372
- One pass through comments, then push fixes immediately
54-
- Style and refactoring suggestions get declined with "hotfix - addressing critical issues only"
73+
- Style and refactoring suggestions get declined with "hotfix - addressing critical
74+
issues only"
5575

5676
Announce hotfix mode at start, explaining that this is an expedited review focusing on
57-
security and correctness.
58-
</hotfix-mode>
77+
security and correctness. </hotfix-mode>
5978

6079
<comment-sources>
6180
Code review bots comment at different API levels. Fetch from both endpoints:
6281

63-
PR-level comments (issues endpoint):
64-
`gh api repos/{owner}/{repo}/issues/{pr}/comments`
82+
PR-level comments (issues endpoint): `gh api repos/{owner}/{repo}/issues/{pr}/comments`
6583
Claude Code Review posts here. Username is `claude[bot]`. Only address the most recent
6684
Claude review - older ones reflect outdated code state.
6785

6886
Line-level review comments (pulls endpoint):
69-
`gh api repos/{owner}/{repo}/pulls/{pr}/comments`
70-
Cursor Bugbot posts here as inline comments on specific code lines. Username is
71-
`cursor[bot]`. Address all Cursor comments - each flags a distinct location.
87+
`gh api repos/{owner}/{repo}/pulls/{pr}/comments` Multiple bots post inline comments on
88+
specific code lines. Address all line-level bot comments - each flags a distinct
89+
location.
90+
91+
Supported bots and their usernames:
92+
93+
- `claude[bot]` - Claude Code Review (PR-level)
94+
- `cursor[bot]` - Cursor Bugbot (line-level)
95+
- `chatgpt-codex-connector[bot]` - OpenAI Codex (line-level)
96+
- `greptile[bot]` - Greptile (line-level or PR-level)
97+
98+
New bots may appear - any username containing `[bot]` that posts code review comments
99+
should be processed. Check the comment body structure to determine if it's a code
100+
review.
72101

73102
You can also use:
103+
74104
- `gh pr view {number} --comments` for PR-level comments
75105
- `gh api repos/{owner}/{repo}/pulls/{pr}/reviews` for review status
76106

77-
Identify bot comments by author username. Human comments require different handling -
78-
flag them for user attention rather than auto-addressing. </comment-sources>
107+
Identify bot comments by author username containing `[bot]`. Human comments require
108+
different handling - flag them for user attention rather than auto-addressing.
109+
</comment-sources>
79110

80111
<execution-model>
81112
Process bot feedback incrementally as each bot completes. When one bot finishes, address
82113
its comments immediately while others are still running. Claude Code Review typically
83-
completes in 1-2 minutes. Cursor Bugbot takes 3-10 minutes. Process fast bots first
84-
rather than waiting for slow ones.
114+
completes in 1-2 minutes. Cursor Bugbot and Codex take 3-10 minutes. Greptile can take
115+
up to 15 minutes. Process fast bots first rather than waiting for slow ones.
85116

86117
Poll check status with `gh pr checks --json name,state,bucket`. Review bots include
87-
claude-review, Cursor Bugbot, and greptile.
118+
claude-review, Cursor Bugbot, chatgpt-codex-connector, and greptile.
119+
120+
Maximize async throughput: while waiting for slow bots, work on other productive tasks
121+
in parallel. Only block when you need bot results to continue. See productive-waiting
122+
for ideas.
88123

89-
When bots are still pending, sleep adaptively based on which bots remain. If only Claude
90-
is pending, sleep 30-60 seconds. If Cursor Bugbot is pending, sleep 2-3 minutes. Check
91-
status after each sleep and process any newly-completed bots before sleeping again.
124+
Poll bot status every 60-90 seconds while waiting. Check between productive-waiting
125+
activities rather than sleeping idle. If all remaining bots are slow (Greptile, Codex),
126+
extend to 2-3 minute intervals to reduce API calls.
92127

93128
After pushing fixes, re-check for merge conflicts (the base branch may have advanced
94129
while you were working) and return to polling since bots will re-analyze. Exit when all
95-
review bots have completed and no new actionable feedback remains.
130+
review bots have completed and no new actionable feedback remains. </execution-model>
96131

97-
Use polling with adaptive sleep intervals to check bot status rather than watch mode.
98-
</execution-model>
132+
<productive-waiting>
133+
Don't just sleep while waiting for bots. Use wait time productively:
134+
135+
Codebase exploration:
136+
137+
- Check if the PR changes affect documentation elsewhere (README, API docs, comments
138+
that reference changed behavior). If updates are needed, offer to make them.
139+
- Look for interesting patterns or clever solutions in the changed code worth noting
140+
- Find fun facts about the codebase relevant to the PR
141+
142+
Product thinking (channel your inner AI product manager):
143+
144+
- Brainstorm product ideas inspired by the code you're seeing
145+
- Spot opportunities the PR enables ("Now that we have this notification system, we
146+
could build...")
147+
- Notice UX improvements or feature extensions worth considering
148+
- Think about what users might want next given this new capability
149+
150+
Follow-up tracking:
151+
152+
- Draft GitHub issues for follow-up work discovered during review
153+
- Note technical debt or refactoring opportunities
154+
155+
Share interesting discoveries - "While waiting for Greptile, I noticed this PR removes
156+
the last usage of the old auth pattern. Want me to create an issue to clean up the
157+
deprecated code?" or "This new event system could power a real-time dashboard - want me
158+
to sketch that out?"
159+
160+
If productive-waiting work looks like it will take significant time (documentation
161+
updates, large refactors), check in with the user before starting. The goal is getting
162+
the PR merged, not scope creep. </productive-waiting>
99163

100164
<narration>
101165
While working through the phases, share interesting findings:
@@ -105,8 +169,7 @@ While working through the phases, share interesting findings:
105169
- "Claude wants magic string extraction for a one-time value. Thumbs down, declining."
106170
- "SQL injection risk in search query - security issue, rocket reaction and addressing."
107171

108-
Keep narration brief and informative.
109-
</narration>
172+
Keep narration brief and informative. </narration>
110173

111174
<triage-process>
112175
For each bot comment, ask: "Is this suggestion correct given context I have?"
@@ -115,7 +178,8 @@ Address the suggestion when the bot's analysis is correct given full context. Th
115178
includes bugs, security issues, logic errors, and genuine improvements.
116179

117180
When a bot correctly identifies an issue but suggests a suboptimal fix, address the
118-
underlying issue with the appropriate solution. Credit the bot for the correct diagnosis.
181+
underlying issue with the appropriate solution. Credit the bot for the correct
182+
diagnosis.
119183

120184
Decline with explanation when you can articulate why the bot is wrong:
121185

@@ -127,8 +191,7 @@ Decline with explanation when you can articulate why the bot is wrong:
127191
Valid declines explain why the bot's analysis is incorrect, not why addressing the issue
128192
is inconvenient. If the feedback would improve the code, address it.
129193

130-
Show triage summary with your reasoning, then proceed autonomously.
131-
</triage-process>
194+
Show triage summary with your reasoning, then proceed autonomously. </triage-process>
132195

133196
<feedback-as-training>
134197
Responding to bot comments serves two purposes: record-keeping and training. Bots learn
@@ -150,25 +213,30 @@ Add reactions via API:
150213
<addressing-comments>
151214
Response methods differ by comment type:
152215

153-
PR-level comments (Claude bot):
154-
These live in the issues endpoint. Reply with a new comment on the PR. Group responses
155-
logically - one comment addressing multiple points is fine.
216+
PR-level comments (issues endpoint): Reply with a new comment on the PR. Group responses
217+
logically - one comment addressing multiple points is fine. Claude bot posts here.
156218

157-
Line-level comments (Cursor bot):
158-
These support threaded replies. Reply directly to the comment thread:
219+
Line-level comments (pulls endpoint): These support threaded replies. Reply directly to
220+
the comment thread:
159221
`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies -f body="..."`
160222
This keeps the conversation in context. The reply appears under the original comment,
161-
making it easy for anyone reviewing to see the resolution inline.
223+
making it easy for anyone reviewing to see the resolution inline. Cursor, Codex, and
224+
Greptile bots post here.
162225

163-
For each comment:
226+
For each bot comment, regardless of which bot posted it:
164227

165-
1. Add appropriate reaction first (training signal)
228+
1. Add appropriate reaction (training signal) - this is always required
166229
2. Make the fix if addressing, commit the change
167-
3. Reply acknowledging the change or explaining the decline
230+
3. Reply only when it adds value
231+
232+
Reactions are often sufficient on their own. A heart on a great catch or thumbs-down on
233+
a bad suggestion trains the bot without needing explanation. Reply when:
168234

169-
For declined items, reply with a brief, professional explanation referencing project
170-
standards. The thumbs-down reaction signals disagreement; the reply explains why.
171-
</addressing-comments>
235+
- Declining and the reason isn't obvious from context
236+
- The fix differs from what the bot suggested
237+
- You want to credit a particularly good catch
238+
239+
Keep replies brief. The reaction is the primary signal. </addressing-comments>
172240

173241
<human-comments>
174242
Human reviewer comments get flagged for user attention, not auto-handled. Present
@@ -179,9 +247,15 @@ separately from bot comments.
179247
When all review bot checks have completed and no new actionable feedback remains:
180248

181249
Display prominently:
250+
182251
- PR URL (most important - user may have multiple sessions)
183252
- PR title
184253
- Summary of what was addressed vs declined
254+
- Links to any follow-up GitHub issues created during the review
255+
- Any human comments that still need attention
256+
257+
If you created GitHub issues for follow-up work, list them with brief descriptions so
258+
the user can prioritize them.
185259

186260
Celebrate that the PR is ready to merge. A well-triaged PR is a beautiful thing.
187261
</completion>

0 commit comments

Comments
 (0)