v0.2.4 - KAI Worlds
Every commit has an implicit release intent: patch, minor, or major. We make this explicit:
- Declare intent upfront with
.bump-typefile - Validate all commits match the declared intent (pre-commit hook)
- Merge to main via PR
- Release via GitHub tag (minor/major only; patch bumps merge automatically)
This protects against scope creep and ensures you know what you're committing.
git checkout -b feat/my-changeDetermine what kind of change this is:
- PATCH - Fix, typo, small improvement. No new features.
x.y.z → x.y.(z+1) - MINOR - New feature, new road, new node. Backward compatible.
x.y.z → x.(y+1).0 - MAJOR - Restructure, schema change, breaking change.
x.y.z → (x+1).0.0
Then create the file:
echo "PATCH" > .bump-type
git add .bump-type
git commit -m "chore: declare bump type"Ask the Federal Minister if your declared scope is reasonable:
python scripts/minister_review.pyThe minister will give feedback. If they slap your hand, reconsider the scope.
Make your content changes:
# Edit some files
nano roads/a20/place_a20.mdBump the version to match your declared intent:
# For PATCH or MINOR (automatic detection from .bump-type):
python scripts/bump_version.py --patch # if declared PATCH
python scripts/bump_version.py --minor # if declared MINOR
# For MAJOR:
python scripts/bump_version.py --majorCommit with your changes and version bump:
git add -A
git commit -m "feat: add new road"The pre-commit hook will:
- ✓ Verify version bump matches declared type
- ✗ Reject if you declared PATCH but bumped to MINOR (scope creep)
- ✗ Reject if you forgot to bump version
git push -u origin feat/my-changeOpen a PR. CI will:
- Validate version bump is in the right range
- Run all content validation
- Check that
.bump-typematches actual version change
Once approved, merge to main.
For patch bumps, you're done - version is already bumped and merged.
For minor or major releases, create a GitHub release:
# Create release v0.3.0 (if currently v0.2.0)
# The release workflow will sync versions and deploy# Branch and declare
git checkout -b fix/typo-in-a1
echo "PATCH" > .bump-type
git add .bump-type && git commit -m "chore: declare patch bump"
# Make change
nano roads/a1/place_a1.md
python scripts/bump_version.py --patch # v0.2.0 → v0.2.1
# Commit
git add -A && git commit -m "fix: typo in A1 description"
# Output:
# ✓ Version bump validated
# Type: PATCH
# Version: v0.2.0 → v0.2.1# Branch and declare
git checkout -b feat/a20-expansion
echo "MINOR" > .bump-type
git add .bump-type && git commit -m "chore: declare minor bump"
# Make changes
nano roads/a20/place_a20.md
python scripts/bump_version.py --minor # v0.2.0 → v0.3.0
# Multiple commits are OK (all must stay within MINOR):
git add -A && git commit -m "feat: add 10 new A20 exits"
nano roads/a20/place_a20_01.md
git add -A && git commit -m "docs: add details to A20 node"
# Output:
# ✓ Version bump validated
# Type: MINOR
# Version: v0.2.0 → v0.3.0# Declared PATCH
git checkout -b fix/typo
echo "PATCH" > .bump-type
git add .bump-type && git commit -m "chore: declare patch bump"
# But then did a MINOR bump
python scripts/bump_version.py --minor # v0.2.0 → v0.3.0
git add -A && git commit -m "fix: typo"
# Output:
# ✗ VALIDATION FAILED
# Declared: PATCH
# Actual: MINOR
# Version: v0.2.0 → v0.3.0
#
# Your bump doesn't match your declaration!
# This is a scope violation. Fix it:
# You declared PATCH but are bumping MINOR (scope creep).bump-type- Declare PATCH/MINOR/MAJOR for this branch (created by you per-branch).bump-type.example- Template/reference.githooks/pre-commit- Hook that validates version bumps match declared typescripts/bump_version.py- Bump version files to match intentscripts/minister_review.py- Get ministerial feedback on declared scopescripts/setup-hooks.sh- Install the pre-commit hook
First time only:
bash scripts/setup-hooks.sh
git config core.hooksPath .githooksThen every feature branch:
git checkout -b feat/my-change
echo "PATCH" > .bump-type # Change to MINOR or MAJOR as needed
git add .bump-type && git commit -m "chore: declare bump type"- Intent is declared upfront - You commit to a scope before making changes
- Hook enforces consistency - You can't accidentally scope-creep from PATCH to MINOR
- Version is always in sync - Version bump = content change (no separate automation)
- PR shows intent -
.bump-typefile is first commit, intent is visible - Minister provides oversight - Arbitrary authority can slap your hand if scope is wrong
- Simple and auditable - All version history is in git, nothing hidden
The minister has final say on whether your declared scope is appropriate. If they reject it:
# Edit .bump-type with the suggested level
echo "PATCH" > .bump-type
git add .bump-type && git commit --amendThen continue. The minister's review is advisory but respected.