Overview
Framework-agnostic canonical knowledge — when to use a button vs link, label rules, hierarchy, feedback. The "what / when / why" that components reference.
Principles
Heuristics
Visual hierarchy
Patterns
Components
Patterns
States & feedback
States
Feedback system
Writing
The UX corpus is the canonical knowledge layer of Gremorie. Text, not code. Framework-agnostic. It answers the questions every component doc shouldn't have to re-explain:
- When to use a button versus a link
- Label rules (length, voice, imperative vs descriptive)
- Visual hierarchy and grouping
- Feedback system (toast vs modal vs banner) by stakes
- Loading / empty / error states
- Destructive action confirmation patterns
Not to be confused with the component catalogue. The catalogue is the code the registry distributes; this corpus is the text knowledge components reference and that the MCP serves via
get_guidelines.
Article shape
Each article must include:
- Frontmatter — title, description, related components, tags
- TL;DR — one paragraph
- The rule — the prescriptive answer
- Why — rationale, references to research
- How to apply — concrete examples (with do / don't snippets)
- Counter-cases — when the rule doesn't apply
- Sources — academic and industry references
How the MCP serves this corpus
The MCP get_guidelines(topic?) tool returns the matching corpus article
as MDX, so language models can apply the rules when generating code. The
corpus is the explanation layer that makes generated code idiomatic
and not just syntactically correct.