specweave 1.0.171 → 1.0.172

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.
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- SW:META template="claude" version="1.0.171" sections="hook-priority,header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
1
+ <!-- SW:META template="claude" version="1.0.171" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
2
2
 
3
3
  <!-- SW:SECTION:hook-priority version="1.0.171" -->
4
4
  ## ⛔ ABSOLUTE PRIORITY: Hook Instructions Are Mandatory
@@ -25,19 +25,20 @@ If hook says **"PLUGINS INSTALLED - RESTART REQUIRED"**:
25
25
 
26
26
  **DO NOT:** "Just help anyway", "Start while they restart", "Do a quick thing first"
27
27
 
28
- ### 🎯 SKILL INVOCATION REQUIRED = Call Skill First
28
+ ### 🎯 SKILL FIRST = Call Skill Before Implementation
29
29
 
30
- If hook says **"invoke Skill tool NOW"** or **"BLOCKING RULE: Your FIRST action MUST be..."**:
30
+ If hook says **"SKILL FIRST"** or shows a Skill tool call to make:
31
31
 
32
- **YOU ARE BLOCKED FROM:**
33
- - Write tool - BLOCKED until skill completes
34
- - Edit tool - BLOCKED until skill completes
35
- - ❌ Bash implementation commands - BLOCKED until skill completes
36
- - Analyzing the request first - BLOCKED
37
- - ❌ "Let me explore the codebase" - BLOCKED
32
+ **ORDER MATTERS:**
33
+ 1. Call the Skill tool FIRST (exactly as shown in hook)
34
+ 2. THEN proceed with implementation normally
35
+
36
+ **DO NOT start with:**
37
+ - ❌ "Let me first explore the codebase..."
38
+ - ❌ Writing files before calling Skill
39
+ - ❌ Extensive analysis before calling Skill
38
40
 
39
- **YOUR ONLY ALLOWED ACTION:**
40
- Call the Skill tool EXACTLY as specified in the hook. Nothing else first.
41
+ **The skill handles planning. Call it first, then you're free to implement.**
41
42
 
42
43
  ### Why This Matters
43
44
 
@@ -49,22 +50,7 @@ Hooks exist to enforce workflow discipline. If you ignore them:
49
50
  **This is non-negotiable. No exceptions. No "just this once".**
50
51
  <!-- SW:END:hook-priority -->
51
52
 
52
- <!-- SW:SECTION:preflight version="1.0.171" -->
53
- ## Pre-Flight Checklist (Before ANY Implementation)
54
-
55
- **STOP before using Write/Edit/Bash. Verify:**
56
-
57
- | Check | Action If True |
58
- |-------|----------------|
59
- | Hook says "restart required"? | ⛔ FULL STOP - display warning, provide prompt, wait |
60
- | Hook says "invoke Skill"? | 🎯 Call Skill tool FIRST - nothing else before |
61
- | Feature request (multi-file)? | 📋 Use `/sw:increment` before coding |
62
- | TDD mode in hook output? | 🧪 Write failing test FIRST |
63
-
64
- **Implementation is BLOCKED until relevant checks pass.**
65
- <!-- SW:END:preflight -->
66
-
67
- <!-- SW:SECTION:header version="1.0.170" -->
53
+ <!-- SW:SECTION:header version="1.0.171" -->
68
54
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
69
55
  <!-- SW:END:header -->
70
56
 
@@ -122,7 +108,7 @@ plugins/specweave/
122
108
  **Old "commands" are just skills with `disable-model-invocation: true`** - they only respond to explicit `/name` invocation, not keyword detection.
123
109
  <!-- SW:END:claude-code-concepts -->
124
110
 
125
- <!-- SW:SECTION:start version="1.0.170" -->
111
+ <!-- SW:SECTION:start version="1.0.171" -->
126
112
  ## Getting Started
127
113
 
128
114
  **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
@@ -132,7 +118,7 @@ plugins/specweave/
132
118
  2. **Customize**: Edit spec.md and use for setup tasks
133
119
  <!-- SW:END:start -->
134
120
 
135
- <!-- SW:SECTION:autodetect version="1.0.170" -->
121
+ <!-- SW:SECTION:autodetect version="1.0.171" -->
136
122
  ## Auto-Detection
137
123
 
138
124
  SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
@@ -142,7 +128,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
142
128
  **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
143
129
  <!-- SW:END:autodetect -->
144
130
 
145
- <!-- SW:SECTION:metarule version="1.0.170" -->
131
+ <!-- SW:SECTION:metarule version="1.0.171" -->
146
132
  ## Meta-Rule: Think-Before-Act
