specweave 0.23.12 → 0.23.16

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.
Files changed (90) hide show
  1. package/CLAUDE.md +55 -0
  2. package/dist/src/core/progress/error-logger.d.ts +58 -0
  3. package/dist/src/core/progress/error-logger.d.ts.map +1 -0
  4. package/dist/src/core/progress/error-logger.js +99 -0
  5. package/dist/src/core/progress/error-logger.js.map +1 -0
  6. package/dist/src/core/spec-detector.d.ts +5 -0
  7. package/dist/src/core/spec-detector.d.ts.map +1 -1
  8. package/dist/src/core/spec-detector.js +91 -33
  9. package/dist/src/core/spec-detector.js.map +1 -1
  10. package/package.json +1 -1
  11. package/plugins/specweave/hooks/docs-changed.sh +9 -1
  12. package/plugins/specweave/hooks/docs-changed.sh.backup +79 -0
  13. package/plugins/specweave/hooks/human-input-required.sh +9 -1
  14. package/plugins/specweave/hooks/human-input-required.sh.backup +75 -0
  15. package/plugins/specweave/hooks/post-first-increment.sh.backup +61 -0
  16. package/plugins/specweave/hooks/post-increment-change.sh +6 -1
  17. package/plugins/specweave/hooks/post-increment-change.sh.backup +98 -0
  18. package/plugins/specweave/hooks/post-increment-completion.sh +6 -1
  19. package/plugins/specweave/hooks/post-increment-completion.sh.backup +231 -0
  20. package/plugins/specweave/hooks/post-increment-planning.sh +6 -1
  21. package/plugins/specweave/hooks/post-increment-planning.sh.backup +1048 -0
  22. package/plugins/specweave/hooks/post-increment-status-change.sh +6 -1
  23. package/plugins/specweave/hooks/post-increment-status-change.sh.backup +147 -0
  24. package/plugins/specweave/hooks/post-metadata-change.sh +7 -1
  25. package/plugins/specweave/hooks/post-spec-update.sh.backup +158 -0
  26. package/plugins/specweave/hooks/post-user-story-complete.sh.backup +179 -0
  27. package/plugins/specweave/hooks/pre-command-deduplication.sh.backup +83 -0
  28. package/plugins/specweave/hooks/pre-implementation.sh +9 -1
  29. package/plugins/specweave/hooks/pre-implementation.sh.backup +67 -0
  30. package/plugins/specweave/hooks/pre-task-completion.sh +9 -1
  31. package/plugins/specweave/hooks/pre-task-completion.sh.backup +194 -0
  32. package/plugins/specweave/hooks/pre-tool-use.sh +9 -1
  33. package/plugins/specweave/hooks/pre-tool-use.sh.backup +133 -0
  34. package/plugins/specweave/hooks/user-prompt-submit.sh.backup +386 -0
  35. package/plugins/specweave-ado/hooks/post-living-docs-update.sh +9 -2
  36. package/plugins/specweave-ado/hooks/post-living-docs-update.sh.backup +353 -0
  37. package/plugins/specweave-ado/hooks/post-task-completion.sh +9 -1
  38. package/plugins/specweave-ado/hooks/post-task-completion.sh.backup +172 -0
  39. package/plugins/specweave-github/.claude-plugin/plugin.json +15 -1
  40. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +16 -0
  41. package/plugins/specweave-github/hooks/post-task-completion.sh +62 -1
  42. package/plugins/specweave-github/hooks/post-task-completion.sh.backup +258 -0
  43. package/plugins/specweave-jira/hooks/post-task-completion.sh +9 -1
  44. package/plugins/specweave-jira/hooks/post-task-completion.sh.backup +172 -0
  45. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +48 -0
  46. package/plugins/specweave-release/hooks/post-task-completion.sh.backup +110 -0
  47. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +0 -21
  48. package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +0 -626
  49. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +0 -318
  50. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +0 -208
  51. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +0 -1149
  52. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +0 -340
  53. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +0 -1010
  54. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +0 -20
  55. package/plugins/specweave-cost-optimizer/skills/cost-optimizer/SKILL.md +0 -190
  56. package/plugins/specweave-docs/.claude-plugin/plugin.json +0 -19
  57. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +0 -613
  58. package/plugins/specweave-docs/skills/spec-driven-brainstorming/README.md +0 -264
  59. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +0 -439
  60. package/plugins/specweave-docs/skills/spec-driven-debugging/README.md +0 -479
  61. package/plugins/specweave-docs/skills/spec-driven-debugging/SKILL.md +0 -652
  62. package/plugins/specweave-figma/.claude-plugin/.mcp.json +0 -12
  63. package/plugins/specweave-figma/.claude-plugin/plugin.json +0 -20
  64. package/plugins/specweave-figma/ARCHITECTURE.md +0 -453
  65. package/plugins/specweave-figma/README.md +0 -728
  66. package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +0 -632
  67. package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +0 -29
  68. package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +0 -27
  69. package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +0 -28
  70. package/plugins/specweave-frontend/.claude-plugin/plugin.json +0 -21
  71. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +0 -107
  72. package/plugins/specweave-frontend/skills/frontend/SKILL.md +0 -177
  73. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +0 -176
  74. package/plugins/specweave-testing/.claude-plugin/plugin.json +0 -20
  75. package/plugins/specweave-testing/skills/e2e-playwright/README.md +0 -506
  76. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +0 -457
  77. package/plugins/specweave-testing/skills/e2e-playwright/execute.js +0 -373
  78. package/plugins/specweave-testing/skills/e2e-playwright/lib/utils.js +0 -514
  79. package/plugins/specweave-testing/skills/e2e-playwright/package.json +0 -33
  80. package/plugins/specweave-tooling/.claude-plugin/plugin.json +0 -19
  81. package/plugins/specweave-tooling/skills/skill-creator/LICENSE.txt +0 -202
  82. package/plugins/specweave-tooling/skills/skill-creator/SKILL.md +0 -209
  83. package/plugins/specweave-tooling/skills/skill-creator/scripts/init_skill.py +0 -303
  84. package/plugins/specweave-tooling/skills/skill-creator/scripts/package_skill.py +0 -110
  85. package/plugins/specweave-tooling/skills/skill-creator/scripts/quick_validate.py +0 -65
  86. package/plugins/specweave-tooling/skills/skill-router/SKILL.md +0 -479
  87. package/plugins/specweave-ui/.claude-plugin/plugin.json +0 -26
  88. package/plugins/specweave-ui/.mcp.json +0 -10
  89. package/plugins/specweave-ui/README.md +0 -492
  90. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +0 -676
