GitHub Pull Request
Prepare a GitHub pull request that is easy to review and proportionate to the change size.
First step
Inspect, when present:
.github/PULL_REQUEST_TEMPLATE*
- existing repository labels (
gh label list)
- recent merged PRs for style
- the repository's own commit / PR conventions (e.g.
CONTRIBUTING.md, AGENTS.md, any repo-specific rules file)
Size classification
- tiny: typo, comment fix, trivial cleanup
- normal: localized bug fix, small feature, focused refactor
- substantial: cross-module change, API/schema change, compatibility impact
Title convention
PR titles use conventional commit format: type(scope): description.
- Describe what was done (the action/solution), not the problem.
- GOOD:
feat(api): add /doctor diagnostics endpoint
- BAD:
feat(api): missing diagnostics endpoint ← this describes the problem; use it for the issue title instead
- The PR title will appear in git history as the merge commit summary.
- Scope follows the repository's commit conventions — typically the owning package / crate / module name.
- Do not include issue numbers in the title (link issues in the body with
Closes #N).
- Do not include internal planning IDs (Block, Phase, Tier, EPIC, Batch, Wave) or file paths.
Required writing rule
Prefer the minimum detail needed for a reviewer to answer:
- what changed?
- why?
- how was it checked?
- what issue does it link to?
- what risk remains?
Linking, assignee, and labels
- Use GitHub closing syntax when a related issue exists (
Closes #N).
Multiple issues: each must have its own keyword — Closes #1, Closes #2, Closes #3. GitHub only parses the keyword immediately before a #N reference; Closes #1 #2 #3 only links #1.
- kind/ label (if the repo uses kind-prefixed labels) must match the conventional commit type in the PR title:
feat(...) → kind/feature
fix(...) → kind/bug
refactor(...) → kind/refactor
docs(...) → kind/docs
chore(...) → kind/chore
ci(...) → kind/cicd
test(...) → kind/test
- Agent-attribution label (if the repo tracks which tool drove the work, e.g.
claude, codex): apply the matching label on every PR the assistant creates.
- Assignee: pass
--assignee per the repo's policy (often the human who owns the work).
- Inspect available labels first (
gh label list); reuse existing labels, do not invent new ones.
- If the repo installs
dotai-conventions with GUARD_GIT_REQUIRE_PR_METADATA=1, the guard enforces --label and --assignee on gh pr create.
Body structure
Use the repository PR template (.github/pull_request_template.md) when it exists. Fill its sections:
tiny PR body
## Summary
<1 sentence>
## Related Issue
Closes #N
## Changes
- <1 bullet>
## Validation
- [x] Focused check or test only
Validation details: <which command was run>.
normal PR body
## Summary
<short paragraph>
## Related Issue
Closes #N
## Changes
- <bulleted list>
## Validation
- [x] Formatter
- [x] Linter
- [x] Focused check or test only
Validation details: <which commands were run and their results>
## Risk / Impact
- <known risks or "None">
substantial PR body
## Summary
<short paragraph>
## Related Issue
Closes #N, Closes #M
## Changes
- <bulleted list by area>
## Validation
- [x] Formatter
- [x] Linter
- [x] Tests for the changed package(s)
Validation details: <which commands, results, anything skipped and why>
## Suggested Merge Commit Title
`type(scope): summary`
## Risk / Impact
- <known risks, follow-up items>
## Breaking Changes
- [ ] None
- [ ] Yes, described below
Details: ...
CI checks
Local validation (formatter, linter, focused tests) is the primary quality gate. Watch CI only if the user explicitly asks or if the repo's conventions require it.
Non-goals
- Do not invent validation results
- Do not bundle unrelated changes unless explicitly requested
- Do not add tool-attribution footers (e.g. "Generated with Claude Code") to the PR body — use the attribution label instead
1---2name: github-pr3description: Draft concise, repository-aligned GitHub pull requests with proportional detail and correct issue linking.4---56# GitHub Pull Request78Prepare a GitHub pull request that is easy to review and proportionate to the change size.910## First step1112Inspect, when present:1314- `.github/PULL_REQUEST_TEMPLATE*`15- existing repository labels (`gh label list`)16- recent merged PRs for style17- the repository's own commit / PR conventions (e.g. `CONTRIBUTING.md`, `AGENTS.md`, any repo-specific rules file)1819## Size classification2021- **tiny**: typo, comment fix, trivial cleanup22- **normal**: localized bug fix, small feature, focused refactor23- **substantial**: cross-module change, API/schema change, compatibility impact2425## Title convention2627PR titles use conventional commit format: `type(scope): description`.2829- **Describe what was done** (the action/solution), not the problem.30 - GOOD: `feat(api): add /doctor diagnostics endpoint`31 - BAD: `feat(api): missing diagnostics endpoint` ← this describes the problem; use it for the issue title instead32- The PR title will appear in git history as the merge commit summary.33- Scope follows the repository's commit conventions — typically the owning package / crate / module name.34- Do not include issue numbers in the title (link issues in the body with `Closes #N`).35- Do not include internal planning IDs (Block, Phase, Tier, EPIC, Batch, Wave) or file paths.3637## Required writing rule3839Prefer the minimum detail needed for a reviewer to answer:4041- what changed?42- why?43- how was it checked?44- what issue does it link to?45- what risk remains?4647## Linking, assignee, and labels4849- Use GitHub closing syntax when a related issue exists (`Closes #N`).50 **Multiple issues**: each must have its own keyword — `Closes #1, Closes #2, Closes #3`. GitHub only parses the keyword immediately before a `#N` reference; `Closes #1 #2 #3` only links `#1`.51- **kind/ label** (if the repo uses kind-prefixed labels) must match the conventional commit type in the PR title:52 - `feat(...)` → `kind/feature`53 - `fix(...)` → `kind/bug`54 - `refactor(...)` → `kind/refactor`55 - `docs(...)` → `kind/docs`56 - `chore(...)` → `kind/chore`57 - `ci(...)` → `kind/cicd`58 - `test(...)` → `kind/test`59- **Agent-attribution label** (if the repo tracks which tool drove the work, e.g. `claude`, `codex`): apply the matching label on every PR the assistant creates.60- **Assignee**: pass `--assignee` per the repo's policy (often the human who owns the work).61- Inspect available labels first (`gh label list`); reuse existing labels, do not invent new ones.62- If the repo installs `dotai-conventions` with `GUARD_GIT_REQUIRE_PR_METADATA=1`, the guard enforces `--label` and `--assignee` on `gh pr create`.6364## Body structure6566Use the repository PR template (`.github/pull_request_template.md`) when it exists. Fill its sections:6768### tiny PR body6970```markdown71## Summary7273<1 sentence>7475## Related Issue7677Closes #N7879## Changes8081- <1 bullet>8283## Validation8485- [x] Focused check or test only8687Validation details: <which command was run>.88```8990### normal PR body9192```markdown93## Summary9495<short paragraph>9697## Related Issue9899Closes #N100101## Changes102103- <bulleted list>104105## Validation106107- [x] Formatter108- [x] Linter109- [x] Focused check or test only110111Validation details: <which commands were run and their results>112113## Risk / Impact114115- <known risks or "None">116```117118### substantial PR body119120```markdown121## Summary122123<short paragraph>124125## Related Issue126127Closes #N, Closes #M128129## Changes130131- <bulleted list by area>132133## Validation134135- [x] Formatter136- [x] Linter137- [x] Tests for the changed package(s)138139Validation details: <which commands, results, anything skipped and why>140141## Suggested Merge Commit Title142143`type(scope): summary`144145## Risk / Impact146147- <known risks, follow-up items>148149## Breaking Changes150151- [ ] None152- [ ] Yes, described below153154Details: ...155```156157## CI checks158159Local validation (formatter, linter, focused tests) is the primary quality gate. Watch CI only if the user explicitly asks or if the repo's conventions require it.160161## Non-goals162163- Do not invent validation results164- Do not bundle unrelated changes unless explicitly requested165- Do not add tool-attribution footers (e.g. "Generated with Claude Code") to the PR body — use the attribution label instead