specweave 0.23.14 → 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 (54) hide show
  1. package/CLAUDE.md +55 -0
  2. package/dist/src/core/spec-detector.d.ts +5 -0
  3. package/dist/src/core/spec-detector.d.ts.map +1 -1
  4. package/dist/src/core/spec-detector.js +91 -33
  5. package/dist/src/core/spec-detector.js.map +1 -1
  6. package/package.json +1 -1
  7. package/plugins/specweave-github/.claude-plugin/plugin.json +15 -1
  8. package/plugins/specweave-github/hooks/.specweave/logs/hooks-debug.log +16 -0
  9. package/plugins/specweave-github/hooks/post-task-completion.sh +53 -0
  10. package/plugins/specweave-release/hooks/.specweave/logs/dora-tracking.log +24 -0
  11. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +0 -21
  12. package/plugins/specweave-alternatives/skills/bmad-method-expert/SKILL.md +0 -626
  13. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/analyze-project.js +0 -318
  14. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/check-setup.js +0 -208
  15. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/generate-template.js +0 -1149
  16. package/plugins/specweave-alternatives/skills/bmad-method-expert/scripts/validate-documents.js +0 -340
  17. package/plugins/specweave-alternatives/skills/spec-kit-expert/SKILL.md +0 -1010
  18. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +0 -20
  19. package/plugins/specweave-cost-optimizer/skills/cost-optimizer/SKILL.md +0 -190
  20. package/plugins/specweave-docs/.claude-plugin/plugin.json +0 -19
  21. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +0 -613
  22. package/plugins/specweave-docs/skills/spec-driven-brainstorming/README.md +0 -264
  23. package/plugins/specweave-docs/skills/spec-driven-brainstorming/SKILL.md +0 -439
  24. package/plugins/specweave-docs/skills/spec-driven-debugging/README.md +0 -479
  25. package/plugins/specweave-docs/skills/spec-driven-debugging/SKILL.md +0 -652
  26. package/plugins/specweave-figma/.claude-plugin/.mcp.json +0 -12
  27. package/plugins/specweave-figma/.claude-plugin/plugin.json +0 -20
  28. package/plugins/specweave-figma/ARCHITECTURE.md +0 -453
  29. package/plugins/specweave-figma/README.md +0 -728
  30. package/plugins/specweave-figma/skills/figma-to-code/SKILL.md +0 -632
  31. package/plugins/specweave-figma/skills/figma-to-code/test-1-token-generation.yaml +0 -29
  32. package/plugins/specweave-figma/skills/figma-to-code/test-2-component-generation.yaml +0 -27
  33. package/plugins/specweave-figma/skills/figma-to-code/test-3-typescript-generation.yaml +0 -28
  34. package/plugins/specweave-frontend/.claude-plugin/plugin.json +0 -21
  35. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +0 -107
  36. package/plugins/specweave-frontend/skills/frontend/SKILL.md +0 -177
  37. package/plugins/specweave-frontend/skills/nextjs/SKILL.md +0 -176
  38. package/plugins/specweave-testing/.claude-plugin/plugin.json +0 -20
  39. package/plugins/specweave-testing/skills/e2e-playwright/README.md +0 -506
  40. package/plugins/specweave-testing/skills/e2e-playwright/SKILL.md +0 -457
  41. package/plugins/specweave-testing/skills/e2e-playwright/execute.js +0 -373
  42. package/plugins/specweave-testing/skills/e2e-playwright/lib/utils.js +0 -514
  43. package/plugins/specweave-testing/skills/e2e-playwright/package.json +0 -33
  44. package/plugins/specweave-tooling/.claude-plugin/plugin.json +0 -19
  45. package/plugins/specweave-tooling/skills/skill-creator/LICENSE.txt +0 -202
  46. package/plugins/specweave-tooling/skills/skill-creator/SKILL.md +0 -209
  47. package/plugins/specweave-tooling/skills/skill-creator/scripts/init_skill.py +0 -303
  48. package/plugins/specweave-tooling/skills/skill-creator/scripts/package_skill.py +0 -110
  49. package/plugins/specweave-tooling/skills/skill-creator/scripts/quick_validate.py +0 -65
  50. package/plugins/specweave-tooling/skills/skill-router/SKILL.md +0 -479
  51. package/plugins/specweave-ui/.claude-plugin/plugin.json +0 -26
  52. package/plugins/specweave-ui/.mcp.json +0 -10
  53. package/plugins/specweave-ui/README.md +0 -492
  54. package/plugins/specweave-ui/skills/browser-automation/SKILL.md +0 -676
