Brandrail

v0.11.0
au.com.brandrail/brandrail Checked 2 days ago Published 1 day ago

Design 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.

ParameterTypeDescription
frameworkstringThe 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.

ParameterTypeDescription
categorystringWhich 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.

ParameterTypeDescription
intent *stringWhat you need, in plain words
frameworkstringThe 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.
limitinteger

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.

ParameterTypeDescription
name *stringComponent name, e.g. "Button" or an alias like "Modal"
frameworkstringThe 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.

ParameterTypeDescription
frameworkstringThe 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.
namestringTemplate 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.

ParameterTypeDescription
frameworkstringThe 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.
librariesarrayOnly 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.

ParameterTypeDescription
codestringA single file or snippet (when not using files)
filenamestringFile name for code; the extension decides how it's parsed
filesarrayEvery file you changed, checked together as one result. Preferred over code/filename.
projectstringRepo or app name, e.g. customer-portal (shown in the dashboard)