specweave 1.0.274 → 1.0.276

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 (38) hide show
  1. package/.claude-plugin/README.md +1 -2
  2. package/.claude-plugin/marketplace.json +0 -11
  3. package/dist/src/adapters/agents-md-generator.d.ts.map +1 -1
  4. package/dist/src/adapters/agents-md-generator.js +1 -4
  5. package/dist/src/adapters/agents-md-generator.js.map +1 -1
  6. package/dist/src/adapters/claude-md-generator.js +1 -1
  7. package/dist/src/adapters/claude-md-generator.js.map +1 -1
  8. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts +2 -2
  9. package/dist/src/core/lazy-loading/llm-plugin-detector.d.ts.map +1 -1
  10. package/dist/src/core/lazy-loading/llm-plugin-detector.js +0 -1
  11. package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
  12. package/dist/src/sync/github-reconciler.d.ts +9 -0
  13. package/dist/src/sync/github-reconciler.d.ts.map +1 -1
  14. package/dist/src/sync/github-reconciler.js +41 -9
  15. package/dist/src/sync/github-reconciler.js.map +1 -1
  16. package/dist/src/utils/auto-install.js +1 -1
  17. package/dist/src/utils/auto-install.js.map +1 -1
  18. package/dist/src/utils/generate-skills-index.d.ts.map +1 -1
  19. package/dist/src/utils/generate-skills-index.js +1 -3
  20. package/dist/src/utils/generate-skills-index.js.map +1 -1
  21. package/package.json +1 -1
  22. package/plugins/PLUGINS-INDEX.md +0 -1
  23. package/plugins/specweave/lib/vendor/sync/github-reconciler.d.ts +9 -0
  24. package/plugins/specweave/lib/vendor/sync/github-reconciler.js +41 -9
  25. package/plugins/specweave/lib/vendor/sync/github-reconciler.js.map +1 -1
  26. package/plugins/specweave/skills/npm/SKILL.md +155 -34
  27. package/plugins/specweave-frontend/PLUGIN.md +2 -1
  28. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +1 -6
  29. package/plugins/specweave-frontend/skills/figma/SKILL.md +287 -0
  30. package/plugins/specweave-frontend/skills/frontend/SKILL.md +4 -0
  31. package/plugins/specweave-frontend/skills/frontend-architect/SKILL.md +1 -0
  32. package/plugins/specweave-frontend/skills/frontend-design/SKILL.md +1 -1
  33. package/plugins/specweave-release/commands/npm.md +158 -38
  34. package/plugins/specweave-figma/.claude-plugin/plugin.json +0 -23
  35. package/plugins/specweave-figma/PLUGIN.md +0 -34
  36. package/plugins/specweave-figma/commands/figma-import.md +0 -694
  37. package/plugins/specweave-figma/commands/figma-to-react.md +0 -838
  38. package/plugins/specweave-figma/commands/figma-tokens.md +0 -819
@@ -102,6 +102,124 @@ Check flags in the command invocation:
102
102
 
103
103
  ---
104
104
 