147
133
 
148
134
  **Satisfy dependencies BEFORE dependent operations.**
@@ -153,7 +139,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
153
139
  ```
154
140
  <!-- SW:END:metarule -->
155
141
 
156
- <!-- SW:SECTION:rules version="1.0.170" -->
142
+ <!-- SW:SECTION:rules version="1.0.171" -->
157
143
  ## Rules
158
144
 
159
145
  1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
@@ -164,7 +150,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
164
150
  6. **⛔ Marketplace refresh**: Use `specweave refresh-marketplace` CLI (not `scripts/refresh-marketplace.sh`)
165
151
  <!-- SW:END:rules -->
166
152
 
167
- <!-- SW:SECTION:workflow version="1.0.170" -->
153
+ <!-- SW:SECTION:workflow version="1.0.171" -->
168
154
  ## Workflow
169
155
 
170
156
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
@@ -184,7 +170,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
184
170
  **Natural language**: "Let's build X" → `/sw:increment` | "What's status?" → `/sw:progress` | "We're done" → `/sw:done` | "Ship while sleeping" → `/sw:auto`
185
171
  <!-- SW:END:workflow -->
186
172
 
187
- <!-- SW:SECTION:reflect version="1.0.170" -->
173
+ <!-- SW:SECTION:reflect version="1.0.171" -->
188
174
  ## Skill Memories
189
175
 
190
176
  SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
@@ -197,7 +183,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
197
183
  <!-- Auto-captured by SpecWeave reflect. Edit or delete as needed. -->
198
184
  <!-- Learnings are organized by skill name. User edits override SpecWeave defaults. -->
199
185
 
200
- <!-- SW:SECTION:context version="1.0.170" -->
186
+ <!-- SW:SECTION:context version="1.0.171" -->
201
187
  ## Context
202
188
 
203
189
  **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
@@ -205,7 +191,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
205
191
  **Load context**: `/sw:context <topic>` loads relevant living docs into conversation
206
192
  <!-- SW:END:context -->
207
193
 
208
- <!-- SW:SECTION:structure version="1.0.170" -->
194
+ <!-- SW:SECTION:structure version="1.0.171" -->
209
195
  ## Structure
210
196
 
211
197
  ```
@@ -220,7 +206,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
220
206
  **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
221
207
  <!-- SW:END:structure -->
222
208
 
223
- <!-- SW:SECTION:taskformat version="1.0.170" -->
209
+ <!-- SW:SECTION:taskformat version="1.0.171" -->
224
210
  ## Task Format
225
211
 
226
212
  ```markdown
@@ -230,7 +216,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
230
216
  ```
231
217
  <!-- SW:END:taskformat -->
232
218
 
233
- <!-- SW:SECTION:secrets version="1.0.170" -->
219
+ <!-- SW:SECTION:secrets version="1.0.171" -->
234
220
  ## Secrets Check
235
221
 
236
222
  **BEFORE CLI tools**: Check existing config first!
@@ -244,7 +230,7 @@ gh auth status
244
230
  **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
245
231
  <!-- SW:END:secrets -->
246
232
 
247
- <!-- SW:SECTION:syncing version="1.0.170" -->
233
+ <!-- SW:SECTION:syncing version="1.0.171" -->
248
234
  ## External Sync (GitHub/JIRA/ADO)
249
235
 
250
236
  **Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
@@ -254,7 +240,7 @@ gh auth status
254
240
  **Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
255
241
  <!-- SW:END:syncing -->
256
242
 
257
- <!-- SW:SECTION:testing version="1.0.170" -->
243
+ <!-- SW:SECTION:testing version="1.0.171" -->
258
244
  ## Testing
259
245
 
260
246
  BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
