TriageBotComments Workflow
Steps
1. Fetch Unresolved Bot Threads
python3 "<skill-dir>/scripts/fetch_bot_reviews.py"
# or with explicit PR
python3 "<skill-dir>/scripts/fetch_bot_reviews.py" --pr <number>
If no bot threads found, report “No unresolved bot comments” and stop.
2. Analyze Each Comment
For each thread:
- Read the referenced code at the file/line from the thread
- Classify:
bug,duplication,style,refactor,incorrect - Judge severity:
high,medium,low - Determine recommendation:
fixordiscard
Verify every claim against actual code. Bots frequently misread context.
3. Present Recommendations
Show a compact numbered summary:
## Bot Comment Triage — PR #<number>
| # | File:Line | Bot | Category | Severity | Recommendation |
|---|-----------|-----|----------|----------|----------------|
| 1 | src/auth.go:42 | golangci-lint | bug | high | fix |
| 2 | src/util.go:18 | copilot | style | low | discard |
| 3 | src/api.go:99 | coderabbit | incorrect | - | discard |
### Details
**1. src/auth.go:42** — golangci-lint flagged unchecked error return
Severity: high — real bug, error is silently dropped
→ Recommend: fix
**2. src/util.go:18** — copilot suggests renaming variable
Severity: low — current name is fine in context
→ Recommend: discard
**3. src/api.go:99** — coderabbit claims unused parameter
Severity: n/a — parameter IS used on line 105, bot misread
→ Recommend: discard as incorrect
Ask user which items to fix (if not already specified).
4. Apply Selected Fixes
For each chosen fix:
- Make the code change
- Run any relevant formatter
- Run the smallest useful test set
5. Reply and Resolve
For every targeted thread, post a professional reply:
Fixed:
Fixed — [brief description of what changed].
Discarded as incorrect:
Keeping current code — [brief explanation why suggestion doesn't apply].
Discarded as optional:
Acknowledged — keeping current approach [brief reason].
Then resolve the thread:
gh api repos/{owner}/{repo}/pulls/{pr}/comments/{comment_id}/replies -f body="<reply>"
gh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "<thread_id>"}) { thread { id isResolved } } }'
6. Verify
Run the fetch script again and confirm targeted threads are resolved.