105
+ ## STEP 0: REPOSITORY DISCOVERY (Multi-Repo Aware) — ALWAYS RUN FIRST!
106
+
107
+ **This step runs BEFORE any workflow mode.** It determines which npm package to release.
108
+
109
+ ### Detection Logic
110
+
111
+ ```bash
112
+ # Check if we're in an umbrella repo with nested repositories
113
+ if [ -d "repositories" ]; then
114
+ UMBRELLA=true
115
+ else
116
+ UMBRELLA=false
117
+ fi
118
+ ```
119
+
120
+ ### If NOT an umbrella repo (`UMBRELLA=false`)
121
+
122
+ Operate on CWD as normal. Set:
123
+ ```bash
124
+ PKG_DIR="."
125
+ PKG_NAME=$(node -p "require('./package.json').name")
126
+ PKG_VERSION=$(node -p "require('./package.json').version")
127
+ ```
128
+
129
+ ### If umbrella repo (`UMBRELLA=true`)
130
+
131
+ Scan for all publishable npm packages:
132
+
133
+ ```bash
134
+ # Find all package.json files under repositories/ (skip node_modules)
135
+ # For each one, check:
136
+ # 1. Has "name" field
137
+ # 2. Has "version" field
138
+ # 3. NOT "private": true
139
+ # Collect: directory path, package name, version
140
+ ```
141
+
142
+ **Scanning script:**
143
+ ```bash
144
+ PUBLISHABLE=()
145
+ for pkg in $(find repositories -name "package.json" -not -path "*/node_modules/*" -not -path "*/docs-site/*" -maxdepth 4); do
146
+ IS_PRIVATE=$(node -p "try { require('./$pkg').private || false } catch(e) { true }")
147
+ if [ "$IS_PRIVATE" = "false" ]; then
148
+ NAME=$(node -p "require('./$pkg').name")
149
+ VERSION=$(node -p "require('./$pkg').version")
150
+ DIR=$(dirname "$pkg")
151
+ PUBLISHABLE+=("$DIR|$NAME|$VERSION")
152
+ fi
153
+ done
154
+ ```
155
+
156
+ **Decision:**
157
+
158
+ | Found | Action |
159
+ |-------|--------|
160
+ | **0 packages** | STOP with error: "No publishable npm packages found under repositories/" |
161
+ | **1 package** | Auto-select it, report: "Auto-selected `$PKG_NAME` (only publishable package)" |
162
+ | **2+ packages** | Use `AskUserQuestion` to let the user choose |
163
+
164
+ **AskUserQuestion format (when 2+ packages):**
165
+
166
+ ```
167
+ Question: "Which npm package do you want to release?"
168
+ Header: "Package"
169
+ Options:
170
+ - label: "$NAME1 (v$VERSION1)"
171
+ description: "Path: $DIR1"
172
+ - label: "$NAME2 (v$VERSION2)"
173
+ description: "Path: $DIR2"
174
+ ... (one per publishable package)
175
+ ```
176
+
177
+ ### After Selection
178
+
179
+ ```bash
180
+ # Navigate to the selected package directory
181
+ cd "$PKG_DIR"
182
+
183
+ # Set variables for use throughout the workflow
184
+ PKG_NAME=$(node -p "require('./package.json').name")
185
+ PKG_VERSION=$(node -p "require('./package.json').version")
186
+ REPO_URL=$(node -p "try { const r = require('./package.json').repository; typeof r === 'string' ? r : r?.url?.replace(/\\.git$/, '') || '' } catch(e) { '' }")
187
+ GH_REPO=$(echo "$REPO_URL" | sed 's|https://github.com/||')
188
+
189
+ # Detect current branch
190
+ BRANCH=$(git rev-parse --abbrev-ref HEAD)
191
+
192
+ # Validate branch is release-eligible (not a feature branch)
193
+ if [[ "$BRANCH" != "main" && "$BRANCH" != "develop" && "$BRANCH" != "master" ]]; then
194
+ echo "WARNING: Current branch '$BRANCH' is not a standard release branch (main/develop/master)"
195
+ # STOP and ask user to confirm before proceeding
196
+ fi
197
+
198
+ # Detect build command from package.json scripts
199
+ if node -p "Object.keys(require('./package.json').scripts||{}).includes('rebuild')" | grep -q true; then
200
+ BUILD_CMD="npm run rebuild"
201
+ elif node -p "Object.keys(require('./package.json').scripts||{}).includes('build')" | grep -q true; then
202
+ BUILD_CMD="npm run build"
203
+ else
204
+ BUILD_CMD=""
205
+ echo "WARNING: No build or rebuild script found — skip build step"
206
+ fi
207
+ ```
208
+
209
+ **CRITICAL**: All subsequent commands in the chosen workflow run from `$PKG_DIR` as CWD.
210
+
211
+ **Report the selection** before proceeding to the workflow:
212
+ ```
213
+ Selected package: $PKG_NAME v$PKG_VERSION
214
+ Directory: $PKG_DIR
215
+ Repository: $REPO_URL
216
+ Branch: $BRANCH
217
+ Build command: $BUILD_CMD
218
+ Mode: [DEFAULT|QUICK|CI|DIRECT|LOCAL]
219
+ ```
220
+
221
+ ---
222
+
105
223
  ## DEFAULT MODE WORKFLOW (no flags) - INSTANT RELEASE
