Internals: Add /update-version skill#7748
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Important
The skill instructions risk agents incorrectly back-dating new features to the already-released version. A few refinements will make it safe to use.
Reviewed changes — A new agent skill .agents/skills/update-version/SKILL.md that automates updating <AvailableFrom> version tags in docs to match the current version on main.
- Add
update-versionskill — 5-step workflow: fetch version fromorigin/main, find changedAvailableFromentries in the PR diff, update only touched values, and push.
⚠️ Risk of incorrectly versioning new features
The skill tells agents to set AvailableFrom to the version currently on main. But main holds the already-released version (4.0.468). New features introduced in a PR should be tagged with the next version (4.0.469 per the version skill). If an agent runs this skill on a PR adding a new feature, it will back-date the availability to a version that does not contain the feature.
The skill needs to either:
- Explicitly scope itself to "existing features whose docs are being corrected" and warn against use on new features, or
- Reference the
versionskill and explain when to use current vs. next version.
Technical details
# Risk of incorrectly versioning new features
## Affected sites
- `.agents/skills/update-version/SKILL.md:6` — "Use this when a PR contains docs changes with `<AvailableFrom v="...">` and the value should match the version currently in `main`."
- `.agents/skills/update-version/SKILL.md:15` — Example uses current version `4.0.468`.
## Required outcome
- Agents must not use the current `main` version for new features.
- The skill must clarify its intended use case (correcting existing docs) or incorporate next-version logic.
## Suggested approach
Add a preamble that distinguishes two cases:
1. **New feature in this PR** → Use the *next* version (per the `version` skill: current patch + 1).
2. **Docs fix for an existing feature** → Use the version when the feature was actually introduced (which may be the current `main` version or earlier).
If the skill is meant only for case 2, state that explicitly and add a cross-reference to the `version` skill for case 1.
## Open questions for the human
- Is the intended use case strictly "docs were merged with the wrong `AvailableFrom` and need correction"?
- Should the skill be renamed to something like `fix-available-from` to signal its corrective nature?ℹ️ Nitpicks
- The
rgcommand on line 20 matches both removed (-) and added (+) diff lines. Consider narrowing torg '^\+.*AvailableFrom v="'so agents only see lines that are actually being added/modified. - Step 3 ("Update only
AvailableFromvalues touched by this PR") is vague compared to other skills that provide concrete commands. Asedone-liner or explicit edit instructions would help agents execute reliably.
Kimi K2 | 𝕏
| 2. Find `AvailableFrom` entries changed in the current PR: | ||
|
|
||
| ```bash | ||
| git --no-pager diff origin/main...HEAD -- packages/docs | rg 'AvailableFrom v="' |
There was a problem hiding this comment.
ℹ️ This will match both removed (-) and added (+) lines in the diff. An agent might try to update a line that was deleted. Narrowing to rg '^\+.*AvailableFrom v="' would only surface lines that are actually being introduced or modified.
| git --no-pager diff origin/main...HEAD -- packages/docs | rg 'AvailableFrom v="' | ||
| ``` | ||
|
|
||
| 3. Update only `AvailableFrom` values touched by this PR so they match the `VERSION` from step 1. |
There was a problem hiding this comment.
ℹ️ This step is vague compared to other skills (e.g., fix-dependabot provides exact rg and sed commands). Consider adding a concrete command or edit pattern so agents know precisely how to perform the replacement.
There was a problem hiding this comment.
✅ Main concern addressed — the skill now correctly targets the next patch version instead of the current
mainversion.
Reviewed changes (incremental) — The author updated the skill to compute the next patch version (main + 0.0.1) rather than using the current version on main, eliminating the risk of back-dating new features.
- Clarify version bump semantics — Description, usage guidance, and step 1/3 all updated to reference the next patch version.
ℹ️ Nitpicks
- The
rgcommand still matches both removed (-) and added (+) diff lines. Narrowing torg '^\+.*AvailableFrom v="'would only surface lines being introduced or modified. - Step 3 remains vague about the actual edit mechanism. A concrete
sedpattern or explicit edit instructions would help agents execute reliably.
Kimi K2 | 𝕏

Summary
Add a new agent skill
/update-versionthat updatesAvailableFromvalues in PR docs to the current version frommain(packages/core/src/version.ts).What the skill does
VERSIONfromorigin/mainAvailableFromentries touched by the current PRVERSION