# Sypnia Design documentation > Sypnia Design is where your project’s own design system lives: its guide, its colours, fonts and icons, its pieces and its gallery, and the screens of every use case. Your app looks like you, not like Sypnia. The agent designs with your guide, never invents, and every screen is designed before it is built. Every page of the documentation follows, in reading order. Each one starts with its title and its address. --- ## Start here > What Sypnia Design is, how it works, what is open source and what is Sypnia Cloud, and the quickstarts. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/ For agents: Section index for Sypnia Design: each customer project's own design system (guide, tokens for colour/type/space/shape/motion in light and dark, voice, icons drawn for the project, logo and assets, PDF export) plus the project's component gallery and screen patterns; an unstyled accessible base (@sypnia/base) + the project's own styled components generated into its repository + a private gallery; screens of every use case designed before they are built; design check; skills so agents never invent. Not based on @sypnia/ui. Sypnia Design is the start of everything: it decides how your app looks and how people use it, before the first screen is built. Every project gets a design system of its own, made for its brand, and the agent designs with it instead of making things up. > **Note: Sypnia uses it** > > Sypnia's own design guide lives in Design, like a customer's. Telemetry's screens are designed with it and checked with `design check` before they are built. - **\[Engine]** **The Design tools** are open source: the `design` command, the unstyled base `@sypnia/base`, the generator, the checker, the local gallery and the skills. They work in your repository, with no account. - **\[Cloud]** **Sypnia Cloud** adds the Design console, the shared online gallery, proposals with before-and-after pictures, the PDF export service and AI help paid with credits. * [What Sypnia Design is](/start/what-it-is/): Your project's own design system: the guide, the pieces, the gallery and the screens of every use case. * [How it works](/start/how-it-works/): From your logo to a guide, from the guide to your pieces, from the pieces to the screens of every case. * [Open source and Sypnia Cloud](/start/open-source-and-cloud/): What the open-source Design tools do in your repository, and what Sypnia Cloud adds. * [Quickstart: Sypnia Cloud](/start/quickstart-cloud/): Ana gives La Espiga a design guide, a gallery and the screens of «Order for today», from the chat. * [Quickstart: your repository](/start/quickstart-repo/): Add Design to an existing app with the open-source tools, no account needed. * [How Sypnia uses it](/start/how-sypnia-uses-it/): Sypnia's own guide lives in Design, and Telemetry, the pilot, designs every screen with it. --- ## What Sypnia Design is > Your project's own design system: the guide, the pieces, the gallery and the screens of every use case. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/what-it-is/ For agents: What Sypnia Design is: per-project design system. Guide (design/guide.md + PDF): colour roles light/dark, typography, space and shape, motion, voice, icons drawn with Sypnia's construction discipline plus the brand's signature, logo and assets. Pieces: unstyled accessible base @sypnia/base + the project's own styled components generated into src/design/ in its repository (owned by the customer). Gallery: which piece for what, how to combine them, screen patterns per kind of use case. Screens: every use case with a `where` place is designed (every ending and failure) before it is built; `design check` keeps screens to the guide. Skills make agents design with the guide and never invent. Customer apps never look like Sypnia: Design does not start from @sypnia/ui. > **In plain words** > > Before anyone builds your app, Design writes down how it should look and sound: your colours, your fonts, your icons, how buttons and forms behave, and what each screen shows when things go well and when they go wrong. Then everyone who builds it, people or agents, follows that guide. Nobody picks a colour «because it looked nice». ### What you get | What | In one line | Read more | | ------------------------- | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | **The design guide** | Your brand in words and values: colours, fonts, spacing, corners, motion, voice, in light and dark | [The design guide](https://design.docs.sypnia.com/guide/the-design-guide) | | **Icons of your own** | Drawn for your project with careful construction rules and a trait of your brand, never from a stock set | [Icons](https://design.docs.sypnia.com/guide/icons) | | **Logo and assets** | Your logo in every version you need, and the guide as a PDF for whoever prints your bags or your sign | [Logo and assets](https://design.docs.sypnia.com/guide/logo-and-assets) | | **Your components** | Buttons, fields, menus and dialogs styled with your guide, generated into your repository: yours to keep and change | [Your components](https://design.docs.sypnia.com/components/your-components) | | **An accessible base** | Keyboard, focus, screen readers, layers and phone behaviour done right underneath every piece | [The base](https://design.docs.sypnia.com/components/the-base) | | **Your gallery** | A private page that shows every piece live, says what each one is for and how to combine them | [The gallery](https://design.docs.sypnia.com/components/the-gallery) | | **Screens of every case** | Each use case designed where it lives in your app, with every ending and every failure, before it is built | [Screens per case](https://design.docs.sypnia.com/screens/screens-per-case) | | **The check** | `design check` finds any colour, size, icon or piece that is not in your guide | [The check](https://design.docs.sypnia.com/screens/the-check) | | **Skills** | Instructions that make your agent design with your guide and ask before adding anything new | [Skills](https://design.docs.sypnia.com/skills) | ### Made to look like you, not like Sypnia No two apps made with Design look alike. Your pieces are generated from **your** guide into **your** repository; only the invisible part underneath (keyboard, focus, screen readers) is shared. Sypnia's own look lives in [@sypnia/ui](https://ui.sypnia.com), a free library for anyone who likes it, and Design does not start from it. [Design and @sypnia/ui](https://design.docs.sypnia.com/components/design-and-sypnia-ui) explains the difference. ### Design comes first The order in a Sypnia project is: the map of use cases ([Sypnia Cases](https://cases.docs.sypnia.com/)), then the design guide and the screens of each case, then the code. When a case changes, its screens are designed again before the code changes. ### With the rest of Sypnia - **Sypnia Cases** says which screens exist: every case that happens inside your app has a `where`, its place in the app's navigation tree, and its failures say what the person is told. - **Sypnia Agent** loads the Design skills and follows the guide on every task. - **Sypnia App** shows the guide, the gallery and screen previews in its side panel, and takes your logo when you drop it in the chat. - **Sypnia AI** powers the proposals, paid with credits. - **Sypnia Mail** uses your guide's colours, fonts and voice in the e-mails your app sends. --- ## How it works > From your logo to a guide, from the guide to your pieces, from the pieces to the screens of every case. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/how-it-works/ For agents: Design flow: 1 brand input (logo SVG/PNG, colours, fonts, words, examples) → 2 proposals (palettes, type pairs, shape and voice; the person picks) → 3 guide written (design/guide.md, design/tokens.json → tokens.css light/dark, icons, assets) → 4 pieces generated into src/design/ over @sypnia/base, gallery.yaml with uses, combinations and patterns → 5 screens per case (design/screens/.screen.yaml: where, pattern, regions, every ending and failure, phone and desktop), approved by a person → 6 the agent builds with the pieces, design check in CI. Repository is the source of truth; Cloud writes through pull requests. #### 1. You bring your brand A logo (SVG or PNG), colours you already use, fonts you like, a few words about your business, pictures of places you love. Nothing is required: with only a name, Design starts from questions. #### 2. Design proposes, you choose Design reads your logo and your words and proposes a few palettes, type pairings, shapes and a voice. You pick, mix or ask for others. Every proposal is shown on real screens of your app, in light and dark. #### 3. The guide is written Your choices become `design/guide.md` (the guide in words), `design/tokens.json` (every value, with `design/tokens.css` generated from it), your icons in `design/icons/`, and your logo and assets in `design/brand/`. The guide also exports as a PDF. #### 4. Your pieces and your gallery Design generates your components into `src/design/`, styled with your tokens on top of the accessible base `@sypnia/base`. `design/gallery.yaml` says what each piece is for, how pieces combine, and which screen pattern fits each kind of use case. The gallery shows all of it live. #### 5. Every case gets its screens For each use case with a `where`, Design writes `design/screens/.screen.yaml`: the pattern, what is on the screen, and what the person sees at every ending and every failure, on a phone and on a desktop. A person approves it. #### 6. The agent builds, the check keeps it honest The agent builds the screen with your pieces only. `design check` runs before every change is proposed and in your pipeline, and reports anything outside the guide. ### Where things live | Thing | Where | | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------- | | The guide, tokens, icons, brand assets, gallery and screen files | your repository, under `design/` (the source of truth) | | Your components | your repository, under `src/design/` (configurable) | | The accessible base | the npm package `@sypnia/base` | | The console, the online gallery, proposals | `design.app.sypnia.com` **\[Cloud]** | | The API | `https://design.api.sypnia.com/v1` **\[Cloud]**, or your engine's address **\[Engine]** | | The MCP server | `https://mcp.design.sypnia.com` **\[Cloud]** | Sypnia Cloud never keeps a second copy that can drift: every approved change is a commit in a pull request to your repository, in [Sypnia Git](https://git.docs.sypnia.com/) or GitHub. --- ## Open source and Sypnia Cloud > What the open-source Design tools do in your repository, and what Sypnia Cloud adds. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/open-source-and-cloud/ For agents: Design open source (MIT: @sypnia/design CLI/SDK with generator, checker, local gallery, PDF export with a local browser; @sypnia/base; skills. AGPL-3.0: the Design engine server with API, MCP, proposals, renderer) vs Sypnia Cloud (console design.app.sypnia.com, online private gallery shared with the team, proposals with before/after renders, review and approval in App, hosted renderer and PDF export, AI help through Sypnia AI paid with credits, sync with Sypnia Git or GitHub). Same files, same check, move either way. | | Open source **\[Engine]** | Sypnia Cloud **\[Cloud]** | | -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | | The guide, tokens, icons, gallery and screen files | files in your repository | the same files, edited from the console or App, written to your repository by pull request | | Generating your components | `design components generate` on your machine | the same, run for you when a change is approved | | The gallery | `design gallery` on your machine | a private online page for your team, with links that expire | | `design check` | on your machine and in any CI | the same, plus results on each pull request in Sypnia Git | | Proposals (palettes, type, icons, screens) | with your own model key, through the engine | with Sypnia AI, paid with credits, shown with before-and-after pictures | | PDF export | with a local browser | the hosted export service | | Approvals | in your terminal or pull request | in the console, App or your phone, with who approved and when | | License | `@sypnia/design`, `@sypnia/base` and the skills under MIT; the Design engine (server, API, MCP, renderer) under AGPL-3.0 | a hosted service, paid with credits | The files, the formats and the check are the same, so you can move either way at any time. Your components are plain source code in your repository in both cases. --- ## Quickstart: Sypnia Cloud > Ana gives La Espiga a design guide, a gallery and the screens of «Order for today», from the chat. Applies to: Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/quickstart-cloud/ For agents: Design Cloud quickstart: in app.sypnia.com open the project, drop the logo (SVG/PNG) in the chat or Design console → Design reads its colours and shapes, proposes 3 palettes, 3 type pairings, shape and voice → pick → guide drafted (light/dark, icons, assets) → approve (pull request to the project's repository) → gallery at design.app.sypnia.com///gallery → screens of place-order (where shop.order-for-today; endings: reserved, OutOfStock, Closed; phone and desktop) → approve → the agent builds with the pieces; design check passes. At the end you will have La Espiga's design guide, its own pieces and gallery, and the approved screens of the case «Order for today». It takes about twenty minutes, most of it choosing. #### 1. Open your project and drop your logo In [app.sypnia.com](https://app.sypnia.com), open the project **La Espiga** and drop `logo.svg` in the chat: «This is my bakery's logo. Make our design guide.» A PNG works too; SVG gives sharper results. **You should see:**Design reads the logo: «Your logo uses a warm brown and a wheat yellow, with soft rounded letters. I'll start from there.» #### 2. Choose a palette, a type pairing and a voice Design shows three palettes, three type pairings and a voice, each one on a real screen of your app («Order for today», on a phone), in light and dark. Pick one of each, or ask: «warmer», «less playful», «show me one with green». **You should see:**A short summary of your choices, with the contrast of every text colour already checked. #### 3. Approve the guide Design writes the guide: colours, fonts, spacing, corners, motion, voice, a first set of icons with a trait of the logo, and your logo's versions. Open **Design → Guide** in the side panel, read it, and choose **Approve**. **You should see:**A pull request «Design guide 1» in your project's repository with `design/` and `src/design/`, merged when you approve. #### 4. Look at your gallery Open **Design → Gallery**. Every piece is there, live: buttons, fields, the product card, the pick-up code, in light and dark, on a phone and a desktop, with what each one is for. #### 5. Design the screens of «Order for today» Ask in the chat: «Design the screens of Order for today». Design reads the case from your map: it lives at `shop.order-for-today`, it ends with the products reserved, and it can fail with `OutOfStock` or `Closed`. It proposes one screen file with every one of those states. **You should see:**Pictures of each state: choosing, sending, «Reserved, here is your code», «This one just ran out», «We just closed», on a phone and a desktop. #### 6. Approve, then build Approve the screens. From now on, when the agent builds «Order for today», it uses only your pieces, and `design check` confirms it. Next: [the design guide](https://design.docs.sypnia.com/guide/the-design-guide), [your gallery](https://design.docs.sypnia.com/components/the-gallery), [screens per case](https://design.docs.sypnia.com/screens/screens-per-case). --- ## Quickstart: your repository > Add Design to an existing app with the open-source tools, no account needed. Applies to: the Sypnia engine (open source, self-hosted). Source: https://design.docs.sypnia.com/start/quickstart-repo/ For agents: Design repo quickstart: npx @sypnia/design init (asks name, brand inputs, framework; --logo ./logo.svg, --from guide.md, --components src/design, --yes) writes the [design] table of sypnia.toml, design/guide.md, tokens.json → tokens.css, icons/, brand/, gallery.yaml, and src/design/ components over @sypnia/base; installs the Design skills into .claude/skills/; design gallery serves http://localhost:4520; design screens new place-order; design check exits 1 on findings. Proposals need a model key (SYPNIA_DESIGN_AI_URL/KEY) or are written by your agent with the skills. At the end your app has a `design/` folder with its guide, generated components in `src/design/`, a gallery on your machine and `design check` in your scripts. #### 1. Start the guide In your app's folder: ```bash npx @sypnia/design init --logo ./public/logo.svg ``` It asks for the project's name, a few words about it, and your framework (React with Next.js, Vite or Astro). With a model key it proposes palettes and type pairings; without one, your agent writes them with the [Design skills](https://design.docs.sypnia.com/skills), which `init` copies into `.claude/skills/`. **You should see:**A `[design]` table in `sypnia.toml` at the root of your repository; `design/` with `guide.md`, `tokens.json`, `tokens.css`, `icons/`, `brand/` and `gallery.yaml`, and `src/design/` with your components. #### 2. Open the gallery ```bash npx @sypnia/design gallery ``` **You should see:**`Gallery at http://localhost:4520` with every piece, light and dark, phone and desktop. #### 3. Use your pieces `app/order/page.tsx` ```tsx import { Button, ProductCard, Stepper } from '@/design'; ``` Import from your own `src/design/`, never from `@sypnia/base` directly: the base has no look of its own. #### 4. Design a case's screens ```bash npx @sypnia/design screens new place-order ``` It reads `cases/orders/place-order.case.yaml` (if you use [Sypnia Cases](https://cases.docs.sypnia.com/)) and writes `design/screens/place-order.screen.yaml` with a state for every ending and failure. #### 5. Check ```bash npx @sypnia/design check ``` **You should see:**`design check: 0 findings` — or the list of anything outside the guide, with the file and line. Add `design check` to your pipeline so every pull request is checked. Nothing here needs a Sypnia account. --- ## How Sypnia uses it > Sypnia's own guide lives in Design, and Telemetry, the pilot, designs every screen with it. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/start/how-sypnia-uses-it/ For agents: Sypnia dogfooding: Sypnia's guide (night and paper themes, the «lid and light» icon construction, voice) is a Design project like any customer's. @sypnia/ui is the component set made for that guide; because many Sypnia apps share it, it is published as a package (ui.sypnia.com is its gallery) instead of generated into one repository. Telemetry (telemetry.app.sypnia.com), the pilot that uses every Sypnia product: its screens per use case live in design/screens/ of its repository in Sypnia Git, are designed before they are built, and design check runs on every pull request; new icons go through the icon rules; changes to the guide go through proposals with before/after. Telemetry is the pilot of the Sypnia suite: it is built on Sypnia from end to end, and it uses every Sypnia product. This is how it uses Design. ### Sypnia's guide is a Design project Sypnia has a design guide of its own: the night and paper themes, the colours, the fonts, the voice, and the icon construction called «lid and light» (outlines that never close, strokes that never touch, one light at most). It lives in Design as the project `sypnia`, with the same files any customer has. The component set made for that guide is [@sypnia/ui](https://ui.sypnia.com). A customer's pieces are generated into one repository; Sypnia's are published as a package because the console of every Sypnia product, these docs and the product pages share them. Its gallery, ui.sypnia.com, is the Sypnia project's gallery, open for anyone to see. ### How Telemetry uses Design | What | How | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Screens before code** | Every Telemetry use case with a place in its app (for example «See a problem», at `problems/problem-detail`) has a screen file in `design/screens/`, with every ending and failure, approved before it is built | | **The check on every change** | `design check` runs on every pull request in Sypnia Git; a colour, an icon or a piece outside Sypnia's guide stops the merge | | **New icons** | An icon Telemetry needs (a rage click, a dead click) is drawn with the icon rules and checked like any other | | **Changes to the guide** | Go through a proposal with before-and-after pictures of the Telemetry screens it touches | | **E-mails** | Telemetry's alerts and daily summary use the guide's colours and voice through Sypnia Mail | ### What it proves If Design can hold Sypnia's own look steady across a dozen products, it can hold yours across one app. And because Sypnia's look is only one guide among many, customers' apps never inherit it. --- ## The design guide > Your brand in words and values: colour, type, space, shape, motion, voice, icons and logo. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/ For agents: Section index: the design guide (design/guide.md in words + design/tokens.json values → tokens.css), colour roles in light and dark with contrast, typography (two families at most, type roles, licensed for the web), space and shape (spacing scale, radius, borders, elevation, layout, touch targets), motion (durations, easings, reduced motion), voice (words, buttons, failure messages), icons (construction discipline + brand signature), logo and assets (versions, clear space, favicon, PDF export for print). The guide is where your brand is decided once, so that nobody has to guess it again. It has two halves that always agree: `design/guide.md`, which explains each decision in words, and `design/tokens.json`, which holds every value the code uses. - [What the guide contains](/guide/the-design-guide/): The parts of design/guide.md and design/tokens.json, and how they stay in agreement. - [Colour and themes](/guide/color-and-themes/): Colour roles instead of loose colours, a light and a dark theme designed on purpose, and contrast checked for you. - [Typography](/guide/typography/): One or two families, type roles for every kind of text, and fonts you are allowed to use on the web. - [Space and shape](/guide/space-and-shape/): The spacing scale, corners, borders, shadows, layout and the size of things a finger touches. - [Motion](/guide/motion/): What moves, how fast, and what happens for people who ask for less motion. - [Voice](/guide/voice/): How your app talks: the words it uses, how buttons are named, and what it says when something fails. - [Icons](/guide/icons/): Icons drawn for your project, with careful construction rules and a signature of your brand. - [Logo and assets](/guide/logo-and-assets/): Your logo in every version you need, the small images an app needs, and the guide ready for print. --- ## 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. --- ## Colour and themes > Colour roles instead of loose colours, a light and a dark theme designed on purpose, and contrast checked for you. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/color-and-themes/ For agents: Colour roles (tokens color.*): surface, surface-raised, surface-sunken, ink, ink-quiet, line, accent, on-accent, focus, success, warning, danger, info, plus brand extras (e.g. color.crust). Each role has a light and a dark value; dark is designed, not inverted. Contrast: text ≥ 4.5:1, large text and UI parts ≥ 3:1, focus ring ≥ 3:1 against neighbours (WCAG 2.2 AA); checked when tokens build and in design check. Theme follows the system by default; the guide decides whether a switch is offered. Status colours never carry meaning alone (icon or words too). Charts get a categorical palette derived from the guide. ### Roles, not loose colours Your app never uses «brown» or `#3B2A1E` directly. It uses **roles**: what a colour is for. Each role has one value in the light theme and one in the dark theme. | Role | Used for | La Espiga, light | La Espiga, dark | | -------------------------------------- | --------------------------------------- | ------------------------------------------ | ---------------------------- | | `surface` | the page | flour white | dark rye | | `surface-raised` | cards, sheets, menus | warm white | a step lighter than the page | | `surface-sunken` | fields, wells | light crust | a step darker | | `ink` | text | dark brown | cream | | `ink-quiet` | secondary text | soft brown | soft cream | | `line` | borders and dividers | light brown | dark brown | | `accent` | the one action that matters on a screen | wheat yellow | bright wheat | | `on-accent` | text on the accent | dark brown | dark brown | | `focus` | the keyboard focus ring | a deep blue that stands out from the brand | a light blue | | `success`, `warning`, `danger`, `info` | outcomes and alerts | green, amber, brick red, blue | lighter versions | A brand may add roles of its own (La Espiga has `crust`, for the pick-up code), each with a reason in the guide. ### Dark is designed, not inverted The dark theme gets its own values, chosen so the brand still feels like itself at night: surfaces are warm, not grey; the accent is a little brighter; shadows become light borders. The guide shows both themes side by side. The theme follows the person's system setting. Whether the app also offers a switch is a decision in the guide. ### Contrast is checked for you Every pair that appears together is checked when tokens are built and again by `design check`, against WCAG 2.2 level AA: | Pair | Minimum | | ------------------------------------------------------------ | ------- | | text on its surface | 4.5 : 1 | | large text (24 px, or 19 px bold), icons and control borders | 3 : 1 | | the focus ring against what is around it | 3 : 1 | A proposal that fails is not shown to you; a change you make by hand that fails is reported with the pair and the ratio. ### Colour never speaks alone Success, warning and danger always come with words or an icon, so a person who does not see the colour still gets the message. Charts use a palette derived from the guide, checked so neighbouring colours stay distinguishable. --- ## Typography > One or two families, type roles for every kind of text, and fonts you are allowed to use on the web. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/typography/ For agents: Typography: at most two families (display/headings + text), optionally a mono for codes; type roles font.role.* = display, title, heading, body, small, label, number (tabular figures), code; each with family, size (rem), line height, weight, letter spacing, and phone/desktop sizes. Fonts must be licensed for web use: open licences (SIL OFL, Apache) from the catalogue, or the customer's own licensed files (woff2/ttf/otf, licence recorded in design/brand/fonts/LICENSES.md). Fonts are self-hosted with the app (no third-party font CDN), subset to the guide's languages, font-display swap, two weights per family by default. Body text ≥ 16 px; line length 45–75 characters. ### Families A guide uses **one or two** families: one for display and headings, one for text, or one for both. A third, monospaced, is allowed for codes and numbers that must line up (La Espiga uses one for the pick-up code). ### Type roles Code never asks for «20 px bold». It asks for a role. | Role | For | La Espiga, phone → desktop | | --------- | --------------------------- | -------------------------------- | | `display` | the one big line of a page | 36 → 56 px, headings family | | `title` | the title of a screen | 26 → 34 px | | `heading` | a section | 20 → 24 px | | `body` | text | 16 → 17 px, text family | | `small` | notes, help under a field | 14 px | | `label` | buttons, tabs, field labels | 15 px, medium weight | | `number` | prices and quantities | text family with tabular figures | | `code` | the pick-up code | monospaced, 22 px, wide spacing | Each role has its family, size, line height, weight and letter spacing, for phone and desktop. Body text is never under 16 px, and lines of text stay between about 45 and 75 characters. ### Fonts you are allowed to use | Source | Allowed | | ----------------------------------------------------------- | -------------------------------------------- | | Fonts under an open licence (SIL Open Font License, Apache) | yes; Design proposes from this catalogue | | Fonts you bought with a licence that includes web use | yes; upload the files and record the licence | | Fonts without a web licence, or copied from another site | no | Uploaded fonts go to `design/brand/fonts/` with a line in `design/brand/fonts/LICENSES.md` saying where the licence comes from. Design never asks you to break a licence and never suggests a font only because a famous brand uses it. ### How fonts are served Fonts are served with your app, from your own domain: no third-party font service sees your visitors. They are subset to the languages your guide declares, use `font-display: swap` so text shows at once, and load two weights per family unless the guide asks for more. --- ## Space and shape > The spacing scale, corners, borders, shadows, layout and the size of things a finger touches. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/space-and-shape/ For agents: Space and shape tokens: space.* scale (4 px base: 1=4, 2=8, 3=12, 4=16, 6=24, 8=32, 12=48, 16=64), radius.* (none, control, card, sheet, round), border.* widths, shadow.* (elevation levels 0–3, or borders-only brands), size.touch (minimum 44 px), layout (breakpoints phone < 640, tablet 640–1024, desktop > 1024; content width; gutters 16 px on phone), density (comfortable or compact). Shape language = the guide's choices that make pieces feel like the brand: corner style, fills vs outlines, elevation vs borders, weight of lines. ### Spacing Every gap in your app comes from one scale, built on 4 px: | Token | Value | Typical use | | ---------- | ----- | ------------------------------------- | | `space.1` | 4 px | between an icon and its label | | `space.2` | 8 px | inside small controls | | `space.3` | 12 px | between a label and its field | | `space.4` | 16 px | inside cards; the phone's side margin | | `space.6` | 24 px | between groups | | `space.8` | 32 px | between sections on a phone | | `space.12` | 48 px | between sections on a desktop | | `space.16` | 64 px | around the top of a page | A brand can stretch the scale (more air, or less), never add values outside it one by one. ### Shape language The shape of things is what makes two brands feel different even with the same layout. The guide decides: | Decision | La Espiga | | ------------------------------------------------------------- | ----------------------------------------- | | **Corners** (`radius.control`, `radius.card`, `radius.sheet`) | soft: 10, 16 and 24 px, like a loaf | | **Fills or outlines** | filled buttons, outlined fields | | **Elevation** (`shadow.1` to `shadow.3`) or borders only | low warm shadows on cards, none elsewhere | | **Line weight** (`border.thin`, `border.strong`) | 1 and 2 px | ### Layout | Token | Value | | ------------- | ------------------------------------------------------------------ | | breakpoints | phone under 640 px, tablet 640 to 1024 px, desktop over 1024 px | | content width | the guide's reading width and the widest a screen may grow | | gutters | 16 px on a phone, wider on a desktop; never a sideways scroll | | density | comfortable or compact, per guide (a staff console may be compact) | ### Touch Everything a finger can press is at least `size.touch` (44 by 44 px), with room around it. `design check` measures it on the phone render of every screen. --- ## Motion > What moves, how fast, and what happens for people who ask for less motion. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/motion/ For agents: Motion tokens: motion.duration.instant (100 ms), quick (180 ms), gentle (280 ms), slow (400 ms, page-level only); motion.easing.enter/exit/move (cubic-bezier values). Rules: motion explains (feedback, where something came from, continuity), never decorates; nothing loops except a loading skeleton's shimmer; prefers-reduced-motion replaces movement with a fade or nothing; no motion blocks input; no flashing more than 3 times a second. Per-piece motion lives in the generated components; screens never animate on their own. ### Motion explains, it does not decorate Things move in your app for three reasons only: to confirm something happened (a button presses), to show where something came from (a sheet rises from the bottom), and to keep your place when the screen changes. Nothing moves to look busy. ### Tokens | Token | Value | For | | ------------------------------------- | --------------------------- | -------------------------------- | | `motion.duration.instant` | 100 ms | presses, toggles | | `motion.duration.quick` | 180 ms | menus, tooltips, small changes | | `motion.duration.gentle` | 280 ms | sheets, dialogs, cards appearing | | `motion.duration.slow` | 400 ms | a whole page changing, rarely | | `motion.easing.enter`, `exit`, `move` | curves chosen for the brand | coming in, leaving, moving | A calm brand uses the slower end; a lively one the quicker end. The guide records the choice and its reason. ### Rules - **Less motion when asked.** When a person's system asks for reduced motion, movement becomes a short fade or nothing at all. - **Nothing loops,** except the soft shimmer of a loading skeleton. - **Nothing waits for an animation.** People can keep typing and tapping while something moves. - **Nothing flashes** more than three times a second. Motion lives inside your pieces. Screens do not add animations of their own; a screen that needs a new kind of motion asks for it in the guide. --- ## Voice > How your app talks: the words it uses, how buttons are named, and what it says when something fails. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/voice/ For agents: Voice section of guide.md: personality (three words), how to address people (tú/usted, you), words to use and avoid (glossary of the business: «pick-up», not «collection»), button labels = verbs that say the result («Reserve my bread»), messages: what happened + what to do now, no blame, no codes; failure messages come from each case's failures[].tell in Cases and must follow the voice (design check flags tell texts that break the voice rules it can test: length, blame words, codes); languages of the app and who translates. Also used by Mail templates. Your app talks to people on every screen. The voice makes it sound like the same person every time. ### What the voice decides | Decision | La Espiga | | ------------------------------ | ------------------------------------------------------------------------------ | | **Personality** in three words | warm, simple, early-morning | | **How to address people** | «tú» in Spanish, «you» in English, first names when known | | **Words of the business** | «pick-up», «today's bread», «your code»; never «collection», «SKU», «order ID» | | **Words to avoid** | «error», «invalid», «oops», blame («you forgot») | | **Button labels** | a verb that says what happens: «Reserve my bread», not «Submit» | | **Messages** | what happened, then what to do now, in one or two short sentences | | **Languages** | Spanish first, English; who translates and who reviews | ### Failures speak with the voice In [Sypnia Cases](https://cases.docs.sypnia.com/), every failure of a case says what to `tell` the person. Those sentences are part of your app's voice: | Case failure | What the person reads | | ------------ | -------------------------------------------------------- | | `OutOfStock` | «This one just ran out. The rest of your order is kept.» | | `Closed` | «We just closed. You can order for tomorrow.» | `design check` reads them and flags what it can test: messages that are too long, that show a code, or that use a word the guide avoids. The rest is reviewed by a person with the screens. ### E-mails too [Sypnia Mail](https://mail.docs.sypnia.com/) templates use the same voice, colours and fonts, so «Your bread is ready» sounds and looks like the app that took the order. --- ## Icons > Icons drawn for your project, with careful construction rules and a signature of your brand. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/icons/ For agents: Icons: never from a stock set. Construction discipline shared with Sypnia's own set: 24 px grid, 2 px padding (20 px live area), one stroke width for the whole set (brand chooses, e.g. 1.5–2 px), one cap and join style, curves as arcs of circles with a few fixed radii, optical balance between round and square shapes, one idea per icon, no text, legible at 16/20/24 px. Plus the brand's signature: one recognizable trait (Sypnia: the open lid and the light; La Espiga: stroke ends cut like a grain, and a small grain dot as its accent). Rules in design/icons/rules.yaml; icons as design/icons/.svg using currentColor; design check icons verifies grid, padding, stroke, caps, signature and names. A screen that needs a missing icon triggers a proposal. Your icons are drawn for your project. Design never fills a screen with icons from a stock set, because those make every app look the same. ### The construction rules Every icon set made with Design follows the same discipline Sypnia uses for its own set. The rules make a set look like one hand drew it: | Rule | What it means | | -------------------------- | -------------------------------------------------------------------------- | | **Grid** | every icon is drawn on a 24 px grid | | **Padding** | 2 px of air on every side, so the live area is 20 px | | **One stroke** | one stroke width for the whole set, chosen by the brand | | **One cap and join style** | round, or square, everywhere | | **Curves are arcs** | curves are arcs of circles with a few fixed radii | | **Optical balance** | a circle is drawn slightly larger than a square so they look the same size | | **One idea** | one thing per icon; no words, no letters | | **Small sizes** | legible at 16, 20 and 24 px | ### Your brand's signature On top of the rules, each brand gets one trait that makes its icons its own. Sypnia's is the open lid and the light: outlines never close, and one small light marks the thing to look at. La Espiga's comes from its logo: the ends of strokes are cut like a grain of wheat, and a small grain dot marks the accent. The signature is written in `design/icons/rules.yaml`, with a picture, so anyone drawing a new icon knows it. ### Files ```text design/icons/ ├─ rules.yaml the grid, stroke, caps, radii and the signature ├─ bag.svg an order ├─ clock.svg pick-up time └─ wheat.svg today's bread ``` Each icon uses `currentColor`, so it takes the colour of its text. `design check` verifies every icon against `rules.yaml`: grid, padding, stroke, caps and joins, the signature, and that its name is used by some screen. ### When a screen needs a new icon The agent does not borrow one. It proposes a new icon, drawn with the rules, shown at 16, 20 and 24 px next to the icons it will live with. A person approves it, and it joins the set. --- ## Logo and assets > Your logo in every version you need, the small images an app needs, and the guide ready for print. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/guide/logo-and-assets/ For agents: Logo and assets in design/brand/: logo.svg (full), mark.svg, mono.svg, on-dark.svg; clear space and minimum size; favicon.svg + PNG sizes, app icons (192/512, Apple touch 180), social image (1200×630) generated from the guide. Upload SVG or PNG (PNG traced to SVG only with approval; the original is kept). Without a logo, Design proposes a wordmark from the chosen type and a simple mark, never imitating other brands. Print: design export --pdf --print writes guide.pdf with colour values in HEX, RGB and approximate CMYK (no Pantone matching), logo files for the printer, clear space and sizes; design export --assets zips the brand kit. ### Your logo Upload your logo as **SVG** (best) or **PNG**. Design keeps the original and prepares the versions an app needs: | Version | File | For | | ---------- | -------------------------- | -------------------------------- | | Full | `design/brand/logo.svg` | the header, the guide's cover | | Mark | `design/brand/mark.svg` | small places: tabs, the app icon | | One colour | `design/brand/mono.svg` | stamps, receipts, embossing | | On dark | `design/brand/on-dark.svg` | the dark theme and dark photos | The guide sets the **clear space** around the logo and its **minimum size**. A PNG is turned into SVG only when you approve the result; the original stays. **No logo yet?** Design proposes a wordmark set in your chosen type and a simple mark from your words. It never imitates another brand's logo. ### The small images From the logo and the guide, Design generates the favicon (`favicon.svg` and PNG sizes), the app icons for phones (192, 512 and Apple's 180 px), and the image shown when someone shares a link to your app (1200 × 630 px). ### For whoever prints your bags or your sign ```bash npx @sypnia/design export --pdf --print ``` It writes `design/guide.pdf` with a print section: each colour in HEX, RGB and an approximate CMYK, the logo files in vector form, the clear space and the smallest sizes. Colours printed on paper change with the paper and the ink, so ask your printer for a proof; Design does not match colours to printing ink catalogues. `design export --assets` puts the logo versions, icons and the PDF in one zip to send to a designer or a printer. --- ## Pieces and gallery > The accessible base underneath, your own styled pieces on top, and the gallery that says what each one is for. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/ For agents: Section index, three layers: (1) @sypnia/base — unstyled accessible React behaviour shared by every customer (focus, keyboard, screen readers, layers, dialogs, menus, phone behaviour), built on React Aria; (2) your components — styled with the project's tokens, generated into src/design/ of the customer's repository, owned by the customer; (3) the gallery — design/gallery.yaml + a private page: pieces, when to use and not, combinations, screen patterns per kind of use case. Customer apps never start from @sypnia/ui. Every screen in your app is built from **pieces**. Each piece has two layers: a shared base that makes it work for everyone, and your look on top. The gallery ties them together. **Figure**: Three layers: the shared accessible base, your own styled pieces, and your gallery. 1. `@sypnia/base` gives every piece its behaviour: keyboard, focus, screen readers, layers and phone behaviour. It has no look. 2. Your components, in `src/design/` of your repository, give every piece your look, from your tokens. They are yours. 3. Your gallery says which piece is for what, how they combine, and which screen pattern fits each kind of case. - [The accessible base](/components/the-base/): @sypnia/base: the behaviour every piece needs, with no look of its own. - [Your components](/components/your-components/): Pieces with your look, generated into your repository, and yours to keep and change. - [Your gallery](/components/the-gallery/): Which piece to use for what, how to combine them, and every piece shown live. - [Screen patterns](/components/patterns/): Which screen shape fits each kind of use case, and the states every pattern must design. - [Design and @sypnia/ui](/components/design-and-sypnia-ui/): Why your app does not start from Sypnia's own component library, and when you might choose it anyway. --- ## The accessible base > @sypnia/base: the behaviour every piece needs, with no look of its own. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/the-base/ For agents: @sypnia/base (MIT, React 19, built on React Aria; npm): unstyled primitives — Button, Link, TextField, NumberField, SearchField, Select, ComboBox, Checkbox, RadioGroup, Switch, Slider, Dialog, AlertDialog, Sheet, Popover, Menu, Tooltip, Tabs, Disclosure, Toast region, Table, GridList, Calendar, DatePicker, FileTrigger, DropZone, Toolbar, Breadcrumbs, Form, VisuallyHidden, SkipLink, Layer. Guarantees: visible focus only for keyboard, full keyboard use, ARIA roles/names/states, focus trapped in dialogs and returned on close, Escape closes the top layer, scroll lock, one layer manager for z-order, live regions for toasts, phone behaviour (44 px hit areas, sheets instead of popovers under 640 px, safe areas, virtual keyboard keeps fields visible, no hover-only actions), RTL. States as data attributes (data-pressed, data-focus-visible, data-open, data-invalid, data-disabled, data-selected) for plain CSS. No CSS, no tokens, no icons. Apps import pieces from their own src/design, never the base directly. Some things are hard to get right and should never look different from one app to the next: how the keyboard moves through a menu, where focus goes when a dialog closes, what a screen reader says about a switch. `@sypnia/base` does those things, and nothing else. It has **no colours, no sizes, no fonts and no icons**. It is a React package, MIT-licensed, built on React Aria, the same engine Sypnia's own library uses. Every customer shares it; no customer looks like another because of it. ### What it guarantees | Area | What the base does | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Focus** | a visible focus state only when people use the keyboard; focus moves to a dialog when it opens and back when it closes | | **Keyboard** | every piece works with the keyboard alone: arrows in menus and tabs, Escape to close, Enter and Space to press | | **Screen readers** | the right role, name and state on every piece; announcements for toasts and changes | | **Layers** | one manager for everything that floats (menus, popovers, dialogs, sheets, toasts): the right one is on top, Escape closes the top one, the page behind does not scroll | | **Dialogs and menus** | focus kept inside while open, outside clicks handled, nested menus | | **Phone behaviour** | hit areas of at least 44 px; popovers become bottom sheets under 640 px; safe areas respected; the field you type in stays visible above the keyboard; nothing depends on hover | | **Languages** | right-to-left layouts, dates and numbers in the person's language | ### The pieces Button, Link, TextField, NumberField, SearchField, Select, ComboBox, Checkbox, RadioGroup, Switch, Slider, Dialog, AlertDialog, Sheet, Popover, Menu, Tooltip, Tabs, Disclosure, Toast region, Table, GridList, Calendar, DatePicker, FileTrigger, DropZone, Toolbar, Breadcrumbs, Form, VisuallyHidden, SkipLink and Layer. ### How your look attaches The base exposes each state as a data attribute, so your styles are plain CSS: `src/design/components/Button.module.css (part)` ```css .button { background: var(--espiga-color-accent); border-radius: var(--espiga-radius-control); } .button[data-pressed] { transform: translateY(1px); } .button[data-focus-visible] { outline: 2px solid var(--espiga-color-focus); outline-offset: 2px; } ``` States: `data-pressed`, `data-hovered`, `data-focus-visible`, `data-open`, `data-selected`, `data-invalid`, `data-disabled`. ### You never import it directly Screens import pieces from your own `src/design/`. `design check` reports a screen that imports `@sypnia/base` directly, because that piece would have no look and no place in your gallery. --- ## Your components > Pieces with your look, generated into your repository, and yours to keep and change. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/your-components/ For agents: Your components: generated by design components generate into src/design/ (configurable in the [design] table of sypnia.toml, components.dir): one folder per piece (Button.tsx + Button.module.css + README.md), index.ts exporting all, written as ordinary React + CSS modules over @sypnia/base using only tokens. The generator writes structure and accessibility wiring; the look comes from the guide's shape language and tokens; the agent with the sypnia-design-guide skill tailors pieces to the brand. Brand pieces beyond the base (ProductCard, PickupCode, Stepper) are composed from base pieces. Ownership: plain source in the customer's repo, edit freely; each file records generated-from guide version and a hash; components status shows untouched/edited/out of date; regeneration after a guide change is a three-way merge in a pull request; edited parts are never overwritten silently. Frameworks: React (Next.js, Vite, Astro with React); tokens.css usable anywhere. Your pieces live in **your** repository, as ordinary React and CSS. Design generates them from your guide; after that, they are yours. ### What gets generated ```text src/design/ ├─ index.ts every piece, exported ├─ tokens.css → ../../design/tokens.css └─ components/ ├─ Button/ │ ├─ Button.tsx your look over @sypnia/base's Button │ ├─ Button.module.css only tokens, no raw values │ └─ README.md what it is for, from the gallery ├─ TextField/ … ├─ ProductCard/ a piece of your own, made of base pieces └─ PickupCode/ ``` There are two kinds of pieces: | Kind | Examples | Made from | | ------------------------------ | --------------------------------------------------------------- | ----------------------------- | | **Base pieces with your look** | Button, TextField, Select, Dialog, Sheet, Menu, Tabs, Toast | one `@sypnia/base` piece each | | **Pieces of your own** | ProductCard, PickupCode, Stepper («Choose → Confirm → Pick up») | several base pieces, composed | The generator writes the structure and the accessibility wiring. The look comes from your guide: its tokens and its shape language (corners, fills or outlines, shadows or borders). The agent, with the [Design skills](https://design.docs.sypnia.com/skills), tailors each piece to your brand, so two bakeries with the same pieces still look like two bakeries. ### Yours to change The files are plain source code. Change them as you like: a different hover, an extra variant, a piece rewritten by hand. Design keeps track of what it generated: ```bash npx @sypnia/design components status ``` ```text Button up to date (guide 3) ProductCard edited by you Stepper out of date: guide 4 changed radius.card ``` ### When the guide changes A change to the guide regenerates the affected pieces in a **pull request**. For a piece you edited, Design merges its new version with your changes, keeps yours where they touch the same lines, and shows the conflicts for you or your agent to resolve. Your edits are never overwritten silently. ### Frameworks Generated pieces are React (Next.js, Vite, or Astro with React; static pages render them on the server). `design/tokens.css` works in any framework, so a page outside React can still use your colours, fonts and spacing. --- ## Your gallery > Which piece to use for what, how to combine them, and every piece shown live. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/the-gallery/ For agents: Gallery = design/gallery.yaml (source) + a page. gallery.yaml: pieces[] {id, component (path in src/design), for, not_for, variants[], states[], combines_with[], example}; combinations[] {id, pieces[], for, rule}; patterns[] (see Patterns). The page: design gallery serves http://localhost:4520 (engine); Cloud serves a private page at design.app.sypnia.com///gallery, team members only, share links expire (default 7 days); every piece live, light/dark, phone/desktop, every state, with for / not for and the screens that use it. The agent reads gallery.yaml before choosing a piece; a piece not in gallery.yaml cannot be used. The gallery is the guide to your pieces: what each one is for, what it is **not** for, how pieces go together, and which screen pattern fits each kind of use case. It is a file your agent reads and a page people look at. ### The file: `design/gallery.yaml` `design/gallery.yaml (part)` ```yaml pieces: - id: button component: components/Button for: The one action that moves the person forward on a screen. not_for: Navigation to another place (use link). More than one per screen (use button-quiet for the rest). variants: [primary, quiet, danger] states: [rest, hover, pressed, focus, disabled, busy] - id: product-card component: components/ProductCard for: One product the customer can add, with its photo, name, price and what is left today. combines_with: [stepper, quantity] - id: pickup-code component: components/PickupCode for: The code the customer shows at the counter. Only on the outcome of place-order. combinations: - id: choose-and-confirm pieces: [product-card, quantity, button] for: Choosing several things and confirming once. rule: One primary button, at the bottom on a phone, at the side on a desktop. patterns: [ … ] # see Patterns ``` | Field | What it says | | -------------------- | ------------------------------------------------------ | | `id` | the piece's name, used by screen files | | `component` | where it lives in `src/design/` | | `for` | when to use it, in one sentence | | `not_for` | when not to, and what to use instead | | `variants`, `states` | what the gallery shows | | `combines_with` | pieces that are often next to it | | `combinations` | groups of pieces with a rule for how they sit together | A piece that is not in `gallery.yaml` cannot be used on a screen: the agent proposes it first. ### The page | | Where | Who sees it | | ------------- | --------------------------------------------------------------------------------- | ----------------------------------------------------------------------- | | **\[Engine]** | `npx @sypnia/design gallery` at `http://localhost:4520` | you | | **\[Cloud]** | `design.app.sypnia.com///gallery`, and in App's side panel | your organization's members; share links for others expire after 7 days | For every piece it shows each variant and state, live, in light and dark, at phone and desktop width, next to its «for» and «not for», and the list of screens that use it. --- ## Screen patterns > Which screen shape fits each kind of use case, and the states every pattern must design. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/patterns/ For agents: Patterns in gallery.yaml patterns[] {id, for (kind of case), regions[], pieces[], phone, desktop, states_required[]}. Default set the guide starts from (renamed and shaped per brand): do-something (form to an outcome: place-order), review-a-list (list and detail: today's orders), see-one-thing (detail), find (search and filter), summary (numbers and what needs attention), settings, sign-in, first-time (empty and onboarding). Required states for every pattern: loading (skeleton in the shape of the result), empty, each outcome, each failure of the case, offline. The pattern a case uses is chosen in its screen file; a case whose kind fits no pattern triggers a proposal. Most use cases are one of a few kinds: doing something, reviewing a list, looking at one thing, finding something. A **pattern** is the screen shape your guide uses for each kind, so similar cases feel the same. ### The patterns a guide starts with | Pattern | For cases that… | La Espiga example | | --------------- | ------------------------------------------------- | ------------------------ | | `do-something` | take the person through a few steps to an outcome | «Order for today» | | `review-a-list` | show many items to act on, with a detail | «Today's orders» (staff) | | `see-one-thing` | show one item and its actions | «Order detail» | | `find` | search and filter | «Find a product» | | `summary` | show numbers and what needs attention | «How today went» | | `settings` | change how something works | «Opening hours» | | `sign-in` | identify a person | «Sign in» | | `first-time` | greet someone with nothing yet | «Your first order» | Each brand shapes and names its own; a guide may drop patterns it does not need and add others. ### What a pattern says `design/gallery.yaml (patterns, part)` ```yaml patterns: - id: do-something for: Cases that take the person to one outcome in a few steps. regions: [header, steps, content, action] pieces: [stepper, product-card, quantity, button] phone: The action sits at the bottom, always visible; one step per screen. desktop: Steps on the left, content in the middle, a summary with the action on the right. states_required: [loading, empty, outcome, failures, offline] ``` ### States every pattern designs | State | What it shows | | ---------- | ---------------------------------------------------------- | | `loading` | a skeleton in the shape of what is coming, never a spinner | | `empty` | what to do when there is nothing yet | | `outcome` | each ending of the case («Reserved, here is your code») | | `failures` | each failure of the case, with its message from Cases | | `offline` | what still works without a connection, and what waits | A case whose kind fits no pattern makes the agent propose a new pattern for the guide, instead of inventing a one-off screen. --- ## Design and @sypnia/ui > Why your app does not start from Sypnia's own component library, and when you might choose it anyway. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/components/design-and-sypnia-ui/ For agents: @sypnia/ui (ui.sypnia.com, MIT) is Sypnia's own styled library for Sypnia's guide (night/paper, «lid and light» icons). Design never starts a customer project from it: customer apps must not look like Sypnia. What is shared: only the invisible behaviour (both use React Aria underneath; customers get it through @sypnia/base). A customer who wants Sypnia's look can install @sypnia/ui like any open-source library, outside Design's generated pieces; Design then treats it as that project's pieces only if the guide adopts it explicitly. Sypnia has a look of its own: the night and paper themes, its colours, its fonts, and its «lid and light» icons. That look lives in [@sypnia/ui](https://ui.sypnia.com), the library Sypnia's own products and sites are built with. **Your app does not start from it.** If every app made with Sypnia used Sypnia's pieces, they would all look like Sypnia, and none would look like you. Design gives your project its own pieces, from your own guide. ### What is the same and what is not | | Your app with Design | Sypnia's products | | -------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------- | | Behaviour underneath (keyboard, focus, screen readers, layers) | `@sypnia/base`, on React Aria | React Aria, inside `@sypnia/ui` | | The look | your guide, your tokens, your pieces in your repository | Sypnia's guide, `@sypnia/ui` | | Icons | drawn for you with the construction rules and your signature | the «lid and light» set | | The gallery | your private gallery | ui.sypnia.com | So your app feels as solid as Sypnia's, and looks nothing like it. ### If you like Sypnia's look `@sypnia/ui` is a free, open-source library under the MIT license, and anyone can use it. If you want your app to look like Sypnia, install it like any other library. Design will only treat it as your project's pieces if your guide says so on purpose, in a guide change you approve. --- ## Screens > The screens of every use case, designed before they are built, and the check that keeps them to the guide. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/screens/ For agents: Section index: screens per case (design/screens/.screen.yaml for every case with `where`, every ending and failure, phone and desktop, approved by a person before building), design check (tokens only, pieces only, icons only, every case and state designed, contrast, focus, touch targets, first screen), changing the guide (proposals with before/after, versions, regeneration by pull request). Screens are designed per use case, in the place where each case happens, before any code is written. Then the check makes sure the built screens are the ones that were designed. - [Screens per case](/screens/screens-per-case/): Every use case that happens in your app gets its screens, with every ending and every failure, before it is built. - [The check](/screens/the-check/): design check finds anything on your screens that is not in your guide. - [Changing the guide](/screens/changing-the-guide/): How a change to your guide is proposed, seen before and after, approved and carried into your code. --- ## Screens per case > Every use case that happens in your app gets its screens, with every ending and every failure, before it is built. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/screens/screens-per-case/ For agents: Screen file design/screens/.screen.yaml: format 1, case (id), where (place id in the Cases navigation tree, e.g. shop.order-for-today; path shown as breadcrumb), pattern (gallery pattern id), guide (version), status draft|approved|built, approved_by/at, regions {region: [pieces with content]}, states {loading, empty, outcome., failure. (message from case failures[].tell), offline}, phone/desktop notes, first_screen: true for entry screens. Cases without `where` (external, scheduled, event) need no screen; their effects on other screens are designed there. Renders: Cloud renders every state at phone 390×844 and desktop 1366×700 and 1876×951, light and dark. A screen is built only after approval; when the case changes (new failure) the screen file becomes out of date and design check reports the missing state. ### Which cases get screens Every use case that happens inside your app has a `where` in [Sypnia Cases](https://cases.docs.sypnia.com/): its place in the app's navigation tree, such as `shop.order-for-today`, whose path people see as «Orders → Order for today». Each of those cases gets a **screen file**. Cases that start outside the app (another system calls, a scheduled job, an event) have no screen of their own; where they change what people see, that change is designed on the screens that show it. ### The screen file `design/screens/place-order.screen.yaml` ```yaml format: 1 case: place-order where: shop.order-for-today pattern: do-something guide: 3 status: approved approved_by: ana@laespiga.co first_screen: true regions: header: [{ piece: title, text: "Order for today" }, { piece: pickup-hours }] content: [{ piece: product-card, repeat: today's products }] action: [{ piece: button, variant: primary, text: "Reserve my bread" }] states: loading: product cards as skeletons empty: { piece: notice, text: "Today's bread is sold out. Come back tomorrow from 6 am." } outcome.reserved: [{ piece: pickup-code }, { piece: notice, text: "We keep it until closing time." }] failure.OutOfStock: { piece: notice, tone: warning, near: the product, text: from case } failure.Closed: { piece: notice, tone: danger, replaces: content, text: from case } offline: products stay visible; «Reserve» waits for the connection and says so phone: one product per row; the action stays at the bottom desktop: products in a grid; the summary and the action on the right ``` | Field | What it is | | ------------------ | ------------------------------------------------------------------------------------------------ | | `case`, `where` | the use case and its place in the navigation tree | | `pattern` | the [screen pattern](https://design.docs.sypnia.com/components/patterns) it follows | | `guide` | the guide version it was designed with | | `status` | `draft`, `approved` or `built` | | `regions` | what each part of the screen holds, using only gallery pieces | | `states` | loading, empty, each outcome, each failure (`text: from case` takes the case's message), offline | | `phone`, `desktop` | how the layout changes | | `first_screen` | for screens people land on: the main content fits without scrolling | ### Pictures of every state In Sypnia Cloud, every state is rendered as a picture: on a phone (390 × 844), a laptop (1366 × 700) and a large screen (1876 × 951), in light and dark. You approve the screens by looking at them, not by reading YAML. ### Approved before built The agent builds a screen only after its file is `approved`. When the case changes (say a new failure, `PaymentRefused`), the screen file is out of date and `design check` reports the missing state until it is designed and approved. --- ## The check > design check finds anything on your screens that is not in your guide. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/screens/the-check/ For agents: design check (CLI, SDK, CI, MCP check tool): reads design/, src/design/, the app's source (TSX/JSX/CSS/MDX/Astro) and cases/. Findings with codes: raw-color, raw-size (px/rem outside tokens), raw-font, unknown-piece (import not from src/design or not in gallery.yaml), base-import (imports @sypnia/base directly), unknown-icon (SVG or icon library not in design/icons), icon-rules, missing-screen (case with where and no screen file), missing-state (outcome/failure not designed), screen-out-of-date, contrast, focus (no visible focus state), touch-target (< size.touch on phone render), first-screen (main content below the fold at 1366×700 or 390×844), voice (tell text too long, codes, avoided words), guide-drift (tokens.json vs guide.md vs tokens.css), components-out-of-date. Severity error|warning; exit 1 on errors; --json; waivers in sypnia.toml [[design.checks.waive]] {code, path, reason, until}. Renders-based checks (touch-target, first-screen, contrast in context) need a browser (local Chromium) or Cloud. ```bash npx @sypnia/design check ``` ```text src/app/order/page.tsx:42 raw-color #F5D76E is not a colour of the guide (closest: color.accent) src/app/order/page.tsx:57 unknown-piece is not in gallery.yaml cases/orders/place-order missing-state failure.Closed has no design design check: 2 errors, 1 warning ``` ### What it checks | Code | Finds | | ----------------------------------- | ------------------------------------------------------------------------------------ | | `raw-color`, `raw-size`, `raw-font` | a colour, size or font written by hand instead of a token | | `unknown-piece` | a piece that does not come from `src/design/` or is not in `gallery.yaml` | | `base-import` | a screen importing `@sypnia/base` directly | | `unknown-icon`, `icon-rules` | an icon from outside `design/icons/`, or one that breaks the construction rules | | `missing-screen` | a case with a `where` and no screen file | | `missing-state` | an outcome or failure of a case with no designed state | | `screen-out-of-date` | a screen designed with an older guide or an older version of its case | | `contrast` | text or controls under the guide's contrast minimums, measured on the render | | `focus` | a piece with no visible keyboard focus | | `touch-target` | something pressable smaller than `size.touch` on the phone render | | `first-screen` | the main content of a `first_screen` screen does not fit at 1366 × 700 or on a phone | | `voice` | a message that is too long, shows a code, or uses a word the guide avoids | | `guide-drift` | `guide.md`, `tokens.json` and `tokens.css` disagree | | `components-out-of-date` | pieces generated from an older guide | Each finding is an `error` or a `warning`. The command exits with `1` when there are errors, so a pipeline stops; `--json` prints the findings for tools. ### Where it runs - **Before the agent proposes a change.** The Design skills run it and fix what they can. - **On every pull request,** in Sypnia Git or any CI. - **In the console and App,** next to each screen. The checks that need a picture (`contrast` in context, `touch-target`, `first-screen`) use a browser: Chromium on your machine, or the renderer in Sypnia Cloud. ### Waivers Sometimes a rule must bend, for a while. A waiver needs a reason and an end date: `sypnia.toml (part)` ```toml [[design.checks.waive]] code = "raw-color" path = "src/app/legacy/receipt.tsx" reason = "Old receipt screen, replaced by place-order's outcome" until = 2027-01-31 ``` --- ## Changing the guide > How a change to your guide is proposed, seen before and after, approved and carried into your code. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/screens/changing-the-guide/ For agents: Guide changes are deliberate: a proposal (kind: tokens|piece|pattern|icon|voice|brand; author person or agent; reason) shows before/after renders of every affected screen and piece and the list of screens touched; contrast and check run on the 'after'; a person approves (never the agent that proposed it; MCP cannot approve); approval bumps the guide version and opens one pull request with tokens.json, tokens.css, guide.md, regenerated components (three-way merge for edited ones) and updated screen files; removing a piece lists the screens that use it and blocks until they move. Rejected proposals are kept with the reason. Engine: proposals are branches + pull requests; Cloud adds the review page and renders. Your guide changes on purpose, never by drift. A new colour, a new piece, a rounder corner: each one is a **proposal** that you see before and after, and approve. #### 1. Someone proposes You, a teammate or the agent proposes a change, with a reason: «The accent is hard to see on the counter's tablet in the sun: make it darker.» An agent proposes whenever a screen needs something the guide does not have, instead of inventing it. #### 2. Before and after Design applies the change on a copy and renders every screen and piece it touches, before and after, in light and dark. Contrast and `design check` run on the result. **You should see:**«This change touches 14 screens and 6 pieces. All checks pass.» #### 3. A person approves A person approves or rejects. The agent that proposed a change can never approve it, and approval is not available through MCP. #### 4. One pull request carries it Approval makes a new guide version and opens one pull request with `tokens.json`, `tokens.css`, `guide.md`, the regenerated pieces (merged with your own edits) and the updated screen files. When it merges, the change is in your app. ### Kinds of change | Kind | Example | What else moves | | ------- | --------------------------- | ------------------------------------------------- | | tokens | a darker accent | `tokens.css`, every piece using it | | piece | a new `Rating` piece | `gallery.yaml`, `src/design/` | | pattern | a new `book-a-time` pattern | `gallery.yaml` | | icon | a new `croissant` icon | `design/icons/` | | voice | «pick-up» becomes «collect» | `guide.md`; messages that use the word are listed | | brand | a new logo | `design/brand/`, favicon, app icons, PDF | ### Removing something Removing a piece, a pattern or an icon lists every screen that uses it. The change waits until those screens move to something else, so nothing is left pointing at a piece that no longer exists. ### Rejected proposals A rejected proposal is kept with its reason, so the same idea is not proposed again without something new. --- ## Skills > The Design skills that make an agent design with your guide, and never invent. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/skills/ For agents: Section index: Design skills (MIT, SKILL.md packages in sespinosav/sypnia-skills plugin sypnia and inside @sypnia/design, copied by design init into .claude/skills/): sypnia-design-guide, sypnia-design-icons, sypnia-design-screens, sypnia-design-build, sypnia-design-check. Rules: read the guide first, only tokens/pieces/icons/patterns of the guide, missing thing → proposal, never copy another brand, messages from Cases, check before proposing. Work in Claude Code, Cursor, Sypnia Agent and any agent that reads SKILL.md; MCP optional. An agent that designs without a guide picks whatever looks nice in the moment, and every app ends up with the same cards and the same icons. The Design skills give your agent your guide and strict rules for using it. - [The Design skills](/skills/the-design-skills/): Five skills: write the guide, draw icons, design screens, build them and check them. - [Working with your agent](/skills/working-with-your-agent/): Install the Design skills in Claude Code, Cursor, Sypnia Agent or any agent, and what a session looks like. --- ## The Design skills > Five skills: write the guide, draw icons, design screens, build them and check them. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/skills/the-design-skills/ For agents: Skills: sypnia-design-guide (interview at the person's level, read uploaded logo/brand, propose 2–3 options per decision shown on real screens, write guide.md + tokens.json, never copy a brand, licensed fonts only), sypnia-design-icons (draw SVG icons with rules.yaml construction + signature, show 16/20/24 px, run icon check), sypnia-design-screens (read the case and its where, pick the gallery pattern, write the screen file with every ending and failure, messages from tell, request renders), sypnia-design-build (implement an approved screen with src/design pieces only, no raw values, no direct @sypnia/base imports), sypnia-design-check (run design check, fix findings, propose guide changes for what is missing, never waive without a person). Each SKILL.md: when to use, what it reads, steps, checks that prove it is done. | Skill | When the agent uses it | What it reads | What it writes | | ----------------------- | ------------------------------------------------ | ------------------------------------------------ | --------------------------------------------------- | | `sypnia-design-guide` | starting or changing the guide | your words, logo, brand files, the current guide | `design/guide.md`, `design/tokens.json`, a proposal | | `sypnia-design-icons` | a screen needs an icon the set lacks | `design/icons/rules.yaml`, the existing icons | new SVGs in `design/icons/`, as a proposal | | `sypnia-design-screens` | a case needs its screens, or its case changed | the case, its `where`, `gallery.yaml`, the guide | `design/screens/.screen.yaml` | | `sypnia-design-build` | building an approved screen | the screen file, `src/design/` | the screen's code | | `sypnia-design-check` | before proposing any change to screens or pieces | everything above | fixes, or proposals for the guide | ### The rules every Design skill follows 1. **Read the guide first.** No screen, piece or icon is touched before `design/guide.md` and `gallery.yaml` are read. 2. **Only what the guide has.** Colours, sizes and fonts come from tokens; pieces from `gallery.yaml`; icons from `design/icons/`; layouts from patterns. 3. **Missing means propose.** When something is missing, the agent proposes a change to the guide and waits. It never adds a one-off. 4. **Never copy a brand.** No «make it look like» another company's app, logo or icons. 5. **Messages come from the case.** What a failure says comes from the case's `tell` in Sypnia Cases, in the guide's voice. 6. **Check before proposing.** `design check` passes, or every remaining finding is explained. 7. **People decide.** The agent offers two or three options at a time, shown as pictures for people who do not read code, and never approves its own proposals. ### How a skill is written Each skill is a folder with a `SKILL.md`: when to use it, what it reads, the steps, and the checks that prove the work is done. They are plain instructions under the MIT license, in [Sypnia Skills](https://skills.docs.sypnia.com/) and inside `@sypnia/design`. --- ## Working with your agent > Install the Design skills in Claude Code, Cursor, Sypnia Agent or any agent, and what a session looks like. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/skills/working-with-your-agent/ For agents: Install: design init copies the skills into .claude/skills/ (and .cursor/rules pointer) and adds an AGENTS.md section; or the Claude Code plugin (/plugin marketplace add sespinosav/sypnia-skills; /plugin install sypnia@sypnia); Sypnia Agent loads them automatically in projects whose sypnia.toml has a [design] table. MCP optional (mcp.design.sypnia.com) for renders, proposals and the online gallery; without it the skills work on files only. Session example: «design the screens of Order for today» → reads case place-order (where shop.order-for-today, failures OutOfStock, Closed) → pattern do-something → screen file draft → renders → person approves → build → check 0 findings. ### Install **Claude Code** `npx @sypnia/design init` copies the skills into `.claude/skills/` of your project. To have them in every project on your machine, install the Sypnia plugin: ```text /plugin marketplace add sespinosav/sypnia-skills /plugin install sypnia@sypnia ``` **Cursor** `npx @sypnia/design init` adds the skills and points `.cursor/rules` at them. The Sypnia plugin is also available for Cursor. **Any agent** The skills are Markdown files. `init` adds a short section to `AGENTS.md` that tells any agent where they are and when to read them. [Sypnia Agent](https://agent.docs.sypnia.com/) loads the Design skills on its own in any project whose `sypnia.toml` has a `[design]` table. ### With or without MCP The skills work on the files alone. Connected to the Design MCP server, the agent can also render screens as pictures, open proposals with before-and-after, and show you the online gallery: ```bash claude mcp add --transport http sypnia-design https://mcp.design.sypnia.com ``` ### What a session looks like > **Ana:** Design the screens of Order for today. > > **Agent:** I read the case. It lives at «Orders → Order for today», it ends with the bread reserved and a pick-up code, and it can fail with _OutOfStock_ or _Closed_. It fits your «do something» pattern. Here are the six states, on a phone and a desktop. One thing your guide does not have: a small «only 3 left» tag on the product card. Do you want me to propose it for the guide? > > **Ana:** Yes. > > **Agent:** Proposal sent with before and after. When you approve both, I'll build the screen. The agent says what it read, names what is missing instead of inventing it, and waits for a person to decide. --- ## SDK, CLI and MCP > The @sypnia/design package, the design command and the MCP tools for agents. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/tools/ For agents: Tools: @sypnia/design (MIT): SDK subpaths /tokens, /check, /gallery, /files, CLI npx @sypnia/design (command design); @sypnia/base (MIT) unstyled React primitives; MCP server https://mcp.design.sypnia.com (or /mcp). - [The @sypnia/design package](/tools/sdk/): One npm package for reading tokens, running the check, serving the gallery and reading Design files. - [The CLI](/tools/cli/): Every design command. - [MCP for agents](/tools/mcp/): The Design MCP server and its tools. --- ## The @sypnia/design package > One npm package for reading tokens, running the check, serving the gallery and reading Design files. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/tools/sdk/ For agents: @sypnia/design subpaths: /tokens (readTokens(dir) → typed tokens with light/dark; token('color.accent') → CSS var name; for charts/canvas), /check (check({ root, renders?: 'local'|'cloud'|false }) → { findings[], errors, warnings }), /gallery (serveGallery({ port: 4520 })), /files (parse/validate the [design] table of sypnia.toml, gallery.yaml, screen files, rules.yaml against JSON Schemas), /client (createDesign({ token } | { baseUrl }) for the API: proposals, renders, exports). CLI npx @sypnia/design. ESM + types; Node 20+. | Import | For | | ------------------------ | --------------------------------------------------------------------------------------------------------- | | `@sypnia/design/tokens` | reading your tokens in code (for charts, canvas, e-mails): `readTokens()`, `token('color.accent')` | | `@sypnia/design/check` | running `design check` from your own scripts or tests | | `@sypnia/design/gallery` | serving the gallery from your own dev server | | `@sypnia/design/files` | reading and validating the `[design]` table of `sypnia.toml`, `gallery.yaml`, screen files and icon rules | | `@sypnia/design/client` | the API: proposals, renders, exports **\[Cloud]** or your engine | | `npx @sypnia/design` | [the CLI](https://design.docs.sypnia.com/tools/cli) | ```ts import { readTokens, token } from '@sypnia/design/tokens'; const t = await readTokens(); // reads design/tokens.json t.color.accent.light; // "#E0A526" token('color.accent'); // "var(--espiga-color-accent)" ``` ```ts import { check } from '@sypnia/design/check'; const { errors, findings } = await check({ root: '.', renders: 'local' }); ``` ```ts import { createDesign } from '@sypnia/design/client'; const design = createDesign({ token: process.env.SYPNIA_DESIGN_TOKEN! }); // or { baseUrl } for your engine const p = await design.proposals.create({ project: 'la-espiga', kind: 'tokens', reason: 'Darker accent for the counter tablet', changes: { 'color.accent': '#C98E12' } }); ``` The pieces themselves are not in this package: they are generated into your repository on top of `@sypnia/base`. ESM with types; Node 20 or later. --- ## The CLI > Every design command. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/tools/cli/ For agents: design CLI: login/logout/whoami/use ; init [--logo --from --components --framework --yes]; guide show|propose|versions; tokens build|lint; icons new|check|ls; components generate|status|diff; gallery [--port 4520]; screens new |ls|render |approve (person session only); check [--json --renders local|cloud|off --fix]; propose (opens a proposal from local changes); proposals ls|show|approve|reject (person only); export --pdf [--print] | --assets; pull|push (sync with Cloud). --json everywhere; SYPNIA_DESIGN_TOKEN or the session. | Command | What it does | | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `login` · `logout` · `whoami` · `use ` | Sign in with your Sypnia account (device flow) or point at your engine | | `init` | Start Design in a repository: `--logo`, `--from guide.md`, `--components src/design`, `--framework next\|vite\|astro`, `--yes` | | `guide show\|versions` | The guide and its versions | | `tokens build\|lint` | Build `tokens.css` from `tokens.json`; check values and contrast | | `icons new \|check\|ls` | Draw a new icon from the rules, check the set | | `components generate\|status\|diff` | Generate pieces, see which are edited or out of date | | `gallery [--port 4520]` | Serve the gallery on your machine | | `screens new \|ls\|render ` | Screen files and their pictures | | `screens approve ` | Approve a screen (a person's session only) | | `check [--fix] [--renders local\|cloud\|off]` | [The check](https://design.docs.sypnia.com/screens/the-check) | | `propose` | Turn your local changes to the guide into a proposal | | `proposals ls\|show\|approve\|reject` | Review proposals (approving needs a person's session) | | `export --pdf [--print]` · `export --assets` | The guide as PDF; the brand kit as a zip | | `pull` · `push` | Sync with the project in Sypnia Cloud | `--json` works on every command. `SYPNIA_DESIGN_TOKEN` or `--token` uses a token instead of your session; tokens can never approve. --- ## MCP for agents > The Design MCP server and its tools. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/tools/mcp/ For agents: Design MCP at https://mcp.design.sypnia.com (engine: /mcp): OAuth (PKCE, DCR) or PAT; project tokens limit to one project. Read tools: get_guide, get_tokens, list_pieces, get_piece, list_patterns, list_icons, get_screen, list_screens, check. Write tools (drafts only): draft_screen, draft_icon, propose_change (opens a proposal), render (pictures of a screen/piece/state), export_pdf. No approve tool: approving proposals and screens needs a person in the console, App or CLI session. Every call recorded. `https://mcp.design.sypnia.com` serves every project you can reach. An agent signs in with your Sypnia account (OAuth with PKCE and dynamic client registration) or a personal access token; with a project token it works only on that project. Your own engine serves the same tools at `/mcp`. ```bash claude mcp add --transport http sypnia-design https://mcp.design.sypnia.com ``` | Tool | Does | Needs a person | | ---------------------------- | ----------------------------------------------------------------------- | -------------- | | `get_guide`, `get_tokens` | the guide in words and its values | no | | `list_pieces`, `get_piece` | the gallery's pieces, what they are for, their variants | no | | `list_patterns` | the screen patterns | no | | `list_icons` | the icons and their rules | no | | `list_screens`, `get_screen` | screen files and their status | no | | `check` | run `design check` on a branch | no | | `render` | pictures of a screen, piece or state, light and dark, phone and desktop | no | | `draft_screen` | write or update a screen file as a draft | approving it | | `draft_icon` | draw an icon as a draft | approving it | | `propose_change` | open a proposal to change the guide | approving it | | `export_pdf` | export the guide as PDF | no | There is no tool to approve anything: proposals and screens are approved by a person in the console, App or their own CLI session. Every call is recorded with the agent and the person it acts for. --- ## API reference > The Design API: addresses, authentication, errors and limits. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/api/ For agents: Design API at https://design.api.sypnia.com/v1 (engine: /v1). Auth: Authorization: Bearer ; token scopes read, write (drafts, proposals, renders, exports), admin (keys, repository link); approving proposals and screens needs a person's session (tokens get 403 person_required). Error shape {error {code, message}}; 400 invalid_request/invalid_file, 401 unauthorized, 403 forbidden/person_required, 404 not_found, 409 conflict/out_of_date (guide version moved), 413 too_large, 415 type_not_allowed, 422 check_failed/contrast_failed/unsafe_svg/font_licence_missing, 429 rate_limited (retry-after), 402 insufficient_credits. API: `https://design.api.sypnia.com/v1` **\[Cloud]**, or your engine's address **\[Engine]**. ### Authentication `Authorization: Bearer `. Tokens belong to a project and have scopes: `read` (guide, gallery, screens, checks), `write` (drafts, proposals, renders, exports, uploads), `admin` (tokens and the repository link). **Approving** a proposal or a screen needs a person's session; a token gets `403 person_required`. ### Errors ```json { "error": { "code": "contrast_failed", "message": "color.ink-quiet on color.surface is 3.9:1; text needs 4.5:1." } } ``` | Status | Codes | | ------ | ----------------------------------------------------------------------- | | 400 | `invalid_request`, `invalid_file` | | 401 | `unauthorized` | | 402 | `insufficient_credits` | | 403 | `forbidden`, `person_required` | | 404 | `not_found` | | 409 | `conflict`, `out_of_date` (the guide moved on since your proposal) | | 413 | `too_large` | | 415 | `type_not_allowed` | | 422 | `check_failed`, `contrast_failed`, `unsafe_svg`, `font_licence_missing` | | 429 | `rate_limited` (with `retry-after`) | Limits are on [Limits](https://design.docs.sypnia.com/reference/limits). - [Endpoints](/api/endpoints/): Guide, proposals, assets, icons, gallery, screens, renders, exports, checks and tokens. --- ## Endpoints > Guide, proposals, assets, icons, gallery, screens, renders, exports, checks and tokens. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/api/endpoints/ For agents: Design API endpoints under /projects/{project}: GET guide (?version), GET guide/versions, GET tokens (?format=json|css); proposals GET/POST, GET {id}, POST {id}/approve|reject (person); assets POST (multipart: logo, font with licence, image), GET, DELETE {id}; icons GET, POST (draft), GET {name}; gallery GET (pieces, combinations, patterns); screens GET, GET {case}, PUT {case} (draft), POST {case}/approve (person); renders POST {target: screen|piece|state, themes, widths} → 202 job, GET {id}; exports POST {kind: pdf|print|assets} → 202, GET {id}; checks POST {ref} → findings, GET {id}; repository GET/PUT (link to Sypnia Git/GitHub); tokens GET/POST/DELETE (API tokens). Every path below starts with `/projects/{project}`. ### Guide and tokens | Method and path | Does | | ------------------------------ | --------------------------------------------------------------------- | | `GET /guide?version=` | The guide in words and its values, at a version (default: the latest) | | `GET /guide/versions` | Every version, who approved it and when | | `GET /tokens?format=json\|css` | The tokens, as `tokens.json` or `tokens.css` | ### Proposals | Method and path | Does | | ------------------------------------------------------------- | --------------------------------------------------------------------------------- | | `GET /proposals`, `POST /proposals` | List; open one `{ kind, reason, changes }` → `202` while renders are made | | `GET /proposals/{id}` | The proposal, its before-and-after pictures and its check results | | `POST /proposals/{id}/approve`, `POST /proposals/{id}/reject` | Approve (opens the pull request) or reject with a reason; a person's session only | ### Assets and icons | Method and path | Does | | ------------------------------------ | ------------------------------------------------------------------------------------------ | | `POST /assets` | Upload a logo (SVG, PNG), a font (WOFF2, TTF, OTF, with `licence`) or an image (multipart) | | `GET /assets`, `DELETE /assets/{id}` | List, remove | | `GET /icons`, `GET /icons/{name}` | The icon set and one icon | | `POST /icons` | Draw an icon as a draft `{ name, idea }` | ### Gallery and screens | Method and path | Does | | ------------------------------------- | --------------------------------- | | `GET /gallery` | Pieces, combinations and patterns | | `GET /screens`, `GET /screens/{case}` | Screen files and their status | | `PUT /screens/{case}` | Save a draft screen file | | `POST /screens/{case}/approve` | Approve; a person's session only | ### Renders, exports and checks | Method and path | Does | | ------------------- | --------------------------------------------------------------------------------- | | `POST /renders` | `{ target, themes, widths }` → `202 { id }`; pictures of a screen, piece or state | | `GET /renders/{id}` | Its status and image links (signed, valid 1 hour) | | `POST /exports` | `{ kind: pdf \| print \| assets }` → `202 { id }` | | `GET /exports/{id}` | Its status and download link | | `POST /checks` | `{ ref }` (a branch or commit) → the findings of `design check` | | `GET /checks/{id}` | A past check | ### Repository and tokens | Method and path | Does | | -------------------------------------------------- | ------------------------------------------------------------------------------ | | `GET /repository`, `PUT /repository` | The linked repository in Sypnia Git or GitHub, and the branch Design writes to | | `GET\|POST /api-tokens`, `DELETE /api-tokens/{id}` | API tokens with scopes `read`, `write`, `admin` | The OpenAPI document is in the engine's repository, at `spec/openapi.yaml`. --- ## Architecture > How Sypnia Design is built: its parts, where they run, and why your repository holds the truth. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/ For agents: Design architecture: @sypnia/design (TypeScript: CLI, token builder, generator, checker with TS/CSS parsers, local gallery, local renderer with Chromium) and @sypnia/base (React, React Aria) run in the customer's repo; the Design engine (TypeScript, AGPL-3.0: API, MCP, proposals, Git writer, renderer and PDF exporter on headless Chromium, asset sanitizer) keeps proposals, renders, assets metadata and check results in Postgres (sypnia_design) and files in S3-compatible storage; writes approved changes as pull requests to Sypnia Git or GitHub; AI proposals through Sypnia AI (or any OpenAI-compatible endpoint); identities from Sypnia Data. The repository is the source of truth; the engine holds no second copy of the guide. **Figure**: Sypnia Design: the tools in your repository, the engine with its renderer, and where state lives. 1. You, App or an agent change the guide or ask for a screen, through the console, the CLI or MCP. 2. The engine opens a proposal, asks Sypnia AI for options when needed, and renders before-and-after pictures. 3. A person approves; the engine writes the change to your repository as a pull request. 4. In your repository, `@sypnia/design` builds tokens, generates pieces and runs `design check`. | Part | What it does | Language | Open source | | -------------------- | ----------------------------------------------------------------------------------------------------------- | ------------------ | ------------- | | **`@sypnia/design`** | CLI, token builder, component generator, `design check`, local gallery, local renders and PDF | TypeScript | yes, MIT | | **`@sypnia/base`** | the unstyled accessible pieces, on React Aria | TypeScript (React) | yes, MIT | | **Design engine** | API, MCP, proposals, the Git writer, the renderer and PDF exporter (headless Chromium), the asset sanitizer | TypeScript | yes, AGPL-3.0 | | **Design skills** | the instructions agents follow | Markdown | yes, MIT | | **Console** | `design.app.sypnia.com` and the Design panel of App | TypeScript (React) | no | ### Why your repository holds the truth Your guide, your pieces and your screens are part of your app, so they live with its code and change with it in the same pull requests. The engine keeps only what does not belong in a repository: proposals under review, rendered pictures, uploaded originals and check results. If the engine disappeared, your app would keep its whole design. ### Why TypeScript Everything Design reads and writes is web code (React, CSS, SVG) and every render is a web page, so the generator, the checker and the renderer use the same parsers and the same browser your app does. - [Request paths](/architecture/request-paths/): A proposal, a render and a check, step by step. - [Data model](/architecture/data-model/): The sypnia_design schema, and the files that live in your repository instead. - [Reference implementation on AWS](/architecture/reference-implementation-aws/): Every AWS service Design uses in Sypnia Cloud, and how. - [Failures and scaling](/architecture/failures-and-scaling/): What happens when a render, the model, Git or the database fails, and how Design grows. - [Codebase](/architecture/codebase/): How the open-source repository is organized. --- ## Request paths > A proposal, a render and a check, step by step. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/request-paths/ For agents: Proposal: POST /proposals → validate against guide version (409 out_of_date if base moved) → apply on a temporary branch → generator + tokens build in a worker → render jobs (SQS) for every affected screen/piece, before and after, light/dark, 3 widths → contrast + check on after → ready; approve (person session) → guide version +1 → Git writer opens one PR (tokens.json, tokens.css, guide.md, regenerated components with three-way merge, screen files) → status merged when the PR merges (webhook). Render: job → headless Chromium loads the gallery build of the branch at the state → PNG to S3 → signed link. Check in CI: design check on runner; renders-based checks local Chromium or POST /checks. ### A proposal 1. `POST /proposals` arrives with the guide version it starts from. If the guide moved on since, the answer is `409 out_of_date`. 2. The engine applies the change on a temporary branch of your repository, builds the tokens and regenerates the affected pieces. 3. It queues render jobs for every screen and piece the change touches: before and after, light and dark, phone, laptop and large screen. 4. It runs the contrast rules and `design check` on the result, and marks the proposal ready. 5. A person approves. The guide version goes up by one, and the Git writer opens **one** pull request with everything the change moves, merging regenerated pieces with your edits. 6. When the pull request merges, Sypnia Git (or GitHub) tells the engine, and the proposal is `merged`. ### A render 1. A render job names a target (a screen state, a piece, a whole gallery page), the themes and the widths. 2. A worker builds the gallery of that branch once and opens it in headless Chromium at the requested state. 3. The picture goes to storage; the API returns a signed link valid for one hour. ### A check in your pipeline 1. `design check` runs on the pipeline's machine, reading your files. 2. Checks that need pictures (`contrast` in context, `touch-target`, `first-screen`) use Chromium on that machine, or call `POST /checks` to use the engine's renderer. 3. Findings print as text or JSON; errors make the step fail. --- ## Data model > The sypnia_design schema, and the files that live in your repository instead. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/data-model/ For agents: sypnia_design schema: projects (org, slug, repository, branch, guide_version, components_dir), guide_versions (project, version, commit_sha, approved_by, approved_at), proposals (id, project, kind, base_version, reason, changes jsonb, author, author_kind person|agent, status draft|rendering|ready|approved|rejected|merged, decided_by, pr_url), renders (target, state, theme, width, image_ref, expires_at), assets (kind logo|font|image, original_ref, sanitized_ref, licence, uploaded_by), exports (kind, ref), checks (ref, commit_sha, findings jsonb, errors, warnings), api_tokens (scopes, hash), audit (actor, action, at). Repository files are the source of truth for guide, tokens, icons, gallery, screens and components; the schema stores no copy of them beyond commit references. ### In your repository (the source of truth) | File | Holds | | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | `sypnia.toml`, table `[design]` | guide version, prefix, components folder, framework, waivers (the project's id is the file's top-level `project`) | | `design/guide.md`, `design/guide.pdf` | the guide in words, and its export | | `design/tokens.json`, `design/tokens.css` | the values, and the generated CSS | | `design/icons/` | `rules.yaml` and the icons | | `design/brand/` | logo versions, fonts and their licences, generated images | | `design/gallery.yaml` | pieces, combinations, patterns | | `design/screens/*.screen.yaml` | the screens of each case | | `src/design/` | your pieces | Every field is on [Design files](https://design.docs.sypnia.com/reference/files). ### In the engine (`sypnia_design`) | Table | Holds | Key columns | | ---------------- | ------------------------- | -------------------------------------------------------------------------------------------------------------- | | `projects` | the Design project | `org_id`, `slug`, `repository`, `branch`, `guide_version`, `components_dir` | | `guide_versions` | each approved version | `project_id`, `version`, `commit_sha`, `approved_by`, `approved_at` | | `proposals` | each proposal | `kind`, `base_version`, `reason`, `changes` (jsonb), `author`, `author_kind`, `status`, `decided_by`, `pr_url` | | `renders` | each picture | `target`, `state`, `theme`, `width`, `image_ref`, `expires_at` | | `assets` | uploaded files | `kind`, `original_ref`, `sanitized_ref`, `licence`, `uploaded_by` | | `exports` | PDFs and zips | `kind`, `ref`, `guide_version` | | `checks` | check results | `ref`, `commit_sha`, `findings` (jsonb), `errors`, `warnings` | | `api_tokens` | API tokens | `scopes[]`, `hash`, `last_used_at` | | `audit` | every change and approval | `actor`, `action`, `target`, `at` | Proposal statuses: `draft → rendering → ready → approved → merged`, or `rejected`. Renders expire after 30 days and are made again on demand. --- ## Reference implementation on AWS > Every AWS service Design uses in Sypnia Cloud, and how. Applies to: Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/reference-implementation-aws/ For agents: Design on AWS (us-east-1): Lambda (Node 22) for the API, MCP, proposals and the Git writer; Lambda container images with headless Chromium for renders, checks with pictures and PDF export (up to 10 GB memory, 15 min); SQS + DLQ for render/export jobs; RDS PostgreSQL (sypnia_design schema, shared Sypnia Cloud instance); S3 for originals, sanitized assets, renders (30-day lifecycle) and exports, KMS-encrypted; CloudFront for design.api.sypnia.com and signed render links; Sypnia AI for proposals; Sypnia Git webhooks for merges; Sypnia Data for identities; Telemetry traces per use case; CloudWatch alarms on queue age and DLQ. | Service | Used for | | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | | **Lambda** (Node 22) | the API, the MCP server, proposals and the Git writer | | **Lambda container images** with headless Chromium | renders, checks that need pictures, PDF export | | **SQS** with a dead-letter queue | render and export jobs | | **RDS for PostgreSQL** | the `sypnia_design` schema | | **S3** | uploaded originals, sanitized assets, renders (deleted after 30 days) and exports, encrypted with KMS | | **CloudFront** | `design.api.sypnia.com`, `mcp.design.sypnia.com` and signed links to pictures | | **KMS** | encryption of storage and of repository credentials | | **CloudWatch** | metrics and alarms on queue age and the dead-letter queue | Around it, Design uses other Sypnia products: **Sypnia AI** for proposals, **Sypnia Git** (or GitHub) for pull requests and merge webhooks, **Sypnia Data** for who is signed in, and **Telemetry** for traces of every request, grouped by use case. Everything runs in `us-east-1`, next to the rest of Sypnia Cloud. --- ## Failures and scaling > What happens when a render, the model, Git or the database fails, and how Design grows. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/failures-and-scaling/ For agents: Design failures: render fails → retried 3 times, then the state shows «picture unavailable» and the proposal can still be reviewed from files; Sypnia AI unavailable → proposals by hand or by the agent still work, AI help returns 503 ai_unavailable; Git unreachable → approval kept, pull request retried with backoff for 24 h, then the proposal shows the error; repository moved on (conflict) → Design rebases its branch, conflicts shown in the PR; database down → API 503, local tools unaffected; DLQ alarm. Scaling: stateless Lambdas, render jobs in parallel per proposal, gallery build cached per commit, renders reused by (commit, target, theme, width). ### Failures | What fails | What happens | | -------------------------- | ---------------------------------------------------------------------------------------------------------------- | | A render | retried three times; then that picture shows «unavailable» and the proposal can still be reviewed from its files | | Sypnia AI | proposals by hand or by your agent keep working; AI help answers `503 ai_unavailable` | | Git (Sypnia Git or GitHub) | the approval is kept; the pull request is retried with backoff for 24 hours, then the proposal shows the error | | Your branch moved on | Design rebases its branch; conflicts appear in the pull request for a person or the agent | | The database | the API answers `503`; the CLI, the check and the local gallery keep working | | A job keeps failing | it goes to the dead-letter queue and an alarm fires | Your app is never affected: Design changes reach it only through pull requests, and nothing in your app calls Design at run time. ### Scaling - The API and the workers hold no state and scale with Lambda. - A proposal's renders run in parallel. - The gallery build of a commit is made once and reused by every render of that commit. - A picture is reused for the same commit, target, theme and width. --- ## Codebase > How the open-source repository is organized. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/architecture/codebase/ For agents: sypnia-design repo: packages/design (@sypnia/design: cli, tokens, generator, check, gallery, files with JSON Schemas, client), packages/base (@sypnia/base on React Aria), engine/ (TypeScript server: api, mcp, proposals, git-writer, renderer, exporter, sanitizer), skills/ (sypnia-design-* SKILL.md, copied to sypnia-skills), migrations/, deploy/ (compose with Postgres and MinIO, AWS template), spec/openapi.yaml, spec/schemas/*.json, docs/ARCHITECTURE.md; tests: unit, rendered snapshots, accessibility tests of @sypnia/base with keyboard and screen-reader trees. ```text sypnia-design/ ├─ packages/ │ ├─ design/ @sypnia/design: cli, tokens, generator, check, gallery, files, client │ └─ base/ @sypnia/base: the unstyled accessible pieces ├─ engine/ the Design engine (TypeScript) │ ├─ api/ HTTP API │ ├─ mcp/ the MCP server │ ├─ proposals/ proposals, versions, approvals │ ├─ git-writer/ branches and pull requests in Sypnia Git or GitHub │ ├─ renderer/ pictures with headless Chromium │ ├─ exporter/ the PDF and the brand kit │ └─ sanitizer/ SVG, font and image checks ├─ skills/ sypnia-design-* (also published in sypnia-skills) ├─ migrations/ sypnia_design schema ├─ deploy/ docker compose with Postgres and MinIO, AWS template ├─ spec/openapi.yaml ├─ spec/schemas/ JSON Schemas of the [design] table, gallery.yaml, screen files, rules.yaml └─ docs/ARCHITECTURE.md ``` Tests include rendered pictures compared between versions, and keyboard and screen-reader tests of every `@sypnia/base` piece. The repository lives in Sypnia Git, with a mirror on GitHub. --- ## Self-hosting > Use Design with no server at all, or run the engine with Docker or on AWS. Applies to: the Sypnia engine (open source, self-hosted). Source: https://design.docs.sypnia.com/self-hosting/ For agents: Self-hosting Design: level 1 — no server: @sypnia/design CLI in the repo does init, tokens, generation, gallery, check, local renders and PDF with local Chromium; proposals are branches + pull requests, AI help from your agent with the skills. Level 2 — the engine (Docker image ghcr.io/sespinosav/sypnia-design, port 7700, Postgres + S3-compatible storage, your OpenAI-compatible model endpoint, Git credentials) adds the API, MCP, shared proposals with renders and a team gallery. The console stays Sypnia Cloud. You can use Design at two levels without Sypnia Cloud: | Level | What you run | What you get | | -------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **No server** | only `@sypnia/design` in your repository | the guide, tokens, generated pieces, the gallery on your machine, `design check`, renders and the PDF with a local browser; proposals as pull requests; AI help from your own agent with the skills | | **The engine** | the Design engine, with Postgres and storage | the API, the MCP server, proposals with before-and-after pictures, a gallery for your team, AI help with your own model endpoint | The console (`design.app.sypnia.com`) is part of Sypnia Cloud only. - [Docker](/self-hosting/docker/): The engine's image and the compose file with Postgres and MinIO. - [Configuration](/self-hosting/configuration/): Every environment variable of the engine. - [Upgrades and backups](/self-hosting/upgrades/): Upgrading the engine and the tools, and what to back up. --- ## Docker > The engine's image and the compose file with Postgres and MinIO. Applies to: the Sypnia engine (open source, self-hosted). Source: https://design.docs.sypnia.com/self-hosting/docker/ For agents: Design Docker: docker run -p 7700:7700 with DATABASE_URL, STORAGE_URL, PUBLIC_URL, GIT_PROVIDER + GIT_TOKEN, optional SYPNIA_DESIGN_AI_URL/KEY; image includes headless Chromium (about 1 GB memory per concurrent render; RENDER_CONCURRENCY). Compose file adds Postgres 16 and MinIO. Point the CLI with design use http://localhost:7700. ```bash docker run -p 7700:7700 \ -e DATABASE_URL=postgres://… -e STORAGE_URL=s3://design?endpoint=http://minio:9000 \ -e PUBLIC_URL=https://design.example.com \ -e GIT_PROVIDER=github -e GIT_TOKEN=… \ ghcr.io/sespinosav/sypnia-design:latest ``` The image includes headless Chromium for renders and the PDF. Give it about 1 GB of memory per render running at the same time (`RENDER_CONCURRENCY`, default 2). The compose file in the repository adds Postgres 16 and MinIO: ```bash git clone https://github.com/sespinosav/sypnia-design && cd sypnia-design/deploy docker compose up -d npx @sypnia/design use http://localhost:7700 ``` **You should see:**`design whoami` answers with your engine's address. Without `SYPNIA_DESIGN_AI_URL`, AI help is off and proposals come from people or from agents using the skills. --- ## Configuration > Every environment variable of the engine. Applies to: the Sypnia engine (open source, self-hosted). Source: https://design.docs.sypnia.com/self-hosting/configuration/ For agents: Design engine env: DATABASE_URL, STORAGE_URL (S3-compatible; local folder default), PUBLIC_URL, PORT (7700), GIT_PROVIDER (sypnia|github|gitlab), GIT_URL, GIT_TOKEN, SYPNIA_DESIGN_AI_URL + SYPNIA_DESIGN_AI_KEY (OpenAI-compatible; empty = no AI help), RENDER_CONCURRENCY (2), RENDER_RETENTION_DAYS (30), UPLOAD_MAX_MB (10), JWKS_URL (accept JWTs from your issuer, e.g. Sypnia Data), TELEMETRY_ENDPOINT (OTLP). | Variable | Default | Meaning | | ---------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------ | | `DATABASE_URL` | — | Postgres for `sypnia_design` | | `STORAGE_URL` | local folder | S3-compatible storage for assets, renders and exports | | `PUBLIC_URL` | — | the engine's address, for links in pull requests | | `PORT` | `7700` | the HTTP port (API and `/mcp`) | | `GIT_PROVIDER` | `sypnia` | `sypnia`, `github` or `gitlab` | | `GIT_URL`, `GIT_TOKEN` | — | where repositories live and a token allowed to push branches and open pull requests | | `SYPNIA_DESIGN_AI_URL`, `SYPNIA_DESIGN_AI_KEY` | — | an OpenAI-compatible endpoint for AI help (Sypnia AI or your own); empty turns AI help off | | `RENDER_CONCURRENCY` | `2` | renders at the same time | | `RENDER_RETENTION_DAYS` | `30` | how long pictures are kept | | `UPLOAD_MAX_MB` | `10` | the largest uploaded file | | `JWKS_URL` | — | accept sign-ins from your issuer (for example your own Sypnia Data) | | `TELEMETRY_ENDPOINT` | — | send traces to Telemetry or any OTLP collector | --- ## Upgrades and backups > Upgrading the engine and the tools, and what to back up. Applies to: the Sypnia engine (open source, self-hosted). Source: https://design.docs.sypnia.com/self-hosting/upgrades/ For agents: Design upgrades: engine runs migrations on start; render jobs drain between versions. @sypnia/design and @sypnia/base follow semver; format version of the design/ files and of sypnia.toml — newer tools read older formats, design upgrade rewrites files to the new format in a pull request; @sypnia/base minor versions never change behaviour people rely on without a changelog entry. Back up: the repository holds the design (guide, tokens, icons, gallery, screens, pieces); the engine's database holds proposals, approvals and audit; storage holds uploaded originals. ### The engine Upgrades run migrations on start. Render jobs in progress finish on the old version; new ones start on the new one. ### The tools `@sypnia/design` and `@sypnia/base` follow semantic versions. Files carry a format version (`format: 1` in each file of `design/`, and `format = 1` in `sypnia.toml`): newer tools always read older formats, and `design upgrade` rewrites your files to the newest format in a pull request. A new `@sypnia/base` minor version never changes behaviour people rely on (how the keyboard moves, what a screen reader hears) without saying so in the changelog. ### What to back up | Where | What | How important | | --------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | | Your repository | the whole design: guide, tokens, icons, gallery, screens, pieces | the most important, and already in Git | | The engine's Postgres | proposals, who approved what, the audit log | keep it | | Storage | uploaded originals (logos, fonts) | keep the originals; renders and exports are made again on demand | --- ## Security > Uploads, approvals, agents, licences, the threat model and the checklist. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/security/ For agents: Design security: uploads sanitized (SVG scripts/external refs removed, fonts parsed and limited to WOFF2/TTF/OTF, images re-encoded); only a person approves proposals and screens (tokens and MCP cannot); every change reaches the app as a reviewed pull request; galleries and renders private to the organization, share links signed and expiring; uploaded brand files are data, never instructions to the agent; font licences recorded; nothing in the customer's app calls Design at run time. Design changes how your app looks, so the rules are about who can change it, what files can enter it, and what an agent may do on its own. - **Only people approve.** Tokens and MCP can draft and propose; approving a proposal or a screen needs a person's session. - **Changes arrive as pull requests.** Nothing reaches your app without going through your repository's review. - **Uploads are cleaned.** SVGs lose scripts and external links, fonts are parsed and limited to safe formats, images are re-encoded. - **Uploaded files are data.** Text inside a logo, a PDF of an old brand book or an image is never followed as an instruction. - **Private by default.** Galleries and pictures are visible to your organization only; share links are signed and expire. - **Nothing at run time.** Your app never calls Design while people use it, so Design cannot slow it down or take it offline. * [Threat model](/security/threat-model/): What could go wrong in Sypnia Design, and how each threat is answered. * [Checklist](/security/checklist/): What to check before your app's design goes to real people. --- ## Threat model > What could go wrong in Sypnia Design, and how each threat is answered. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/security/threat-model/ For agents: Design threats: malicious SVG (script, foreignObject, external href) → sanitized, original quarantined, unsafe_svg; malformed font → parsed, WOFF2/TTF/OTF only, size limit; prompt injection in uploaded brand files or screenshots → treated as data, proposals still need a person; agent approving its own change → impossible (no approve tool, person session required, proposer ≠ approver); leaked token → scopes, no approval, revoke; generated code carrying something unexpected → plain source in a PR, check runs, reviewed; unreleased brand leaking → private gallery, signed expiring links, audit; copying another brand or unlicensed fonts → skills refuse, licence recorded, font_licence_missing; regenerated pieces overwriting your edits → three-way merge in a PR. | Threat | Answer | | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | An uploaded SVG carries a script or loads something from outside | SVGs are sanitized: scripts, event attributes, `foreignObject` and external links are removed; the original is kept aside and never served; a file that cannot be cleaned is refused with `unsafe_svg` | | A malformed font file attacks the renderer or the browser | only WOFF2, TTF and OTF, parsed and size-limited before use | | Text inside an uploaded file gives the agent instructions | uploaded files are data; nothing in them is followed, and every proposal still needs a person | | An agent approves its own change | there is no approve tool in MCP, tokens cannot approve, and the author of a proposal can never be its approver | | A leaked token changes the guide | tokens have scopes and cannot approve; every action is in the audit log; revoke in one command | | Generated code brings something unexpected into the app | pieces are plain source in a pull request, checked and reviewed like any other code | | An unreleased brand leaks | galleries and pictures are private to the organization; share links are signed and expire; every view of a share link is logged | | A design copies another company's brand, or uses an unlicensed font | the skills refuse to imitate brands; fonts need a recorded licence (`font_licence_missing`) | | Regeneration overwrites your edits | regenerated pieces are merged with your edits in a pull request, never written over them | --- ## Checklist > What to check before your app's design goes to real people. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/security/checklist/ For agents: Design checklist: design check runs on every pull request and blocks on errors; screens of every case with where approved; every failure state designed with its message; contrast, focus, touch targets pass on renders; fonts have recorded licences; logo and assets are yours or licensed; tokens used by CI are read-only; approvers are the right people; waivers have reasons and end dates; share links for outsiders expire. - [ ] `design check` runs on every pull request and blocks the merge on errors. - [ ] Every case with a `where` has an approved screen file. - [ ] Every failure of those cases has a designed state, with its message from the case. - [ ] Contrast, focus and touch targets pass on the phone and desktop renders. - [ ] Every font in `design/brand/fonts/` has its licence recorded. - [ ] Your logo and images are yours, or licensed for this use. - [ ] The token your pipeline uses has only the `read` scope. - [ ] The people who approve guide changes are the ones who answer for the brand. - [ ] Every waiver has a reason and an end date. - [ ] Share links for people outside the organization expire. --- ## Sypnia Cloud > Your account, the console, credits, limits and plans. Applies to: Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/cloud/ For agents: Design in Sypnia Cloud: belongs to a project of the organization (the same project as the other products); Sypnia account with roll-in on first use; console design.app.sypnia.com and the Design panel in App; approvals by members with the right role (owner and admin by default; configurable «brand approvers»); AI help and hosted renders/exports paid from prepaid credits. In Sypnia Cloud, Design belongs to a **project** of your organization, the same project your other Sypnia products use. You sign in with your Sypnia account; the first time you open Design, you are added to it. ### Who can do what | Role | Can | | -------------------- | --------------------------------------------------------- | | **owner**, **admin** | everything, including approving guide changes and screens | | **member** | propose, draft screens, look at the gallery | | **billing** | credits and plans | An organization can name its own **brand approvers**: only they approve changes to the guide, while any member can still propose. - [Credits and limits](/cloud/credits-and-limits/): What Design measures, how it is paid with credits, and its limits. - [Plans](/cloud/plans/): How Design is sold: on its own, in the global Sypnia subscription, and with extra capacity. --- ## Credits and limits > What Design measures, how it is paid with credits, and its limits. Applies to: Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/cloud/credits-and-limits/ For agents: Design metered items: AI help (proposals: palettes, type, icons, screens) through Sypnia AI, in credits by use; renders (pictures); exports (PDF, brand kit); asset storage (GB). Plans include amounts; overage from prepaid credits item by item at prices published with the plans; extra capacity per item; no charges afterwards. The console shows usage per day and what each proposal cost. Free with no metering: design check, the local tools, the gallery page. Limits per plan: projects with a guide, members who approve, renders per month, storage; values published with the plans; technical limits on Limits. ### What is measured | Item | Unit | | ----------- | ------------------------------------------------------------------------------------ | | **AI help** | proposals of palettes, type, icons and screens, through Sypnia AI, in credits by use | | **Renders** | pictures of screens, pieces and states | | **Exports** | PDFs and brand kits | | **Storage** | GB of uploaded originals and kept pictures | Running `design check`, the local tools and looking at your gallery are not measured. The console shows usage per day, what each proposal cost, and what the month will cost at the current pace. ### How it is paid Every plan includes an amount of each item. What goes beyond it is charged against your **prepaid credits**, item by item, at prices published with the plans. You can also buy **extra capacity** for one item for the month. Nothing is billed afterwards. ### When credits run out 1. When **80 %** of your credits are spent, counted from the balance after your last top-up, the owners and billing members get an e-mail and a notice in the app; again at **100 %**. 2. From then on there are **7 days of grace**: AI help, renders and exports keep working as on your plan, and nothing is deleted. 3. After the 7 days, AI help and new renders past the plan's amounts wait until credits are added. Your guide, your gallery, your files and `design check` keep working, and nothing is deleted. ### Limits Each plan sets how many projects have a guide, how many renders a month are included, and the storage. The values are published with the plans. Technical limits, the same for everyone, are on [Limits](https://design.docs.sypnia.com/reference/limits). --- ## Plans > How Design is sold: on its own, in the global Sypnia subscription, and with extra capacity. Applies to: Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/cloud/plans/ For agents: Design plans: Design on its own (free plan and paid plans), inside the global Sypnia subscription tiers, extra capacity per item; all prepaid (subscription in advance or credits topped up with PayPal); larger of product plan vs tier per item; prices published with the plans. ### Three ways to pay for Design 1. **Design on its own.** A free plan and paid plans for Design alone. 2. **The Sypnia subscription.** One monthly subscription with every Sypnia product, in tiers that each include an amount of Design: AI help, renders, exports and storage. 3. **Extra capacity.** On any plan, buy more of one item for the month without changing plan. Everything is **prepaid**: a monthly subscription paid in advance, or credits you top up with PayPal. Credits expire 12 months after you buy them, the smallest top-up is USD 5, and they are not refunded unless the mistake is ours, and then only in credits ([Credits](https://app.docs.sypnia.com/account/credits)). When a product plan and a global tier both include Design, you get the larger amount of each item. Prices are published with the plans. The open-source tools are free and stay free: the `design` command, `@sypnia/base`, the check, the local gallery and the skills. --- ## Reference > Glossary, Design files, limits, design decisions, the changelog and common questions. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/ - [Glossary](/reference/glossary/): Every word these docs use with a fixed meaning. - [Design files](/reference/files/): Every field of the \[design] table of sypnia.toml, tokens.json, gallery.yaml, the screen files and the icon rules. - [Limits](/reference/limits/): The technical limits of Design, the same in the engine and in Sypnia Cloud. - [Design decisions](/reference/decisions/): The choices behind Sypnia Design, and why each one was made. - [Common questions](/reference/faq/): Short answers to what people ask first about Sypnia Design. - [Changelog](/reference/changelog/): What changed in Sypnia Design, newest first. --- ## Glossary > Every word these docs use with a fixed meaning. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/glossary/ For agents: Sypnia Design vocabulary: design guide, guide version, token, colour role, theme, type role, shape language, signature, construction rules, piece, the base, your components, gallery, combination, pattern, screen file, place (where), state, proposal, brand approver, finding, waiver, render, export, brand kit. One name per thing, in these docs, in the console and in the API. **Brand approver**: A member an organization names to approve changes to the guide. **Brand kit**: The logo versions, icons and the guide's PDF in one zip, for a designer or a printer. **Colour role**: What a colour is for (surface, ink, accent, danger…), with one value in the light theme and one in the dark. **Combination**: A group of pieces used together, with a rule for how they sit. **Construction rules**: The rules every icon set follows (grid, padding, one stroke, one cap style, arcs, optical balance) so it looks drawn by one hand. **Design guide**: Your project's brand decided once, in words (`design/guide.md`) and values (`design/tokens.json`). **Finding**: Something `design check` reports as outside the guide, with a code, a file and a line. **Gallery**: `design/gallery.yaml` and its page: every piece, what it is for and not for, how pieces combine, and the screen patterns. **Guide version**: A number that goes up with every approved change to the guide; screens and pieces record the version they were made with. **Pattern**: The screen shape the guide uses for a kind of use case, with the states it must design. **Piece**: A part of the interface (a button, a field, a product card), made of the base's behaviour and your look. **Place**: A node of the app's navigation tree in Sypnia Cases (a screen, tab, modal or menu); a case's `where` names it. **Proposal**: A change to the guide, shown before and after, waiting for a person to approve it. **Render**: A picture of a screen, piece or state, in a theme and at a width. **Screen file**: `design/screens/.screen.yaml`: the design of one case's screens, every state included. **Shape language**: The guide's choices of corners, fills or outlines, shadows or borders and line weight, which make pieces feel like the brand. **Signature**: The one trait of a brand that every one of its icons carries. **State**: One thing a screen can show, such as loading, empty, an outcome or a failure. **The base**: `@sypnia/base`: the unstyled accessible behaviour every piece is built on: keyboard, focus, screen readers, layers, phone behaviour. **Theme**: The full set of colour values for light or for dark, each designed on purpose. **Token**: A named value of the guide, such as `color.accent` or `space.4`, used by code instead of a raw value. **Type role**: A kind of text (display, title, body, label…) with its family, size, line height and weight. **Waiver**: A finding allowed for a while, with a reason and an end date. **Your components**: Your pieces with your look, generated into `src/design/` of your repository and owned by you. --- ## Design files > Every field of the [design] table of sypnia.toml, tokens.json, gallery.yaml, the screen files and the icon rules. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/files/ For agents: Settings: the [design] table of sypnia.toml (the project's one configuration file; top-level format = 1 and project): guide (version), prefix (CSS variable prefix, e.g. espiga), components {dir: src/design, framework: next|vite|astro}, languages [es, en], themes {light, dark, switch: bool}, checks {renders: local|cloud|off, first_screen_sizes, [[design.checks.waive]] {code, path, reason, until}}. Content files in design/, format 1: tokens.json: W3C Design Tokens ($type, $value, $description; dark values in $extensions.sypnia.dark); required groups color (roles), font (families, role.*), space, radius, border, shadow, motion (duration, easing), size (touch), layout (breakpoints, content). gallery.yaml: pieces[] {id, component, for, not_for, variants, states, combines_with, example}, combinations[] {id, pieces, for, rule}, patterns[] {id, for, regions, pieces, phone, desktop, states_required}. screens/.screen.yaml: format, case, where, pattern, guide, status draft|approved|built, approved_by, approved_at, first_screen, regions, states, phone, desktop. icons/rules.yaml: grid 24, padding 2, stroke, cap round|square, join, radii[], signature {description, picture}, sizes [16,20,24]. JSON Schemas in spec/schemas/ of the engine repo; unknown fields kept and warned, x- prefix for your own. The files in `design/` carry `format: 1` (except `tokens.json`, which follows the W3C Design Tokens format). Unknown fields are kept and reported as warnings; your own fields start with `x-`. The JSON Schemas are in the engine's repository, in `spec/schemas/`. ### The `[design]` table of `sypnia.toml` Design's settings live in `sypnia.toml`, the one configuration file at the root of your repository that every Sypnia product shares. Design reads only its own `[design]` table, and the project's id from the top-level `project`: `sypnia.toml (part)` ```toml format = 1 project = "la-espiga" [design] guide = 4 prefix = "espiga" components = { dir = "src/design", framework = "next" } languages = ["es", "en"] themes = { light = true, dark = true, switch = true } ``` | Field | Type | What it is | | ------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- | | `guide` | integer | the current guide version | | `prefix` | string | the CSS variable prefix (`espiga` → `--espiga-color-accent`) | | `components` | table | `dir` (default `src/design`) and `framework` (`next`, `vite`, `astro`) | | `languages` | list | the app's languages, first is the main one | | `themes` | table | `light`, `dark`, and `switch` (whether the app offers a switch) | | `checks` | table | `renders` (`local`, `cloud`, `off`), `first_screen_sizes`, and `[[design.checks.waive]]` entries (each `code`, `path`, `reason`, `until`) | ### `design/tokens.json` W3C Design Tokens: each token has `$type` and `$value`, optionally `$description`; the dark value is in `$extensions["sypnia.dark"]`. Required groups: | Group | Holds | | ------------------------------------- | ------------------------------------------------------------------------------------- | | `color` | the [colour roles](https://design.docs.sypnia.com/guide/color-and-themes) | | `font` | families and `role.*` ([type roles](https://design.docs.sypnia.com/guide/typography)) | | `space`, `radius`, `border`, `shadow` | [space and shape](https://design.docs.sypnia.com/guide/space-and-shape) | | `motion` | `duration.*`, `easing.*` ([motion](https://design.docs.sypnia.com/guide/motion)) | | `size` | `touch` and other fixed sizes | | `layout` | breakpoints and content widths | ### `design/gallery.yaml` | List | Fields | | -------------- | ------------------------------------------------------------------------------------- | | `pieces` | `id`, `component`, `for`, `not_for`, `variants`, `states`, `combines_with`, `example` | | `combinations` | `id`, `pieces`, `for`, `rule` | | `patterns` | `id`, `for`, `regions`, `pieces`, `phone`, `desktop`, `states_required` | ### `design/screens/.screen.yaml` | Field | What it is | | -------------------------------------- | ------------------------------------------------------------------------ | | `format`, `case`, `where` | the format, the case id, the place id in the navigation tree | | `pattern`, `guide` | the pattern followed and the guide version used | | `status`, `approved_by`, `approved_at` | `draft`, `approved` or `built`, and the approval | | `first_screen` | the main content fits without scrolling | | `regions` | region → list of `{ piece, variant?, text?, repeat? }` | | `states` | `loading`, `empty`, `outcome.`, `failure.`, `offline` | | `phone`, `desktop` | how the layout changes | ### `design/icons/rules.yaml` | Field | Example | | ----------------------- | ------------------------------------------------ | | `grid`, `padding` | `24`, `2` | | `stroke`, `cap`, `join` | `1.75`, `round`, `round` | | `radii` | `[2.5, 9]` (the arcs allowed) | | `sizes` | `[16, 20, 24]` | | `signature` | `description` and `picture` of the brand's trait | --- ## Limits > The technical limits of Design, the same in the engine and in Sypnia Cloud. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/limits/ For agents: Design limits: upload 10 MB per file (UPLOAD_MAX_MB in the engine); SVG up to 1 MB after cleaning; fonts WOFF2/TTF/OTF up to 5 MB each, 2 families + 1 mono per guide, 4 weights per family; logo formats SVG, PNG; icons 500 per project; pieces 300 per gallery; patterns 40; screen file 256 KB; render widths 320–2560 px; renders kept 30 days; share links 7 days by default, at most 30; PDF up to 80 pages; proposal renders up to 200 pictures; API 60 requests per minute per token for writes, 600 for reads (Cloud). Plan amounts (renders, AI help, storage) are published with the plans. | Thing | Limit | | ------------------------ | -------------------------------------------- | | An uploaded file | 10 MB (`UPLOAD_MAX_MB` in the engine) | | An SVG after cleaning | 1 MB | | Logo formats | SVG, PNG | | Font formats | WOFF2, TTF, OTF; 5 MB per file | | Families in a guide | two, plus one monospaced | | Weights per family | four | | Icons per project | 500 | | Pieces in a gallery | 300 | | Patterns | 40 | | A screen file | 256 KB | | Render widths | 320 to 2560 px | | Pictures kept | 30 days, then made again on demand | | Share links | 7 days by default, 30 at most | | The PDF | 80 pages | | Pictures in one proposal | 200 | | API rate **\[Cloud]** | 600 reads and 60 writes per minute per token | Amounts that depend on your plan (AI help, renders, storage) are on [Credits and limits](https://design.docs.sypnia.com/cloud/credits-and-limits). --- ## Design decisions > The choices behind Sypnia Design, and why each one was made. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/decisions/ For agents: Sypnia Design decisions: 1 Design comes before screens; 2 customer apps never start from @sypnia/ui; 3 three layers: shared unstyled @sypnia/base (React on React Aria) + generated components in the customer's repo + private gallery; 4 the repository is the source of truth, Cloud writes by pull request; 5 W3C Design Tokens for values, Markdown for reasons; 6 roles not colours, dark designed not inverted, WCAG 2.2 AA; 7 icons drawn per project with shared construction rules + brand signature, never stock; 8 only licensed fonts, self-hosted; 9 screens per case with every ending and failure, approved before built; 10 design check blocks merges; waivers expire; 11 only people approve; 12 React first, tokens.css anywhere; 13 licences MIT for tools/base/skills, AGPL-3.0 for the engine; 14 no colour matching to printing ink catalogues. | # | Decision | What Sypnia Design does, and why | | -- | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 1 | **Design comes first** | Screens are designed before they are built, and redesigned before their code changes. Fixing a look in code costs more than fixing it in a picture. | | 2 | **Not from @sypnia/ui** | Customer apps never start from Sypnia's own library, so no app made with Sypnia looks like Sypnia ([Design and @sypnia/ui](https://design.docs.sypnia.com/components/design-and-sypnia-ui)). | | 3 | **Three layers** | A shared unstyled base for behaviour, each customer's own pieces for the look, and each project's gallery. Behaviour should be the same everywhere; looks should not. | | 4 | **The repository holds the truth** | Your design lives with your code and changes in the same pull requests; Sypnia Cloud keeps no second copy that could drift. | | 5 | **Values and reasons apart** | Values in the W3C Design Tokens format, which other tools read; reasons in Markdown, which people read. The check keeps them in agreement. | | 6 | **Roles, designed themes, AA contrast** | Colours are named by what they are for; the dark theme is designed, not inverted; every pair meets WCAG 2.2 AA. | | 7 | **Icons drawn for each project** | Shared construction rules make a set look drawn by one hand; the brand's signature makes it its own. Stock icon sets make every app look alike. | | 8 | **Licensed fonts, served by the app** | Only fonts licensed for the web, served from your domain, so no third party sees your visitors. | | 9 | **Every ending, every failure** | A screen is not designed until its outcomes and its failures are, with the messages from the case. | | 10 | **The check blocks merges** | A design rule that does not stop a merge is a suggestion. Waivers exist, with a reason and an end date. | | 11 | **Only people approve** | Agents propose; a person approves. The proposer is never the approver. | | 12 | **React first, tokens everywhere** | Generated pieces are React; `tokens.css` works in any framework. | | 13 | **Licences** | MIT for `@sypnia/design`, `@sypnia/base` and the skills; AGPL-3.0 for the engine, like Sypnia's other engines. | | 14 | **Print values, not ink matching** | The PDF gives HEX, RGB and approximate CMYK; matching to printing ink catalogues is left to your printer. | --- ## Common questions > Short answers to what people ask first about Sypnia Design. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/faq/ For agents: Design FAQ: no designer needed (Design proposes, you choose); works with an existing brand (upload logo, colours, fonts, brand book); not a template catalogue; does not use @sypnia/ui; you own the components; works without Sypnia Cloud; Figma not required (files and pictures; export the guide as PDF; tokens in the W3C format other tools read); React first, tokens anywhere; existing app: design init + check with waivers to move step by step; my agent can use it (skills, MCP). #### Do I need a designer? No. Design proposes and you choose, in plain words and pictures. If you have a designer, they work on the same guide and approve its changes. #### I already have a brand. Can I keep it? Yes. Upload your logo, colours, fonts and any brand book you have; Design writes your guide from them and asks only about what is missing. #### Is this a catalogue of templates? No. There is no theme to pick. Your pieces are generated from your guide and tailored to your brand, so no two apps look alike. #### Will my app look like Sypnia? No. Sypnia's look lives in [@sypnia/ui](https://ui.sypnia.com), and Design does not start from it. Only the invisible behaviour underneath is shared. #### Who owns the components? You. They are plain source code in your repository; change them as you like. #### Do I need Sypnia Cloud? No. The `design` command, the base, the check, the gallery and the skills are open source and work in your repository. Sypnia Cloud adds the console, the online gallery, pictures of every proposal and AI help. #### Do I need Figma? No. Design works with files and pictures. Tokens use the W3C Design Tokens format, which design tools can import, and the guide exports as a PDF. #### Does it work with Vue or Svelte? Generated pieces are React. `design/tokens.css` works in any framework, and the guide, icons and check apply to any code. #### I have an app already. Where do I start? Run `design init`, then `design check`. Waivers with end dates let you move screen by screen. #### Can my agent use it? Yes: install the [Design skills](https://design.docs.sypnia.com/skills) and, if you like, the MCP server. The agent designs with your guide and proposes what is missing. --- ## Changelog > What changed in Sypnia Design, newest first. Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service). Source: https://design.docs.sypnia.com/reference/changelog/ ### 2026-11-18 Sypnia Design and its documentation: the design guide (colour and themes, typography, space and shape, motion, voice, icons, logo and assets), the accessible base `@sypnia/base`, your own components, the gallery and screen patterns, screens per case, `design check`, changing the guide, the Design skills, the SDK, CLI and MCP, the API, the architecture on AWS, self-hosting, security and Sypnia Cloud.