You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These rules define how to translate Figma inputs into code for this project and must be followed for every Figma-driven change.
4
+
5
+
### Required flow (do not skip)
6
+
7
+
1. Run get_design_context first to fetch the structured representation for the exact node(s).
8
+
2. If the response is too large or truncated, run get_metadata to get the high‑level node map and then re‑fetch only the required node(s) with get_design_context.
9
+
3. Run get_screenshot for a visual reference of the node variant being implemented.
10
+
4. Only after you have both get_design_context and get_screenshot, download any assets needed and start implementation.
11
+
5. Translate the output (usually React + Tailwind) into this project’s conventions, styles and framework. Reuse the project’s color tokens, components, and typography wherever possible.
12
+
6. Validate against Figma for 1:1 look and behavior before marking complete.
13
+
14
+
### Implementation rules
15
+
16
+
- Treat the Figma MCP output (React + Tailwind) as a representation of design and behavior, not as final code style.
17
+
- Replace Tailwind utility classes with the project’s preferred utilities/design‑system tokens when applicable.
- Use the project’s color system, typography scale, and spacing tokens consistently.
20
+
- Respect existing routing, state management, and data‑fetch patterns already adopted in the repo.
21
+
- Strive for 1:1 visual parity with the Figma design. When conflicts arise, prefer design‑system tokens and adjust spacing or sizes minimally to match visuals.
22
+
- Validate the final UI against the Figma screenshot for both look and behavior.
23
+
24
+
### Figma MCP server rules
25
+
26
+
- The Figma MCP server provides an assets endpoint which can serve image and SVG assets
27
+
- IMPORTANT: If the Figma MCP server returns a localhost source for an image or an SVG, use that image or SVG source directly
28
+
- IMPORTANT: DO NOT import/add new icon packages, all the assets should be in the Figma payload
29
+
- IMPORTANT: do NOT use or create placeholders if a localhost source is provided
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
0 commit comments