Skip to content

/utility-tune

Adjust utilities.tokens.json via a natural-language request, regenerate the bundle, and validate the result. All edits are atomic — if validation fails, the tokens file is reverted and no CSS is written.

/utility-tune <natural-language description>
/utility-tune use a 4px spacing baseline
/utility-tune use an 8px spacing baseline
/utility-tune add an xs breakpoint at 20rem
/utility-tune disable shadow utilities
/utility-tune drop responsive variants from spacing
/utility-tune add a 'soft' radius value at 1rem
RequestEffect on utilities.tokens.json
”use a 4px spacing baseline”spacing.baseline = "0.25rem"
”use an 8px spacing baseline”spacing.baseline = "0.5rem"
”add an xs breakpoint at 20rem”breakpoints.xs = "20rem"
”disable shadow utilities”families.shadow.enabled = false
”drop responsive variants from spacing”families.spacing.responsive = false
”add a ‘soft’ radius value at 1rem”radius.soft = "1rem"
  1. Parse the request — interprets the natural-language request into one or more concrete edits to utilities.tokens.json. If the intent is ambiguous, asks one clarifying question before making changes.

  2. Edit tokens — reads assets/utilities/utilities.tokens.json, applies the edits in memory, and writes the updated tokens back to disk.

  3. Regenerate the bundle — runs generate_utilities.py to rebuild per-family CSS partials and the concatenated utilities.css.

  4. Validate — runs validate_utilities.py on the regenerated bundle.

    • On failure: prints the reasons array and reverts the tokens edit. No CSS is written.
    • On success: continues.
  5. Print summary — reports which token fields changed, the new bundle size, and how many classes were added or removed.