process: Pull request check: closing keyword, claimed issue, and a parent and milestone on the issue
Back to our planType
process
Summary
A pull request should not be able to merge unless it closes an issue that someone has claimed and that sits in the plan. That keeps the board and the pull requests telling the same story.
Details
Today: .github/workflows/pr-policy.yml accepts Part of #N as a valid link, and checks only the linked issue's labels, the description sections and the knowledge note. A Part of link does not move the board card, no check looks at whether the issue is assigned, and nothing looks at its parent or milestone.
Add rules, each with a stable ID in the message:
PR-CLOSES: the description hasCloses #Nfor an issue (noPart of).PR-ASSIGNED: the linked issue has an assignee, since assigning is how the card moves to In progress.PR-MILESTONE: the linked issue has a milestone.- The existing label and description checks keep working and get IDs too (
PR-LABELS,PR-SECTIONS, and so on), so every failure can be counted.
Each message names the ID and says in one line what to fix, so the next attempt passes. Reuse linkedIssues and the other helpers in .github/scripts/pr-body.mjs; no new system.
Depends on the decision to retire Part of (the "one issue, one pull request" issue). Pull requests that depend on each other stay on a native stack and each closes its own sub-issue.
Rollout: open pull requests written under the old rule will fail on their next edit. Change their descriptions first, or land this when none are open.
Feeds the gate feedback log (#882) with the same IDs.
Size: M. Groomed in a session that could not switch models; a review by a stronger model is welcome before work starts. Shares process-file hot spots with the other gate issues, so they are worked one at a time.
Acceptance criteria
- Not done: A pull request with
Part of #N, or no link, fails withPR-CLOSES. - Not done: A pull request whose issue has no assignee fails with
PR-ASSIGNED. - Not done: A pull request whose issue has no milestone fails with
PR-MILESTONE. An epic is optional (multi-part work only), so a lone issue with no epic passes. - Not done: Every other existing failure carries an ID.
- Not done: Each rule has a test written first; Dependabot pull requests stay exempt.
- Not done: The PR template and the process docs name the rules and IDs once.
- Not done: A stack of pull requests, each closing its own sub-issue, passes on its own.
Files likely touched
.github/workflows/pr-policy.yml, .github/scripts/pr-body.mjs, .github/scripts/pr-body.test.mjs, .github/pull_request_template.md, docs/process/project-management.md
Must not touch
src/, .github/workflows/issue-labels.yml, .github/workflows/issue-policy.yml
Open questions
None for the owner. Blocked by the "one issue, one pull request" issue.
Area
ci
Priority
high
- Not done: (added 2026-11-09) A rule with its own ID checks the link works both ways: the pull request names its issue and the issue shows the pull request on its timeline.
Generated by Claude Code, opens in a new tab