# DSS Immutability System (Simplified) ## Overview Protects core architecture files from accidental modification through a simple git pre-commit hook. ## Protected Files - `.knowledge/dss-principles.json` - Core design system principles - `.knowledge/dss-architecture.json` - System architecture definition - `.clauderc` - AI agent configuration ## How It Works 1. **Git Hook**: Pre-commit hook checks if any protected files are being modified 2. **AI Instructions**: Claude is instructed in `.clauderc` to never modify these files 3. **Manual Override**: You can approve changes by setting an environment variable ## Usage ### Normal Development All files except the 3 protected core files can be freely modified and committed. ### Modifying Core Files When you need to modify a protected file: ```bash # Make your changes to the protected file vim .knowledge/dss-principles.json # Commit with explicit approval ALLOW_CORE_CHANGES=true git commit -m "Update: core architecture change" ``` That's it! No complex workflows, no change requests, just one environment variable. ## For AI Agents If Claude needs to modify a protected file, it will: 1. Ask you for explicit approval 2. You respond confirming the change 3. Claude makes the change 4. You commit with `ALLOW_CORE_CHANGES=true` ## Installation The git hook is automatically installed at `.git/hooks/pre-commit`. To reinstall: ```bash cp tools/immutability/pre_commit_hook.sh .git/hooks/pre-commit chmod +x .git/hooks/pre-commit ``` ## Philosophy **Simple is better than complex.** We protect the 3 files that define DSS identity, and trust human judgment for everything else.