From 009a1cfbeeeaf14f2dbffac2f645121a43d529c5 Mon Sep 17 00:00:00 2001 From: CJ Rivas Date: Tue, 24 Nov 2026 16:04:57 -0500 Subject: [PATCH] WZ: Use What/Why/Verified for PR bodies - pr-creator skill: body is What / Why / Verified bullet sections, replacing Problem / Changes - CLAUDE.md: Pull Requests section names the three headings --- .claude/skills/pr-creator/SKILL.md | 58 ++++++++++++++++++------------ CLAUDE.md | 2 +- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/.claude/skills/pr-creator/SKILL.md b/.claude/skills/pr-creator/SKILL.md index d46a6adb..1c4fefa7 100644 --- a/.claude/skills/pr-creator/SKILL.md +++ b/.claude/skills/pr-creator/SKILL.md @@ -50,37 +50,51 @@ Use equivalent GitHub tooling when `gh` is unavailable. - Start the title with exactly `WZ: `, followed by a short, specific description of the branch's logical change. -- Structure the body as two short sections, in this order: - - `## Problem` — one plain sentence naming the problem or gap this PR addresses. State - it from the user/system's perspective, not as a restatement of the diff (e.g. "Renewal - webhooks weren't updating member expiry" rather than "Add webhook handler"). - - `## Changes` — concise `- ` bullet points describing what the PR actually does. -- Keep the body minimal overall: one sentence under `Problem`, and only as many bullets - under `Changes` as there are distinct logical changes. -- Describe only changes present in the committed branch diff. -- Mention verification only when it actually ran; never imply that unrun checks passed. -- Omit boilerplate, repeated title text, empty headings, and speculative follow-up work. -- If the branch is a pure refactor, chore, or tooling change with no user-facing problem - to name, state that plainly under `Problem` (e.g. "No behavior change; simplifies X for - maintainability") rather than inventing a problem. +- Structure the body as bullet sections, in this order: + - `## What` — required. One `- ` bullet per change, one concept per bullet. + - `## Why` — one bullet per reason: the problem or gap behind the change, stated from + the user/system's perspective rather than as a restatement of the diff. Omit the + section when the title already says it. + - `## Verified` — one bullet per check that actually ran, with its result + (`` `bun run verify` green ``, a manual run and what it showed). Include it whenever + anything was run; omit it otherwise, and never imply that unrun checks passed. +- Add another section only when the PR genuinely needs one (`## Behaviour to note` for a + change a reader would trip over, `## After merge` for steps such as `bun run deploy:nas`, + `## Screenshots` for portal changes). It goes between `## Why` and `## Verified`. +- The body is bullets, never prose. Use `-`, not `*`. Keep each bullet to one line with no + trailing period, and to roughly eight per section; more means rolling bullets up or + splitting the PR. +- Backtick anything that reads as code in the body: commands, flags, paths, identifiers, + env vars. A multi-area PR may lead a bullet with its scope (`` `loops.ts`: … `` or + `**admin-portal**: …`). +- Describe only changes present in the committed branch diff, and do not restate the diff. +- Omit boilerplate, repeated title text, empty headings, footers, and speculative + follow-up work. Example: ```text WZ: Add subscription renewal handling -## Problem -Renewal webhooks were received but never updated a member's expiry, so paid renewals -silently lapsed. +## What -## Changes -- process successful renewal webhooks -- add regression coverage for renewal state changes +- `webhook/handlers.ts`: handle `invoice.paid` and extend the member's expiry +- regression coverage for renewal state changes + +## Why + +- renewal webhooks were received but never updated a member's expiry +- so paid renewals silently lapsed + +## Verified + +- `bun run verify` green +- `bun run test:e2e` renews a test-mode subscription and the expiry moves ``` -Before creation, validate that the title matches `WZ: ` and that the body -has exactly the `## Problem` / `## Changes` structure above, staying minimal under the -current `CLAUDE.md` rules. +Before creation, validate that the title matches `WZ: `, that the body opens +with `## What`, that every section is bullets, and that `## Verified` lists only checks +that ran, staying minimal under the current `CLAUDE.md` rules. ## Create and verify diff --git a/CLAUDE.md b/CLAUDE.md index a0009b60..d9adfb63 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -209,7 +209,7 @@ Everything else here is convention, and the import-alias rule in particular has ## Pull Requests - Should follow the same naming convention as commits and every PR title should start with `WZ: a short title` -- The body of the PR should be minimal and favour bullet points +- The body of the PR should be minimal and favour bullet points, under `## What`, `## Why` and `## Verified` headings (the `pr-creator` skill has the template) ## Skills