Skill 94 · Copilot PR Autopilot
Subchapter 94.4
references/04-triage.mdMarkdown8 KBView on GitHub
Sub-agent type: general-purpose; budget: 5 min per ≤5 threads
(parent batches in waves of ≤5 if step 3 returned more).
Scripts
LibFrom step 3:
{ thread_id, file, line, author, author_class, severity, summary } per open thread.Table of rows, one per thread:
{ thread_id, action, rationale }Where action ∈ fix | decline | escalate-to-user and
rationale is a single line citing the rule from the rubric below
that fired.
For each thread, apply the rubric in this file in order:
human-or-bot threads default to
escalate-to-user unless the user explicitly scoped them in.copilot threads.Return { thread_id, action, rationale } per thread to the parent;
step 5 consumes only the fix rows, step 8 consumes the full table.
escalate-to-user.
Auto-replying or auto-resolving a human review thread hides
unaddressed concerns and is socially wrong.rationale — one line, concrete.
“Style nit per rubric §Decline” is fine; “looks small” is not.Decision rubric for whether to fix or decline each Copilot finding. The goal is correctness, not appeasement — decline confidently when warranted.
Score every proposed change on two axes, then decide:
| ROI | Risk | Action |
|---|---|---|
| Clear positive | Low | Fix unilaterally. |
| Marginal | Low | Fix if cheap; otherwise decline with rationale. |
| Clear positive | High / Irreversible | Propose to the user first. |
| Marginal | High | Decline. |
| Negative (over-engineering for hypothetical) | Any | Decline. |
Each thread’s author (returned by 03-list-open-threads.ps1) drives
who can decide it:
| Reviewer | Default action |
|---|---|
copilot-pull-request-reviewer / copilot-pull-request-reviewer[bot] | Loop-owned — triage with the rubric below. (03-list-open-threads.ps1 reports the raw author.login, which may carry the [bot] suffix on some surfaces; match both forms.) |
| Human reviewer | Default escalate-to-user unless the user explicitly scoped them into the loop. Auto-replying or auto-resolving a human thread can hide unaddressed concerns and is socially wrong. |
github-advanced-security / other automated bots | Default escalate-to-user unless the project has a documented suppression / fix convention you can follow. |
Some findings are decided by project policy, not by general
correctness reasoning. Before applying a generic “fix”, research
the repo’s own conventions first — .github/instructions/*.md
files (often have an applyTo glob that pins them to the changed
file’s path), .github/skills/, AGENTS.md, CONTRIBUTING.md, CI
config, and recent commits to similar files. Fan out multiple
explore sub-agents when several axes need checking (lint, format,
spell-check, license header, etc.) — don’t invent answers. What
looks like an obvious fix may violate a project rule:
check-spelling, cspell, typos, or similar),
inspect its config and recent commits to learn the local
convention (reword the document, add a pattern/regex, extend a
dictionary/allowlist, use an inline ignore). Follow that
convention; don’t invent a new mechanism.Cite the project’s config file or convention in your reply.
Failure mode: round N “fixes” what comment A asked for; round N+1 comment B objects and asks to revert it. Blindly flip-flopping ships oscillation and burns rounds.
Resolution rules — apply in order, stop at the first that fires:
Hard stop: if you are about to make the same edit you reverted in an earlier round, stop and escalate. That is the unambiguous signature of an oscillation loop.
Every reply — fix or decline — states the reasoning. This makes the PR self-documenting and gives the next review visible context. Declined findings cite the prior round and explain why the existing form is correct, so the next reviewer doesn’t raise it again.
Stay in autopilot by default; escalate to the user when:
Otherwise, decide and proceed.