@@ -1,453 +0,0 @@
1
- # specweave-figma Plugin Architecture
2
-
3
- ## The MCP-First Realization
4
-
5
- **Problem**: Original plugin tried to implement Figma API integration directly.
6
-
7
- **Solution**: Use Figma's official MCP server for data access, SpecWeave for workflow patterns.
8
-
9
- ---
10
-
11
- ## Architecture Overview
12
-
13
- ```
14
- ┌─────────────────────────────────────────────────────────┐
15
- │ Figma MCP Server (Official) │
16
- │ Announced: June 4, 2025 (Beta) │
17
- │ │
18
- │ Endpoints: │
19
- │ - Desktop: http://127.0.0.1:3845/mcp │
20
- │ - Remote: https://mcp.figma.com/mcp │
21
- │ │
22
- │ Tools Exposed: │
23
- │ - get-file(fileKey) → File metadata │
24
- │ - list-files(projectId) → Project files │
25
- │ - Access variables, components, layout data │
26
- │ - Extract FigJam and Make resources │
27
- │ │
28
- │ Authentication: Figma personal access token │
29
- │ Access: View/Collab (6/month), Paid plans (Tier 1 API) │
30
- └─────────────────────────────────────────────────────────┘
31
-
32
- MCP Protocol
33
-
34
- ┌─────────────────────────────────────────────────────────┐
35
- │ Claude Code (MCP Client) │
36
- │ - Connects to MCP server │
37
- │ - Exposes tools to Claude │
38
- │ - Handles authentication │
39
- └─────────────────────────────────────────────────────────┘
40
-
41
- Claude has Figma data
42
-
43
- ┌─────────────────────────────────────────────────────────┐
44
- │ specweave-figma Plugin │
45
- │ │
46
- │ .mcp.json: │
47
- │ { │
48
- │ "figma": { │
49
- │ "url": "http://127.0.0.1:3845/mcp", │
50
- │ "env": { "FIGMA_ACCESS_TOKEN": "..." } │
51
- │ } │
52
- │ } │
53
- │ │
54
- │ Skills: │
55
- │ ├── figma-to-code/ │
56
- │ │ └── Workflow patterns (NOT API calls): │
57
- │ │ • How to structure design tokens │
58
- │ │ • Component scaffolding patterns │
59
- │ │ • File organization │
60
- │ │ • Test generation │
61
- │ │ │
62
- │ SpecWeave Integration: │
63
- │ - Living docs: Track design decisions │
64
- │ - Increments: Component implementation progress │
65
- │ - Tests: Visual regression test scaffolds │
66
- └─────────────────────────────────────────────────────────┘
67
- ```
68
-
69
- ---
70
-
71
- ## Key Principles
72
-
73
- ### 1. Don't Reinvent MCP
74
-
75
- **Wrong Approach** (what we almost did):
76
- ```typescript
77
- // ❌ Plugin makes API calls directly
78
- async function fetchFigmaFile(fileKey: string) {
79
- const response = await fetch(`https://api.figma.com/v1/files/${fileKey}`, {
80
- headers: { 'X-Figma-Token': process.env.FIGMA_ACCESS_TOKEN }
81
- });
82
- // Parse, transform, etc.
83
- }
84
- ```
85
-
86
- **Right Approach** (MCP-first):
87
- ```yaml
88
- # ✅ Plugin configures MCP, assumes tools are available
89
- ---
90
- name: figma-to-code
91
- description: Workflow patterns for converting Figma designs to code
92
- ---
93
-
94
- When the user provides a Figma URL:
95
-
96
- 1. Use MCP tool `get-file` to fetch design data
97
- (Claude Code handles this automatically via MCP)
98
-
99
- 2. Extract design tokens following this pattern:
100
- - Colors: Group by semantic names (primary, secondary, etc.)
101
- - Typography: Scale from Figma text styles
102
- - Spacing: Use 4px/8px grid systems
103
-
104
- 3. Generate components using these conventions:
105
- - Atomic Design (atoms/molecules/organisms)
106
- - TypeScript interfaces for all props
107
- - Co-located styles
108
- ```
109
-
110
- ### 2. SpecWeave Value = Workflow Patterns, Not Data Fetching
111
-
112
- **What MCP Provides**:
113
- - ✅ Connection to Figma
114
- - ✅ Authentication
115
- - ✅ Raw design data
116
-
117
- **What SpecWeave Provides**:
118
- - ✅ How to organize that data
119
- - ✅ File structure conventions
120
- - ✅ Design system patterns
121
- - ✅ Testing strategies
122
- - ✅ Living docs integration
123
-
124
- ### 3. Plugin = MCP Config + Workflow Expertise
125
-
126
- ```
127
- plugins/specweave-figma/
128
- ├── .claude-plugin/
129
- │ ├── manifest.json # SpecWeave metadata
130
- │ ├── plugin.json # Claude Code native
131
- │ └── .mcp.json # ✅ NEW: MCP server config
132
- ├── skills/
133
- │ └── figma-to-code/
134
- │ ├── SKILL.md # Workflow patterns (NOT API logic)
135
- │ └── test-cases/
136
- └── README.md # Setup: How to enable Figma MCP
137
- ```
138
-
139
- ---
140
-
141
- ## .mcp.json Configuration
142
-
143
- Create `.claude-plugin/.mcp.json`:
144
-
145
- ```json
146
- {
147
- "$schema": "https://spec-weave.com/schemas/mcp-config.json",
148
- "servers": {
149
- "figma": {
150
- "command": "npx",
151
- "args": ["-y", "@figma/mcp-server"],
152
- "env": {
153
- "FIGMA_ACCESS_TOKEN": "${FIGMA_ACCESS_TOKEN}"
154
- }
155
- }
156
- }
157
- }
158
- ```
159
-
160
- **Alternative: Desktop Server**
161
-
162
- ```json
163
- {
164
- "servers": {
165
- "figma": {
166
- "url": "http://127.0.0.1:3845/mcp",
167
- "description": "Figma Desktop MCP server (must be enabled in Figma app)"
168
- }
169
- }
170
- }
171
- ```
172
-
173
- ---
174
-
175
- ## Updated figma-to-code Skill
176
-
177
- **Before** (tried to be a data fetcher):
178
- ```yaml
179
- description: Fetches Figma designs via MCP, parses JSON, generates code...
180
- ```
181
-
182
- **After** (workflow patterns only):
183
- ```yaml
184
- description: Workflow patterns for design-to-code. Assumes Figma MCP provides data. Converts design tokens, scaffolds components, generates tests. Activates for: figma to code, design implementation, component generation.
185
- ```
186
-
187
- **Key Change**: Skill ASSUMES Claude has Figma data (via MCP), focuses on HOW TO USE IT.
188
-
189
- ---
190
-
191
- ## Workflow Examples
192
-
193
- ### Example 1: Convert Frame to Component
194
-
195
- **User Request**:
196
- > "Convert this Figma button to a React component: https://figma.com/file/abc123"
197
-
198
- **What Happens**:
199
-
200
- 1. **MCP Layer** (automatic, Claude Code handles):
201
- ```
202
- Claude Code → Figma MCP → get-file(abc123)
203
- Returns: { components: [...], variables: [...], ... }
204
- ```
205
-
206
- 2. **SpecWeave figma-to-code Skill** (workflow pattern):
207
- ```
208
- See Button component in Figma data
209
- → Extract variants (primary, secondary, text)
210
- → Extract size (sm, md, lg)
211
- → Generate TypeScript interface:
212
- export interface ButtonProps {
213
- variant?: 'primary' | 'secondary' | 'text';
214
- size?: 'sm' | 'md' | 'lg';
215
- disabled?: boolean;
216
- children: ReactNode;
217
- }
218
- → Generate component scaffold
219
- → Generate test file
220
- → Update living docs
221
- ```
222
-
223
- ### Example 2: Extract Design Tokens
224
-
225
- **User Request**:
226
- > "Extract design tokens from https://figma.com/file/xyz789"
227
-
228
- **Workflow**:
229
-
230
- 1. **MCP provides** variables from Figma
231
- 2. **Skill applies pattern**:
232
- ```
233
- Colors:
234
- - Figma: color/primary/500 → CSS: --color-primary-500
235
- - Group by semantic naming
236
- - Generate theme.css
237
-
238
- Typography:
239
- - Figma: Heading 1 → TypeScript: typography.heading1
240
- - Include font-size, line-height, font-weight
241
- - Generate tokens.ts
242
-
243
- Spacing:
244
- - Use 4px grid system
245
- - Generate spacing scale (4, 8, 12, 16, 24, 32, 48, 64)
246
- ```
247
-
248
- ---
249
-
250
- ## Setup Instructions (for README.md)
251
-
252
- ### Prerequisites
253
-
254
- 1. **Figma Access**:
255
- - Figma account (Starter or higher)
256
- - Personal access token (Settings → Account → Personal access tokens)
257
-
258
- 2. **Figma Desktop App** (recommended):
259
- - Download from https://figma.com/downloads
260
- - Latest version (supports MCP)
261
-
262
- 3. **Claude Code**:
263
- - Install plugin via marketplace or SpecWeave CLI
264
-
265
- ### Enable Figma MCP Server
266
-
267
- **Option 1: Desktop Server** (recommended)
268
-
269
- 1. Open Figma Desktop app
270
- 2. Open any design file
271
- 3. Switch to Dev Mode (Shift + D)
272
- 4. Click "Enable desktop MCP server" in MCP section
273
- 5. Server starts at `http://127.0.0.1:3845/mcp`
274
-
275
- **Option 2: Remote Server**
276
-
277
- 1. Set `FIGMA_ACCESS_TOKEN` environment variable
278
- 2. Configure `.mcp.json` to use `https://mcp.figma.com/mcp`
279
-
280
- ### Install Plugin
281
-
282
- **Via SpecWeave CLI**:
283
- ```bash
284
- specweave plugin install figma
285
- ```
286
-
287
- **Via Claude Code**:
288
- ```bash
289
- /plugin marketplace add specweave/marketplace
290
- /plugin install specweave-figma
291
- ```
292
-
293
- ### Verify Installation
294
-
295
- ```bash
296
- # Check MCP connection
297
- /mcp status
298
-
299
- # Should show:
300
- # ✅ figma: Connected (http://127.0.0.1:3845/mcp)
301
-
302
- # Test with a Figma URL
303
- "Extract design tokens from https://figma.com/file/your-file-id"
304
- ```
305
-
306
- ---
307
-
308
- ## Migration Guide
309
-
310
- ### What to Remove
311
-
312
- 1. **Custom Figma API calls** - Delete all `fetch('https://api.figma.com/...')`
313
- 2. **Authentication logic** - MCP handles this
314
- 3. **JSON parsing** - MCP provides structured data
315
- 4. **Data fetching skills** - Keep only workflow patterns
316
-
317
- ### What to Keep
318
-
319
- 1. **Design token patterns** - How to structure CSS/SCSS/Tailwind
320
- 2. **Component scaffolding** - File templates and conventions
321
- 3. **Test generation** - Visual regression test patterns
322
- 4. **Living docs integration** - Track design decisions
323
-
324
- ### Files to Update
325
-
326
- - [ ] Delete `figma-designer` skill (out of scope)
327
- - [ ] Delete `figma-implementer` skill (duplicate)
328
- - [ ] Delete `figma-mcp-connector` skill (infrastructure detail)
329
- - [x] Keep `figma-to-code` skill (workflow patterns)
330
- - [ ] Create `.claude-plugin/.mcp.json` (MCP configuration)
331
- - [ ] Update `SKILL.md` (assume MCP provides data)
332
- - [ ] Update `README.md` (setup instructions)
333
- - [ ] Update `manifest.json` (accurate description)
334
-
335
- ---
336
-
337
- ## Community vs. Official MCP Servers
338
-
339
- ### Official Figma MCP (Recommended)
340
-
341
- **Pros**:
342
- - ✅ Maintained by Figma
343
- - ✅ Desktop + Remote options
344
- - ✅ Includes Dev Mode features
345
- - ✅ Code Connect integration
346
- - ✅ FigJam and Make support
347
-
348
- **Cons**:
349
- - ⚠️ Beta (as of June 2025)
350
- - ⚠️ Rate limits (6/month for free, Tier 1 for paid)
351
-
352
- ### Community MCP Servers
353
-
354
- **GLips/Figma-Context-MCP**:
355
- - ✅ Simplified layout data (less context noise)
356
- - ✅ Optimized for AI coding agents
357
- - ⚠️ Community-maintained
358
-
359
- **TimHolden/figma-mcp-server**:
360
- - ✅ Full REST API coverage
361
- - ✅ Read/write operations (limited by Figma API)
362
- - ⚠️ Requires personal access token setup
363
-
364
- **Recommendation**: Use official Figma MCP for best experience.
365
-
366
- ---
367
-
368
- ## Testing Strategy
369
-
370
- ### Test MCP Connection
371
-
372
- ```yaml
373
- # test-cases/test-1-mcp-connection.yaml
374
- name: MCP Connection Test
375
- description: Verify Figma MCP server is accessible
376
- input:
377
- action: "Check MCP status"
378
- expected:
379
- mcp_servers:
380
- - name: figma
381
- status: connected
382
- url: "http://127.0.0.1:3845/mcp OR https://mcp.figma.com/mcp"
383
- ```
384
-
385
- ### Test Design Token Extraction
386
-
387
- ```yaml
388
- # test-cases/test-2-token-extraction.yaml
389
- name: Design Token Extraction
390
- description: Extract tokens from Figma file
391
- input:
392
- figma_url: "https://figma.com/file/sample-design-system"
393
- action: "Extract design tokens"
394
- expected:
395
- files_created:
396
- - src/design-tokens/theme.css
397
- - src/design-tokens/tokens.ts
398
- - src/design-tokens/types.ts
399
- token_categories:
400
- - colors
401
- - typography
402
- - spacing
403
- - shadows
404
- ```
405
-
406
- ### Test Component Generation
407
-
408
- ```yaml
409
- # test-cases/test-3-component-generation.yaml
410
- name: Component Generation
411
- description: Generate React component from Figma frame
412
- input:
413
- figma_url: "https://figma.com/file/abc/Button"
414
- framework: "react"
415
- typescript: true
416
- expected:
417
- files_created:
418
- - src/components/atoms/Button/Button.tsx
419
- - src/components/atoms/Button/Button.module.css
420
- - src/components/atoms/Button/Button.test.tsx
421
- - src/components/atoms/Button/index.ts
422
- component_props:
423
- - variant: "primary | secondary | text"
424
- - size: "sm | md | lg"
425
- - disabled: boolean
426
- ```
427
-
428
- ---
429
-
430
- ## Next Steps
431
-
432
- 1. **Create `.mcp.json`** - Configure Figma MCP server
433
- 2. **Update `SKILL.md`** - Rewrite to assume MCP provides data
434
- 3. **Add setup docs** - README with MCP enablement instructions
435
- 4. **Test with real Figma files** - Validate workflow patterns
436
- 5. **Document limitations** - Rate limits, access tiers
437
- 6. **Add examples** - Common design-to-code scenarios
438
-
439
- ---
440
-
441
- ## References
442
-
443
- - [Official Figma MCP Announcement](https://www.figma.com/blog/introducing-figmas-dev-mode-mcp-server/)
444
- - [Figma MCP Guide](https://help.figma.com/hc/en-us/articles/32132100833559-Guide-to-the-Figma-MCP-server)
445
- - [Model Context Protocol Docs](https://modelcontextprotocol.io/)
446
- - [Claude Code Plugins](https://docs.claude.com/en/docs/claude-code/plugins)
447
- - [GLips/Figma-Context-MCP](https://github.com/GLips/Figma-Context-MCP)
448
- - [TimHolden/figma-mcp-server](https://github.com/TimHolden/figma-mcp-server)
449
-
450
- ---
451
-
452
- **Last Updated**: 2025-11-02
453
- **Status**: Architecture redesign - MCP-first approach