106
224
 
107
225
  This is the **default** workflow when no flags are provided. Auto-commits any dirty changes, syncs git FIRST, then publishes to npmjs.org. One command does everything!
@@ -116,14 +234,14 @@ This is the **default** workflow when no flags are provided. Auto-commits any di
116
234
  ### 1. Pre-flight Check (Minimal)
117
235
 
118
236
  ```bash
119
- # Verify we're on develop branch
237
+ # Verify we're on a release-eligible branch
120
238
  git rev-parse --abbrev-ref HEAD
121
239
 
122
240
  # Get current version
123
241
  node -p "require('./package.json').version"
124
242
  ```
125
243
 
126
- **STOP if**: Not on `develop` branch (ask user to switch)
244
+ **STOP if**: Not on a release-eligible branch (`main`, `develop`, or `master`) already validated in Step 0
127
245
 
128
246
  ### 2. Auto-Commit Dirty Changes (if any)
129
247
 
@@ -152,7 +270,7 @@ git commit -m "[auto-generated message based on changed files]"
152
270
 
153
271
  ```bash
154
272
  # Push dirty commit to remote FIRST - ensures code is safe before release
155
- git push origin develop
273
+ git push origin $BRANCH
156
274
  ```
157
275
 
158
276
  **Why this order?**
@@ -197,7 +315,8 @@ This creates a NEW commit + tag locally.
197
315
  ### 5. Build Package
198
316
 
199
317
  ```bash
200
- npm run rebuild
318
+ # Uses detected build command; skip if $BUILD_CMD is empty
319
+ $BUILD_CMD
201
320
  ```
202
321
 
203
322
  ### 6. Publish to NPM (with explicit registry!)
@@ -211,7 +330,7 @@ npm publish --registry https://registry.npmjs.org
211
330
 
212
331
  ```bash
213
332
  # Push the version bump commit and tag
214
- git push origin develop --follow-tags
333
+ git push origin $BRANCH --follow-tags
215
334
  ```
216
335
 
217
336
  ### 8. MANDATORY: Create GitHub Release
@@ -272,8 +391,8 @@ gh release view "v$NEW_VERSION" --json tagName,url
272
391
  ✅ **Full patch release complete!**
273
392
 
274
393
  📦 **Version**: vX.Y.Z
275
- 🔗 **NPM**: https://www.npmjs.com/package/specweave
276
- 🏷️ **GitHub Release**: https://github.com/anton-abyzov/specweave/releases/tag/vX.Y.Z
394
+ 🔗 **NPM**: https://www.npmjs.com/package/$PKG_NAME
395
+ 🏷️ **GitHub Release**: https://github.com/$GH_REPO/releases/tag/vX.Y.Z
277
396
 
278
397
  **What happened**:
279
398
  - ✅ Dirty changes auto-committed
@@ -284,7 +403,7 @@ gh release view "v$NEW_VERSION" --json tagName,url
284
403
  - ✅ Version tag pushed to GitHub
285
404
  - ✅ GitHub Release created with release notes
286
405
 
287
- **Verify**: `npm view specweave version --registry https://registry.npmjs.org`
406
+ **Verify**: `npm view $PKG_NAME version --registry https://registry.npmjs.org`
288
407
  ```
289
408
 
290
409
  ## Default Mode Success Criteria
@@ -314,14 +433,14 @@ Use this workflow when `--quick` flag is detected. This combines `/sw:save` beha
314
433
  ### 1. Pre-flight Check
315
434
 
316
435
  ```bash
317
- # Verify we're on develop branch
436
+ # Verify we're on a release-eligible branch
318
437
  git rev-parse --abbrev-ref HEAD
319
438
 
320
439
  # Get current version
