Purpose
Produce a reviewer-ready PR description that is archaeologically honest.
When to Use / When NOT to Use
Use when: creating/updating a PR; after IMPL_REPORT / QG_REPORT.
Do not use when: no diff yet; user wants marketing copy unrelated to changes.
Preconditions
Must read git diff / commits (and PR template if any). Refuse to invent a body without the change set.
Inputs / Outputs
Inputs: diff, commits, IMPL_REPORT, QG_REPORT/REVIEW (optional), ticket ID if provided.
Outputs: PR_BODY (markdown)
Upstream / Downstream
Upstream: feature-implementer, quality-gate, code-reviewer.
Downstream: human/agent opens PR (gh pr create).
Core Principles
- Diff and commits are the source of truth.
- Unknown beats fabricated “Why.”
- Testing section lists only commands actually run.
- Prefer
.github/PULL_REQUEST_TEMPLATE.md(or org template) structure. - Call out risks and rollout notes when evidenced.
- No emoji stuffing or hype.
- Never claim QG Pass without QG_REPORT.
Process
- Load template if present; else use default sections below.
- Summarize what changed from diff (paths + behavior).
- Why — only from commits/ticket/user; else
Unknown — please fill. - Test plan — from IMPL_REPORT commands_run only; mark untested explicitly.
- Risks / rollback — from PLAN or obvious migration/flag evidence.
- Include QG/Review decision if artifacts exist.
- Reviewer focus — sharp bullets, not essays.
Evidence Requirements
Every factual claim cites path or commit subject. Omit unsupported sections rather than inventing.
Stop Conditions / Failure Modes
| Condition | Action |
|---|---|
| No diff | Refuse |
| User asks to hide risks | Refuse; include risks or stop |
Severity + Confidence
N/A. Accuracy over completeness.
Output Contract
Default markdown:
## Summary
...
## Why
...
## Changes
- `path`: ...
## Test plan
- [ ] `command` — result (from IMPL_REPORT) / NOT RUN
## Risks & rollback
...
## Quality
QG/Review: ... or Unknown
## Reviewer focus
...
Handoffs
None required. Optionally note remaining Block items from QG.
Never
- Never invent business intent, metrics, or test results.
- Never omit breaking changes visible in the diff.
- Never include secrets from the diff; redact and warn.