Skip to content

Propagate Closes #N from constituent PRs into the release PR#188

Merged
sebastientaggart merged 1 commit into
devfrom
feature/186-closes-keyword-propagation
Jun 21, 2026
Merged

Propagate Closes #N from constituent PRs into the release PR#188
sebastientaggart merged 1 commit into
devfrom
feature/186-closes-keyword-propagation

Conversation

@sebastientaggart

Copy link
Copy Markdown
Member

What changed

Reworks how issue close-intent flows from constituent feature PRs into the /deploy release PR, so issues reliably auto-close when a release ships.

submit-for-review.md — dev-target PRs now use Closes #N when a PR fully resolves an issue (and Related to #N for context-only references) instead of the old Issue #N link. Closes #N is inert on a non-default-branch merge, so it does not prematurely close — it records recoverable close-intent for /deploy to harvest. Trunk mode gains the Related to #N option too.

deploy.md — Step 2 now parses a close set (every Closes #N line across constituent PRs, recorded per-PR for verbatim reproduction) separately from a reference set (Related to #N plus legacy Issue #N). The Step 5 HUMAN GATE shows two distinct lists — "Issues that will close on merge" vs "Referenced but NOT closing" — so a dropped close is visible at gate time. The release PR body reproduces the close set verbatim and adds Related to #N lines for references.

status.md — added related to #<number> to the in-progress detection patterns.

Docsbranching.md, docs/skills/submit-for-review.md, and docs/skills/deploy.md updated to describe the new convention.

Generated adapters (.claude / .cursor / .agents / .gemini) regenerated via sync.py --force.

Why

Previously, dev-target PRs recorded issue links as Issue #N, which carries no machine-recoverable close-intent. Weeks later /deploy could not distinguish "this should close" from "this is just referenced," and merged both into one set — so the release PR's auto-close set came out incomplete and issues silently stayed open after release.

Notes

  • Legacy Issue #N PRs already merged to dev degrade to a visible entry in the gate's reference list — no migration machinery; manual close of any straggler is acceptable for these small private projects.
  • The ticket attributed part of the bug to /start, but start.md has no closing-keyword handling — all PR-body enforcement lives in /submit-for-review, so start.md is unchanged.

Test plan

These are prompt-skill markdown files with no executable suite. make check (placeholder + permission validation via sync.py --validate) passes, and the source/adapter copies are in sync.

Closes #186

@sebastientaggart

Copy link
Copy Markdown
Member Author

Review Summary

Verdict: APPROVE

This PR introduces a Closes #N (inert until reaching the default branch) / Related to #N convention for dev-targeting PRs, and teaches /deploy to parse a close-set and reference-set separately. The core premise is correct against GitHub's real behavior: closing keywords only auto-close when a PR merges into the repository's default branch, so Closes #N on a dev-targeted PR is genuinely inert and safe to record as close-intent.

Findings

  • [NOTE] The propagation chain is internally consistent across the three skills: /submit-for-review records Closes #N / Related to #N, /deploy partitions constituent-PR references into a close-set (reproduced verbatim into the main-targeting release PR) and a reference-set (emitted as Related to #N, no auto-close), and /status recognizes both keywords. The "reproduce every Closes #N line verbatim, omitting none" instruction is repeated identically in both the two-branch and three-branch /deploy Step 6 variants, so neither promotion path drops a close.

  • [NOTE] The close-set/reference-set computation lives in /deploy Step 2 under a single {{#if BRANCH_DEV}} block, which covers both two-branch and three-branch modes (BRANCH_DEV is set in both). Step 4 and both Step 6 variants reference that same computed data, so the three-branch (BRANCH_TEST) path is covered, not just two-branch.

  • [NOTE] The /status change adds related to #<number> (and was already matching bare #<number> and issue #<number>) to the "In progress" bucket detection. Because the bare-#<number> match already caught any PR mentioning an issue, this addition is explicitness rather than a behavior change — a context-only Related to reference would already have classified the issue as in-progress. No regression.

  • [NOTE] Legacy Issue #N is deliberately routed to the reference-set (not guessed into the close-set) and surfaced at the human gate as "referenced but NOT closing — confirm none of these should actually close." This is a safe fail-closed choice: it never silently auto-closes an issue whose close-intent can't be recovered, and the gate gives the operator a chance to catch a straggler.

  • [NOTE] Generated adapters under .claude/, .cursor/, .agents/, .gemini/ mirror their skills/github-agile/*.md sources. Verified by running sync.py (reports all skills up to date, clean working tree afterward) and by spot-checking .claude/commands/deploy.md against the source's rendered BRANCH_DEV path. This repo is two-branch mode (BRANCH_DEV=dev, BRANCH_PROD=main, BRANCH_TEST=""), so the adapters correctly render the BRANCH_DEV branch; the trunk-mode template edits in the sources do not appear in this repo's adapters, as expected.

The change is documentation/prompt-only, touches no authentication, payments, secrets, production config, or destructive operations, so the sensitive-area gate does not apply. No correctness, consistency, or sync issues found.

@sebastientaggart sebastientaggart merged commit 06130eb into dev Jun 21, 2026
6 checks passed
@sebastientaggart sebastientaggart deleted the feature/186-closes-keyword-propagation branch June 21, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant