Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions .claude/skills/pull-request/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,19 @@ After `gh pr ready`, enter an autonomous polling loop. Do not wait for the user
### Loop procedure

```text
consecutive_zero = 0

REPEAT:
1. Wait for CI → sleep 30 then gh pr checks <number> --watch
2. If CI fails → fix, /verify, commit, push, GOTO 1
3. Grace period → sleep 180 + adaptive check (see 6b)
4. Read all feedback → unresolved threads only (see 6b)
5. If actionable comments → fix all, /verify, commit, push, reply, resolve, GOTO 1
6. If zero new actionable → check branch protection (see 6f), then STOP ✓
1. Wait for CI → sleep 30 then gh pr checks <number> --watch
2. If CI fails → fix, /verify, commit, push, consecutive_zero=0, GOTO 1
3. Grace period → sleep 180 + adaptive check (see 6b)
4. Re-check pending review checks → gh pr checks <number> — if any still pending, GOTO 3
5. Read all feedback → unresolved threads only (see 6b)
6. If actionable comments → fix all, /verify, commit, push, reply, resolve, consecutive_zero=0, GOTO 1
7. If non-actionable unresolved → reply all explaining why, resolve all, consecutive_zero=0, GOTO 5
8. If zero unresolved threads → consecutive_zero++
if consecutive_zero >= 2 → check branch protection (see 6f), then STOP ✓
else GOTO 3
```

### 6a. Wait for CI
Expand Down Expand Up @@ -200,7 +206,10 @@ gh api repos/$OWNER/$REPO/issues/$PR/comments --paginate | jq 'map({id, user: .u

**Actionable** (must fix): change requests, bug reports, missing tests, security issues, code suggestions.

**Informational** (skip): "LGTM", approvals, "coverage up from X% to Y%", "no issues found", style preferences without a change request.
**Informational** (no code change needed, but must still be addressed):
- Examples: "LGTM", approvals, "coverage up from X% to Y%", "no issues found", style preferences without a change request, false positives (e.g. bot references a file that doesn't exist)
- If the comment is an unresolved **review thread**: reply briefly explaining why no action is needed, then resolve via GraphQL (see `references/monitoring.md`)
- If the comment is a **PR-level or issue comment** (e.g. codecov report, approval message): reply if useful, but these cannot be resolved via GitHub's thread API — they do not count as unresolved threads

### 6c. Fix all actionable comments from this pass

Expand Down Expand Up @@ -237,7 +246,7 @@ Loop back to step 6a. Do not attempt to trigger reviewers — reviews arrive on

### 6f. Stop condition

All CI checks pass **and** a complete polling pass (after the grace period) produces **zero unresolved actionable threads**.
All CI checks pass **and** 2 consecutive polling passes (each after a full grace period) both produce **zero unresolved threads** — this double-pass ensures slow review bots have had time to post before the loop exits.

Before declaring done, check branch protection:

Expand Down