@@ -266,7 +252,7 @@ vi.mock('./module', () => ({ func: mockFn }));
266
252
  ```
267
253
  <!-- SW:END:testing -->
268
254
 
269
- <!-- SW:SECTION:tdd version="1.0.170" -->
255
+ <!-- SW:SECTION:tdd version="1.0.171" -->
270
256
  ## TDD Mode (Test-Driven Development)
271
257
 
272
258
  **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
@@ -327,7 +313,7 @@ When TDD is enabled, tasks include phase markers:
327
313
  **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
328
314
  <!-- SW:END:tdd -->
329
315
 
330
- <!-- SW:SECTION:api version="1.0.170" -->
316
+ <!-- SW:SECTION:api version="1.0.171" -->
331
317
  ## API Development (OpenAPI-First)
332
318
 
333
319
  **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
@@ -335,13 +321,13 @@ When TDD is enabled, tasks include phase markers:
335
321
  Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
336
322
  <!-- SW:END:api -->
337
323
 
338
- <!-- SW:SECTION:limits version="1.0.170" -->
324
+ <!-- SW:SECTION:limits version="1.0.171" -->
339
325
  ## Limits
340
326
 
341
327
  **Max 1500 lines/file** — extract before adding
342
328
  <!-- SW:END:limits -->
343
329
 
344
- <!-- SW:SECTION:troubleshooting version="1.0.170" -->
330
+ <!-- SW:SECTION:troubleshooting version="1.0.171" -->
345
331
  ## Troubleshooting
346
332
 
347
333
  | Issue | Fix |
@@ -357,7 +343,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
357
343
  | Marketplace shows 0 | Normal with auto-load; `/plugin list` shows actual |
358
344
  <!-- SW:END:troubleshooting -->
359
345
 
360
- <!-- SW:SECTION:lazyloading version="1.0.170" -->
346
+ <!-- SW:SECTION:lazyloading version="1.0.171" -->
361
347
  ## Plugin Auto-Loading
362
348
 
363
349
  Plugins load automatically based on project type and keywords. Manual install if needed:
@@ -371,7 +357,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
371
357
  **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
372
358
  <!-- SW:END:lazyloading -->
373
359
 
374
- <!-- SW:SECTION:principles version="1.0.170" -->
360
+ <!-- SW:SECTION:principles version="1.0.171" -->
375
361
  ## Principles
376
362
 
377
363
  1. **Spec-first**: `/sw:increment` before coding
@@ -380,7 +366,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
380
366
  4. **Traceable**: All work → specs → ACs
381
367
  <!-- SW:END:principles -->
382
368
 
383
- <!-- SW:SECTION:linking version="1.0.170" -->
369
+ <!-- SW:SECTION:linking version="1.0.171" -->
384
370
  ## Bidirectional Linking
385
371
 
386
372
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
@@ -388,7 +374,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
388
374
  Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
389
375
  <!-- SW:END:linking -->
390
376
 
391
- <!-- SW:SECTION:mcp version="1.0.170" -->
377
+ <!-- SW:SECTION:mcp version="1.0.171" -->
392
378
  ## External Services
393
379
 
394
380
  **Priority**: CLI tools first (simpler) → MCP for complex integrations
@@ -410,7 +396,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
410
396
  MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
411
397
  <!-- SW:END:mcp -->
412
398
 
413
- <!-- SW:SECTION:auto version="1.0.170" -->
399
+ <!-- SW:SECTION:auto version="1.0.171" -->
414
400
  ## Auto Mode
415
401
 
416
402
  **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
@@ -427,7 +413,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
427
413
  **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
428
414
  <!-- SW:END:auto -->
429
415
 
430
- <!-- SW:SECTION:docs version="1.0.170" -->
416
+ <!-- SW:SECTION:docs version="1.0.171" -->
431
417
  ## Docs
432
418
 
433
419
  [spec-weave.com](https://spec-weave.com)
@@ -619,129 +605,94 @@ output_approve_with_context() {
619
605
 
620
606
  ---
621
607
 
622
- ## Skills vs Agents (Automatic vs Explicit)
608
+ ## Skills vs Agents (Official Claude Code Behavior)
609
+
610
+ **Per [official Anthropic documentation](https://code.claude.com/docs/en/skills):**
623
611
 
624
- **SpecWeave provides expertise through Skills (auto-activate) and Agents (explicit spawn).**
612
+ > "Claude uses skills when relevant, or you can invoke one directly with `/skill-name`."
625
613
 
626
- ### Skills (Auto-Activate) - YOU DON'T CALL THESE
614
+ ### How Skills Work (Two Mechanisms)
627
615
 
628
- Skills activate **automatically** when Claude detects keywords in your prompt. **You never invoke skills directly** - they're loaded transparently when relevant.
616
+ **1. Auto-Activation (Primary)**: Skills auto-activate when their description keywords match user's request.
617
+ **2. Explicit Invocation (Fallback)**: Use Skill tool when auto-activation doesn't trigger.
629
618
 
630
- **How it works:**
631
619
  ```
632
- You: "Design the authentication system architecture"
620
+ User: "Create a React dashboard with Stripe checkout"
633
621
 
