@atomixstudio/mcp 1.0.8 → 1.0.10

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
@@ -146,6 +146,43 @@ Once connected, AI tools can use these:
146
146
  | `getAIToolRules(tool)` | Generate AI coding rules for your design system |
147
147
  | `exportMCPConfig(tool)` | Get MCP configuration for different tools |
148
148
  | `getSetupInstructions(tool)` | Get detailed setup guide |
149
+ | `getDependencies(platform?, stack?)` | Get suggested dependencies (icons, fonts, SKILL.md, MCP config, tokens). Optional: `platform` (web, ios, android), `stack` (e.g. react, vue, next). Use with **atomix/install**. |
150
+
151
+ ### getDependencies
152
+
153
+ Returns DS-derived suggestions so the client's AI can build a "Suggested" vs "Already present" list and, after user approval, install or copy assets.
154
+
155
+ **Parameters (optional):**
156
+
157
+ | Parameter | Description |
158
+ |-----------|-------------|
159
+ | `platform` | `web`, `ios`, or `android` |
160
+ | `stack` | e.g. `react`, `vue`, `next`, `swift`, `kotlin` |
161
+
162
+ **Returns (JSON):**
163
+
164
+ - **iconLibrary** — `package`, `nativePackage`, and a **performance hint:** use individual SVG imports for tree-shaking; avoid loading entire icon libraries or icon fonts.
165
+ - **fonts** — Font family names from typography tokens + **performance hint:** implement self-hosted fonts and local `@font-face`; avoid external CDN links; use `font-display: swap`.
166
+ - **skill** — `path` (e.g. `.cursor/skills/atomix-ds/SKILL.md`) and `content` (generic, platform-agnostic SKILL.md).
167
+ - **mcpConfig** — Path and content for MCP configuration.
168
+ - **tokenFiles** — e.g. `["tokens.css", "tokens.json"]` with short copy instructions.
169
+
170
+ If the design system or MCP is not available (e.g. no `--ds-id`), the tool may fail; the client should tell the user to configure MCP with `--ds-id` and try again.
171
+
172
+ ## atomix/install
173
+
174
+ The **install** prompt suggests dependencies for your design system so you can get up and running quickly. It does **not** install anything by default; the client's AI presents a list and asks before making changes.
175
+
176
+ **Flow (phased instructions):**
177
+
178
+ 1. **Resolve platform and stack** — Infer from the project (e.g. `package.json`, `build.gradle`) or **ask the user** if the project gives no hint (e.g. blank repo). Do not assume web or any default.
179
+ 2. **Get suggested dependencies** — Call `getDependencies(platform, stack)`. If the call fails (e.g. MCP not connected or no ds-id), tell the user: "Atomix MCP is not connected or design system ID is missing. Configure MCP with --ds-id and try again."
180
+ 3. **Scan codebase and build suggestion list** — Scan for `package.json` (or equivalent), existing skill path, token files, font/icon usage. Build **Suggested dependencies** (from getDependencies minus what's present) and **Already present**. Do not install or copy anything in this phase.
181
+ 4. **Present list and ask before install** — Reply with "Suggested dependencies: …" and "Already present: …" and state: "Do not install or copy anything until you confirm. Would you like me to install or add these?" Only perform steps the user approves.
182
+ 5. **Optional: suggest global styles** — If the project has no global styles that use the design system tokens, ask verbatim: "Your project doesn't appear to have global styles that use the design system tokens (e.g. semantic typography scale or semantic color classes). Would you like me to suggest or generate a minimal set (e.g. typography scale + semantic utilities) so you can develop consistently with the DS?"
183
+ 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. Updated: .cursor/mcp.json. Copied: tokens.css.").
184
+
185
+ **Single SKILL.md:** The install flow suggests adding a generic, coding-platform agnostic SKILL at `.cursor/skills/atomix-ds/SKILL.md`. It instructs the AI to call `getAIToolRules({ tool: "<tool>" })` where `<tool>` matches the current environment (cursor, windsurf, copilot, cline, continue, zed, generic).
149
186
 
150
187
  ## Token Categories
151
188
 
@@ -169,7 +206,7 @@ By default, `sync` also updates AI rules files based on which AI tools you use:
169
206
  | `.windsurfrules` | Windsurf |
170
207
  | `.clinerules` | Cline |
171
208
  | `.continuerules` | Continue |
172
- | `.github/copilot-instructions.md` | GitHub Copilot |
209
+ | `.github/copilot-instructions.md` | Copilot |
173
210
  | `AI_GUIDELINES.md` | Generic |
174
211
 
175
212
  The rules include your design system's governance guidelines and token usage instructions.
@@ -205,14 +242,6 @@ npx heyatomix sync
205
242
  - [Atomix Studio](https://atomixstudio.eu)
206
243
  - [MCP Protocol](https://modelcontextprotocol.io)
207
244
 
208
- ## Publishing (maintainers)
209
-
210
- This package bundles `@atomixstudio/sync-core` so a single publish works from npm. To republish:
211
-
212
- 1. From repo root, build sync-core (needed for local types): `cd packages/atomix-sync-core && pnpm run build`
213
- 2. From `packages/mcp-user`: `pnpm run build` then `npm publish --access public`
214
- 3. Bump version in `package.json` before each new publish.
215
-
216
245
  ## License
217
246
 
218
247
  MIT