Versioning
Semantic versioning and calendar versioning conventions for repository and module releases.
Overview
The repository uses two versioning schemes depending on the type of module:
- Semantic Versioning (SemVer) - For software libraries and applications
- Calendar Versioning (CalVer) - For documentation and content releases
Semantic Versioning
Standard: Semantic Versioning 2.0.0
Format: MAJOR.MINOR.PATCH
URL: https://semver.org/spec/v2.0.0.html
Version Format
MAJOR.MINOR.PATCH
| | |
| | +-- Patch: Backwards-compatible bug fixes
| +-------- Minor: Backwards-compatible functionality
+-------------- Major: Incompatible API changes
Examples:
1.0.0- Initial stable release1.1.0- New features, backwards compatible1.1.1- Bug fixes, backwards compatible2.0.0- Breaking changes, incompatible with 1.x
Version Components
MAJOR version
Increment when making incompatible API changes.
Examples:
- Renaming public functions, types, or modules
- Removing public APIs
- Changing function signatures
- Changing configuration format (breaking)
- Changing command-line interface (breaking)
Breaking changes require:
- MAJOR version increment
- Documentation of migration path
- Clear changelog entry with
BREAKING:prefix
MINOR version
Increment when adding functionality in a backwards-compatible manner.
Examples:
- Adding new functions or methods
- Adding new configuration options
- Adding new command-line flags
- Deprecating features (without removing)
- Internal refactoring (no API changes)
Requirements:
- Backwards compatible with previous MINOR versions in same MAJOR
- New features optional to use
- Existing functionality unchanged
PATCH version
Increment when making backwards-compatible bug fixes.
Examples:
- Fixing incorrect behavior
- Correcting error messages
- Performance improvements (no API changes)
- Security patches
- Documentation fixes
Requirements:
- No new features
- No API changes
- Backwards compatible with all versions in same MAJOR.MINOR
Pre-release Versions
For versions before 1.0.0 or pre-release testing.
Format: MAJOR.MINOR.PATCH-PRERELEASE+BUILD
Pre-release identifiers:
alpha- Early development, unstablebeta- Feature complete, testingrc(release candidate) - Production ready, final testing
Examples:
0.1.0-alpha.1 First alpha release
0.1.0-alpha.2 Second alpha release
0.1.0-beta.1 First beta release
0.1.0-beta.2 Second beta release
0.1.0-rc.1 Release candidate 1
0.1.0-rc.2 Release candidate 2
0.1.0 Stable release
Precedence:
Build Metadata
Optional build information (not part of version precedence).
Format: MAJOR.MINOR.PATCH+BUILD
Examples:
1.0.0+20251201 Built on December 1, 2025
1.0.0+001 Build number 1
1.0.0+sha.abc123 Built from commit abc123
Note: Build metadata ignored for version precedence
Version Precedence
Version comparison rules:
Rules:
- Compare MAJOR, then MINOR, then PATCH
- Pre-release versions have lower precedence than normal versions
- Build metadata doesn't affect precedence
Pre-1.0 Development
Special rules for 0.x versions:
Characteristics:
- Unstable API - Breaking changes may occur in MINOR versions
- No compatibility guarantees - 0.x versions may be incompatible
- Rapid iteration - Frequent breaking changes expected
Version increments:
0.1.0 → 0.2.0- May include breaking changes0.2.0 → 0.2.1- Bug fixes only0.x.y → 1.0.0- First stable release
Current status:
- Repository:
0.0.2(pre-1.0 development) - r2r-cli: May be 1.x (stable)
Calendar Versioning
Format: YYYY.MM.DD or YYYY.MM.MINOR
Use cases: Documentation, content, and time-based releases
Date-Based Format
Format: YYYY.MM.DD
Structure:
YYYY- Four-digit yearMM- Two-digit month (01-12)DD- Two-digit day (01-31)
Examples:
Usage: Documentation site, PDF books
Precedence:
Month-Based Format
Format: YYYY.MM.MINOR
Structure:
YYYY- Four-digit yearMM- Two-digit month (01-12)MINOR- Sequential number within month (0, 1, 2, ...)
Examples:
2025.12.0 First release in December 2025
2025.12.1 Second release in December 2025
2025.12.2 Third release in December 2025
Usage: Multiple releases per month
Precedence:
Module Versioning Schemes
| Module | Versioning | Rationale |
|---|---|---|
| repository | SemVer | Repository infrastructure and contracts |
| r2r-cli | SemVer | CLI application with API |
| ext-eac | SemVer | Docker extension with interface |
| vscode-ext-commit | SemVer | VSCode extension with API |
| docs | CalVer | Documentation site (time-based) |
| books | CalVer | PDF documentation (time-based) |
| eac-core | (not versioned) | Supporting library |
| eac-commands | (not versioned) | Supporting library |
| eac-ai | (not versioned) | Supporting library |
Version Validation
Command-Line Validation
# Validate semver format
r2r eac validate release-version 1.2.3
# Validate with pre-release
r2r eac validate release-version 1.2.3-beta.1
# Validate with build metadata
r2r eac validate release-version 1.2.3+20251201
Output:
- Exit 0: Valid version
- Exit 1: Invalid version with error message
Error examples:
Error: Invalid version format: 1.2
Expected: MAJOR.MINOR.PATCH (e.g., 1.2.3)
Error: Invalid version format: v1.2.3
Expected: 1.2.3 (no 'v' prefix)
Error: Invalid pre-release: 1.2.3-beta
Expected: 1.2.3-beta.1 (numeric suffix required)
Programmatic Validation
Validation checks:
- Format: Matches
MAJOR.MINOR.PATCH[-PRERELEASE][+BUILD] - Components: All numeric (except pre-release/build identifiers)
- No prefix: No 'v' prefix (use
1.0.0, notv1.0.0) - Pre-release format: Alphanumeric with dots (e.g.,
alpha.1) - Build format: Alphanumeric with dots (e.g.,
20251201)
Git Tags
Tag Format
Tags follow the format: {moniker}/{version}
Repository:
Modules (SemVer):
Modules (CalVer):
Tag Creation
# Create tag
git tag {moniker}/{version}
# Push tag (triggers release workflow)
git push origin {moniker}/{version}
# Examples
git tag r2r-cli/1.3.0
git push origin r2r-cli/1.3.0
git tag docs/2025.12.15
git push origin docs/2025.12.15
Tag Listing
# List all tags
git tag
# List tags for specific module
git tag -l 'r2r-cli/*'
# List tags with dates
git tag -l --format='%(refname:short) %(creatordate:short)'
Tag Deletion
# Delete local tag
git tag -d {moniker}/{version}
# Delete remote tag
git push --delete origin {moniker}/{version}
# Example
git tag -d r2r-cli/1.3.0
git push --delete origin r2r-cli/1.3.0
Version Comparison
SemVer Comparison
Algorithm:
- Compare MAJOR (higher wins)
- If equal, compare MINOR (higher wins)
- If equal, compare PATCH (higher wins)
- If equal, compare pre-release (none > any pre-release)
CalVer Comparison
Algorithm:
- Compare YYYY (higher wins)
- If equal, compare MM (higher wins)
- If equal, compare DD or MINOR (higher wins)
Version Increment Commands
# Get current version from changelog
r2r eac release get-version {moniker}
# Validate version format
r2r eac validate release-version {version}
# Generate next version tag (CalVer)
r2r eac release generate-module-calver {moniker}
Best Practices
Choosing Version Numbers
For bug fixes:
For new features:
For breaking changes:
For pre-1.0:
Documentation
In CHANGELOG.md:
## [2.0.0] - 2025-12-15
### Changed
- **BREAKING:** Renamed Config to Configuration
- **BREAKING:** Changed API endpoint structure
In release notes:
- Highlight breaking changes prominently
- Provide migration guide
- Document deprecated features
- List new features with examples
Communication
Breaking changes:
- Announce in advance (deprecation warnings)
- Provide migration path
- Update documentation
- Consider compatibility layers
Major releases:
- Write migration guide
- Update tutorials and examples
- Communicate timeline
- Support previous MAJOR version temporarily
References
- Semantic Versioning 2.0.0
- Calendar Versioning
- Format Specification - Changelog format
- Repository Changelog - Repository versioning
- Module Changelogs - Module versioning
- Decision Record: DR-002 - Use Semantic Versioning
Tutorials | How-to Guides | Explanation | Reference
You are here: Reference — information-oriented technical descriptions of the system.