Repository navigation
feat(pr-create): order the description from high level to detail - #160
Merged
Merged
Conversation
- 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 (theTicket: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:
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
.githubtemplate 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 itsClaims: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.pystill parses every line it reads:Ticket:,Claims:and the Already checked block.Departures
Used by:under What changed andClaims: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-PRTicket:line it qualifies.Details
Design decisions
writing's structure rules andshort.mdnow say a pull request opens on the problem, so the two skills agree.docs/design.mdrecords why the order changed.comment-style.mdpoints to the new level question.What changed
skills/pr-create/body.md,standard-repo.mdandSKILL.md: the new layout and its rules.body.mdnow carries theTicket: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 aControlled:warning.skills/writing/SKILL.md,references/short.mdandskills/pr-review/comment-style.md: wording to match.docs/contracts.md: the Already checked block's position (no version change; no parsed line changed).Testing
Run:
bash tests/checks.shpr-create-adopted-orderhas a fixture context page for PROJ-98. It checks for a bareTicket: PROJ-98line and the four headings in order. In every branch draft, Motivation took the requested shape: the problem and its cost, then the ask.standards/templates/libera/PULL_REQUEST_TEMPLATE.md) still has## Summary,## How to testand a sentence after itsTicket: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).