specweave 0.9.1 → 0.10.1

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 (75) hide show
  1. package/CLAUDE.md +153 -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/init.d.ts.map +1 -1
  9. package/dist/cli/commands/init.js +29 -1
  10. package/dist/cli/commands/init.js.map +1 -1
  11. package/dist/cli/commands/validate-jira.d.ts +35 -0
  12. package/dist/cli/commands/validate-jira.d.ts.map +1 -0
  13. package/dist/cli/commands/validate-jira.js +112 -0
  14. package/dist/cli/commands/validate-jira.js.map +1 -0
  15. package/dist/cli/commands/validate-plugins.d.ts +41 -0
  16. package/dist/cli/commands/validate-plugins.d.ts.map +1 -0
  17. package/dist/cli/commands/validate-plugins.js +171 -0
  18. package/dist/cli/commands/validate-plugins.js.map +1 -0
  19. package/dist/core/types/sync-profile.d.ts +177 -29
  20. package/dist/core/types/sync-profile.d.ts.map +1 -1
  21. package/dist/core/types/sync-profile.js +48 -1
  22. package/dist/core/types/sync-profile.js.map +1 -1
  23. package/dist/hooks/lib/translate-living-docs.d.ts.map +1 -1
  24. package/dist/hooks/lib/translate-living-docs.js +16 -7
  25. package/dist/hooks/lib/translate-living-docs.js.map +1 -1
  26. package/dist/metrics/dora-calculator.d.ts +7 -3
  27. package/dist/metrics/dora-calculator.d.ts.map +1 -1
  28. package/dist/metrics/dora-calculator.js +19 -6
  29. package/dist/metrics/dora-calculator.js.map +1 -1
  30. package/dist/metrics/report-generator.d.ts +17 -0
  31. package/dist/metrics/report-generator.d.ts.map +1 -0
  32. package/dist/metrics/report-generator.js +403 -0
  33. package/dist/metrics/report-generator.js.map +1 -0
  34. package/dist/utils/external-resource-validator.d.ts +102 -0
  35. package/dist/utils/external-resource-validator.d.ts.map +1 -0
  36. package/dist/utils/external-resource-validator.js +400 -0
  37. package/dist/utils/external-resource-validator.js.map +1 -0
  38. package/dist/utils/plugin-validator.d.ts +161 -0
  39. package/dist/utils/plugin-validator.d.ts.map +1 -0
  40. package/dist/utils/plugin-validator.js +565 -0
  41. package/dist/utils/plugin-validator.js.map +1 -0
  42. package/package.json +2 -1
  43. package/plugins/specweave/commands/specweave-do.md +47 -0
  44. package/plugins/specweave/commands/specweave-increment.md +82 -0
  45. package/plugins/specweave/commands/specweave-next.md +47 -0
  46. package/plugins/specweave/hooks/post-increment-planning.sh +117 -38
  47. package/plugins/specweave/hooks/pre-tool-use.sh +133 -0
  48. package/plugins/specweave/plugin.json +22 -0
  49. package/plugins/specweave/skills/SKILLS-INDEX.md +23 -2
  50. package/plugins/specweave/skills/plugin-installer/SKILL.md +340 -0
  51. package/plugins/specweave/skills/plugin-validator/SKILL.md +427 -0
  52. package/plugins/specweave-ado/.claude-plugin/plugin.json +2 -4
  53. package/plugins/specweave-ado/lib/ado-board-resolver.ts +328 -0
  54. package/plugins/specweave-ado/lib/ado-hierarchical-sync.ts +484 -0
  55. package/plugins/specweave-ado/plugin.json +20 -0
  56. package/plugins/specweave-alternatives/.claude-plugin/plugin.json +15 -2
  57. package/plugins/specweave-backend/.claude-plugin/plugin.json +15 -2
  58. package/plugins/specweave-cost-optimizer/.claude-plugin/plugin.json +14 -2
  59. package/plugins/specweave-diagrams/.claude-plugin/plugin.json +14 -2
  60. package/plugins/specweave-docs/.claude-plugin/plugin.json +13 -2
  61. package/plugins/specweave-figma/.claude-plugin/plugin.json +14 -2
  62. package/plugins/specweave-frontend/.claude-plugin/plugin.json +15 -2
  63. package/plugins/specweave-github/lib/github-board-resolver.ts +164 -0
  64. package/plugins/specweave-github/lib/github-hierarchical-sync.ts +344 -0
  65. package/plugins/specweave-github/plugin.json +19 -0
  66. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +15 -2
  67. package/plugins/specweave-jira/.claude-plugin/plugin.json +14 -2
  68. package/plugins/specweave-jira/lib/jira-board-resolver.ts +127 -0
  69. package/plugins/specweave-jira/lib/jira-hierarchical-sync.ts +283 -0
  70. package/plugins/specweave-jira/plugin.json +20 -0
  71. package/plugins/specweave-jira/skills/jira-resource-validator/SKILL.md +647 -0
  72. package/plugins/specweave-kubernetes/.claude-plugin/plugin.json +14 -2
  73. package/plugins/specweave-payments/.claude-plugin/plugin.json +14 -2
  74. package/plugins/specweave-testing/.claude-plugin/plugin.json +14 -2
  75. package/plugins/specweave-tooling/.claude-plugin/plugin.json +13 -2
