@discourser/design-system 0.22.2 → 0.22.4
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/dist/figma-codex.json +2 -2
- package/docs/CSS_USAGE.md +235 -0
- package/docs/FIGMA_MAKE_SETUP.md +339 -0
- package/docs/GUIDELINES_REVIEW.md +728 -0
- package/docs/MAINTAINER_CHECKLIST.md +265 -0
- package/docs/TESTING_QUICK_REFERENCE.md +159 -0
- package/docs/TESTING_TOKENS.md +340 -0
- package/docs/active-stories/README.md +29 -0
- package/docs/active-stories/STORY-006a-figma-translation-foundations.md +324 -0
- package/docs/active-stories/STORY-006b-figma-translation-components.md +201 -0
- package/docs/active-stories/STORY-006c-figma-translation-layout-extension.md +258 -0
- package/docs/active-stories/STORY-008-kai-sidecar-fragments.md +137 -0
- package/docs/active-stories/STORY-011-verify-translation-docs.md +182 -0
- package/docs/archive/ARCHITECTURE-discourser-design-system.md +448 -0
- package/docs/claude-feed-back/ARCHITECTURE_DIAGRAM.md +243 -0
- package/docs/claude-feed-back/STYLING_VERIFICATION.md +89 -0
- package/docs/claude-feed-back/TEST_RESULTS.md +182 -0
- package/docs/context-share/ELEVATION_FIX_PLAN.md +903 -0
- package/docs/context-share/STORY-001-VALIDATION-PASSED.md +192 -0
- package/docs/context-share/STORY-002-IMPLEMENTATION-COMPLETE.md +161 -0
- package/docs/context-share/STORYBOOK_MCP_STRATEGY.md +867 -0
- package/docs/context-share/TESTING_GAPS_FILLED.md +353 -0
- package/docs/context-share/TOKEN_TESTING_SUMMARY.md +388 -0
- package/docs/context-share/code-connect-prompt.md +90 -0
- package/docs/context-share/dds-autonomous-pipeline.md +765 -0
- package/docs/context-share/fix-checkbox-radio-tokens.md +145 -0
- package/docs/context-share/icon-component-prompt.md +154 -0
- package/docs/context-share/icons/Audience.svg +3 -0
- package/docs/context-share/icons/AudioSpeaker.svg +3 -0
- package/docs/context-share/icons/BookmarkPlus.svg +3 -0
- package/docs/context-share/icons/ClipBoard.svg +8 -0
- package/docs/context-share/icons/DiscourserLogo.svg +4 -0
- package/docs/context-share/icons/ExitStudio.svg +4 -0
- package/docs/context-share/icons/Microphone.svg +5 -0
- package/docs/context-share/icons/NotebookPen.svg +3 -0
- package/docs/context-share/icons/PausePlay.svg +5 -0
- package/docs/context-share/icons/Play.svg +4 -0
- package/docs/context-share/icons/Record.svg +6 -0
- package/docs/context-share/icons/RepeatQuestion.svg +3 -0
- package/docs/context-share/icons/ScrollText.svg +3 -0
- package/docs/context-share/icons/Sparkles.svg +3 -0
- package/docs/context-share/icons/Speech.svg +3 -0
- package/docs/context-share/icons/StopPlay.svg +4 -0
- package/docs/context-share/icons/Timer.svg +3 -0
- package/docs/context-share/icons/UserProfile.svg +3 -0
- package/docs/context-share/m3-token-pipeline-audit.md +125 -0
- package/docs/context-share/storybook-mcp-kai-agent-revised-summary.md +211 -0
- package/docs/discourser-design-system-prd.md +3698 -0
- package/docs/figma-captures/01-typography.png +0 -0
- package/docs/figma-captures/02-button-iconbutton.png +0 -0
- package/docs/figma-captures/03-form-inputs.png +0 -0
- package/docs/figma-captures/04-form-controls.png +0 -0
- package/docs/figma-captures/05-data-display.png +0 -0
- package/docs/figma-captures/06-feedback.png +0 -0
- package/docs/figma-captures/07-overlays.png +0 -0
- package/docs/figma-captures/08-navigation-layout.png +0 -0
- package/docs/figma-captures/09-custom-components.png +0 -0
- package/docs/figma-captures/10-scenario-queue.png +0 -0
- package/docs/figma-captures/11-icon-library.png +0 -0
- package/docs/figma-make-docs/01-understanding-templates.md +235 -0
- package/docs/figma-make-docs/02-prerequisites.md +266 -0
- package/docs/figma-make-docs/03-creating-template.md +306 -0
- package/docs/figma-make-docs/04-adding-guidelines.md +448 -0
- package/docs/figma-make-docs/05-example-starter-code.md +590 -0
- package/docs/figma-make-docs/06-publishing-template.md +417 -0
- package/docs/figma-make-docs/07-maintenance.md +536 -0
- package/docs/figma-make-docs/08-faq.md +490 -0
- package/docs/figma-make-docs/README.md +95 -0
- package/docs/material-theme.json +418 -0
- package/docs/plans/2026-03-12-figma-token-export-rewrite.md +504 -0
- package/docs/plans/2026-03-12-step7-panda-token-resolution-design.md +119 -0
- package/docs/plans/2026-03-12-step7-panda-token-resolution.md +993 -0
- package/docs/token-name-mapping.json +850 -0
- package/docs/token-name-mapping.md +251 -0
- package/package.json +3 -2
|
@@ -0,0 +1,728 @@
|
|
|
1
|
+
# Guidelines Directory Review for Figma Make
|
|
2
|
+
|
|
3
|
+
**Review Date:** 2026-01-13
|
|
4
|
+
**Reviewer:** Claude Sonnet 4.5
|
|
5
|
+
**Reference:** [Figma Make Guidelines Documentation](https://developers.figma.com/docs/code/write-design-system-guidelines/)
|
|
6
|
+
|
|
7
|
+
## Executive Summary
|
|
8
|
+
|
|
9
|
+
**Overall Status:** 🟡 **Good Foundation, Needs Enhancement**
|
|
10
|
+
|
|
11
|
+
Your guidelines have **excellent comprehensive component documentation** (21 components with 300+ pages) but need some adjustments to fully align with Figma Make's AI consumption requirements.
|
|
12
|
+
|
|
13
|
+
### Quick Stats
|
|
14
|
+
|
|
15
|
+
- ✅ **Components Documented:** 21/30 (70%)
|
|
16
|
+
- ✅ **Token Files:** 4/4 (100%)
|
|
17
|
+
- ⚠️ **Overview Files:** 1/2+ recommended
|
|
18
|
+
- ✅ **Guidelines.md:** Present with step-by-step structure
|
|
19
|
+
- ⚠️ **Missing Documentation:** 9 components
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 1. What's Complete and Excellent ✅
|
|
24
|
+
|
|
25
|
+
### Component Documentation (21 components)
|
|
26
|
+
|
|
27
|
+
**Documented with comprehensive guidelines:**
|
|
28
|
+
|
|
29
|
+
**Interactive Elements (5):**
|
|
30
|
+
|
|
31
|
+
- Button
|
|
32
|
+
- IconButton
|
|
33
|
+
- Switch
|
|
34
|
+
- Checkbox
|
|
35
|
+
- RadioGroup
|
|
36
|
+
|
|
37
|
+
**Form Elements (3):**
|
|
38
|
+
|
|
39
|
+
- Input
|
|
40
|
+
- Textarea
|
|
41
|
+
- Select
|
|
42
|
+
|
|
43
|
+
**Layout & Container (4):**
|
|
44
|
+
|
|
45
|
+
- Card
|
|
46
|
+
- Accordion
|
|
47
|
+
- Tabs
|
|
48
|
+
- Drawer
|
|
49
|
+
|
|
50
|
+
**Overlays (3):**
|
|
51
|
+
|
|
52
|
+
- Dialog
|
|
53
|
+
- Popover
|
|
54
|
+
- Tooltip
|
|
55
|
+
|
|
56
|
+
**Feedback & Status (5):**
|
|
57
|
+
|
|
58
|
+
- Badge
|
|
59
|
+
- Avatar
|
|
60
|
+
- Toast
|
|
61
|
+
- Progress
|
|
62
|
+
- Skeleton
|
|
63
|
+
|
|
64
|
+
**Typography (1):**
|
|
65
|
+
|
|
66
|
+
- Header
|
|
67
|
+
|
|
68
|
+
### Token Documentation (4 complete)
|
|
69
|
+
|
|
70
|
+
All required token categories documented:
|
|
71
|
+
|
|
72
|
+
- ✅ **colors.md** (187 lines) - Excellent semantic token explanation
|
|
73
|
+
- ✅ **typography.md** (226 lines) - Complete M3 type scale
|
|
74
|
+
- ✅ **spacing.md** (289 lines) - Clear 8px grid system
|
|
75
|
+
- ✅ **elevation.md** (274 lines) - M3 surface tint elevation
|
|
76
|
+
|
|
77
|
+
### Guidelines.md Structure
|
|
78
|
+
|
|
79
|
+
✅ **Strong step-by-step structure** (aligns with Figma requirements)
|
|
80
|
+
✅ **Clear navigation instructions**
|
|
81
|
+
✅ **Imperative language** ("MUST read", "DO NOT")
|
|
82
|
+
✅ **Organized by component category**
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 2. What's Missing ⚠️
|
|
87
|
+
|
|
88
|
+
### Missing Component Documentation (9 components)
|
|
89
|
+
|
|
90
|
+
These components exist in your codebase but lack guidelines:
|
|
91
|
+
|
|
92
|
+
**Utility Components:**
|
|
93
|
+
|
|
94
|
+
1. **InputAddon** - Input decorations (icons, buttons)
|
|
95
|
+
2. **InputGroup** - Grouped input layouts
|
|
96
|
+
3. **Slider** - Numeric range selection
|
|
97
|
+
4. **CloseButton** - Standard close button
|
|
98
|
+
5. **Icon** - Icon wrapper component
|
|
99
|
+
6. **Spinner** - Loading spinner (different from Skeleton)
|
|
100
|
+
7. **AbsoluteCenter** - Centering utility
|
|
101
|
+
8. **Group** - Layout helper
|
|
102
|
+
9. **Loader** - Loading indicator
|
|
103
|
+
|
|
104
|
+
**Priority Level:**
|
|
105
|
+
|
|
106
|
+
- 🔴 **High Priority:** InputAddon, InputGroup, Slider, Spinner
|
|
107
|
+
- 🟡 **Medium Priority:** CloseButton, Icon
|
|
108
|
+
- 🟢 **Low Priority:** AbsoluteCenter, Group, Loader (utility components, less frequently used)
|
|
109
|
+
|
|
110
|
+
### Missing Overview Files
|
|
111
|
+
|
|
112
|
+
According to Figma Make best practices, you should have:
|
|
113
|
+
|
|
114
|
+
**Currently Have:**
|
|
115
|
+
|
|
116
|
+
- ✅ `overview-components.md` (204 lines)
|
|
117
|
+
|
|
118
|
+
**Missing/Recommended:**
|
|
119
|
+
|
|
120
|
+
- ⚠️ **overview-icons.md** - Icon system overview (if you have an icon system)
|
|
121
|
+
- ⚠️ **overview-patterns.md** - Common UI patterns (forms, layouts, navigation)
|
|
122
|
+
- ⚠️ **overview-accessibility.md** - Accessibility principles across components
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 3. Alignment with Figma Make Requirements
|
|
127
|
+
|
|
128
|
+
### ✅ Strengths (Already Aligned)
|
|
129
|
+
|
|
130
|
+
#### 1. Guidelines.md Structure
|
|
131
|
+
|
|
132
|
+
**Requirement:** "Providing instructions in Guidelines.md helps Figma Make select the other detailed guidelines files most appropriate for its task."
|
|
133
|
+
|
|
134
|
+
**Your Implementation:**
|
|
135
|
+
|
|
136
|
+
```markdown
|
|
137
|
+
## IMPORTANT: Always Read These First
|
|
138
|
+
|
|
139
|
+
Before writing any code, follow these steps IN ORDER:
|
|
140
|
+
|
|
141
|
+
### Step 1: Read Overview Files (REQUIRED)
|
|
142
|
+
|
|
143
|
+
### Step 2: Read Design Token Files (REQUIRED)
|
|
144
|
+
|
|
145
|
+
### Step 3: Plan Components Needed (REQUIRED)
|
|
146
|
+
|
|
147
|
+
### Step 4: Read Component Guidelines BEFORE Using Components (REQUIRED)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
✅ **Excellent** - Clear, imperative, step-by-step
|
|
151
|
+
|
|
152
|
+
#### 2. Imperative Language
|
|
153
|
+
|
|
154
|
+
**Requirement:** "Use imperative, unambiguous statements. Avoid hedging."
|
|
155
|
+
|
|
156
|
+
**Your Examples:**
|
|
157
|
+
|
|
158
|
+
- ✅ "MUST read its guidelines file first"
|
|
159
|
+
- ✅ "DO NOT write code using a component until..."
|
|
160
|
+
- ✅ "Always use semantic tokens, never raw hex values"
|
|
161
|
+
|
|
162
|
+
✅ **Strong** - No hedging, absolute instructions
|
|
163
|
+
|
|
164
|
+
#### 3. Token Philosophy
|
|
165
|
+
|
|
166
|
+
**Requirement:** "Explain _why_ these tokens exist, how they create hierarchy"
|
|
167
|
+
|
|
168
|
+
**Your colors.md:**
|
|
169
|
+
|
|
170
|
+
```markdown
|
|
171
|
+
## Why Semantic Colors?
|
|
172
|
+
|
|
173
|
+
Semantic colors automatically adapt to light/dark themes and follow M3 color roles.
|
|
174
|
+
Using semantic names ensures:
|
|
175
|
+
|
|
176
|
+
- Automatic theme switching
|
|
177
|
+
- Consistent contrast ratios
|
|
178
|
+
- Proper color relationships
|
|
179
|
+
- Accessibility compliance
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
✅ **Excellent** - Clear philosophy with benefits
|
|
183
|
+
|
|
184
|
+
#### 4. Component Do's & Don'ts
|
|
185
|
+
|
|
186
|
+
**Requirement:** "Correct usage patterns with code examples, incorrect patterns to avoid"
|
|
187
|
+
|
|
188
|
+
**Your Pattern (every component):**
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## DO NOT
|
|
192
|
+
|
|
193
|
+
❌ Don't use native HTML when components exist
|
|
194
|
+
<button>Submit</button> // Use <Button> instead
|
|
195
|
+
|
|
196
|
+
✅ Use design system components
|
|
197
|
+
<Button variant="filled">Submit</Button>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
✅ **Excellent** - Clear ❌/✅ pattern with code examples
|
|
201
|
+
|
|
202
|
+
### ⚠️ Areas for Enhancement
|
|
203
|
+
|
|
204
|
+
#### 1. Decision Trees (Missing)
|
|
205
|
+
|
|
206
|
+
**Requirement:** "Start files with decision trees or quick-reference tables"
|
|
207
|
+
|
|
208
|
+
**Current State:** Your components have selection guides buried in content
|
|
209
|
+
|
|
210
|
+
**Recommendation:** Add decision trees at the **top** of each component file
|
|
211
|
+
|
|
212
|
+
**Example for Select component:**
|
|
213
|
+
|
|
214
|
+
```markdown
|
|
215
|
+
# Select
|
|
216
|
+
|
|
217
|
+
## When to Use This Component
|
|
218
|
+
|
|
219
|
+
**Decision Tree:**
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Need user to choose from options?
|
|
223
|
+
├─ 1-3 options? → Use RadioGroup
|
|
224
|
+
├─ 4-20 options? → Use Select ✅
|
|
225
|
+
├─ 20+ options with search? → Use Select with search
|
|
226
|
+
└─ Freeform input? → Use Input with autocomplete
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Improved Format:**
|
|
231
|
+
|
|
232
|
+
| Scenario | Use This Component | Why |
|
|
233
|
+
|----------|-------------------|-----|
|
|
234
|
+
| 1-3 exclusive choices | RadioGroup | Clear visual comparison |
|
|
235
|
+
| 4-20 options | Select | Compact, scannable |
|
|
236
|
+
| 20+ with search | Select (searchable) | Efficient finding |
|
|
237
|
+
| Freeform text | Input | User needs flexibility |
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
#### 2. Multi-Token Examples (Sparse)
|
|
241
|
+
|
|
242
|
+
**Requirement:** "Demonstrate how different tokens work together"
|
|
243
|
+
|
|
244
|
+
**Current State:** Token files show individual tokens well, but limited cross-token examples
|
|
245
|
+
|
|
246
|
+
**Recommendation:** Add section to each token file showing token combinations
|
|
247
|
+
|
|
248
|
+
**Example for colors.md:**
|
|
249
|
+
|
|
250
|
+
````markdown
|
|
251
|
+
## Token Combinations in Practice
|
|
252
|
+
|
|
253
|
+
### Primary Button (Filled)
|
|
254
|
+
|
|
255
|
+
```typescript
|
|
256
|
+
<Button variant="filled">
|
|
257
|
+
// Uses these tokens together:
|
|
258
|
+
bg: 'primary' // #4C662B in light mode
|
|
259
|
+
color: 'onPrimary' // #FFFFFF in light mode
|
|
260
|
+
textStyle: 'labelLarge' // Typography token
|
|
261
|
+
px: 'lg' // Spacing token
|
|
262
|
+
borderRadius: 'l2' // Border radius token
|
|
263
|
+
</Button>
|
|
264
|
+
```
|
|
265
|
+
````
|
|
266
|
+
|
|
267
|
+
### Card on Surface
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
<Card>
|
|
271
|
+
// Uses these tokens together:
|
|
272
|
+
bg: 'surfaceContainerLow' // Elevated surface
|
|
273
|
+
color: 'onSurface' // Default text
|
|
274
|
+
borderColor: 'outlineVariant' // Subtle border
|
|
275
|
+
p: 'lg' // Padding
|
|
276
|
+
borderRadius: 'l3' // Large radius
|
|
277
|
+
</Card>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
````
|
|
281
|
+
|
|
282
|
+
#### 3. Context Management (Could Be Improved)
|
|
283
|
+
|
|
284
|
+
**Requirement:** "Keep Guidelines.md focused on navigation only. Move detailed info to specialized files."
|
|
285
|
+
|
|
286
|
+
**Current State:** Your Guidelines.md has some detailed content (Quick Reference tables, import examples)
|
|
287
|
+
|
|
288
|
+
**Recommendation:** Move details to overview files
|
|
289
|
+
|
|
290
|
+
**Current (195 lines):**
|
|
291
|
+
```markdown
|
|
292
|
+
## Package Imports
|
|
293
|
+
[Detailed import code examples]
|
|
294
|
+
|
|
295
|
+
## Quick Reference
|
|
296
|
+
[Large tables with variants/sizes]
|
|
297
|
+
````
|
|
298
|
+
|
|
299
|
+
**Improved Structure:**
|
|
300
|
+
|
|
301
|
+
```markdown
|
|
302
|
+
# Guidelines.md (keep short, ~100 lines)
|
|
303
|
+
|
|
304
|
+
- Navigation steps only
|
|
305
|
+
- Links to overview files
|
|
306
|
+
|
|
307
|
+
# overview-components.md (expand this)
|
|
308
|
+
|
|
309
|
+
- Import patterns
|
|
310
|
+
- Quick reference tables
|
|
311
|
+
- Component category explanations
|
|
312
|
+
|
|
313
|
+
# overview-imports.md (new file)
|
|
314
|
+
|
|
315
|
+
- Detailed import examples
|
|
316
|
+
- Package structure
|
|
317
|
+
- Module exports
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
#### 4. Working Code Examples (Good, Could Add Edge Cases)
|
|
321
|
+
|
|
322
|
+
**Requirement:** "Include working code examples for all patterns"
|
|
323
|
+
|
|
324
|
+
**Current State:** ✅ You have 15-30 examples per component
|
|
325
|
+
|
|
326
|
+
**Enhancement:** Add **edge case** examples explicitly
|
|
327
|
+
|
|
328
|
+
**Example for Select:**
|
|
329
|
+
|
|
330
|
+
````markdown
|
|
331
|
+
## Edge Cases
|
|
332
|
+
|
|
333
|
+
### Empty State
|
|
334
|
+
|
|
335
|
+
```typescript
|
|
336
|
+
<Select.Root collection={items} value={[]}>
|
|
337
|
+
{items.length === 0 ? (
|
|
338
|
+
<Select.Control>
|
|
339
|
+
<Select.ValueText placeholder="No options available" />
|
|
340
|
+
</Select.Control>
|
|
341
|
+
) : (
|
|
342
|
+
// Normal select rendering
|
|
343
|
+
)}
|
|
344
|
+
</Select.Root>
|
|
345
|
+
```
|
|
346
|
+
````
|
|
347
|
+
|
|
348
|
+
### Pre-selected Value Not in List
|
|
349
|
+
|
|
350
|
+
```typescript
|
|
351
|
+
// Handle gracefully when defaultValue doesn't exist
|
|
352
|
+
const safeDefaultValue = items.find(item => item.value === savedValue)
|
|
353
|
+
? savedValue
|
|
354
|
+
: items[0]?.value;
|
|
355
|
+
|
|
356
|
+
<Select.Root defaultValue={safeDefaultValue}>
|
|
357
|
+
{/* ... */}
|
|
358
|
+
</Select.Root>
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
````
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## 4. Specific Recommendations by Priority
|
|
366
|
+
|
|
367
|
+
### 🔴 High Priority (Critical for Figma Make)
|
|
368
|
+
|
|
369
|
+
#### 1. Add Decision Trees to Top of Component Files
|
|
370
|
+
|
|
371
|
+
**Why:** Figma Make AI needs quick decision logic without reading entire file
|
|
372
|
+
|
|
373
|
+
**Action:** Add a "When to Use" section with decision tree at line 5-15 of each component
|
|
374
|
+
|
|
375
|
+
**Template:**
|
|
376
|
+
```markdown
|
|
377
|
+
# [Component Name]
|
|
378
|
+
|
|
379
|
+
**Purpose:** [One sentence]
|
|
380
|
+
|
|
381
|
+
## When to Use This Component
|
|
382
|
+
|
|
383
|
+
[Decision tree or comparison table]
|
|
384
|
+
|
|
385
|
+
## Import
|
|
386
|
+
[Rest of content...]
|
|
387
|
+
````
|
|
388
|
+
|
|
389
|
+
**Estimate:** 2-3 hours for all 21 components
|
|
390
|
+
|
|
391
|
+
#### 2. Document Missing High-Priority Components
|
|
392
|
+
|
|
393
|
+
**Components:**
|
|
394
|
+
|
|
395
|
+
- InputAddon (used with Input)
|
|
396
|
+
- InputGroup (form layouts)
|
|
397
|
+
- Slider (range selection)
|
|
398
|
+
- Spinner (loading states)
|
|
399
|
+
|
|
400
|
+
**Why:** These are frequently used with other components, AI needs to know they exist
|
|
401
|
+
|
|
402
|
+
**Action:** Create component guidelines following your existing template
|
|
403
|
+
|
|
404
|
+
**Estimate:** 6-8 hours (4 components × 1.5-2 hours each)
|
|
405
|
+
|
|
406
|
+
#### 3. Add Multi-Token Integration Examples
|
|
407
|
+
|
|
408
|
+
**Where:** Add new section to each token file (colors, typography, spacing, elevation)
|
|
409
|
+
|
|
410
|
+
**Section Title:** "## How [Token Type] Works With Other Tokens"
|
|
411
|
+
|
|
412
|
+
**Content:** 5-10 examples showing token combinations in real components
|
|
413
|
+
|
|
414
|
+
**Estimate:** 3-4 hours total
|
|
415
|
+
|
|
416
|
+
### 🟡 Medium Priority (Improves AI Accuracy)
|
|
417
|
+
|
|
418
|
+
#### 4. Create overview-patterns.md
|
|
419
|
+
|
|
420
|
+
**Purpose:** Document common patterns that span multiple components
|
|
421
|
+
|
|
422
|
+
**Content:**
|
|
423
|
+
|
|
424
|
+
```markdown
|
|
425
|
+
# Common UI Patterns
|
|
426
|
+
|
|
427
|
+
## Form Layouts
|
|
428
|
+
|
|
429
|
+
### Vertical Form (Default)
|
|
430
|
+
|
|
431
|
+
[Complete example with Input, Textarea, Select, Button]
|
|
432
|
+
|
|
433
|
+
### Horizontal Form (Compact)
|
|
434
|
+
|
|
435
|
+
[Example with InputGroup, Button]
|
|
436
|
+
|
|
437
|
+
### Multi-Step Form
|
|
438
|
+
|
|
439
|
+
[Example with Tabs, validation, progress]
|
|
440
|
+
|
|
441
|
+
## Navigation Patterns
|
|
442
|
+
|
|
443
|
+
### Sidebar Navigation
|
|
444
|
+
|
|
445
|
+
[Example with Drawer, Card, Icon]
|
|
446
|
+
|
|
447
|
+
### Tabbed Interface
|
|
448
|
+
|
|
449
|
+
[Example with Tabs, Card content]
|
|
450
|
+
|
|
451
|
+
## Feedback Patterns
|
|
452
|
+
|
|
453
|
+
### Success Flow
|
|
454
|
+
|
|
455
|
+
[Toast + Progress + Badge examples]
|
|
456
|
+
|
|
457
|
+
### Error Handling
|
|
458
|
+
|
|
459
|
+
[Input validation + Toast + Dialog]
|
|
460
|
+
|
|
461
|
+
## Loading States
|
|
462
|
+
|
|
463
|
+
### Page Load
|
|
464
|
+
|
|
465
|
+
[Skeleton → Content transition]
|
|
466
|
+
|
|
467
|
+
### Partial Load
|
|
468
|
+
|
|
469
|
+
[Spinner for specific sections]
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
**Estimate:** 4-5 hours
|
|
473
|
+
|
|
474
|
+
#### 5. Refactor Guidelines.md for Cleaner Navigation
|
|
475
|
+
|
|
476
|
+
**Current:** 195 lines with mixed navigation + content
|
|
477
|
+
|
|
478
|
+
**Target:** ~100 lines, navigation only
|
|
479
|
+
|
|
480
|
+
**Actions:**
|
|
481
|
+
|
|
482
|
+
- Move "Package Imports" section → overview-imports.md (new)
|
|
483
|
+
- Move "Quick Reference" tables → overview-components.md (expand existing)
|
|
484
|
+
- Keep only: System intro, Step-by-step instructions, Core principles
|
|
485
|
+
|
|
486
|
+
**Estimate:** 2 hours
|
|
487
|
+
|
|
488
|
+
#### 6. Add Edge Case Examples to Complex Components
|
|
489
|
+
|
|
490
|
+
**Target Components:**
|
|
491
|
+
|
|
492
|
+
- Select (empty state, invalid pre-selected value, dynamic options)
|
|
493
|
+
- Dialog (nested dialogs, focus trap edge cases)
|
|
494
|
+
- Tabs (dynamic tabs, too many tabs, accessibility)
|
|
495
|
+
- Drawer (stacked drawers, mobile considerations)
|
|
496
|
+
|
|
497
|
+
**Estimate:** 3-4 hours
|
|
498
|
+
|
|
499
|
+
### 🟢 Low Priority (Nice to Have)
|
|
500
|
+
|
|
501
|
+
#### 7. Document Utility Components
|
|
502
|
+
|
|
503
|
+
**Components:** CloseButton, Icon, AbsoluteCenter, Group, Loader
|
|
504
|
+
|
|
505
|
+
**Rationale:** Less frequently used, AI can infer usage more easily
|
|
506
|
+
|
|
507
|
+
**Estimate:** 3-4 hours
|
|
508
|
+
|
|
509
|
+
#### 8. Create overview-accessibility.md
|
|
510
|
+
|
|
511
|
+
**Content:**
|
|
512
|
+
|
|
513
|
+
- WCAG 2.1 compliance overview
|
|
514
|
+
- Keyboard navigation patterns across components
|
|
515
|
+
- Screen reader testing guidelines
|
|
516
|
+
- Color contrast requirements
|
|
517
|
+
- Focus management principles
|
|
518
|
+
|
|
519
|
+
**Estimate:** 3-4 hours
|
|
520
|
+
|
|
521
|
+
#### 9. Add overview-icons.md (if you have icon system)
|
|
522
|
+
|
|
523
|
+
**Only if:** You have a standardized icon system/library
|
|
524
|
+
|
|
525
|
+
**Content:**
|
|
526
|
+
|
|
527
|
+
- Icon naming conventions
|
|
528
|
+
- Icon sizing system
|
|
529
|
+
- When to use Icon vs. IconButton
|
|
530
|
+
- Custom icon integration
|
|
531
|
+
|
|
532
|
+
**Estimate:** 2-3 hours
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## 5. Token Documentation Quality Assessment
|
|
537
|
+
|
|
538
|
+
### colors.md ✅ Excellent
|
|
539
|
+
|
|
540
|
+
**Strengths:**
|
|
541
|
+
|
|
542
|
+
- ✅ Clear "Why Semantic Colors?" philosophy
|
|
543
|
+
- ✅ Complete token reference with light/dark values
|
|
544
|
+
- ✅ Usage guidance for each token
|
|
545
|
+
- ✅ Color pairing rules ("on-" pattern)
|
|
546
|
+
- ✅ Accessibility mention
|
|
547
|
+
|
|
548
|
+
**Minor Enhancements:**
|
|
549
|
+
|
|
550
|
+
- Add decision tree for choosing color tokens
|
|
551
|
+
- Add 3-5 multi-token examples (color + typography + spacing)
|
|
552
|
+
|
|
553
|
+
### typography.md ✅ Excellent
|
|
554
|
+
|
|
555
|
+
**Strengths:**
|
|
556
|
+
|
|
557
|
+
- ✅ Complete M3 type scale
|
|
558
|
+
- ✅ Clear use cases for each scale
|
|
559
|
+
- ✅ Font family tokens documented
|
|
560
|
+
- ✅ Line height, weight, letter spacing included
|
|
561
|
+
|
|
562
|
+
**Minor Enhancements:**
|
|
563
|
+
|
|
564
|
+
- Add decision tree for selecting text styles
|
|
565
|
+
- Add examples showing typography + color pairings
|
|
566
|
+
|
|
567
|
+
### spacing.md ✅ Excellent
|
|
568
|
+
|
|
569
|
+
**Strengths:**
|
|
570
|
+
|
|
571
|
+
- ✅ Clear 8px grid explanation
|
|
572
|
+
- ✅ Usage patterns with code examples
|
|
573
|
+
- ✅ Common patterns section
|
|
574
|
+
- ✅ Component internal vs layout spacing distinction
|
|
575
|
+
|
|
576
|
+
**Minor Enhancements:**
|
|
577
|
+
|
|
578
|
+
- Add decision tree for spacing selection
|
|
579
|
+
- Add examples of spacing + elevation combinations
|
|
580
|
+
|
|
581
|
+
### elevation.md ✅ Excellent
|
|
582
|
+
|
|
583
|
+
**Strengths:**
|
|
584
|
+
|
|
585
|
+
- ✅ M3 surface tint system explained
|
|
586
|
+
- ✅ Clear elevation levels with use cases
|
|
587
|
+
- ✅ Shadow vs. tint approach documented
|
|
588
|
+
|
|
589
|
+
**Minor Enhancements:**
|
|
590
|
+
|
|
591
|
+
- Add decision tree for elevation selection
|
|
592
|
+
- Add examples showing elevation + color tokens
|
|
593
|
+
|
|
594
|
+
---
|
|
595
|
+
|
|
596
|
+
## 6. Implementation Roadmap
|
|
597
|
+
|
|
598
|
+
### Phase 1: Critical Alignment (Week 1)
|
|
599
|
+
|
|
600
|
+
**Goal:** Ensure Figma Make can accurately use existing components
|
|
601
|
+
|
|
602
|
+
1. **Day 1-2:** Add decision trees to all 21 component files
|
|
603
|
+
2. **Day 3:** Add multi-token examples to token files
|
|
604
|
+
3. **Day 4-5:** Document InputAddon, InputGroup, Slider, Spinner
|
|
605
|
+
|
|
606
|
+
**Deliverable:** Fully Figma Make-optimized documentation for 25 components
|
|
607
|
+
|
|
608
|
+
### Phase 2: Enhanced Patterns (Week 2)
|
|
609
|
+
|
|
610
|
+
**Goal:** Improve AI understanding of component interactions
|
|
611
|
+
|
|
612
|
+
1. **Day 1-2:** Create overview-patterns.md
|
|
613
|
+
2. **Day 3:** Refactor Guidelines.md for cleaner navigation
|
|
614
|
+
3. **Day 4-5:** Add edge case examples to complex components
|
|
615
|
+
|
|
616
|
+
**Deliverable:** Pattern library and refined navigation
|
|
617
|
+
|
|
618
|
+
### Phase 3: Complete Coverage (Week 3)
|
|
619
|
+
|
|
620
|
+
**Goal:** 100% component coverage + accessibility overview
|
|
621
|
+
|
|
622
|
+
1. **Day 1-2:** Document utility components (CloseButton, Icon, etc.)
|
|
623
|
+
2. **Day 3-4:** Create overview-accessibility.md
|
|
624
|
+
3. **Day 5:** Create overview-icons.md (if applicable)
|
|
625
|
+
|
|
626
|
+
**Deliverable:** Complete design system documentation
|
|
627
|
+
|
|
628
|
+
---
|
|
629
|
+
|
|
630
|
+
## 7. Figma Make Integration Checklist
|
|
631
|
+
|
|
632
|
+
Use this to verify alignment with Figma Make requirements:
|
|
633
|
+
|
|
634
|
+
### File Structure
|
|
635
|
+
|
|
636
|
+
- [x] `guidelines/Guidelines.md` exists and provides navigation
|
|
637
|
+
- [x] `guidelines/overview-components.md` exists
|
|
638
|
+
- [ ] `guidelines/overview-patterns.md` (recommended)
|
|
639
|
+
- [ ] `guidelines/overview-accessibility.md` (recommended)
|
|
640
|
+
- [x] `guidelines/design-tokens/` folder with 4 token categories
|
|
641
|
+
- [x] `guidelines/components/` folder with component docs
|
|
642
|
+
|
|
643
|
+
### Guidelines.md Quality
|
|
644
|
+
|
|
645
|
+
- [x] Step-by-step instructions for AI
|
|
646
|
+
- [x] Imperative language (no hedging)
|
|
647
|
+
- [x] Clear file navigation structure
|
|
648
|
+
- [ ] Kept under 150 lines (currently 195, could trim)
|
|
649
|
+
- [x] Links to all overview files
|
|
650
|
+
|
|
651
|
+
### Token Documentation Quality
|
|
652
|
+
|
|
653
|
+
- [x] Philosophy section (why tokens exist)
|
|
654
|
+
- [x] Complete token reference
|
|
655
|
+
- [x] Usage guidance for each token
|
|
656
|
+
- [ ] Decision trees for token selection
|
|
657
|
+
- [ ] Multi-token integration examples (5+ per file)
|
|
658
|
+
|
|
659
|
+
### Component Documentation Quality
|
|
660
|
+
|
|
661
|
+
- [x] Purpose statement
|
|
662
|
+
- [x] Import examples
|
|
663
|
+
- [x] Props/API reference
|
|
664
|
+
- [x] 15+ working code examples
|
|
665
|
+
- [x] Do's & Don'ts with ❌/✅
|
|
666
|
+
- [x] Accessibility guidelines
|
|
667
|
+
- [ ] Decision tree at top of file
|
|
668
|
+
- [ ] Edge case examples
|
|
669
|
+
|
|
670
|
+
### Content Quality
|
|
671
|
+
|
|
672
|
+
- [x] Imperative, unambiguous statements
|
|
673
|
+
- [x] No hedging language ("must" not "should")
|
|
674
|
+
- [x] Code examples are complete and working
|
|
675
|
+
- [x] Clear incorrect vs. correct patterns
|
|
676
|
+
- [x] Organized for AI context selection
|
|
677
|
+
|
|
678
|
+
### Coverage
|
|
679
|
+
|
|
680
|
+
- [x] 70% of components documented (21/30)
|
|
681
|
+
- [ ] 100% of commonly-used components (missing 4 high-priority)
|
|
682
|
+
- [x] All major token categories
|
|
683
|
+
- [ ] Common UI patterns documented
|
|
684
|
+
|
|
685
|
+
---
|
|
686
|
+
|
|
687
|
+
## 8. Conclusion
|
|
688
|
+
|
|
689
|
+
### Overall Assessment
|
|
690
|
+
|
|
691
|
+
**Score: 8/10** - Excellent foundation, minor enhancements needed
|
|
692
|
+
|
|
693
|
+
**Strengths:**
|
|
694
|
+
|
|
695
|
+
- ✅ **Comprehensive component docs** - 300+ pages, 500+ examples
|
|
696
|
+
- ✅ **Strong imperative language** - Clear AI instructions
|
|
697
|
+
- ✅ **Complete token system** - All M3 categories documented
|
|
698
|
+
- ✅ **Excellent structure** - Step-by-step Guidelines.md
|
|
699
|
+
- ✅ **Do's & Don'ts** - Clear ❌/✅ patterns throughout
|
|
700
|
+
|
|
701
|
+
**Priority Improvements:**
|
|
702
|
+
|
|
703
|
+
1. 🔴 **Add decision trees** to component files (2-3 hours)
|
|
704
|
+
2. 🔴 **Document 4 missing components** (6-8 hours)
|
|
705
|
+
3. 🔴 **Add multi-token examples** (3-4 hours)
|
|
706
|
+
4. 🟡 **Create overview-patterns.md** (4-5 hours)
|
|
707
|
+
5. 🟡 **Refactor Guidelines.md** (2 hours)
|
|
708
|
+
|
|
709
|
+
### Estimated Effort
|
|
710
|
+
|
|
711
|
+
**To achieve 10/10 Figma Make optimization:**
|
|
712
|
+
|
|
713
|
+
- **Phase 1 (Critical):** 11-15 hours
|
|
714
|
+
- **Phase 2 (Enhanced):** 9-11 hours
|
|
715
|
+
- **Phase 3 (Complete):** 8-10 hours
|
|
716
|
+
|
|
717
|
+
**Total:** 28-36 hours of work
|
|
718
|
+
|
|
719
|
+
### Recommendation
|
|
720
|
+
|
|
721
|
+
**Start with Phase 1** to maximize Figma Make effectiveness with minimal effort. The decision trees and multi-token examples will provide the biggest AI accuracy improvement.
|
|
722
|
+
|
|
723
|
+
Your existing documentation is **already usable with Figma Make** - these enhancements will make it **exceptional**.
|
|
724
|
+
|
|
725
|
+
---
|
|
726
|
+
|
|
727
|
+
**Generated:** 2026-01-13 by Claude Sonnet 4.5
|
|
728
|
+
**Next Review:** After Phase 1 implementation
|