Skip to content

Commit 418aeb5

Browse files
refactor(ci): Clarify version bump decision prompt for LLM
1 parent c3c48ac commit 418aeb5

1 file changed

Lines changed: 52 additions & 36 deletions

File tree

.github/blocks/determine-publish-version/action.yaml

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -117,42 +117,58 @@ runs:
117117
echo
118118
cat <<'PROMPT'
119119
Base your decision on the ACTUAL CODE CHANGES below — the commit
120-
messages, the list of changed files, and the diff are all provided.
121-
Commit messages are a hint, not the source of truth: most authors do
122-
not annotate breaking changes, so the diff is authoritative. If the diff
123-
was truncated you may run `git diff` yourself (read-only) for any file.
124-
125-
How to choose the bump (apply in order):
126-
1. MAJOR — a breaking or broadly-disruptive change. Bump major if ANY
127-
of these hold:
128-
- a commit message carries an explicit `BREAKING CHANGE:` footer or
129-
a `type!:` marker (authoritative); OR
130-
- the DIFF is backward-incompatible even when no commit said so —
131-
e.g. a public endpoint/route/exported symbol is removed or
132-
renamed, a request/response schema or required field changes
133-
shape, default behavior changes in a way that breaks existing
134-
callers, or a config/runtime contract changes; OR
135-
- the change lands on the common path for the vast majority of
136-
users (roughly 90%+ of them) — e.g. it changes a default everyone
137-
relies on, forces a migration / re-config / re-auth, or alters
138-
output or UX that nearly all users will hit. A high blast radius
139-
is breaking even if old code technically still compiles.
140-
You are explicitly allowed to bump the major from the diff alone.
141-
2. MINOR — backward-COMPATIBLE new functionality that users opt into: a
142-
new endpoint, flag, exported symbol, or capability is ADDED without
143-
breaking existing ones and without changing what current users
144-
already experience (corresponds to `feat:`).
145-
3. PATCH — bug fixes, performance, internal refactors, docs, chores, or
146-
anything else that neither adds public surface nor breaks it, and
147-
that most users won't actively notice.
148-
149-
Be conservative about MAJOR to avoid false positives. "Could affect 90%
150-
of users" means the change alters something on the common path that
151-
nearly all users already depend on — NOT merely that a new, opt-in
152-
feature is available to them. A purely additive feature is MINOR even
153-
if every user could eventually adopt it, because it doesn't disrupt
154-
what they already do. When genuinely unclear between two levels, pick
155-
the lower one (default to patch).
120+
messages, changed files, and diff are all provided. Commit types such
121+
as `feat:` and `fix:` are hints, not commands. The public compatibility
122+
impact shown by the diff is the source of truth. If the diff was
123+
truncated you may run `git diff` yourself (read-only) for any file.
124+
125+
Choose the highest bump that is concretely justified:
126+
1. MAJOR — backward-INCOMPATIBLE. Use this only when an existing,
127+
supported consumer must change code, configuration, stored data, or
128+
usage to keep working. Concrete evidence includes:
129+
- an explicit `BREAKING CHANGE:` footer or `type!:` marker; OR
130+
- a public endpoint, route, export, option, or accepted input is
131+
removed or renamed; OR
132+
- a documented public schema/type changes incompatibly (a required
133+
field is added, a field is removed, or its meaning/type changes);
134+
OR
135+
- an existing default or runtime/config contract changes such that a
136+
previously valid, supported use case now fails or needs migration.
137+
You may infer a major from the diff without a marker, but identify
138+
the concrete public contract that existing consumers can no longer
139+
use. Blast radius, visibility, changed-line count, or the fact that
140+
behavior is automatic are NOT by themselves evidence of breakage.
141+
2. MINOR — backward-compatible, user-visible functionality is ADDED.
142+
This includes a new endpoint, flag, export, option, capability, or a
143+
newly supported case in an existing operation. A feature does not
144+
have to be opt-in. Returning richer information through an already
145+
supported public type/variant can be minor when it handles data that
146+
was previously ignored or lost and does not remove a supported use
147+
case. A commit labeled `fix:` can therefore still be minor if it
148+
gives users a meaningful new capability.
149+
3. PATCH — a backward-compatible correction or maintenance change that
150+
adds no new user capability: bug fixes that restore already-promised
151+
behavior, performance work, refactors, tests, docs, and chores.
152+
153+
Use these tie-breakers:
154+
- Do not treat observed buggy or incomplete behavior as a compatibility
155+
guarantee unless it was a documented, supported contract.
156+
- A behavior change can be PATCH or MINOR; it is MAJOR only when it
157+
invalidates a supported contract and requires existing users to
158+
migrate.
159+
- To distinguish MINOR from PATCH, ask whether users can now do or
160+
receive something meaningful they could not before. If yes, MINOR;
161+
if the same promised capability merely works correctly, PATCH.
162+
- Documentation for functionality that already existed is PATCH.
163+
- When genuinely unclear between two levels, choose the lower one.
164+
165+
Examples:
166+
- Optional media captions were previously discarded; they are now
167+
exposed as attachment + text using an already-public group variant,
168+
while media without captions is unchanged: MINOR, not MAJOR.
169+
- A new optional API method or config flag: MINOR.
170+
- A public field is renamed and callers must update: MAJOR.
171+
- A crash is fixed without adding a capability: PATCH.
156172
PROMPT
157173
echo
158174
echo "A major bump of ${STABLE_VERSION} increments the first number and"

0 commit comments

Comments
 (0)