Version Control Guide
Version Control
Git integration tracks changes to modules and constitutions.
What Gets Tracked
- Global module content
- Organization overrides
- Constitution builds
- Template changes
Every edit creates a git commit with author, timestamp, and description.
Version History
URL: /modules/<name>/versions
Displays: - List of all versions with timestamps - Author information - Commit messages - View button for each version
Module Versions
Stored in modules/versions/core/<module-name>/:
- Timestamped snapshots (format: YYYYMMDDHHMMSS.md)
- Created automatically on each edit
- Preserved even after further edits
GitHub Synchronization
Requires environment variables:
- GIT_URL - Repository URL
- GIT_TOKEN - Personal access token
- GIT_USERNAME - Commit author name
- GIT_EMAIL - Commit author email
Auto-sync: - Every change commits locally - Commits pushed to GitHub automatically - Errors shown in UI if push fails
Manual sync: - Constitution dashboard → "Sync to GitHub" button
What syncs:
- Module files (modules/core/*.md)
- Module versions (modules/versions/)
- Customer configs (customers/*.json)
- Constitutions (constitutions/)
Commit Messages
Auto-generated format:
Update module: context - Modified by user@example.com
Add organization: acme-sales
Create override: acme-sales/tone
Update constitution: acme-sales v2.5
Repository Structure
modules/
├── core/
│ ├── context.md # Current version
│ ├── objective.md
│ └── tone.md
└── versions/
└── core/
├── context/
│ ├── 20260207015207.md
│ └── 20260208103045.md
└── tone/
└── 20260206185423.md
Last updated: February 2026