Add copilot-pr-autopilot skill#1944
Conversation
🔍 Skill Validator Results
Summary
Full validator output |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds the new copilot-pr-autopilot skill, including PowerShell automation scripts and reference docs to drive a “request review → wait → triage → fix → reply/resolve → converge” loop using the gh CLI + GitHub GraphQL.
Changes:
- Introduces shared PowerShell helpers (
_lib.ps1) and several workflow scripts (request review, snapshot status, list threads, reply/resolve, cleanup outdated). - Adds detailed operational documentation (workflow, API quirks, triage rubric, reply templates) for consistent agent behavior.
- Registers the new skill in
docs/README.skills.md.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| skills/copilot-pr-autopilot/scripts/_lib.ps1 | Adds shared gh prerequisite checks and wrappers (Invoke-Gh, Invoke-GhGraphQL, Resolve-RepoCoords) used by all scripts. |
| skills/copilot-pr-autopilot/scripts/01-request-review.ps1 | Requests Copilot review via GraphQL and verifies via copilot_work_started event polling. |
| skills/copilot-pr-autopilot/scripts/02-check-review-status.ps1 | Produces a JSON snapshot of PR review state + convergence signals for polling logic. |
| skills/copilot-pr-autopilot/scripts/03-list-open-threads.ps1 | Lists unresolved review threads (all reviewers) for downstream triage. |
| skills/copilot-pr-autopilot/scripts/08-reply-and-resolve.ps1 | Posts a reply to a review thread and optionally resolves it. |
| skills/copilot-pr-autopilot/scripts/10-cleanup-outdated.ps1 | Bulk-resolves outdated Copilot threads as a post-convergence safety net. |
| skills/copilot-pr-autopilot/references/workflow.md | Documents the loop, delegation map, budgets, and operational contracts. |
| skills/copilot-pr-autopilot/references/api-quirks.md | Captures verified GitHub API/gh quirks that drive implementation choices. |
| skills/copilot-pr-autopilot/references/03-triage-criteria.md | Defines fix/decline/escalate rubric and reviewer-type policy. |
| skills/copilot-pr-autopilot/references/06-reply-templates.md | Provides reply templates and anti-patterns for thread responses. |
| skills/copilot-pr-autopilot/SKILL.md | Defines the skill, prerequisites, workflow, and troubleshooting guidance. |
| docs/README.skills.md | Adds the skill entry and links to its references/scripts. |
c7b2a60 to
b73d67f
Compare
3d3642a to
04067ae
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
skills/copilot-pr-autopilot/scripts/01-request-review.ps1:1
- The thrown/printed error text includes raw
ghstderr/body strings ($rawMsg,$r.Stderr,$rb.Stderr) without passing through the credential redactor. If an operator runs withgh --verbose/GH_DEBUG=apior a GitHub error response echoes authorization-like values, this can leak secrets into CI logs. Fix by running these fields throughProtect-CopilotPrAutopilotCredentials(or the sharedFormat-CopilotPrAutopilotErrorPreview) before embedding them inthrow/Write-Warningmessages.
<#
Skill that drives any GitHub pull request through repeated rounds of Copilot Code Review until the agent has either resolved every thread or explicitly escalated it to the human. Triggered via GraphQL (no @copilot mention needed), triages every open thread with a fix / decline / escalate rubric, replies and resolves each thread citing the pushed SHA, then re-triggers until HEAD is reviewed with zero threads awaiting the agent's reply. Includes step scripts (01 request-review, 02 check-review-status, 03 list-open-threads, 08 reply-and-resolve, 10 cleanup-outdated), shared library (_lib.ps1) with gh-CLI wrappers (Invoke-Gh, Invoke-GhGraphQL, ConvertFrom-GhJson, Assert-GhReady), reply templates, and reference docs for each step. Repo-agnostic. Requires gh CLI on PATH and repo Triage/Write for full autopilot; external PR authors get single-iteration mode with manual re-trigger via the UI re-request button or a substantive push. Co-authored-by: Copilot <[email protected]>
aaronpowell
left a comment
There was a problem hiding this comment.
Interesting idea, but a couple of observations:
- Why are some of the steps in the
orchestration.mdfile and others are on their own? Wouldn't it be clearer if they are all separate? templatesfolder should beassets- I worry about turn count - doesn't this run the risk of getting itself into a loop?
Adds
skills/copilot-pr-autopilot/— runs the Copilot Code Review → fix → reply+resolve → re-trigger loop on a PR until HEAD is reviewed with zero open Copilot threads.Repo-agnostic (discovers build/test/lint from
CONTRIBUTING/AGENTS/package.json/Makefile). Bundles 10 PowerShell scripts (one per step) + per-step reference docs.Permissions: the full multi-round autopilot needs repo Triage or Write (GitHub's
requestReviewsByLoginis the only public API for bot reviewers and is gated on that). External PR authors get a documented-SingleIterationmode plus manual re-trigger between iterations (UI 🔄 button orsynchronize-event push). SeeSKILL.md → Prerequisites → Permissionsfor the full matrix.Validation:
npm run skill:validate✅,npm run build✅,bash eng/fix-line-endings.sh✅.