Brandrail
v0.11.0Design system guardrails for AI coding tools: tokens, components and a brand checker.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_guidelines Get design system guidelines
The organisation's design system rules for AI coding: components to use (in the project's framework), allowed colour/spacing tokens, and what the Checker enforces. Call once before writing UI.
| Parameter | Type | Description |
|---|---|---|
framework | string | The project's UI framework (from its package.json: @angular/core → angular, vue → vue, svelte → svelte, solid-js → solid, react → react). Defaults to the one set for this connection. |
get_design_tokens Get design tokens
Brand Kit tokens with the CSS variable to use for each. Never hard-code colours, spacing, radius or fonts; use these variables.
| Parameter | Type | Description |
|---|---|---|
category | string | Which tokens to return |
find_component Find a design system component
Finds the component to use for a UI need, e.g. "date picker", "primary action", "modal", "dropdown of countries". Returns the import, rules and an example. Always use these instead of raw HTML elements or other UI libraries.
| Parameter | Type | Description |
|---|---|---|
intent * | string | What you need, in plain words |
framework | string | The project's UI framework (from its package.json: @angular/core → angular, vue → vue, svelte → svelte, solid-js → solid, react → react). Defaults to the one set for this connection. |
limit | integer |
get_component_docs Get component docs
Full docs for one component by name or alias, in the project's framework: import, tag, setup, what it replaces, usage rules and example.
| Parameter | Type | Description |
|---|---|---|
name * | string | Component name, e.g. "Button" or an alias like "Modal" |
framework | string | The project's UI framework (from its package.json: @angular/core → angular, vue → vue, svelte → svelte, solid-js → solid, react → react). Defaults to the one set for this connection. |
get_template Start a page from a template
A whole page (list, detail, form, settings, dashboard, sign-in) built from this organisation's components and spacing scale, in the project's framework: the files to create, which component fills each part, and the page's rules (states, layout, accessibility). Call before building a new page or screen; rename the sample data and keep the structure. Without a name, lists the templates.
| Parameter | Type | Description |
|---|---|---|
framework | string | The project's UI framework (from its package.json: @angular/core → angular, vue → vue, svelte → svelte, solid-js → solid, react → react). Defaults to the one set for this connection. |
name | string | Template name or what the page is, e.g. "list", "login", "admin index". One of: list, detail, form, settings, dashboard, sign-in |
get_migration_map Map another UI library to the design system
What replaces each piece of Angular Material, MUI, Bootstrap, Ant Design, Chakra, React Bootstrap or PrimeNG in this design system, in the project's framework. Call before migrating code that uses one of those libraries; keep behaviour identical and use get_component_docs for props and events.
| Parameter | Type | Description |
|---|---|---|
framework | string | The project's UI framework (from its package.json: @angular/core → angular, vue → vue, svelte → svelte, solid-js → solid, react → react). Defaults to the one set for this connection. |
libraries | array | Only these libraries (default: all) |
validate_snippet Validate UI code against the design system
Runs the Brandrail Checker on UI code you wrote (TSX/JSX, Angular components and templates, Vue, Svelte, HTML, CSS, PHP, Twig, Mustache/Handlebars). Returns a brand score and each violation with the fix. Call once after writing UI with every file you changed in `files`, and fix every error and warning before finishing.
| Parameter | Type | Description |
|---|---|---|
code | string | A single file or snippet (when not using files) |
filename | string | File name for code; the extension decides how it's parsed |
files | array | Every file you changed, checked together as one result. Preferred over code/filename. |
project | string | Repo or app name, e.g. customer-portal (shown in the dashboard) |