---
description: Rebuild CSS and JS outputs from token JSON sources. // turbo
---

# Token Sync

Validate token JSON and regenerate all outputs.

## Steps

1. **Validate token files**
   Read each file in `tokens/primitives/`, `tokens/semantic/`, `tokens/component/`.
   Every token object must have `$value`, `$type`, and `$description`.
   Report any tokens missing required fields.

2. **Build tokens**
   Run `npm run build:tokens`
   Report success or failure with error details.

3. **Verify outputs**
   Confirm these generated files exist and are non-empty:
   - `src/theme/generated/tokens.css`
   - `src/theme/generated/tokens.js`
   Report any missing or empty outputs.

4. **Check theme integration**
   Read `src/theme/index.ts` — are any newly added tokens missing from the MUI theme mapping?
   Report tokens that exist in generated output but aren't consumed by the theme.
