docs/plans/2026-04-27-major-release-migration-sync.md
Hard cut Plate's generated release-doc body sync and move to a Better Auth-style release architecture: Changesets publishes packages, the workflow creates one global GitHub Release with deterministic package-changelog notes plus Claude polish, and /docs/releases renders GitHub Releases instead of storing giant generated changelog blobs in MDX.
CHANGELOG.md sections for the published package versions./docs/releases fetching and rendering recent repo-level releases.prepare-release-changesets step, auto-release checkbox flow, and post-publish registry/template sync jobs.content/releases/index.mdx, repo compare links, the temporary global-release helper, Better Auth beta/LTS/snapshot branch support, and Better Auth's product-domain pr-analyzer./docs/releases./docs/releases and sidebar Get Started. - completev*.mdx pages. - superseded by 12next, release/**, maintenance dist-tags, main-to-next sync, and snapshot releases. - completepr-analyzer with a Plate package-changelog parser. - completePUBLISHED_PACKAGES and each package's matching CHANGELOG.md section. - completevX.Y.Z GitHub Release from the validated AI notes, falling back to raw notes. - complete/docs/releases to fetch GitHub Releases with revalidation and a GitHub-link fallback. - superseded by 25/docs/releases from the Version Packages PR body. - completeFull changelog links to GitHub compare links using the preferred package tag per version. - complete.github/workflows/release.yml uses changesets/action@v1 to create [Release] Version packages.content/migration/index.mdx and contained the raw Changesets release-PR intro, which suggests release PR body content was copied into the page instead of curated by automation.tooling/scripts/prepare-release-changesets.mjs runs before changesets/action; it prepares extra changesets but cannot see the generated changelogs/versioned package files.version command: run pnpm changeset version, then sync release changelog sections into content/releases/index.mdx.changesets/action@v1 supports a version input for the command that updates package versions and changelogs.tooling/scripts/sync-release-docs.mjs parses package changelogs after versioning, extracts ### Major Changes, ### Minor Changes, and ### Patch Changes, and writes typed package entries.docs/src/app/(docs)/react/overview/releases: an overview timeline page, one page.mdx per release, and docs/src/data/releases.ts metadata.scripts/README.md says to run pnpm release:changelog:docs, create the release page manually, and update releases.ts.@mui/internal-code-infra through pnpm release:changelog and pnpm release:changelog:docs, with scripts/changelog.config.mjs formatting docs output.pnpm release:releases wrapper around the sync script, then redesign the docs shape later.content/releases/index.mdx is now the canonical retained-release store. The sync parses generated <ReleaseIndex /> data back on the next run, then deletes any remaining generated v*.mdx pages.v53.0.1...v53.0.2 are empty for Changesets package-only releases, so they are the wrong docs target.vX.Y.Z after publish, using the merged Version Packages PR body as the one-click full changelog.docs/app/changelog/page.tsx fetches https://api.github.com/repos/better-auth/better-auth/releases with next: { revalidate: 3600 }.claude_code_oauth_token. Keep this path in the plan, but keep deterministic raw notes as the fallback and validation source of truth.changeset version --snapshot and changeset publish --no-git-tag --tag "$SNAPSHOT_TAG". Plate should prune this for now.pr-analyzer.ts maps conventional commit scopes, PR labels, and changed files to Better Auth product domains and packages. Plate should not copy it because Plate's reliable grouping already exists in Changesets package changelogs.Start from Better Auth's .github/workflows/release.yml, then adapt it for Plate:
push on main.workflow_dispatch only for release-note preview once the deterministic script exists.concurrency, pinned actions, job-scoped permissions, GitHub App token support, and persist-credentials: false.changesets/action createGithubReleases: false.node tooling/scripts/prepare-release-changesets.mjs before changesets/action.API_TOKEN_GITHUB, not default GITHUB_TOKEN.sync-release-artifacts job after publish.Prune from Better Auth:
next branch trigger and guard.release/** branch trigger and maintenance dist-tags.Sync main to next via PR.Add or adapt root scripts:
ci:version: pnpm changeset version && pnpm install --no-frozen-lockfileci:release: current Plate publish path, still building before changeset publishRemove pnpm release:releases from the Changesets version command once /docs/releases no longer stores generated release bodies.
Create a Plate-specific release-note script, likely under .github/scripts/release-notes.ts or tooling/scripts/release-notes.mjs:
PUBLISHED_PACKAGES from changesets/action.CHANGELOG.md.### Major Changes, ### Minor Changes, and ### Patch Changes.CHANGELOG.md links pinned to GITHUB_SHA.Do not copy Better Auth's pr-analyzer.ts. If a helper is needed, make it a small package-map/changelog parser, not a product-domain classifier.
Keep Better Auth's Claude rewrite shape:
.github/prompts/release-notes-rewrite.md.claude_code_oauth_token.Adapt the prompt for Plate:
CHANGELOG links.Validation must check:
After publish:
VERSION from release-note output or PUBLISHED_PACKAGES.refs/tags/v${VERSION} at GITHUB_SHA if missing.v${VERSION}.Convert /docs/releases to GitHub Releases as the data source:
https://api.github.com/repos/udecode/plate/releases.next: { revalidate: 3600 }.GITHUB_TOKEN when present.content/releases/index.mdx.Focused tests:
PUBLISHED_PACKAGES.createGithubReleases: false.next, release/**, snapshot job, or Better Auth pr-analyzer.Verification commands:
node --test for focused release workflow/docs tests.pnpm lint:fix.pnpm --filter www typecheck./docs/releases.version command.53.0.0 package sections into the generated major releases page.pnpm changeset version.pnpm lint:fix.ReleaseTimeline, registered it for MDX, and updated the sync script to generate the timeline block above the release sections.pnpm lint:fix, pnpm --filter www typecheck, and browser-use desktop/mobile screenshots for the release page.docs/solutions/developer-experience/2026-04-27-mdx-generated-markers-must-use-jsx-comments.md.content/releases/index.mdx, exposed /docs/releases, and moved the sidebar item to Get Started after Installation./docs/releases rendered the release timeline, Releases appeared immediately after Installation in the sidebar, and /docs/migration no longer rendered the old release overview.ReleaseTimeline with ReleaseIndex, refactored pnpm release:releases to generate compact index metadata plus content/releases/v53.mdx and content/releases/v49.mdx, and kept the script idempotent.pnpm lint:fix, pnpm --filter www typecheck, and browser-use desktop/mobile checks for /docs/releases and /docs/releases/v53.docs/solutions/developer-experience/2026-04-27-monorepo-release-docs-need-index-and-detail-pages.md.v*.mdx pages with an expanded Better Auth-style feed, added exact GitHub release links, preserved retained inline bodies through generator parsing, and deleted the remaining generated detail pages.vX.Y.Z.pr-analyzer, and use package changelog sections as the deterministic release-note source.sync-release-docs and global-release, added tooling/scripts/release-notes.mjs, added the Claude rewrite prompt, and rewired release.yml to create one repo-level vX.Y.Z GitHub Release after publish./docs/releases to load recent GitHub Releases through a cached same-origin API route. Current package-only GitHub Releases are grouped by version until the next repo-level releases exist.pnpm lint:fix, pnpm --filter www typecheck, and Browser Use on http://localhost:3001/docs/releases.apps/www/src/generated/release-index.json from Version Packages PR bodies. Full changelog now links to package-tag compare URLs, using platejs@version when present and the first package tag otherwise.v53.0.3 links to compare %40platejs/[email protected]@53.0.3, and CHANGELOG links to Version Packages PR #4969.pnpm lint:fix failed on first run because Biome requires regex literals in the release-doc sync script to be module-level constants. Moved regexes to top-level constants.pnpm --filter www typecheck failed once because Contentlayer does not accept HTML comments in MDX. Switched generated markers to JSX comments and kept legacy marker replacement.pnpm --filter www build was started accidentally and ran the CI-owned registry build before the Next build completed. Restored the generated apps/www/public/r/* outputs and used the targeted typecheck path instead.