321
440
  node -p "require('./package.json').version"
322
441
  ```
323
442
 
324
- **STOP if**: Not on `develop` branch (ask user to switch)
443
+ **STOP if**: Not on a release-eligible branch (`main`, `develop`, or `master`) already validated in Step 0
325
444
 
326
445
  ### 2. Auto-Commit Dirty Changes (if any)
327
446
 
@@ -348,7 +467,7 @@ git commit -m "[auto-generated message based on changed files]"
348
467
 
349
468
  ```bash
350
469
  # Push dirty commit to remote - ensures code is safe before release
351
- git push origin develop
470
+ git push origin $BRANCH
352
471
  ```
353
472
 
354
473
  ### 4. Smart Version Bump (Prerelease-Aware!)
@@ -372,7 +491,8 @@ This creates a NEW commit + tag locally.
372
491
  ### 5. Build Package
373
492
 
374
493
  ```bash
375
- npm run rebuild
494
+ # Uses detected build command; skip if $BUILD_CMD is empty
495
+ $BUILD_CMD
376
496
  ```
377
497
 
378
498
  ### 6. Publish to NPM Locally
@@ -387,7 +507,7 @@ npm publish --registry https://registry.npmjs.org
387
507
  ```bash
388
508
  # Push ONLY the version commit, NOT the tag
389
509
  # This prevents GitHub Actions release workflow from triggering
390
- git push origin develop
510
+ git push origin $BRANCH
391
511
  ```
392
512
 
393
513
  **CRITICAL**: Do NOT use `--follow-tags`! We want local npm publish only.
@@ -398,7 +518,7 @@ git push origin develop
398
518
  ✅ **Quick release complete!**
399
519
 
400
520
  📦 **Version**: vX.Y.Z
401
- 🔗 **NPM**: https://www.npmjs.com/package/specweave
521
+ 🔗 **NPM**: https://www.npmjs.com/package/$PKG_NAME
402
522
  🏷️ **Git Tag**: vX.Y.Z (local only - NOT pushed)
403
523
 
404
524
  **What happened**:
@@ -409,7 +529,7 @@ git push origin develop
409
529
  - ✅ Published to npmjs.org (locally)
410
530
  - ⏭️ Tag NOT pushed (no GitHub Actions triggered)
411
531
 
412
- **Verify**: `npm view specweave version --registry https://registry.npmjs.org`
532
+ **Verify**: `npm view $PKG_NAME version --registry https://registry.npmjs.org`
413
533
 
414
534
  **If you want to push the tag later** (triggers GH release):
415
535
  `git push origin vX.Y.Z`
@@ -435,7 +555,7 @@ Use this workflow when `--ci` flag is detected. Push to git and let GitHub Actio
435
555
  ### 1. Pre-flight Checks
436
556
 
437
557
  ```bash
438
- # Verify we're on develop branch
558
+ # Verify we're on a release-eligible branch
439
559
  git rev-parse --abbrev-ref HEAD
440
560
 
441
561
  # Check for uncommitted changes
@@ -446,7 +566,7 @@ node -p "require('./package.json').version"
446
566
  ```
447
567
 
448
568
  **STOP if**:
449
- - Not on `develop` branch (ask user to switch)
569
+ - Not on a release-eligible branch already validated in Step 0
450
570
  - Uncommitted changes exist (ask user to commit first)
451
571
 
452
572
  ### 2. Smart Version Bump (Prerelease-Aware!)
@@ -474,7 +594,7 @@ node -p "require('./package.json').version"
474
594
 
475
595
  ```bash
476
596
  # Push commit and tag to trigger GitHub Actions
477
- git push origin develop --follow-tags
597
+ git push origin $BRANCH --follow-tags
478
598
  ```
479
599
 
480
600
  ### 5. Report Results
@@ -483,12 +603,12 @@ git push origin develop --follow-tags
483
603
  ✅ Release initiated successfully!
484
604
 
485
605
  📦 **Version**: vX.Y.Z
