Tavero

v0.7.0
io.github.baccaraaa/tavero Checked 3 days ago Published 1 month ago

Finds UI drift in React apps (buttons, cards, colors, spacing) and gives your agent each fix

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

tavero_context Design-system brief

Compact Markdown brief of this React app's design system: stack, tokens, the canonical button/icon-button/card components with files and props, dominant radius/spacing/typography, and open problems. Call it BEFORE writing or changing UI, then reuse the components and tokens it names instead of inventing styles.

ParameterTypeDescription
budgetintegerapproximate token budget, default 1500

tavero_findings List findings

UI consistency problems of the latest scan, worst first: distinct button and card styles, colors outside the tokens, Tailwind defaults, hardcoded literals, off-scale radius/spacing/typography. Each row has a stable id, severity, rule, title and evidence count; evidence is not included. Filter by rule or severity; paginate with limit/page. Open one with tavero_finding. A human may have triaged findings in the Tavero panel: `decision.status` fix means confirmed work (listed first), findings marked accepted are hidden, `decision.note` is a message to you.

ParameterTypeDescription
decisionstringhuman decision; fix = a human confirmed it
includeAcceptedbooleanalso list findings a human marked as intended
limitintegerrows per page (default 20, max 200)
pageintegerpage number, from 1
rulestring
severitystring

tavero_finding One finding with evidence

One finding with paged evidence rows: current value, `expected` (the project token or canonical component to use instead, or a note that no close token exists and one should be added), component, file:line, route/viewport and a crop image path. Rows valued "literal … in source" are where the value is written (often CSS); the other rows are where it renders (the component JSX). Fix the code using `expected`, then rescan only the affected routes with tavero_scan (routes + rules) and confirm with tavero_diff.

ParameterTypeDescription
id *stringfinding id from tavero_findings, e.g. f_2d0ccc6aa1
evidenceLimitintegerrows per page (default 20, max 200)
evidencePageintegerpage number, from 1

tavero_components List components

React components seen in the latest scan with instance counts, pages and source file:line. Search by name or file with `query`; sort by instances (default) or name; `unresolved` lists components without a source file.

ParameterTypeDescription
limitintegerrows per page (default 20, max 200)
pageintegerpage number, from 1
querystring
sortstring
unresolvedboolean

tavero_component Component details

One component by id or name: source file:line, prop names, instance count, which pages and viewports render it, and crop image paths.

ParameterTypeDescription
idOrName *string

tavero_show Crop image paths

Absolute paths of PNG crops showing how a component actually renders, optionally for one viewport. Open them with your image/file reader to see the component.

ParameterTypeDescription
idOrName *string
viewportstring

tavero_tokens Design tokens

Design tokens found in the app (CSS custom properties and Tailwind theme): name, kind, raw and resolved value, source file:line. Use these names instead of literal colors and sizes.

ParameterTypeDescription
kindstring
limitintegerrows per page (default 200)
pageintegerpage number, from 1

tavero_diff Diff two scans

Findings that are new, resolved or unchanged (with changed stats) between the previous and the latest scan, by stable id. A finding is fixed when it is listed under resolved. After a partial rescan, `note` says how many routes were not rescanned and may still carry the finding.

ParameterTypeDescription
fromstringolder scan folder name; default: the one before `to`
tostringnewer scan folder name; default: latest

tavero_scan Scan the running app

Crawl the app in a real browser at mobile/tablet/desktop widths (plus one dark-theme pass at desktop width when the project styles a dark theme), map every element to its React component and file:line, and recompute findings. A full scan takes minutes; after a code fix pass only the affected `routes` and the finding's `rules` (seconds) — findings on other routes are carried over. Needs the dev server url (it is started with `npm run dev` if nothing answers and kept running for later scans). Then call tavero_diff.

ParameterTypeDescription
url *stringdev server url, e.g. http://localhost:5173
routesarrayonly these routes; omit for all routes
rulesarrayrecompute only these rules
viewportsarraydefault: all three