| README.md | ||
Epoch Semantic Versioning (Epoch SemVer)
Epoch SemVer is a versioning scheme that extends standard Semantic Versioning by introducing a fourth logical component: the epoch. It is designed for environments that need to represent rare, high-signal generational shifts that are more significant than ordinary major-version updates, while remaining compatible with existing SemVer tooling.
How it Works
Epoch SemVer maintains a logical four-part version tuple (epoch, major, minor, patch) but encodes it into a standard three-part SemVer string using a fixed multiplier of 1000.
The Encoding Formula
The external "Major" version is calculated as:
encodedMajor = epoch * 1000 + major
Examples:
- Logical:
(0, 2, 4, 1)\rightarrowEncoded:2.4.1 - Logical:
(1, 0, 0, 0)\rightarrowEncoded:1000.0.0 - Logical:
(1, 3, 2, 0)\rightarrowEncoded:1003.2.0
Logical Components
| Component | Meaning | Significance |
|---|---|---|
| Epoch | Rare generational or landmark changes | Highest |
| Major | Ordinary breaking changes | High |
| Minor | Backwards-compatible additions | Medium |
| Patch | Backwards-compatible fixes | Lowest |
Key Rules
- Incrementing: When incrementing a component, all less-significant components must be reset to
0(e.g., incrementing theepochresetsmajor,minor, andpatch). - Major Range: The logical
majorversion must be between0and999. - Codenames: When
epoch > 0, a human-friendlycodename(e.g., "obsidian") is required to identify the current epoch. - Pre-releases: Standard SemVer pre-release identifiers are supported and handled according to standard SemVer precedence rules.
Canonical Versioning
To ensure a single source of truth, every versioned unit must have a canonical file named epoch-version.json. This file contains the logical version components and release metadata (such as releasedAt and commitHash).
Supported Repository Policies:
- Independent-version: Each unit has its own
epoch-version.json. - Shared-version: One
epoch-version.jsongoverns multiple units.