@atomixstudio/mcp 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  MCP (Model Context Protocol) server and CLI for Atomix Design System. Query and sync design tokens from AI coding tools (Cursor, Claude Desktop, Windsurf, etc.) or from the command line.
4
4
 
5
+ **Version:** 1.0.25 — Pro Figma skill gated by `pro_figma_export`; design-in-Figma skill file renamed to `FIGMA-SKILL.md`; get-started and syncAll only add/write FIGMA-SKILL when the design system has Pro Figma access.
6
+
5
7
  ## Getting Your Credentials
6
8
 
7
9
  1. Go to [Atomix Studio](https://atomixstudio.eu)
@@ -80,7 +82,7 @@ Returns DS-derived suggestions so the AI can build a "Suggested" vs "Already pre
80
82
  - **iconLibrary** — `package`, `nativePackage`, and a performance hint (use individual imports; apply the DS icon sizing/weight token when rendering icons).
81
83
  - **fonts** — Font family names from typography tokens + hint to link fonts via URL (e.g. Google Fonts); no need to download or add font files to the repo.
82
84
  - **skill** — `path` (e.g. `.cursor/skills/atomix-ds/SKILL.md`) and `content` (generic, platform-agnostic SKILL.md).
83
- - **skillFigmaDesign** — `path` (`.cursor/skills/atomix-ds/design-in-figma.md`) and `content` (design-in-Figma skill: principal product designer, correct token use, prefer existing Figma variables).
85
+ - **skillFigmaDesign** — `path` (`.cursor/skills/atomix-ds/FIGMA-SKILL.md`) and `content` (design-in-Figma skill: principal product designer, correct token use, prefer existing Figma variables).
84
86
  - **tokenFiles** — e.g. `["tokens.css", "tokens.json"]` with copy instructions.
85
87
  - **meta** — `dsName`, `platform`, `stack`, `designSystemVersion`, `designSystemExportedAt`. Use `designSystemVersion` to compare with skill frontmatter `atomixDsVersion` and suggest **syncAll** when the design system is newer.
86
88
 
@@ -88,7 +90,7 @@ If the design system is unavailable, the tool may fail; the client should tell t
88
90
 
89
91
  ### syncAll
90
92
 
91
- **syncAll** is the single sync tool: tokens file, AI rules, skills (`.cursor/skills/atomix-ds/SKILL.md`, `design-in-figma.md`), and **atomix-dependencies.json**. The manifest records icon library, font families, and paths. The **/--sync** prompt invokes it. Optional: `output` (default `./tokens.css`), `format` (default `css`), `skipTokens` (if true, only writes skills and manifest).
93
+ **syncAll** is the single sync tool: tokens file, AI rules, skills (`.cursor/skills/atomix-ds/SKILL.md`, `FIGMA-SKILL.md`), and **atomix-dependencies.json**. The manifest records icon library, font families, and paths. The **/--sync** prompt invokes it. Optional: `output` (default `./tokens.css`), `format` (default `css`), `skipTokens` (if true, only writes skills and manifest).
92
94
 
93
95
  **Skill versioning:** Synced skills get frontmatter `atomixDsVersion` and `atomixDsExportedAt` (from the design system at sync time). The manifest’s `skills.syncedAtVersion` matches. The AI can compare the skill’s `atomixDsVersion` to **getDependencies**’ `meta.designSystemVersion`; if the design system is newer, it can suggest running **syncAll** to update.
94
96
 
@@ -119,7 +121,7 @@ The **/--get-started** prompt suggests dependencies for your design system so yo
119
121
  5. **Optional: suggest global typeset** — If the project has no global styles that use the design system tokens, offer to build a full typeset (Display, Heading, body, caption) from the DS typography tokens via getToken/listTokens, including fontFamily, fontSize, fontWeight, lineHeight, letterSpacing—not just font imports.
120
122
  6. **Report what was created** — After any install/copy steps, list what was created or updated (e.g. "Installed: lucide-react. Added: .cursor/skills/atomix-ds/SKILL.md. Synced: tokens.css.").
121
123
 
122
- **SKILLs:** The get-started flow suggests adding (1) a generic SKILL at `.cursor/skills/atomix-ds/SKILL.md` (coding-platform agnostic; calls `getAIToolRules` for the current environment), and (2) a **Figma design skill** at `.cursor/skills/atomix-ds/design-in-figma.md` for designing in Figma using granular MCP commands (syncToFigma, resolveFigmaIdsForTokens, designCreateFrame, designCreateText, etc.) with no code generation.
124
+ **SKILLs:** The get-started flow suggests adding (1) a generic SKILL at `.cursor/skills/atomix-ds/SKILL.md` (coding-platform agnostic; calls `getAIToolRules` for the current environment), and (2) a **Figma design skill** at `.cursor/skills/atomix-ds/FIGMA-SKILL.md` for designing in Figma using granular MCP commands (syncToFigma, resolveFigmaIdsForTokens, designCreateFrame, designCreateText, etc.) with no code generation.
123
125
 
124
126
  ## Sync to Figma
125
127
 
package/dist/index.js CHANGED
@@ -1940,10 +1940,50 @@ async function fetchDesignSystemForMCP(forceRefresh = false) {
1940
1940
  return result.data;
1941
1941
  }
1942
1942
  var TOKEN_CATEGORIES = ["colors", "typography", "spacing", "sizing", "shadows", "radius", "borders", "motion", "zIndex"];
1943
+ function typesetKeyToFontFamilyRole(key) {
1944
+ const prefix = key.split("-")[0] ?? "";
1945
+ if (prefix === "display") return "display";
1946
+ if (prefix === "heading") return "heading";
1947
+ if (prefix === "mono") return "mono";
1948
+ if (prefix.startsWith("body")) return "body";
1949
+ return "body";
1950
+ }
1951
+ function buildTypesetsList(typography, cssPrefix = "atmx") {
1952
+ const fontSize = typography.fontSize;
1953
+ if (!fontSize || typeof fontSize !== "object") return [];
1954
+ const fontFamily = typography.fontFamily ?? {};
1955
+ const fontWeight = typography.fontWeight ?? {};
1956
+ const lineHeight = typography.lineHeight ?? {};
1957
+ const letterSpacing = typography.letterSpacing ?? {};
1958
+ const textTransform = typography.textTransform ?? {};
1959
+ const textDecoration = typography.textDecoration ?? {};
1960
+ const p = cssPrefix ? `${cssPrefix}-` : "";
1961
+ const typesets = [];
1962
+ for (const key of Object.keys(fontSize)) {
1963
+ const role = typesetKeyToFontFamilyRole(key);
1964
+ const familyName = fontFamily[role] ?? fontFamily.body;
1965
+ const fontFamilyVar = familyName ? `var(--${p}typography-font-family-${role})` : "";
1966
+ const keyKebab = key.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
1967
+ typesets.push({
1968
+ key,
1969
+ cssClass: `.typeset-${keyKebab}`,
1970
+ fontFamilyVar: fontFamilyVar || "inherit",
1971
+ fontSizeVar: `var(--${p}typography-${key}-size)`,
1972
+ fontWeightVar: `var(--${p}typography-${key}-weight)`,
1973
+ lineHeightVar: `var(--${p}typography-${key}-line-height)`,
1974
+ letterSpacingVar: letterSpacing[key] != null ? `var(--${p}typography-${key}-letter-spacing)` : void 0,
1975
+ textTransformVar: textTransform[key] != null ? `var(--${p}typography-${key}-text-transform)` : void 0,
1976
+ textDecorationVar: textDecoration[key] != null ? `var(--${p}typography-${key}-text-decoration)` : void 0,
1977
+ hasTextTransform: key in textTransform,
1978
+ hasTextDecoration: key in textDecoration
1979
+ });
1980
+ }
1981
+ return typesets;
1982
+ }
1943
1983
  var server = new Server(
1944
1984
  {
1945
1985
  name: "atomix-mcp-user",
1946
- version: "1.0.24"
1986
+ version: "1.0.25"
1947
1987
  },
1948
1988
  {
1949
1989
  capabilities: {
@@ -2029,6 +2069,20 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
2029
2069
  required: ["query"]
2030
2070
  }
2031
2071
  },
2072
+ {
2073
+ name: "listTypesets",
2074
+ description: "List every typography typeset in the design system with full CSS variable names. Use this when building typeset.css so you emit one class per typeset and include all properties (font-family, font-size, font-weight, line-height, letter-spacing, text-transform, text-decoration) for 1:1 match. Do not skip any typesets.",
2075
+ inputSchema: {
2076
+ type: "object",
2077
+ properties: {
2078
+ cssPrefix: {
2079
+ type: "string",
2080
+ description: "CSS variable prefix (default: atmx). Use the same prefix as the synced tokens file."
2081
+ }
2082
+ },
2083
+ required: []
2084
+ }
2085
+ },
2032
2086
  {
2033
2087
  name: "validateUsage",
2034
2088
  description: "Check if a CSS value follows the design system. Detects hardcoded values that should use tokens.",
@@ -2095,7 +2149,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
2095
2149
  },
2096
2150
  {
2097
2151
  name: "syncAll",
2098
- description: "Sync tokens, AI rules, skills (SKILL.md, design-in-figma.md), and atomix-dependencies.json. Use dryRun: true first to report what would change without writing; then dryRun: false to apply. Response includes a VALIDATION section\u2014agent must check it to confirm success. Optional: output (default ./tokens.css), format (default css), skipTokens (if true, only skills and manifest), dryRun (if true, report only; no files written).",
2152
+ description: "Sync tokens, AI rules, skills (SKILL.md, FIGMA-SKILL.md), and atomix-dependencies.json. Use dryRun: true first to report what would change without writing; then dryRun: false to apply. Response includes a VALIDATION section\u2014agent must check it to confirm success. Optional: output (default ./tokens.css), format (default css), skipTokens (if true, only skills and manifest), dryRun (if true, report only; no files written).",
2099
2153
  inputSchema: {
2100
2154
  type: "object",
2101
2155
  properties: {
@@ -2586,6 +2640,29 @@ Version: ${designSystemData.meta.version}`,
2586
2640
  }]
2587
2641
  };
2588
2642
  }
2643
+ case "listTypesets": {
2644
+ const typography = data.tokens.typography;
2645
+ const cssPrefix = args?.cssPrefix || "atmx";
2646
+ const typesets = typography ? buildTypesetsList(typography, cssPrefix) : [];
2647
+ const underlineThickness = typography?.underlineThickness;
2648
+ const underlineOffset = typography?.underlineOffset;
2649
+ return {
2650
+ content: [{
2651
+ type: "text",
2652
+ text: JSON.stringify({
2653
+ count: typesets.length,
2654
+ typesets,
2655
+ instruction: "Emit one CSS rule per typeset using the cssClass and the listed var() properties. Include font-family, font-size, font-weight, line-height; add letter-spacing when present; add text-transform and text-decoration when hasTextTransform/hasTextDecoration are true so the result is 1:1 with the design system.",
2656
+ ...underlineThickness != null && underlineOffset != null && {
2657
+ underlineVars: {
2658
+ thickness: `var(--${cssPrefix}-typography-underline-thickness)`,
2659
+ offset: `var(--${cssPrefix}-typography-underline-offset)`
2660
+ }
2661
+ }
2662
+ }, null, 2)
2663
+ }]
2664
+ };
2665
+ }
2589
2666
  case "validateUsage": {
2590
2667
  const value = args?.value;
2591
2668
  const context = args?.context || "any";
@@ -2880,10 +2957,12 @@ Version: ${designSystemData.meta.version}`,
2880
2957
  const dsExportedAt = data.meta.exportedAt;
2881
2958
  const skillsDir = path2.resolve(process.cwd(), ".cursor/skills/atomix-ds");
2882
2959
  const skillPath1 = path2.join(skillsDir, "SKILL.md");
2883
- const skillPath2 = path2.join(skillsDir, "design-in-figma.md");
2960
+ const skillPath2 = path2.join(skillsDir, "FIGMA-SKILL.md");
2884
2961
  const manifestPath = path2.resolve(process.cwd(), "atomix-dependencies.json");
2885
2962
  if (dryRun) {
2886
- parts.push("Would write skills: .cursor/skills/atomix-ds/SKILL.md, .cursor/skills/atomix-ds/design-in-figma.md");
2963
+ parts.push(
2964
+ cachedMcpTier === "pro" ? "Would write skills: .cursor/skills/atomix-ds/SKILL.md, .cursor/skills/atomix-ds/FIGMA-SKILL.md" : "Would write skills: .cursor/skills/atomix-ds/SKILL.md"
2965
+ );
2887
2966
  parts.push("Would write manifest: atomix-dependencies.json");
2888
2967
  const reportText = [parts.join("\n"), tokenResponseText].filter(Boolean).join("\n\n---\n\n");
2889
2968
  return {
@@ -2894,14 +2973,16 @@ ${reportText}` }]
2894
2973
  }
2895
2974
  if (!fs2.existsSync(skillsDir)) fs2.mkdirSync(skillsDir, { recursive: true });
2896
2975
  const genericWithVersion = injectSkillVersion(GENERIC_SKILL_MD, dsVersion, dsExportedAt);
2897
- const figmaWithVersion = injectSkillVersion(FIGMA_DESIGN_SKILL_MD, dsVersion, dsExportedAt);
2898
2976
  fs2.writeFileSync(skillPath1, genericWithVersion);
2899
- fs2.writeFileSync(skillPath2, figmaWithVersion);
2900
- allValidation.push(
2901
- { path: skillPath1, status: fs2.existsSync(skillPath1) ? "OK" : "FAIL", detail: "Written." },
2902
- { path: skillPath2, status: fs2.existsSync(skillPath2) ? "OK" : "FAIL", detail: "Written." }
2977
+ allValidation.push({ path: skillPath1, status: fs2.existsSync(skillPath1) ? "OK" : "FAIL", detail: "Written." });
2978
+ if (cachedMcpTier === "pro") {
2979
+ const figmaWithVersion = injectSkillVersion(FIGMA_DESIGN_SKILL_MD, dsVersion, dsExportedAt);
2980
+ fs2.writeFileSync(skillPath2, figmaWithVersion);
2981
+ allValidation.push({ path: skillPath2, status: fs2.existsSync(skillPath2) ? "OK" : "FAIL", detail: "Written." });
2982
+ }
2983
+ parts.push(
2984
+ cachedMcpTier === "pro" ? "Skills: .cursor/skills/atomix-ds/SKILL.md, .cursor/skills/atomix-ds/FIGMA-SKILL.md (synced at DS v" + dsVersion + ")" : "Skills: .cursor/skills/atomix-ds/SKILL.md (synced at DS v" + dsVersion + ")"
2903
2985
  );
2904
- parts.push("Skills: .cursor/skills/atomix-ds/SKILL.md, .cursor/skills/atomix-ds/design-in-figma.md (synced at DS v" + dsVersion + ")");
2905
2986
  const tokens = data.tokens;
2906
2987
  const typography = tokens?.typography;
2907
2988
  const fontFamily = typography?.fontFamily;
@@ -2932,7 +3013,7 @@ ${reportText}` }]
2932
3013
  fonts: { families: fontNames },
2933
3014
  skills: {
2934
3015
  skill: ".cursor/skills/atomix-ds/SKILL.md",
2935
- skillFigmaDesign: ".cursor/skills/atomix-ds/design-in-figma.md",
3016
+ ...cachedMcpTier === "pro" ? { skillFigmaDesign: ".cursor/skills/atomix-ds/FIGMA-SKILL.md" } : {},
2936
3017
  syncedAtVersion: data.meta.version ?? "1.0.0"
2937
3018
  }
2938
3019
  };
@@ -2983,16 +3064,18 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
2983
3064
  },
2984
3065
  fonts: {
2985
3066
  families: fontNames,
2986
- performanceHint: "Link fonts via URL (e.g. Google Fonts <link> or CSS @import); no need to download font files or add them to the repo. Prefer font-display: swap when possible. You must also build a typeset: CSS rules (e.g. .typeset-display, .typeset-heading, .typeset-body) that use var(--atmx-typography-*) for font-family, font-size, font-weight, line-height, letter-spacing from getToken/listTokens(typography). Do not create a file that only contains a font import."
3067
+ performanceHint: "Link fonts via URL (e.g. Google Fonts <link> or CSS @import); no need to download font files or add them to the repo. Prefer font-display: swap when possible. You must also build a complete typeset CSS: call listTypesets to get every typeset from the design system, then emit one CSS class per typeset (do not skip any). For each class set font-family, font-size, font-weight, line-height, letter-spacing; when the typeset has text-transform or text-decoration, set those too so the result is 1:1 with the DS. Use the CSS variable names returned by listTypesets. Do not create a file that only contains a font import."
2987
3068
  },
2988
3069
  skill: {
2989
3070
  path: ".cursor/skills/atomix-ds/SKILL.md",
2990
3071
  content: GENERIC_SKILL_MD
2991
3072
  },
2992
- skillFigmaDesign: {
2993
- path: ".cursor/skills/atomix-ds/design-in-figma.md",
2994
- content: FIGMA_DESIGN_SKILL_MD
2995
- },
3073
+ ...cachedMcpTier === "pro" ? {
3074
+ skillFigmaDesign: {
3075
+ path: ".cursor/skills/atomix-ds/FIGMA-SKILL.md",
3076
+ content: FIGMA_DESIGN_SKILL_MD
3077
+ }
3078
+ } : {},
2996
3079
  tokenFiles: {
2997
3080
  files: ["tokens.css", "tokens.json"],
2998
3081
  copyInstructions: "Call the syncAll MCP tool to create the token file, skills, and atomix-dependencies.json; do not only suggest the user run sync later."
@@ -3391,7 +3474,7 @@ ${tokenResponseText}${validationBlock}` : `${summary}${validationBlock}`);
3391
3474
  type: "text",
3392
3475
  text: JSON.stringify({
3393
3476
  error: `Unknown tool: ${name}`,
3394
- availableTools: ["getToken", "listTokens", "searchTokens", "validateUsage", "getAIToolRules", "exportMCPConfig", "getSetupInstructions", "syncAll", "getDependencies", "syncToFigma", "getFigmaVariablesAndStyles", "createDesignPlaceholder", "resolveFigmaIdsForTokens", "designCreateFrame", "designCreateText", "designCreateRectangle", "designSetAutoLayout", "designSetLayoutConstraints", "designAppendChild", "getDesignScreenshot", "finalizeDesignFrame"]
3477
+ availableTools: ["getToken", "listTokens", "listTypesets", "searchTokens", "validateUsage", "getAIToolRules", "exportMCPConfig", "getSetupInstructions", "syncAll", "getDependencies", "syncToFigma", "getFigmaVariablesAndStyles", "createDesignPlaceholder", "resolveFigmaIdsForTokens", "designCreateFrame", "designCreateText", "designCreateRectangle", "designSetAutoLayout", "designSetLayoutConstraints", "designAppendChild", "getDesignScreenshot", "finalizeDesignFrame"]
3395
3478
  }, null, 2)
3396
3479
  }]
3397
3480
  };
@@ -3487,7 +3570,7 @@ Use the returned rules and token paths/values when generating or editing code. P
3487
3570
 
3488
3571
  - **Fetch first:** Before writing UI or styles, call getAIToolRules and/or getToken/listTokens so you know the exact tokens and conventions.
3489
3572
  - **Icons:** Apply the design system's icon tokens when rendering icons: sizing via \`getToken("sizing.icon.sm")\` or \`listTokens("sizing")\`, and stroke width via \`getToken("icons.strokeWidth")\` when the DS defines it; do not use hardcoded sizes or stroke widths.
3490
- - **Typography:** Use typography tokens (fontFamily, fontSize, fontWeight, lineHeight, letterSpacing) from the DS for any text; build typesets (Display, Heading, body) from those tokens when creating global styles.
3573
+ - **Typography:** Use typography tokens from the DS for any text. When creating global typeset CSS, call **listTypesets** and emit one CSS class per typeset (do not skip any); include text-transform and text-decoration when present for 1:1 match.
3491
3574
  - **No guessing:** If a value is not in the rules or token list, use searchTokens or listTokens to find the closest match rather than inventing a value.
3492
3575
  - **Version check:** If this skill file has frontmatter \`atomixDsVersion\`, compare it to the design system version from **getDependencies** (\`meta.designSystemVersion\`). If the design system is newer, suggest the user run **syncAll** to update skills and tokens.
3493
3576
  `;
@@ -3552,18 +3635,15 @@ var SHOWCASE_HTML_TEMPLATE = `<!DOCTYPE html>
3552
3635
  min-height: 100vh;
3553
3636
  padding: 2rem;
3554
3637
  display: flex;
3555
- align-items: center;
3556
- justify-content: center;
3557
- text-align: center;
3558
3638
  }
3559
3639
  .wrap { width: 375px; max-width: 100%; }
3560
3640
  .icon { width: 2rem; height: 2rem; margin: 0 auto 1rem; }
3561
3641
  h1 {
3562
3642
  font-family: {{HEADING_FONT_VAR}}, {{FONT_FAMILY_VAR}}, system-ui, sans-serif;
3563
- font-size: clamp(1.5rem, 4vw, 2.25rem);
3643
+ font-size: clamp(3rem, 4vw, 5rem);
3564
3644
  font-weight: 700;
3565
3645
  margin: 0 0 0.75rem;
3566
- line-height: 1.25;
3646
+ line-height: 1.2;
3567
3647
  }
3568
3648
  .lead { margin: 0 0 1.5rem; font-size: 1rem; line-height: 1.5; opacity: 0.95; }
3569
3649
  .now { margin: 1.5rem 0 0; font-size: 0.875rem; line-height: 1.6; opacity: 0.95; text-align: left; }
@@ -3576,10 +3656,10 @@ var SHOWCASE_HTML_TEMPLATE = `<!DOCTYPE html>
3576
3656
  <body>
3577
3657
  <div class="wrap">
3578
3658
  <div class="icon" aria-hidden="true">
3579
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="32" height="32"><path d="M20 6L9 17l-5-5"/></svg>
3659
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="44" height="44"><path d="M20 6L9 17l-5-5"/></svg>
3580
3660
  </div>
3581
3661
  <h1>You're all set with {{DS_NAME}}</h1>
3582
- <p class="lead">This page uses your design system: brand primary as background, headline and body typesets, and an icon. Token file is linked above.</p>
3662
+ <p class="lead">This page uses your design system: brand primary as background, headline and body typesets, and an icon.</p>
3583
3663
  <div class="now">
3584
3664
  <strong>What you can do now:</strong>
3585
3665
  <ul>
@@ -4212,8 +4292,8 @@ Use \`/color\`, \`/spacing\`, \`/radius\`, \`/typography\`, \`/shadow\`, \`/bord
4212
4292
 
4213
4293
  - Resolve platform/stack: infer from the project (e.g. package.json, build.gradle, Xcode) or ask once: "Which platform? (e.g. web, Android, iOS)" and if relevant "Which stack? (e.g. React, Vue, Next, Swift, Kotlin)." Do not assume a default.
4214
4294
  - Call **getDependencies** with \`platform\` and optional \`stack\`. If it fails, tell the user the design system could not be reached and stop.
4215
- - Scan the repo for: .cursor/skills/atomix-ds/SKILL.md, .cursor/skills/atomix-ds/design-in-figma.md, a tokens file (e.g. tokens.css or src/tokens.css), icon package from getDependencies, font links. **Web:** note any existing CSS (globals.css, main.css, Tailwind, etc.). **Native:** note any theme/style files (SwiftUI, Android themes, Compose).
4216
- - Build two lists: **Suggested** (from getDependencies minus what exists) and **Already present**. Include: icon package, font links, skill (.cursor/skills/atomix-ds/SKILL.md), **Figma design skill** (.cursor/skills/atomix-ds/design-in-figma.md), token files; for web, also include the **showcase page** (atomix-setup-showcase.html) if getDependencies returned a \`showcase\` object.
4295
+ - Scan the repo for: .cursor/skills/atomix-ds/SKILL.md, a tokens file (e.g. tokens.css or src/tokens.css), icon package from getDependencies, font links. If getDependencies returned \`skillFigmaDesign\`, also scan for .cursor/skills/atomix-ds/FIGMA-SKILL.md. **Web:** note any existing CSS (globals.css, main.css, Tailwind, etc.). **Native:** note any theme/style files (SwiftUI, Android themes, Compose).
4296
+ - Build two lists: **Suggested** (from getDependencies minus what exists) and **Already present**. Include: icon package, font links, skill (.cursor/skills/atomix-ds/SKILL.md). Include **Figma design skill** (.cursor/skills/atomix-ds/FIGMA-SKILL.md) in Suggested/Already present only if getDependencies returned a \`skillFigmaDesign\` object; otherwise omit it. Include token files; for web, also include the **showcase page** (atomix-setup-showcase.html) if getDependencies returned a \`showcase\` object.
4217
4297
  - Do not write, create, or add anything in Phase 1.
4218
4298
 
4219
4299
  ## Phase 2 \u2013 Report and ask
@@ -4227,14 +4307,14 @@ Use \`/color\`, \`/spacing\`, \`/radius\`, \`/typography\`, \`/shadow\`, \`/bord
4227
4307
  - Run only when the user has said yes (all or specific items).
4228
4308
  - For each approved item:
4229
4309
  - **Skill:** Write the skill content from getDependencies \`skill.content\` to \`skill.path\` (.cursor/skills/atomix-ds/SKILL.md).
4230
- - **Figma design skill:** Write the skill content from getDependencies \`skillFigmaDesign.content\` to \`skillFigmaDesign.path\` (.cursor/skills/atomix-ds/design-in-figma.md). Use this when designing in Figma so the agent follows principal-product-designer rules and prefers existing Figma variables.
4310
+ - **Figma design skill:** Only if getDependencies returned \`skillFigmaDesign\`, write \`skillFigmaDesign.content\` to \`skillFigmaDesign.path\` (.cursor/skills/atomix-ds/FIGMA-SKILL.md). Use this when designing in Figma so the agent follows principal-product-designer rules and prefers existing Figma variables. If \`skillFigmaDesign\` was not in the response, do not add this file.
4231
4311
  - **Token file:** Call **syncAll** with \`output\` set to the path (e.g. "./src/tokens.css" or "./tokens.css"). syncAll also writes skills and atomix-dependencies.json. You must call syncAll; do not only suggest the user run it later.
4232
4312
  - **Icon package:** Install per getDependencies. When rendering icons, apply the design system's icon tokens: use getToken(\`sizing.icon.*\`) or listTokens(\`sizing\`) for size, and getToken(\`icons.strokeWidth\`) for stroke width when the DS defines it; do not use hardcoded sizes or stroke widths.
4233
- - **Fonts and typeset:** Add font links (e.g. \`<link>\` or \`@import\` from Google Fonts). Then build a **typeset** in CSS: use **getToken** / **listTokens** (category \`typography\`) to get fontFamily, fontSize, fontWeight, lineHeight, letterSpacing for display, heading, and body, and write CSS rules (e.g. \`.typeset-display\`, \`.typeset-heading\`, \`.typeset-body\`, or \`h1\`/\`h2\`/\`p\`) that set those properties to \`var(--atmx-typography-*)\`. The typeset file (or section) must define the full type scale\u2014not only a font import. Do not create a CSS file that contains only a font import.
4313
+ - **Fonts and typeset:** Add font links (e.g. \`<link>\` or \`@import\` from Google Fonts). Then build a **complete typeset CSS**: call **listTypesets** to get every typeset from the owner's design system (do not skip any). Emit **one CSS rule per typeset** using the \`cssClass\` and the \`fontFamilyVar\`, \`fontSizeVar\`, \`fontWeightVar\`, \`lineHeightVar\` (and \`letterSpacingVar\`, \`textTransformVar\`, \`textDecorationVar\` when present) returned by listTypesets. Include text-transform and text-decoration when the typeset has them so the result is **1:1** with the design system. The typeset file must define the full type scale\u2014not only a font import. Do not create a CSS file that contains only a font import.
4234
4314
  - **Showcase page (web only):** If platform is web and getDependencies returned a \`showcase\` object, create the file at \`showcase.path\` using \`showcase.template\`. Replace every placeholder per \`showcase.substitutionInstructions\`: TOKENS_CSS_PATH, DS_NAME, BRAND_PRIMARY_VAR (page background), BRAND_PRIMARY_FOREGROUND_VAR (text on brand), HEADING_FONT_VAR (h1), FONT_FAMILY_VAR (body), FONT_LINK_TAG. Use only CSS variable names that exist in the synced token file. Do not change the HTML structure. After creating the file, launch it in the default browser (e.g. \`open atomix-setup-showcase.html\` on macOS, \`xdg-open atomix-setup-showcase.html\` on Linux, or the equivalent on Windows).
4235
4315
  - Report only what you actually created or updated. Do not claim the token file was added if you did not call syncAll.
4236
4316
  - **After reporting \u2013 styles/theme:**
4237
- - **Web:** If the project already has at least one CSS file: recommend how to integrate Atomix (e.g. import the synced tokens file, use \`var(--atmx-*)\`). Do not suggest a new global CSS. Only if there is **no** CSS file at all, ask once: "There are no CSS files yet. Do you want me to build a global typeset from the design system?" If yes, create a CSS file that includes: (1) font \`@import\` or document that a font link is needed, and (2) **typeset rules**\u2014CSS classes or element rules that set font-family, font-size, font-weight, line-height, letter-spacing using \`var(--atmx-typography-*)\` from the token file (e.g. \`.typeset-display\`, \`.typeset-heading\`, \`.typeset-body\`). You must call getToken/listTokens to get the exact typography token paths and write the corresponding var() references. The output must not be only a font import; it must define the full typeset (Display, Heading, body) with every style detail from the design system.
4317
+ - **Web:** If the project already has at least one CSS file: recommend how to integrate Atomix (e.g. import the synced tokens file, use \`var(--atmx-*)\`). Do not suggest a new global CSS. Only if there is **no** CSS file at all, ask once: "There are no CSS files yet. Do you want me to build a global typeset from the design system?" If yes, create a CSS file that includes: (1) font \`@import\` or document that a font link is needed, and (2) **typeset rules**\u2014call **listTypesets** and emit **one CSS class per typeset** (do not skip any). For each class set font-family, font-size, font-weight, line-height, letter-spacing; when the typeset has text-transform or text-decoration, set those too for a 1:1 match. Use the CSS variable names returned by listTypesets. The output must not be only a font import; it must define every typeset with every style detail from the design system.
4238
4318
  - **iOS/Android:** If the project already has theme/style files: recommend how to integrate Atomix tokens. Do not suggest a new global theme. Only if there is **no** theme/style at all, ask once: "There's no theme/style setup yet. Do you want a minimal token-based theme?" and add only if the user says yes.
4239
4319
 
4240
4320
  Create your todo list first, then Phase 1 (resolve platform/stack, call getDependencies, scan, build lists), then Phase 2 (report and ask). Do not perform Phase 3 until the user replies.`;