tesserai

v0.2.2
design.tesserai/tesserai Checked 2 days ago Published 2 months ago

Your project's design system for coding agents: tokens, components, contrast checks, guidelines.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

import_design_system Import a design system

Bring this project's existing design system (its look: colors for light and dark, fonts, body text size, corners, spacing, shadows) into tesserai as a new system. It never changes the project. Read the project first, then call this once with what you found. This tool already reads stylesheets (CSS variables, Tailwind v4 @theme, Sass/Less variables, plain rules), design-token files, next/font and Tailwind v3 configs by itself. Add what lives in code: - antd: the ConfigProvider theme / ThemeConfig.token (colorPrimary, colorError, colorSuccess, colorWarning, colorBgBase, colorTextBase, colorBord…

ParameterTypeDescription
tokens *objectA DTCG document of the look you found, every token with $extensions['tesserai.source'] = 'path:line'
dryRunbooleanOnly report what would come across
intostringA system imported before (its link, /systems/<id>): update it with what the code changed, for the person to review, instead of making a new one
namestringThe system's name (default: from package.json)
notesarrayWhat the person should know that isn't a value, e.g. 'Dark mode comes from antd's darkAlgorithm, so it's filled in.'

outline Design system outline

A compact outline of the design system: palettes, meanings (intents), surfaces, type, spacing, radius, and every component with its parts and options.

ParameterTypeDescription
refreshbooleanWait for a fresh remote check (up to 5s). Omit for immediate local context and background freshness.

get_tokens Get tokens

Read the tokens under a path prefix: values, per-mode values, and whether they were set by hand.

ParameterTypeDescription
prefix *stringPath prefix, e.g. color.brand, intent.primary, space, button

get_component Get a component

Read one component's full definition: parts, axes, and every recipe layer.

ParameterTypeDescription
component *string

explain Explain a token

Follow a token's references to its final value, in light or dark.

ParameterTypeDescription
path *stringA token path, e.g. intent.primary.solid or button.height.md
schemestring

usage Token usage

What depends on a token: the tokens that reference it and the components it styles.

ParameterTypeDescription
path *string

check_contrast Check contrast

Run the contrast checks and list failing pairs with suggested fixes.

list_overrides List overrides

What has been customised compared with tesserai's defaults.

guidelines Design guidelines

Design guidelines on a topic (WCAG, Apple, Material and settled practice, with sources): the rule, why it matters, where it comes from. Read it before answering how a design system should do something, or making a change a guideline speaks to.

ParameterTypeDescription
topic *stringcolor: Palettes, color roles and scale steps, meaning colors, color alone; contrast: Text and UI contrast ratios, in light and dark; type: Type scale, sizes, line height, line length, weights; spacing…

list_operations List operations

Every operation apply_changes accepts, by group, with what it does. describe_operation gives one operation's exact input.

ParameterTypeDescription
groupstringOnly this group, e.g. palette, intent, type, component

describe_operation Describe an operation

One operation's input, as JSON Schema.

ParameterTypeDescription
name *string

apply_changes Apply changes

Change the design system with operations, applied in order, all or nothing, and checked before anything is written. Then the theme CSS and components are regenerated; files the developer edited are kept and the new version is written beside them. With preview: true, nothing is written and the result says what would change.

ParameterTypeDescription
ops *array
previewboolean
summarystringOne sentence saying what the change does

scan Scan the project

How the app uses the design system: each component's uses and files, most used first, with each option's uses (a use without it counts for the default); components never used; options no use sets; overrides (className, class, style or sx restyling a component, by what they change; placement isn't counted); suggestions where the same override repeats; generated files edited by hand; and hard-coded colors and sizes with the token to use. Act on it: a suggestion is a change to propose to the system (a variant, a size, the component's corners), not to the app; confirm with the person before removi…

upload_scan Upload a scan

Scan the app and keep the result with its design system in the builder (Pro), where the team sees usage beside the system and how it changes over time. Sends counts, kinds and class names only: no source, no paths but edited generated files. Needs the project to follow its system's account link and a CLI login. Only when the person asks.

sync Sync the design system

Bring the project up to date with its design system: for a project that follows a tesserai link, pull the latest version first (the latest release of a private system); then regenerate the theme CSS and components. Files the developer edited are kept; the new version goes beside them. Call it before building UI when outline says the design changed.

ParameterTypeDescription
dryRunbooleanShow the planned file changes without writing.

component_guide Component guide

How to build with the system's components. Without a component: each one with what it's for and its import. With one: its import, its props and their allowed values, and an example written for this project (its library and class prefix). Use it before writing UI, so new code uses the components rather than hand-styled elements.

ParameterTypeDescription
componentstringA component id, e.g. button, field, select

example_page Example page

A whole page written with this system's components, for this project (its library and class prefix): a pattern to follow when building similar UI. Pages: sign-in, settings, dashboard, data-list (sign-in and settings are forms).

ParameterTypeDescription
page *string