486
- 🔗 **Tag**: https://github.com/anton-abyzov/specweave/releases/tag/vX.Y.Z
487
- ⏳ **GitHub Actions**: https://github.com/anton-abyzov/specweave/actions
606
+ 🔗 **Tag**: https://github.com/$GH_REPO/releases/tag/vX.Y.Z
607
+ ⏳ **GitHub Actions**: https://github.com/$GH_REPO/actions
488
608
 
489
609
  **Next steps**:
490
610
  1. Monitor GitHub Actions workflow (1-2 minutes)
491
- 2. Verify npm publish: https://www.npmjs.com/package/specweave
611
+ 2. Verify npm publish: https://www.npmjs.com/package/$PKG_NAME
492
612
  3. Check GitHub release notes
493
613
  ```
494
614
 
@@ -509,7 +629,7 @@ Use this workflow when `--only` flag is detected. This publishes directly to npm
509
629
  ### 1. Pre-flight Checks (Same as Default)
510
630
 
511
631
  ```bash
512
- # Verify we're on develop branch
632
+ # Verify we're on a release-eligible branch
513
633
  git rev-parse --abbrev-ref HEAD
514
634
 
515
635
  # Check for uncommitted changes
@@ -520,7 +640,7 @@ node -p "require('./package.json').version"
520
640
  ```
521
641
 
522
642
  **STOP if**:
523
- - Not on `develop` branch (ask user to switch)
643
+ - Not on a release-eligible branch already validated in Step 0
524
644
  - Uncommitted changes exist (ask user to commit first)
525
645
 
526
646
  ### 2. Smart Version Bump (Prerelease-Aware!)
@@ -552,11 +672,11 @@ node -p "require('./package.json').version"
552
672
  ### 4. Build Package
553
673
 
554
674
  ```bash
555
- # Build the package before publishing
556
- npm run rebuild
675
+ # Build the package before publishing; skip if $BUILD_CMD is empty
676
+ $BUILD_CMD
557
677
  ```
558
678
 
559
- **Critical**: Must rebuild to ensure dist/ is up-to-date before publishing.
679
+ **Critical**: Must build to ensure dist/ is up-to-date before publishing.
560
680
 
561
681
  ### 5. Publish to NPM Directly
562
682
 
@@ -578,28 +698,28 @@ Show the user:
578
698
  ✅ **Published directly to npm!**
579
699
 
580
700
  📦 **Version**: vX.Y.Z
581
- 🔗 **NPM**: https://www.npmjs.com/package/specweave
701
+ 🔗 **NPM**: https://www.npmjs.com/package/$PKG_NAME
582
702
  🏷️ **Git Tag**: vX.Y.Z (local only)
583
703
 
584
704
  **What happened**:
585
705
  - ✅ Version bumped and committed locally
586
706
  - ✅ Git tag created locally
587
- - ✅ Package built (npm run rebuild)
707
+ - ✅ Package built ($BUILD_CMD)
588
708
  - ✅ Published to npm directly
589
- - ⏸️ Git NOT pushed (use `git push origin develop --follow-tags` later if needed)
709
+ - ⏸️ Git NOT pushed (use `git push origin $BRANCH --follow-tags` later if needed)
590
710
 
591
711
  **Verify**:
592
- - Check npm: https://www.npmjs.com/package/specweave
593
- - Verify version: `npm view specweave version`
594
- - Install globally: `npm install -g specweave@X.Y.Z`
712
+ - Check npm: https://www.npmjs.com/package/$PKG_NAME
713
+ - Verify version: `npm view $PKG_NAME version`
714
+ - Install globally: `npm install -g $PKG_NAME@X.Y.Z`
595
715
 
596
716
  **Note**: Local release only. Push to GitHub manually when ready:
597
- `git push origin develop --follow-tags`
717
+ `git push origin $BRANCH --follow-tags`
598
718
  ```
599
719
 
600
720
  ## Direct Mode Safety Rules
601
721
 
602
- - ✅ ALWAYS rebuild before publishing (`npm run rebuild`)
722
+ - ✅ ALWAYS build before publishing (`$BUILD_CMD`)
603
723
  - ✅ Use `--only` when you want to publish but push git later
