1---
2name: changesets
3description: Concise PR finalization changesets. Use when implementation scope is complete and focused validation has finished to classify release impact, consolidate the PR's existing changeset, or write its consumer release note.
4---
5
6Treat a changeset as the release note for the complete PR, not as a log of work
7performed along the way. Finalize it after the current implementation scope and
8focused validation are complete.
9
10## Workflow
11
121. Inspect the complete diff from the merge base, including changeset files
13 already introduced by the PR, and identify directly affected published
14 packages.
152. Classify impact across source types, runtime behavior, entrypoints, required
16 services, lifecycle, and persisted or wire data.
173. Perform the breaking audit below.
184. Record a reason no changeset is required, or update the PR's existing
19 changeset. Create one only when the PR does not have one. When required, read
20 [authoring.md](authoring.md).
215. Validate package names, frontmatter, bump policy, and a concise
22 consumer-facing description.
23
24Do not include unrelated worktree changes.
25
26## PR-level consolidation
27
28The default is one changeset file per PR. One file can name several packages and
29summarize several related fixes or additions. Successive prompts, commits, and
30subtasks within the same PR update that file. If implementation resumes after a
31changeset was drafted, revise it during the next finalization pass.
32
33Use separate files only when a maintainer requests the split or the PR contains
34independent changes that need separate release notes.
35
36## Requirement
37
38Create a changeset for observable runtime behavior changes, including bug
39fixes; exported value or public type changes; entrypoint or export-map changes;
40changes to required services, errors, ownership, defaults, or lifecycle; and
41persisted, serialization, protocol, or wire-format changes.
42
43Tests-only changes, behavior-preserving internal refactors, documentation or
44JSDoc maintenance, and unpublished tooling normally do not need one. When
45unclear, inspect exports and consumer-visible declarations rather than inferring
46from source location.
47
48## Breaking Audit
49
50A change is breaking when valid existing consumer code, configuration, or data
51must change to keep compiling or behaving according to the previous contract.
52Audit every surface:
53
54- **Names and locations:** exports, entrypoints, compatibility exports, and
55 module paths.
56- **Call compatibility:** parameters, accepted inputs, overload resolution,
57 generic parameters, and defaults.
58- **Result compatibility:** return and error types, output narrowing, members,
59 inference, and required services.
60- **Runtime contracts:** defaults, failures, interruption, concurrency,
61 ordering, resource lifetime, acquisition, cleanup, and mutation.
62- **Data compatibility:** persisted schemas, encodings, database layouts,
63 protocols, and wire formats.
64
65Additive exports, optional parameters, and behavior-preserving implementations
66are normally non-breaking. A fix restoring the documented contract is normally
67non-breaking but still needs a changeset when its operational impact is
68consumer-visible. Verify representative existing calls when overload ordering,
69structural assignability, or inference makes compatibility uncertain. API diff
70output is mechanical evidence, not a semantic-version decision.
71
72The task is complete when every affected contract and published package is
73accounted for and either the no-changeset decision is explicit or the PR has one
74consolidated, valid changeset by default. Its release note describes the consumer
75impact and migration for every break without repeating the PR description.