con un clic
update-release-notes
// Update the release notes file at `apps/docs/content/releases/next.mdx` in the tldraw/tldraw repo based on PRs since the previous release, or archive `next.mdx` to a versioned file when a new version is published.
// Update the release notes file at `apps/docs/content/releases/next.mdx` in the tldraw/tldraw repo based on PRs since the previous release, or archive `next.mdx` to a versioned file when a new version is published.
[HINT] Descarga el directorio completo de la habilidad incluyendo SKILL.md y todos los archivos relacionados
| name | update-release-notes |
| description | Update the release notes file at `apps/docs/content/releases/next.mdx` in the tldraw/tldraw repo based on PRs since the previous release, or archive `next.mdx` to a versioned file when a new version is published. |
| allowed-tools | Bash(git:*), Bash(gh:*) |
This skill handles the operational tasks of maintaining release notes in the tldraw/tldraw repo: adding new PR entries to next.mdx and archiving releases when a new version is published.
This skill runs from the tldraw-internal repo but operates on a local clone of tldraw/tldraw.
Before starting, clone the tldraw repo:
git clone https://github.com/tldraw/tldraw.git /tmp/tldraw
All scripts take the repo path as their first argument. All file edits happen in this clone. At the end, commit and push from the clone.
The SDK releases every four weeks. One week before launch, the SDK is frozen and a production branch is cut from main. During release week, only hotfixes are cherry-picked to production.
The release notes in next.mdx must ultimately reflect what ships on the production branch. However, during the ~3 development weeks before the freeze, we build up release notes from main so they're not empty. The status script detects which phase we're in based on the date of the last minor release:
source: "main", <3 weeks since last minor release): PRs are gathered from main since the last release tag. These are preliminary — some may not ship if they're reverted or if production cherry-picks differ.source: "production", 3+ weeks since last minor release): PRs are gathered from the production branch using git cherry against the previous release branch. Only PRs that landed before the freeze or were hotfixed onto production are included. Entries accumulated from main that aren't on production will be pruned.Run the status script to determine versions and diff branch:
.claude/skills/update-release-notes/scripts/get-changelog-status.sh /tmp/tldraw
This returns:
source - either "main" (development weeks) or "production" (release week)diff_branch (e.g., v4.3.x) - the branch to diff against (used when source is "production")last_tag (e.g., v4.4.0) - the last release tag (used when source is "main")latest_release - the most recent published releaseIf a new release was published since last_version in next.mdx:
next.mdx content to vX.Y.0.mdx (e.g., v4.3.0.mdx)title to the versionapps/docs/content/getting-started/releases.mdx:
## v{major}.x section- [vX.Y](/releases/vX.Y.0) - Brief descriptionnext.mdx:
last_version field to the new releaseThe approach depends on the source field from step 1.
If source is "production" (release week):
Get PR numbers on the production branch since the previous release:
.claude/skills/update-release-notes/scripts/get-new-prs.sh /tmp/tldraw <diff_branch>
This uses git cherry (same approach as extract-draft-changelog.tsx) to compare patches between origin/production and origin/<diff_branch>. Unlike git log, git cherry correctly handles cherry-picked hotfix commits by comparing patch content rather than commit hashes.
If source is "main" (development weeks):
Get PR numbers on main since the last release tag:
.claude/skills/update-release-notes/scripts/get-new-prs-from-main.sh /tmp/tldraw <last_tag>
This uses git cherry to compare patches between origin/main and the release tag, excluding commits that were cherry-picked to production and already shipped in the release.
Both scripts output:
Check stderr from step 3 for any [HOTFIX] commits without PR numbers. For each SDK-relevant one (skip dotcom-only), find the corresponding PR:
gh pr list -R tldraw/tldraw --state merged --search "<hotfix title keywords>" --json number,title --jq '.[]'
Also check sdk-hotfix-please labeled PRs, but verify they actually landed on production — this label is also used for patch releases on the previous release branch (e.g., v4.3.x):
gh pr list -R tldraw/tldraw --label "sdk-hotfix-please" --state merged --limit 20 --json number,title,mergedAt
Add any matched PR numbers to the production PR list from step 3.
Batch fetch all PR information:
.claude/skills/update-release-notes/scripts/fetch-pr-batch.sh <pr1> <pr2> ...
Compare the full PR list (from steps 3 + 4) against the PR numbers already referenced in next.mdx. Remove any entries from next.mdx whose PRs are not in the current set.
source is "production": This prunes entries that were accumulated from main during development but didn't make it to production. These are PRs that landed on main after the production branch was cut and will not ship in this release.source is "main": This removes entries for PRs that were reverted or otherwise no longer on main. Pruning is less aggressive since the full set isn't finalized until production is cut.When removing an entry, also check whether it was referenced in a featured "What's new" section and remove that section too. Update the intro paragraph if it mentions a removed feature.
For each PR not already in next.mdx:
next.mdx that were not in the previous release)next.mdx if presentCheck that:
next.mdx is in the current PR set (from main or production depending on source)Note: When source is "main", the entries are preliminary. Some may be pruned later when the production branch is cut and the source switches to "production".
After editing next.mdx (and any archive files), commit and push from the tldraw clone:
cd /tmp/tldraw
BRANCH="update-release-notes-$(date -u +%Y%m%d-%H%M)"
git checkout -b "$BRANCH"
git add apps/docs/content/releases/
git commit -m "docs: update release notes"
git push -u origin "$BRANCH"
Then create the PR following the standards in @.claude/skills/write-pr/SKILL.md:
docs(releases): update release notesothermain or production) and what was updated (new entries added, stale entries pruned, archival performed, etc.)Documentation rowlast_version fieldThe next.mdx frontmatter includes a last_version field that tracks the most recent published release. This determines which PRs are "new" and need to be added.
During an SDK release, this skill is run twice to get the docs site into its post-release state:
next.mdx with all PRs that will ship in the release (source is "production" during freeze week). This ensures the release notes are complete before publishing.needs_archive: true. This run:
next.mdx to a versioned file (e.g., v4.5.0.mdx)releases.mdx)next.mdx with the new last_versionmain during the freeze (since the release tag) and adds them to the fresh next.mdxAfter the second run, the docs site reflects the published release and next.mdx already has a head start on the next cycle's changes.
shared/release-notes-guide.md for guidance on what a release notes article should contain and how to format it.shared/writing-guide.md for voice and style conventions.scripts/ for automation helpers