Managing docs versions

From golemcloud/golem · View interactive version

Managing docs versions is an AI agent skill from the GitHub repository golemcloud/golem. Cutting a new docs version, promoting next to a release, and managing versioned documentation content under docs/src/content/. Use when releasing a Golem version, backporting docs fixes, renaming a docs version, or changing the version selector.

How to use this skill

Skill file

Managing Documentation Versions

Golem documentation is stored under docs/src/content/<version>/. Write new material in next; released directories are frozen snapshots.

Current wiring

Link rules and checker scope

In prose MDX, use version-prefixed documentation links such as /next/quickstart or /v1.5/quickstart. Keep public assets such as /images/foo.png unprefixed.

Run from docs/:

bun run scripts/version-tool.ts check [<registered-version>]

Do not overstate this check. It checks registered version prefixes from VERSIONS and only the supported prose forms:

It skips fenced code, public top-level paths, already registered version prefixes, relative links, and unsupported forms such as href={...}. It does not prove that a destination exists, that a cross-version link is desirable, or that an unregistered new slug is valid. check <slug> selects a content directory but does not register that slug; update versions.ts before relying on it.

Cut a release (`next` to `vX.Y`)

Run version-tool commands from docs/.

  1. Move next and rewrite links inside the moved tree:

```shell

bun run scripts/version-tool.ts rename next vX.Y

```

  1. Clone the release back to next, rewriting links in the clone:

```shell

bun run scripts/version-tool.ts clone vX.Y next

```

  1. Update docs/src/lib/versions.ts: add vX.Y as current, demote the previous current version to legacy, set DEFAULT_VERSION, and retain next as unreleased.
  1. Regenerate the live sources of truth into next from the repository root:

```shell

cargo make generate-docs-openapi

cargo make generate-docs-skills

```

The How-To generator replaces and generates all of these outputs:

  1. Inspect the diff, especially the frozen release versus regenerated next, then verify:

```shell

# from docs/

bun run scripts/version-tool.ts check

bun run build:check

bun run build

# from the repository root

cargo make check-docs-openapi

cargo make check-docs-skills

```

  1. Smoke-test /, both version index routes, nested pages, version switching, and the next/legacy banners.

Verify Pagefind without hardcoded filenames or slugs

bun run build runs Pagefind as postbuild and writes docs/public/_pagefind. Do not depend on compressed internal filenames, strings, a fixed filter count, or a hardcoded version list. Derive expected slugs from VERSIONS, then query the generated index through Pagefind's JavaScript API (or run the site and use the search UI) and verify that each registered version can be supplied as the version filter and returns results for known text in that version. Also confirm the build log contains no Pagefind errors and that public/_pagefind/pagefind.js and pagefind-entry.json exist.

Backport to a released version

Edit the frozen MDX directly, preserve that version's link prefix, and run:

cd docs
bun run scripts/version-tool.ts check vX.Y
bun run build:check

Generators accept --version vX.Y, but use that only when today's source inputs genuinely represent that release:

bun run openapi/gen-openapi.ts --version vX.Y
bun run skills/sync-skills.ts --local .. --version vX.Y

Rename, add, or retire a version

Editing cautions

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.