Skip to content

Internals: Add /update-version skill#7748

Merged
JonnyBurger merged 2 commits into
mainfrom
jonnyburger/update-version-skill
May 28, 2026
Merged

Internals: Add /update-version skill#7748
JonnyBurger merged 2 commits into
mainfrom
jonnyburger/update-version-skill

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

Summary

Add a new agent skill /update-version that updates AvailableFrom values in PR docs to the current version from main (packages/core/src/version.ts).

What the skill does

  • Reads canonical VERSION from origin/main
  • Finds AvailableFrom entries touched by the current PR
  • Updates only touched values to match current VERSION
  • Leaves unrelated version tags unchanged

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bugs Ready Ready Preview, Comment May 28, 2026 9:32am
remotion Ready Ready Preview, Comment May 28, 2026 9:32am

Request Review

@JonnyBurger JonnyBurger changed the title Docs: Add /update-version skill Internals: Add /update-version skill May 28, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-version skill — 5-step workflow: fetch version from origin/main, find changed AvailableFrom entries 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 version skill 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 rg command on line 20 matches both removed (-) and added (+) diff lines. Consider narrowing to rg '^\+.*AvailableFrom v="' so agents only see lines that are actually being added/modified.
  • Step 3 ("Update only AvailableFrom values touched by this PR") is vague compared to other skills that provide concrete commands. A sed one-liner or explicit edit instructions would help agents execute reliably.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Kimi K2𝕏

Comment thread .agents/skills/update-version/SKILL.md Outdated
2. Find `AvailableFrom` entries changed in the current PR:

```bash
git --no-pager diff origin/main...HEAD -- packages/docs | rg 'AvailableFrom v="'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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.

Comment thread .agents/skills/update-version/SKILL.md Outdated
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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ 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.

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Main concern addressed — the skill now correctly targets the next patch version instead of the current main version.

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 rg command still matches both removed (-) and added (+) diff lines. Narrowing to rg '^\+.*AvailableFrom v="' would only surface lines being introduced or modified.
  • Step 3 remains vague about the actual edit mechanism. A concrete sed pattern or explicit edit instructions would help agents execute reliably.

Pullfrog  | View workflow run | Using Kimi K2𝕏

@JonnyBurger JonnyBurger merged commit 522e220 into main May 28, 2026
21 checks passed
@JonnyBurger JonnyBurger deleted the jonnyburger/update-version-skill branch May 28, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant