[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AD7AWHGFY5HTAWG4ND6EMP":3,"skill-same:01M6AD7AWHGFY5HTAWG4ND6EMP":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":52,"updatedAt":53,"install":54,"resources":67},"01M6AD7AWHGFY5HTAWG4ND6EMP","pr-finisher",null,"Prepare an open pull request for merge from a GitHub Copilot cloud agent. Drives Reviews, local validation, and Mergeable to a ready state. Does not merge, and cannot trigger CI.","github\u002Fgh-aw","github","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F9919?v=4","01M6AC83DS133TPXFSP1DHNCC6","GitHub","01M6AD3VCZ4WKQSFSRTPN7N9DN",5636,"MIT","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpr-finisher\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,9,31,32,33,34,35,36,37,38],"pr","pr finisher","cloud","request","for","reviews","trigger","local","ready","open","open pull request","ci","pull","state","validation","pull request","copilot","prepare","merge","github copilot","2026-11-10 10:12:30",false,"---\nname: pr-finisher\ndescription: Prepare an open pull request for merge from a GitHub Copilot cloud agent. Drives Reviews, local validation, and Mergeable to a ready state. Does not merge, and cannot trigger CI.\n---\n\n# PR Finisher\n\nDrive an open PR for the current branch to a merge-ready state from a **GitHub Copilot cloud agent**. **Do not merge.** When everything you can act on is done, report ready-for-human-merge and stop.\n\n## Execution context\n\nThis skill runs inside a GitHub Copilot cloud agent, not on a developer's machine.\n\n- **The agent's pushes do not trigger CI.** Workflows on the PR will not re-run after the agent commits. Any existing `statusCheckRollup` reflects an earlier HEAD and goes stale the moment the agent pushes.\n- **Commit and push on every iteration that changes files.** Changes that are not pushed are not available to the user.\n- **Local `make` targets are the agent's authoritative correctness signal** before push. CI is observational only.\n- **Re-running CI is a hand-off to a human** (close\u002Freopen the PR, `workflow_dispatch`, or a push from a maintainer). The agent must surface this in its summary.\n- **No watch \u002F no sleep loops.** The agent has no async wait state; one pass + summary + stop.\n\n## Three merge-ready conditions\n\nA PR is merge-ready when **all three** are satisfied. Work them **concurrently**.\n\n| Condition | Definition | Agent's signal |\n|---|---|---|\n| **Reviews** | Every unresolved in-scope review thread is addressed on its merits, replied to, and resolved, including GitHub Actions bot threads\u002Fcomments (`github-actions[bot]`). Code changes alone do not satisfy this. Threads where Copilot has already replied with a substantive answer must be resolved before delegating to `copilot-review`. | `copilot-review` skill + GraphQL `reviewThreads` |\n| **Checks** | Local formatting, lint, and impacted unit tests pass; broader tests run when required by affected code or prior CI failures. Last-known CI failures reviewed at log level. | `make` targets locally; `gh pr checks` \u002F `gh run view --log-failed` for prior runs |\n| **Mergeable** | PR is OPEN, not draft, `mergeable: MERGEABLE`, not `BEHIND` if the repo requires up-to-date branches. | `gh pr view --json mergeable,mergeStateStatus,state,isDraft` |\n\nBecause the agent cannot re-trigger CI, \"Checks\" is satisfied at the agent's level when **local validation passes and prior CI failures have been root-caused and fixed in the pushed commits**. Final green CI requires a human to re-trigger after the agent stops.\n\nTop-level PR comments and review bodies are useful feedback but **not** a merge gate. Read and action useful ones; do not block on them.\n\n## Hard rules\n\n- **Autopilot mode**: Never ask for confirmation before taking action. Never prompt with \"Should I proceed?\", \"Do you want me to…?\", or any equivalent. Always act immediately and autonomously.\n- **Do not merge.** Never run `gh pr merge`, enable auto-merge, or enqueue. This skill stops at \"ready for merge.\"\n- **Do not post stand-alone PR comments.** Only reply on existing review threads \u002F comments that need a response. Do not ping reviewers or CODEOWNERS.\n- **Always disable pagers** for `gh`: prefix with `GH_PAGER=\"\"` or pipe through `cat`. Without this, commands hang in non-interactive shells.\n- **Read PR state once per pass and reuse it.** Cache the initial `gh pr view` payload in a local snapshot file and use `jq` against that file until you perform an action that can change PR state (for example: push, update branch, resolve conflicts). Do not re-run overlapping `gh pr view` calls within the same unchanged turn sequence.\n- **Ignore platform-managed bot PRs by default.** Stop without updating PRs authored by `dependabot[bot]`, `app\u002Fdependabot`, `renovate[bot]`, or another unrecognized bot unless the user explicitly asks to handle that bot. Continue for trusted GitHub automation such as `app\u002Fgithub-copilot` and `github-actions[bot]`.\n- **Never wait for CI to re-run.** No `bash sleep`, no `gh run watch`, no `gh pr checks --watch`, no re-check loop after push. The agent's pushes will not trigger workflows; waiting is futile.\n- **Local validation is non-negotiable before each push.** Because CI will not re-run, the only correctness gate the agent gets is `make ...` locally. Treat a green local run as the bar.\n- **Commit and push every iteration that produces file changes.** Unpushed changes are not visible to the user.\n- **Reviews are not done until reply + resolve both succeed.** Code change alone ≠ thread handled.\n- **Smallest fix that works.** Don't change unrelated code. Fix lint before tests.\n- **Pre-existing unrelated failures** → identify explicitly in the summary; do not guess-fix.\n\n## CI-fix anti-patterns (do not do these)\n\nA failing CI step is a signal, not a nuisance. Even though the agent cannot re-run CI to confirm, the following are **forbidden** and should trigger `ask_user` instead:\n\n- Disabling, skipping, or neutering shared tooling (build caches, lint rules, type checks, env vars, required checks) to make a failure go away.\n- \"Temporary\" disables with a TODO to re-enable later. They outlive the PR and become permanent.\n- Lowering coverage thresholds, removing assertions, or loosening a test until it passes. If the test is wrong about product behavior, fix its **logic** (assertions, fixtures, setup); don't relax it.\n- Bundling a workaround with a real fix (\"belt and suspenders\"). Ship one real fix or escalate. Never both.\n- Special-casing one OS\u002Frunner to hide a failure on that platform.\n\n**Anti-pattern test:** if the change would make the failure invisible on future PRs without solving it, stop and escalate.\n\n**Before declaring a tool broken on a platform:** reproduce locally, check version\u002Fconfig, look for transient causes (timeouts, network, runner state). Most \"X is broken on macOS\u002FWindows\" reports are transient flakes on healthy tooling.\n\n**For flaky infra** (caches, registries, runners): prefer narrow fixes — targeted retry, higher timeout, pre-flight health check. If a narrow fix doesn't land in one or two attempts, escalate via `ask_user`.\n\n## Workflow\n\nThe agent runs this once. There is no monitoring loop.\n\n### 1. Triage\n\n```bash\nmkdir -p \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\nPR_SNAPSHOT=\u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Fpr-state.json\nGH_PAGER=\"\" gh pr view \u003Cnumber> --json author,state,isDraft,reviewDecision,mergeable,mergeStateStatus,statusCheckRollup,headRefOid,reviews,comments > \"$PR_SNAPSHOT\"\nGH_PAGER=\"\" gh api graphql --paginate --slurp \\\n  -f query='query($owner:String!,$repo:String!,$pr:Int!,$endCursor:String){repository(owner:$owner,name:$repo){pullRequest(number:$pr){reviewThreads(first:100,after:$endCursor){pageInfo{hasNextPage endCursor} nodes{id isResolved comments(first:100){pageInfo{hasNextPage} nodes{author{login} authorAssociation body createdAt url}}}}}}}' \\\n  -f owner=github -f repo=gh-aw -F pr=\u003Cnumber> \\\n  > \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Freview-threads.json\njq -s '.[0] + {reviewThreads: [.[1][] | .data.repository.pullRequest.reviewThreads.nodes[] | . + {comments: .comments.nodes, commentsPageInfo: .comments.pageInfo}]}' \\\n  \"$PR_SNAPSHOT\" \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Freview-threads.json \\\n  > \"$PR_SNAPSHOT.tmp\" && mv \"$PR_SNAPSHOT.tmp\" \"$PR_SNAPSHOT\"\nGH_PAGER=\"\" gh pr checks \u003Cnumber>\n```\n\n`reviewThreads` is not a supported `gh pr view --json` field. The GraphQL data\nabove is flattened into the snapshot shape used by `copilot-review`. If a thread's\n`commentsPageInfo.hasNextPage` is true, fetch its remaining comments before judging\nwhether it is addressed. Do not treat truncated or failed reads as resolved feedback.\n\nIf merged\u002Fclosed, report and stop. Also stop if the author is a platform-managed dependency bot or another unrecognized bot, unless the user explicitly requested handling that bot-authored PR. This author gate is independent of reviewer eligibility. Otherwise classify each condition as ✅ \u002F ❌ \u002F ⏳ \u002F ❓ using the snapshot file plus `gh pr checks`. The CI snapshot here is your **only** view of CI for this run — capture which checks failed and why before changing anything, because after you push it will be stale.\n\n### 2. Address Reviews\n\n#### 2a. Resolve Copilot-answered threads\n\nBefore delegating to `copilot-review`, find review threads where Copilot has already replied with a substantive answer but the thread has not yet been marked as resolved. Resolve those threads immediately — no code changes are needed for them.\n\n```bash\n# Identify unresolved threads that already have a Copilot reply\njq '.reviewThreads[]? | select(.isResolved==false) | select(any(.comments[]?; .author.login == \"app\u002Fgithub-copilot\" or (.author.login | test(\"copilot\"; \"i\"))))' \"$PR_SNAPSHOT\"\n```\n\nFor each such thread:\n- Confirm the Copilot reply is substantive and actually addresses the concern (not merely an acknowledgment or partial response).\n- If the reply fully addresses the concern, resolve the thread.\n- If the reply is incomplete or the concern is not satisfied, treat the thread as still open and address it in step 2b below.\n\n#### 2b. Address remaining unresolved threads\n\nDelegate to the `copilot-review` skill and treat that delegation as mandatory, not optional. Insist on full handling of each remaining unresolved in-scope thread (including `github-actions[bot]`): make change → run relevant local validation → commit → push → reply → resolve. A thread is not handled until reply + resolve both succeed.\n\nBefore editing, reuse the triage snapshot instead of fetching the same PR again:\n\n```bash\njq '{reviews,reviewThreads,comments}' \"$PR_SNAPSHOT\"\njq '.reviewThreads[]? | select(.isResolved==false)' \"$PR_SNAPSHOT\"\n```\n\nWhen reviewing collected feedback, apply reviewer scoping from `copilot-review`: trusted automation and team\u002Fcollaborator reviewers only. Ignore non-team-member feedback.\n\n### 3. Address Mergeable\n\n```bash\njq '{state,isDraft,mergeable,mergeStateStatus,reviewDecision,headRefOid}' \"$PR_SNAPSHOT\"\n```\n\n- `CONFLICTING` → resolve conflicts using the repo's conventions. If you cannot determine the correct resolution, `ask_user`.\n- `mergeStateStatus: BEHIND` → update branch from base. After updating, scan the new commits for tooling drift (lockfiles, toolchains, lint configs); re-run installs if manifests changed, and flag drift in the summary so any new errors read as drift, not regressions.\n- Refresh `PR_SNAPSHOT` only after you perform a state-changing action that can invalidate it. Otherwise keep reusing the original file for the rest of the pass.\n\n### 4. Address Checks (local + prior CI)\n\n**Local validation** — the agent's only correctness signal. Batch related review,\nmergeability, and CI fixes before the final gate. Use focused tests while editing;\ndo not repeat the full gate for each thread or run both standalone `test-unit` and\nthe progress gate on the same unchanged files. Run in order; fix failures before\nmoving on:\n\n```bash\nmake fmt\nmake lint\nmake agent-report-progress\n```\n\nThe progress gate includes impacted `test-unit` coverage and workflow drift checks.\nRun `make test` when the affected code or a prior failing CI job requires its\nbroader coverage, not on every no-change finisher pass. Run `make recompile` after\nworkflow markdown changes. If nothing changed and all blockers are already\naddressed, reuse prior validation only when its recorded SHA matches the current\n`headRefOid`, and stop instead of repeating validation or producing an empty commit.\n\nIf a `make test` fix changes wasm compiler output, or wasm golden tests fail:\n\n```bash\nmake update-wasm-golden\n```\n\nThen re-run the affected tests.\n\nIf model-routing golden tests fail after an intentional audit-output change:\n\n```bash\nmake verify-model-routing-golden\nmake update-model-routing-golden\n```\n\nReview the fixture and every regenerated `expected*.json` diff before accepting\nthe change. For a new run, follow `.github\u002Fskills\u002Fmodel-routing-golden\u002FSKILL.md`\nand require the capture tool's full-download versus minimized-fixture comparison\nto pass.\n\n**Prior CI failures** — for each failure captured during triage, pull logs and fix the root cause:\n\n```bash\nGH_PAGER=\"\" gh run view \u003Crun_id> --log-failed\n```\n\nClassify as: real product\u002Ftest bug, infra flake, or third-party flake. Apply the fix in the agent's commits and, where possible, **reproduce the fix locally** via the matching `make` target. If the failure can't be reproduced locally (infra-only), state that in the summary so the human re-triggers CI with eyes open. Per anti-pattern rules: 1–2 narrow attempts, then `ask_user`.\n\n### 5. Commit, push, and stop\n\nAfter each iteration that changes files, commit and push immediately. Before stopping, ensure there are no uncommitted or unpushed changes left. **Do not re-check `gh pr checks` expecting a new run.** Print the summary and stop.\n\n## Summary format\n\nAt the stopping point, print:\n\n```\n- ✅ Reviews — \u003Cplain language>\n- ✅ Checks (local) — \u003Cplain language>\n- \u003Cstatus> Checks (CI) — stale after agent push; needs human re-trigger. Prior failures: \u003Cfixed | open | not reproducible locally>\n- ✅ Mergeable — \u003Cplain language>\n\nActions taken: \u003Cwhat changed in this run>\nHand-off: CI must be re-triggered by a maintainer (close\u002Freopen PR, workflow_dispatch, or push) before merge.\nStill needed: \u003Chuman review, anything not actionable from the agent>\n```\n\nStatus vocabulary:\n- ✅ satisfied — checked and passing\n- ❌ failing — checked and failing\n- ⏳ pending — running, waiting for signal (rare for the agent; never use for the post-push CI state)\n- ❓ unknown — could not be checked (API error, indeterminate, or CI stale after agent push). Never use ❌ for this.\n\n**Translate status into plain language.** Don't write bare labels. Always state explicitly that CI on the agent's HEAD is unverified until a human re-triggers it.\n\n## Stopping conditions\n\n- **Ignored bot-authored PR** — platform-managed dependency bot or another unrecognized bot, without an explicit user request to handle it. Report no action and stop.\n- **Ready for merge (pending human CI re-trigger)** — local validation green, Reviews resolved, Mergeable clean. Summarize and stop.\n- **Nothing actionable remains** — non-actionable blocker (human approval, external service). Summarize and stop.\n- **Truly stuck** — unresolvable conflicts, ambiguous feedback, irreproducible failures. `ask_user` with context.\n\n## Completion standard\n\nFor eligible PRs, the task is complete only when all are true:\n\n- `make fmt`, `make lint`, `make test-unit` all pass (or unrelated pre-existing failures explicitly identified).\n- The PR author passed the bot eligibility check, or the user explicitly requested handling that bot-authored PR.\n- `make test` was run and fixed when it was part of the failing state; wasm goldens regenerated when required.\n- The `copilot-review` skill addressed all in-scope review threads, including GitHub Actions bot review comments\u002Fthreads (`github-actions[bot]`) (reply + resolve succeeded for each).\n- Review threads where Copilot had already replied with a substantive answer were resolved (step 2a) before delegating unresolved threads to `copilot-review` (step 2b).\n- Mergeable condition was checked; conflicts resolved and `BEHIND` updated when present.\n- Prior CI failures were inspected at the log level and either fixed at the root cause (with a local reproduction where possible) or explicitly flagged as not locally reproducible \u002F escalated.\n- Every iteration that changed files was committed and pushed, and no local changes were left unpushed at stop. No post-push re-check loop.\n- A structured ✅\u002F❌\u002F⏳\u002F❓ summary was printed, including an explicit hand-off line for the human CI re-trigger.\n- No `gh pr merge` was run.\n","# PR Finisher\n\nDrive an open PR for the current branch to a merge-ready state from a **GitHub Copilot cloud agent**. **Do not merge.** When everything you can act on is done, report ready-for-human-merge and stop.\n\n## Execution context\n\nThis skill runs inside a GitHub Copilot cloud agent, not on a developer's machine.\n\n- **The agent's pushes do not trigger CI.** Workflows on the PR will not re-run after the agent commits. Any existing `statusCheckRollup` reflects an earlier HEAD and goes stale the moment the agent pushes.\n- **Commit and push on every iteration that changes files.** Changes that are not pushed are not available to the user.\n- **Local `make` targets are the agent's authoritative correctness signal** before push. CI is observational only.\n- **Re-running CI is a hand-off to a human** (close\u002Freopen the PR, `workflow_dispatch`, or a push from a maintainer). The agent must surface this in its summary.\n- **No watch \u002F no sleep loops.** The agent has no async wait state; one pass + summary + stop.\n\n## Three merge-ready conditions\n\nA PR is merge-ready when **all three** are satisfied. Work them **concurrently**.\n\n| Condition | Definition | Agent's signal |\n|---|---|---|\n| **Reviews** | Every unresolved in-scope review thread is addressed on its merits, replied to, and resolved, including GitHub Actions bot threads\u002Fcomments (`github-actions[bot]`). Code changes alone do not satisfy this. Threads where Copilot has already replied with a substantive answer must be resolved before delegating to `copilot-review`. | `copilot-review` skill + GraphQL `reviewThreads` |\n| **Checks** | Local formatting, lint, and impacted unit tests pass; broader tests run when required by affected code or prior CI failures. Last-known CI failures reviewed at log level. | `make` targets locally; `gh pr checks` \u002F `gh run view --log-failed` for prior runs |\n| **Mergeable** | PR is OPEN, not draft, `mergeable: MERGEABLE`, not `BEHIND` if the repo requires up-to-date branches. | `gh pr view --json mergeable,mergeStateStatus,state,isDraft` |\n\nBecause the agent cannot re-trigger CI, \"Checks\" is satisfied at the agent's level when **local validation passes and prior CI failures have been root-caused and fixed in the pushed commits**. Final green CI requires a human to re-trigger after the agent stops.\n\nTop-level PR comments and review bodies are useful feedback but **not** a merge gate. Read and action useful ones; do not block on them.\n\n## Hard rules\n\n- **Autopilot mode**: Never ask for confirmation before taking action. Never prompt with \"Should I proceed?\", \"Do you want me to…?\", or any equivalent. Always act immediately and autonomously.\n- **Do not merge.** Never run `gh pr merge`, enable auto-merge, or enqueue. This skill stops at \"ready for merge.\"\n- **Do not post stand-alone PR comments.** Only reply on existing review threads \u002F comments that need a response. Do not ping reviewers or CODEOWNERS.\n- **Always disable pagers** for `gh`: prefix with `GH_PAGER=\"\"` or pipe through `cat`. Without this, commands hang in non-interactive shells.\n- **Read PR state once per pass and reuse it.** Cache the initial `gh pr view` payload in a local snapshot file and use `jq` against that file until you perform an action that can change PR state (for example: push, update branch, resolve conflicts). Do not re-run overlapping `gh pr view` calls within the same unchanged turn sequence.\n- **Ignore platform-managed bot PRs by default.** Stop without updating PRs authored by `dependabot[bot]`, `app\u002Fdependabot`, `renovate[bot]`, or another unrecognized bot unless the user explicitly asks to handle that bot. Continue for trusted GitHub automation such as `app\u002Fgithub-copilot` and `github-actions[bot]`.\n- **Never wait for CI to re-run.** No `bash sleep`, no `gh run watch`, no `gh pr checks --watch`, no re-check loop after push. The agent's pushes will not trigger workflows; waiting is futile.\n- **Local validation is non-negotiable before each push.** Because CI will not re-run, the only correctness gate the agent gets is `make ...` locally. Treat a green local run as the bar.\n- **Commit and push every iteration that produces file changes.** Unpushed changes are not visible to the user.\n- **Reviews are not done until reply + resolve both succeed.** Code change alone ≠ thread handled.\n- **Smallest fix that works.** Don't change unrelated code. Fix lint before tests.\n- **Pre-existing unrelated failures** → identify explicitly in the summary; do not guess-fix.\n\n## CI-fix anti-patterns (do not do these)\n\nA failing CI step is a signal, not a nuisance. Even though the agent cannot re-run CI to confirm, the following are **forbidden** and should trigger `ask_user` instead:\n\n- Disabling, skipping, or neutering shared tooling (build caches, lint rules, type checks, env vars, required checks) to make a failure go away.\n- \"Temporary\" disables with a TODO to re-enable later. They outlive the PR and become permanent.\n- Lowering coverage thresholds, removing assertions, or loosening a test until it passes. If the test is wrong about product behavior, fix its **logic** (assertions, fixtures, setup); don't relax it.\n- Bundling a workaround with a real fix (\"belt and suspenders\"). Ship one real fix or escalate. Never both.\n- Special-casing one OS\u002Frunner to hide a failure on that platform.\n\n**Anti-pattern test:** if the change would make the failure invisible on future PRs without solving it, stop and escalate.\n\n**Before declaring a tool broken on a platform:** reproduce locally, check version\u002Fconfig, look for transient causes (timeouts, network, runner state). Most \"X is broken on macOS\u002FWindows\" reports are transient flakes on healthy tooling.\n\n**For flaky infra** (caches, registries, runners): prefer narrow fixes — targeted retry, higher timeout, pre-flight health check. If a narrow fix doesn't land in one or two attempts, escalate via `ask_user`.\n\n## Workflow\n\nThe agent runs this once. There is no monitoring loop.\n\n### 1. Triage\n\n```bash\nmkdir -p \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\nPR_SNAPSHOT=\u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Fpr-state.json\nGH_PAGER=\"\" gh pr view \u003Cnumber> --json author,state,isDraft,reviewDecision,mergeable,mergeStateStatus,statusCheckRollup,headRefOid,reviews,comments > \"$PR_SNAPSHOT\"\nGH_PAGER=\"\" gh api graphql --paginate --slurp \\\n  -f query='query($owner:String!,$repo:String!,$pr:Int!,$endCursor:String){repository(owner:$owner,name:$repo){pullRequest(number:$pr){reviewThreads(first:100,after:$endCursor){pageInfo{hasNextPage endCursor} nodes{id isResolved comments(first:100){pageInfo{hasNextPage} nodes{author{login} authorAssociation body createdAt url}}}}}}}' \\\n  -f owner=github -f repo=gh-aw -F pr=\u003Cnumber> \\\n  > \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Freview-threads.json\njq -s '.[0] + {reviewThreads: [.[1][] | .data.repository.pullRequest.reviewThreads.nodes[] | . + {comments: .comments.nodes, commentsPageInfo: .comments.pageInfo}]}' \\\n  \"$PR_SNAPSHOT\" \u002Ftmp\u002Fgh-aw\u002Fpr-finisher\u002Freview-threads.json \\\n  > \"$PR_SNAPSHOT.tmp\" && mv \"$PR_SNAPSHOT.tmp\" \"$PR_SNAPSHOT\"\nGH_PAGER=\"\" gh pr checks \u003Cnumber>\n```\n\n`reviewThreads` is not a supported `gh pr view --json` field. The GraphQL data\nabove is flattened into the snapshot shape used by `copilot-review`. If a thread's\n`commentsPageInfo.hasNextPage` is true, fetch its remaining comments before judging\nwhether it is addressed. Do not treat truncated or failed reads as resolved feedback.\n\nIf merged\u002Fclosed, report and stop. Also stop if the author is a platform-managed dependency bot or another unrecognized bot, unless the user explicitly requested handling that bot-authored PR. This author gate is independent of reviewer eligibility. Otherwise classify each condition as ✅ \u002F ❌ \u002F ⏳ \u002F ❓ using the snapshot file plus `gh pr checks`. The CI snapshot here is your **only** view of CI for this run — capture which checks failed and why before changing anything, because after you push it will be stale.\n\n### 2. Address Reviews\n\n#### 2a. Resolve Copilot-answered threads\n\nBefore delegating to `copilot-review`, find review threads where Copilot has already replied with a substantive answer but the thread has not yet been marked as resolved. Resolve those threads immediately — no code changes are needed for them.\n\n```bash\n# Identify unresolved threads that already have a Copilot reply\njq '.reviewThreads[]? | select(.isResolved==false) | select(any(.comments[]?; .author.login == \"app\u002Fgithub-copilot\" or (.author.login | test(\"copilot\"; \"i\"))))' \"$PR_SNAPSHOT\"\n```\n\nFor each such thread:\n- Confirm the Copilot reply is substantive and actually addresses the concern (not merely an acknowledgment or partial response).\n- If the reply fully addresses the concern, resolve the thread.\n- If the reply is incomplete or the concern is not satisfied, treat the thread as still open and address it in step 2b below.\n\n#### 2b. Address remaining unresolved threads\n\nDelegate to the `copilot-review` skill and treat that delegation as mandatory, not optional. Insist on full handling of each remaining unresolved in-scope thread (including `github-actions[bot]`): make change → run relevant local validation → commit → push → reply → resolve. A thread is not handled until reply + resolve both succeed.\n\nBefore editing, reuse the triage snapshot instead of fetching the same PR again:\n\n```bash\njq '{reviews,reviewThreads,comments}' \"$PR_SNAPSHOT\"\njq '.reviewThreads[]? | select(.isResolved==false)' \"$PR_SNAPSHOT\"\n```\n\nWhen reviewing collected feedback, apply reviewer scoping from `copilot-review`: trusted automation and team\u002Fcollaborator reviewers only. Ignore non-team-member feedback.\n\n### 3. Address Mergeable\n\n```bash\njq '{state,isDraft,mergeable,mergeStateStatus,reviewDecision,headRefOid}' \"$PR_SNAPSHOT\"\n```\n\n- `CONFLICTING` → resolve conflicts using the repo's conventions. If you cannot determine the correct resolution, `ask_user`.\n- `mergeStateStatus: BEHIND` → update branch from base. After updating, scan the new commits for tooling drift (lockfiles, toolchains, lint configs); re-run installs if manifests changed, and flag drift in the summary so any new errors read as drift, not regressions.\n- Refresh `PR_SNAPSHOT` only after you perform a state-changing action that can invalidate it. Otherwise keep reusing the original file for the rest of the pass.\n\n### 4. Address Checks (local + prior CI)\n\n**Local validation** — the agent's only correctness signal. Batch related review,\nmergeability, and CI fixes before the final gate. Use focused tests while editing;\ndo not repeat the full gate for each thread or run both standalone `test-unit` and\nthe progress gate on the same unchanged files. Run in order; fix failures before\nmoving on:\n\n```bash\nmake fmt\nmake lint\nmake agent-report-progress\n```\n\nThe progress gate includes impacted `test-unit` coverage and workflow drift checks.\nRun `make test` when the affected code or a prior failing CI job requires its\nbroader coverage, not on every no-change finisher pass. Run `make recompile` after\nworkflow markdown changes. If nothing changed and all blockers are already\naddressed, reuse prior validation only when its recorded SHA matches the current\n`headRefOid`, and stop instead of repeating validation or producing an empty commit.\n\nIf a `make test` fix changes wasm compiler output, or wasm golden tests fail:\n\n```bash\nmake update-wasm-golden\n```\n\nThen re-run the affected tests.\n\nIf model-routing golden tests fail after an intentional audit-output change:\n\n```bash\nmake verify-model-routing-golden\nmake update-model-routing-golden\n```\n\nReview the fixture and every regenerated `expected*.json` diff before accepting\nthe change. For a new run, follow `.github\u002Fskills\u002Fmodel-routing-golden\u002FSKILL.md`\nand require the capture tool's full-download versus minimized-fixture comparison\nto pass.\n\n**Prior CI failures** — for each failure captured during triage, pull logs and fix the root cause:\n\n```bash\nGH_PAGER=\"\" gh run view \u003Crun_id> --log-failed\n```\n\nClassify as: real product\u002Ftest bug, infra flake, or third-party flake. Apply the fix in the agent's commits and, where possible, **reproduce the fix locally** via the matching `make` target. If the failure can't be reproduced locally (infra-only), state that in the summary so the human re-triggers CI with eyes open. Per anti-pattern rules: 1–2 narrow attempts, then `ask_user`.\n\n### 5. Commit, push, and stop\n\nAfter each iteration that changes files, commit and push immediately. Before stopping, ensure there are no uncommitted or unpushed changes left. **Do not re-check `gh pr checks` expecting a new run.** Print the summary and stop.\n\n## Summary format\n\nAt the stopping point, print:\n\n```\n- ✅ Reviews — \u003Cplain language>\n- ✅ Checks (local) — \u003Cplain language>\n- \u003Cstatus> Checks (CI) — stale after agent push; needs human re-trigger. Prior failures: \u003Cfixed | open | not reproducible locally>\n- ✅ Mergeable — \u003Cplain language>\n\nActions taken: \u003Cwhat changed in this run>\nHand-off: CI must be re-triggered by a maintainer (close\u002Freopen PR, workflow_dispatch, or push) before merge.\nStill needed: \u003Chuman review, anything not actionable from the agent>\n```\n\nStatus vocabulary:\n- ✅ satisfied — checked and passing\n- ❌ failing — checked and failing\n- ⏳ pending — running, waiting for signal (rare for the agent; never use for the post-push CI state)\n- ❓ unknown — could not be checked (API error, indeterminate, or CI stale after agent push). Never use ❌ for this.\n\n**Translate status into plain language.** Don't write bare labels. Always state explicitly that CI on the agent's HEAD is unverified until a human re-triggers it.\n\n## Stopping conditions\n\n- **Ignored bot-authored PR** — platform-managed dependency bot or another unrecognized bot, without an explicit user request to handle it. Report no action and stop.\n- **Ready for merge (pending human CI re-trigger)** — local validation green, Reviews resolved, Mergeable clean. Summarize and stop.\n- **Nothing actionable remains** — non-actionable blocker (human approval, external service). Summarize and stop.\n- **Truly stuck** — unresolvable conflicts, ambiguous feedback, irreproducible failures. `ask_user` with context.\n\n## Completion standard\n\nFor eligible PRs, the task is complete only when all are true:\n\n- `make fmt`, `make lint`, `make test-unit` all pass (or unrelated pre-existing failures explicitly identified).\n- The PR author passed the bot eligibility check, or the user explicitly requested handling that bot-authored PR.\n- `make test` was run and fixed when it was part of the failing state; wasm goldens regenerated when required.\n- The `copilot-review` skill addressed all in-scope review threads, including GitHub Actions bot review comments\u002Fthreads (`github-actions[bot]`) (reply + resolve succeeded for each).\n- Review threads where Copilot had already replied with a substantive answer were resolved (step 2a) before delegating unresolved threads to `copilot-review` (step 2b).\n- Mergeable condition was checked; conflicts resolved and `BEHIND` updated when present.\n- Prior CI failures were inspected at the log level and either fixed at the root cause (with a local reproduction where possible) or explicitly flagged as not locally reproducible \u002F escalated.\n- Every iteration that changed files was committed and pushed, and no local changes were left unpushed at stop. No post-push re-check loop.\n- A structured ✅\u002F❌\u002F⏳\u002F❓ summary was printed, including an explicit hand-off line for the human CI re-trigger.\n- No `gh pr merge` was run.\n",{"name":5,"description":7},"main","8541229759617347888641eba917d3b0ad66a984",".github\u002Fskills\u002Fpr-finisher",626,"https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw","https:\u002F\u002Fgh.io\u002Fgh-aw","https:\u002F\u002Fgithub.com\u002Fgithub","https:\u002F\u002Fgithub.com\u002Fabout","How people build software.","2026-11-15 06:45:15",{"source":8,"skillName":5,"commands":55,"prompt":65,"zipAvailable":66},[56,59,62],{"tool":57,"command":58},"npx","npx skills add github\u002Fgh-aw --skill pr-finisher",{"tool":60,"command":61},"bunx","bunx skills add github\u002Fgh-aw --skill pr-finisher",{"tool":63,"command":64},"pnpm","pnpm dlx skills add github\u002Fgh-aw --skill pr-finisher","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fpr-finisher\u002FSKILL.md",true,[68],{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"agents\u002Fopenai.yaml","REFERENCE","参考文档",158,"https:\u002F\u002Fgithub.com\u002Ffeniix\u002Fdotfiles\u002Fblob\u002Fmain\u002Fagents\u002Fskills\u002Fwait-what\u002Fagents\u002Fopenai.yaml",[75,83,91,119,137,160],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":82},"01M7DQYVZ9W9DDXKQ9452SNP8J","cracktro","Edit, preview, and verify the standalone interactive talk deck in docs\u002Fpublic\u002Fcracktro (slides, SVG diagrams, transitions, WebAudio sound).","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcracktro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":90},"01M7612HQ4378TK8QZ5HPAF4KR","create-connector","Create or extend a declaration-only third-party connector, with narrow reads, separate safe outputs, optional protected triggers, and offline conformance evidence.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.github\u002Fskills\u002Fcreate-connector\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":105,"publishedAt":39},"01M6ADC942STTXHFV410J4DH0X","GitHub Agentic Workflows","GitHub Agentic Workflows (`gh-aw`) is a GitHub CLI extension for writing Agentic Workflows in markdown and compiling them to GitHub Actions.","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002FSKILL.md",[97,102],{"categoryNo":98,"categoryName":99,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",{"categoryNo":103,"categoryName":104,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000023","Skill与智能体开发",[9,106,107,108,109,110,111,112,113,114,23,115,116,117,118],"github agentic workflows","agentic workflows","workflows","agentic","extension","markdown","github cli","cli","gh","compiling","writing","github actions","actions",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":39},"01M6ADC6ZXSA46N9XD6VNAP1MS","windows-compatibility","Cross-platform path handling and command patterns","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fwindows-compatibility\u002FSKILL.md",[],[126,127,128,129,130,131,132,133,134,135,136],"windows","windows compatibility","compatibility","command","git","bugs","platform","high","patterns","cross-platform","path",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":39},"01M6ADC44957SVQF96R5YY247P","versioning-policy","Semver versioning rules for Squad SDK and CLI — prevents prerelease version incidents","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Fversioning-policy\u002FSKILL.md",[],[144,145,146,147,148,113,149,19,150,151,30,152,153,154,23,155,156,157,158,159],"versioning","policy","versioning policy","gate","implementation","workspace","sdk","release","npm","semver","squad","incident","incidents","Rules","version","resolution",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":170,"publishedAt":39},"01M6ADC1PHMEAEVR87F8PDR89X","tiered-memory","Three-tier agent memory model (hot\u002Fcold\u002Fwiki) for context reduction per spawn","https:\u002F\u002Fgithub.com\u002Fgithub\u002Fgh-aw\u002Fblob\u002Fmain\u002F.squad\u002Ftemplates\u002Fskills\u002Ftiered-memory\u002FSKILL.md",[166,169],{"categoryNo":167,"categoryName":168,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":103,"categoryName":104,"taxonomyType":100,"taxonomyTypeDesc":101},[171,172,173,174,175,176,177,178,179,180,181,182,183,23,184,185],"tiered memory","memory","performance","design","agent memory","proposal","cold","model","wiki","spawn","memory-management","context","three","runtime","management"]