634
- Claude detects: "architecture" keyword
622
+ Auto-activation checks skill descriptions for:
623
+ - "React", "dashboard" → sw-frontend:frontend-architect
624
+ - "Stripe", "checkout" → sw-payments:stripe-integration
635
625
 
636
- Loads: plugins/specweave/skills/architect/SKILL.md
637
-
638
- Response includes architecture expertise automatically
626
+ If skills load automatically → great!
627
+ If NOT → invoke via Skill tool as fallback
639
628
  ```
640
629
 
641
- **Activation rate**: ~20-50% with basic descriptions. Use specific keywords for better activation.
642
-
643
- | Domain | Keywords That Activate | Example Prompts |
644
- |--------|----------------------|-----------------|
645
- | **Architecture** | architecture, system design, ADR, microservices, API design | "Design the auth system architecture" |
646
- | **Tech Lead** | code review, best practices, refactoring, clean code | "Review my code for best practices" |
647
- | **QA Lead** | test strategy, QA, quality gates, E2E testing | "Create a test strategy for this feature" |
648
- | **Security** | security, OWASP, vulnerabilities, auth security | "Review security of this implementation" |
649
- | **Docs** | documentation, README, API docs, technical writing | "Write documentation for this API" |
650
- | **Infrastructure** | Terraform, serverless, Lambda, cloud setup, IaC | "Generate Terraform for this deployment" |
651
- | **Performance** | optimization, profiling, caching, performance | "Optimize this database query" |
652
- | **TDD** | TDD, test-driven, red-green-refactor, test-first | "Let's use TDD for this feature" |
653
- | **PM** | product, requirements, user story, MVP, roadmap | "Help me plan this product feature" |
630
+ ### When to Use Skill Tool Explicitly
654
631
 
655
- **Pro tip**: If skills aren't activating, add explicit keywords: "Help me **design the architecture** for..." instead of just "Help me with the backend".
632
+ **Use Skill tool when:**
633
+ - Auto-activation didn't trigger (skill didn't load)
634
+ - You need a specific skill immediately
635
+ - Hook instructions say "SKILL FIRST"
636
+ - Complex multi-domain requests (invoke multiple skills)
656
637
 
657
- ### Agents (Task Tool Spawn)
638
+ **Don't force Skill tool when:**
639
+ - Skill already auto-activated (descriptions matched)
640
+ - Simple requests that don't need specialized expertise
658
641
 
659
- For complex, isolated tasks requiring specialized plugins, spawn via Task tool:
642
+ ### Plugin Skills Reference
660
643
 
661
- | Domain | Agent (`subagent_type`) | Triggers |
662
- |--------|-------------------------|----------|
663
- | **Frontend** | `sw-frontend:frontend-architect` | React, Vue, Next.js, components, UI |
664
- | **Backend** | `sw-backend:database-optimizer` | API, database, microservices, SQL |
665
- | **Kubernetes** | `sw-k8s:kubernetes-architect` | K8s, EKS, AKS, GKE, pods, helm, GitOps |
666
- | **DevOps** | `sw-infra:devops` | Terraform, Docker, CI/CD, AWS, Azure, GCP |
667
- | **Kafka** | `sw-kafka:kafka-architect` | Kafka, topics, event streaming, MSK |
668
- | **Confluent** | `sw-confluent:confluent-architect` | Confluent Cloud, Schema Registry, ksqlDB |
644
+ | Domain | Skill Name | Auto-Activates On |
645
+ |--------|------------|-------------------|
646
+ | **Frontend** | `sw-frontend:frontend-architect` | React, Vue, Next.js, dashboard, UI |
647
+ | **Backend .NET** | `sw-backend:dotnet-backend` | .NET, C#, ASP.NET, EF Core, Web API |
648
+ | **Database** | `sw-backend:database-optimizer` | SQL, database, query optimization |
649
+ | **Payments** | `sw-payments:stripe-integration` | Stripe, checkout, payment, subscription |
650
+ | **Kubernetes** | `sw-k8s:kubernetes-architect` | K8s, EKS, AKS, GKE, pods, helm |
651
+ | **DevOps** | `sw-infra:devops` | Terraform, Docker, CI/CD, AWS, Azure |
669
652
  | **Mobile** | `sw-mobile:mobile-architect` | React Native, iOS, Android |
670
- | **ML/AI** | `sw-ml:ml-engineer` | ML, model, training, MLOps |
671
- | **Data Science** | `sw-ml:data-scientist` | data analysis, notebooks, pandas |
672
- | **Testing/QA** | `sw-testing:qa-engineer` | E2E, Playwright, Vitest, Jest, QA |
673
- | **Observability** | `sw-infra:observability-engineer` | monitoring, Prometheus, Grafana, SLOs |
674
- | **SRE** | `sw-infra:sre` | incidents, outages, production debugging |
675
- | **Network** | `sw-infra:network-engineer` | networking, VPC, DNS, load balancing |
676
- | **Diagrams** | `sw-diagrams:diagrams-architect` | Mermaid, C4, architecture diagrams |
677
- | **Payments** | `sw-payments:payment-integration` | Stripe, PayPal, checkout, PCI |
678
- | **Release** | `sw-release:release-manager` | release, version, changelog, npm publish |
679
- | **GitHub** | `sw-github:github-manager` | GitHub issues, PRs, sync |
680
- | **JIRA** | `sw-jira:jira-manager` | JIRA, epics, stories, sync |
681
- | **ADO** | `sw-ado:ado-manager` | Azure DevOps, work items |
653
+ | **Testing** | `sw-testing:qa-engineer` | E2E, Playwright, Vitest, Jest |
654
+ | **ML/AI** | `sw-ml:ml-engineer` | ML, model, training, PyTorch |
655
+ | **Architecture** | `sw:architect` | architecture, system design, ADR |
656
+ | **Security** | `sw:security` | security, OWASP, vulnerabilities |
657
+ | **TDD** | `sw:tdd-orchestrator` | TDD, test-driven, red-green-refactor |
682
658
 
683
659
  ### Usage Pattern
684
660
 
685
661
  ```typescript
