Skip to content

feat(pr-create): order the description from high level to detail - #160

Merged
mmaclay merged 10 commits into
mainfrom
fix/pr-create-description-order
Dec 5, 2026
Merged

mmaclay merged 10 commits into
mainfrom
fix/pr-create-description-order

Conversation

@mmaclay

@mmaclay mmaclay commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Origin: #151 and its follow-up comment, from redrafting LASP-Libera/libera_cdk #120 to #126
Sandbox: pr-create-adopted-order, --check. Sonnet at 3c08249: branch 3/3, main 0/2. Haiku, seven rounds: main 0/4; branch 5/8 at 3c08249, its misses one dropped Ticket: line, one merged heading and one run that stopped to ask whether the fixture's invented page was real. Each earlier Haiku miss led to a fix below (the Ticket: line in body.md, the whole context page read, the fixed headings). pr-create-new-flow: main and branch fail only its Mermaid check, unrelated to this change. Five review rounds, the last two clean; the last commit, 34af9b5, only rewords where an incidental change goes, after the fifth.
Canary: none yet

Ticket: #151

Motivation

pr-create opened its descriptions with a cryptic Ticket: line and a Summary that explained how the code works now, and put the problem it solved further down. Reviewers had to open the ticket to learn what was asked and why. Gavin redrafted seven libera_cdk descriptions as Motivation, Change Summary, Departures and Details, then hand-edited them. Every edit landed in the top three sections, and none under Details. #151 asked pr-create to write that layout. The follow-up comment asked for the habits behind the edits: a reason with each claim, the code's own names, plain time and instruction words, and a level that reflects a person's edit.

Change Summary

A description now reads from high level to detail:

  • Motivation: the problem in the past tense and its cost, then one plain sentence on what the ticket asked.
  • Change Summary: what is true after merge, at the level of behavior. It keeps what a reviewer must not miss: deploy prerequisites, behavior another caller sees, a widened permission, merge order.
  • Departures: each place the change differs from the ticket or the design, with its reason, or "None."
  • Details: the criteria table, design decisions, what changed, testing, and the Already checked block.

This applies with no template and in a repository with a standard, whose template's Summary and How to test map onto these sections. A repository's own .github template is still kept as it is.

The Ticket: line carries the key only. A template placeholder after the key is dropped, and its content goes into Motivation. A multi-PR ticket's · part k of n · base: suffix and its Claims: line stay.

An update to an open description starts from the live description and keeps a person's wording and layout. Before showing the update, it asks whether a person edited the description since it was posted, recommending the level the description carries, or 5/5 where it carries none, so the level can follow the edit. Nothing kept a copy of the posted body to compare against.

Used by: nothing outside this repository. record.py still parses every line it reads: Ticket:, Claims: and the Already checked block.

Departures

  • The issue's after-format moved Used by: under What changed and Claims: under the criteria table. Both stay where they were. Used by: names the consumers a change reaches, which a reviewer must not miss. Claims: sits beside the multi-PR Ticket: line it qualifies.
  • The comment asked for the level to be asked again after a person's edit. The skill asks on every update, recommending no change, because it keeps no copy of what it posted to detect an edit.

Details

Design decisions

  • A question the ticket left open, and the plan gate settled, goes in Departures, as Gavin's libera_cdk ticket-audit: works from the plugin's own profile when run from its root #126 breakdown did. The context page's "What changed from the original ticket" goes under Design decisions: it records how the ticket was drafted, not where the change left it.
  • The rules from the follow-up comment are bullets in "Write it to be read", not a template. Sandbox runs showed prose rules move output less than the written audit does, so the audit stays as it was.
  • writing's structure rules and short.md now say a pull request opens on the problem, so the two skills agree.
  • docs/design.md records why the order changed. comment-style.md points to the new level question.

What changed

  • skills/pr-create/body.md, standard-repo.md and SKILL.md: the new layout and its rules. body.md now carries the Ticket: line itself, the template's own standing in for it, never a second. The four top headings are fixed, and a known limit or an incidental change goes under Change Summary or Design decisions, not a heading of its own. The context page is read whole after its first line is checked for a Controlled: warning.
  • skills/writing/SKILL.md, references/short.md and skills/pr-review/comment-style.md: wording to match.
  • docs/contracts.md: the Already checked block's position (no version change; no parsed line changed).
  • Versions: pr-create 3.9.0, writing 1.2.4, pr-review 6.14.1.
  • Public signatures: none.

Testing

Run: bash tests/checks.sh

  • The new scenario pr-create-adopted-order has a fixture context page for PROJ-98. It checks for a bare Ticket: PROJ-98 line and the four headings in order. In every branch draft, Motivation took the requested shape: the problem and its cost, then the ask.
  • Downstream: libera_standards' template (standards/templates/libera/PULL_REQUEST_TEMPLATE.md) still has ## Summary, ## How to test and a sentence after its Ticket: key. This branch maps those, but the template should be updated to the new headings in a separate pull request there.

🤖 Generated with Claude Code. AI assistance level: 5/5 (not read by a person).

mmaclay and others added 10 commits December 4, 2026 08:33
- Lay the body out as Motivation, Change Summary, Departures, then
  Details holding the criteria, design decisions, what changed,
  testing and the Already checked block
- Write Motivation in the past tense, the problem and its cost first,
  then what the ticket asked in one plain sentence
- Keep the Ticket line to the key, dropping a template placeholder
- Give each claim above Details its reason, name things as the code
  and ticket do, and mark time and instruction plainly
- Read the live description before an update and ask for the AI
  level again when a person has edited it
- Add the pr-create-adopted-order scenario and its context fixture

Closes #151

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ask on each update whether a person edited the description since it
  was posted, keeping the live level unless they say yes, since no
  copy of the posted body is kept to compare against
- Keep a person's wording and layout in an update
- Open Motivation on whoever the problem fell on, in writing and
  pr-create alike, and put the goal first in Change Summary
- Accept a blockquoted Ticket line in pr-create-adopted-order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ask whether a person edited the description before showing the
  update, so the gate shows the level that will be posted
- Recommend 5/5 where the live description carries no level
- comment-style's pointer names a pull request description, the one
  surface pr-create's rule covers
- design.md records why an update asks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A run read only the first line of the context page and stopped to ask
for the why the page held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs added a Known limits heading and dropped Details; a limit or a
prerequisite now goes in Change Summary or Design decisions, and the
four top headings are fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
body.md carries no Ticket: line, so a repository with no template got
none in half the runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A body drawn from body.md alone dropped the line in a third of runs;
the template's own line still stands in for it, never a second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The no-added-heading rule covers body.md's and the standard template's
headings, not a repository's own template, and an incidental change
goes under Design decisions there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmaclay
mmaclay marked this pull request as ready for review December 5, 2026 00:31
@mmaclay
mmaclay merged commit 16b9095 into main Dec 5, 2026
1 check passed
@mmaclay
mmaclay deleted the fix/pr-create-description-order branch December 5, 2026 00:31
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