specweave 0.8.1 → 0.8.3

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 (32) hide show
  1. package/bin/specweave.js +0 -27
  2. package/dist/cli/commands/init.d.ts.map +1 -1
  3. package/dist/cli/commands/init.js +72 -110
  4. package/dist/cli/commands/init.js.map +1 -1
  5. package/dist/metrics/calculators/change-failure-rate.d.ts +1 -1
  6. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -1
  7. package/dist/metrics/calculators/change-failure-rate.js +1 -1
  8. package/dist/metrics/calculators/change-failure-rate.js.map +1 -1
  9. package/dist/metrics/calculators/deployment-frequency.d.ts +1 -1
  10. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -1
  11. package/dist/metrics/calculators/deployment-frequency.js +1 -1
  12. package/dist/metrics/calculators/deployment-frequency.js.map +1 -1
  13. package/dist/metrics/calculators/lead-time.d.ts +1 -1
  14. package/dist/metrics/calculators/lead-time.d.ts.map +1 -1
  15. package/dist/metrics/calculators/lead-time.js +2 -2
  16. package/dist/metrics/calculators/lead-time.js.map +1 -1
  17. package/dist/metrics/calculators/mttr.d.ts +1 -1
  18. package/dist/metrics/calculators/mttr.d.ts.map +1 -1
  19. package/dist/metrics/calculators/mttr.js +2 -2
  20. package/dist/metrics/calculators/mttr.js.map +1 -1
  21. package/dist/metrics/dora-calculator.d.ts +2 -2
  22. package/dist/metrics/dora-calculator.d.ts.map +1 -1
  23. package/dist/metrics/dora-calculator.js +5 -5
  24. package/dist/metrics/dora-calculator.js.map +1 -1
  25. package/dist/metrics/github-client.d.ts +1 -1
  26. package/dist/metrics/github-client.d.ts.map +1 -1
  27. package/dist/metrics/utils/tier-classifier.d.ts +1 -1
  28. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -1
  29. package/package.json +2 -1
  30. package/plugins/specweave/hooks/post-increment-plugin-detect.sh +0 -142
  31. package/plugins/specweave/hooks/pre-task-plugin-detect.sh +0 -96
  32. package/plugins/specweave/skills/plugin-detector/SKILL.md +0 -324
