Skip to content

Repo - FEATURE - Add naming conventions, PR release-note block and changelog - #404

Merged
matt-pharr merged 3 commits into
developfrom
docs/naming-and-release-note-conventions
Aug 18, 2026
Merged

Repo - FEATURE - Add naming conventions, PR release-note block and changelog#404
matt-pharr merged 3 commits into
developfrom
docs/naming-and-release-note-conventions

Conversation

@logan-nc

Copy link
Copy Markdown
Collaborator

Release note

  • Audience: developers
  • Numerical impact: none
  • Migration: none

Reworks the commit, issue and pull request conventions around AI-generated release notes. Commit and PR titles now use a closed Area - TAG[!] - Summary grammar, every PR carries a release-note block, and CHANGELOG.md is compiled from those blocks by a new /release-notes command.

Regression report

No files under src/ are touched, so there is nothing for the harness to move and no harness stamp is required by the new check. Confirmed by git diff --stat: the change is limited to docs/, .github/, ci/, CLAUDE.md, CHANGELOG.md and .claude/.

Notes for reviewers

Why this changed at all: the old CODE - TAG - message convention was built for hand-consolidating release notes. Handing that to AI shifts what the metadata must carry. Measured over the last 400 non-merge commits, MINOR was the single most-used tag at 87 uses but encodes size rather than kind; BUG FIX/BUGFIX/FIX appeared under three spellings; and the one fact a GPEC user most wants at a release — did my answers change — was recorded nowhere, because it cannot be derived from a diff.

Design decisions worth a look:

  • The PR, not the commit, is the unit. Commit subjects follow the grammar but are not enforced; a blocking hook was tried and removed as more friction than it was worth, since release notes are compiled from PR bodies and merge commits now carry the PR title.
  • ! marks a user-visible change and promotes it into a leading Changed results & breaking changes section whatever its tag. REFACTOR! is deliberately legal — a restructuring that perturbs numbers is exactly what a user needs told. MINOR!, TEST! and DOCS! are rejected.
  • MINOR is kept rather than renamed to CHORE. It records the author's judgement that a commit can be skipped, which is what it was actually used for.
  • Valid Areas are derived from src/ on disk, not hardcoded, so the vocabulary cannot go stale. This surfaced that CLAUDE.md and architecture.md both still listed a Splines module that no longer exists and omitted five real ones; both are corrected here.
  • Harness staleness. The release-note block records the commit the harness ran at, and CI fails if anything under src/ changed afterwards — so a report cannot silently rot during review. Docs- and test-only follow-ups never trip it.

Two steps cannot be done from a branch and are still outstanding:

  1. Settings → General → Pull Requests → default merge-commit message = "Pull request title". Some of the reasoning above depends on it — it is what makes git log --merges a well-formed history and what justifies not enforcing commit subjects.
  2. The label set does not exist yet. addLabels auto-creates missing labels with random colors, so nothing breaks, but creating the nine tag labels plus changed-results deliberately would be better, along with retiring the stale splines label.

This PR is also the first live test of the pr-conventions workflow — it has never run. If the checks misbehave, that is the workflow being exercised for the first time rather than the branch being broken.

…angelog

Replace the CODE - TAG - message convention with a closed Area/TAG grammar,
add a release-note block to every PR, and ship a changelog plus a generator
that compiles it. PR titles and release-note blocks are checked in CI; commit
subjects follow the grammar by convention.

Valid Areas are derived from src/ on disk, so the vocabulary cannot go stale.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@logan-nc

Copy link
Copy Markdown
Collaborator Author

I did manual step (1)

The metadata check read context.payload.pull_request, a snapshot taken when the
event fired. Reviewers attached just after creation were therefore invisible, so
a pull request with reviewers was reported as missing them. Adding a reviewer
fired no configured event, so the comment could never clear itself.

Fetch the pull request through the API, and trigger on the assignee and reviewer
events so the check re-runs when that metadata changes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@matt-pharr matt-pharr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just this one edit and can be merged. If you don't want to do it I can do it in ~2h once my plane is in the air

@@ -0,0 +1,347 @@
#!/usr/bin/env python3
"""Validate pull request titles, release-note blocks, and commit subjects.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Highly recommend adding a PEP 723 convention comment header to this script, it will make sure that it is always runnable with no environment fuss with uv run or similar tools.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 198225e — no need to do it from the air.

#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = []
# ///

The script is stdlib-only, so the dependency list is empty; >=3.10 matches the default_language_version pin in .pre-commit-config.yaml. Verified both python3 ci/conventions/check_subject.py --title ... and uv run ci/conventions/check_subject.py --title ... still pass a valid subject and reject EQUIL - FIX - nope with the replacement hints. docs/development/naming.md now shows the uv run invocation alongside the python3 one.


Generated by Claude Code

@logan-nc

Copy link
Copy Markdown
Collaborator Author

labels have been updated

Lets `uv run ci/conventions/check_subject.py` work with no Python
environment set up. The script is stdlib-only, so the block declares
`requires-python = ">=3.10"` and an empty dependency list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VKyvW37urZU6HQ2oQ4hbn9
@matt-pharr
matt-pharr merged commit faf6d03 into develop Aug 18, 2026
9 checks passed
@matt-pharr
matt-pharr deleted the docs/naming-and-release-note-conventions branch August 18, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants