| name | address-bot-comments |
| description | Worker skill for batching PR comments, bot findings, and CI failures; classify each item, fix real issues, reply with parser-recognized wording, and push one coherent update. |
| triggers | ["review loop","bot comments","CI failure","pull request feedback"] |
Address Bot Comments and Review Loop
This is a worker skill, not a reviewer skill. Use it when the orchestrator has batched PR review events for one PR/head SHA.
Core Rule
Do not launch a reviewer for each comment. Process the full batch in one worker run. If you push a fix, the orchestrator will request a single follow-up review after the worker is done.
Snapshot First
Use gh to snapshot the PR before changing code:
gh pr view <pr> --json number,url,title,headRefName,headRefOid,baseRefName,isDraft,mergeStateStatus,reviewDecision
gh pr checks <pr> --json name,state,bucket,link,description
gh api "repos/{owner}/{repo}/issues/<pr>/comments" --paginate
gh api "repos/{owner}/{repo}/pulls/<pr>/comments" --paginate
Use GraphQL for unresolved review threads when available.
Classification
Classify every item before acting:
| Verdict | Meaning | Action |
|---|
| Fix | Real issue | Modify code, tests, docs, or traceability; run checks; push. |
| False Positive | Tool or bot is wrong | Reply with recognized wording and evidence. |
| Intentional | Behavior is by design | Cite ADR, story, or code evidence. |
| Out of Scope | Belongs to another story or PR | Page human if blocking or reviewer is strict. |
Reply Patterns
Use parser-recognized wording from config/worker-reply-patterns.json. The
orchestrator uses the same file to ignore worker replies, so do not invent new
prefixes without updating that config.
Before replying, open the config and choose the matching pattern. Include code,
test, ADR, or story evidence after the required prefix.
CI Handling
When CI fails, diagnose immediately:
- Get current PR head SHA.
- Inspect failed runs and logs.
- Classify as branch-related, flaky, or unrelated.
- Fix deterministic failures in changed areas.
- Rerun flaky failures only within retry budget.
- Push one coherent fix commit.
Escalate after three failed fix attempts for the same CI failure signature.
Thread Resolution
For each thread:
- reply with the classification and evidence,
- reference the fix commit when applicable,
- resolve the thread only after the fix or disposition is complete.
Before marking the PR ready, verify zero unresolved blocking threads remain.
Output
Return a concise summary:
- PR number and head SHA,
- event batch size,
- findings fixed,
- findings declined with reason,
- checks run,
- commits pushed,
- unresolved blockers,
- whether the orchestrator should page a human.