@@ -1,728 +0,0 @@
1
- # specweave-figma Plugin
2
-
3
- **Version**: 1.0.0
4
- **Status**: Beta (MCP-first architecture)
5
- **License**: MIT
6
-
7
- Convert Figma designs to production-ready code using workflow patterns and the Figma MCP server.
8
-
9
- ---
10
-
11
- ## What This Plugin Does
12
-
13
- The `specweave-figma` plugin provides **workflow patterns** for design-to-code conversion:
14
-
15
- ✅ **Extract design tokens** (colors, typography, spacing) → CSS/TypeScript
16
- ✅ **Generate components** (React, Angular, Vue, Svelte) from Figma frames
17
- ✅ **Scaffold tests** (React Testing Library, Jest)
18
- ✅ **Apply conventions** (Atomic Design, TypeScript, accessibility)
19
- ✅ **Integrate with SpecWeave** (living docs, increment tracking)
20
-
21
- **Important**: This plugin does **NOT** fetch Figma data directly. It uses the **official Figma MCP server** for data access, then applies workflow patterns to generate code.
22
-
23
- ---
24
-
25
- ## Architecture
26
-
27
- ```
28
- Figma MCP Server (Official)
29
- ↓ Provides design data
30
- Claude Code (MCP client)
31
- ↓ Makes data available to Claude
32
- specweave-figma Plugin
33
- ↓ Applies workflow patterns
34
- Production-ready code
35
- ```
36
-
37
- **Key Insight**: We don't reinvent Figma's API integration. We use their MCP server and focus on what SpecWeave does best: workflow patterns and conventions.
38
-
39
- See [ARCHITECTURE.md](./ARCHITECTURE.md) for the full technical deep dive.
40
-
41
- ---
42
-
43
- ## Prerequisites
44
-
45
- ### 1. Figma Account & Access Token
46
-
47
- **Required**:
48
- - Figma account (Starter plan or higher)
49
- - Personal access token (for API access)
50
-
51
- **Get Your Token**:
52
- 1. Open [Figma](https://figma.com) → Log in
53
- 2. Settings → Account → Personal access tokens
54
- 3. Click "Create new token"
55
- 4. Copy token (you'll need it for setup)
56
-
57
- **Rate Limits**:
58
- - **Free (View/Collab seats)**: 6 MCP calls per month
59
- - **Paid (Dev/Full seats)**: Tier 1 REST API rate limits
60
-
61
- ### 2. Figma Desktop App (Recommended)
62
-
63
- **Why Desktop?**
64
- - Local MCP server (no rate limits for development)
65
- - Faster response times
66
- - Better for rapid iteration
67
-
68
- **Download**:
69
- - https://figma.com/downloads
70
- - Install latest version (v118+)
71
-
72
- **Alternative**: Remote MCP server (`https://mcp.figma.com/mcp`) - uses rate limits
73
-
74
- ### 3. Claude Code
75
-
76
- **Required**:
77
- - Claude Code installed
78
- - Version 0.4.0+ (supports plugins + MCP)
79
-
80
- **Install Claude Code**:
81
- - https://claude.com/claude-code
82
-
83
- ---
84
-
85
- ## Installation
86
-
87
- ### Option 1: SpecWeave CLI (Recommended)
88
-
89
- ```bash
90
- # Install via SpecWeave plugin manager
91
- specweave plugin install figma
92
-
93
- # Verify installation
94
- specweave plugin list
95
- # Should show: ✅ specweave-figma (1.0.0)
96
- ```
97
-
98
- ### Option 2: Claude Code Native
99
-
100
- ```bash
101
- # Add SpecWeave marketplace
102
- /plugin marketplace add https://raw.githubusercontent.com/anton-abyzov/specweave/main/marketplace/.claude-plugin/marketplace.json
103
-
104
- # Install figma plugin
105
- /plugin install specweave-figma
106
-
107
- # Verify
108
- /plugin list
109
- ```
110
-
111
- ### Option 3: Manual (Development)
112
-
113
- ```bash
114
- # Clone SpecWeave repository
115
- git clone https://github.com/anton-abyzov/specweave.git
116
- cd specweave
117
-
118
- # Copy plugin to Claude
119
- cp -r plugins/specweave-figma ~/.claude/plugins/
120
- ```
121
-
122
- ---
123
-
124
- ## Configuration
125
-
126
- ### Step 1: Enable Figma MCP Server
127
-
128
- #### Option A: Desktop Server (Recommended)
129
-
130
- 1. Open **Figma Desktop** app
131
- 2. Open any design file
132
- 3. Switch to **Dev Mode** (Shift + D)
133
- 4. Find "MCP" section in the panel
134
- 5. Click **"Enable desktop MCP server"**
135
- 6. Server starts at: `http://127.0.0.1:3845/mcp`
136
-
137
- **Verify**:
138
- ```bash
139
- # Check if server is running
140
- curl http://127.0.0.1:3845/mcp
141
- # Should return: {"status": "ok"}
142
- ```
143
-
144
- #### Option B: Remote Server
145
-
146
- If you can't use Desktop app:
147
-
148
- 1. Set environment variable:
149
- ```bash
150
- export FIGMA_PERSONAL_ACCESS_TOKEN="your-token-here"
151
- ```
152
-
153
- 2. Configure `.mcp.json` (plugin handles this automatically)
154
-
155
- 3. Server URL: `https://mcp.figma.com/mcp`
156
-
157
- **Note**: Remote server uses API rate limits (6/month for free).
158
-
159
- ### Step 2: Configure Environment Variables
160
-
161
- **Required for remote server** (optional for desktop):
162
-
163
- ```bash
164
- # Add to ~/.bashrc or ~/.zshrc
165
- export FIGMA_PERSONAL_ACCESS_TOKEN="figd_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
166
-
167
- # Reload shell
168
- source ~/.bashrc # or source ~/.zshrc
169
- ```
170
-
171
- **For development**, create `.env`:
172
- ```bash
173
- # .env (gitignored)
174
- FIGMA_PERSONAL_ACCESS_TOKEN=figd_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
175
- ```
176
-
177
- ### Step 3: Verify Installation
178
-
179
- ```bash
180
- # In Claude Code, check MCP status
181
- /mcp status
182
-
183
- # Should show:
184
- # ✅ figma: Connected
185
- # URL: http://127.0.0.1:3845/mcp (Desktop)
186
- # OR: https://mcp.figma.com/mcp (Remote)
187
- ```
188
-
189
- **Test with a Figma file**:
190
- ```
191
- Extract design tokens from https://figma.com/file/your-file-id
192
- ```
193
-
194
- If successful, Claude will fetch data via MCP and apply workflow patterns.
195
-
196
- ---
197
-
198
- ## Usage
199
-
200
- ### Example 1: Extract Design Tokens
201
-
202
- **Prompt**:
203
- ```
204
- Extract design tokens from https://figma.com/file/ABC123/Design-System
205
- ```
206
-
207
- **What Happens**:
208
- 1. Claude uses Figma MCP to fetch variables
209
- 2. `figma-to-code` skill applies token extraction patterns
210
- 3. Generates files:
211
- ```
212
- src/design-tokens/
213
- ├── theme.css # CSS custom properties
214
- ├── tokens.ts # TypeScript tokens
215
- ├── tailwind.config.ts # Tailwind config (if requested)
216
- └── types.ts # TypeScript types
217
- ```
218
-
219
- **Generated Code**:
220
- ```css
221
- /* theme.css */
222
- :root {
223
- --color-primary-500: #3b82f6;
224
- --color-primary-600: #2563eb;
225
- --font-size-heading1: 2.25rem;
226
- --spacing-4: 1rem;
227
- }
228
- ```
229
-
230
- ```typescript
231
- // tokens.ts
232
- export const colors = {
233
- primary: { 500: '#3b82f6', 600: '#2563eb' }
234
- };
235
- export const typography = {
236
- heading1: { fontSize: '2.25rem', lineHeight: '1.2' }
237
- };
238
- ```
239
-
240
- ### Example 2: Generate React Component
241
-
242
- **Prompt**:
243
- ```
244
- Convert this Button component to React: https://figma.com/file/ABC123/Components/Button
245
- ```
246
-
247
- **What Happens**:
248
- 1. Claude fetches Button component data via MCP
249
- 2. Skill analyzes variants, properties, layout
250
- 3. Generates component files:
251
- ```
252
- src/components/atoms/Button/
253
- ├── Button.tsx # Component
254
- ├── Button.module.css # Styles
255
- ├── Button.test.tsx # Tests
256
- └── index.ts # Exports
257
- ```
258
-
259
- **Generated Component**:
260
- ```typescript
261
- // Button.tsx
262
- export type ButtonVariant = 'primary' | 'secondary' | 'text';
263
- export interface ButtonProps {
264
- variant?: ButtonVariant;
265
- size?: 'sm' | 'md' | 'lg';
266
- disabled?: boolean;
267
- children: React.ReactNode;
268
- }
269
-
270
- export const Button: React.FC<ButtonProps> = ({ ... }) => { ... };
271
- ```
272
-
273
- ### Example 3: Bootstrap Design System
274
-
275
- **Prompt**:
276
- ```
277
- Create a complete design system from https://figma.com/file/XYZ789
278
- ```
279
-
280
- **What Happens**:
281
- 1. Extract all design tokens
282
- 2. Generate token files (CSS, TypeScript, Tailwind)
283
- 3. Create folder structure (atoms/molecules/organisms)
284
- 4. Generate Storybook setup (optional)
285
- 5. Update SpecWeave living docs
286
-
287
- **File Structure**:
288
- ```
289
- src/
290
- ├── design-tokens/
291
- │ ├── theme.css
292
- │ ├── tokens.ts
293
- │ └── types.ts
294
- ├── components/
295
- │ ├── atoms/ (Button, Input, Label)
296
- │ ├── molecules/ (FormField, Card)
297
- │ └── organisms/ (Navigation, Hero)
298
- └── types/
299
- └── design-system.ts
300
- ```
301
-
302
- ---
303
-
304
- ## Supported Frameworks
305
-
306
- ### React
307
-
308
- **Output**:
309
- - TypeScript components
310
- - CSS Modules or Tailwind
311
- - React Testing Library tests
312
- - Storybook stories (optional)
313
-
314
- **Example**:
315
- ```bash
316
- "Generate React Button component from Figma"
317
- ```
318
-
319
- ### Angular
320
-
321
- **Output**:
322
- - Standalone components (Angular 15+)
323
- - SCSS styles
324
- - Jest tests
325
- - TypeScript types
326
-
327
- **Example**:
328
- ```bash
329
- "Convert this Figma component to Angular standalone component"
330
- ```
331
-
332
- ### Vue
333
-
334
- **Output**:
335
- - Composition API (Vue 3+)
336
- - Scoped styles
337
- - Vitest tests
338
- - TypeScript types
339
-
340
- **Example**:
341
- ```bash
342
- "Create Vue component from this Figma frame"
343
- ```
344
-
345
- ### Svelte
346
-
347
- **Output**:
348
- - TypeScript components
349
- - Scoped styles
350
- - Vitest tests
351
-
352
- **Example**:
353
- ```bash
354
- "Implement this design in Svelte with TypeScript"
355
- ```
356
-
357
- ---
358
-
359
- ## Workflow Patterns
360
-
361
- The plugin provides **4 core workflow patterns**:
362
-
363
- ### 1. Design Token Extraction
364
-
365
- **Converts**:
366
- - Figma variables → CSS custom properties
367
- - Figma text styles → Typography tokens
368
- - Figma spacing → Spacing scale
369
-
370
- **Output formats**:
371
- - CSS (custom properties)
372
- - TypeScript (token objects)
373
- - Tailwind (theme config)
374
-
375
- ### 2. Component Generation
376
-
377
- **Converts**:
378
- - Figma components → React/Angular/Vue/Svelte components
379
- - Variants → TypeScript union types
380
- - Properties → Component props
381
- - Auto Layout → Flexbox/Grid
382
-
383
- **Conventions**:
384
- - Atomic Design (atoms/molecules/organisms)
385
- - TypeScript for type safety
386
- - Co-located styles and tests
387
-
388
- ### 3. Layout Conversion
389
-
390
- **Converts**:
391
- - Auto Layout → Flexbox CSS
392
- - Constraints → Responsive design
393
- - Spacing → rem values (4px/8px grid)
394
-
395
- ### 4. Test Generation
396
-
397
- **Generates**:
398
- - Unit tests (component behavior)
399
- - Visual regression tests (Storybook snapshots)
400
- - Accessibility tests (ARIA, keyboard nav)
401
-
402
- ---
403
-
404
- ## SpecWeave Integration
405
-
406
- ### Living Docs
407
-
408
- After generating components, living docs are updated:
409
-
410
- ```markdown
411
- # Component Library
412
-
413
- ## Button
414
-
415
- **Source**: [Figma](https://figma.com/file/ABC/Button)
416
- **Status**: Implemented (2025-11-02)
417
- **Location**: src/components/atoms/Button/
418
-
419
- **Variants**: primary, secondary, text
420
- **Sizes**: sm, md, lg
421
-
422
- **Design Decisions**:
423
- - 8px border radius (friendly feel)
424
- - 2:1 padding ratio (better click targets)
425
- - 50% opacity for disabled (WCAG compliant)
426
- ```
427
-
428
- ### Increment Tracking
429
-
430
- Track component implementation progress:
431
-
432
- ```yaml
433
- # .specweave/increments/0006-design-system/tasks.md
434
- - [x] T-001: Extract design tokens
435
- - [x] T-002: Generate Button component
436
- - [ ] T-003: Generate Input component
437
- - [ ] T-004: Visual regression tests
438
- ```
439
-
440
- ---
441
-
442
- ## Troubleshooting
443
-
444
- ### MCP Server Not Connected
445
-
446
- **Error**:
447
- ```
448
- ❌ Figma MCP server not found
449
- ```
450
-
451
- **Solutions**:
452
-
453
- 1. **Desktop server not enabled**:
454
- - Open Figma Desktop app
455
- - Switch to Dev Mode (Shift + D)
456
- - Enable "desktop MCP server"
457
-
458
- 2. **Remote server missing token**:
459
- ```bash
460
- export FIGMA_PERSONAL_ACCESS_TOKEN="your-token"
461
- ```
462
-
463
- 3. **Verify MCP status**:
464
- ```bash
465
- /mcp status
466
- ```
467
-
468
- ### Rate Limit Exceeded
469
-
470
- **Error**:
471
- ```
472
- ❌ Figma API rate limit reached
473
- ```
474
-
475
- **Solutions**:
476
-
477
- 1. **Free plan**: 6 calls/month
478
- - Wait for reset (monthly)
479
- - OR upgrade to paid plan
480
-
481
- 2. **Paid plan**: Tier 1 limits
482
- - Check usage in Figma settings
483
- - Contact Figma support for increase
484
-
485
- 3. **Use Desktop server** (no rate limits for local dev):
486
- - Enable desktop MCP server
487
- - Develops locally without API calls
488
-
489
- ### Invalid Figma URL
490
-
491
- **Error**:
492
- ```
493
- ❌ Invalid Figma URL
494
- ```
495
-
496
- **Valid formats**:
497
- - `https://figma.com/file/ABC123/Design-Name`
498
- - `https://figma.com/design/ABC123/Design-Name`
499
- - File key: `ABC123`
500
-
501
- **Not valid**:
502
- - `figma.com/file/...` (missing https)
503
- - `ABC` (too short)
504
-
505
- ### Plugin Not Activating
506
-
507
- **Check**:
508
- 1. Plugin installed:
509
- ```bash
510
- specweave plugin list
511
- # OR
512
- /plugin list
513
- ```
514
-
515
- 2. MCP server connected:
516
- ```bash
517
- /mcp status
518
- ```
519
-
520
- 3. Trigger keywords used:
521
- - "figma to code"
522
- - "convert figma"
523
- - "design tokens"
524
- - "implement design"
525
-
526
- ---
527
-
528
- ## Configuration Files
529
-
530
- ### .mcp.json (Auto-generated)
531
-
532
- Located at: `~/.claude/plugins/specweave-figma/.claude-plugin/.mcp.json`
533
-
534
- ```json
535
- {
536
- "$schema": "https://spec-weave.com/schemas/mcp-config.json",
537
- "mcpServers": {
538
- "figma": {
539
- "command": "npx",
540
- "args": ["-y", "@modelcontextprotocol/server-figma"],
541
- "env": {
542
- "FIGMA_PERSONAL_ACCESS_TOKEN": "${FIGMA_PERSONAL_ACCESS_TOKEN}"
543
- }
544
- }
545
- }
546
- }
547
- ```
548
-
549
- **Desktop server** (alternative):
550
- ```json
551
- {
552
- "mcpServers": {
553
- "figma": {
554
- "url": "http://127.0.0.1:3845/mcp"
555
- }
556
- }
557
- }
558
- ```
559
-
560
- ### manifest.json (SpecWeave Metadata)
561
-
562
- Located at: `~/.claude/plugins/specweave-figma/.claude-plugin/manifest.json`
563
-
564
- ```json
565
- {
566
- "name": "specweave-figma",
567
- "version": "1.0.0",
568
- "provides": {
569
- "skills": ["figma-to-code"],
570
- "agents": [],
571
- "commands": []
572
- },
573
- "auto_detect": {
574
- "files": ["figma/", "design-system/"],
575
- "packages": ["figma", "@figma/plugin-typings"],
576
- "env_vars": ["FIGMA_ACCESS_TOKEN", "FIGMA_FILE_KEY"]
577
- }
578
- }
579
- ```
580
-
581
- ---
582
-
583
- ## Best Practices
584
-
585
- ### 1. Use Desktop Server for Development
586
-
587
- **Why**:
588
- - ✅ No rate limits (unlimited local calls)
589
- - ✅ Faster response (local vs. API)
590
- - ✅ Better for rapid iteration
591
-
592
- **Setup**: Enable once in Figma Desktop, use forever.
593
-
594
- ### 2. Commit Tokens, Not Credentials
595
-
596
- **Do commit**:
597
- - `src/design-tokens/theme.css`
598
- - `src/design-tokens/tokens.ts`
599
- - Generated components
600
-
601
- **Don't commit**:
602
- - `FIGMA_PERSONAL_ACCESS_TOKEN`
603
- - `.env` file with credentials
604
-
605
- **Use**:
606
- - `.env.example` (template)
607
- - `.gitignore` for `.env`
608
-
609
- ### 3. Link to Figma Source of Truth
610
-
611
- **In component docs**:
612
- ```markdown
613
- **Source**: [Figma Button](https://figma.com/file/ABC/Button)
614
- ```
615
-
616
- **Why**: Designers can see which code matches which designs.
617
-
618
- ### 4. Review Generated Code
619
-
620
- **AI generates scaffolds**, humans refine:
621
- - ✅ Check accessibility (ARIA, contrast)
622
- - ✅ Verify responsive behavior
623
- - ✅ Test edge cases
624
- - ✅ Add business logic
625
-
626
- **Don't blindly merge** - always review!
627
-
628
- ---
629
-
630
- ## FAQ
631
-
632
- ### Q: Do I need a paid Figma plan?
633
-
634
- **A**: No. Free plan works, but has 6 MCP calls/month. Desktop server has no rate limits.
635
-
636
- ### Q: Can I use this without Claude Code?
637
-
638
- **A**: Technically yes (via SpecWeave CLI), but you lose auto-activation and MCP integration. Cursor/Copilot support is limited.
639
-
640
- ### Q: Does this replace designers?
641
-
642
- **A**: No! This implements designs from Figma. Designers still create the source of truth.
643
-
644
- ### Q: What if Figma changes?
645
-
646
- **A**: We use the official Figma MCP server. If Figma updates their API, they update the MCP server, not our plugin.
647
-
648
- ### Q: Can I customize the workflow patterns?
649
-
650
- **A**: Yes! Fork the plugin, edit `skills/figma-to-code/SKILL.md`, reinstall locally.
651
-
652
- ### Q: Does this work with FigJam?
653
-
654
- **A**: Yes, if using official Figma MCP server (supports FigJam + Make resources).
655
-
656
- ---
657
-
658
- ## Contributing
659
-
660
- We welcome contributions!
661
-
662
- **How to help**:
663
- 1. Report bugs: https://github.com/anton-abyzov/specweave/issues
664
- 2. Suggest workflow improvements
665
- 3. Add support for new frameworks (Solid, Qwik, etc.)
666
- 4. Improve test generation patterns
667
-
668
- **Development**:
669
- ```bash
670
- # Clone repo
671
- git clone https://github.com/anton-abyzov/specweave.git
672
- cd specweave/plugins/specweave-figma
673
-
674
- # Make changes to SKILL.md or .mcp.json
675
-
676
- # Test locally
677
- cp -r . ~/.claude/plugins/specweave-figma/
678
- # Restart Claude Code
679
-
680
- # Submit PR
681
- git checkout -b feature/your-improvement
682
- git commit -m "feat: improve component generation"
683
- git push origin feature/your-improvement
684
- ```
685
-
686
- ---
687
-
688
- ## Resources
689
-
690
- ### Official Documentation
691
-
692
- - [Figma MCP Server Guide](https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Figma-MCP-server)
693
- - [Figma Variables](https://help.figma.com/hc/en-us/articles/15339657135383-Guide-to-variables-in-Figma)
694
- - [Model Context Protocol](https://modelcontextprotocol.io/)
695
- - [Claude Code Plugins](https://docs.claude.com/en/docs/claude-code/plugins)
696
-
697
- ### SpecWeave Docs
698
-
699
- - [Plugin Architecture](./ARCHITECTURE.md) - Technical deep dive
700
- - [SpecWeave Main Docs](https://spec-weave.com)
701
- - [GitHub Repository](https://github.com/anton-abyzov/specweave)
702
-
703
- ### Design Systems
704
-
705
- - [Atomic Design](https://atomicdesign.bradfrost.com/)
706
- - [Design Tokens](https://designtokens.org/)
707
- - [Tailwind CSS](https://tailwindcss.com/)
708
- - [Storybook](https://storybook.js.org/)
709
-
710
- ---
711
-
712
- ## License
713
-
714
- MIT License - see [LICENSE](../../LICENSE)
715
-
716
- ---
717
-
718
- ## Support
719
-
720
- **Issues**: https://github.com/anton-abyzov/specweave/issues
721
- **Discussions**: https://github.com/anton-abyzov/specweave/discussions
722
- **Email**: support@spec-weave.com
723
-
724
- ---
725
-
726
- **Last Updated**: 2025-11-02
727
- **Plugin Version**: 1.0.0 (Beta)
728
- **SpecWeave Core**: v0.6.0+