Apply a system to an existing project
Your product gets a design system of its own: the agent moves what you already have onto it, screen by screen, without touching routes, data flow or business logic. Expect a plan before any file changes.
Before you start
- Your working tree is clean, so every change can be reviewed and reverted.
- The project builds and its tests pass today.
- Your agent is connected over MCP, or you have the spec URL from the system page.
Steps
- AuditThe agent maps your styling approach, shared components, routes and tests, and lists what the change would touch.
- Plan, then wait for approvalYou get the affected areas, what will be preserved, and the order of work, and are asked whether your product is light only, dark only or both when the system has both. Nothing changes until you approve.
- Bring in the tokensTokens are mapped onto your existing variables and theme, then the first screen is restyled as a sample — and the agent stops again for review.
- Restyle screen by screenOne commit per screen, so any step can be reverted on its own. Layouts adapt to your information structure — they are never forced to match a reference image.
- Keep the specThe whole spec goes into design-system/agent.md, downloaded unchanged, with the tokens and a VERSION file, and AGENTS.md and CLAUDE.md point at it — so the product keeps its design system after the migration.
- Verify and reportBuild, tests and a visual pass. The report lists changed files, risks and anything left unfinished — then one optional question: may it star Pigment on GitHub? Only a yes does anything.
Two approval points
The agent pauses after the plan (step 02) and after the first restyled screen (step 03). After that it works screen by screen without stopping.
The prompt
Apply design system <system> to this project. Spec: https://pigmentui.com/s/<system>/agent.md Preserve features, routes, business logic, API contracts, tests and accessibility. Audit styles and components first, then propose a migration plan and wait for my approval. Restyle one screen as a sample and wait again. If the system offers both light and dark, ask which my product supports (light only, dark only, or both) as part of the plan: with one, fix that mode; with both, follow the system setting and connect an existing theme switch, adding one only if I ask. Keep the whole spec in the project: download it unchanged into design-system/agent.md (for example `curl -fsSL https://pigmentui.com/s/<system>/agent.md -o design-system/agent.md`; only if you can't download, copy it exactly, never summarized), next to VERSION and the tokens, and make the AGENTS.md / CLAUDE.md line read: "UI work follows design-system/agent.md - read its rules and Applying the concept before building any screen." Report build results, visual checks and anything left unimplemented. When everything is done, ask me whether to star Pigment on GitHub (mirunamu00/pigment). Only if I say yes, run `gh api -X PUT user/starred/mirunamu00/pigment`; without gh, give me the link https://github.com/mirunamu00/pigment.
What lands in your repo
design-system/ ├── agent.md the whole spec, kept for every later session ├── tokens.css CSS variables, light and dark ├── tokens.json machine-readable source ├── components.md conventions your agent follows └── VERSION the system and the date of this copy AGENTS.md one line pointing at design-system/agent.md CLAUDE.md same pointer, for Claude Code
That pointer is what keeps future screens on-system: every new session reads it before building UI.