An agent needs to know which system and components the application actually uses. Frontfriend uses a context channel combining generated facts, registry-served rules and design contracts.
The project files
| Path | Purpose |
|---|---|
.frontfriend/foundation.md | Design-system-specific semantic vocabulary, when generated |
.frontfriend/rules/ | Registry-served composition rules |
.frontfriend/design/ | Read-only generated mirror of design contracts |
frontfriend.lock.json | Exact adopted Release, token and component pins, design snapshot and file hashes |
.frontfriend/artifacts/ | Verified local copy of the selected tokens |
frontfriend.config.js | Application target and Design System identity |
Read the files present in the repository and ask MCP for missing facts. Context depends on the application’s target and installed components.
Sync the design mirror
pnpm exec frontfriend design sync
init and update also write the mirror of the adopted snapshot. Review the resulting diff. The cloud contract store is canonical; hand changes to the generated mirror can be overwritten by a later sync. Commit the mirror according to your project workflow so reviewers can see the decisions behind an implementation.
Before generating a screen
Read the foundation vocabulary and installed component inventory. Call get_component_api for each component: it answers for the application’s Release and target, names the canonical version and digest it describes, and lists any data it cannot determine. Read applicable design rules through MCP, including shared area rules and component-specific guidance. Fetch missing component knowledge through MCP. Use supported system variants instead of inventing an API from another primitive.
Facts over assumptions
Generated export names and owned props come from source. Inherited native or primitive props are pointers to upstream documentation. Composition rules explain supported usage; they do not make incompatible target exports interchangeable.
This website exposes llms.txt and Markdown versions of its documentation for reading. Those public documents complement authenticated context; they contain no private Design System data.