ShtukbaseStandard
SV-R01/norms/rules/std-semver/SV-R01.md

The version in a manifest is valid SemVer 2.0.0

MUSTblockscheckactive
The version in a manifest is valid SemVer 2.0.0
Why: An invalid version cannot be compared: package managers and update tools understand it differently or refuse it.
Page fields (15)
ruleIdSV-R01
requirementThe version in a manifest is valid SemVer 2.0.0
levelMUST
floorfalse
statusactive
sphereengineering
appliesTopackage.json, Cargo.toml, pyproject.toml, package.md
enforcers.shtukbase/packages/std-semver/checks/sv01_valid.ts
enforcerKindgate
modeenforce
becauseAn invalid version cannot be compared: package managers and update tools understand it differently or refuse it.
baseline0
reviewBy2027-05-28
packstd-semver
sourcesSemantic Versioning 2.0.0, https://semver.org/spec/v2.0.0.html

Every version that a project manifest declares (package.json, Cargo.toml, pyproject.toml, package.md) is MAJOR.MINOR.PATCH without leading zeros, with an optional pre-release -… and build metadata +…. Spec items 2, 9, 10.

Why. An invalid version cannot be compared: package managers and update tools understand it differently or refuse it.

How to fix. Write the full version: 1.2 → 1.2.0, v1.0.0 → 1.0.0, 01.2.3 → 1.2.3.

Run. From the project root: shtuk run std-semver valid. A violation is a line with the file and the line, or with the tag. In enforce mode the exit code is 1, in observe and warn it is 0. Settings: /norms/standards/semver.md.

The enforcer is the valid check of the std-semver package.

The package Standard: SemVer puts this page at /norms/rules/std-semver/SV-R01.md.Source text