feat: add Comfy Design Standards Figma reference for agents

Add design standards instructions so agents consult the canonical Figma
design file before implementing user-facing features:

- Add docs/guidance/design-standards.md with Figma MCP fetch instructions,
  section node IDs, and component set references (auto-loaded for
  src/components/**/*.vue and src/views/**/*.vue)
- Add Design Standards section to AGENTS.md linking to the Figma file
- Add Figma file to External Resources

All content is fetched live from Figma — designers can update the file
and agents will always see the latest version.

Ref: COM-17639
This commit is contained in:
bymyself
2026-03-28 18:55:09 -07:00
parent 65f18d17af
commit 885bf9b10b
2 changed files with 60 additions and 0 deletions

View File

@@ -217,6 +217,12 @@ See @docs/testing/\*.md for detailed patterns.
2. Do not use waitForTimeout, use Locator actions and [retrying assertions](https://playwright.dev/docs/test-assertions#auto-retrying-assertions)
3. Tags like `@mobile`, `@2x` are respected by config and should be used for relevant tests
## Design Standards
Before implementing any user-facing feature, consult the [Comfy Design Standards](https://www.figma.com/design/QreIv5htUaSICNuO2VBHw0/Comfy-Design-Standards) Figma file. Use the Figma MCP to fetch it live — the file is the single source of truth and may be updated by designers at any time.
See `docs/guidance/design-standards.md` for Figma file keys, section node IDs, and component references.
## External Resources
- Vue: <https://vuejs.org/api/>
@@ -225,6 +231,7 @@ See @docs/testing/\*.md for detailed patterns.
- shadcn/vue: <https://www.shadcn-vue.com/>
- Reka UI: <https://reka-ui.com/>
- PrimeVue: <https://primevue.org>
- Comfy Design Standards: <https://www.figma.com/design/QreIv5htUaSICNuO2VBHw0/Comfy-Design-Standards>
- ComfyUI: <https://docs.comfy.org>
- Electron: <https://www.electronjs.org/docs/latest/>
- Wiki: <https://deepwiki.com/Comfy-Org/ComfyUI_frontend/1-overview>

View File

@@ -0,0 +1,53 @@
---
globs:
- 'src/components/**/*.vue'
- 'src/views/**/*.vue'
---
# Comfy Design Standards
Applies when implementing or modifying user-facing components and views.
## Before Implementing UI Changes
Consult the **Comfy Design Standards** Figma file to ensure your changes follow the agreed-upon design principles. Use the Figma MCP tool to fetch the current standards:
```
get_figma_data({ fileKey: "QreIv5htUaSICNuO2VBHw0", nodeId: "0-1", depth: 1 })
```
The Figma file is the single source of truth. Always fetch it live — do not rely on cached assumptions.
### Key Sections
| Section | Node ID | When to consult |
|---|---|---|
| Hover States | `1-2` | Adding/modifying interactive elements (buttons, inputs, links, nav items) |
| Click Targets | `4-243` | Adding clickable elements, especially small ones (icons, handles, connectors) |
| Affordances | `15-2202` | Any interactive element — ensuring visual feedback on interaction |
| Feedback | `15-2334` | User actions that need confirmation, success/error states |
| Slips and How to Fix | `15-2337` | Error prevention, undo patterns, destructive actions |
| Design Pillars | `15-2340` | New features, architectural UI decisions |
| The User | `16-2348` | User flows, onboarding, accessibility |
Fetch the specific section relevant to your task:
```
get_figma_data({ fileKey: "QreIv5htUaSICNuO2VBHw0", nodeId: "<node-id>", depth: 3 })
```
## Figma Component Reference
The Figma file contains component specifications. When implementing these components, fetch details to match the design:
| Component | Component Set ID |
|---|---|
| Button/Default | `4:314` |
| Search | `4:2366` |
| Base Node Example | `4:4739` |
## Integration with Codebase
- Map Figma color values to Tailwind 4 semantic tokens — never hardcode hex values
- Use `cn()` from `@/utils/tailwindUtil` for conditional class merging
- Use the `dark:` avoidance rule from AGENTS.md — semantic tokens handle both themes