specweave 0.3.12 → 0.4.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 (122) hide show
  1. package/CLAUDE.md +17 -1
  2. package/README.md +1 -1
  3. package/bin/install-all.sh +9 -2
  4. package/bin/install-hooks.sh +57 -0
  5. package/dist/cli/commands/init.d.ts.map +1 -1
  6. package/dist/cli/commands/init.js +55 -0
  7. package/dist/cli/commands/init.js.map +1 -1
  8. package/dist/core/agent-model-manager.d.ts +52 -0
  9. package/dist/core/agent-model-manager.d.ts.map +1 -0
  10. package/dist/core/agent-model-manager.js +120 -0
  11. package/dist/core/agent-model-manager.js.map +1 -0
  12. package/dist/core/cost-tracker.d.ts +108 -0
  13. package/dist/core/cost-tracker.d.ts.map +1 -0
  14. package/dist/core/cost-tracker.js +281 -0
  15. package/dist/core/cost-tracker.js.map +1 -0
  16. package/dist/core/model-selector.d.ts +57 -0
  17. package/dist/core/model-selector.d.ts.map +1 -0
  18. package/dist/core/model-selector.js +115 -0
  19. package/dist/core/model-selector.js.map +1 -0
  20. package/dist/core/phase-detector.d.ts +62 -0
  21. package/dist/core/phase-detector.d.ts.map +1 -0
  22. package/dist/core/phase-detector.js +229 -0
  23. package/dist/core/phase-detector.js.map +1 -0
  24. package/dist/types/cost-tracking.d.ts +43 -0
  25. package/dist/types/cost-tracking.d.ts.map +1 -0
  26. package/dist/types/cost-tracking.js +8 -0
  27. package/dist/types/cost-tracking.js.map +1 -0
  28. package/dist/types/model-selection.d.ts +53 -0
  29. package/dist/types/model-selection.d.ts.map +1 -0
  30. package/dist/types/model-selection.js +12 -0
  31. package/dist/types/model-selection.js.map +1 -0
  32. package/dist/utils/cost-reporter.d.ts +58 -0
  33. package/dist/utils/cost-reporter.d.ts.map +1 -0
  34. package/dist/utils/cost-reporter.js +224 -0
  35. package/dist/utils/cost-reporter.js.map +1 -0
  36. package/dist/utils/pricing-constants.d.ts +70 -0
  37. package/dist/utils/pricing-constants.d.ts.map +1 -0
  38. package/dist/utils/pricing-constants.js +71 -0
  39. package/dist/utils/pricing-constants.js.map +1 -0
  40. package/package.json +1 -1
  41. package/src/agents/architect/AGENT.md +3 -0
  42. package/src/agents/code-reviewer.md +156 -0
  43. package/src/agents/data-scientist/AGENT.md +181 -0
  44. package/src/agents/database-optimizer/AGENT.md +147 -0
  45. package/src/agents/devops/AGENT.md +3 -0
  46. package/src/agents/diagrams-architect/AGENT.md +3 -0
  47. package/src/agents/docs-writer/AGENT.md +3 -0
  48. package/src/agents/kubernetes-architect/AGENT.md +142 -0
  49. package/src/agents/ml-engineer/AGENT.md +150 -0
  50. package/src/agents/mlops-engineer/AGENT.md +201 -0
  51. package/src/agents/network-engineer/AGENT.md +149 -0
  52. package/src/agents/observability-engineer/AGENT.md +213 -0
  53. package/src/agents/payment-integration/AGENT.md +35 -0
  54. package/src/agents/performance/AGENT.md +3 -0
  55. package/src/agents/performance-engineer/AGENT.md +153 -0
  56. package/src/agents/pm/AGENT.md +3 -0
  57. package/src/agents/qa-lead/AGENT.md +3 -0
  58. package/src/agents/security/AGENT.md +3 -0
  59. package/src/agents/sre/AGENT.md +3 -0
  60. package/src/agents/tdd-orchestrator/AGENT.md +169 -0
  61. package/src/agents/tech-lead/AGENT.md +3 -0
  62. package/src/commands/specweave.costs.md +261 -0
  63. package/src/commands/specweave.ml-pipeline.md +292 -0
  64. package/src/commands/specweave.monitor-setup.md +501 -0
  65. package/src/commands/specweave.slo-implement.md +1055 -0
  66. package/src/commands/specweave.sync-github.md +1 -1
  67. package/src/commands/specweave.tdd-cycle.md +199 -0
  68. package/src/commands/specweave.tdd-green.md +842 -0
  69. package/src/commands/specweave.tdd-red.md +135 -0
  70. package/src/commands/specweave.tdd-refactor.md +165 -0
  71. package/src/skills/SKILLS-INDEX.md +18 -10
  72. package/src/skills/billing-automation/SKILL.md +559 -0
  73. package/src/skills/distributed-tracing/SKILL.md +438 -0
  74. package/src/skills/e2e-playwright/README.md +1 -1
  75. package/src/skills/e2e-playwright/package.json +1 -1
  76. package/src/skills/gitops-workflow/SKILL.md +285 -0
  77. package/src/skills/gitops-workflow/references/argocd-setup.md +134 -0
  78. package/src/skills/gitops-workflow/references/sync-policies.md +131 -0
  79. package/src/skills/grafana-dashboards/SKILL.md +369 -0
  80. package/src/skills/helm-chart-scaffolding/SKILL.md +544 -0
  81. package/src/skills/helm-chart-scaffolding/assets/Chart.yaml.template +42 -0
  82. package/src/skills/helm-chart-scaffolding/assets/values.yaml.template +185 -0
  83. package/src/skills/helm-chart-scaffolding/references/chart-structure.md +500 -0
  84. package/src/skills/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
  85. package/src/skills/increment-planner/SKILL.md +1 -1
  86. package/src/skills/k8s-manifest-generator/SKILL.md +511 -0
  87. package/src/skills/k8s-manifest-generator/assets/configmap-template.yaml +296 -0
  88. package/src/skills/k8s-manifest-generator/assets/deployment-template.yaml +203 -0
  89. package/src/skills/k8s-manifest-generator/assets/service-template.yaml +171 -0
  90. package/src/skills/k8s-manifest-generator/references/deployment-spec.md +753 -0
  91. package/src/skills/k8s-manifest-generator/references/service-spec.md +724 -0
  92. package/src/skills/k8s-security-policies/SKILL.md +334 -0
  93. package/src/skills/k8s-security-policies/assets/network-policy-template.yaml +177 -0
  94. package/src/skills/k8s-security-policies/references/rbac-patterns.md +187 -0
  95. package/src/skills/ml-pipeline-workflow/SKILL.md +245 -0
  96. package/src/skills/paypal-integration/SKILL.md +467 -0
  97. package/src/skills/pci-compliance/SKILL.md +466 -0
  98. package/src/skills/project-kickstarter/SKILL.md +299 -0
  99. package/src/skills/project-kickstarter/test-cases/test-1-high-confidence-full-product.yaml +52 -0
  100. package/src/skills/project-kickstarter/test-cases/test-2-medium-confidence-partial.yaml +34 -0
  101. package/src/skills/project-kickstarter/test-cases/test-3-low-confidence-technical-question.yaml +34 -0
  102. package/src/skills/project-kickstarter/test-cases/test-4-opt-out-explicit.yaml +41 -0
  103. package/src/skills/prometheus-configuration/SKILL.md +392 -0
  104. package/src/skills/skill-router/SKILL.md +1 -1
  105. package/src/skills/slo-implementation/SKILL.md +329 -0
  106. package/src/skills/spec-driven-brainstorming/SKILL.md +1 -1
  107. package/src/skills/specweave-detector/SKILL.md +9 -3
  108. package/src/skills/stripe-integration/SKILL.md +442 -0
  109. package/src/skills/tdd-workflow/SKILL.md +378 -0
  110. package/src/templates/CLAUDE.md.template +59 -0
  111. package/src/templates/README.md.template +1 -1
  112. package/src/skills/bmad-method-expert/SKILL.md +0 -626
  113. package/src/skills/bmad-method-expert/scripts/analyze-project.js +0 -318
  114. package/src/skills/bmad-method-expert/scripts/check-setup.js +0 -208
  115. package/src/skills/bmad-method-expert/scripts/generate-template.js +0 -1149
  116. package/src/skills/bmad-method-expert/scripts/validate-documents.js +0 -340
  117. package/src/skills/context-optimizer/SKILL.md +0 -588
  118. package/src/skills/figma-designer/SKILL.md +0 -149
  119. package/src/skills/figma-implementer/SKILL.md +0 -148
  120. package/src/skills/figma-mcp-connector/SKILL.md +0 -136
  121. package/src/skills/figma-to-code/SKILL.md +0 -128
  122. package/src/skills/spec-kit-expert/SKILL.md +0 -1010
