Skip to content
SOVEREIGN

Theme files

To check design tokens and to use --fix, the Guard reads each tenant's tokens from a resolved theme file: JSON with an id and a tokens.semantics tree. Token names are the path joined onto tokenPrefix, so color.primary below becomes --semantic-color-primary. The files are found through the themes setting in sovereign.config.json.

json · themes/light.resolved.json
{
  "id": "light",
  "tokens": {
    "semantics": {
      "color": {
        "primary": "#FF0044",
        "background": "#FFFFFF"
      }
    }
  }
}

--fix replaces a raw colour in a script file with a token only when the replacement is unambiguous. Anything else is reported with the reason and left as it was.

In stylesheets, raw colours are reported with the token that would replace them, but they are never rewritten.