@@ -1,324 +0,0 @@
1
- ---
2
- name: plugin-detector
3
- description: Detects when SpecWeave plugins are needed based on tech stack mentions. Activates for frontend (Next.js, React, Vue), backend (.NET, Node.js, Python), infrastructure (Docker, K8s), external tools (GitHub, JIRA), payments (Stripe), ML (TensorFlow), testing (Playwright), and design (Figma).
4
- ---
5
-
6
- # SpecWeave Plugin Detector
7
-
8
- ## What I Do
9
-
10
- I detect when you need a SpecWeave plugin that isn't installed yet, and guide you through enabling it with clear, copy-pasteable commands.
11
-
12
- ## When I Activate
13
-
14
- When you mention capabilities that require specific SpecWeave plugins:
15
-
16
- ### External Integrations
17
- - **GitHub**: "sync to GitHub", "create issue", "GitHub integration", "export to GitHub" → needs `specweave-github`
18
- - **Jira**: "sync to Jira", "create Jira ticket", "Jira integration" → needs `specweave-jira`
19
- - **Azure DevOps**: "sync to ADO", "Azure DevOps", "work items" → needs `specweave-ado`
20
-
21
- ### Tech Stacks
22
- - **Kubernetes**: "deploy to K8s", "Helm chart", "kubectl", "K8s manifests" → needs `specweave-kubernetes`
23
- - **Frontend**: "React component", "Next.js", "Vue", "design system" → needs `specweave-frontend`
24
- - **Backend**: "Express API", "FastAPI", "NestJS", ".NET backend" → needs `specweave-backend`
25
-
26
- ### Domain Expertise
27
- - **ML/AI**: "train model", "MLflow", "TensorFlow", "PyTorch", "ML pipeline" → needs `specweave-ml`
28
- - **Payments**: "Stripe", "PayPal", "subscription billing", "PCI compliance" → needs `specweave-payments`
29
- - **Testing**: "Playwright tests", "E2E testing", "visual regression" → needs `specweave-testing`
30
- - **Figma**: "Figma design", "design tokens", "import from Figma" → needs `specweave-figma`
31
- - **Infrastructure**: "Hetzner", "Prometheus", "Grafana", "monitoring" → needs `specweave-infrastructure`
32
- - **Diagrams**: "C4 diagram", "architecture diagram", "Mermaid", "sequence diagram" → needs `specweave-diagrams`
33
-
34
- ## How I Help
35
-
36
- ### Mode 1: Passive Tech Stack Detection (NEW!)
37
-
38
- When users mention tech stacks in ANY question (not just increments), I automatically:
39
-
40
- 1. **Scan project structure** using `src/utils/plugin-detection.ts`:
41
- - Check package.json dependencies
42
- - Detect .NET (*.csproj), Python (requirements.txt), etc.
43
- - Find Docker, Kubernetes, infrastructure files
44
- - Identify framework-specific patterns
45
-
46
- 2. **Detect missing plugins**:
47
- - Compare detected tech stack vs installed plugins
48
- - Group by confidence (high/medium/low)
49
-
50
- 3. **Suggest proactively** (non-blocking):
51
- ```
52
- 🔌 Plugin Recommendations
53
-
54
- Based on your tech stack (Next.js + .NET + Docker), these plugins would help:
55
-
56
- Recommended (high confidence):
57
- • specweave-frontend - Next.js, React support
58
- • specweave-backend - .NET 8 API patterns
59
- • specweave-infrastructure - Docker, PostgreSQL
60
-
61
- Install: /plugin install specweave-frontend@specweave
62
- (or continue without - you can add later)
63
- ```
64
-
65
- 4. **Continue with user's request**: Don't block workflow!
66
-
67
- ### Mode 2: Explicit Feature Requests (Original)
68
-
69
- When users explicitly request plugin features:
70
-
71
- 1. **Detect missing plugin**: Check if the required plugin is installed
72
- 2. **Provide installation command**: Give exact `/plugin install` command
73
- 3. **Explain benefits**: List what the plugin provides (skills, agents, commands)
74
- 4. **Continue once enabled**: Resume your task with plugin features available
75
-
76
- ## Plugin Detection Logic
77
-
78
- ### Automatic Scanning (NEW!)
79
-
80
- Use the plugin detection utility to scan project structure:
81
-
82
- **Step 1: Scan project** (TypeScript example, adapt to Claude's capabilities):
83
- ```typescript
84
- import { scanProjectStructure, detectPlugins } from '../../../../../src/utils/plugin-detection';
85
-
86
- // Scan current directory
87
- const cwd = process.cwd();
88
- const signals = await scanProjectStructure(cwd);
89
- const detected = detectPlugins(signals);
90
-
91
- // Group by confidence
92
- const highConfidence = detected.filter(p => p.confidence === 'high');
93
- const mediumConfidence = detected.filter(p => p.confidence === 'medium');
94
- ```
95
-
96
- **Step 2: Check installed plugins**:
97
- ```bash
98
- # Use Claude's plugin list
99
- /plugin list --installed
100
- ```
101
-
102
- **Step 3: Find missing plugins**:
103
- - Compare detected plugins vs installed
104
- - Only suggest high/medium confidence
105
- - Skip if already installed
106
-
107
- **Step 4: Format suggestions**:
108
- ```typescript
109
- import { formatDetectedPlugins, generateInstallCommands } from '../../../../../src/utils/plugin-detection';
110
-
111
- const output = formatDetectedPlugins(detected);
112
- const commands = generateInstallCommands(detected);
113
- ```
114
-
115
- ### Manual Detection (Original)
116
-
117
- I check for plugin installation by:
118
- - Looking for plugin-specific commands (e.g., `/specweave-github:sync`)
119
- - Checking if plugin files exist in `.claude/` directory
120
- - Detecting absence of expected skills/agents
121
-
122
- **If a plugin is missing**, I provide:
123
- ```
124
- 📦 Plugin Required: specweave-{name}
125
-
126
- To enable this plugin:
127
- 1. Run: /plugin install specweave-{name}@specweave
128
- 2. Restart this conversation (or continue - plugin will load)
129
-
130
- This plugin provides:
131
- ✅ {List of key features}
132
- ✅ {Specialized agents}
133
- ✅ {Slash commands}
134
-
135
- Would you like me to guide you through the installation?
136
- ```
137
-
138
- ## Example Flows
139
-
140
- ### Example 0: Passive Tech Stack Detection (NEW!)
141
-
142
- **User**: "Design a spec-driven blueprint for a simple task-tracking web app. Tech stack: Next.js + .NET 8 (Web API) + PostgreSQL + Prisma ORM."
143
-
144
- **Me (plugin-detector activates automatically)**:
145
- ```
146
- 🔍 Scanning your project for tech stack...
147
-
148
- 📦 Plugin Recommendations
149
-
150
- Based on your tech stack (Next.js + .NET 8 + PostgreSQL + Docker), these plugins would help:
151
-
152
- Recommended (high confidence):
153
- • specweave-frontend - Next.js + React patterns, component architecture
154
- Signals: Next.js mentioned
155
- Install: /plugin install specweave-frontend@specweave
156
-
157
- • specweave-backend - .NET 8 Web API patterns, Entity Framework, REST APIs
158
- Signals: .NET 8 Web API mentioned
159
- Install: /plugin install specweave-backend@specweave
160
-
161
- • specweave-infrastructure - Docker Compose, PostgreSQL schema, container orchestration
162
- Signals: PostgreSQL, Docker mentioned (if docker-compose.yml exists)
163
- Install: /plugin install specweave-infrastructure@specweave
164
-
165
- 💡 Quick install all:
166
- /plugin install specweave-frontend@specweave
167
- /plugin install specweave-backend@specweave
168
- /plugin install specweave-infrastructure@specweave
169
-
170
- 📖 Or I can continue with the core plugin only (you can add plugins later)
171
-
172
- Would you like to:
173
- 1️⃣ Install these plugins now (recommended for better architecture patterns)
174
- 2️⃣ Continue without plugins (I'll do my best with core plugin only)
175
- ```
176
-
177
- *User installs plugins, then I continue with their task using plugin-specific knowledge*
178
-
179
- ### Example 1: GitHub Integration
180
-
181
- **User**: "Let's sync this increment to GitHub Issues"
182
-
183
- **Me**:
184
- ```
185
- 📦 Plugin Required: specweave-github
186
-
187
- I notice you want GitHub integration, but the `specweave-github` plugin isn't installed yet.
188
-
189
- To enable GitHub sync features:
190
-
191
- 1. Run this command:
192
- /plugin install specweave-github@specweave
193
-
194
- 2. Once installed, you'll have access to:
195
- ✅ Bidirectional increment ↔ GitHub Issue sync
196
- ✅ Task-level progress tracking via issue comments
197
- ✅ Automatic issue creation from specs
198
- ✅ GitHub CLI integration (via `gh` command)
199
- ✅ Commands: /specweave:github:sync, /specweave:github:create-issue, /specweave:github:status
200
-
201
- Would you like me to guide you through the installation, or would you prefer to continue without GitHub sync?
202
- ```
203
-
204
- ### Example 2: Kubernetes Deployment
205
-
206
- **User**: "Deploy this to Kubernetes with Helm"
207
-
208
- **Me**:
209
- ```
210
- 📦 Plugin Required: specweave-kubernetes
211
-
212
- For Kubernetes deployment features, you'll need the `specweave-kubernetes` plugin.
213
-
214
- To enable:
215
-
216
- 1. Run: /plugin install specweave-kubernetes@specweave
217
-
218
- 2. This plugin provides:
219
- ✅ K8s manifest generation (deployments, services, configmaps)
220
- ✅ Helm chart scaffolding and templates
221
- ✅ GitOps workflow with ArgoCD/Flux
222
- ✅ Security policies and RBAC patterns
223
- ✅ Skills: k8s-manifest-generator, helm-chart-scaffolding, gitops-workflow
224
-
225
- Alternatively, I can help you create basic K8s manifests manually without the plugin. Which would you prefer?
226
- ```
227
-
228
- ### Example 3: Already Installed
229
-
230
- **User**: "Create a C4 diagram for this architecture"
231
-
232
- **Me**:
233
- ```
234
- ✅ Plugin Available: specweave-diagrams
235
-
236
- Great! The diagrams plugin is installed. I can create C4 diagrams for you.
237
-
238
- I'll use the diagrams-architect agent to:
239
- 1. Analyze your architecture from specs
240
- 2. Generate Mermaid C4 diagram code
241
- 3. Export to both .mmd and .svg formats
242
- 4. Place in .specweave/docs/internal/architecture/diagrams/
243
-
244
- Let me start by examining your architecture specifications...
245
- ```
246
-
247
- ## Available SpecWeave Plugins
248
-
249
- ### Core (Always Available)
250
- - `specweave` - Framework essentials (increment lifecycle, PM/Architect/Tech Lead agents)
251
-
252
- ### Integrations
253
- - `specweave-github` - GitHub Issues sync
254
- - `specweave-jira` - Jira integration
255
- - `specweave-ado` - Azure DevOps integration
256
-
257
- ### Tech Stacks
258
- - `specweave-frontend` - React, Next.js, Vue, design systems
259
- - `specweave-backend` - Node.js, Python, .NET APIs
260
- - `specweave-kubernetes` - K8s deployment, Helm, GitOps
261
- - `specweave-infrastructure` - Cloud infra, monitoring, Hetzner
262
-
263
- ### Domain Expertise
264
- - `specweave-ml` - ML pipelines, training, deployment
265
- - `specweave-payments` - Stripe, PayPal, PCI compliance
266
- - `specweave-testing` - Playwright E2E, visual regression
267
- - `specweave-figma` - Design system integration
268
- - `specweave-diagrams` - C4, Mermaid, architecture diagrams
269
- - `specweave-docs` - Docusaurus generation
270
-
271
- ### Utilities
272
- - `specweave-tooling` - Skill creation, routing
273
- - `specweave-cost-optimizer` - Cloud cost comparison
274
- - `specweave-alternatives` - Framework comparison
275
-
276
- ## Installation Commands Reference
277
-
278
- **Quick Install (Most Common)**:
279
- ```bash
280
- # GitHub integration
281
- /plugin install specweave-github@specweave
282
-
283
- # Frontend development
284
- /plugin install specweave-frontend@specweave
285
-
286
- # Backend APIs
287
- /plugin install specweave-backend@specweave
288
-
289
- # Kubernetes deployment
290
- /plugin install specweave-kubernetes@specweave
291
-
292
- # ML/AI workflows
293
- /plugin install specweave-ml@specweave
294
-
295
- # Architecture diagrams
296
- /plugin install specweave-diagrams@specweave
297
- ```
298
-
299
- **View All Available**:
300
- ```bash
301
- /plugin marketplace list specweave
302
- ```
303
-
304
- ## Best Practices
305
-
306
- 1. **Be Proactive**: Detect missing plugins early in the conversation
307
- 2. **Offer Alternatives**: If a plugin isn't installed, suggest manual approaches
308
- 3. **Don't Block**: Never refuse to help—offer to continue without the plugin
309
- 4. **Clear Instructions**: Always provide exact copy-pasteable commands
310
- 5. **Explain Benefits**: Help users understand why the plugin is valuable
311
-
312
- ## Integration with Other Skills
313
-
314
- This skill works alongside:
315
- - **project-kickstarter**: Suggests plugins during new project setup
316
- - **increment-planner**: Recommends plugins based on increment requirements
317
- - **specweave-detector**: Coordinates with workflow detection
318
-
319
- ## Notes
320
-
321
- - This skill is **non-blocking** - I always offer to continue without plugins
322
- - Plugins are **opt-in** - users choose what to install
323
- - Installation is **instant** - plugins activate immediately
324
- - All plugins follow **Claude Code's native plugin architecture**