Driver
.claude/rules/pr-quality.md mandates a Glossary section in every PR (enforced by validate-pr-create.sh). It also describes a Testing section as part of the canonical PR description in workflows/code-review.md — "Testing: How to verify this works" — but there is no hook checking for it. Result: PRs routinely ship without reviewable test instructions, forcing reviewers to reverse-engineer "how do I know this works?" from the diff.
Scope
Extend validate-pr-create.sh with a required-section check for PR bodies, driven by the same config schema as the issue-structure validator (apexyard#107).
# .claude/project-config.json
pr:
required_sections:
- "Summary"
- "Testing"
- "Glossary"
skip_marker: "<!-- pr-sections: skip -->"
Validation:
- Extract the PR body from
--body / --body-file / stdin.
- For each section in
pr.required_sections, require an ## <Section> (or ### <Section>) heading followed by non-empty content.
- On fail: exit 2 naming the missing section(s).
- Skip marker honours legitimate exceptions (trivial dependency bumps, pure version-tag commits).
Acceptance Criteria
Risks / Dependencies
- Risk of config drift if the issue hook and the PR hook diverge. Mitigation: shared helper (
_lib-read-ticket-schema.sh or equivalent) introduced in apexyard#107.
- Small risk of friction for PR authors. Mitigation: skip marker + helpful error message.
- Depends on apexyard#109 (config location) and apexyard#107 (schema reader).
Glossary
| Term |
Definition |
| Required section |
A Markdown heading that must be present in the PR body with non-empty content. |
| Testing section |
The heading under which the PR author documents how to verify the change — commands, manual steps, screenshots, etc. |
Driver
.claude/rules/pr-quality.mdmandates a Glossary section in every PR (enforced byvalidate-pr-create.sh). It also describes a Testing section as part of the canonical PR description inworkflows/code-review.md— "Testing: How to verify this works" — but there is no hook checking for it. Result: PRs routinely ship without reviewable test instructions, forcing reviewers to reverse-engineer "how do I know this works?" from the diff.Scope
Extend
validate-pr-create.shwith a required-section check for PR bodies, driven by the same config schema as the issue-structure validator (apexyard#107).Validation:
--body/--body-file/ stdin.pr.required_sections, require an## <Section>(or### <Section>) heading followed by non-empty content.Acceptance Criteria
validate-pr-create.shblocks on missing Testing section (in addition to the existing Glossary check)..claude/hooks/tests/cover each missing section and the skip path.docs/rule-audit.mdentry updated.Risks / Dependencies
_lib-read-ticket-schema.shor equivalent) introduced in apexyard#107.Glossary