@@ -0,0 +1,340 @@
1
+ ---
2
+ name: plugin-installer
3
+ description: Proactive just-in-time plugin installation. Auto-detects when specialized plugins are needed (docs-preview, frontend, kubernetes, ML, payments, testing, etc.) and installs them automatically before use. Activates for preview docs, Docusaurus, React, Next.js, K8s, Kubernetes, Helm, TensorFlow, PyTorch, ML model, Stripe, billing, payment, Playwright, E2E testing, Figma, design system, ADO, Azure DevOps, infrastructure, Prometheus, Grafana, monitoring, Node.js, Python backend, REST API, cloud deployment, diagram, Mermaid, C4, architecture diagram.
4
+ ---
5
+
6
+ # Plugin Installer - Proactive Just-in-Time Plugin Installation
7
+
8
+ **Purpose**: Automatically detect when specialized SpecWeave plugins are needed and install them just-in-time, BEFORE attempting to use their features.
9
+
10
+ **When to Activate**: Whenever user requests functionality that requires a specific plugin (e.g., "preview docs", "deploy to K8s", "add React component", "train ML model", etc.)
11
+
12
+ ---
13
+
14
+ ## 🚨 CRITICAL: The Plugin Installation Gap
15
+
16
+ **The Problem**: Users request features that require plugins (e.g., "preview docs locally"), but those plugins are NOT installed. Claude tries to use plugin features anyway, which fails silently or produces incomplete results.
17
+
18
+ **The Solution**: This skill proactively detects plugin requirements, checks if plugins are installed, and auto-installs them BEFORE attempting to use their features.
19
+
20
+ ---
21
+
22
+ ## Plugin Detection Keywords Map
23
+
24
+ **Use this map to detect which plugin is needed based on user's request keywords:**
25
+
26
+ | User Keywords | Required Plugin | Installation Command |
27
+ |--------------|----------------|---------------------|
28
+ | **Documentation Preview** |
29
+ | "preview docs", "browse docs locally", "documentation UI", "Docusaurus server", "local docs preview" | `specweave-docs-preview` | `/plugin install specweave-docs-preview` |
30
+ | **Frontend Development** |
31
+ | "React", "Next.js", "Vue", "Angular", "frontend", "UI component", "design system", "Tailwind" | `specweave-frontend` | `/plugin install specweave-frontend` |
32
+ | **Kubernetes/DevOps** |
33
+ | "K8s", "Kubernetes", "Helm", "kubectl", "deploy", "container", "pod", "service", "ingress" | `specweave-kubernetes` | `/plugin install specweave-kubernetes` |
34
+ | **Machine Learning** |
35
+ | "TensorFlow", "PyTorch", "ML model", "training", "machine learning", "neural network", "dataset" | `specweave-ml` | `/plugin install specweave-ml` |
36
+ | **Payments** |
37
+ | "Stripe", "PayPal", "billing", "subscription", "payment", "checkout", "PCI compliance" | `specweave-payments` | `/plugin install specweave-payments` |
38
+ | **Testing** |
39
+ | "Playwright", "E2E testing", "browser automation", "visual regression", "test automation" | `specweave-testing` | `/plugin install specweave-testing` |
40
+ | **Figma/Design** |
41
+ | "Figma", "design tokens", "design system", "prototype", "wireframe", "mockup" | `specweave-figma` | `/plugin install specweave-figma` |
42
+ | **Backend Development** |
43
+ | "Node.js backend", "Python backend", ".NET", "Express", "FastAPI", "Django", "REST API" | `specweave-backend` | `/plugin install specweave-backend` |
44
+ | **Infrastructure** |
45
+ | "Hetzner", "cloud infrastructure", "Prometheus", "Grafana", "monitoring", "alerting", "SLO" | `specweave-infrastructure` | `/plugin install specweave-infrastructure` |
46
+ | **Architecture Diagrams** |
47
+ | "Mermaid diagram", "C4 model", "architecture diagram", "sequence diagram", "ER diagram" | `specweave-diagrams` | `/plugin install specweave-diagrams` |
48
+ | **Issue Trackers** (Usually auto-installed during init) |
49
+ | "GitHub Issues", "sync GitHub", "create issue", "PR automation" | `specweave-github` | `/plugin install specweave-github` |
50
+ | "Jira", "epic", "sprint", "story points", "Jira sync" | `specweave-jira` | `/plugin install specweave-jira` |
51
+ | "ADO", "Azure DevOps", "work items", "boards", "ADO sync" | `specweave-ado` | `/plugin install specweave-ado` |
52
+
53
+ ---
54
+
55
+ ## Workflow: Just-in-Time Plugin Installation
56
+
57
+ **CRITICAL**: Follow this workflow EVERY TIME you detect plugin keywords in user's request:
58
+
59
+ ### Step 1: Detect Plugin Requirement
60
+
61
+ When user mentions keywords from the map above, **IMMEDIATELY** check if the required plugin is needed.
62
+
63
+ **Example**:
64
+ ```
65
+ User: "Can you preview the internal docs locally?"
66
+
67
+ Keywords detected: "preview", "docs", "locally"
68
+ → Required plugin: specweave-docs-preview
69
+ ```
70
+
71
+ ### Step 2: Check if Plugin is Installed
72
+
73
+ ```bash
74
+ # Check installed plugins
75
+ /plugin list --installed
76
+ ```
77
+
78
+ **Parse the output** to see if the required plugin is in the list.
79
+
80
+ ### Step 3: Auto-Install if Missing
81
+
82
+ If the plugin is NOT installed:
83
+
84
+ ```bash
85
+ # Install the plugin
86
+ /plugin install <plugin-name>
87
+
88
+ # Example:
89
+ /plugin install specweave-docs-preview
90
+ ```
91
+
92
+ ### Step 4: Notify User (Clear and Friendly)
93
+
94
+ **Good notification format**:
95
+
96
+ ```
97
+ 🔌 Detected need for <plugin-name> plugin
98
+
99
+ 📦 Installing <plugin-name>...
100
+ This plugin provides: <brief description>
101
+
102
+ ✅ Plugin installed successfully!
103
+ You can now: <list capabilities>
104
+
105
+ Proceeding with your request...
106
+ ```
107
+
108
+ **Example**:
109
+
110
+ ```
111
+ 🔌 Detected need for specweave-docs-preview plugin
112
+
113
+ 📦 Installing specweave-docs-preview...
114
+ This plugin provides: Beautiful Docusaurus UI for browsing .specweave/docs/
115
+
116
+ ✅ Plugin installed successfully!
117
+ You can now:
118
+ • Browse documentation in beautiful UI
119
+ • Hot reload when editing markdown files
120
+ • Render Mermaid diagrams automatically
121
+
122
+ Proceeding to launch docs preview server...
123
+ ```
124
+
125
+ ### Step 5: Proceed with User's Request
126
+
127
+ **ONLY AFTER** the plugin is installed, proceed to use its features.
128
+
129
+ ---
130
+
131
+ ## Common Scenarios
132
+
133
+ ### Scenario 1: Documentation Preview
134
+
135
+ **User Request**: "Show me the internal docs in a nice UI"
136
+
137
+ **Workflow**:
138
+ ```
139
+ 1. Detect keywords: "docs", "UI"
140
+ → Required: specweave-docs-preview
141
+
142
+ 2. Check installed: /plugin list --installed
143
+ → Not found
144
+
145
+ 3. Install: /plugin install specweave-docs-preview
146
+
147
+ 4. Notify user:
148
+ 🔌 Installing specweave-docs-preview for beautiful docs UI...
149
+ ✅ Installed!
150
+
151
+ 5. Launch: /specweave:docs preview
152
+ ```
153
+
154
+ ### Scenario 2: Kubernetes Deployment
155
+
156
+ **User Request**: "Help me deploy this to Kubernetes"
157
+
158
+ **Workflow**:
159
+ ```
160
+ 1. Detect keywords: "deploy", "Kubernetes"
161
+ → Required: specweave-kubernetes
162
+
163
+ 2. Check installed: /plugin list --installed
164
+ → Not found
165
+
166
+ 3. Install: /plugin install specweave-kubernetes
167
+
168
+ 4. Notify user:
169
+ 🔌 Installing specweave-kubernetes for K8s deployment...
170
+ ✅ Installed! You can now generate manifests, Helm charts, and validate deployments.
171
+
172
+ 5. Proceed with K8s expert agent for deployment
173
+ ```
174
+
175
+ ### Scenario 3: React Component Development
176
+
177
+ **User Request**: "Create a new React component for user profile"
178
+
179
+ **Workflow**:
180
+ ```
181
+ 1. Detect keywords: "React", "component"
182
+ → Required: specweave-frontend
183
+
184
+ 2. Check installed: /plugin list --installed
185
+ → Not found
186
+
187
+ 3. Install: /plugin install specweave-frontend
188
+
189
+ 4. Notify user:
190
+ 🔌 Installing specweave-frontend for React development...
191
+ ✅ Installed! You can now use frontend expert agent and design system integration.
192
+
193
+ 5. Proceed with component creation
194
+ ```
195
+
196
+ ### Scenario 4: Machine Learning Pipeline
197
+
198
+ **User Request**: "Train a TensorFlow model for image classification"
199
+
200
+ **Workflow**:
201
+ ```
202
+ 1. Detect keywords: "TensorFlow", "model", "training"
203
+ → Required: specweave-ml
204
+
205
+ 2. Check installed: /plugin list --installed
206
+ → Not found
207
+
208
+ 3. Install: /plugin install specweave-ml
209
+
210
+ 4. Notify user:
211
+ 🔌 Installing specweave-ml for ML workflows...
212
+ ✅ Installed! You can now use ML expert agent for training pipelines and deployment.
213
+
214
+ 5. Proceed with ML pipeline setup
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Error Handling
220
+
221
+ ### Plugin Installation Fails
222
+
223
+ If `/plugin install` fails:
224
+
225
+ ```
226
+ ❌ Failed to install <plugin-name>
227
+
228
+ Possible causes:
229
+ 1. Marketplace not registered
230
+ → Try: /plugin marketplace add anton-abyzov/specweave
231
+
232
+ 2. Network connectivity issues
233
+ → Check internet connection and retry
234
+
235
+ 3. Plugin doesn't exist
236
+ → Verify plugin name: /plugin list (shows all available plugins)
237
+
238
+ Would you like to:
239
+ a) Retry installation
240
+ b) Proceed without the plugin (limited capabilities)
241
+ c) Troubleshoot further
242
+ ```
243
+
244
+ ### Plugin Already Installed
245
+
246
+ If plugin is already installed, skip installation and proceed:
247
+
248
+ ```
249
+ ✅ <plugin-name> is already installed
250
+ Proceeding with your request...
251
+ ```
252
+
253
+ ---
254
+
255
+ ## Integration with Other Skills
256
+
257
+ **This skill should be consulted BEFORE other skills attempt to use plugin features.**
258
+
259
+ ### Example: increment-planner skill
260
+
261
+ When increment-planner detects plugin requirements (Step 6), it should:
262
+
263
+ 1. **Detect plugins** (as it already does)
264
+ 2. **Consult plugin-installer skill** (NEW!)
265
+ 3. **Auto-install missing plugins** (via this skill)
266
+ 4. **Then proceed** with increment planning
267
+
268
+ ### Example: docs-preview skill (hypothetical)
269
+
270
+ ```markdown
271
+ # BEFORE using Docusaurus features:
272
+
273
+ 1. Check if specweave-docs-preview is installed
274
+ → If not: Invoke plugin-installer skill
275
+ → Auto-install specweave-docs-preview
276
+
277
+ 2. Then launch Docusaurus server
278
+ ```
279
+
280
+ ---
281
+
282
+ ## Benefits of This Approach
283
+
284
+ ✅ **Zero friction**: Users don't need to manually install plugins
285
+ ✅ **Proactive**: Detects requirements automatically
286
+ ✅ **Clear UX**: Users see what's being installed and why
287
+ ✅ **Just-in-time**: Only installs plugins when actually needed
288
+ ✅ **Fail-safe**: Handles installation errors gracefully
289
+
290
+ ---
291
+
292
+ ## Testing This Skill
293
+
294
+ **Test Case 1: Docs Preview**
295
+ ```
296
+ User: "Show me the internal documentation in a browser"
297
+
298
+ Expected:
299
+ 1. Detects "documentation", "browser" → specweave-docs-preview
300
+ 2. Checks installed
301
+ 3. Auto-installs if missing
302
+ 4. Launches preview
303
+ ```
304
+
305
+ **Test Case 2: K8s Deployment**
306
+ ```
307
+ User: "Deploy this application to Kubernetes cluster"
308
+
309
+ Expected:
310
+ 1. Detects "Kubernetes" → specweave-kubernetes
311
+ 2. Checks installed
312
+ 3. Auto-installs if missing
313
+ 4. Proceeds with deployment
314
+ ```
315
+
316
+ **Test Case 3: React Development**
317
+ ```
318
+ User: "Add a React component for user settings"
319
+
320
+ Expected:
321
+ 1. Detects "React", "component" → specweave-frontend
322
+ 2. Checks installed
323
+ 3. Auto-installs if missing
324
+ 4. Proceeds with component creation
325
+ ```
326
+
327
+ ---
328
+
329
+ ## References
330
+
331
+ - **Plugin Expert Skill**: Consult for correct installation syntax
332
+ - **Official Docs**: https://code.claude.com/docs/en/plugins
333
+ - **SpecWeave Marketplace**: .claude-plugin/marketplace.json
334
+ - **CLAUDE.md**: Plugin architecture and detection phases
335
+
336
+ ---
337
+
338
+ **Key Principle**: ALWAYS install plugins BEFORE attempting to use their features. Never fail silently - always notify users of installation steps.
339
+
340
+ **Last Updated**: 2025-11-10 (v0.10.0)