specweave 0.9.1 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CLAUDE.md +100 -13
  2. package/README.md +97 -251
  3. package/bin/install-agents.sh +1 -1
  4. package/bin/install-commands.sh +1 -1
  5. package/bin/install-hooks.sh +1 -1
  6. package/bin/install-skills.sh +1 -1
  7. package/bin/specweave.js +32 -0
  8. package/dist/cli/commands/validate-jira.d.ts +35 -0
  9. package/dist/cli/commands/validate-jira.d.ts.map +1 -0
  10. package/dist/cli/commands/validate-jira.js +112 -0
  11. package/dist/cli/commands/validate-jira.js.map +1 -0
  12. package/dist/cli/commands/validate-plugins.d.ts +41 -0
  13. package/dist/cli/commands/validate-plugins.d.ts.map +1 -0
  14. package/dist/cli/commands/validate-plugins.js +171 -0
  15. package/dist/cli/commands/validate-plugins.js.map +1 -0
  16. package/dist/core/types/sync-profile.d.ts +177 -29
  17. package/dist/core/types/sync-profile.d.ts.map +1 -1
  18. package/dist/core/types/sync-profile.js +48 -1
  19. package/dist/core/types/sync-profile.js.map +1 -1
  20. package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -1
  21. package/dist/hooks/lib/translate-living-docs.js +16 -7
  22. package/dist/hooks/lib/translate-living-docs.js.map +1 -1
  23. package/dist/metrics/dora-calculator.d.ts +7 -3
  24. package/dist/metrics/dora-calculator.d.ts.map +1 -1
  25. package/dist/metrics/dora-calculator.js +19 -6
  26. package/dist/metrics/dora-calculator.js.map +1 -1
  27. package/dist/metrics/report-generator.d.ts +17 -0
  28. package/dist/metrics/report-generator.d.ts.map +1 -0
  29. package/dist/metrics/report-generator.js +403 -0
  30. package/dist/metrics/report-generator.js.map +1 -0
  31. package/dist/utils/external-resource-validator.d.ts +102 -0
  32. package/dist/utils/external-resource-validator.d.ts.map +1 -0
  33. package/dist/utils/external-resource-validator.js +381 -0
  34. package/dist/utils/external-resource-validator.js.map +1 -0
  35. package/dist/utils/plugin-validator.d.ts +161 -0
  36. package/dist/utils/plugin-validator.d.ts.map +1 -0
  37. package/dist/utils/plugin-validator.js +565 -0
  38. package/dist/utils/plugin-validator.js.map +1 -0
  39. package/package.json +2 -1
  40. package/plugins/specweave/commands/specweave-do.md +47 -0
  41. package/plugins/specweave/commands/specweave-increment.md +82 -0
  42. package/plugins/specweave/commands/specweave-next.md +47 -0
  43. package/plugins/specweave/hooks/post-increment-planning.sh +117 -38
  44. package/plugins/specweave/hooks/pre-tool-use.sh +133 -0
  45. package/plugins/specweave/plugin.json +22 -0
  46. package/plugins/specweave/skills/plugin-validator/SKILL.md +427 -0
  47. package/plugins/specweave-ado/.claude-plugin/plugin.json +2 -4
  48. package/plugins/specweave-ado/lib/ado-board-resolver.ts +328 -0
  49. package/plugins/specweave-ado/lib/ado-hierarchical-sync.ts +484 -0
  50. package/plugins/specweave-ado/plugin.json +20 -0
  51. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +15 -2
  52. package/plugins/specweave-backend/.claude-plugin/plugin.json +15 -2
  53. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +14 -2
  54. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +14 -2
  55. package/plugins/specweave-docs/.claude-plugin/plugin.json +13 -2
  56. package/plugins/specweave-figma/.claude-plugin/plugin.json +14 -2
  57. package/plugins/specweave-frontend/.claude-plugin/plugin.json +15 -2
  58. package/plugins/specweave-github/lib/github-board-resolver.ts +164 -0
  59. package/plugins/specweave-github/lib/github-hierarchical-sync.ts +344 -0
  60. package/plugins/specweave-github/plugin.json +19 -0
  61. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +15 -2
  62. package/plugins/specweave-jira/.claude-plugin/plugin.json +14 -2
  63. package/plugins/specweave-jira/lib/jira-board-resolver.ts +127 -0
  64. package/plugins/specweave-jira/lib/jira-hierarchical-sync.ts +283 -0
  65. package/plugins/specweave-jira/plugin.json +20 -0
  66. package/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md +584 -0
  67. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +14 -2
  68. package/plugins/specweave-payments/.claude-plugin/plugin.json +14 -2
  69. package/plugins/specweave-testing/.claude-plugin/plugin.json +14 -2
  70. package/plugins/specweave-tooling/.claude-plugin/plugin.json +13 -2
