# Design System Governance Rules

## Trust Levels

### Level 1: Intern (Auto-fix, no review)
- Fix naming convention violations
- Sort token files
- Fix whitespace and formatting
- Add missing component descriptions
- Flag raw hex values

### Level 2: Junior (Auto-fix, notify team)
- Replace raw hex with existing token
- Add missing ARIA attributes
- Fix simple a11y issues
- Generate Storybook stories
- Update token documentation

### Level 3: Mid-level (PR, single reviewer)
- Create new semantic tokens
- Add component variants
- Generate component code
- Modify component props
- Update knowledge graph

### Level 4: Senior (PR, team review)
- Rename existing tokens
- Deprecate components
- Change token structure
- Modify component API
- Update naming conventions

### Level 5: Principal (Human only)
- Create new design patterns
- Define brand tokens
- Remove components
- Change theme architecture
- Break backwards compatibility

---

## Decision Tree

Is the change reversible in < 5 minutes?
  Yes -> Deterministic rule? -> Yes: Level 1 / No: Level 2
  No  -> Affects other components? -> No: Level 3 / Yes -> Changes architecture? -> No: Level 4 / Yes: Level 5

---

## Escalation Rules

- AI confidence < 80%: escalate one level
- Change affects > 10 components: Level 4 minimum
- Token rename affects > 5 files: require migration plan
- Any a11y regression: block until human review
- Health score drops > 5 points: alert team, pause auto-fixes

---

## Review Cadence

- Weekly: review Level 1-2 auto-fixes
- Monthly: review Level 3-4 decisions, adjust trust
- Quarterly: full governance review