604
724
  - ✅ Default mode (no flags) is preferred - auto-commits, publishes, and pushes
605
725
  - ✅ Direct mode gives control over git push timing
@@ -703,15 +823,15 @@ Show the user:
703
823
  - ⏭️ NO git commit (use `git add . && git commit` later)
704
824
  - ⏭️ NO git tag (use `git tag vX.Y.Z` later)
705
825
  - ⏭️ NO npm publish (use `npm publish` later)
706
- - ⏭️ NO build (use `npm run rebuild` later)
826
+ - ⏭️ NO build (use `$BUILD_CMD` later)
707
827
 
708
828
  **Next steps when ready to release**:
709
- 1. Build: `npm run rebuild`
829
+ 1. Build: `$BUILD_CMD`
710
830
  2. Test: `npm test`
711
831
  3. Commit: `git add . && git commit -m "chore: bump version to X.Y.Z"`
712
832
  4. Tag: `git tag vX.Y.Z`
713
833
  5. Publish: `npm publish --registry https://registry.npmjs.org`
714
- 6. Push: `git push origin develop --follow-tags`
834
+ 6. Push: `git push origin $BRANCH --follow-tags`
715
835
 
716
836
  **Or use**: `/sw-release:npm` (no flags) for full instant release
717
837
  ```
@@ -723,7 +843,7 @@ Show the user:
723
843
  - ✅ NO disk-heavy operations (no build)
724
844
  - ✅ Safe to run multiple times (just increments version)
725
845
  - ⚠️ Remember: version is NOT published or committed!
726
- - ⚠️ Run `npm run rebuild` before testing locally
846
+ - ⚠️ Run `$BUILD_CMD` before testing locally
727
847
 
728
848
  ## Success Criteria (Local Mode)
729
849
 
@@ -1,23 +0,0 @@
1
- {
2
- "name": "sw-figma",
3
- "description": "Comprehensive Figma design-to-code automation. Import Figma designs via API/MCP, convert components to React/Vue/Angular, extract design tokens, generate responsive layouts, and sync design systems. Focus on accelerating frontend development from Figma designs.",
4
- "version": "1.0.0",
5
- "author": {
6
- "name": "Anton Abyzov",
7
- "email": "anton.abyzov@gmail.com"
8
- },
9
- "homepage": "https://spec-weave.com",
10
- "repository": "https://github.com/anton-abyzov/specweave",
11
- "license": "MIT",
12
- "keywords": [
13
- "figma",
14
- "design-to-code",
15
- "figma-api",
16
- "design-tokens",
17
- "react-components",
18
- "vue-components",
19
- "design-systems",
20
- "figma-plugin",
21
- "specweave"
22
- ]
23
- }
@@ -1,34 +0,0 @@
1
- # Figma Design Integration
2
-
3
- **Version**: 1.0.0
4
- **Author**: SpecWeave Contributors
5
- **License**: MIT
6
-
7
- ## Description
8
-
9
- Figma design import and automation with REST API and MCP server integration. Extract components, assets, design tokens, and metadata from Figma files with comprehensive documentation and asset export capabilities.
10
-
11
- ## Skills
12
-
13
- No skills (commands-only plugin)
14
-
15
- ## Commands
16
-
17
- | Command | Description |
18
- |---------|-------------|
19
- | /sw-figma:import | Import Figma designs with REST API or MCP server integration for components, assets, and tokens |
20
- | /sw-figma:to-react | Convert Figma designs to React components with props, styling, and accessibility |
21
- | /sw-figma:tokens | Extract design tokens (colors, typography, spacing) from Figma for design system integration |
22
-
23
- ## Installation
24
-
25
- ```bash
26
- vskill add specweave --plugin sw-figma
27
- ```
28
-
29
- ## Requirements
30
-
31
- - SpecWeave core plugin (sw@specweave)
32
- - Figma account with API access
33
- - Personal access token or OAuth credentials
34
- - Figma file URL or file key