Save design system
fabrement-save-design-systemUpdate the design system this site paints with: colours (the 16 canonical roles), typography, button variants. Sections you send MERGE over the current ones (replace:true swaps them); tokens go live on :root at once. Refused when the site has none selected. The save lands on THIS SITE first and is then copied to the project — synced:false means the site has it and the project does not (signed out, or the backend unreachable), which is not a failure to retry. get-design-system first.
Rules: get-skill-doc {id:"design-system-contract"} — read it before the first call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| colors | No | Role → "#rrggbb", the 16 canonical roles only (design-system-contract §3). E.g. {"primary":"#c42b35","accent":"#ffa32b"}. | |
| buttons | No | Variant slug → {style} with the button builder's fields — padding, radius, border, font, hover*, mobile*, and colours as EITHER a hex #rrggbb OR a colour role name ("primary", "onPrimary", …). A role keeps the button following the site when that colour changes, so prefer it (design-system-contract §5). An existing variant keeps the fields you omit. | |
| replace | No | Replace each provided section wholesale instead of merging (default false). | |
| typography | No | {headingFont?, bodyFont?, displayFont?, accentFont?, weights?:{heading,body,display,accent}, loadWeights?:{heading:["500","400i"]}, scale?:{h1..h6,body,small}, scaleUnit?:"px"|"rem"|"em"}; a size is a CSS length or {desktop,tablet,mobile}. Omitted roles keep their size. display/accent are EXTRA faces — set them only when the design shows a third typeface; loadWeights adds cuts beyond the role's own weight, "400i" being the italic one — ask only for cuts the family actually HAS (design-system-contract §4). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| note | Yes | ||
| synced | No | Whether the site's copy also reached the project. | |
| syncNote | No | ||
| savedColors | Yes | Written by THIS call — a role you sent that is missing here did not land. | |
| savedButtons | Yes | ||
| effectiveColors | Yes | All roles AFTER the merge, not just this call's. With replace:true, roles absent here were dropped. | |
| savedTypography | Yes |