Brief: Setting a Versioning Policy for the Libraries Your Team Publishes

For team leads and platform owners whose engineers publish packages, public or internal. The goal of this brief is a decision, not a tutorial: whether your team should write down how it versions releases, and what that document needs to say.

The issue

Most teams say they "use semver". In practice that phrase hides several unmade decisions: what counts as the public API, whether a behaviour fix can be a patch, whether dropping an old runtime is a major change, and how long old majors get fixes. When those decisions are left to whoever happens to cut the release, consumers experience the library as unpredictable. They respond by pinning exact versions, which means they stop receiving fixes, including security fixes. An unclear versioning policy therefore becomes a security problem a year or two later.

Why it matters

A version number is a message to every consumer about the risk of upgrading. Semantic Versioning 2.0.0, published at semver.org, gives the grammar: MAJOR for incompatible API changes, MINOR for backward-compatible functionality, PATCH for backward-compatible fixes. The specification is explicit that it only works once you declare a public API. Package managers then act on the message automatically: npm's default caret ranges, for example, accept new minor and patch versions without anyone reviewing them. A mislabelled release is not a cosmetic mistake; it is installed into consumers' builds within hours.

Three decisions to make

  1. Define the public API. Agree that only what is exported from documented entry points (an exports map, __all__, exported Go identifiers outside internal/) is covered. Everything else may change without notice.
  2. Classify the hard cases once. Write down the team's answer for the recurring edge cases: behaviour fixes people may depend on, raising minimum runtime versions, changing peer dependency ranges, changing default options. Decide once, rather than in every release review.
  3. State the support window. Say how many major versions receive security fixes and for how long. Even "only the latest major" is a valid policy if it is written down.

What a minimal policy looks like

VERSIONING.md
- We follow Semantic Versioning 2.0.0.
- Public API: everything exported from the package root, as documented.
- Raising the minimum runtime is a MAJOR change.
- Behaviour changes to documented output are MINOR at least, with a changelog note.
- Security fixes are backported to the previous major for 12 months after a new major.

The 12-month figure is an illustrative placeholder; choose a window your team can actually staff.

Further reading