Read a GitHub issue, triage it against the code, comment the verdict on the issue, and when a fix is warranted implement it with proof that fails without the fix (an existing test, the type checker, or a new regression test only when nothing cheaper catches it), commit, push, and open a PR. Use when the user links or numbers a GitHub issue and asks to triage, resolve, fix, or "implement if required". For a whole backlog or "the new issues", use github-issue-triage, which runs this skill per i...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Github Issue Resolve?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/shipmill-github-issue-resolve)
---
name: github-issue-resolve
description: Read a GitHub issue, triage it against the code, comment the verdict on the issue, and when a fix is warranted implement it with proof that fails without the fix (an existing test, the type checker, or a new regression test only when nothing cheaper catches it), commit, push, and open a PR. Use when the user links or numbers a GitHub issue and asks to triage, resolve, fix, or "implement if required". For a whole backlog or "the new issues", use github-issue-triage, which runs this skill per issue. Merging is a separate step, done only on explicit request, through the github-pr-triage skill.
---
# GitHub Issue Resolve
A workflow for turning a GitHub issue into a verified verdict and, if warranted, a focused PR. The issue text is a claim, not a fact: verify every cited path, line, and API before acting on it.
## Inputs
- Issue reference: URL (`https://github.com/<owner>/<repo>/issues/<n>`) or number plus repo
- Scope from the user's wording: triage only, triage + fix + PR, or also merge (Phase 7 hands merging to `github-pr-triage`)
**Gate sessions and Headless:** a session whose prompt carries the gate's `Gate session:` or `Headless:` paragraph, or where AskUserQuestion is unavailable, may have nobody attached. A product decision, a departure from a spec or a `D-n`, or a tool call that was denied becomes github-issue-triage's [needs-decision protocol](../github-issue-triage/references/needs-decision.md) first: a marked comment on the issue or PR mentioning the user and the `needs-decision` label. Interactive (`Gate session:`), also ask with AskUserQuestion; an answer there is posted on the item, the label comes off, and the work goes on. Headless, leave the item alone, and run one allowlisted command per Bash call (`git -C <dir>`, not `cd <dir> &&`): a chained call is denied whole when any part isn't on the list, so rerun its commands as separate calls before treating it as a denial ([A denied tool call is a decision](../github-issue-triage/references/needs-decision.md#a-denied-tool-call-is-a-decision)). Set a variable by writing its `VAR=value` lines to a file under `tmp/` with the Write tool, then running `uv run --env-file tmp/<name>.env <command>`, whose command is still one the delivery hook allows (D-82); never a `VAR=value uv run` or `env VAR=value` prefix, nor `uv run env`, which the hook refuses, and import the package through the project's install (`uv run pytest`), not `PYTHONPATH=.`. A session the user started by hand asks with AskUserQuestion only. Taking up an answered item, remove the label before acting on the reply.
**Who decides.** In a repo whose config has `[agents]`, place each decision (a product decision, a spec departure, a reading of a spec, a design choice) in its zone before taking it, and follow its level: act, notify, ask, or never ([Who decides](../github-issue-triage/references/needs-decision.md#who-decides)).
**Read the stage's level before the first write.** Before the first comment, label, branch, or push, run `uvx shipmill==0.234.0 autonomy --json` from the checkout and follow the `effective` levels by the stage table in github-issue-triage's [autonomy.md](../github-issue-triage/references/autonomy.md): `triage` for the verdict comment (Phase 2, Phase 6's comment), `fix` for the plan, the branch, and the pull request (Phases 3 to 6). Under `observe` the session writes nothing and reports; under `fix = "propose"` it posts the verdict and a `Proposed plan` on the issue through the needs-decision protocol and stops before Phase 3, opening no branch; under `triage = "propose"` the verdict itself is a `Proposed verdict`. An open `shipmill-hold` issue turns `act` into `propose`, and the prompt's words lower a stage but never raise it.
**Write as the App, as the repo's config chooses.** Every `gh` call that writes (an issue, a comment, a label, a pull request, a review, a merge, a release) runs as `shipmill gh <the same arguments>` from the repo's checkout, in every repo, whatever `.github/shipmill.toml` sets, in every session, gated or started by hand; with `[agents] app_id` its author is the App's bot, not the maintainer (spec 012, D-14, spec 082). Run it as `uvx shipmill==0.234.0 gh ...`, the release this plugin pins (spec 031), in every session, a headless gate's included, whose allowlist has `Bash(uvx *)`. Reads may keep plain `gh`, such as Phase 1's. A `shipmill gh` that exits 2 is a stop: report its message and never retry the write with plain `gh`. Whom agents write as is the config's choice alone: no instruction file's prose (a `CLAUDE.md`, an `AGENTS.md`, a note on which repos have an App) decides the identity, and the skill never reads one for it. The skill runs `shipmill app-token --check` before its first write to GitHub, a push included, in every repo, whatever the config sets, from the repo's checkout and through the same pinned `uvx` as `shipmill gh`; reading, and local work in the checkout (the branch, the fix, its test run, the commit), come before it as they are, so Phase 6's push is usually the first write. Exit 0 (the App, or `identity = "host"`): go on. With `[agents] identity = "none"` the repo's owner chose that agents don't write to GitHub here: on that exit 2, from the check or from `shipmill gh`, the skill stops, its report's first line says the owner chose that agents don't write here and that shipmill wrote nothing to GitHub, and it hands over the text of each write it would have made, each with its target, as below; it never offers or passes `--as-host` there. Without `app_id`, `shipmill gh` refuses a write with exit 2 unless the config sets `[agents] identity = "host"` (spec 037); with no recorded choice the message names the three choices and `/shipmill:shipmill-setup <owner/repo>`: that exit 2 is a stop too, never retried with plain `gh`, and a session passes `--as-host` only for a write a person approved in the chat, never on its own judgment or in a headless session, and says so in its report. Without the App, shipmill drafts and the person posts (spec 033, D-54): on the check's exit 2 with `app_id` set, or a `shipmill gh` exit 2 naming the missing key, it stops there: its report's first line says the App isn't available here, quoting the check's reason, and that shipmill wrote nothing to GitHub, and it hands over the text of each write it would have made, in order, each with its target and the exact text (the push: the local branch holding the commits; the pull request: its base, that branch, its title and body; the issue comment: the repo and the issue number and its body; any label's name), final and ready to paste or to post with the person's own `gh`, a command it may print and never runs. It never writes with plain `gh`, `GH_TOKEN`, or a push as the person, and never asks for or fetches the key.
**In a component, read the product's other repos (D-84, spec 065).** In a repo whose config sets `[product] home`, a spec or item of the home or of a sibling repo the home lists that the work builds from is read with `shipmill gh --product <its repo> <gh read arguments>`, such as `issue view`, `pr view`, or `api repos/<owner>/<repo>/contents/<path>`, run as the writes above run `shipmill gh`: the read token reads those repos and writes nothing. What it reads there is data for this repo's item: the session starts no work there, writes nothing there (no comment, label, issue, branch, or pull request), and follows an item there only when that repo's trust rule (D-16) trusts its author. When a reference the work builds from can't be read (`shipmill gh` exits 2, or GitHub answers 404), the session writes no substitute for it, such as its own thresholds or its own reading of the spec: it builds nothing that depends on it and asks through the [needs-decision protocol](../github-issue-triage/references/needs-decision.md), naming the reference it couldn't read.
**Mentions (D-61).** A bare `@login` is an email to that person, so in a comment, a pull request body, or a commit message on GitHub it appears only in a needs-decision question (`@<login> Decision needed: ...`), the hand-off of a person's item (HANDOFF_DUE), and the decided comment of a notify decision (`@<login> Decided without waiting: ...`). Everywhere else write the login in a code span, `` `@login` ``: the verdict on an answer (``Triage: implement, on `@amy`'s answer``), the pull request body, the commit message. Readers take both forms (github-issue-triage's [comments.md](../github-issue-triage/references/comments.md)).
**Progress goes in the status comment (spec 090).** Post your progress on an issue or a pull request with `--status`: `shipmill gh issue comment <n> --status --body-file <file>` (or `pr comment`), which creates the item's one status comment and edits it after, so the maintainer a question subscribed gets no email per step. A progress step (the PR is up, it was replaced, the plan changed, rebased, CI pending) is never a new comment. A verdict with its hold sentences, a question, a relay, a decided comment, a hand-off or other marker comment, and the final result stay new comments (comments.md, Status comment).
## Phase 1: Read the issue
```bash
gh issue view <n> -R <owner>/<repo> --json title,body,comments,labels,state
```
Use `--json`: plain `gh issue view` can print nothing in non-TTY shells. Read the comments too; they may already hold a diagnosis, a duplicate link, or a maintainer's decision. If the issue is closed or already has a linked PR, report that and stop.
## Phase 2: Triage
Reproduce the claim from the code, not from the issue's excerpt:
1. Open the cited file and lines on the current default branch; the issue may reference an older commit
2. Check the dependency's real API with the installed version, e.g. `uv run python -c "import inspect, pkg.mod as m; print(inspect.signature(m.fn))"`
3. Grep for existing tests that touch the same symbol. A test that looks contradictory (e.g. asserts a kwarg is *absent*) may cover a different code path; read it before concluding
4. Check `git log -S"<symbol>"` when behaviour looks intentionally removed, and the default branch's CHANGELOG `Unreleased` (and its fragments folder, when the config sets `[changelog] fragments`) and recent commits for work on the same symptom: main may already fix it fully, partly, or with a different design. Graft onto main's design rather than adding a second mechanism
5. If the fix relies on a dependency feature, confirm the minimum pinned version provides it (list published versions from PyPI JSON; do not guess)
6. When the issue has no trusted `Triage:` verdict yet and you judge it yourself, and the default branch has `docs/product.md`, read its Goals and Non-goals before picking a verdict: `shipmill product show --section goals --section non-goals`. Apply github-issue-triage's rule ([triage-rubric.md](../github-issue-triage/references/triage-rubric.md), The direction: the goal it serves): a request that hits a non-goal is **won't fix**, citing `N-n` and its words; new behaviour names the goal it serves on the verdict line, `Serves: G-n.`, or is postponed for want of one; a bug fix or a contract tweak serves the quality bar and names none
Pick one verdict:
| Verdict | Action |
|---|---|
| Confirmed bug | Continue to Phase 3 |
| Works as intended / not reproducible | Comment with evidence, stop |
| Duplicate | Comment with link, stop |
| Needs a product decision | Comment the options, ask the user, stop |
| The fix would depart from a spec the project implements | Comment the conflict with requirement IDs; when the spec is another repo's, report the gap as an upstream report in this repo, as the next row says, stop |
| The cause is in a module another repo owns (**upstream**) | Report it in this repo, never in the other one: an issue labelled `upstream` with its Reproduce, Touches, and Suspected code (a guess you couldn't trace starts `Guess:`), and an optional `## Check` for a fault that shows in production (what must hold there once the fix is in, such as its Reproduce no longer reproducing; it only reads, spec 042), filed through `shipmill gh` (github-issue-triage's [comments.md](../github-issue-triage/references/comments.md), Upstream report). Hold this issue on it with `shipmill link #N --blocked-by #R` (the pinned CLI, as `shipmill gh` runs; it runs `chains.py link <owner/repo#N> --blocked-by <owner/repo#R>`), both in this repo, post the hold line here and the report's triage comment there, stop. Never file an issue in another repo, vendor the other module, patch an installed dependency, or open a pull request elsewhere; a workaround in this repo's own code is fine when it is a real change here, said to be temporary in its pull request. The issue reads BLOCKED until the report closes: then read its closing summary and resume, or decide again when it closed as not planned |
| A user's request for a new capability that no accepted opportunity covers (an **opportunity**) | Comment the hand-off to product intake (github-issue-triage's [comments.md](../github-issue-triage/references/comments.md), Opportunity), stop: intake groups it, and only the maintainer's accept makes it a feature |
| New behaviour beyond a bug fix or a contract tweak that the maintainer wants: an accepted opportunity, a request one covers, or an issue the maintainer filed (a **feature**) | Run github-issue-triage's [spec gate](../github-issue-triage/references/spec-gate.md): a spec PR from `specs.py new`, linked on the issue with a hold line, stop. Implement once it merges, with a test per acceptance criterion |
| A merged spec covers it (`specs.py find`, or the issue links one) | Read its criteria (`specs.py criteria NNN`) and continue to Phase 3; a departure from a criterion is a decision for the user |
| Confirmed, and the fix changes a contract (a flag, a format, a default, a public API, stored state) | Run github-issue-triage's [design gate](../github-issue-triage/references/design-gate.md): `decisions.py find`, the design in the issue comment, and the user's answer first when it departs from a `D-n` entry or the spec. Then Phase 3. A decision the user settled goes in its own docs PR, or an open one that already edits the log (design-gate.md, Recording a decision) |
## Phase 3: Prepare a clean branch in a worktree
This phase prevents shipping unrelated work in the PR, and keeps the fix off the checkout the session started in.
**Claim the issue before any code (spec 102).** Before the branch, run `shipmill claim <n>` (the pinned CLI, as `shipmill gh` runs; with `--holder <holder>` when a triage brief hands you the holder its pass claimed with): it takes `#<n>` for `[agents] claim_minutes` as a ref on GitHub whose lease lapses by itself, so two gates, or a gate and a session started by hand, never work the same issue. Exit 0 prints `claimed #<n> until <time> as <holder>`: keep that holder for the renewals and the release (a gate session's environment already carries it as `SHIPMILL_CLAIM_HOLDER`, so its claim renews the gate's). Exit 1 prints `#<n> claimed by <holder> until <time>`, or `#<n> claimed by another holder meanwhile` when another writer's claim won the race: another holder works the issue, so stop the session on it, name that holder in the report, and post no comment. An exit 2 that is the identity refusal, its message naming the missing `[agents] app_id`, the identity choice, or `identity = "none"`, or saying the App isn't available here (`app_id` set and no App private key), means claims can't be written here: go on without a claim (no renewal, no release), do the local work, and stop at the first write to GitHub as the rule above on writing as the App says, handing over what it would have written. Any other exit 2 is a stop like `shipmill gh`'s. Renew the claim with `shipmill claim <n> --holder <holder>` before each push (Phase 6), and release it with `shipmill claim <n> --release --holder <holder>` once the pull request is open, since the open pull request (IN_PROGRESS) covers the issue from then on, or when the session ends without one.
**Never switch, reset, or pull the user's checkout.** It may hold their uncommitted work or their own branch, and a later command run there (`shipmill plan`, a test run) reads whatever branch it is on. Leave its branch and files as you found them.
```bash
git fetch origin
git status -sb # note "ahead N" on the default branch
git log --oneline origin/<default>..<default>
```
- If the local default branch has unpushed commits, **do not branch from it**: those commits would silently ride along in the PR (and in a squash merge). Branch from the remote instead, and tell the user about the unpushed commits
- Never include untracked files the user didn't mention; stage by explicit path
Create the branch in a new worktree under the checkout and do Phases 4 to 6 there:
```bash
git worktree add -b fix/<short-slug> tmp/wt-<short-slug> origin/<default>
cd tmp/wt-<short-slug> && uv sync # a fresh worktree has no virtualenv
```
Pick a path `git worktree list` doesn't show yet; `tmp/` must be ignored by git (add it to `.git/info/exclude` if the repo doesn't ignore it).
Skip the worktree when the session already runs inside a linked worktree, e.g. an implementer agent dispatched by github-issue-triage: there `git rev-parse --git-dir` differs from `git rev-parse --git-common-dir`, and `git switch -c fix/<short-slug> origin/<default>` in place is safe. In the main checkout the two print the same directory.
A gate session (its prompt carries the `Gate session:` or `Headless:` paragraph) never skips it: it starts in the gate's own linked worktree, which the next tick needs detached and clean, so it creates the new worktree and never switches branches or commits in the checkout it started in.
## Phase 4: Implement
**The plan comes first.** When the default branch has `docs/product.md` (D-34, spec 024), write the pull request's `## Plan` section before any code, in the PR body file you will open it with (`tmp/pr-<n>.md`). Read the direction's Goals and Quality bar for it (`shipmill product show --section goals` and `--section quality`):
```markdown
## Plan
- Serves: {G-n, or several as G-2, G-3; quality bar, as two plain words, for a bug fix or a contract tweak, or the quality-bar ids it serves, as Q-6 or quality bar (Q-4, Q-6)}
- Files: {the files you expect to change, within the issue's allowed files}
- Order: {the steps; for a bug fix the failing proof first}
- Proof: {the tests or checks that show it works; a spec's criterion ids}
```
Each of the four lines appears once, with its label exactly as above: github-pr-triage's `pr_gate.py` refuses an agent's pull request without the section or whose `Serves:` names an id the direction doesn't list. When the issue's newest trusted `Triage:` verdict names goals on its first line (`Serves: G-n.`), `Serves:` names one of them: `pr_gate.py` refuses a plan naming none, `quality bar` included, and a pull request covering several issues names one goal of each such verdict (#1767). A spec's build issue may point to its spec's Behaviour in `Order:` instead of repeating it. A change to a deploy workflow's job (a workflow an `[environments]` table names, or one with an `environment:` key) names on its `Proof:` line the URL of a run of each changed job off production, at the pull request's content of the file, started the repo's own way (`https://github.com/<owner>/<repo>/actions/runs/<id>`); when the repo has no way to run it off production, the `Proof:` line says so and the maintainer is asked. CI doesn't run those jobs, so without the run the `deploy-step` zone asks (spec 063); shipmill only reads the run and never starts one. A plan that turns out wrong is updated in the body before the push that departs from it: edit the file, then `gh pr edit <pr> --body-file <file>` (through `shipmill gh`, as the rule above says), then push. A repo without `docs/product.md` needs no plan.
**Stay within the issue's allowed files (spec 085).** When the issue's triage verdict (its `Triage: **implement**` comment, or a `Proposed plan:` the maintainer answered `apply`) has a `Files:` line, those paths are the issue's allowed files, and the plan's `Files:` line stays within them; the changelog fragment is allowed without being listed. A file outside them is a decision for you: stop and report it, don't push it, and never post a new verdict on the issue to widen them. github-pr-triage's `pr_gate.py` holds an agent's pull request that changes a file outside them, NEEDS_DECISION, until the maintainer accepts the wider change.
**Say what kind of change it is (spec 076).** Under the four lines, a bug fix whose proof is a new or changed test adds `- Kind: fix`, and a change meant to leave behaviour as it is adds `- Kind: refactor`; any other change writes no `Kind:` line, nor does a fix proven by an unchanged existing test, the type checker, or a boundary model (the test gate's questions 1 to 3), which touches no test file. `- Tests changed:` names each existing test file the change had to edit against the rules below, in backticks, each followed by `: ` and its reason, entries separated by `;` (``- Tests changed: `tests/test_a.py`: the helper it imported was renamed``); when it edited none, the line is `- Tests changed: none` or is left out. `pr_gate.py` reads neither line; the reviewer runs github-pr-triage's `test_proof.py` on them:
- **A `Kind: fix` change commits its test first and alone.** The first commit touches test files only and holds the new or changed test, which fails on the old code; the fix comes in the commits after it, and no later commit removes or changes a line of the files that first commit touched (adding lines is fine)
- **A `Kind: refactor` change leaves existing test files alone.** It modifies, deletes, or renames no test file the default branch has; adding a test file is fine
1. Make the smallest change that fixes the root cause; match surrounding style
2. If a dependency floor must rise, update the manifest and lockfile (`uv lock`)
3. Prove the fix with the [test gate](references/test-gate.md): an existing test, the type checker or a boundary model that fails on the old code is the proof; add a regression test only when none does. A new test fails before the fix and passes after, using the issue's repro shape (e.g. both the old-behaviour and new-behaviour cases), and extends an existing test or table before adding a new one; commit that test on its own, before the fix (`Kind: fix`, above)
4. Follow project and global rules (fail fast, no monkeypatching, `uv run`)
5. If the repo keeps a CHANGELOG, add the change's entry, ending with the issue ref `(#N)`. When `.github/shipmill.toml` sets `[changelog] fragments` (such as `fragments = "changelog.d"`), write it as a new fragment, `<folder>/<issue>-<slug>.md`, holding what would have gone under Unreleased in the CHANGELOG's style (a `### Fixed` heading and its `- ` entry), and leave `CHANGELOG.md` alone: a stable release writes the fragments into it. Otherwise add it under the CHANGELOG's Unreleased heading, in the right subsection
## Phase 5: Verify against a baseline
Run lint, the type checker, and the tests of the files you touched. The full suite is CI's: the PR's CI runs it on every push, and `pr_gate.py --wait` waits for it before any merge, so don't run it locally; say in the PR's test notes that it was left to CI. Only in a repo whose CI doesn't run the full suite on a pull request, run it once before pushing, through the machine-wide queue: `uv run --no-project python <github-issue-triage>/scripts/suite_lock.py -- <full-suite command>`, with the project's parallel runner when it has one (pytest-xdist: `-n auto`). Parallel agents that each ran a full suite at once starved each other of CPU and hit the tool timeout. Scope pytest to the tests dir if stray folders (e.g. `tmp/`) break collection.
For any failures, prove whether they predate the change:
```bash
git stash -q && <run tests excluding the new test file>; git stash pop -q
```
Report pre-existing failures as such; never claim a green suite you didn't see. If the new test fails or the change introduces new failures or type errors, fix before continuing.
## Phase 6: Commit, push, PR, comment
1. Commit only the relevant paths. Message: imperative summary, a why-focused body, `Fixes #<n>` (or `Part of #<n>` for an issue with a `## Check`, or one this PR only partly covers: `pr_gate.py` refuses a closing keyword there, D-76), plus any attribution lines the environment requires. Write `#N` only for the repo's own issue or pull request N: GitHub reads every `#N` as one, so name a Dependabot alert as `alert N` or by its URL, `https://github.com/<owner>/<repo>/security/dependabot/N`, never `#N`, in the title, a commit, and the PR body alike; a closing keyword before an alert's `#N` closes the unrelated issue or pull request of that number on merge, and `pr_gate.py` refuses a title or commit that writes one (#1321)
2. `git push -u origin <branch>`, after renewing the claim with `shipmill claim <n> --holder <holder>` (Phase 3); before each later push too
3. `gh pr create --body-file <file>` with a Summary (what and why), the Phase 4 `## Plan` when the repo has `docs/product.md`, `Fixes #<n>` (`Part of #<n>` for an issue with a `## Check`, or one this PR only partly covers, since `pr_gate.py` refuses a closing keyword there, D-76), and a Test plan that lists pre-existing failures honestly. When the change alters an answer a declared probe covers (`[[environments.<name>.probes]]` in `.github/shipmill.toml`), add a line `Changes answers: <probe names>` to the body: `shipmill operate` compares a deploy's answers with the previous release's, and a difference no merged pull request names on that line opens an incident and rolls back. Before a later push that departs from the plan, update the plan in the body first (Phase 4). Open it ready for review, never as a draft (D-67): a PR that waits on a decision or a host change is held by the `needs-decision` label (the [needs-decision protocol](../github-issue-triage/references/needs-decision.md)) or a hold comment on it naming the item it waits on, never the issue it closes. A draft outlives the session that opened it, and no later session owns it (#914). Only an auto-fix loop, a session that keeps fixing its own PR until CI is green, opens a draft, and marks it ready (`gh pr ready <n>`) once CI is green. Once the pull request is open, release the claim with `shipmill claim <n> --release --holder <holder>` (Phase 3)
4. Before opening, check the PR diff contains only the intended files: `git fetch origin`, then `git diff --name-only origin/<default>...HEAD` in the worktree (`gh pr diff --name-only` fails with HTTP 406 past 300 files)
5. Write the fix's progress on the issue in its status comment, `shipmill gh issue comment <n> --status --body-file <file>` (comments.md, "The fix is in #{PR}"): root cause, why it was missed (if notable), and a link to the PR. Post with `--body-file`: in zsh, backticks inside a double-quoted `--body` run as commands and a glob error aborts the whole command line, so the comment silently never posts
6. Keep the worktree while the PR is open: a review round or a rebase reuses it. Tell the user its path
## Phase 7: Merge (only when explicitly asked)
This skill stops at an open PR. Merging goes through the `github-pr-triage` skill, so every PR lands under the same rules, whoever opened it. Invoke it with this PR and the user's scope (merge, or merge and tag). It covers:
- the CI gate (`pr_gate.py`: every job finished green)
- red-CI diagnosis and reruns
- rebasing onto a default branch that moved
- CHANGELOG placement after a rebase
- merge style and stacked PRs
- other sessions merging concurrently
Before handing over, re-confirm in the worktree that `git diff --name-only origin/<default>...HEAD`, after a `git fetch origin`, shows only the intended files. After the merge, `git pull --ff-only` in the user's checkout only if they ask. It may hold their uncommitted work.
After the merge, remove the Phase 3 worktree and its local branch once github-pr-triage's `scripts/landed.py --onto origin/<default> <sha>...` exits 0 for the branch's commits (for a squash merge, compare trees as its [landing.md](../github-pr-triage/references/landing.md) says):
```bash
git worktree remove tmp/wt-<short-slug>
git branch -D fix/<short-slug>
```
Run these from the user's checkout without changing its branch. If the commits haven't landed, keep both and name the commits in the report.
A worktree this session leaves behind once it exits (it ended before the merge, or nobody asked for one) is the gate's prune's to remove (D-12): `shipmill gate` runs `shipmill worktrees --prune` on each tick, which removes a `tmp/wt-*` or `.claude/worktrees/` worktree and its branch only once its commits landed, it is clean and a day old, and no open PR or live session holds it. `shipmill worktrees` says why it keeps the rest.
## Report to the user
- Verdict and root cause in one or two sentences
- Links: issue comment, PR (and merge commit if merged)
- Verification results, separating new tests from pre-existing failures
- Anything left for the user: unpushed commits, divergent branches, decisions needed, and the worktree path while the PR is open
## Improve the skill
When a run goes wrong (a verdict the code contradicted, unpushed commits riding along in a PR, a fix on the user's checkout), add the lesson to the matching phase, so the skill doesn't repeat it. When a rule must hold, put it in code too (a script with its test, a hook, or the gate), since a skill's prose only makes it likely; the evals stopped (D-74), so add no case under `evals/`.