# What the guide contains

> The parts of design/guide.md and design/tokens.json, and how they stay in agreement.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://design.docs.sypnia.com/guide/the-design-guide/

For agents: Guide parts: brand (name, what the business is, who it is for, three words), colour, typography, space and shape, motion, voice, icons, logo and assets, pieces and gallery, do and don't. design/guide.md = the decisions in words with examples; design/tokens.json = W3C Design Tokens format (DTCG: $value, $type, groups color/font/space/radius/shadow/motion/size), with light and dark modes; design/tokens.css generated (CSS variables prefixed per project, e.g. --espiga-color-accent); guide.pdf exported. Every value in guide.md references a token; design check fails when they disagree. Versioned: each approved change is a new guide version.

## The parts

| Part                   | What it decides                                                                   | Read more                                                                  |
| ---------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| **Brand**              | the name, what the business is, who it is for, three words that describe it       | this page                                                                  |
| **Colour**             | colour roles (surface, text, accent, success, warning, danger…) in light and dark | [Colour and themes](https://design.docs.sypnia.com/guide/color-and-themes) |
| **Typography**         | one or two families, the type roles, sizes and weights                            | [Typography](https://design.docs.sypnia.com/guide/typography)              |
| **Space and shape**    | spacing scale, corners, borders, shadows, layout, touch targets                   | [Space and shape](https://design.docs.sypnia.com/guide/space-and-shape)    |
| **Motion**             | what moves, how fast, and what happens with reduced motion                        | [Motion](https://design.docs.sypnia.com/guide/motion)                      |
| **Voice**              | how the app talks: words, buttons, messages when something fails                  | [Voice](https://design.docs.sypnia.com/guide/voice)                        |
| **Icons**              | the construction rules and your brand's signature                                 | [Icons](https://design.docs.sypnia.com/guide/icons)                        |
| **Logo and assets**    | logo versions, clear space, favicon, images, the printed guide                    | [Logo and assets](https://design.docs.sypnia.com/guide/logo-and-assets)    |
| **Pieces and gallery** | which piece is for what, how they combine, screen patterns                        | [The gallery](https://design.docs.sypnia.com/components/the-gallery)       |
| **Do and don't**       | pictures of what keeps the brand and what breaks it                               | this page                                                                  |

## Two files that always agree

`design/guide.md` is written for people. Each decision comes with its reason and an example: «The accent is wheat yellow, used only for the one action that matters on a screen.»

`design/tokens.json` is written for code, in the [W3C Design Tokens format](https://www.designtokens.org/): every value has a name, a type and, for colours, a light and a dark value.

`design/tokens.json (part)`

```json
{
  "color": {
    "accent": { "$type": "color", "$value": "#E0A526", "$extensions": { "sypnia.dark": "#F2C14E" } },
    "ink": { "$type": "color", "$value": "#3B2A1E", "$extensions": { "sypnia.dark": "#F5EBDD" } }
  },
  "radius": { "control": { "$type": "dimension", "$value": "10px" } }
}
```

`design tokens build` turns it into `design/tokens.css`, with variables named after your project:

`design/tokens.css (generated)`

```css
:root { --espiga-color-accent: #E0A526; --espiga-color-ink: #3B2A1E; --espiga-radius-control: 10px; }
:root[data-theme="dark"] { --espiga-color-accent: #F2C14E; --espiga-color-ink: #F5EBDD; }
```

The guide never repeats a raw value: it names the token (`color.accent`). `design check` reports a guide that names a token that does not exist, or a token that no part of the guide explains.

## Versions

Every approved change makes a new **guide version** (1, 2, 3…), written in the `[design]` table of `sypnia.toml` and in the commit. Screens and components record the version they were made with, so you always know what is up to date. [Changing the guide](https://design.docs.sypnia.com/screens/changing-the-guide) shows how a change travels.

## The PDF

`design export --pdf` writes `design/guide.pdf`: the same guide laid out for reading and printing, with the logo pages, the palette with print values and the do-and-don't pictures. [Logo and assets](https://design.docs.sypnia.com/guide/logo-and-assets) explains the print part.
