Use when architectural patterns evolve, tech stack changes, or foundational rules need updates - creates new constitution version directory, migrates/organizes content into modular files, updates...
Constitution versions are immutable snapshots of architectural truth.
When foundational rules change (patterns, tech stack, architecture), create a new version rather than editing in place. This preserves history, enables rollback, and makes changes explicit.
ALWAYS create a new version when:
CRITICAL: Removing or relaxing a mandatory pattern ALWAYS requires a new version, even if existing code would still work. "Non-breaking" is not sufficient - any change to mandatory patterns needs versioning for audit trail.
Do NOT use for:
Test for Constitutionality:
Before adding content to constitution, ask: "If we violate this rule, does the architecture break?"
Constitution = Architectural rules. Specs = Implementation patterns.
Read docs/constitutions/current/meta.md to get current version.
Version increment rules:
# Create new version directory
mkdir -p docs/constitutions/v{N}
# Copy structure from current
cp docs/constitutions/current/*.md docs/constitutions/v{N}/
Edit files in new version directory with changes:
meta.md - Update version number, date, changelogarchitecture.md - Update if architectural boundaries changedpatterns.md - Update if mandatory patterns changedtech-stack.md - Update if libraries added/removedschema-rules.md - Update if database philosophy changedtesting.md - Update if testing requirements changedCritical - Minimal Changes Only:
The diff should show ONLY the substantive change, not stylistic improvements.
# Remove old symlink
rm docs/constitutions/current
# Create new symlink pointing to new version
ln -s v{N} docs/constitutions/current
Check that all references still work:
# Find all references to constitutions
grep -r "@docs/constitutions/current" .claude/
grep -r "docs/constitutions/current" .claude/
All references should use current/ symlink, never hardcoded versions.
MANDATORY: Update meta.md with complete documentation:
The WHY is critical. In 6 months, the context will be lost. Document:
DO NOT rely on git commit messages or external docs. meta.md must be self-contained.
Before updating symlink:
docs/constitutions/v{N}/meta.md has correct version number and changelogcurrent/ not v{N}/Wrong: Edit docs/constitutions/current/patterns.md directly when removing next-safe-action requirement
Right: Create v2, update patterns.md in v2, update symlink
Why: Breaking changes need versioning. Commands/specs may reference old patterns.
Wrong: @docs/constitutions/v2/architecture.md
Right: @docs/constitutions/current/architecture.md
Why: When v3 is created, all references break. Symlink abstracts version.
Wrong: "Let me alphabetize sections and rename files while versioning"
Right: Only change content that needs substantive updates
Why: Gratuitous changes obscure what actually changed. Diff should show real changes.
Wrong: Copy files, update content, update symlink, done
Right: Update meta.md with version, date, and changelog
Why: Future you won't remember why version changed. Document the why.
Wrong: Create v2 because we changed button component structure
Right: Constitution = foundational rules only. Implementation goes in specs/
Why: Constitution is for patterns/architecture/stack, not implementation choices.
Wrong: "This change is non-breaking, so I can edit v1 in-place per the meta.md guidance"
Right: Removing/relaxing ANY mandatory pattern requires versioning, even if "non-breaking"
Why: Audit trail matters more than technical breaking changes. Future readers need to know WHEN rules changed, not just that they did. Git history is not sufficient - constitution versions create explicit snapshots.
# Check current version
cat docs/constitutions/current/meta.md
# Create new version
mkdir -p docs/constitutions/v{N}
cp docs/constitutions/current/*.md docs/constitutions/v{N}/
# Edit content
# Update meta.md, then other files as needed
# Update symlink
rm docs/constitutions/current
ln -s v{N} docs/constitutions/current
# Verify
ls -la docs/constitutions/current
grep -r "constitutions/v[0-9]" .claude/ # Should return nothing
Scenario: We're adopting effect-ts for error handling and deprecating throw/catch.
Step 1: Current version is v1 (read meta.md)
Step 2: Create v2
mkdir -p docs/constitutions/v2
cp docs/constitutions/current/*.md docs/constitutions/v2/
Step 3: Update content
meta.md: Version 2, date, "Added effect-ts error handling pattern"patterns.md: Add new section on Effect error handlingtech-stack.md: Add effect-ts to approved librariesStep 4: Update symlink
rm docs/constitutions/current
ln -s v2 docs/constitutions/current
Step 5: Verify references (should all use current/)
Step 6: meta.md documents why (type-safe error handling, eliminate throw)
See test-scenarios.md for pressure scenarios and RED-GREEN-REFACTOR tests.