From bef63b7e289722dbd7b4a2eacbc6fb8199819de3 Mon Sep 17 00:00:00 2001 From: Bhagya Mudgal Date: Tue, 10 Nov 2026 19:54:05 +0530 Subject: [PATCH 1/2] feat(file-pr): report what is left of the request after a PR merges - file-pr section 2 derives the open items from the linked issue and the original prompt, next to the Closes/Refs choice, so one derivation feeds both reports - file-pr's final report ends with Left after this merges: or none - done's post-publication card copies that line instead of recomputing it Closes #107 --- skills/done/references/readiness-card.md | 2 ++ skills/file-pr/SKILL.md | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/skills/done/references/readiness-card.md b/skills/done/references/readiness-card.md index b779e3c..55d7c5d 100644 --- a/skills/done/references/readiness-card.md +++ b/skills/done/references/readiness-card.md @@ -166,6 +166,8 @@ git rev-list --first-parent --reverse ..HEAD The first command must succeed, the merge list must be empty, and the ordered first-parent list must exactly equal **Expected append-only commits**. A failed ancestry check is a rebase; a merge or unrecorded commit makes the card stale. For PR-bound work, refresh the recorded base again and require its ref, base-tip SHA, and merge-base SHA to match the card. Freshly re-fetch every mixed external target and compare its recorded version and read-back. Consume `file-pr`'s authoritative publication evidence, verify required CI and review evidence, and re-evaluate every row. Only PR-bound work uses this post-publication run before final `ready`. +The post-publication card ends with the `Left after this merges:` line from `file-pr`'s publication evidence, placed after the evidence index and copied unchanged. `done` never derives it. When the evidence holds no such line, the card ends with `Left after this merges: not recorded by file-pr`. + New unresolved review threads or review-body findings on the PR, including ones a PR-watch update reports, go through `fix-pr-review` with the review or discussion URL (`#pullrequestreview-` or `#discussion_r`), not the bare PR URL. This post-publication handoff authorizes `fix-pr-review` to execute. Never edit, reply to, or resolve them inline. A thread left open as NEEDS-INPUT keeps the card from final `ready`. Before final `ready`, repeat the post-commit content seal: diff --git a/skills/file-pr/SKILL.md b/skills/file-pr/SKILL.md index 7b654b9..a610d05 100644 --- a/skills/file-pr/SKILL.md +++ b/skills/file-pr/SKILL.md @@ -33,7 +33,17 @@ When the user asked to batch several issues into one PR, each issue arrives as i When you choose `Refs #N` over a closing keyword, the final report says the issue will not show as linked in GitHub's Development panel, which lists only closing-keyword links, and names the reason from the list above. -**Gate.** The base ref, remote base tip, and merge base match the refreshed remote state, the issue link comes from issue output, not assumption, and every batched `Closes #N` has a `verified` card row and its own commit, with at most one sealed in section 6. +### Record what is left after this merges + +From the same issue output, list the work this PR leaves open. Each linked issue supplies its `- [ ]` items when it has them, and otherwise each distinct outcome its body asks for, such as under "What should happen instead", "Done looks like", or "Acceptance criteria", minus anything it marks out of scope. The user's original prompt in the conversation supplies anything else it asked for, since the card's **Originating request** often covers only this PR's part. When that prompt is out of view, as in a dispatched subagent or after compaction, use the card in place of the prompt and end the line with `(original prompt not visible)`, even after `none`. An item is left when no request row on the card finishes it, where a row finishes its item when it is `verified` or `pending` only on a `PR-dependent` gap. Every issue linked with `Refs #N` appears, with its open part, or as `#N (finished, close by hand)` when the batch rule alone kept it from `Closes`. Name each item in a few words, tagged `#N` or `prompt`. An issue the prompt names that this PR does not link appears once, as a whole: + +```text +Left after this merges: #101 export button; #102 (not started); prompt: rename the CLI flag +``` + +With nothing left, the line reads `Left after this merges: none`. Record the line in the publication evidence returned to `done`. + +**Gate.** The base ref, remote base tip, and merge base match the refreshed remote state, the issue link comes from issue output, not assumption, every batched `Closes #N` has a `verified` card row and its own commit, with at most one sealed in section 6, and the leftover line names exactly the issue and visible prompt items that no card row finishes, plus every `Refs #N` issue. ### Revalidate card currency and handoff eligibility @@ -181,6 +191,6 @@ Require `headRepository.id` to equal the selected head repository ID, `headRefNa When only title or body differs while repository, base, head, state, and draft mode still match, preflight an exact edit of that existing PR and read it back. A base mismatch enters `done`'s existing-PR rebind path with that URL and its observed values. Never issue another create. A state or draft mismatch stops for an explicit publication decision. Never silently reopen, close, convert, or create another PR. Record both single-step cards, the landed push, the PR observations, the ordered commit list, and the exact commands as publication evidence for the next `done` run. When authoritative search cannot identify whether a PR was created, mark the create `reconcile-required` and do not retry. -Print the URL and return to `done` for CI, review, publication-lane, and final row evaluation. Never merge. Opening the PR is a publication transition, not overall task completion. +End the final report with the URL, then the leftover line from section 2 as its last line. Return to `done` for CI, review, publication-lane, and final row evaluation. Never merge. Opening the PR is a publication transition, not overall task completion. The handoff holds when the preconditions held, base currency and issue link came from real output, the title and body passed the cold read, the remote branch and PR matched the local publication, and the evidence went back to `done` without claiming overall completion. From c1b494a42906c03fc7d3d2ea6a16a8348e5ba943 Mon Sep 17 00:00:00 2001 From: Bhagya Mudgal Date: Tue, 10 Nov 2026 20:02:26 +0530 Subject: [PATCH 2/2] fix(file-pr): read both checklist and prose outcomes, skip background issues - an issue can hold checkboxes and prose acceptance criteria at once, so reading only the checkboxes dropped open prose criteria from the leftover line - an issue the prompt only mentions, or one already closed, is not work left after merge --- skills/file-pr/SKILL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skills/file-pr/SKILL.md b/skills/file-pr/SKILL.md index a610d05..313ecf2 100644 --- a/skills/file-pr/SKILL.md +++ b/skills/file-pr/SKILL.md @@ -35,7 +35,7 @@ When you choose `Refs #N` over a closing keyword, the final report says the issu ### Record what is left after this merges -From the same issue output, list the work this PR leaves open. Each linked issue supplies its `- [ ]` items when it has them, and otherwise each distinct outcome its body asks for, such as under "What should happen instead", "Done looks like", or "Acceptance criteria", minus anything it marks out of scope. The user's original prompt in the conversation supplies anything else it asked for, since the card's **Originating request** often covers only this PR's part. When that prompt is out of view, as in a dispatched subagent or after compaction, use the card in place of the prompt and end the line with `(original prompt not visible)`, even after `none`. An item is left when no request row on the card finishes it, where a row finishes its item when it is `verified` or `pending` only on a `PR-dependent` gap. Every issue linked with `Refs #N` appears, with its open part, or as `#N (finished, close by hand)` when the batch rule alone kept it from `Closes`. Name each item in a few words, tagged `#N` or `prompt`. An issue the prompt names that this PR does not link appears once, as a whole: +From the same issue output, list the work this PR leaves open. Each linked issue supplies each distinct outcome it asks for, from its `- [ ]` items and from prose sections such as "What should happen instead", "Done looks like", or "Acceptance criteria", minus anything it marks out of scope. The user's original prompt in the conversation supplies anything else it asked for, since the card's **Originating request** often covers only this PR's part. When that prompt is out of view, as in a dispatched subagent or after compaction, use the card in place of the prompt and end the line with `(original prompt not visible)`, even after `none`. An item is left when no request row on the card finishes it, where a row finishes its item when it is `verified` or `pending` only on a `PR-dependent` gap. Every issue linked with `Refs #N` appears, with its open part, or as `#N (finished, close by hand)` when the batch rule alone kept it from `Closes`. Name each item in a few words, tagged `#N` or `prompt`. An issue the prompt asks to be worked on that this PR does not link appears once, as a whole, unless it is already closed. An issue the prompt mentions only as background never appears: ```text Left after this merges: #101 export button; #102 (not started); prompt: rename the CLI flag @@ -43,7 +43,7 @@ Left after this merges: #101 export button; #102 (not started); prompt: rename t With nothing left, the line reads `Left after this merges: none`. Record the line in the publication evidence returned to `done`. -**Gate.** The base ref, remote base tip, and merge base match the refreshed remote state, the issue link comes from issue output, not assumption, every batched `Closes #N` has a `verified` card row and its own commit, with at most one sealed in section 6, and the leftover line names exactly the issue and visible prompt items that no card row finishes, plus every `Refs #N` issue. +**Gate.** The base ref, remote base tip, and merge base match the refreshed remote state, the issue link comes from issue output, not assumption, every batched `Closes #N` has a `verified` card row and its own commit, with at most one sealed in section 6, and the leftover line names exactly the open issue and visible prompt items that no card row finishes, plus every `Refs #N` issue. ### Revalidate card currency and handoff eligibility