# Documentación de Sypnia Design > Sypnia Design es donde vive el sistema de diseño propio de tu proyecto: su guía, sus colores, letras e iconos, sus piezas y su galería, y las pantallas de cada caso de uso. Tu app se parece a ti, no a Sypnia. El agente diseña con tu guía, nunca inventa, y cada pantalla se diseña antes de construirse. Sypnia viene de dos formas, y cada página dice de cuál habla: - **Herramientas de Design** (código abierto, en tu repositorio): Ingesta, almacenamiento, agregación, agrupación de problemas, sesiones, datos de grabación y comprobaciones de disponibilidad. Lo lees con: La API HTTP, el servidor MCP, la CLI y la Consola: una página incluida con la lista de problemas y el visor de grabaciones de sesión. - **Sypnia Cloud** (la consola, las propuestas y la ayuda de ia, pagadas con créditos): El mismo motor, operado por nosotros. Lo lees con: La app completa: reproductor de grabaciones, rendimiento, disponibilidad, resumen diario, búsqueda y equipos. Cada página también es Markdown plano: agrega `.md` a su dirección (`https://design.docs.sypnia.com/es/start/open-source-and-cloud.md`). Todas las páginas en un archivo: https://design.docs.sypnia.com/es/llms-full.txt ## Empieza aquí Qué es Sypnia Design, cómo funciona, qué es de código abierto y qué es Sypnia Cloud, y los inicios rápidos. - [Empieza aquí: resumen](https://design.docs.sypnia.com/es/start.md): 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. [Motor, Nube] - [Qué es Sypnia Design](https://design.docs.sypnia.com/es/start/what-it-is.md): 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. [Motor, Nube] - [Cómo funciona](https://design.docs.sypnia.com/es/start/how-it-works.md): 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. [Motor, Nube] - [Código abierto y Sypnia Cloud](https://design.docs.sypnia.com/es/start/open-source-and-cloud.md): 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. [Motor, Nube] - [Inicio rápido: Sypnia Cloud](https://design.docs.sypnia.com/es/start/quickstart-cloud.md): 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. [Nube] - [Inicio rápido: tu repositorio](https://design.docs.sypnia.com/es/start/quickstart-repo.md): 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. [Motor] - [Cómo lo usa Sypnia](https://design.docs.sypnia.com/es/start/how-sypnia-uses-it.md): 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. [Motor, Nube] ## La guía de diseño Tu marca en palabras y valores: color, letras, espacio, forma, movimiento, voz, iconos y logo. - [La guía de diseño: resumen](https://design.docs.sypnia.com/es/guide.md): 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). [Motor, Nube] - [Qué contiene la guía](https://design.docs.sypnia.com/es/guide/the-design-guide.md): 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. [Motor, Nube] - [Color y temas](https://design.docs.sypnia.com/es/guide/color-and-themes.md): 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. [Motor, Nube] - [Tipografía](https://design.docs.sypnia.com/es/guide/typography.md): 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. [Motor, Nube] - [Espacio y forma](https://design.docs.sypnia.com/es/guide/space-and-shape.md): 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. [Motor, Nube] - [Movimiento](https://design.docs.sypnia.com/es/guide/motion.md): 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. [Motor, Nube] - [Voz](https://design.docs.sypnia.com/es/guide/voice.md): 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. [Motor, Nube] - [Iconos](https://design.docs.sypnia.com/es/guide/icons.md): 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. [Motor, Nube] - [Logo y recursos](https://design.docs.sypnia.com/es/guide/logo-and-assets.md): 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. [Motor, Nube] ## Piezas y galería La base accesible debajo, tus propias piezas con estilo encima y la galería que dice para qué sirve cada una. - [Piezas y galería: resumen](https://design.docs.sypnia.com/es/components.md): 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. [Motor, Nube] - [La base accesible](https://design.docs.sypnia.com/es/components/the-base.md): @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. [Motor, Nube] - [Tus componentes](https://design.docs.sypnia.com/es/components/your-components.md): 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. [Motor, Nube] - [Tu galería](https://design.docs.sypnia.com/es/components/the-gallery.md): 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. [Motor, Nube] - [Patrones de pantalla](https://design.docs.sypnia.com/es/components/patterns.md): 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. [Motor, Nube] - [Design y @sypnia/ui](https://design.docs.sypnia.com/es/components/design-and-sypnia-ui.md): @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. [Motor, Nube] ## Pantallas Las pantallas de cada caso de uso, diseñadas antes de construirse, y la revisión que las mantiene dentro de la guía. - [Pantallas: resumen](https://design.docs.sypnia.com/es/screens.md): 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). [Motor, Nube] - [Pantallas por caso](https://design.docs.sypnia.com/es/screens/screens-per-case.md): 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. [Motor, Nube] - [La revisión](https://design.docs.sypnia.com/es/screens/the-check.md): 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. [Motor, Nube] - [Cambiar la guía](https://design.docs.sypnia.com/es/screens/changing-the-guide.md): 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. [Motor, Nube] ## Skills Las skills de Design que hacen que un agente diseñe con tu guía y nunca invente. - [Skills: resumen](https://design.docs.sypnia.com/es/skills.md): 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. [Motor, Nube] - [Las skills de Design](https://design.docs.sypnia.com/es/skills/the-design-skills.md): 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. [Motor, Nube] - [Trabajar con tu agente](https://design.docs.sypnia.com/es/skills/working-with-your-agent.md): 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. [Motor, Nube] ## SDK, CLI y MCP El paquete @sypnia/design, el comando design y las herramientas MCP para agentes. - [SDK, CLI y MCP: resumen](https://design.docs.sypnia.com/es/tools.md): 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). [Motor, Nube] - [El paquete @sypnia/design](https://design.docs.sypnia.com/es/tools/sdk.md): @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+. [Motor, Nube] - [La CLI](https://design.docs.sypnia.com/es/tools/cli.md): 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. [Motor, Nube] - [MCP para agentes](https://design.docs.sypnia.com/es/tools/mcp.md): 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. [Motor, Nube] ## Referencia de la API La API de Design: direcciones, autenticación, errores y límites. - [Referencia de la API: resumen](https://design.docs.sypnia.com/es/api.md): 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. [Motor, Nube] - [Endpoints](https://design.docs.sypnia.com/es/api/endpoints.md): 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). [Motor, Nube] ## Arquitectura Cómo está hecho Sypnia Design: sus partes, dónde corren y por qué tu repositorio guarda la verdad. - [Arquitectura: resumen](https://design.docs.sypnia.com/es/architecture.md): 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. [Motor, Nube] - [Recorridos de una solicitud](https://design.docs.sypnia.com/es/architecture/request-paths.md): 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. [Motor, Nube] - [Modelo de datos](https://design.docs.sypnia.com/es/architecture/data-model.md): 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. [Motor, Nube] - [Implementación de referencia en AWS](https://design.docs.sypnia.com/es/architecture/reference-implementation-aws.md): 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. [Nube] - [Fallas y escala](https://design.docs.sypnia.com/es/architecture/failures-and-scaling.md): 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). [Motor, Nube] - [Código fuente](https://design.docs.sypnia.com/es/architecture/codebase.md): 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. [Motor, Nube] ## Alojamiento propio Usa Design sin ningún servidor, o corre el motor con Docker o en AWS. - [Alojamiento propio: resumen](https://design.docs.sypnia.com/es/self-hosting.md): 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. [Motor] - [Docker](https://design.docs.sypnia.com/es/self-hosting/docker.md): 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. [Motor] - [Configuración](https://design.docs.sypnia.com/es/self-hosting/configuration.md): 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). [Motor] - [Actualizaciones y respaldos](https://design.docs.sypnia.com/es/self-hosting/upgrades.md): 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. [Motor] ## Seguridad Archivos subidos, aprobaciones, agentes, licencias, el modelo de amenazas y la lista de chequeo. - [Seguridad: resumen](https://design.docs.sypnia.com/es/security.md): 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. [Motor, Nube] - [Modelo de amenazas](https://design.docs.sypnia.com/es/security/threat-model.md): 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. [Motor, Nube] - [Lista de chequeo](https://design.docs.sypnia.com/es/security/checklist.md): 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. [Motor, Nube] ## Sypnia Cloud Tu cuenta, la consola, los créditos, los límites y los planes. - [Sypnia Cloud: resumen](https://design.docs.sypnia.com/es/cloud.md): 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. [Nube] - [Créditos y límites](https://design.docs.sypnia.com/es/cloud/credits-and-limits.md): 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. [Nube] - [Planes](https://design.docs.sypnia.com/es/cloud/plans.md): 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. [Nube] ## Referencia Glosario, archivos de Design, límites, decisiones de diseño, el registro de cambios y preguntas frecuentes. - [Referencia: resumen](https://design.docs.sypnia.com/es/reference.md): Glosario, archivos de Design, límites, decisiones de diseño, el registro de cambios y preguntas frecuentes. [Motor, Nube] - [Glosario](https://design.docs.sypnia.com/es/reference/glossary.md): 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. [Motor, Nube] - [Archivos de Design](https://design.docs.sypnia.com/es/reference/files.md): 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. [Motor, Nube] - [Límites](https://design.docs.sypnia.com/es/reference/limits.md): 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. [Motor, Nube] - [Decisiones de diseño](https://design.docs.sypnia.com/es/reference/decisions.md): 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. [Motor, Nube] - [Preguntas frecuentes](https://design.docs.sypnia.com/es/reference/faq.md): 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). [Motor, Nube] - [Registro de cambios](https://design.docs.sypnia.com/es/reference/changelog.md): Qué cambió en Sypnia Design, lo más nuevo primero. [Motor, Nube]