feat(changelog): add SDK group for extension author notes

Release notes had no place for capabilities aimed at extension authors, so SDK changes either landed in user-facing groups or were dropped.

Add an SDK group emitted after Fixes and before Misc. The generator and the server-side update-notes parser accept it, and the JSON index includes `sdk` only when it has entries so older releases keep their shape. The changelog skill and README describe when a change belongs there.

Validated with the generator and update-notes tests and `bun run changelog:check`.
This commit is contained in:
Bohdan Triapitsyn committed 2026-09-18 03:22:35 +03:00
1 parent 86ca680056
commit 921f764c83
6 files changed
+79 -9

No files matched your search

+10 -4
View File
@@ -31,6 +31,9 @@ Every release section is grouped. Under the version header come, in this order a
### Fixes
- Chat: huge patches in tool cards open without freezing the page (thanks to @karimodm).
### SDK
- Actions: use `mode: "background"` to handle a message action without opening a panel.
### Misc
- Bundled OpenCode updated to 1.19.
```
@@ -40,6 +43,7 @@ Where a change goes:
- **New** — something the user could not do before: a feature, a surface, a language.
- **Improvements** — something they could do works better or reads clearer now.
- **Fixes** — something was broken and showed a wrong result; the bullet names the symptom.
- **SDK** — capabilities and API changes for extension authors, under `## App`, after Fixes and before Misc. Name the API and what an author can build with it. User-visible extension features and fixes stay in the regular groups.
- **Misc** — bundled tool versions, packaging, platform support, retirements. Rarely more than a few lines.
The generator emits the groups in this order whatever order the source lists them and drops empty ones; version, date, and headers are its concern, not yours.
@@ -82,6 +86,8 @@ Worked example, same change:
The weak version is accurate and lost the reader at the first comma. The good version keeps the three things a user notices and drops the mechanics that explain them.
SDK bullets address extension authors: use exact API names in backticks and state how to use the new capability. Keep the same short bullet format; implementation internals still belong in the PR.
Load `.agents/skills/communication-style/SKILL.md` and run its pattern scan over the finished sections; its rules on em dashes, hedging, and puffery apply here unchanged.
## Gather
@@ -96,9 +102,9 @@ git diff --stat "$BASE"..HEAD
A squashed merge (subject ending in `(#123)`) or a `Merge pull request #123` commit hides the real change behind a terse subject. Read the PR: `gh pr view <number> --json number,title,body,author,mergedAt`. Distill its intent into the bullet shape above; the body's own wording is reviewer-facing and stays there. When `gh` cannot fetch it, use the commit and diff and say what remains uncertain.
**Follow-ups fold in.** A maintainer commit that completes or reworks a merged PR (a "complete ... follow-ups" commit, a reshaping merge) has no bullet of its own; its user-visible effect goes into the bullet of the PR it finished, written as one behaviour. A change with no user-visible effect (tooling, CI, tests, docs, dead-code removal, internal guards) gets no bullet at all.
**Follow-ups fold in.** A maintainer commit that completes or reworks a merged PR (a "complete ... follow-ups" commit, a reshaping merge) has no bullet of its own; its user-visible effect goes into the bullet of the PR it finished, written as one behaviour. Changes that affect neither app users nor extension authors (tooling, CI, tests, docs, dead-code removal, internal guards) get no bullet.
Gathering is complete when every user-visible change has evidence, a known platform reach, and a contributor identity where one exists.
Gathering is complete when every user-visible or SDK change has evidence, a known platform reach, and a contributor identity where one exists.
## Order and highlights
@@ -119,10 +125,10 @@ End the bullet with `(thanks to @username)` using the GitHub login from the PR o
Read each finished section top to bottom and check every bullet:
- A user could point at it in the app within five seconds of reading it.
- A user could point at it in the app within five seconds of reading it; an SDK entry tells an extension author which API to use and why.
- It is one or two sentences (three for a highlight) in plain words, with no mechanism and no contrast against the old behaviour.
- It sits in the group its wording claims (a Fix names a symptom, a New names a capability) and no higher than the bullets above it in impact.
- Empty groups are absent; present groups appear in the order New, Improvements, Fixes, Misc.
- Empty groups are absent; present groups appear in the order New, Improvements, Fixes, SDK, Misc.
- It appears only in the section whose runtime receives it.
- Its contributor is credited.
- The `title:` line names the release's headline change in two to six plain words.
+4 -1
View File
@@ -22,6 +22,9 @@ Optional intro paragraph shown above the groups.
### Fixes
- Something was broken; name the symptom.
### SDK
- Capabilities and API changes for extension authors.
### Misc
- Bundled tool versions, packaging, platform support, retirements.
@@ -31,7 +34,7 @@ Optional intro paragraph shown above the groups.
- Only what the extension actually mounts. Written separately, on purpose.
```
Groups may appear in any order in a source file; the generator emits them as New, Improvements, Fixes, Misc and drops empty ones. A release without a `## VS Code` section is absent from the extension changelog. Every release needs a `title`; `unreleased.md` carries only the `title` line in its front matter and gets `version` and `date` at release time.
Groups may appear in any order in a source file; the generator emits them as New, Improvements, Fixes, SDK, Misc and drops empty ones. The JSON index includes `sdk` only when it has entries, preserving the shape of older releases. A release without a `## VS Code` section is absent from the extension changelog. Every release needs a `title`; `unreleased.md` carries only the `title` line in its front matter and gets `version` and `date` at release time.
`bun run changelog:check` validates every source file and fails when a generated file is behind the released sources; CI runs it. It writes nothing.
@@ -2,7 +2,7 @@
//
// The repo publishes `changelog/index.json` on `main`: one object per release,
// newest first, with the app notes grouped as New / Improvements / Fixes /
// Misc. This module fetches it and renders the releases between the installed
// SDK / Misc. This module fetches it and renders the releases between the installed
// version (exclusive) and the offered one (inclusive) as the Markdown the
// dialog already understands: a `## [x.y.z] - YYYY-MM-DD` header per release,
// the release title in bold, the intro, then the groups.
@@ -16,6 +16,7 @@ const GROUPS = [
['new', 'New'],
['improvements', 'Improvements'],
['fixes', 'Fixes'],
['sdk', 'SDK'],
['misc', 'Misc'],
];
@@ -37,6 +37,25 @@ A short intro.
- Faster.`);
});
it('shows SDK notes between Fixes and Misc and omits an empty SDK group', () => {
const withSdk = [{
...index[0],
app: { ...index[0].app, sdk: ['Actions: background execution.'], misc: ['Packaging update.'] },
}];
expect(renderUpdateNotes(withSdk, '1.2.2', '1.2.3', compare)).toContain(`### Fixes
- Chat: no freeze.
### SDK
- Actions: background execution.
### Misc
- Packaging update.`);
expect(renderUpdateNotes([{ ...index[0], app: { sdk: [] } }], '1.2.2', '1.2.3', compare)).not.toContain('### SDK');
});
it('returns null when nothing lies in the range or the payload is not an index', () => {
expect(renderUpdateNotes(index, '1.2.3', '1.2.3', compare)).toBe(null);
expect(renderUpdateNotes({ entries: [] }, '1.0.0', '9.9.9', compare)).toBe(null);
+7 -3
View File
@@ -13,7 +13,7 @@
import fs from 'node:fs';
import path from 'node:path';
export const GROUPS = ['New', 'Improvements', 'Fixes', 'Misc'];
export const GROUPS = ['New', 'Improvements', 'Fixes', 'SDK', 'Misc'];
const LEGACY_BANNER = '<!-- Legacy copy for app versions up to 1.22.1, which fetch this file for their update notes. Generated from changelog/*.md while it exists; delete it after 2026-09-19 and nothing will recreate it. -->';
export const SURFACES = ['App', 'VS Code'];
@@ -55,7 +55,7 @@ const parseFrontMatter = (lines, file) => {
* ---
* optional intro paragraph(s)
* ## App
* ### New | Improvements | Fixes | Misc
* ### New | Improvements | Fixes | SDK | Misc
* - bullet
* ## VS Code
* ### ...
@@ -192,7 +192,11 @@ export const renderReleaseNotes = (release) => {
const groupsToJson = (groups) => {
if (!groups) return null;
const out = {};
for (const name of GROUPS) out[name.toLowerCase()] = groups[name] ?? [];
for (const name of GROUPS) {
// SDK is optional so releases written before its introduction keep their JSON shape.
if (name === 'SDK' && !groups[name]?.length) continue;
out[name.toLowerCase()] = groups[name] ?? [];
}
return out;
};
+37
View File
@@ -107,6 +107,43 @@ A short intro.
assert.deepEqual(Object.keys(renderOutputs(loaded, { legacyAppChangelog: true })), ['CHANGELOG.md', 'packages/vscode/CHANGELOG.md', 'changelog/index.json']);
});
test('SDK notes survive Markdown and JSON rendering between Fixes and Misc', () => {
const parsed = parseRelease(release.replace('## App', `## App
### Misc
- Packaging update.
### SDK
- Actions: use \`host.onAction\` for background work.`), 'changelog/1.2.3.md');
const loaded = { releases: [parsed] };
const expected = `### Fixes
- Chat: huge patches open without freezing the page (thanks to @someone).
### SDK
- Actions: use \`host.onAction\` for background work.
### Misc
- Packaging update.`;
assert.ok(renderReleaseNotes(parsed).includes(expected));
assert.ok(renderAppChangelog(loaded).includes(expected));
assert.ok(!renderVsCodeChangelog(loaded).includes('### SDK'));
const [entry] = JSON.parse(renderIndex(loaded));
assert.deepEqual(entry.app.sdk, ['Actions: use `host.onAction` for background work.']);
assert.deepEqual(Object.keys(entry.app), ['new', 'improvements', 'fixes', 'sdk', 'misc']);
assert.equal(Object.hasOwn(entry.vscode, 'sdk'), false);
});
test('empty SDK groups add no heading or JSON field', () => {
const parsed = parseRelease(release.replace('## App', '## App\n\n### SDK\n'), 'changelog/1.2.3.md');
assert.ok(!renderReleaseNotes(parsed).includes('### SDK'));
const [entry] = JSON.parse(renderIndex({ releases: [parsed] }));
assert.equal(Object.hasOwn(entry.app, 'sdk'), false);
});
test('loadReleases refuses a file whose name and version disagree, and a release without a title', () => {
const directory = fs.mkdtempSync(path.join(os.tmpdir(), 'changelog-'));
fs.writeFileSync(path.join(directory, '9.9.9.md'), release);