From d2b19ef8dbe183acd6f9db420c72fbbcacf60248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Eizedev?= <6794362+eizedev@users.noreply.github.com> Date: Wed, 25 Nov 2026 21:47:49 +0100 Subject: [PATCH 1/4] docs: changelog entries welcome, growth of known offenders left to the maintainer A changelog entry is no longer required from contributors: when it is missing, the maintainer adds it before the merge. When npm run growth fails on an entry that is already in the baseline, the contributor says so and the maintainer fixes it; a new entry stays the contributor's to fix. Co-Authored-By: Claude Opus 5.5 --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTING.md | 9 +++++++-- PRODUCT.md | 3 ++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 00aa23716..d5835b95b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,7 +6,7 @@ - [ ] Linked issue; for a new feature, the answers to the five questions - [ ] New or changed tests fail without this change; no test weakened -- [ ] Docs, upgrading notes and `CHANGELOG.md` describe the new state +- [ ] Docs and upgrading notes describe the new state; `CHANGELOG.md` entry if you can (optional) - [ ] Reviewed before opening by someone who did not write it (strongly recommended, mandatory for the maintainer's own AI agents; for AI-written code a person or a separate AI session), and I read, ran and understand all of it ## Test plan diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 82fe59077..ed02dd062 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ npx playwright install # once, for the browser tests 2. Create a branch named after the change: `feat/...`, `fix/...` or `docs/...`. 3. Write the test first for a fix. Watch it fail, then fix the code. 4. Run the checks below. -5. Update the docs and the changelog. +5. Update the docs, and the changelog if you can. 6. Open a pull request. ## Check your change @@ -43,6 +43,10 @@ npm test npm run growth ``` +`npm run growth` fails when a function, the unused exports or a docs page grows. If it fails on an +entry that is already in `scripts/growth-baseline.json`, say so in the pull request and leave it to +the maintainer. A new entry is yours to fix. + Then, depending on what you changed: | You changed | Also run | @@ -91,7 +95,8 @@ After `uvx zensical@ build --strict`, `node scripts/check-readme-links. ## Changelog and commits -- Add an entry under `[Unreleased]` in the `CHANGELOG.md` of each package you changed. +- Add an entry under `[Unreleased]` in the `CHANGELOG.md` of each package you changed. It is welcome, + not required: if it is missing, the maintainer adds it before the merge. - Use Conventional Commits with the package as scope: `feat(core): ...`, `fix(react): ...`. ## Pull request diff --git a/PRODUCT.md b/PRODUCT.md index 781ac87d6..e43fc9819 100644 --- a/PRODUCT.md +++ b/PRODUCT.md @@ -108,7 +108,8 @@ same for everyone. [CONTRIBUTING.md](CONTRIBUTING.md) has the commands. - A linked issue. For a new feature, also the answers to the five questions. - Tests that fail without the change and pass with it. No test weakened to pass. -- Docs, upgrading notes and changelogs that describe the new state. +- Docs and upgrading notes that describe the new state. A changelog entry is welcome; + [CONTRIBUTING.md](CONTRIBUTING.md#changelog-and-commits) says what happens without one. - Strongly recommended: an independent review before you open the pull request. Have code an AI assistant wrote reviewed by a reviewer that did not write it (a person or a separate AI session), and read, run and understand it yourself. The maintainer reviews every pull request neutrally From ba779337e538d6c8b39a886626fb2490ffdcd731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Eizedev?= <6794362+eizedev@users.noreply.github.com> Date: Wed, 25 Nov 2026 22:01:44 +0100 Subject: [PATCH 2/4] docs: describe every growth check and the deprecation changelog in the contribution rules The growth rule now names all four checks, what to do when an entry shrank, and that a renamed or moved function counts as new. The pull request template asks for the known entry, AGENTS.md points to the rule, and the optional changelog entry covers deprecations and breaks too. Co-Authored-By: Claude Opus 5.5 --- .github/PULL_REQUEST_TEMPLATE.md | 3 ++- AGENTS.md | 1 + CONTRIBUTING.md | 17 ++++++++++++----- docs/versioning.md | 3 ++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d5835b95b..7e78b9224 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,10 +6,11 @@ - [ ] Linked issue; for a new feature, the answers to the five questions - [ ] New or changed tests fail without this change; no test weakened -- [ ] Docs and upgrading notes describe the new state; `CHANGELOG.md` entry if you can (optional) +- [ ] Docs and upgrading notes describe the new state; `CHANGELOG.md` entry (optional) - [ ] Reviewed before opening by someone who did not write it (strongly recommended, mandatory for the maintainer's own AI agents; for AI-written code a person or a separate AI session), and I read, ran and understand all of it ## Test plan - [ ] The checks of [Check your change](https://github.com/eizedev/pivotkit/blob/main/CONTRIBUTING.md#check-your-change): those for every change, and those for what this one changes +- [ ] `npm run growth` passes, or the known baseline entry it fails on is named above - [ ] What I ran, with numbers where a check gives some, such as benchmark timings: diff --git a/AGENTS.md b/AGENTS.md index c9f34c20c..f333350f4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -60,6 +60,7 @@ npm run pack:check # what npm pack would publish, checked npm run growth # functions, unused exports, duplication, docs pages may not grow ``` `npm run growth` compares with `scripts/growth-baseline.json`; when an offender shrinks, `node scripts/growth.js --update` lowers it. +When it fails on a known baseline entry, [CONTRIBUTING.md](CONTRIBUTING.md#check-your-change) says what to do. One package, the UI and the browser tests. A package's `AGENTS.md` lists its size and benchmark commands: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed02dd062..57d0956b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,7 +29,7 @@ npx playwright install # once, for the browser tests 2. Create a branch named after the change: `feat/...`, `fix/...` or `docs/...`. 3. Write the test first for a fix. Watch it fail, then fix the code. 4. Run the checks below. -5. Update the docs, and the changelog if you can. +5. Update the docs. A changelog entry is welcome (see below). 6. Open a pull request. ## Check your change @@ -43,9 +43,15 @@ npm test npm run growth ``` -`npm run growth` fails when a function, the unused exports or a docs page grows. If it fails on an -entry that is already in `scripts/growth-baseline.json`, say so in the pull request and leave it to -the maintainer. A new entry is yours to fix. +`npm run growth` checks that functions, unused exports, duplicated code and docs pages do not grow; +the header of `scripts/growth.js` explains each check. If it fails: + +- on a function or docs page that is already in `scripts/growth-baseline.json` under the same file + and name: say so in the pull request, for example "growth fails on the known entry `LevelMenu`". + The red check is expected, and the maintainer fixes it before the merge. +- because an entry shrank: run `node scripts/growth.js --update` and commit the baseline. +- on anything else (a new entry, duplicated code, a renamed or moved function): that one is yours + to fix. Then, depending on what you changed: @@ -96,7 +102,8 @@ After `uvx zensical@ build --strict`, `node scripts/check-readme-links. ## Changelog and commits - Add an entry under `[Unreleased]` in the `CHANGELOG.md` of each package you changed. It is welcome, - not required: if it is missing, the maintainer adds it before the merge. + not required: if it is missing, the maintainer adds it before the merge. This includes the entries + a deprecation or a break needs. - Use Conventional Commits with the package as scope: `feat(core): ...`, `fix(react): ...`. ## Pull request diff --git a/docs/versioning.md b/docs/versioning.md index 204d12eac..4d54eeea1 100644 --- a/docs/versioning.md +++ b/docs/versioning.md @@ -91,7 +91,8 @@ From 1.0.0, nothing public goes away without a deprecation first. 5. **A register entry.** The [register below](#register) lists the id, what is deprecated, the replacement, the release that deprecated it and the earliest release that removes it. 6. **A changelog entry and an upgrading row.** The changelog names the id. The upgrading page says - what to change while the deprecation's release is the newest. + what to change while the deprecation's release is the newest. When a contribution leaves the + changelog entry out, the maintainer adds it. Removal comes no earlier than the next major release. [CONTRIBUTING.md](https://github.com/eizedev/pivotkit/blob/main/CONTRIBUTING.md#deprecate-something) From 69df96d060f85ff27184308664f6a34a0db57ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Eizedev?= <6794362+eizedev@users.noreply.github.com> Date: Wed, 25 Nov 2026 22:05:19 +0100 Subject: [PATCH 3/4] docs: PRODUCT.md says a known growth failure is the maintainer's Co-Authored-By: Claude Opus 5.5 --- PRODUCT.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PRODUCT.md b/PRODUCT.md index e43fc9819..b514ad5c0 100644 --- a/PRODUCT.md +++ b/PRODUCT.md @@ -115,4 +115,5 @@ same for everyone. [CONTRIBUTING.md](CONTRIBUTING.md) has the commands. and read, run and understand it yourself. The maintainer reviews every pull request neutrally anyway. What your own review would have found comes back as questions and change requests, and it delays the merge. -- Green CI on the commit that gets merged. +- Green CI on the commit that gets merged. A growth check that fails on a known entry is the + maintainer's to fix ([CONTRIBUTING.md](CONTRIBUTING.md#check-your-change)). From ef6f695b62df90c065c84c269a8ff0117fb88c47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Eizedev?= <6794362+eizedev@users.noreply.github.com> Date: Wed, 25 Nov 2026 22:29:15 +0100 Subject: [PATCH 4/4] docs: a known growth entry includes one the change made bigger Co-Authored-By: Claude Opus 5.5 --- .github/PULL_REQUEST_TEMPLATE.md | 2 +- CONTRIBUTING.md | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 7e78b9224..451855500 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -12,5 +12,5 @@ ## Test plan - [ ] The checks of [Check your change](https://github.com/eizedev/pivotkit/blob/main/CONTRIBUTING.md#check-your-change): those for every change, and those for what this one changes -- [ ] `npm run growth` passes, or the known baseline entry it fails on is named above +- [ ] `npm run growth` passes, or the known baseline entry it fails on is named in the Summary - [ ] What I ran, with numbers where a check gives some, such as benchmark timings: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57d0956b7..997cf7b00 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,8 +47,10 @@ npm run growth the header of `scripts/growth.js` explains each check. If it fails: - on a function or docs page that is already in `scripts/growth-baseline.json` under the same file - and name: say so in the pull request, for example "growth fails on the known entry `LevelMenu`". - The red check is expected, and the maintainer fixes it before the merge. + and name, also when your change made it bigger, or on the total of all docs pages: name it in the + pull request's summary, for example "growth fails on the known entry `LevelMenu`". The red check + is expected, and the maintainer fixes it before the merge. CI skips the later steps of that job, + so run `npm test` and `npm run types` locally and say so. - because an entry shrank: run `node scripts/growth.js --update` and commit the baseline. - on anything else (a new entry, duplicated code, a renamed or moved function): that one is yours to fix. @@ -142,7 +144,8 @@ A pull request that deprecates something delivers: - for the services, a `check-config` line that names the id - where possible, the old form keeps working. pivotkit turns it into the new one - a test that uses the old form and checks the warning and the result -- the register entry, a changelog entry with the id, and a row on the upgrading page +- the register entry, a row on the upgrading page, and a changelog entry with the id (welcome, see + [Changelog and commits](#changelog-and-commits)) The removal waits for the next major release.