versioning-policy

Enforces strict semver versioning rules for npm workspace packages to prevent prerelease leaks.

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/codebytes/btt --skill versioning-policy-codebytes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: versioning-policy
Source: https://github.com/codebytes/btt/tree/main/.squad/templates/skills/versioning-policy
Command: npx skills add https://github.com/codebytes/btt --skill versioning-policy-codebytes

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Prerelease versions like 0.9.1-build.4 committed to dev or main silently break npm workspace dependency resolution, causing builds to run against stale registry packages instead of local code — the root cause of the PR #640 incident. ## Core Features & Use Cases - Strict Semver Enforcement: Mandates MAJOR.MINOR.PATCH format with no prerelease suffixes on shared branches. - Version Sync Rules: Requires @bradygaster/squad-sdk, @bradygaster/squad-cli, and the root package.json to always share identical versions. - Ownership & CI Gates: Assigns version bumps exclusively to the Surgeon release manager and documents the prerelease-version-guard CI gate that blocks offending PRs. - Use Case: An agent preparing a PR notices a -build.N version in the diff, recognizes it as a leak, and reverts it to the clean release version before the CI gate rejects the merge. ## Quick Start Ask the agent to review the versioning policy and check whether the current package.json files contain any prerelease versions that must be cleaned before merging.

Frequently Asked Questions about versioning-policy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does npm workspace resolution fail with prerelease versions?

Per the semver specification, a range like `>=0.9.0` does not match prerelease versions such as `0.9.1-build.4`. npm then silently installs a stale published version from the registry instead of linking the local workspace package.

How do I keep SDK and CLI package versions in sync?

The `bump-build.mjs` script updates the root, `packages/squad-sdk`, and `packages/squad-cli` package.json files in lockstep. Only the Surgeon release manager may bump versions; other agents must not modify version fields.

Can I commit a -build.N prerelease version to the dev branch?

No. Prerelease versions created by `bump-build.mjs` are for local testing only and must never be committed to `dev` or `main`. The `prerelease-version-guard` CI gate blocks any PR containing them.

What should I do if I find a prerelease version in a PR diff?

Treat it as a bug and reject the PR. Any agent may revert the prerelease leak back to the clean release version without Surgeon's approval — this is an explicit safety escape hatch in the policy.

When is the skip-version-check label allowed?

The `skip-version-check` label bypasses the prerelease CI gate only for the bump-build script's own PR, and only with Surgeon's explicit approval. It is not a general-purpose override.