github/awesome-copilot / skills/copilot-pr-autopilot
copilot-pr-autopilot
VerifiedCopilot left 14 review comments on your PR — half are nits. Hours of fix → reply → resolve → re-request, and each round lands MORE comments. This skill runs loop engineering: auto-triggers Copilot Code Review via GraphQL (no @copilot mention), triages every open thread (Copilot, humans, advanced-security) with a fix / decline / escalate rubric, dispatches parallel fix sub-agents that obey the repo build/test/lint conventions, commits per iteration, replies+resolves citing the pushed SHA, then re-triggers until HEAD is reviewed with zero threads awaiting the agent's reply (remaining open threads are explicit hand-offs to the human — escalated declines, design tradeoffs). You merge a clean PR; the bot runs it. Trigger phrases: "address copilot comments", "run a copilot review loop", "fix this PR", "iterate on copilot feedback". Repo-agnostic, gh CLI + PowerShell. Full autopilot needs repo Triage/Write; external PR authors get single-iteration mode plus manual re-trigger (UI 🔄 or substantive-commit push).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.6 KB |
| references/01-request-review.md | markdown | 1.4 KB |
| references/02-wait.md | markdown | 1.7 KB |
| references/03-list-threads.md | markdown | 1.7 KB |
| references/04-triage.md | markdown | 8.0 KB |
| references/05-fix.md | markdown | 2.4 KB |
| references/06-build-test.md | markdown | 2.1 KB |
| references/07-commit-push.md | markdown | 712 B |
| references/08-reply-resolve.md | markdown | 3.8 KB |
| references/09-convergence.md | markdown | 10.5 KB |
| references/10-cleanup.md | markdown | 707 B |
| references/api-quirks.md | markdown | 8.4 KB |
| references/orchestration.md | markdown | 6.1 KB |
| scripts/01-request-review.ps1 | script | 13.2 KB |
| scripts/02-check-review-status.ps1 | script | 17.4 KB |
| scripts/03-list-open-threads.ps1 | script | 4.0 KB |
| scripts/08-reply-and-resolve.ps1 | script | 3.3 KB |
| scripts/09-review-round.ps1 | script | 5.5 KB |
| scripts/10-cleanup-outdated.ps1 | script | 17.7 KB |
| scripts/_lib.ps1 | script | 15.5 KB |
| templates/reply-decline.md | markdown | 871 B |
| templates/reply-drift.md | markdown | 317 B |
| templates/reply-fix.md | markdown | 839 B |
| templates/reply-partial.md | markdown | 376 B |
references/08-reply-resolve.md
View on GitHub# Step 8: Reply (always) + resolve (conditional)
Sub-agent type: `general-purpose` **drafts** the reply bodies; the
**parent** posts them (mutations stay parent-owned). Budget for the
drafting sub-agent: 5 min.
Runs AFTER step 7 (commit + push) so every reply can cite the
**pushed commit SHA**.
## Inputs
- The full triage table from step 4 — `{ thread_id, action,
rationale }` per open thread (including `escalate-to-user`).
- The pushed `HeadOid` from step 7.
- The per-thread fix `summary` and `files_touched` from step 5 (for
`fix` rows).
## Return contract
One row per open thread:
```
{ thread_id, action, reply_body }
```
Where `action` ∈ `fix` | `decline` | `escalate-to-user`. The parent
consumes this to drive the resolve/no-resolve decision (see
Procedure).
## Procedure
1. **Drafting sub-agent** produces a `reply_body` per thread by
selecting the appropriate template (see [#templates](#templates))
based on the triage `action`. Cite the pushed SHA from step 7 in
`fix` replies. For `escalate-to-user`, explain the disposition and
the open question for the human merge owner; do not promise a
resolve.
2. **Parent posts each reply**, choosing whether to resolve:
```pwsh
pwsh ./scripts/08-reply-and-resolve.ps1 -ThreadId <id> -Body <text>
```
- `action ∈ { fix, decline }` → run as above (resolve happens).
- `action == escalate-to-user` → **add `-NoResolve`** so the thread
stays open for the human:
```pwsh
pwsh ./scripts/08-reply-and-resolve.ps1 -ThreadId <id> -Body <text> -NoResolve
```
## Gotchas
- **Reply to every open thread; resolve only when the loop owns the
disposition** (`fix` or `decline`). Resolving without a reply
leaves no record of why the issue was considered addressed.
- **Escalated threads stay open *with our reply* explaining the
disposition.** They're explicit hand-offs to the human merge
owner, not loop failures — that's why convergence in step 9 can
succeed with `OpenThreadCount > 0`.
- **Mutations are parent-owned.** The sub-agent only drafts; it never
posts. This keeps the audit trail of mutations on the parent and
avoids double-post races between concurrent sub-agents.
- **Cite the pushed SHA, not a local commit.** Step 7's recorded
`HeadOid` is the only SHA reviewers can browse to.
- **Reply hygiene matters for the next round.** Declines that don't
cite reasoning get re-raised by the next Copilot review. See
[04-triage.md](04-triage.md#reply-hygiene).
## Templates
Pick by triage action:
| Triage action | Template |
|---------------|----------|
| `fix` | [reply-fix.md](../templates/reply-fix.md) |
| `decline` | [reply-decline.md](../templates/reply-decline.md) |
| PR-description / comment drift acknowledgement | [reply-drift.md](../templates/reply-drift.md) |
| Partial fix with deferred follow-up | [reply-partial.md](../templates/reply-partial.md) |
For `escalate-to-user`, there is no template — write a bespoke reply
explaining the disposition and the open question, then post with
`-NoResolve` so the thread stays open.
## Reply guidance
The reply has to do real work — it documents the decision for future
maintainers and shapes what the next Copilot review will surface.
Be **concrete** (cite file paths, commit SHAs, function names),
**direct** (no hedging when you have a position), and **brief** (2–4
sentences is typical). Long replies usually mean the round should
have been broken up.
### Anti-patterns — DO NOT use
- ❌ `"Thanks!"` / `"Good point."` with no substance.
- ❌ `"Will fix later."` Either fix it now or decline with rationale;
deferred fixes that aren't tracked anywhere get lost.
- ❌ Resolve-without-reply. The next reviewer cannot reconstruct why
the thread was closed.
- ❌ `"I disagree."` with no reasoning. State the actual technical
disagreement.Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 469k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |