Repository navigation
Write down the commit and PR conventions, and keep session links out of them - #384
Merged
Merged
Conversation
…of them Nothing in CLAUDE.md said how a commit message or a PR description is supposed to look here, so each session re-derived it from whatever the last few commits happened to do. The shape is stable enough to write down: a one-sentence summary and then a fuller description, in both places, with the summary carrying enough of the why to stand on its own in git log. The section is descriptive rather than aspirational. It was written after reading #383, #375 and #382 against the commits they squashed into, and it records what those already do. The summary is imperative and specific, with no type: prefix and no issue number -- the squash merge appends the PR number itself. Subjects on master run 12 to 86 characters, median 59, which is longer than the usual advice and long for a reason, so "shorter is better" is qualified as short-but-specific rather than given a column count. The description carries the argument: what was wrong, what the change does about it, and the decisions the diff cannot show. It closes with a line saying which checks were run. The PR body and the commit message are two renderings of that argument rather than the same text, which is the part most worth recording because it is the easiest to get wrong. The PR bodies use headings, tables and code fences; none of the last twenty-five commit bodies has a heading in it, and they carry the same material as plain ASCII prose, wrapped at about 80 columns, with tables recast as paragraphs or bullets. Two things were left unspecified on purpose. Closes #NNN sits at the top of a PR body and the bottom of a commit message, and #382 said Fixes instead, so there is no settled rule to state. Nor is there one for when a change is small enough to skip the fuller description. The Claude attribution stays: the Co-authored-by trailer and the "Generated with Claude Code" footer are both wanted. The Claude-Session trailer is not, because this repository is public. Seventeen commits on master still carry one and nine PR bodies did until they were edited, but those commits are being left alone -- GitHub keeps refs/pull/N/head forever, so a history rewrite would not actually remove them, and the links resolve to "this session could not be found" for anyone not signed in as their author. What is left is untidy rather than a leak. npm test (133 pass), lint, format:check and typecheck are clean. test:browser was not run: the change is one markdown file and draws nothing. Co-authored-by: Claude Opus 5 (1M context) <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.
Nothing in
CLAUDE.mdsaid how a commit message or a PR description is supposed to look here, so each session re-derived it from whatever the last few commits happened to do. The shape is stable enough to write down: a one-sentence summary and then a fuller description, in both places, with the summary carrying enough of the why to stand on its own ingit log.The section is descriptive rather than aspirational — it was written after reading #383, #375 and #382 against the commits they squashed into, and it records what those already do.
What it says
type:prefix, no issue number — the squash merge appends the PR number itself.git log.Two judgement calls
"Shorter is better" is qualified rather than numbered. Subjects on
masterrun 12 to 86 characters, median 59 — longer than the usual fifty-character advice, and long for a reason:Both spend their length on being specific, so the guidance asks for short-but-specific rather than setting a column count.
The two-renderings paragraph is the part most worth recording, because it is the easiest to get wrong. The PR bodies use
##headings, tables and code fences; none of the last twenty-five commit bodies has a heading in it. They carry the same material as plain ASCII prose, wrapped at about 80 columns, with tables recast as paragraphs or-bullets.Left unspecified on purpose
Closes #NNNsits at the top of a PR body and the bottom of a commit message, and Let getPoet() and getCity() say that they can return nothing #382 saidFixesinstead. No settled rule to state.Session links
The Claude attribution stays — the
Co-authored-bytrailer and the "Generated with Claude Code" footer are both wanted. TheClaude-Session:trailer is not, because this repository is public.Seventeen commits on
masterstill carry one, and nine PR bodies did until they were edited. Those commits are being left alone deliberately. GitHub keepsrefs/pull/N/headforever and will not let you rewrite it, so a force-push would cleangit logwhile the PR "Commits" tab went on serving the same message — and the links resolve to "this session could not be found" for anyone not signed in as their author. What is left is untidy rather than a leak, and not worth rewriting 37 commits across 43 branches to tidy.Verification
npm test(133 pass),lint,format:checkandtypecheckare all clean.test:browserwas not run: the change is one markdown file and draws nothing.