Versioning & Migrations
CLI versioning standard
Section titled “CLI versioning standard”s2s uses Semantic Versioning:
MAJOR.MINOR.PATCH- Examples:
0.1.00.1.10.1.21.0.02.0.00.1.0-rc.11.1.0-beta.2
Current version: see package.json or run s2s --version.
Mandatory bump rule
Section titled “Mandatory bump rule”Every merged change must bump the CLI version.
- Minimum required bump:
PATCH(0.1.0->0.1.1). - Use
MINORfor backward-compatible new capabilities. - Use
MAJORfor breaking behavior/contracts.
For each bump, update all of:
package.json(version)package-lock.jsonsrc/cli.tsconstants (CLI_VERSION,TEMPLATE_VERSION,DEFAULT_MIN_CLI_VERSIONwhen applicable)CHANGELOG.md
Repository enforcement:
npm run checkvalidates product self-versioning before delivery.npm run checkalso validates that the active changelog entry separatesProduct ChangesfromRepo Governance Changes.- CI runs on
pull_requestandpushtomain. - To force PR-only delivery into
main, enable GitHub branch protection and require CI.
Project compatibility fields
Section titled “Project compatibility fields”Each project stores compatibility metadata in .s2s/project.json:
schemaVersion: project schema contract versiontemplateVersion:.s2stemplate generation versionminCliVersion: minimum requireds2sCLI versionlastMigratedByCliVersion: last CLI version that migrated this project
Migration policy
Section titled “Migration policy”- Migrations run automatically when a project command executes.
- Before migration changes are applied, a backup is created under:
.s2s/backups/<timestamp>/
- Migrations are idempotent and logged in:
.s2s/logs/migrations.log
- If the current CLI version is lower than
minCliVersion, command execution is blocked.
Update severity policy (soft/hard)
Section titled “Update severity policy (soft/hard)”When the CLI detects that project-managed files are outdated (schemaVersion, templateVersion, or minCliVersion drift), it classifies the update severity:
soft: user can defer the update; pending state is stored in.s2s/project.local.jsonhard: update is mandatory; execution is blocked until the update is applied
Mandatory behavior:
- Inform user before updating project files.
- Ask for confirmation in interactive mode.
- In non-interactive mode:
- soft updates are deferred
- hard updates fail fast
Build/release flag:
S2S_PROJECT_UPDATE_CLASS=soft|hard- default is
soft - use
hardfor releases that must force a project update before continuing.
Upgrade flow
Section titled “Upgrade flow”Install:
brew tap kiniuncorp/s2sbrew install s2sUpgrade:
brew upgrade s2sVerify:
s2s --version