Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .claude/commands/pr.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ Create pull requests for pgxntool and pgxntool-test changes, following the two-r
- Bad: `"Add tests for pgxntool PR #31 (fix results ordering, whitespace, overrides)"`
- Good: `"Fix results ordering, control file whitespace, ENABLE_* overrides"`

## Closing GitHub Issues (CRITICAL)

When a PR fixes one or more issues, give each its own `Fixes #N` / `Closes
#N` / `Resolves #N` line in the PR body -- never combine them into a single
comma-separated list like `Fixes #7, #14, #19`. **GitHub's auto-close only
recognizes the first issue number in that pattern and silently drops every
issue after it, with no error or warning.** This caused real drift in the
2.2.0 release: one PR's `Fixes #7, #14, #19, #28, #50, #53` line only
auto-closed #7 -- the other four issues were genuinely fixed but stayed
open on GitHub until a manual post-release audit caught it.

## PR Description Guidelines

**Think: "Someone in 2 years reading this in the commit log - what do they need to know?"**
Expand Down
23 changes: 23 additions & 0 deletions .claude/skills/commit/guides/commit-message-format.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Commit Message Format Guide

## Closing GitHub Issues (CRITICAL)

When a commit fixes one or more issues, give each its own `Fixes #N` /
`Closes #N` / `Resolves #N` line -- never combine them into a single
comma-separated list like `Fixes #7, #14, #19`. **GitHub's auto-close only
recognizes the first issue number in that pattern and silently drops every
issue after it, with no error or warning.** This caused real drift in the
2.2.0 release: one commit's `Fixes #7, #14, #19, #28, #50, #53` line only
auto-closed #7 -- the other four issues were genuinely fixed but stayed
open on GitHub until a manual post-release audit caught it.

Correct:
```
Fixes #7.
Fixes #14.
Fixes #19.
```

Incorrect:
```
Fixes #7, #14, #19.
```

## Item Ordering (CRITICAL)

Order all items (changes, bullet points) by **decreasing importance**:
Expand Down
35 changes: 35 additions & 0 deletions .claude/skills/release/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,41 @@ only -- it's not a standing order for HISTORY.asc as a whole, and older,
already-released sections are never touched. If an entry's category is
genuinely unclear, ask the user rather than guessing.

### Compile the complete fixed-issues line

Independent of the individual STABLE entries above (which only narrate
changes important enough to write up), compile one line listing *every*
pgxntool issue actually closed by a commit in `release..HEAD` -- including
issues covered by a change too minor to warrant its own STABLE entry (e.g.
a one-line internal fix nobody bothered to narrate). This also catches
issues GitHub's auto-close silently failed to close:

1. For every PR merged in `release..HEAD`, read its own
`closingIssuesReferences` (`gh pr view <n> --json closingIssuesReferences`)
-- GitHub's own parsed understanding of which issues that merge closes.
2. ALSO read the PR body directly for any other `Fixes #N` / `Closes #N` /
`Resolves #N` mentions not already present in that field. **GitHub only
recognizes the first issue in a single comma-separated line** like
`Fixes #7, #14, #19` -- every issue after the first is silently dropped,
with no error or warning. This is not hypothetical: 2.2.0 shipped with
issues #14, #19, #50, and #53 all genuinely fixed by one PR whose body
read `Fixes #7, #14, #19, #28, #50, #53` -- only #7 auto-closed, and the
other four sat open on GitHub until caught by a manual post-release audit.
3. Union both sources per PR, then union across all PRs in the release.

Append the result as a single line at the end of the STABLE section (after
the last `==` entry, before the next version's heading), e.g.:

```text
Issues fixed in this release: #7, #14, #19, #28, #46, #50, #53, #54, #57, #62, #65
```

**Then check each listed issue's actual state on GitHub.** Any still open
despite being genuinely fixed didn't actually auto-close -- close it now
with a comment linking to the fixing PR, rather than deferring it to a
later audit. Apply the same check to any pgxntool-test issue a paired PR's
body referenced.

### Stamp the version

Edit `../pgxntool/HISTORY.asc`: replace the `STABLE` heading with the version number.
Expand Down
Loading