686
- // Skills auto-activate - just describe what you need (NO explicit call):
687
- "Design the authentication system architecture" // → architect skill loads automatically
688
- "Review my code for security issues" // → security skill loads automatically
689
- "Let's use TDD for this feature" // → tdd-orchestrator skill loads automatically
690
-
691
- // Agents spawn for isolated complex tasks (explicit Task call):
692
- Task({
693
- subagent_type: "sw-k8s:kubernetes-architect:kubernetes-architect",
694
- prompt: "Create K8s manifests for a 3-tier web app with Ingress",
695
- description: "K8s manifests design"
696
- })
697
- ```
698
-
699
- ### ⚠️ Specialized Skills (v1.0.159)
700
-
701
- **Domain skills auto-activate on keywords OR can be explicitly invoked via Skill tool:**
702
-
703
- | Domain | Keywords That Activate | Explicit Invocation |
704
- |--------|------------------------|---------------------|
705
- | React, Vue, Next.js, frontend | "React", "frontend", "dashboard UI" | `/sw-frontend:frontend-architect` |
706
- | Stripe, payments, checkout | "Stripe", "payments", "checkout" | `/sw-payments:payment-integration` |
707
- | Kubernetes, Helm, K8s | "Kubernetes", "K8s", "Helm" | `/sw-k8s:kubernetes-architect` |
708
- | Terraform, AWS, Docker | "Terraform", "AWS", "infrastructure" | `/sw-infra:devops` |
709
- | Database optimization | "database", "SQL optimization" | `/sw-backend:database-optimizer` |
710
- | Playwright, E2E tests | "E2E", "Playwright", "QA" | `/sw-testing:qa-engineer` |
711
- | React Native, mobile | "React Native", "mobile app" | `/sw-mobile:mobile-architect` |
712
- | ML, PyTorch, TensorFlow | "ML", "machine learning" | `/sw-ml:ml-engineer` |
713
-
714
- **How Skills Work:**
715
- - Skills with `context: fork` run in isolated context (like subagents)
716
- - Auto-activate when Claude detects keywords in your prompt
717
- - OR explicitly invoke via Skill tool: `Skill({ skill: "sw-frontend:frontend-architect" })`
718
-
719
- **Example - Skills auto-activate:**
720
- ```
721
- User: "Build React dashboard with Stripe checkout"
722
-
723
- Claude detects: "React", "dashboard" → loads sw-frontend:frontend-architect
724
- Claude detects: "Stripe", "checkout" → loads sw-payments:payment-integration
725
-
726
- Skills provide specialized expertise automatically
727
- ```
728
-
729
- **Explicit invocation (when auto-activation doesn't trigger):**
730
- ```typescript
731
- Skill({ skill: "sw-frontend:frontend-architect", args: "Build dashboard with sidebar" })
732
- Skill({ skill: "sw-payments:payment-integration", args: "Stripe checkout flow" })
662
+ // Scenario 1: Auto-activation works (most cases)
663
+ // User says: "Design the auth architecture"
664
+ // → sw:architect auto-loads via keyword "architecture"
665
+ // → Just respond with architectural guidance
666
+
667
+ // Scenario 2: Auto-activation didn't trigger
668
+ // User says: "Build .NET API" but skill didn't load
669
+ // → Explicitly invoke:
670
+ Skill({ skill: "sw-backend:dotnet-backend", args: "Build API..." })
671
+
672
+ // Scenario 3: Multi-domain request (invoke both)
673
+ // User says: "React dashboard with Stripe"
674
+ Skill({ skill: "sw-frontend:frontend-architect", args: "dashboard" })
675
+ Skill({ skill: "sw-payments:stripe-integration", args: "Stripe" })
733
676
  ```
734
677
 
678
+ ### Troubleshooting Auto-Activation
679
+
680
+ If skills don't auto-activate:
681
+ 1. Check skill description includes keywords user would naturally say
682
+ 2. Verify skill appears in `/plugin list`
683
+ 3. Try rephrasing request to match description
684
+ 4. **Fallback**: Invoke directly with `Skill({ skill: "name" })`
685
+
735
686
  ### When to Use What
736
687
 
737
- | Scenario | Approach | How |
738
- |----------|----------|-----|
739
- | Architecture decisions | Skills (auto) | Keywords trigger automatically |
740
- | Code review, security | Skills (auto) | Keywords trigger automatically |
741
- | Implementation work | Skills (auto/explicit) | Auto-activates OR use Skill tool |
742
- | External syncs | Commands | Use `/sw-github:sync` etc. |
743
- | General exploration | Task tool | `subagent_type: "Explore"` |
744
- | Complex planning | Task tool | `subagent_type: "Plan"` |
688
+ | Scenario | Approach |
689
+ |----------|----------|
690
+ | Domain work (React, .NET, Stripe) | Let auto-activate, Skill tool if not |
691
+ | Architecture, security review | Usually auto-activates on keywords |
692
+ | Hook says "SKILL FIRST" | **Always** use Skill tool explicitly |
693
+ | External syncs | Commands: `/sw-github:sync` |
694
+ | Codebase exploration | Task tool: `subagent_type: "Explore"` |
695
+ | Complex planning | Task tool: `subagent_type: "Plan"` |
745
696
 
746
697
  **Reference**: See `plugins/PLUGINS-INDEX.md` for full plugin catalog with triggers.
747
698
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "1.0.171",
3
+ "version": "1.0.172",
4
4
  "description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Purpose**: Lightweight plugin manifest for progressive disclosure. Load plugin content only when triggers match.
4
4
 
5
- **Total Plugins**: 23 | **Last Updated**: 2026-01-19
5
+ **Total Plugins**: 23 | **Last Updated**: 2026-01-26
6
6
 
7
7
  ---
8
8
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  | Plugin | Triggers | Description |
21
21
  |--------|----------|-------------|
22
- | **specweave** | increment, feature, plan, spec, tasks, TDD, PM, architect | Core framework. Planning, specs, TDD, living docs. |
22
+ | **specweave** | increment, feature, plan, spec, tasks, TDD, PM, architect, image, generate image, illustration, icon, logo, banner, mockup | Core framework. Planning, specs, TDD, living docs, image generation. |
23
23
 
24
24
  ## Integration Plugins
25
25
 
@@ -100,7 +100,7 @@
100
100
 
101
101
  | Plugin | Merged Into | Notes |
102
102
  |--------|-------------|-------|
103
- | ~~specweave-ui~~ | specweave-testing | Browser automation, UI inspection, visual regression now in testing |
103
+ | ~~specweave-ui~~ | specweave-testing, specweave | Browser automation, UI inspection, visual regression now in testing. Image generation moved to core specweave. |
104
104
  | ~~specweave-release~~ | specweave (core) | `/sw:npm` now in core |
105
105
  | ~~specweave-diagrams~~ | specweave (core) | Mermaid, C4 diagrams now in core |
106
106
  | ~~specweave-docs~~ | specweave (core) | Documentation skills now in core |
@@ -121,6 +121,8 @@
121
121
  | "ML pipeline" | `specweave-ml` |
122
122
  | "Write E2E tests" | `specweave-testing` |
123
123
  | "Create release" | `specweave-release` |
124
+ | "Generate an image" | `specweave` |
125
+ | "Create hero image" | `specweave` |
124
126
 
125
127
  ---
126
128
 
@@ -101,13 +101,20 @@ All run in isolated context without polluting the main conversation.
101
101
 
102
102
  **What happens:**
103
103
  1. Claude detects keywords: "React", "dashboard", "Stripe", "checkout"
104
- 2. Skills auto-activate:
104
+ 2. Skills auto-activate (primary mechanism):
105
105
  - `sw-frontend:frontend-architect` (React, dashboard)
106
106
  - `sw-payments:payment-integration` (Stripe, checkout)
107
107
  3. Each skill runs in isolated context (`context: fork`)
108
108
  4. Results return to main conversation
109
109
 
110
- **No Task tool calls needed!** Skills activate automatically.
110
+ **Two invocation methods** (per [official docs](https://code.claude.com/docs/en/skills)):
111
+ 1. **Auto-activation** (primary): Keywords in skill description trigger automatic loading
112
+ 2. **Explicit invocation** (fallback): Use Skill tool or `/skill-name` when auto-activation doesn't trigger
113
+
114
+ ```typescript
115
+ // If auto-activation didn't work, explicitly invoke:
116
+ Skill({ skill: "sw-frontend:frontend-architect", args: "dashboard" })
117
+ ```
111
118
 
112
119
  ## Migration Complete
113
120
 
@@ -144,7 +151,11 @@ plugins/specweave-frontend/
144
151
  **A:** Claude Code expects flat files (`agents/<name>.md`), but SpecWeave had subfolder structure (`agents/<name>/AGENT.md`). Skills don't have this limitation.
145
152
 
146
153
  ### Q: How do I invoke a skill explicitly?
147
- **A:** Use `/plugin:skill-name`, e.g., `/sw-frontend:frontend-architect`. But usually just describe what you need - skills auto-activate on keywords.
154
+ **A:** Two ways:
155
+ 1. **User**: Type `/sw-frontend:frontend-architect` in chat
156
+ 2. **Claude**: Use `Skill({ skill: "sw-frontend:frontend-architect" })` when auto-activation didn't trigger
157
+
158
+ Usually just describe what you need - skills auto-activate on keywords. Use explicit invocation as fallback.
148
159
 
149
160
  ### Q: What about parallel execution?
150
161
  **A:** Built-in subagents can run in parallel via multiple Task tool calls. Skills with `context: fork` also run in isolated contexts, so multiple can activate without conflict.
@@ -131,7 +131,7 @@ SpecWeave plugins provide additional namespaced commands:
131
131
  | **Docs** | `/sw-docs:*` | init, generate, build, view, validate, organize |
132
132
  | **Frontend** | `/sw-frontend:*` | component-generate, design-system-init, frontend-scaffold |
133
133
  | **Backend** | `/sw-backend:*` | api-scaffold, crud-generate, migration-generate |
134
- | **Kubernetes** | `/sw-kubernetes:*` | cluster-setup, deployment-generate, helm-scaffold |
134
+ | **Kubernetes** | `/sw-k8s:*` | cluster-setup, deployment-generate, helm-scaffold |
135
135
  | **Testing** | `/sw-testing:*` | e2e-setup, test-coverage, test-generate, test-init |
136
136
  | **Infrastructure** | `/sw-infra:*` | monitor-setup, slo-implement |
137
137
  | **Kafka** | `/sw-kafka:*` | deploy, dev-env, monitor-setup, mcp-configure |
@@ -496,41 +496,20 @@ Task({
496
496
  ESCAPED_PROMPT=$(printf '%s' "$PROMPT" | sed 's/\\/\\\\/g; s/"/\\"/g; s/ /\\t/g' | tr '\n' ' ')
497
497
 
498
498
  MSG="${AUTOLOAD_PREFIX}╔══════════════════════════════════════════════════════════════════════════════╗
499
- ║ 🎯 MANDATORY SKILL INVOCATION - INCREMENT REQUIRED BEFORE IMPLEMENTATION
499
+ ║ 🎯 SKILL FIRST - Call Skill tool BEFORE implementation
500
500
  ╚══════════════════════════════════════════════════════════════════════════════╝
501
501
 
502
- <system>
503
- <rules>
504
- BLOCKING RULE: Your FIRST action MUST be invoking the Skill tool. No exceptions.
505
- </rules>
506
- </system>
507
-
508
- ┌──────────────────────────────────────────────────────────────────────────────┐
509
- │ ⛔ YOU ARE BLOCKED FROM THE FOLLOWING ACTIONS: │
510
- ├──────────────────────────────────────────────────────────────────────────────┤
511
- │ ❌ Write tool - BLOCKED (cannot create files) │
512
- │ ❌ Edit tool - BLOCKED (cannot modify files) │
513
- │ ❌ Bash tool - BLOCKED (no implementation commands) │
514
- │ ❌ Exploring code - BLOCKED (no 'let me first understand') │
515
- │ ❌ Planning - BLOCKED (skill does the planning) │
516
- └──────────────────────────────────────────────────────────────────────────────┘
517
-
518
- ┌──────────────────────────────────────────────────────────────────────────────┐
519
- │ ✅ YOUR ONLY ALLOWED ACTION (do this NOW): │
520
- ├──────────────────────────────────────────────────────────────────────────────┤
521
- │ Call the Skill tool EXACTLY as shown below. Nothing else first. │
522
- └──────────────────────────────────────────────────────────────────────────────┘
523
-
502
+ **Your FIRST tool call must be:**
524
503
  \\\`\\\`\\\`
525
504
  Skill({ skill: \\\"sw:increment-planner\\\", args: \\\"${ESCAPED_PROMPT}\\\" })
526
505
  \\\`\\\`\\\`
527
506
 
528
- **Detection**: Feature request (confidence: ${INC_CONF})
529
- **Reason**: ${INC_REASON}
507
+ **Order matters:**
508
+ 1. ✅ Call Skill tool FIRST (as shown above)
509
+ 2. ✅ THEN proceed with implementation normally
530
510
 
531
- ════════════════════════════════════════════════════════════════════════════════
532
- **Claude: Your FIRST tool call MUST be Skill. Not Read. Not Glob. Not Bash. Skill.**
533
- ════════════════════════════════════════════════════════════════════════════════${AGENT_DIRECTIVE}"
511
+ **Detection**: Feature request (confidence: ${INC_CONF})
512
+ **Reason**: ${INC_REASON}${AGENT_DIRECTIVE}"
534
513
  output_approve_with_context "$MSG"
535
514
  exit 0
536
515
  else
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Purpose**: Lightweight skill manifest for lazy loading. Load SKILL.md only when triggers match.
4
4
 
5
- **Total Skills**: 30 | **Last Updated**: 2026-01-13
5
+ **Total Skills**: 31 | **Last Updated**: 2026-01-26
6
6
 
7
7
  ---
8
8
 
@@ -75,6 +75,12 @@
75
75
  | **compliance-architecture** | compliance, HIPAA, SOC2, SOC 2, GDPR, PCI-DSS, regulatory, healthcare data, payment card, audit, security standards | `skills/compliance-architecture/SKILL.md` |
76
76
  | **service-connect** | connect database, supabase connection, cloudflare workers, wrangler, postgres connection, mongodb atlas, redis cache, MCP setup, service integration, connection failed, IPv6, database setup | `skills/service-connect/SKILL.md` |
77
77
 
78
+ ### Creative & Media
79
+
80
+ | Skill | Triggers | Location |
81
+ |-------|----------|----------|
82
+ | **image-generation** | image, images, generate image, create image, picture, illustration, icon, logo, hero image, banner, background, placeholder, mockup, avatar, thumbnail, splash screen, app icon, website image, landing page, UI image, design asset, Pollinations, AI image, text-to-image, FLUX, empty state illustration, feature graphic | `skills/image-generation/SKILL.md` |
83
+
78
84
  ---
79
85
 
80
86
  ## Quick Lookup Table
@@ -97,6 +103,8 @@
97
103
  | "TypeScript/Python code navigation" | `lsp-integration` |
98
104
  | "Connect to Supabase/DB" | `service-connect` |
99
105
  | "Connection failed" | `service-connect` |
106
+ | "Generate an image" / "Create illustration" | `image-generation` |
107
+ | "Hero image" / "App icon" / "Mockup" | `image-generation` |
100
108
 
101
109
  ---
102
110
 
@@ -199,7 +199,7 @@ dependencies:
199
199
 
200
200
  ## Image Generation
201
201
 
202
- When documentation needs visuals (diagrams, illustrations, icons), use the `/sw-ui:image` skill:
202
+ When documentation needs visuals (diagrams, illustrations, icons), use the `/sw:image-generation` skill:
203
203
 
204
204
  ```
205
205
  "Generate a hero image for the authentication documentation"
@@ -0,0 +1,7 @@
1
+ # Image Generation Skill Memory
2
+
3
+ <!-- Auto-captured learnings. Edit or delete as needed. -->
4
+
5
+ ## Learnings
6
+
7
+ <!-- No learnings captured yet -->