@@ -0,0 +1,427 @@
1
+ ---
2
+ name: plugin-validator
3
+ description: Proactively validates SpecWeave plugin installation before workflows execute. Auto-activates when /specweave:* commands detected. Ensures marketplace registered, core plugin installed, and context-specific plugins available. Prevents cryptic errors from missing plugins. Enables seamless environment migration (local → VM → Cloud IDE). Activates for plugin validation, environment setup, missing plugins, specweave commands, marketplace registration, plugin installation, environment migration, fresh setup.
4
+ allowed-tools: Read, Bash, Grep
5
+ ---
6
+
7
+ # Plugin Validator Skill
8
+
9
+ **Purpose**: Proactively validate and install SpecWeave plugins before workflow commands execute.
10
+
11
+ **Auto-Activation**: Triggers when `/specweave:*` commands are detected or when plugin-related issues arise.
12
+
13
+ ## What This Skill Does
14
+
15
+ This skill ensures that your SpecWeave environment is properly configured with all required plugins BEFORE you start working. It prevents frustrating errors and wasted time from missing components.
16
+
17
+ ### Key Features
18
+
19
+ 1. **Marketplace Validation**: Ensures SpecWeave marketplace is registered in `~/.claude/settings.json`
20
+ 2. **Core Plugin Check**: Verifies `specweave` plugin is installed
21
+ 3. **Context Detection**: Analyzes your increment description and suggests relevant plugins
22
+ 4. **Auto-Installation**: Can automatically install missing components (with your permission)
23
+ 5. **Clear Guidance**: Shows exactly what's missing and how to fix it
24
+
25
+ ## When This Skill Activates
26
+
27
+ ✅ **Automatically activates when**:
28
+ - You run any `/specweave:*` command (increment, do, next, etc.)
29
+ - You mention "plugin validation" or "environment setup"
30
+ - You encounter errors related to missing plugins
31
+ - You're setting up SpecWeave in a new environment
32
+
33
+ ✅ **Manual activation**:
34
+ - Run: `specweave validate-plugins`
35
+ - Ask: "Can you validate my plugins?"
36
+ - Report: "I'm getting plugin errors"
37
+
38
+ ## Validation Process
39
+
40
+ ### Phase 1: Marketplace Check
41
+
42
+ **What**: Checks if SpecWeave marketplace is registered in Claude Code
43
+ **Where**: `~/.claude/settings.json`
44
+ **Expected**:
45
+ ```json
46
+ {
47
+ "extraKnownMarketplaces": {
48
+ "specweave": {
49
+ "source": {
50
+ "source": "github",
51
+ "repo": "anton-abyzov/specweave",
52
+ "path": ".claude-plugin"
53
+ }
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ **If missing**: Auto-creates the configuration
60
+
61
+ ### Phase 2: Core Plugin Check
62
+
63
+ **What**: Verifies `specweave` plugin is installed
64
+ **Command**: `/plugin list --installed | grep "specweave"`
65
+ **Expected**: Plugin appears in the list
66
+
67
+ **If missing**: Suggests `/plugin install specweave`
68
+
69
+ ### Phase 3: Context-Aware Plugin Detection
70
+
71
+ **What**: Scans your increment description for keywords
72
+ **Examples**:
73
+
74
+ | Your Description | Detected Keywords | Suggested Plugin |
75
+ |-----------------|-------------------|------------------|
76
+ | "Add GitHub sync" | github, sync | specweave-github |
77
+ | "Stripe billing with React UI" | stripe, billing, react, ui | specweave-payments, specweave-frontend |
78
+ | "Deploy to Kubernetes" | kubernetes, deploy | specweave-kubernetes |
79
+ | "Add Jira integration" | jira, integration | specweave-jira |
80
+
81
+ **Full Keyword Map** (15+ plugins):
82
+ - **specweave-github**: github, git, issues, pull request, pr, repository
83
+ - **specweave-jira**: jira, epic, story, sprint, backlog
84
+ - **specweave-ado**: azure devops, ado, work item, boards
85
+ - **specweave-payments**: stripe, billing, payment, subscription, invoice
86
+ - **specweave-frontend**: react, nextjs, vue, angular, frontend, ui
87
+ - **specweave-kubernetes**: kubernetes, k8s, helm, pod, deployment
88
+ - **specweave-ml**: machine learning, ml, tensorflow, pytorch, model
89
+ - **specweave-observability**: prometheus, grafana, monitoring, metrics
90
+ - **specweave-security**: security, owasp, vulnerability, audit
91
+ - **specweave-diagrams**: diagram, c4, mermaid, architecture
92
+ - **specweave-backend-nodejs**: nodejs, express, fastify, nestjs, backend
93
+ - **specweave-backend-python**: python, fastapi, django, flask
94
+ - **specweave-backend-dotnet**: dotnet, .net, aspnet, c#
95
+ - **specweave-docs-preview**: documentation, docs, preview, docusaurus
96
+ - **specweave-e2e-testing**: playwright, e2e, end-to-end, browser
97
+
98
+ ## Usage Examples
99
+
100
+ ### Example 1: Fresh Environment
101
+
102
+ **Scenario**: You cloned a project to a new VM and want to start working.
103
+
104
+ **Action**: Run `/specweave:increment "Add authentication"`
105
+
106
+ **What Happens**:
107
+ ```
108
+ 🔍 Validating SpecWeave environment...
109
+
110
+ ❌ Missing components detected:
111
+ • SpecWeave marketplace not registered
112
+ • Core plugin (specweave) not installed
113
+
114
+ 📦 Installing missing components...
115
+ ✅ Marketplace registered (.claude/settings.json)
116
+ ✅ Core plugin installed (specweave v0.9.4)
117
+
118
+ 🎉 Environment ready! Proceeding with increment planning...
119
+ ```
120
+
121
+ ### Example 2: Context Detection
122
+
123
+ **Scenario**: You're adding a new feature that uses GitHub and React.
124
+
125
+ **Action**: Run `/specweave:increment "Add GitHub sync with React UI"`
126
+
127
+ **What Happens**:
128
+ ```
129
+ 🔍 Validating SpecWeave environment...
130
+
131
+ ✅ Marketplace registered
132
+ ✅ Core plugin installed (specweave v0.9.4)
133
+
134
+ 🔎 Detected context plugins from your description:
135
+ • specweave-github (keywords: github, sync)
136
+ • specweave-frontend (keywords: react, ui)
137
+
138
+ ❌ Missing context plugins:
139
+ • specweave-github
140
+ • specweave-frontend
141
+
142
+ 📦 Would you like to install these plugins?
143
+ They provide specialized expertise for your use case.
144
+
145
+ 1. Yes, install now (recommended)
146
+ 2. No, skip for now (limited capabilities)
147
+
148
+ Your choice [1]:
149
+ ```
150
+
151
+ ### Example 3: Manual Validation
152
+
153
+ **Scenario**: You want to check your environment without running a command.
154
+
155
+ **Action**: Run `specweave validate-plugins --verbose`
156
+
157
+ **What Happens**:
158
+ ```
159
+ [PluginValidator] Checking marketplace registration...
160
+ [PluginValidator] Marketplace registered ✓
161
+ [PluginValidator] Checking core plugin (specweave)...
162
+ [PluginValidator] Core plugin installed ✓ (0.9.4)
163
+
164
+ ✅ All plugins validated!
165
+ • Core plugin: installed (v0.9.4)
166
+ • Cache: miss
167
+ ```
168
+
169
+ ### Example 4: Dry-Run Mode
170
+
171
+ **Scenario**: You want to see what would be installed without actually installing.
172
+
173
+ **Action**: Run `specweave validate-plugins --context="Add Stripe billing" --dry-run`
174
+
175
+ **What Happens**:
176
+ ```
177
+ 🔍 Validating SpecWeave environment...
178
+
179
+ ✅ Marketplace registered
180
+ ✅ Core plugin installed
181
+
182
+ 🔎 Detected context plugins:
183
+ • specweave-payments (keywords: stripe, billing)
184
+
185
+ ❌ Missing: specweave-payments
186
+
187
+ 💡 Dry-run mode: No changes made.
188
+ To install, remove --dry-run flag.
189
+ ```
190
+
191
+ ## CLI Command Reference
192
+
193
+ **Basic validation**:
194
+ ```bash
195
+ specweave validate-plugins
196
+ ```
197
+
198
+ **Auto-install missing components**:
199
+ ```bash
200
+ specweave validate-plugins --auto-install
201
+ ```
202
+
203
+ **With context detection**:
204
+ ```bash
205
+ specweave validate-plugins --context="Add GitHub sync for mobile app"
206
+ ```
207
+
208
+ **Dry-run (preview only)**:
209
+ ```bash
210
+ specweave validate-plugins --dry-run --context="Add Stripe billing"
211
+ ```
212
+
213
+ **Verbose mode**:
214
+ ```bash
215
+ specweave validate-plugins --verbose
216
+ ```
217
+
218
+ **Combined flags**:
219
+ ```bash
220
+ specweave validate-plugins --auto-install --context="Deploy to Kubernetes" --verbose
221
+ ```
222
+
223
+ ## Troubleshooting
224
+
225
+ ### Error: "Claude CLI not available"
226
+
227
+ **Symptom**: Validation fails with "command not found"
228
+
229
+ **Solution**:
230
+ 1. Ensure Claude Code is installed
231
+ 2. Restart your terminal
232
+ 3. Verify: `claude --version`
233
+ 4. If still failing, install plugins manually using `/plugin install` command
234
+
235
+ ### Error: "Marketplace configuration invalid"
236
+
237
+ **Symptom**: Marketplace is registered but validation fails
238
+
239
+ **Solution**:
240
+ 1. Check `~/.claude/settings.json` structure
241
+ 2. Ensure marketplace points to GitHub source
242
+ 3. If using local marketplace (dev mode), this is expected
243
+ 4. Re-run validation to auto-fix configuration
244
+
245
+ ### Error: "Plugin installation failed"
246
+
247
+ **Symptom**: Auto-install tries but fails
248
+
249
+ **Solution**:
250
+ 1. Check internet connection (GitHub access required)
251
+ 2. Verify Claude Code is running
252
+ 3. Try manual installation: `/plugin install specweave`
253
+ 4. Check Claude Code logs for detailed errors
254
+
255
+ ### False Positive: Wrong Plugin Suggested
256
+
257
+ **Symptom**: Context detection suggests irrelevant plugin
258
+
259
+ **Example**: Description "Add GitHub Actions" suggests specweave-github (but you meant CI/CD, not issue tracking)
260
+
261
+ **Solution**:
262
+ 1. Skip the suggestion (choose option 2)
263
+ 2. Install correct plugin manually later
264
+ 3. This is rare (2+ keyword matches required for suggestion)
265
+
266
+ ## Performance
267
+
268
+ **Validation Speed**:
269
+ - ✅ With cache: <2 seconds
270
+ - ✅ Without cache: <5 seconds
271
+ - ✅ With auto-install: <30 seconds (1-2 plugins)
272
+
273
+ **Caching**:
274
+ - Results cached for 5 minutes
275
+ - Speeds up repeated commands
276
+ - Invalidated after plugin changes
277
+ - Cache location: `~/.specweave/validation-cache.json`
278
+
279
+ ## Configuration
280
+
281
+ **Validation can be configured** in `.specweave/config.json`:
282
+
283
+ ```json
284
+ {
285
+ "pluginValidation": {
286
+ "enabled": true, // Enable/disable validation (default: true)
287
+ "autoInstall": true, // Auto-install missing components (default: true)
288
+ "verbose": false, // Show detailed logs (default: false)
289
+ "cacheValidation": true, // Cache results (default: true)
290
+ "cacheTTL": 300 // Cache TTL in seconds (default: 300 = 5 min)
291
+ }
292
+ }
293
+ ```
294
+
295
+ **Disable validation** (not recommended):
296
+ ```json
297
+ {
298
+ "pluginValidation": {
299
+ "enabled": false
300
+ }
301
+ }
302
+ ```
303
+
304
+ ## Integration with Commands
305
+
306
+ **All SpecWeave commands validate plugins** before execution (STEP 0):
307
+
308
+ - `/specweave:increment` - Validates before PM agent runs
309
+ - `/specweave:do` - Validates before task execution
310
+ - `/specweave:next` - Validates before next increment
311
+ - `/specweave:done` - Validates before completion
312
+ - ... (all 22 commands)
313
+
314
+ **Workflow**:
315
+ ```
316
+ User: /specweave:increment "Add feature"
317
+
318
+ [STEP 0: Plugin Validation]
319
+ ↓ (only proceeds if valid)
320
+ [STEP 1: PM Agent Planning]
321
+
322
+ [STEP 2: Architect Design]
323
+
324
+ [STEP 3: Implementation]
325
+ ```
326
+
327
+ ## Benefits
328
+
329
+ ✅ **Zero manual setup** - Plugins install automatically
330
+ ✅ **Seamless migration** - Works across local/VM/Cloud IDE
331
+ ✅ **Context-aware** - Suggests relevant plugins based on your work
332
+ ✅ **Clear errors** - No more cryptic "command not found" messages
333
+ ✅ **Fast** - Caching ensures minimal overhead (<2s cached, <5s uncached)
334
+ ✅ **Non-blocking** - Can skip validation if needed (not recommended)
335
+
336
+ ## Edge Cases
337
+
338
+ **1. Offline Mode**
339
+ - Validation detects missing plugins but can't install
340
+ - Shows manual instructions instead
341
+ - Validation still useful (identifies what's missing)
342
+
343
+ **2. Development Mode**
344
+ - Local marketplace detected (not GitHub)
345
+ - Shows warning: "Development mode detected"
346
+ - Validation passes (assumes dev knows what they're doing)
347
+
348
+ **3. Concurrent Validation**
349
+ - Multiple commands run simultaneously
350
+ - Uses cache to prevent duplicate validations
351
+ - Race conditions handled gracefully
352
+
353
+ **4. Partial Installation**
354
+ - Marketplace exists, but plugin missing (or vice versa)
355
+ - Installs only missing components
356
+ - Doesn't reinstall existing components
357
+
358
+ ## Manual Installation (Fallback)
359
+
360
+ **If auto-install fails**, follow these steps:
361
+
362
+ ### Step 1: Register Marketplace
363
+
364
+ Edit `~/.claude/settings.json`:
365
+ ```json
366
+ {
367
+ "extraKnownMarketplaces": {
368
+ "specweave": {
369
+ "source": {
370
+ "source": "github",
371
+ "repo": "anton-abyzov/specweave",
372
+ "path": ".claude-plugin"
373
+ }
374
+ }
375
+ }
376
+ }
377
+ ```
378
+
379
+ ### Step 2: Install Core Plugin
380
+
381
+ In Claude Code, run:
382
+ ```
383
+ /plugin install specweave
384
+ ```
385
+
386
+ ### Step 3: Restart Claude Code
387
+
388
+ Close and reopen Claude Code for changes to take effect.
389
+
390
+ ### Step 4: Verify Installation
391
+
392
+ Run:
393
+ ```bash
394
+ specweave validate-plugins
395
+ ```
396
+
397
+ Should show:
398
+ ```
399
+ ✅ All plugins validated!
400
+ • Core plugin: installed (v0.9.4)
401
+ ```
402
+
403
+ ### Step 5: Install Context Plugins (Optional)
404
+
405
+ If you need specific plugins:
406
+ ```
407
+ /plugin install specweave-github
408
+ /plugin install specweave-payments
409
+ /plugin install specweave-frontend
410
+ ```
411
+
412
+ ## Summary
413
+
414
+ **This skill ensures you NEVER waste time debugging plugin issues.**
415
+
416
+ It proactively validates your environment, auto-installs missing components, and suggests relevant plugins based on your work. The result: you focus on building features, not troubleshooting setup.
417
+
418
+ **Questions?**
419
+ - Check troubleshooting section above
420
+ - Run `specweave validate-plugins --help`
421
+ - Visit: https://spec-weave.com/docs/plugin-validation
422
+
423
+ ---
424
+
425
+ **Skill Version**: 1.0.0
426
+ **Introduced**: SpecWeave v0.9.4
427
+ **Last Updated**: 2025-11-09
@@ -6,10 +6,8 @@
6
6
  "name": "SpecWeave Team",
7
7
  "url": "https://spec-weave.com"
8
8
  },
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/anton-abyzov/specweave"
12
- },
9
+ "homepage": "https://spec-weave.com",
10
+ "repository": "https://github.com/anton-abyzov/specweave",
13
11
  "keywords": [
14
12
  "azure-devops",
15
13
  "ado",