Letting an agent create design systems

Docs

With login, an agent can make a design system rather than only read one: it reads the app's existing colours, fonts and logo, writes a recipe, creates the project in your account, links the folder to it, and adds the UI kit. You tweak the result in the workbench.

How to use it

  1. In your own terminal, in the project folder: npx designsource login. Open the address it prints, enter the code, check what the page shows and approve. Restart the coding app.
  2. Ask the agent to create a design system for this app. Your client asks you to allow create_design_system; the result names the account it used, the score, what the server repaired, what still fails, and a link to the project.
  3. Ask it to add the UI kit. add_ui_kit writes the theme and the components into the app.

To use one you already have instead, ask the agent to list your design systems and pick one; use_design_system links the folder to it.

Screens and pages. Ask the agent for a screen ("a customers list") or a marketing page (home, features, pricing, about, contact or waitlist). generate_screen makes it in the linked design system from a sentence of up to 500 characters, or changes one it names; it can pass the app's own records so the fields match. It spends the account's credits or its own AI key, on any plan, writes no files and answers a link. Then add_ui_kit with screens writes it into the app; a page also needs "site" for the header and footer. A sign-in made before screens existed is asked to run login again.

How it works

The recipe. The agent writes the compact form on Recipe shape: six ramps as hue and chroma, nineteen semantic roles as references into them, a radius, a font pair and a shadow level. It can also pass an icons choice (Lucide, Phosphor, Tabler or Material Symbols, with a style and weight); left out, the project draws Lucide. The tool's description tells it to read the codebase first, pick one brand hue, keep the neutral ramp near grey, keep destructive red, success green and warning amber, and use only Google Fonts family names or the catalog font keys.

What the server does with it. It validates the recipe, refuses control and bidi characters in the name, runs the contrast repair with primary protected (so the agent's brand colour stays where it put it; a row only that colour could fix stays failing and is reported), checks any web font against Google Fonts and falls back to system on a miss, numbers a taken name, and seeds the full token set under the chosen corner strategy. The answer carries the score, the repairs and fallbacks as Changes made:, and Still failing contrast: when protection left rows failing. Creating counts against the account's project cap.

Scopes. The sign-in may create design systems, read the account's, and make or change screens and marketing pages in them; it cannot delete a design system or edit its tokens. Reading the tokens and adding the kit through it need Pro on the account, as every export does; creating is free.

Where it applies. Only in the exact folder you ran login in: the nearest folder holding .git, not a folder cloned inside one. Each folder links to one design system. A folder set up earlier with connect keeps that app on its project token until you remove --project from the entry.

Revoking. logout on the computer, or the profile page's Coding apps card from anywhere; a password change, unlinking a sign-in method or deleting the account ends every sign-in, and an unused one expires after 90 days.

What can go wrong

  • No design system is linked to this folder yet. The agent calls list_design_systems and use_design_system, or create_design_system, first.
  • The linked design system is gone (deleted, or not in this account). Pick another with list_design_systems and use_design_system.
  • The create answer says the folder was not linked: the account is no longer saved for this folder; run login again.
  • This computer is no longer signed in to designsource. The sign-in was revoked or expired; run login again.