Skip to content

chore(source-control): declare pr_body_required_sections for the PR-body gate - #240

Merged
kyle-sexton merged 1 commit into
mainfrom
chore/pr-body-required-sections
Jul 24, 2026
Merged

chore(source-control): declare pr_body_required_sections for the PR-body gate#240
kyle-sexton merged 1 commit into
mainfrom
chore/pr-body-required-sections

Conversation

@kyle-sexton

Copy link
Copy Markdown
Contributor

Summary

Plugin-created PRs in this repo trip the pr-issue-linkage gate because the
source-control plugin's portable default PR body scaffolds only ## Summary
and ## Test plan, omitting the ## Related section this repo requires.

This declares the team-tracked pr_body_required_sections key in
.claude/source-control.md — the plugin's designed per-repo seam
(reference/config-resolution.md) — so /source-control:pull-request create
both drafts a ## Related section and pre-checks it before gh pr create.
The key is a closed list that replaces the plugin's default wholesale, so
the portable Summary / Test plan sections are re-declared alongside
Related.

The closing-keyword / No linked issue half of the gate is a separate,
independent mechanism the plugin already satisfies natively (its create logic
always emits a Closes #N line or a No related issue: opt-out marker); it is
not expressible through this heading-only key, so no attempt is made to encode
it here.

Test plan

  • No executable behavior changes; this is a plugin-config data file.
  • This PR's own body is the live verification: it carries ## Summary,
    ## Test plan, and a non-empty ## Related section plus the No linked issue marker, so the pr-issue-linkage / pr-issue-linkage required check
    must pass on it.

Related

No linked issue.

This closes no GitHub issue; it is a convention-config change. It exists
because the gate previously tripped on plugin-composed bodies: PR #234 in this
repo and dotfiles #301 in a sibling repo both failed the same
closing-keyword-plus-## Related validation on creation.

🤖 Generated with Claude Code

https://claude.ai/code/session_0169XBydnqC5S6bkHDz1TDwL

…ody gate

The source-control plugin's portable default PR body scaffolds only
`## Summary` and `## Test plan`, so plugin-created PRs omit the `## Related`
section this repo's pr-issue-linkage gate requires and trip it on creation
(PR #234 here; dotfiles #301 in a sibling repo).

Declare the team-tracked `pr_body_required_sections` list — the plugin's
designed per-repo seam (reference/config-resolution.md) — so
`/source-control:pull-request create` both drafts `## Related` and pre-checks
it before `gh pr create`. The key is a closed list that replaces the default
wholesale, so the portable `Summary`/`Test plan` sections are re-declared
alongside `Related`. The closing-keyword / "No linked issue" half of the gate
is a separate mechanism the plugin already satisfies natively and is not
expressible via this heading-only key.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169XBydnqC5S6bkHDz1TDwL
@claude

claude Bot commented Jul 24, 2026

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 1m 34s —— View job


PR Review

  • Gather context and read changed files
  • Review diff against CLAUDE.md guidelines
  • Post findings

Reviewed: e6ebc18.claude/source-control.md (+6/-0)

This is a clean, correctly-scoped config addition. No blocking findings.

What the change does

Declares pr_body_required_sections in the team-tracked plugin config layer, instructing /source-control:pull-request create to scaffold and pre-check ## Summary, ## Test plan, and ## Related before calling gh pr create. The ## Related section is the piece the plugin's portable default omitted, which was the root cause of the pr-issue-linkage gate failures described in the PR body.

Correctness

  • Format matches established convention. The new key uses the same ## heading + body-value pattern as the four existing keys (babysit_loop_stop_mode, etc.). ✓
  • Gate alignment is accurate. pr-issue-linkage.yml checks for a non-empty ## Related section via /^##\s+related$/i. Declaring it here causes the plugin to scaffold that section, satisfying that check. ✓
  • Closing-keyword half correctly excluded. The gate also requires a closing keyword or No linked issue marker, which is not expressible through a heading-list key. The PR description accurately documents this boundary and notes the plugin already satisfies it natively. ✓
  • Self-verification holds. This PR's own body carries all three declared sections with content, plus No linked issue, so the gate must pass on it. ✓
  • No CLAUDE.md or REVIEW.md criteria are implicated. No secrets, no authorization paths, no injection surfaces, no atomicity requirements, no SHA-pin concerns. ✓

One thing worth noting (not blocking)

The PR description correctly flags that this key is a closed list — it replaces the plugin's portable default wholesale, meaning Summary and Test plan must be re-declared here (which they are). The tradeoff is that any new section the plugin adds to its default in the future won't be inherited; it would need a manual update here. That's an intentional design decision and is documented, but it's worth keeping in mind if the plugin evolves.

Overall: LGTM. The change is minimal, purposeful, and the PR body itself is live proof that it works.

@kyle-sexton
kyle-sexton merged commit aad006f into main Jul 24, 2026
37 checks passed
@kyle-sexton
kyle-sexton deleted the chore/pr-body-required-sections branch July 24, 2026 01:08
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