Generate or validate UI with design physics
Generate UI components with correct design physics.
/glyph "component description" # Generate mode (default)
/glyph --analyze "component" # Analyze mode (physics only)
/glyph validate file.tsx # Validate mode
/glyph --diagnose file.tsx # Diagnose mode (suggest fixes)
Effect is truth. What the code does determines its physics.
Physics over preferences. "Make it feel trustworthy" is not physics. "800ms pessimistic with confirmation" is physics.
grimoires/rune/taste.md for user preferencesgrimoires/rune/wyrd.md## Hypothesis
**Effect**: Financial (detected: "claim" keyword, Amount type)
**Physics**: Pessimistic sync, 800ms timing, confirmation required
**Taste Applied**: 500ms override (power user preference, Tier 2)
**Confidence**: 0.85
Does this match your intent? [y/n/adjust]
onMutate for pessimistic sync## Self-Validation
ā Physics: Pessimistic sync implemented correctly
ā Protected: Cancel button present and visible
ā Rigor: BigInt checks use `!= null && > 0n`
[Auto-repaired: Added min-h-[44px] to button]
| 2026-01-25 | ClaimButton | Financial | 500ms | power-user | Sprint-1 |
If user modifies file within 30 minutes:
Currency, Wei, Token ā Always FinancialFinancial: claim, deposit, withdraw, transfer, swap, send, pay, mint, burn, stake, unstake, bridge, approve
Destructive: delete, remove, destroy, revoke, terminate, purge, erase, wipe, clear, reset
Soft Delete: archive, hide, trash, dismiss, snooze, mute (with undo)
Standard: save, update, edit, create, add, like, follow, bookmark, favorite, star
Local: toggle, switch, expand, collapse, select, focus, show, hide, open, close, theme
| Effect | Sync | Timing | Confirmation |
|---|---|---|---|
| Financial | Pessimistic | 800ms | Required |
| Destructive | Pessimistic | 600ms | Required |
| Soft Delete | Optimistic | 200ms | Toast + Undo |
| Standard | Optimistic | 200ms | None |
| Navigation | Immediate | 150ms | None |
| Local State | Immediate | 100ms | None |
| Capability | Rule |
|---|---|
| Withdraw | Always reachable |
| Cancel | Always visible |
| Balance | Always accurate |
| Touch target | >= 44px |
| Focus ring | Always visible |
Reveal complexity gradually. Don't dump all physics upfront.
| Level | Trigger | Content | Token Budget |
|---|---|---|---|
| L0 | User types /glyph |
Nothing yet | ~10 |
| L1 | Description provided | Hypothesis box | ~100 |
| L2 | Ambiguous/low confidence | Clarifying question | ~50 |
| L3 | Confirmed | Generated code | Variable |
| L4 | "Why?" asked | Full physics explanation | ~500 |
See rules/glyph/10-glyph-progressive-disclosure.md for details.
| Mode | Trigger | Output |
|---|---|---|
| Generate | /glyph "description" |
Hypothesis + Code |
| Analyze | /glyph --analyze "description" |
Physics analysis only |
| Validate | /glyph validate file.tsx |
Validation report |
| Diagnose | /glyph --diagnose file.tsx |
Issues + suggested fixes |
See rules/glyph/09-glyph-modes.md for detection logic.
rules/glyph/00-glyph-core.md - Priority, permissionsrules/glyph/01-glyph-physics.md - Physics tablerules/glyph/02-glyph-detection.md - Effect detectionrules/sigil/01-sigil-taste.md - Reading tasterules/glyph/03-glyph-protected.md - Protected capabilitiesrules/glyph/04-glyph-patterns.md - Golden patternsrules/rigor/*.md - If web3 detectedrules/glyph/17-glyph-disclosure-l4.md - L4 content structurephysics-reference skill - Full rationalepatterns-reference skill - Implementation detailsrules/wyrd/01-wyrd-hypothesis.md - Hypothesis formatrules/wyrd/03-wyrd-confidence.md - Confidence calculationrules/wyrd/04-wyrd-rejection-capture.md - Rejection handlingrules/glyph/11-glyph-physics-check.md - Physics compliancerules/glyph/12-glyph-protected-check.md - Protected capabilitiesrules/glyph/13-glyph-rigor-check.md - Web3 safety (if detected)rules/glyph/14-glyph-auto-repair.md - Auto-repair logicrules/glyph/15-glyph-validation-summary.md - Summary displayrules/glyph/08-glyph-notes-logging.md - NOTES.md protocolrules/glyph/16-glyph-feedback-taste.md - Feedback loop taste capturerules/glyph/18-glyph-session-continuity.md - Session state preservationLoad when detailed tables needed:
physics-reference - Full physics tables with rationalepatterns-reference - Golden implementationsAfter generating code (Phase 3), run validation in order:
1. Physics Compliance Check (11)
āāā Sync strategy matches effect
āāā Loading states present
āāā Timing >= minimum (or taste override)
āāā Confirmation present (Financial/Destructive)
2. Protected Capability Check (12)
āāā Cancel always visible
āāā Withdraw always reachable
āāā Touch targets >= 44px
āāā Focus rings present
3. Rigor Check (13) - if web3 detected
āāā BigInt safety
āāā Data source correctness
āāā Receipt guard
āāā Stale closure prevention
4. Auto-Repair (14)
āāā Fix touch targets (add min-h-[44px])
āāā Fix focus rings (add focus-visible:ring-2)
āāā Fix BigInt checks (change to != null && > 0n)
5. Summary Display (15)
āāā Show all results
āāā Block if BLOCK violations
āāā Proceed with warnings
If ANY block-level violation exists, refuse to write file and show fix suggestions.