@@ -0,0 +1,329 @@
1
+ ---
2
+ name: slo-implementation
3
+ description: Define and implement Service Level Indicators (SLIs) and Service Level Objectives (SLOs) with error budgets and alerting. Use when establishing reliability targets, implementing SRE practices, or measuring service performance.
4
+ ---
5
+
6
+ # SLO Implementation
7
+
8
+ Framework for defining and implementing Service Level Indicators (SLIs), Service Level Objectives (SLOs), and error budgets.
9
+
10
+ ## Purpose
11
+
12
+ Implement measurable reliability targets using SLIs, SLOs, and error budgets to balance reliability with innovation velocity.
13
+
14
+ ## When to Use
15
+
16
+ - Define service reliability targets
17
+ - Measure user-perceived reliability
18
+ - Implement error budgets
19
+ - Create SLO-based alerts
20
+ - Track reliability goals
21
+
22
+ ## SLI/SLO/SLA Hierarchy
23
+
24
+ ```
25
+ SLA (Service Level Agreement)
26
+ ↓ Contract with customers
27
+ SLO (Service Level Objective)
28
+ ↓ Internal reliability target
29
+ SLI (Service Level Indicator)
30
+ ↓ Actual measurement
31
+ ```
32
+
33
+ ## Defining SLIs
34
+
35
+ ### Common SLI Types
36
+
37
+ #### 1. Availability SLI
38
+ ```promql
39
+ # Successful requests / Total requests
40
+ sum(rate(http_requests_total{status!~"5.."}[28d]))
41
+ /
42
+ sum(rate(http_requests_total[28d]))
43
+ ```
44
+
45
+ #### 2. Latency SLI
46
+ ```promql
47
+ # Requests below latency threshold / Total requests
48
+ sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d]))
49
+ /
50
+ sum(rate(http_request_duration_seconds_count[28d]))
51
+ ```
52
+
53
+ #### 3. Durability SLI
54
+ ```
55
+ # Successful writes / Total writes
56
+ sum(storage_writes_successful_total)
57
+ /
58
+ sum(storage_writes_total)
59
+ ```
60
+
61
+ **Reference:** See `references/slo-definitions.md`
62
+
63
+ ## Setting SLO Targets
64
+
65
+ ### Availability SLO Examples
66
+
67
+ | SLO % | Downtime/Month | Downtime/Year |
68
+ |-------|----------------|---------------|
69
+ | 99% | 7.2 hours | 3.65 days |
70
+ | 99.9% | 43.2 minutes | 8.76 hours |
71
+ | 99.95%| 21.6 minutes | 4.38 hours |
72
+ | 99.99%| 4.32 minutes | 52.56 minutes |
73
+
74
+ ### Choose Appropriate SLOs
75
+
76
+ **Consider:**
77
+ - User expectations
78
+ - Business requirements
79
+ - Current performance
80
+ - Cost of reliability
81
+ - Competitor benchmarks
82
+
83
+ **Example SLOs:**
84
+ ```yaml
85
+ slos:
86
+ - name: api_availability
87
+ target: 99.9
88
+ window: 28d
89
+ sli: |
90
+ sum(rate(http_requests_total{status!~"5.."}[28d]))
91
+ /
92
+ sum(rate(http_requests_total[28d]))
93
+
94
+ - name: api_latency_p95
95
+ target: 99
96
+ window: 28d
97
+ sli: |
98
+ sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d]))
99
+ /
100
+ sum(rate(http_request_duration_seconds_count[28d]))
101
+ ```
102
+
103
+ ## Error Budget Calculation
104
+
105
+ ### Error Budget Formula
106
+
107
+ ```
108
+ Error Budget = 1 - SLO Target
109
+ ```
110
+
111
+ **Example:**
112
+ - SLO: 99.9% availability
113
+ - Error Budget: 0.1% = 43.2 minutes/month
114
+ - Current Error: 0.05% = 21.6 minutes/month
115
+ - Remaining Budget: 50%
116
+
117
+ ### Error Budget Policy
118
+
119
+ ```yaml
120
+ error_budget_policy:
121
+ - remaining_budget: 100%
122
+ action: Normal development velocity
123
+ - remaining_budget: 50%
124
+ action: Consider postponing risky changes
125
+ - remaining_budget: 10%
126
+ action: Freeze non-critical changes
127
+ - remaining_budget: 0%
128
+ action: Feature freeze, focus on reliability
129
+ ```
130
+
131
+ **Reference:** See `references/error-budget.md`
132
+
133
+ ## SLO Implementation
134
+
135
+ ### Prometheus Recording Rules
136
+
137
+ ```yaml
138
+ # SLI Recording Rules
139
+ groups:
140
+ - name: sli_rules
141
+ interval: 30s
142
+ rules:
143
+ # Availability SLI
144
+ - record: sli:http_availability:ratio
145
+ expr: |
146
+ sum(rate(http_requests_total{status!~"5.."}[28d]))
147
+ /
148
+ sum(rate(http_requests_total[28d]))
149
+
150
+ # Latency SLI (requests < 500ms)
151
+ - record: sli:http_latency:ratio
152
+ expr: |
153
+ sum(rate(http_request_duration_seconds_bucket{le="0.5"}[28d]))
154
+ /
155
+ sum(rate(http_request_duration_seconds_count[28d]))
156
+
157
+ - name: slo_rules
158
+ interval: 5m
159
+ rules:
160
+ # SLO compliance (1 = meeting SLO, 0 = violating)
161
+ - record: slo:http_availability:compliance
162
+ expr: sli:http_availability:ratio >= bool 0.999
163
+
164
+ - record: slo:http_latency:compliance
165
+ expr: sli:http_latency:ratio >= bool 0.99
166
+
167
+ # Error budget remaining (percentage)
168
+ - record: slo:http_availability:error_budget_remaining
169
+ expr: |
170
+ (sli:http_availability:ratio - 0.999) / (1 - 0.999) * 100
171
+
172
+ # Error budget burn rate
173
+ - record: slo:http_availability:burn_rate_5m
174
+ expr: |
175
+ (1 - (
176
+ sum(rate(http_requests_total{status!~"5.."}[5m]))
177
+ /
178
+ sum(rate(http_requests_total[5m]))
179
+ )) / (1 - 0.999)
180
+ ```
181
+
182
+ ### SLO Alerting Rules
183
+
184
+ ```yaml
185
+ groups:
186
+ - name: slo_alerts
187
+ interval: 1m
188
+ rules:
189
+ # Fast burn: 14.4x rate, 1 hour window
190
+ # Consumes 2% error budget in 1 hour
191
+ - alert: SLOErrorBudgetBurnFast
192
+ expr: |
193
+ slo:http_availability:burn_rate_1h > 14.4
194
+ and
195
+ slo:http_availability:burn_rate_5m > 14.4
196
+ for: 2m
197
+ labels:
198
+ severity: critical
199
+ annotations:
200
+ summary: "Fast error budget burn detected"
201
+ description: "Error budget burning at {{ $value }}x rate"
202
+
203
+ # Slow burn: 6x rate, 6 hour window
204
+ # Consumes 5% error budget in 6 hours
205
+ - alert: SLOErrorBudgetBurnSlow
206
+ expr: |
207
+ slo:http_availability:burn_rate_6h > 6
208
+ and
209
+ slo:http_availability:burn_rate_30m > 6
210
+ for: 15m
211
+ labels:
212
+ severity: warning
213
+ annotations:
214
+ summary: "Slow error budget burn detected"
215
+ description: "Error budget burning at {{ $value }}x rate"
216
+
217
+ # Error budget exhausted
218
+ - alert: SLOErrorBudgetExhausted
219
+ expr: slo:http_availability:error_budget_remaining < 0
220
+ for: 5m
221
+ labels:
222
+ severity: critical
223
+ annotations:
224
+ summary: "SLO error budget exhausted"
225
+ description: "Error budget remaining: {{ $value }}%"
226
+ ```
227
+
228
+ ## SLO Dashboard
229
+
230
+ **Grafana Dashboard Structure:**
231
+
232
+ ```
233
+ ┌────────────────────────────────────┐
234
+ │ SLO Compliance (Current) │
235
+ │ ✓ 99.95% (Target: 99.9%) │
236
+ ├────────────────────────────────────┤
237
+ │ Error Budget Remaining: 65% │
238
+ │ ████████░░ 65% │
239
+ ├────────────────────────────────────┤
240
+ │ SLI Trend (28 days) │
241
+ │ [Time series graph] │
242
+ ├────────────────────────────────────┤
243
+ │ Burn Rate Analysis │
244
+ │ [Burn rate by time window] │
245
+ └────────────────────────────────────┘
246
+ ```
247
+
248
+ **Example Queries:**
249
+
250
+ ```promql
251
+ # Current SLO compliance
252
+ sli:http_availability:ratio * 100
253
+
254
+ # Error budget remaining
255
+ slo:http_availability:error_budget_remaining
256
+
257
+ # Days until error budget exhausted (at current burn rate)
258
+ (slo:http_availability:error_budget_remaining / 100)
259
+ *
260
+ 28
261
+ /
262
+ (1 - sli:http_availability:ratio) * (1 - 0.999)
263
+ ```
264
+
265
+ ## Multi-Window Burn Rate Alerts
266
+
267
+ ```yaml
268
+ # Combination of short and long windows reduces false positives
269
+ rules:
270
+ - alert: SLOBurnRateHigh
271
+ expr: |
272
+ (
273
+ slo:http_availability:burn_rate_1h > 14.4
274
+ and
275
+ slo:http_availability:burn_rate_5m > 14.4
276
+ )
277
+ or
278
+ (
279
+ slo:http_availability:burn_rate_6h > 6
280
+ and
281
+ slo:http_availability:burn_rate_30m > 6
282
+ )
283
+ labels:
284
+ severity: critical
285
+ ```
286
+
287
+ ## SLO Review Process
288
+
289
+ ### Weekly Review
290
+ - Current SLO compliance
291
+ - Error budget status
292
+ - Trend analysis
293
+ - Incident impact
294
+
295
+ ### Monthly Review
296
+ - SLO achievement
297
+ - Error budget usage
298
+ - Incident postmortems
299
+ - SLO adjustments
300
+
301
+ ### Quarterly Review
302
+ - SLO relevance
303
+ - Target adjustments
304
+ - Process improvements
305
+ - Tooling enhancements
306
+
307
+ ## Best Practices
308
+
309
+ 1. **Start with user-facing services**
310
+ 2. **Use multiple SLIs** (availability, latency, etc.)
311
+ 3. **Set achievable SLOs** (don't aim for 100%)
312
+ 4. **Implement multi-window alerts** to reduce noise
313
+ 5. **Track error budget** consistently
314
+ 6. **Review SLOs regularly**
315
+ 7. **Document SLO decisions**
316
+ 8. **Align with business goals**
317
+ 9. **Automate SLO reporting**
318
+ 10. **Use SLOs for prioritization**
319
+
320
+ ## Reference Files
321
+
322
+ - `assets/slo-template.md` - SLO definition template
323
+ - `references/slo-definitions.md` - SLO definition patterns
324
+ - `references/error-budget.md` - Error budget calculations
325
+
326
+ ## Related Skills
327
+
328
+ - `prometheus-configuration` - For metric collection
329
+ - `grafana-dashboards` - For SLO visualization
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: spec-driven-brainstorming
3
- description: Refines rough ideas into spec-ready designs through structured Socratic questioning, alternative exploration, and incremental validation. Use BEFORE creating increments - transforms vague concepts into clear requirements. Activates for: brainstorm, explore idea, refine concept, design thinking, what should I build, help me think through, ultrathink design, deep thinking, architecture exploration.
3
+ description: Refines rough ideas into spec-ready designs through structured Socratic questioning, alternative exploration, and incremental validation. Use BEFORE creating increments - transforms vague concepts into clear requirements. Activates for: brainstorm, explore idea, refine concept, design thinking, what should I build, help me think through, ultrathink, ultrathink on, think through this, deep thinking, architecture exploration, analyze this idea, evaluate approach, explore options.
4
4
  ---
5
5
 
6
6
  # Spec-Driven Brainstorming
@@ -1,11 +1,17 @@
1
1
  ---
2
2
  name: specweave-detector
3
- description: Documentation skill that explains SpecWeave v0.1.9 smart workflow slash commands. SpecWeave uses EXPLICIT slash commands only - no auto-activation! Use /inc (Plan Increment) or /increment to start. Smart features auto-resume (/do), auto-close (/inc), progress tracking (/progress). Commands /inc, /do, /progress, /validate, /done, /list-increments, /sync-docs, /sync-github. All commands listed in .claude/commands/. Keywords slash commands, /inc, /increment, /do, /progress, /validate, /done, specweave commands, smart workflow, v0.1.9.
3
+ description: Detects SpecWeave context (.specweave/ directory exists) and provides workflow documentation. v0.3.8+ features PROACTIVE auto-detection - when in SpecWeave folder, product descriptions automatically trigger increment planning. Explicit slash commands still work (/inc, /do, /progress, /validate, /done, /sync-docs, /sync-github). Keywords slash commands, /inc, /increment, /do, /progress, /validate, /done, specweave commands, smart workflow, auto-detection, specweave folder.
4
4
  ---
5
5
 
6
- # SpecWeave v0.1.9 - Smart Workflow Slash Commands
6
+ # SpecWeave v0.3.8+ - Smart Workflow with Auto-Detection
7
7
 
8
- **CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS ONLY** - no auto-activation, no proactive detection!
8
+ **NEW in v0.3.8**: SpecWeave now features **PROACTIVE AUTO-DETECTION**!
9
+
10
+ When working in a SpecWeave-initialized project (.specweave/ directory exists), product descriptions automatically trigger increment planning.
11
+
12
+ **Two ways to use SpecWeave**:
13
+ 1. ✅ **Auto-detection** (NEW): Describe your product → SpecWeave creates increment automatically
14
+ 2. ✅ **Explicit commands**: Type `/inc "feature"` → Works as before
9
15
 
10
16
  ## How SpecWeave Works (v0.1.9)
11
17