> ## Documentation Index
> Fetch the complete documentation index at: https://docs.artbucket.io/llms.txt
> Use this file to discover all available pages before exploring further.

# The canon

> The brand as records an agent can query.

Brand rules are records, not a PDF: a dotted key, a typed value (`color`,
`text`, `number`, `list` or `font`), a sentence on how to use it, and the assets
it points at.

```bash theme={null}
pnpm artbucket rules set color.primary '#34a853' --type color --usage "Buttons, links, the mark's tile"
pnpm artbucket rules set color.primary '#5bc27a' --type color --context dark-background
curl 'https://assets.example.com/api/v1/brand/rules?context=dark-background'
```

A rule can be scoped to a context. Asking for one returns one rule per key:
the context's own where it has one, the default otherwise.

## The guidelines page

Guidelines, in the sidebar, is drawn from those records and edited in place:
click a value to change it, press `/` to add a rule from named building blocks
(brand color, clear space, logo don'ts, type scale, words to avoid), drag to
reorder. Colors show their contrast on white and black, a numeric `type.scale`
renders as a specimen. An attached asset can name a rendition (`w_512,f_png`):
agents then get that exact URL.

## Design tokens

`GET /api/v1/brand/tokens?format=css` is the brand as CSS custom properties
with `@font-face`; `format=json` is W3C design tokens.

## Brands and history

A workspace can hold several brands, one of them the default. Every change is
kept, like a shared doc: edits close together are one version, a named version
is a checkpoint, and any version can be restored, as a new version.

```bash theme={null}
curl https://assets.example.com/api/v1/brands/default/versions
curl -X POST https://assets.example.com/api/v1/brands/default/versions/3/restore
```
