@noemuch/bridge-ds 2.0.0

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.
@@ -0,0 +1,205 @@
1
+ ---
2
+ name: design-workflow
3
+ description: >
4
+ Spec-first workflow for designers who use Claude Code to design in Figma.
5
+ Covers components and full interfaces/screens. Use when a designer wants to:
6
+ (1) write or review a component or screen spec, (2) generate a Figma design via MCP,
7
+ (3) review and iterate on a design, (4) close or abandon work.
8
+ Triggers: "spec", "design", "screen", "review", "done", "drop", "status",
9
+ "setup", "workflow", "what's next", "new component", "new screen", or any design request.
10
+ ---
11
+
12
+ # Design Workflow
13
+
14
+ > Spec-first workflow for designers using Claude Code to design in Figma.
15
+ > Powered by [figma-console-mcp](https://github.com/southleft/figma-console-mcp) as transport.
16
+ > **All output in the user's language.**
17
+
18
+ ---
19
+
20
+ ## Philosophy
21
+
22
+ 1. **Spec-first** — No design without a validated specification
23
+ 2. **Figma is the output** — Everything ends as native Figma layers
24
+ 3. **DS-native** — Every visual element uses design system tokens and components, never hardcoded
25
+ 4. **Composability over configuration** — Simple building blocks > mega-components
26
+ 5. **Iterative** — Design → review → refine until right
27
+ 6. **Atomic** — Small sequential scripts with visual verification between each step
28
+
29
+ ---
30
+
31
+ ## Commands
32
+
33
+ | Command | Purpose | Action file |
34
+ |---------|---------|-------------|
35
+ | `setup` | Extract DS + build knowledge base | `references/onboarding.md` (STEP 0) |
36
+ | `spec {name}` | Write a component or screen specification | `references/actions/spec.md` |
37
+ | `design` | Generate Figma design from active spec | `references/actions/design.md` |
38
+ | `review` | Validate design against spec, tokens, and visual fidelity | `references/actions/review.md` |
39
+ | `done` | Archive spec and close | `references/actions/done.md` |
40
+ | `drop` | Abandon with preserved learnings | `references/actions/drop.md` |
41
+ | `status` | Show current state and suggest next action | *(inline below)* |
42
+
43
+ ---
44
+
45
+ ## Two Modes
46
+
47
+ ### Component mode
48
+ Design system components (Button, Card, Modal...):
49
+ ```
50
+ spec {component} → design → review → done
51
+ ```
52
+ Spec includes: architecture, props API, variants, tokens, Figma link.
53
+
54
+ ### Screen mode
55
+ Full interfaces (dashboard, settings, onboarding...):
56
+ ```
57
+ spec {screen}
58
+ → if new DS components identified:
59
+ spec {component} → design {component} → done {component}
60
+ → design {screen} → review → done
61
+ ```
62
+ Spec includes: layout, sections, components used, content structure, responsive rules.
63
+ **If the spec identifies UI patterns not covered by existing DS components**, they are flagged as new components. Each new component gets its own spec → design → done cycle before the screen design proceeds.
64
+
65
+ The `spec` action auto-detects the mode from context, or asks the user.
66
+
67
+ ---
68
+
69
+ ## Full Workflow
70
+
71
+ ```
72
+ setup (first time only)
73
+ → Extract DS via figma-console-mcp
74
+ → Build knowledge base (registries + guides)
75
+
76
+ spec {name}
77
+
78
+ ├─ [screen mode] → new components check
79
+ │ └─ spec {component} → design → done → back to screen
80
+
81
+
82
+ design
83
+
84
+ ├─ STEP A: Pattern Matching ← BLOCKING
85
+ │ 1. Identify screen type
86
+ │ 2. Load design-patterns.md
87
+ │ 3. Read min 2 reference screenshots
88
+ │ 4. Extract: layout zones, proportions, density, hierarchy
89
+ │ 5. Gate: pattern matched and documented
90
+
91
+ ├─ STEP B: Atomic Generation via figma_execute
92
+ │ 1. Split into small sequential scripts (~30-80 lines each)
93
+ │ 2. After each step: verify with figma_take_screenshot
94
+ │ 3. Fix issues before proceeding to next step
95
+ │ 4. Generate states (clone + modify)
96
+
97
+
98
+ review
99
+
100
+ ├─ Structural review (spec compliance, tokens, completeness)
101
+
102
+ ├─ Visual fidelity review ← BLOCKING
103
+ │ 1. Compare with reference screenshots
104
+ │ 2. Check: layout, density, hierarchy, card patterns, navigation
105
+ │ 3. Verdict: PASS / FAIL with identified gaps
106
+
107
+
108
+ done
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Action Router
114
+
115
+ Detect intent from user input and **read the action file BEFORE executing**:
116
+
117
+ | User says | Route to |
118
+ |-----------|----------|
119
+ | "setup", "extract DS", "build knowledge base", "onboard" | `references/onboarding.md` (STEP 0) |
120
+ | "spec", "write spec", "new component", "new screen" | `references/actions/spec.md` |
121
+ | "design", "figma", "generate", "push to figma" | `references/actions/design.md` |
122
+ | "review", "check", "validate", "audit" | `references/actions/review.md` |
123
+ | "done", "finish", "complete", "close", "ship" | `references/actions/done.md` |
124
+ | "drop", "abandon", "cancel" | `references/actions/drop.md` |
125
+ | "status", "workflow", "what's next", "what now" | *(status logic below)* |
126
+
127
+ ---
128
+
129
+ ## Project Structure
130
+
131
+ ```
132
+ specs/
133
+ active/ ← Current work (0-1 specs)
134
+ backlog/ ← Queued specs
135
+ shipped/ ← Completed & archived
136
+ dropped/ ← Abandoned with learnings
137
+ history.log ← One-line per design shipped
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Status Logic (inline)
143
+
144
+ Detect state by checking:
145
+ 1. Does the knowledge base exist? (`references/knowledge-base/registries/` has JSON files)
146
+ 2. Does `specs/active/` contain a spec?
147
+ 3. Has a Figma design been generated for it?
148
+
149
+ | State | Suggestion |
150
+ |-------|------------|
151
+ | No knowledge base | "Run: `setup` to extract and document your DS" |
152
+ | No spec | "Ready. Run: `spec {name}`" |
153
+ | Active spec, no Figma design | "Spec ready. Run: `design`" |
154
+ | Active spec + Figma done | "Design ready. Run: `review`" |
155
+ | Review passed | "Run: `done`" |
156
+
157
+ ---
158
+
159
+ ## Quality Gates
160
+
161
+ Full definitions: `references/quality-gates.md` (read before any phase transition).
162
+
163
+ ---
164
+
165
+ ## Guided Mode (DEFAULT)
166
+
167
+ **Read `references/onboarding.md` BEFORE any action.** It defines the step-by-step flow with blocking gates.
168
+
169
+ **Non-negotiable rules:**
170
+ - NEVER skip spec creation, validation, or new components check
171
+ - NEVER skip pattern matching (no design without studying screenshots)
172
+ - ALWAYS read the action file BEFORE executing
173
+ - ALWAYS read `references/figma-api-rules.md` BEFORE writing any Figma script
174
+ - ALWAYS wait for user confirmation before generating in Figma
175
+
176
+ ---
177
+
178
+ ## References
179
+
180
+ | Reference | Path |
181
+ |-----------|------|
182
+ | Quality gates | `references/quality-gates.md` |
183
+ | Figma API rules | `references/figma-api-rules.md` |
184
+ | Onboarding flow | `references/onboarding.md` |
185
+ | Spec template (component) | `references/templates/spec-template.md` |
186
+ | Spec template (screen) | `references/templates/screen-template.md` |
187
+ | Design patterns | `references/knowledge-base/guides/design-patterns.md` |
188
+ | UI reference screenshots | `references/knowledge-base/ui-references/screenshots/` |
189
+
190
+ ---
191
+
192
+ ## MCP Tools Used
193
+
194
+ Bridge uses [figma-console-mcp](https://github.com/southleft/figma-console-mcp) for all Figma operations:
195
+
196
+ | Tool | Usage |
197
+ |------|-------|
198
+ | `figma_execute` | Run Figma Plugin API code (create frames, import components, bind variables) |
199
+ | `figma_take_screenshot` | Visual verification between atomic steps |
200
+ | `figma_get_design_system_kit` | Extract full DS (tokens + components + styles) during setup |
201
+ | `figma_get_variables` | Extract design tokens/variables |
202
+ | `figma_get_component` | Get component specs and properties |
203
+ | `figma_get_styles` | Get text, color, effect styles |
204
+ | `figma_search_components` | Find components by name |
205
+ | `figma_get_status` | Check Figma connection |
@@ -0,0 +1,207 @@
1
+ # Action: design
2
+
3
+ > Generate a Figma design from the active spec via figma-console-mcp.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - Active spec in `specs/active/` (abort if missing: "No active spec. Run: `spec {name}`")
10
+ - figma-console-mcp MCP server available (check with `figma_get_status`)
11
+ - **If screen spec lists "New DS Components Required"**: all listed components MUST be spec'd and designed first. Abort and prompt: "New component `{name}` needs to be created first. Run: `spec {name}`"
12
+
13
+ ---
14
+
15
+ ## Procedure
16
+
17
+ ### 1. Read the active spec + DS knowledge base
18
+
19
+ Parse from spec:
20
+ - Mode (component or screen)
21
+ - All variants/sections/states
22
+ - Design tokens (colors, spacing, typography, radius)
23
+ - DS components used (with Figma component keys from registry)
24
+ - Content/data examples
25
+
26
+ **Load knowledge base registries (CRITICAL — must load before any script):**
27
+ - `registries/components.json` → component keys
28
+ - `registries/variables.json` → variable names and keys
29
+ - `registries/text-styles.json` → text style keys
30
+ - `registries/icons.json` → icon component keys (if exists)
31
+ - `registries/logos.json` → logo component keys (if exists)
32
+ - `registries/illustrations.json` → illustration component keys (if exists)
33
+
34
+ **Load token guides:**
35
+ - `guides/tokens/color-usage.md` → color token decision tree
36
+ - `guides/tokens/spacing-usage.md` → spacing scale + usage
37
+ - `guides/tokens/typography-usage.md` → font families, hierarchy
38
+
39
+ **Load relevant component/pattern guides** (based on spec content):
40
+ - `guides/components/overview.md` → component decision tree
41
+ - Specific group guides as needed (actions.md, form-controls.md, etc.)
42
+ - Pattern guides as needed (form-patterns.md, multi-step-flow.md, etc.)
43
+
44
+ **Load Figma API rules (CRITICAL — read before writing any script):**
45
+ - `references/figma-api-rules.md` → all API patterns, variable binding, boilerplate
46
+
47
+ All paths relative to `.claude/skills/design-workflow/references/knowledge-base/`.
48
+
49
+ ### 1b. Pattern Matching (BLOCKING)
50
+
51
+ **This step is MANDATORY. No design generation without completing it.**
52
+
53
+ 1. Load `guides/design-patterns.md`
54
+ 2. Identify the screen type and find matching pattern(s)
55
+ 3. Read at least 2 reference screenshots from `ui-references/screenshots/`
56
+ 4. Extract pattern rules: layout zones, proportions, density, hierarchy, card patterns
57
+ 5. Confirm pattern match before proceeding:
58
+ ```
59
+ Pattern match: {pattern name}
60
+ Screenshots studied: {list}
61
+ Key rules applied: {bullet list}
62
+ ```
63
+
64
+ **GATE: If no pattern matches**, ask the user which existing pattern is closest.
65
+
66
+ ### 1c. Canvas dimensions
67
+
68
+ - **Web**: 1440px wide
69
+ - **Mobile**: 390px wide
70
+ - **Tablet**: 1024px wide
71
+
72
+ ### 2. Ask target
73
+
74
+ Ask the user:
75
+ - **Which Figma file?** (URL or fileKey)
76
+ - **Which page?** (or create a new page)
77
+
78
+ Verify connection:
79
+ ```
80
+ figma_get_status()
81
+ ```
82
+
83
+ **Library activation check:** Verify DS libraries are **enabled** in the target file. `importComponentByKeyAsync` only works with published AND enabled libraries.
84
+
85
+ ### 3. Generate the design — Atomic Steps
86
+
87
+ Write and execute Figma Plugin API scripts via `figma_execute`.
88
+
89
+ **Before writing any script, read `references/figma-api-rules.md`.** It contains:
90
+ - Mandatory patterns (FILL after appendChild, variable binding, font loading)
91
+ - DS component reuse rules (Rule 18) and canvas positioning (Rule 19)
92
+ - Standard script boilerplate with helpers
93
+
94
+ **Script execution via MCP:**
95
+ ```
96
+ figma_execute({
97
+ code: "return (async function() { ... your Plugin API code ... return { success: true }; })();"
98
+ })
99
+ ```
100
+
101
+ The `return` before the IIFE is mandatory — without it, the Promise is lost.
102
+
103
+ **Atomic generation (MANDATORY approach):**
104
+
105
+ Never generate a full design in a single script. Split into small, sequential steps (~30-80 lines each). Each step:
106
+ 1. Does ONE thing (structure, populate a section, override instances...)
107
+ 2. Returns node IDs needed by subsequent steps
108
+ 3. Is verified with a screenshot before moving on
109
+
110
+ **CRITICAL — Pre-script element audit (BLOCKING, Rule 18):**
111
+
112
+ Before writing EACH script, list every visual element it will create and verify against registries:
113
+ ```
114
+ Elements in this step:
115
+ - Avatar → components.json key: xxx ✓
116
+ - Divider → components.json key: xxx ✓
117
+ - Label text → raw text (layout frame label, no DS component) ✓
118
+ ```
119
+ If an element exists in `components.json`, it MUST be imported via `importComponentByKeyAsync`. NEVER recreate as raw frame/text/shape. NEVER hardcode hex colors — always bind variables.
120
+
121
+ **Standard steps for a screen:**
122
+
123
+ | Step | What | Lines | Returns |
124
+ |------|------|-------|---------|
125
+ | 1. Structure | Root frame + major section frames (empty) | ~40-60 | rootId, sectionIds |
126
+ | 2. Top bar / Nav | Populate nav with DS component instances | ~20-30 | — |
127
+ | 3. Content sections | One step per major section (header, cards, etc.) | ~40-60 | sectionId |
128
+ | 4. Footer / minor | Populate footer, labels, secondary elements | ~20-30 | — |
129
+ | 5. Instance overrides | Set TEXT/ICON props on all instances | ~30-50 | — |
130
+ | 6. States | Clone root + modify for additional states | ~30-50 | stateIds |
131
+
132
+ **Standard steps for a component:**
133
+
134
+ | Step | What | Lines | Returns |
135
+ |------|------|-------|---------|
136
+ | 1. Build variants | Create component frames with structure | ~60-80 | variantIds |
137
+ | 2. Combine + props | `combineAsVariants` + `addComponentProperty` | ~30-40 | compSetId |
138
+ | 3. Bind props | `componentPropertyReferences` on all nodes | ~30-40 | — |
139
+ | 4. Refinements | Adjust spacing, sizing, visual polish | ~20-30 | — |
140
+
141
+ **After each step:** verify visually with `figma_take_screenshot` before proceeding:
142
+ ```
143
+ figma_take_screenshot({ node_id: "{rootOrSectionId}", file_key: "{fileKey}" })
144
+ ```
145
+ Compare the screenshot against the spec and reference patterns. If something is wrong, fix it before moving to the next step.
146
+
147
+ ### 3b. Component Properties (component mode)
148
+
149
+ When generating a **component**, expose all properties defined in the spec:
150
+ 1. `addComponentProperty()` AFTER `combineAsVariants()` — see `figma-api-rules.md` Rule 9a
151
+ 2. **Bind TEXT props** to text nodes via `componentPropertyReferences` — Rule 9b
152
+ 3. **Bind INSTANCE_SWAP props** to icon/sub-component instances — Rule 9d
153
+ 4. **Bind BOOLEAN props** to optional elements — Rule 9e
154
+
155
+ ### 3c. Instance Overrides (screen mode)
156
+
157
+ When placing component instances in a **screen**, override properties to show specific content:
158
+ - Use `instance.setProperties({ [propKey]: value })` for TEXT overrides — Rule 9c
159
+ - Use `instance.setProperties({ [propKey]: componentId })` for INSTANCE_SWAP overrides
160
+ - Each instance should show unique, realistic content (not default placeholder text)
161
+
162
+ ### 3d. Zero Raw Elements Rule
163
+
164
+ Before creating ANY visual element, check registries:
165
+ 1. `components.json` — Buttons, Tags, Inputs, etc.
166
+ 2. `icons.json` — All utility icons
167
+ 3. `logos.json` — All brand logos
168
+ 4. `illustrations.json` — Illustrations
169
+
170
+ Only create raw elements for pure layout frames or when no DS component exists (document why).
171
+
172
+ ### 4. Multi-state generation
173
+
174
+ 1. Create the base state first
175
+ 2. Clone the root frame for each additional state
176
+ 3. Modify each clone (swap variants, update text, change progress)
177
+ 4. Add state labels above each frame
178
+
179
+ ### 5. Final naming cleanup
180
+
181
+ Verify all layers have semantic names (no "Frame", "Rectangle", "Group").
182
+
183
+ ---
184
+
185
+ ## Output
186
+
187
+ ```
188
+ Design created in Figma.
189
+
190
+ File: {figma_url}
191
+ Created:
192
+ - {n} frames with auto-layout
193
+ - {n} variables bound (colors + spacing + radius)
194
+ - {n} DS component instances
195
+ - States: {list}
196
+
197
+ Warnings:
198
+ - {any issues}
199
+
200
+ Next: review the design in Figma, then run: `review`
201
+ ```
202
+
203
+ ---
204
+
205
+ ## Transition
206
+
207
+ When design is in Figma → suggest: "Run: `review`"
@@ -0,0 +1,48 @@
1
+ # Action: done
2
+
3
+ > Archive the spec and close the work.
4
+
5
+ ---
6
+
7
+ ## Procedure
8
+
9
+ ### 1. Final check
10
+
11
+ - [ ] Figma design exists and matches spec
12
+ - [ ] All acceptance criteria from spec are met
13
+ - [ ] User has validated the design
14
+
15
+ ### 2. Archive
16
+
17
+ ```bash
18
+ mv specs/active/{name}-spec.md specs/shipped/{name}-spec.md
19
+ ```
20
+
21
+ ### 3. Update history log
22
+
23
+ Append to `specs/history.log`:
24
+
25
+ ```
26
+ {date} | {name} | {component|screen} | {figma_url} | {author}
27
+ ```
28
+
29
+ ### 4. Brief retro
30
+
31
+ - **What went well?** (patterns to repeat)
32
+ - **What was friction?** (improvements for the workflow)
33
+ - **What was learned?** (reusable knowledge)
34
+
35
+ ### 5. Cleanup
36
+
37
+ Delete any remaining temp files if not already done.
38
+
39
+ ---
40
+
41
+ ## Output
42
+
43
+ ```
44
+ ## Done: {name}
45
+
46
+ Figma: {url}
47
+ Spec archived: specs/shipped/{name}-spec.md
48
+ ```
@@ -0,0 +1,38 @@
1
+ # Action: drop
2
+
3
+ > Abandon the current work while preserving learnings.
4
+
5
+ ---
6
+
7
+ ## Procedure
8
+
9
+ ### 1. Confirm
10
+
11
+ Ask: "Sure you want to drop {name}?"
12
+
13
+ ### 2. Document learnings
14
+
15
+ Add to the spec:
16
+
17
+ ```markdown
18
+ ## Drop Notes
19
+ **Dropped**: {date}
20
+ **Reason**: {reason}
21
+ **Learnings**: {what was discovered, what blocked, what to do differently}
22
+ ```
23
+
24
+ ### 3. Archive
25
+
26
+ ```bash
27
+ mv specs/active/{name}-spec.md specs/dropped/{name}-spec.md
28
+ ```
29
+
30
+ ### 4. Update history
31
+
32
+ ```
33
+ {date} | {name} | DROPPED | {reason}
34
+ ```
35
+
36
+ ### 5. Cleanup
37
+
38
+ Delete temp files if any.
@@ -0,0 +1,149 @@
1
+ # Action: review
2
+
3
+ > Validate the Figma design against the spec. Check structure, tokens, and completeness.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - Active spec in `specs/active/`
10
+ - Figma design generated
11
+
12
+ ---
13
+
14
+ ## Procedure
15
+
16
+ ### 1. Gather artifacts + DS knowledge base
17
+
18
+ - Read the active spec
19
+ - Load knowledge base registries for validation:
20
+ - `references/knowledge-base/registries/components.json` → verify component instances match registry
21
+ - `references/knowledge-base/registries/variables.json` → verify variable bindings use correct names
22
+ - Inspect Figma design via MCP:
23
+ ```
24
+ figma_take_screenshot({ node_id: "{nodeId}", file_key: "{fileKey}" })
25
+ figma_get_variables({ file_key: "{fileKey}" })
26
+ ```
27
+
28
+ ### 2. Review checklist
29
+
30
+ #### A. Spec Compliance
31
+
32
+ - [ ] All variants/sections from spec are represented in Figma
33
+ - [ ] Architecture/layout matches spec diagram
34
+ - [ ] Content matches spec examples (or realistic equivalents)
35
+
36
+ #### B. Design Token Alignment
37
+
38
+ - [ ] Colors match spec tokens (no arbitrary hex values)
39
+ - [ ] Spacing follows token scale strictly (no off-scale values)
40
+ - [ ] Typography uses correct styles from the typography scale
41
+ - [ ] Radius values match tokens
42
+ - [ ] Token naming is semantic (`danger` not `red`, `moderate` not `gray`)
43
+ - [ ] Aliasing depth ≤ 2 levels
44
+ - [ ] **Variables are bound** (not hardcoded hex/px) — check via Figma inspect
45
+ - [ ] Variable names match `registries/variables.json` exactly
46
+ - [ ] **ZERO hardcoded hex colors** — every color must use a bound variable (Rule 18)
47
+
48
+ #### B2. DS Component Reuse Audit (BLOCKING — Rule 18)
49
+
50
+ Cross-reference every visual element in the design against `registries/components.json`:
51
+ - [ ] **Avatars** are DS Avatar instances (not raw ellipses/frames)
52
+ - [ ] **Dividers/Separators** are DS Divider instances (not raw rectangles)
53
+ - [ ] **Tags/Badges** are DS instances (not raw frames with text)
54
+ - [ ] **Buttons** are DS Button instances (not raw frames with text)
55
+ - [ ] **Icons** are DS Icon instances (not raw vectors)
56
+ - [ ] **Logos** are DS Logo instances
57
+ - [ ] Any raw frame is justified with a `// NO DS COMPONENT: {reason}` comment in the script
58
+
59
+ **If ANY DS component was recreated as raw elements → FAIL. Must be fixed before PASS.**
60
+
61
+ #### C. Completeness
62
+
63
+ **Component mode:**
64
+ - [ ] All sizes represented
65
+ - [ ] All states shown (default, hover, pressed, disabled if applicable)
66
+ - [ ] All optional prop combinations demonstrated
67
+ - [ ] Advanced compositions shown
68
+
69
+ **Screen mode:**
70
+ - [ ] All sections from spec present
71
+ - [ ] All states captured (empty, loading, populated, error)
72
+ - [ ] Responsive breakpoints if specified
73
+ - [ ] DS components are **real instances** (not placeholder rectangles)
74
+ - [ ] No `[MISSING]` placeholder frames remain
75
+
76
+ #### D. Design Quality
77
+
78
+ - [ ] Visual hierarchy is clear
79
+ - [ ] Spacing rhythm is consistent (follows token scale)
80
+ - [ ] Layer naming is semantic in Figma (not "Frame 42" or "Group 1")
81
+ - [ ] No orphan or misaligned elements
82
+ - [ ] Naming follows DS conventions: `{category}/{role}/{emphasis}`
83
+
84
+ #### E. Visual Fidelity (BLOCKING)
85
+
86
+ **Load before checking:**
87
+ - `references/knowledge-base/guides/design-patterns.md`
88
+ - The reference screenshots used during design generation
89
+
90
+ **Compare the generated design with the reference screenshots and pattern rules:**
91
+
92
+ - [ ] **Layout match** — Zones are in the correct positions (sidebar, content, header, footer)
93
+ - [ ] **Proportion match** — Relative widths/heights of zones match the pattern
94
+ - [ ] **Density match** — Information density is similar (not too sparse, not too crammed)
95
+ - [ ] **Hierarchy match** — Visual weight of title, sections, CTAs matches product's existing hierarchy
96
+ - [ ] **Card patterns match** — Card size, grid rhythm, gaps, internal layout follow the design patterns
97
+ - [ ] **Navigation match** — Sidebar/stepper/tabs follow the correct pattern for this screen type
98
+ - [ ] **Section organization** — Consistent spacing between sections, titles properly placed
99
+ - [ ] **Whitespace balance** — Margins and breathing room consistent with product density
100
+
101
+ **If any check fails:** identify the specific gap, reference the pattern rule that was violated, and suggest the fix.
102
+
103
+ #### F. Component API Quality (component mode)
104
+
105
+ - [ ] Is the composition pattern the right one? (slots vs config vs compound)
106
+ - [ ] Could the props surface be smaller?
107
+ - [ ] Is the component reusable beyond its primary use case?
108
+
109
+ ### 3. Report
110
+
111
+ ```markdown
112
+ ## Review: {name}
113
+
114
+ ### Spec Compliance: {OK / ISSUES}
115
+ {findings}
116
+
117
+ ### Token Alignment: {OK / ISSUES}
118
+ {findings}
119
+
120
+ ### Completeness: {OK / ISSUES}
121
+ {missing items}
122
+
123
+ ### Design Quality: {OK / ISSUES}
124
+ {findings}
125
+
126
+ ### Visual Fidelity: {OK / ISSUES}
127
+ Pattern matched: {pattern name}
128
+ Screenshots compared: {list}
129
+ {findings — specific gaps with pattern rule references}
130
+
131
+ ### Verdict: PASS / NEEDS ITERATION
132
+
133
+ ### Iteration needed:
134
+ 1. {what to fix}
135
+ ```
136
+
137
+ ### 4. Iterate if needed
138
+
139
+ If NEEDS ITERATION:
140
+ 1. Fix issues via `figma_execute` scripts (read `references/figma-api-rules.md` for patterns)
141
+ 2. Re-review only the fixed areas
142
+
143
+ Repeat until PASS.
144
+
145
+ ---
146
+
147
+ ## Transition
148
+
149
+ When review passes → suggest: "Review passed. Run: `done`"