specweave 0.1.6 → 0.1.7
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/README.md +35 -20
- package/SPECWEAVE.md +82 -41
- package/package.json +1 -1
- package/src/commands/README.md +7 -5
- package/src/commands/{ci.md → pi.md} +9 -7
- package/src/skills/specweave-detector/SKILL.md +270 -402
- package/src/templates/CLAUDE.md.template +59 -19
package/README.md
CHANGED
|
@@ -101,6 +101,8 @@ specweave --help # Show help
|
|
|
101
101
|
|
|
102
102
|
## 🚀 Quick Example
|
|
103
103
|
|
|
104
|
+
**CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
|
|
105
|
+
|
|
104
106
|
```bash
|
|
105
107
|
# Initialize project - ALL components pre-installed!
|
|
106
108
|
npx specweave init my-app
|
|
@@ -111,11 +113,11 @@ cd my-app
|
|
|
111
113
|
# ✅ 35+ skills in .claude/skills/
|
|
112
114
|
# ✅ 10 slash commands in .claude/commands/
|
|
113
115
|
|
|
114
|
-
# Open Claude Code and
|
|
116
|
+
# Open Claude Code and use slash commands:
|
|
115
117
|
|
|
116
|
-
User: "
|
|
118
|
+
User: /pi "Next.js authentication with email and OAuth"
|
|
117
119
|
↓
|
|
118
|
-
SpecWeave: 🔷 SpecWeave Active
|
|
120
|
+
SpecWeave: 🔷 SpecWeave Active (/create-increment)
|
|
119
121
|
|
|
120
122
|
🚀 Creating increment 0001-user-authentication...
|
|
121
123
|
📝 Using nextjs skill (already installed!)
|
|
@@ -125,34 +127,39 @@ SpecWeave: 🔷 SpecWeave Active
|
|
|
125
127
|
✅ Increment created: .specweave/increments/0001-user-authentication/
|
|
126
128
|
✅ Files: spec.md, plan.md, tasks.md, tests.md
|
|
127
129
|
|
|
128
|
-
User: "Create C4 context diagram for authentication"
|
|
130
|
+
User: "Create C4 context diagram for authentication" # Regular conversation for implementation
|
|
129
131
|
↓
|
|
130
132
|
SpecWeave: 🎨 Using diagrams-generator skill
|
|
131
133
|
🤖 Coordinating with diagrams-architect agent
|
|
132
134
|
|
|
133
135
|
✅ Diagram saved: .specweave/docs/internal/architecture/diagrams/auth.c4-context.mmd
|
|
134
136
|
|
|
135
|
-
User: "Implement authentication"
|
|
137
|
+
User: "Implement authentication based on plan.md" # Regular conversation
|
|
136
138
|
↓
|
|
137
|
-
SpecWeave: 🤖
|
|
139
|
+
SpecWeave: 🤖 Implementing based on specifications
|
|
138
140
|
|
|
139
141
|
✅ Code: src/auth/
|
|
140
142
|
✅ Tests: tests/auth/
|
|
141
143
|
✅ Docs: Updated automatically
|
|
144
|
+
|
|
145
|
+
User: /done 0001 # Close increment with slash command
|
|
146
|
+
✅ Increment 0001 closed successfully
|
|
142
147
|
```
|
|
143
148
|
|
|
144
149
|
**How it works**:
|
|
145
150
|
1. `specweave init` → ALL components pre-installed (10 agents + 35+ skills)
|
|
146
|
-
2.
|
|
147
|
-
3.
|
|
148
|
-
4.
|
|
151
|
+
2. **Use `/pi "feature"`** → Creates increment with specs (spec.md, plan.md, tasks.md, tests.md)
|
|
152
|
+
3. **Regular conversation** → Implement code based on specifications
|
|
153
|
+
4. **Use `/done 0001`** → Close increment when complete
|
|
149
154
|
5. All components ready - no waiting, no installation
|
|
150
155
|
|
|
156
|
+
**Why slash commands?** Auto-activation doesn't work reliably - slash commands ensure SpecWeave ALWAYS activates when you want it.
|
|
157
|
+
|
|
151
158
|
---
|
|
152
159
|
|
|
153
160
|
## 🤖 Agents (10 Total - All Pre-Installed!)
|
|
154
161
|
|
|
155
|
-
SpecWeave includes **10 specialized AI agents** that
|
|
162
|
+
SpecWeave includes **10 specialized AI agents** that work with slash commands and during implementation:
|
|
156
163
|
|
|
157
164
|
| Agent | Role | When It Activates |
|
|
158
165
|
|-------|------|-------------------|
|
|
@@ -173,11 +180,11 @@ SpecWeave includes **10 specialized AI agents** that activate automatically base
|
|
|
173
180
|
|
|
174
181
|
## 🎯 Skills (35+ Total - All Pre-Installed!)
|
|
175
182
|
|
|
176
|
-
SpecWeave includes **35+ AI skills** that
|
|
183
|
+
SpecWeave includes **35+ AI skills** that work with slash commands:
|
|
177
184
|
|
|
178
185
|
### Core Framework Skills
|
|
179
|
-
- **specweave-detector** -
|
|
180
|
-
- **increment-planner** - Plan features
|
|
186
|
+
- **specweave-detector** - Slash command documentation
|
|
187
|
+
- **increment-planner** - Plan features via `/pi` command
|
|
181
188
|
- **skill-router** - Route requests to appropriate skills
|
|
182
189
|
- **context-loader** - Load relevant specifications
|
|
183
190
|
- **role-orchestrator** - Coordinate multiple agents
|
|
@@ -281,22 +288,30 @@ specweave/
|
|
|
281
288
|
|
|
282
289
|
### For Greenfield Projects
|
|
283
290
|
|
|
291
|
+
**IMPORTANT**: Use slash commands to activate SpecWeave!
|
|
292
|
+
|
|
284
293
|
```bash
|
|
285
294
|
# 1. Create specifications (optional: comprehensive upfront or incremental)
|
|
286
295
|
# Option A: Comprehensive (Enterprise) - 500-600+ pages upfront
|
|
287
296
|
# Option B: Incremental (Startup) - Build as you go
|
|
288
297
|
|
|
289
|
-
# 2. Create increment
|
|
290
|
-
/
|
|
298
|
+
# 2. Create increment with slash command
|
|
299
|
+
/pi "user authentication"
|
|
300
|
+
# Short alias for /create-increment
|
|
301
|
+
# SpecWeave orchestrates: PM → Architect → QA agents
|
|
302
|
+
# Creates: spec.md, plan.md, tasks.md, tests.md
|
|
291
303
|
|
|
292
|
-
# 3. Implement with
|
|
293
|
-
"Implement user authentication"
|
|
294
|
-
#
|
|
304
|
+
# 3. Implement with regular conversation (no slash command needed)
|
|
305
|
+
"Implement user authentication based on plan.md"
|
|
306
|
+
# Claude implements based on specifications
|
|
295
307
|
|
|
296
|
-
# 4. Generate diagrams
|
|
308
|
+
# 4. Generate diagrams (regular conversation)
|
|
297
309
|
"Create C4 context diagram for authentication"
|
|
298
310
|
|
|
299
|
-
# 5.
|
|
311
|
+
# 5. Close increment with slash command
|
|
312
|
+
/done 0001
|
|
313
|
+
|
|
314
|
+
# 6. Sync with tools (optional)
|
|
300
315
|
/sync-github # Sync to GitHub issues
|
|
301
316
|
```
|
|
302
317
|
|
package/SPECWEAVE.md
CHANGED
|
@@ -13,46 +13,58 @@ This file contains quick reference for developing with SpecWeave:
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
## SpecWeave
|
|
16
|
+
## Using SpecWeave with Slash Commands (CRITICAL)
|
|
17
17
|
|
|
18
|
-
**
|
|
18
|
+
**IMPORTANT**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - no auto-activation, no proactive detection!
|
|
19
19
|
|
|
20
|
-
###
|
|
20
|
+
### How SpecWeave Works
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
2. **ROUTE ALL development-related questions** through `specweave-detector` skill
|
|
24
|
-
3. **EVEN GENERIC questions** may need SpecWeave context (e.g., "Analyze BTC/USD" → suggest creating trading analysis feature)
|
|
22
|
+
SpecWeave follows the **spec-kit approach**: You MUST use slash commands explicitly.
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
**To use SpecWeave**: Type a slash command (e.g., `/pi "Feature description"`)
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
26
|
+
### Quick Command Reference
|
|
27
|
+
|
|
28
|
+
| Alias | Full Command | Purpose | Example |
|
|
29
|
+
|-------|--------------|---------|---------|
|
|
30
|
+
| `/init` | `/create-project` | Initialize SpecWeave project | `/init my-saas` |
|
|
31
|
+
| `/pi` | `/create-increment` | **Plan Product Increment** | `/pi "User auth"` |
|
|
32
|
+
| `/si` | `/start-increment` | Start working on increment | `/si 0001` |
|
|
33
|
+
| `/at` | `/add-tasks` | Add tasks to increment | `/at 0001 "Add tests"` |
|
|
34
|
+
| `/vi` | `/validate-increment` | Validate increment quality | `/vi 0001 --quality` |
|
|
35
|
+
| `/done` | `/close-increment` | Close increment | `/done 0001` |
|
|
36
|
+
| `/ls` | `/list-increments` | List all increments | `/ls` |
|
|
37
|
+
|
|
38
|
+
**Why Slash Commands?**
|
|
39
|
+
- ✅ **100% reliable** - Always works, no guessing
|
|
40
|
+
- ✅ **Clear intent** - You know exactly when SpecWeave is active
|
|
41
|
+
- ✅ **Fast** - Short aliases like `/pi` save keystrokes
|
|
42
|
+
- ✅ **Memorable** - Domain-specific names (PI = Product Increment from Agile/SAFe)
|
|
35
43
|
|
|
36
|
-
###
|
|
44
|
+
### Typical Workflow
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# 1. Initialize project
|
|
48
|
+
npx specweave init my-saas
|
|
37
49
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| "Create authentication" | Development request | ✅ Route to `specweave-detector` → `increment-planner` |
|
|
41
|
-
| "Analyze BTC/USD prices" | Could be feature request | ✅ Route to `specweave-detector` → Suggest: "Create BTC analysis feature?" |
|
|
42
|
-
| "Add payment processing" | Development request | ✅ Route to `specweave-detector` → `increment-planner` |
|
|
43
|
-
| "Fix bug in login" | Development request | ✅ Route to `specweave-detector` → Load context → Implement |
|
|
44
|
-
| "What's for lunch?" | Non-development | ❌ Respond normally (out of domain) |
|
|
50
|
+
# 2. Plan your first increment (use slash command!)
|
|
51
|
+
/pi "User authentication with JWT and RBAC"
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
# 3. Validate
|
|
54
|
+
/vi 0001 --quality
|
|
47
55
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
- ✅ Route development requests automatically
|
|
51
|
-
- ✅ Load context via `context-loader` when needed
|
|
52
|
-
- ✅ Use appropriate agents (PM, Architect, DevOps, etc.)
|
|
53
|
-
- ✅ Adapt to detected tech stack (TypeScript, Python, Go, etc.)
|
|
56
|
+
# 4. Start working
|
|
57
|
+
/si 0001
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
# 5. Implement (regular conversation, no slash commands needed here)
|
|
60
|
+
User: "Let's implement the backend API"
|
|
61
|
+
Claude: [implements based on plan.md and tasks.md]
|
|
62
|
+
|
|
63
|
+
# 6. Close when done
|
|
64
|
+
/done 0001
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
|
|
56
68
|
|
|
57
69
|
---
|
|
58
70
|
|
|
@@ -177,12 +189,14 @@ npx specweave list --installed # See what's installed
|
|
|
177
189
|
|
|
178
190
|
---
|
|
179
191
|
|
|
180
|
-
## Quick Reference: Slash Commands
|
|
192
|
+
## Quick Reference: Slash Commands (MUST USE!)
|
|
193
|
+
|
|
194
|
+
**CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type them to activate the framework!
|
|
181
195
|
|
|
182
196
|
| Command | Alias | Purpose | Example |
|
|
183
197
|
|---------|-------|---------|---------|
|
|
184
198
|
| `/create-project` | `/init` | Bootstrap new SpecWeave project | `/init my-saas --type python` |
|
|
185
|
-
| `/create-increment` | `/
|
|
199
|
+
| `/create-increment` | `/pi` | **Plan Product Increment** (create new feature) | `/pi "user authentication"` |
|
|
186
200
|
| `/start-increment` | `/si` | Start working on an increment | `/si 0001` |
|
|
187
201
|
| `/add-tasks` | `/at` | Add tasks to existing increment | `/at 0001 "implement login"` |
|
|
188
202
|
| `/validate-increment` | `/vi` | Validate with rule-based + optional AI quality | `/vi 0001 --quality` |
|
|
@@ -194,7 +208,9 @@ npx specweave list --installed # See what's installed
|
|
|
194
208
|
|
|
195
209
|
**All commands are framework-agnostic** (adapt to detected tech stack)
|
|
196
210
|
|
|
197
|
-
**💡 Pro Tip**: Use short aliases (`/
|
|
211
|
+
**💡 Pro Tip**: Use short aliases (`/pi`, `/vi`, `/si`, `/done`, `/ls`, `/at`, `/init`) for speed during active development!
|
|
212
|
+
- **PI** = Product Increment (standard Agile terminology)
|
|
213
|
+
- **Why explicit?** Auto-activation doesn't work reliably - slash commands ensure SpecWeave ALWAYS activates
|
|
198
214
|
|
|
199
215
|
**See**: [Command Reference](.claude/commands/) for all available commands
|
|
200
216
|
|
|
@@ -229,8 +245,8 @@ npx specweave list --installed # See what's installed
|
|
|
229
245
|
|
|
230
246
|
| Skill | Purpose | Activates When |
|
|
231
247
|
|-------|---------|----------------|
|
|
232
|
-
| `specweave-detector` |
|
|
233
|
-
| `increment-planner` | Plan features with context |
|
|
248
|
+
| `specweave-detector` | Slash command documentation | User asks about SpecWeave commands |
|
|
249
|
+
| `increment-planner` | Plan features with context | `/pi` or `/create-increment` command |
|
|
234
250
|
| `skill-router` | Route to appropriate skills | Ambiguous requests |
|
|
235
251
|
| `context-loader` | Load context selectively | Working on increments |
|
|
236
252
|
| `diagrams-generator` | Coordinate diagram creation | "create diagram", "draw diagram", C4, sequence, ER |
|
|
@@ -286,11 +302,17 @@ backlog → planned → in-progress → completed → closed
|
|
|
286
302
|
|
|
287
303
|
**Naming Convention**: 4-digit format (0001-9999), e.g., `0001-feature-name`, `0042-user-auth`, `0123-payment-flow`
|
|
288
304
|
|
|
289
|
-
**Commands
|
|
305
|
+
**Commands** (MUST USE SLASH COMMANDS!):
|
|
290
306
|
```bash
|
|
291
|
-
|
|
292
|
-
/
|
|
293
|
-
/
|
|
307
|
+
# Use short aliases (recommended)
|
|
308
|
+
/pi "feature name" # Create new increment (auto-numbered, e.g., 0003-feature-name)
|
|
309
|
+
/at 0001 "task description" # Add tasks to existing
|
|
310
|
+
/done 0001 # Close with leftover transfer
|
|
311
|
+
|
|
312
|
+
# Or full commands
|
|
313
|
+
/create-increment "feature name" # Same as /pi
|
|
314
|
+
/add-tasks 0001 "task description" # Same as /at
|
|
315
|
+
/close-increment 0001 # Same as /done
|
|
294
316
|
```
|
|
295
317
|
|
|
296
318
|
**See**: [Increment Lifecycle Guide](.specweave/docs/internal/delivery/guides/increment-lifecycle.md) for complete lifecycle management
|
|
@@ -661,8 +683,27 @@ Attempt 2/3: Refining with feedback...
|
|
|
661
683
|
|
|
662
684
|
---
|
|
663
685
|
|
|
664
|
-
**Quick Start**:
|
|
686
|
+
**Quick Start**:
|
|
687
|
+
|
|
688
|
+
**CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type `/pi` to activate!
|
|
689
|
+
|
|
690
|
+
```bash
|
|
691
|
+
# Initialize project
|
|
692
|
+
npx specweave init my-project
|
|
693
|
+
|
|
694
|
+
# Create your first feature (use slash command!)
|
|
695
|
+
/pi "feature description"
|
|
696
|
+
|
|
697
|
+
# Typical workflow
|
|
698
|
+
1. /pi "feature" → SpecWeave creates specs
|
|
699
|
+
2. Regular conversation → Claude implements code
|
|
700
|
+
3. /done 0001 → Close increment
|
|
701
|
+
```
|
|
702
|
+
|
|
703
|
+
**Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
|
|
704
|
+
|
|
705
|
+
**Need help?**: Type `/pi` to see examples, or ask about specific workflows.
|
|
665
706
|
|
|
666
|
-
**
|
|
707
|
+
**SpecWeave Documentation**: https://spec-weave.com
|
|
667
708
|
|
|
668
709
|
**Last Updated**: Auto-updated via `post-task-completion` hook
|
package/package.json
CHANGED
package/src/commands/README.md
CHANGED
|
@@ -9,7 +9,7 @@ SpecWeave provides short aliases for frequently used commands to speed up your w
|
|
|
9
9
|
| Full Command | Alias | Description |
|
|
10
10
|
|--------------|-------|-------------|
|
|
11
11
|
| `/create-project` | `/init` | Initialize new SpecWeave project |
|
|
12
|
-
| `/create-increment` | `/
|
|
12
|
+
| `/create-increment` | `/pi` | Plan Product Increment (create new increment) |
|
|
13
13
|
| `/start-increment` | `/si` | Start working on increment |
|
|
14
14
|
| `/add-tasks` | `/at` | Add tasks to increment |
|
|
15
15
|
| `/validate-increment` | `/vi` | Validate increment quality |
|
|
@@ -55,8 +55,8 @@ Use aliases when:
|
|
|
55
55
|
# 1. Initialize project
|
|
56
56
|
/init my-saas
|
|
57
57
|
|
|
58
|
-
# 2.
|
|
59
|
-
/
|
|
58
|
+
# 2. Plan Product Increment (PI = Product Increment in Agile)
|
|
59
|
+
/pi "User authentication"
|
|
60
60
|
|
|
61
61
|
# 3. Start working
|
|
62
62
|
/si 0001
|
|
@@ -94,7 +94,7 @@ Use aliases when:
|
|
|
94
94
|
| Command | Alias | Description |
|
|
95
95
|
|---------|-------|-------------|
|
|
96
96
|
| `/create-project` | `/init` | Bootstrap new SpecWeave project with auto-detection |
|
|
97
|
-
| `/create-increment` | `/
|
|
97
|
+
| `/create-increment` | `/pi` | Plan Product Increment with PM/Architect/QA planning |
|
|
98
98
|
| `/start-increment` | `/si` | Start working on an increment (load context, create branch) |
|
|
99
99
|
| `/add-tasks` | `/at` | Add tasks to existing increment |
|
|
100
100
|
| `/validate-increment` | `/vi` | Validate increment (120 rules + optional LLM quality judge) |
|
|
@@ -168,4 +168,6 @@ npm run install:commands
|
|
|
168
168
|
|
|
169
169
|
**💡 Pro Tip**: Learn the aliases - they'll save you hundreds of keystrokes per day!
|
|
170
170
|
|
|
171
|
-
**Most used**: `/
|
|
171
|
+
**Most used**: `/pi`, `/si`, `/vi`, `/done`, `/ls`
|
|
172
|
+
|
|
173
|
+
**PI** = Product Increment (standard Agile/Scrum terminology)
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 🔥 Shorthand for /create-increment -
|
|
2
|
+
description: 🔥 Shorthand for /create-increment - Plan Product Increment (Alias)
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
#
|
|
5
|
+
# Plan Product Increment (Short Alias)
|
|
6
6
|
|
|
7
7
|
**⚡ Quick Alias**: This is a shorthand command for `/create-increment`.
|
|
8
8
|
|
|
9
|
+
**PI = Product Increment** - Standard Agile terminology for a planned unit of work.
|
|
10
|
+
|
|
9
11
|
Use this when you want to quickly create a new SpecWeave increment without typing the full command name.
|
|
10
12
|
|
|
11
13
|
---
|
|
@@ -21,14 +23,14 @@ This alias provides the exact same functionality as the full command.
|
|
|
21
23
|
## Usage
|
|
22
24
|
|
|
23
25
|
```bash
|
|
24
|
-
/
|
|
26
|
+
/pi "Feature name"
|
|
25
27
|
```
|
|
26
28
|
|
|
27
29
|
**Example**:
|
|
28
30
|
```bash
|
|
29
|
-
/
|
|
30
|
-
/
|
|
31
|
-
/
|
|
31
|
+
/pi "User authentication"
|
|
32
|
+
/pi "Payment processing"
|
|
33
|
+
/pi "Admin dashboard"
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
---
|
|
@@ -60,4 +62,4 @@ This alias provides the exact same functionality as the full command.
|
|
|
60
62
|
|
|
61
63
|
---
|
|
62
64
|
|
|
63
|
-
**💡 Tip**: Use `/
|
|
65
|
+
**💡 Tip**: Use `/pi` for speed (PI = Product Increment in Agile), `/create-increment` for clarity in scripts.
|
|
@@ -1,525 +1,393 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: specweave-detector
|
|
3
|
-
description:
|
|
4
|
-
proactive: true
|
|
3
|
+
description: Documentation skill that explains SpecWeave slash commands. SpecWeave uses EXPLICIT slash commands only - no auto-activation! Use /pi (Plan Product Increment) or /create-increment to start. Other commands /si (start), /at (add tasks), /vi (validate), /done (close), /ls (list). All commands listed in .claude/commands/. Keywords slash commands, /pi, /create-increment, /si, /vi, /done, /ls, /init, specweave commands.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
|
-
# SpecWeave
|
|
6
|
+
# SpecWeave - Slash Command Reference
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
**CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS ONLY** - no auto-activation, no proactive detection, no intent-based routing.
|
|
10
9
|
|
|
11
|
-
##
|
|
10
|
+
## How SpecWeave Works
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
1. **Detects SpecWeave projects automatically** (when .specweave/ exists)
|
|
15
|
-
2. **Parses user requests** and determines intent
|
|
16
|
-
3. **Routes to appropriate skills/agents** (all pre-installed!)
|
|
17
|
-
4. **Orchestrates nested skill calls** for complex operations
|
|
18
|
-
5. **Manages context loading** via context-loader skill
|
|
12
|
+
SpecWeave follows the **spec-kit approach**: You MUST use slash commands explicitly.
|
|
19
13
|
|
|
20
|
-
|
|
14
|
+
**To use SpecWeave**: Type a slash command (e.g., `/pi "Feature description"`)
|
|
21
15
|
|
|
22
|
-
|
|
23
|
-
// Pseudo-code for detection
|
|
24
|
-
if (fileExists('.specweave/config.yaml')) {
|
|
25
|
-
// ACTIVATE SPECWEAVE MODE
|
|
26
|
-
activateSpecWeaveMode();
|
|
27
|
-
loadConfiguration();
|
|
16
|
+
## Available Slash Commands
|
|
28
17
|
|
|
29
|
-
|
|
30
|
-
// ✅ 10 agents in .claude/agents/
|
|
31
|
-
// ✅ 35+ skills in .claude/skills/
|
|
32
|
-
// ✅ 10 commands in .claude/commands/
|
|
18
|
+
### Quick Reference Table
|
|
33
19
|
|
|
34
|
-
|
|
20
|
+
| Alias | Full Command | Purpose | Example |
|
|
21
|
+
|-------|--------------|---------|---------|
|
|
22
|
+
| `/init` | `/create-project` | Initialize SpecWeave project | `/init my-saas` |
|
|
23
|
+
| `/pi` | `/create-increment` | **Plan Product Increment** | `/pi "User auth"` |
|
|
24
|
+
| `/ci` | `/create-increment` | Alternative to `/pi` | `/ci "Payment"` |
|
|
25
|
+
| `/si` | `/start-increment` | Start working on increment | `/si 0001` |
|
|
26
|
+
| `/at` | `/add-tasks` | Add tasks to increment | `/at 0001 "Add tests"` |
|
|
27
|
+
| `/vi` | `/validate-increment` | Validate increment quality | `/vi 0001 --quality` |
|
|
28
|
+
| `/done` | `/close-increment` | Close increment | `/done 0001` |
|
|
29
|
+
| `/ls` | `/list-increments` | List all increments | `/ls` |
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
routeToSkills();
|
|
38
|
-
}
|
|
39
|
-
```
|
|
31
|
+
### Command Details
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
#### `/pi` or `/create-increment` - Plan Product Increment
|
|
42
34
|
|
|
43
|
-
**
|
|
35
|
+
**Most important command!** Creates a new increment with specifications.
|
|
44
36
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- ✅ **10 slash commands**: /create-increment, /validate-increment, etc.
|
|
37
|
+
```bash
|
|
38
|
+
# Short form (recommended)
|
|
39
|
+
/pi "User authentication with JWT and RBAC"
|
|
49
40
|
|
|
50
|
-
|
|
41
|
+
# Full form
|
|
42
|
+
/create-increment "User authentication with JWT and RBAC"
|
|
43
|
+
```
|
|
51
44
|
|
|
52
|
-
|
|
45
|
+
**What happens**:
|
|
46
|
+
1. Creates `.specweave/increments/000X-feature-name/` folder
|
|
47
|
+
2. PM agent generates `spec.md` (requirements, user stories)
|
|
48
|
+
3. Architect agent generates `plan.md` (architecture, design)
|
|
49
|
+
4. QA Lead generates `tests.md` (test strategy)
|
|
50
|
+
5. Creates `tasks.md` (implementation checklist)
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
2. **SpecWeave detector activates** (all components already installed!)
|
|
56
|
-
3. **Analyze user intent**:
|
|
57
|
-
- "Create" → Route to increment-planner skill
|
|
58
|
-
- "Next.js" → Will use nextjs skill (already installed)
|
|
59
|
-
- "authentication" → Will involve security agent (already installed)
|
|
60
|
-
4. **Route to increment-planner**:
|
|
61
|
-
- Creates increment folder
|
|
62
|
-
- Generates spec.md, plan.md, tasks.md, tests.md
|
|
63
|
-
- Coordinates with PM agent → Architect agent
|
|
64
|
-
5. **Implementation ready** - All skills/agents available immediately
|
|
52
|
+
#### `/si` or `/start-increment` - Start Working
|
|
65
53
|
|
|
66
|
-
|
|
54
|
+
Marks an increment as "in-progress".
|
|
67
55
|
|
|
68
|
-
|
|
56
|
+
```bash
|
|
57
|
+
/si 0001
|
|
69
58
|
```
|
|
70
|
-
User: "Create Next.js authentication with OAuth"
|
|
71
|
-
|
|
72
|
-
🔷 SpecWeave Active
|
|
73
59
|
|
|
74
|
-
|
|
75
|
-
📝 Using nextjs skill (already installed!)
|
|
76
|
-
🤖 PM agent creating requirements...
|
|
77
|
-
🏗️ Architect agent designing system...
|
|
60
|
+
#### `/at` or `/add-tasks` - Add Tasks
|
|
78
61
|
|
|
79
|
-
|
|
80
|
-
✅ Files: spec.md, plan.md, tasks.md, tests.md
|
|
81
|
-
```
|
|
62
|
+
Add additional tasks to an increment.
|
|
82
63
|
|
|
83
|
-
|
|
64
|
+
```bash
|
|
65
|
+
/at 0001 "Add password reset functionality"
|
|
66
|
+
/at 0001 "Add email verification"
|
|
84
67
|
```
|
|
85
|
-
User: "Build a real estate listing platform with Node.js/Express"
|
|
86
68
|
|
|
87
|
-
|
|
69
|
+
#### `/vi` or `/validate-increment` - Validate Quality
|
|
88
70
|
|
|
89
|
-
|
|
90
|
-
📝 Using nodejs-backend skill (already installed!)
|
|
91
|
-
🤖 PM agent creating requirements...
|
|
92
|
-
🏗️ Architect agent designing system...
|
|
93
|
-
🛡️ Security agent reviewing authentication...
|
|
71
|
+
Run validation checks on an increment.
|
|
94
72
|
|
|
95
|
-
|
|
96
|
-
|
|
73
|
+
```bash
|
|
74
|
+
# Rule-based validation only
|
|
75
|
+
/vi 0001
|
|
97
76
|
|
|
98
|
-
|
|
77
|
+
# With AI quality assessment
|
|
78
|
+
/vi 0001 --quality
|
|
99
79
|
```
|
|
100
|
-
User: "Create FastAPI backend with PostgreSQL"
|
|
101
80
|
|
|
102
|
-
|
|
81
|
+
#### `/done` or `/close-increment` - Close Increment
|
|
103
82
|
|
|
104
|
-
|
|
105
|
-
📝 Using python-backend skill (already installed!)
|
|
106
|
-
🤖 PM agent creating requirements...
|
|
107
|
-
🏗️ Architect agent designing system...
|
|
83
|
+
Mark increment as completed.
|
|
108
84
|
|
|
109
|
-
|
|
85
|
+
```bash
|
|
86
|
+
/done 0001
|
|
110
87
|
```
|
|
111
88
|
|
|
112
|
-
|
|
89
|
+
#### `/ls` or `/list-increments` - List All
|
|
113
90
|
|
|
114
|
-
|
|
115
|
-
- ✅ **No installation confusion** - everything works out of the box
|
|
116
|
-
- ✅ **Predictable** - same components every time
|
|
117
|
-
- ✅ **Simple mental model** - init once, use forever
|
|
118
|
-
- ✅ **Offline-friendly** - all components local after init
|
|
91
|
+
Show all increments with status.
|
|
119
92
|
|
|
120
|
-
|
|
93
|
+
```bash
|
|
94
|
+
/ls
|
|
95
|
+
```
|
|
121
96
|
|
|
122
|
-
|
|
97
|
+
### Why Slash Commands?
|
|
123
98
|
|
|
124
|
-
|
|
125
|
-
1. Claude Code detects the directory
|
|
126
|
-
2. This skill loads proactively (no user action needed)
|
|
127
|
-
3. SpecWeave mode activates silently
|
|
128
|
-
4. User requests are automatically routed to appropriate skills
|
|
99
|
+
**Problem**: Auto-activation doesn't work reliably in Claude Code.
|
|
129
100
|
|
|
130
|
-
**
|
|
131
|
-
```
|
|
132
|
-
# User doesn't know SpecWeave is active
|
|
133
|
-
User: "I want to add payment processing"
|
|
134
|
-
|
|
135
|
-
# Behind the scenes:
|
|
136
|
-
# 1. specweave-detector intercepts request
|
|
137
|
-
# 2. Parses request: "add feature" + "payment processing"
|
|
138
|
-
# 3. Routes to: increment-planner skill
|
|
139
|
-
# 4. increment-planner creates Increment 0002
|
|
140
|
-
# 5. Returns result to user
|
|
141
|
-
|
|
142
|
-
# User sees:
|
|
143
|
-
✅ Increment created: .specweave/increments/0002-payment-processing/
|
|
144
|
-
```
|
|
101
|
+
**Solution**: Explicit slash commands (like spec-kit) ensure SpecWeave ALWAYS activates when you want it.
|
|
145
102
|
|
|
146
|
-
|
|
103
|
+
**Benefits**:
|
|
104
|
+
- ✅ **100% reliable** - Always works, no guessing
|
|
105
|
+
- ✅ **Clear intent** - You know exactly when SpecWeave is active
|
|
106
|
+
- ✅ **Fast** - Short aliases like `/pi` save keystrokes
|
|
107
|
+
- ✅ **Memorable** - Domain-specific names (PI = Product Increment from Agile/SAFe)
|
|
147
108
|
|
|
148
|
-
|
|
109
|
+
## Typical Workflow
|
|
149
110
|
|
|
150
|
-
|
|
151
|
-
|-----------|--------|----------|
|
|
152
|
-
| "Plan a feature for..." | feature_planning | `increment-planner` |
|
|
153
|
-
| "Load context for..." | context_loading | `context-loader` |
|
|
154
|
-
| "Document this code..." | documentation | `docs-updater` |
|
|
155
|
-
| "Create a spec for..." | specification | `spec-author` |
|
|
156
|
-
| "Design architecture for..." | architecture | `architect` |
|
|
157
|
-
| "Implement feature 001" | development | `developer` |
|
|
158
|
-
| "Test this feature" | testing | `qa-engineer` |
|
|
111
|
+
### 1. Initialize Project
|
|
159
112
|
|
|
160
|
-
|
|
113
|
+
```bash
|
|
114
|
+
npx specweave init my-saas
|
|
115
|
+
cd my-saas
|
|
116
|
+
```
|
|
161
117
|
|
|
162
|
-
**
|
|
118
|
+
**Creates**:
|
|
119
|
+
- `.specweave/` - Framework configuration
|
|
120
|
+
- `.claude/agents/` - 10 pre-installed agents
|
|
121
|
+
- `.claude/skills/` - 35+ pre-installed skills
|
|
122
|
+
- `.claude/commands/` - 10 slash commands
|
|
123
|
+
- `CLAUDE.md` - Development guide
|
|
163
124
|
|
|
164
|
-
|
|
165
|
-
1. Create increment → `increment-planner`
|
|
166
|
-
2. Load context → `context-loader`
|
|
167
|
-
3. Implement code → Coordinate with appropriate agents/skills
|
|
168
|
-
4. Generate tests → Use QA Lead agent
|
|
169
|
-
5. Update docs → Use Docs Writer agent
|
|
125
|
+
### 2. Plan Your First Increment
|
|
170
126
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
↓
|
|
175
|
-
specweave-detector parses: CREATE + IMPLEMENT + FEATURE + PAYMENT
|
|
176
|
-
↓
|
|
177
|
-
Orchestrate nested skills:
|
|
178
|
-
↓
|
|
179
|
-
increment-planner: Create .specweave/increments/0003-payment-processing/
|
|
180
|
-
↓
|
|
181
|
-
context-loader: Load .specweave/docs/internal/strategy/payments/**
|
|
182
|
-
↓
|
|
183
|
-
Implementation: Use nodejs-backend skill + security agent
|
|
184
|
-
↓
|
|
185
|
-
Testing: Use QA Lead agent (generate E2E tests)
|
|
186
|
-
↓
|
|
187
|
-
Documentation: Update .specweave/docs/internal/architecture/
|
|
188
|
-
↓
|
|
189
|
-
Result: "✅ Increment 0003 implemented and documented"
|
|
127
|
+
```bash
|
|
128
|
+
# Use short alias (recommended)
|
|
129
|
+
/pi "User authentication with JWT and RBAC"
|
|
190
130
|
```
|
|
191
131
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
When request is unclear:
|
|
132
|
+
**Creates**:
|
|
195
133
|
```
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
skill-router asks:
|
|
203
|
-
"What would you like to do with authentication?
|
|
204
|
-
1. Create a specification
|
|
205
|
-
2. Plan implementation
|
|
206
|
-
3. Implement code
|
|
207
|
-
4. Document existing code"
|
|
134
|
+
.specweave/increments/0001-user-authentication/
|
|
135
|
+
├── spec.md # Requirements (PM agent)
|
|
136
|
+
├── plan.md # Architecture (Architect agent)
|
|
137
|
+
├── tasks.md # Implementation steps
|
|
138
|
+
├── tests.md # Test strategy (QA Lead agent)
|
|
139
|
+
└── context-manifest.yaml # Context loading config
|
|
208
140
|
```
|
|
209
141
|
|
|
210
|
-
|
|
142
|
+
### 3. Validate & Start
|
|
211
143
|
|
|
212
|
-
|
|
144
|
+
```bash
|
|
145
|
+
# Validate quality
|
|
146
|
+
/vi 0001 --quality
|
|
213
147
|
|
|
214
|
-
|
|
148
|
+
# Start working
|
|
149
|
+
/si 0001
|
|
150
|
+
```
|
|
215
151
|
|
|
216
|
-
|
|
217
|
-
// Detect active increment
|
|
218
|
-
const activeIncrement = detectActiveIncrement(); // .specweave/increments/####-xxx/
|
|
152
|
+
### 4. Add More Tasks (As Needed)
|
|
219
153
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
}
|
|
154
|
+
```bash
|
|
155
|
+
# As you discover new work
|
|
156
|
+
/at 0001 "Add password reset flow"
|
|
157
|
+
/at 0001 "Add 2FA support"
|
|
225
158
|
```
|
|
226
159
|
|
|
227
|
-
###
|
|
160
|
+
### 5. Close When Done
|
|
228
161
|
|
|
229
|
-
|
|
162
|
+
```bash
|
|
163
|
+
/done 0001
|
|
164
|
+
```
|
|
230
165
|
|
|
231
|
-
|
|
232
|
-
2. **Current branch** (git branch name features/###-xxx)
|
|
233
|
-
3. **User-specified** context
|
|
234
|
-
4. **Global** context (.specweave/docs/internal/strategy/overview.md, principles.md)
|
|
166
|
+
## Example Sessions
|
|
235
167
|
|
|
236
|
-
|
|
168
|
+
### Example 1: Real Estate Platform
|
|
237
169
|
|
|
238
|
-
|
|
170
|
+
```bash
|
|
171
|
+
# Initialize
|
|
172
|
+
$ npx specweave init real-estate-app
|
|
173
|
+
$ cd real-estate-app
|
|
239
174
|
|
|
240
|
-
|
|
175
|
+
# Plan increment with slash command
|
|
176
|
+
$ /pi "Real estate listing platform with search, images, admin dashboard. Node.js/Express, PostgreSQL, JWT auth"
|
|
241
177
|
|
|
242
|
-
|
|
243
|
-
User: "Create tests and update documentation"
|
|
244
|
-
↓
|
|
245
|
-
Parallel execution:
|
|
246
|
-
├─ qa-engineer: Generate tests
|
|
247
|
-
└─ docs-updater: Update docs
|
|
248
|
-
|
|
249
|
-
Wait for both to complete
|
|
250
|
-
↓
|
|
251
|
-
Result: "✅ Tests generated (15 test cases) and docs updated"
|
|
252
|
-
```
|
|
178
|
+
🔷 SpecWeave Active (/create-increment)
|
|
253
179
|
|
|
254
|
-
|
|
180
|
+
📝 Using increment-planner skill...
|
|
181
|
+
🤖 PM agent creating requirements...
|
|
182
|
+
🏗️ Architect agent designing system...
|
|
183
|
+
🛡️ Security agent reviewing authentication...
|
|
255
184
|
|
|
256
|
-
|
|
185
|
+
✅ Increment created: .specweave/increments/0001-real-estate-platform/
|
|
186
|
+
- spec.md (Requirements & user stories)
|
|
187
|
+
- plan.md (Architecture & design)
|
|
188
|
+
- tasks.md (Implementation checklist)
|
|
189
|
+
- tests.md (Test strategy)
|
|
257
190
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
Sequential execution:
|
|
262
|
-
1. increment-planner: Create plan (MUST complete first)
|
|
263
|
-
2. context-loader: Load relevant specs (uses plan output)
|
|
264
|
-
3. developer: Implement (uses loaded context)
|
|
265
|
-
|
|
266
|
-
Each step waits for previous to complete
|
|
267
|
-
```
|
|
191
|
+
# Validate
|
|
192
|
+
$ /vi 0001 --quality
|
|
193
|
+
✅ Quality score: 87/100 (GOOD)
|
|
268
194
|
|
|
269
|
-
|
|
195
|
+
# Start working
|
|
196
|
+
$ /si 0001
|
|
197
|
+
✅ Increment 0001 status → in-progress
|
|
270
198
|
|
|
271
|
-
|
|
199
|
+
# Implement (regular Claude conversation, no slash commands needed here)
|
|
200
|
+
User: "Let's implement the backend API for listings"
|
|
201
|
+
Claude: [implements based on plan.md and tasks.md]
|
|
272
202
|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
specweave-detector: Route to implementation
|
|
277
|
-
↓
|
|
278
|
-
ERROR: Increment 0005 not found
|
|
279
|
-
↓
|
|
280
|
-
specweave-detector: Catch error, suggest:
|
|
281
|
-
"Increment 0005 doesn't exist. Would you like to:
|
|
282
|
-
1. Create it first (/create-increment)
|
|
283
|
-
2. List existing increments (/list-increments)
|
|
284
|
-
3. Implement a different increment"
|
|
203
|
+
# Close when done
|
|
204
|
+
$ /done 0001
|
|
205
|
+
✅ Increment 0001 closed successfully
|
|
285
206
|
```
|
|
286
207
|
|
|
287
|
-
|
|
208
|
+
### Example 2: Next.js Authentication
|
|
288
209
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
# .specweave/config.yaml
|
|
293
|
-
principles:
|
|
294
|
-
auto_role_routing: true # Enable auto-routing
|
|
295
|
-
context_precision: true # Use context manifests
|
|
296
|
-
routing_accuracy_target: 0.90 # Accuracy threshold
|
|
210
|
+
```bash
|
|
211
|
+
# Short alias for speed
|
|
212
|
+
$ /pi "Next.js authentication with JWT, OAuth, RBAC"
|
|
297
213
|
|
|
298
|
-
|
|
299
|
-
# Agents and skills are in .claude/ folder, ready to use
|
|
214
|
+
🔷 SpecWeave Active (/create-increment)
|
|
300
215
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
jira:
|
|
306
|
-
enabled: false
|
|
307
|
-
ado:
|
|
308
|
-
enabled: false
|
|
309
|
-
```
|
|
216
|
+
📝 Using increment-planner + nextjs skill...
|
|
217
|
+
🤖 PM agent creating requirements...
|
|
218
|
+
🏗️ Architect agent designing Next.js App Router flow...
|
|
219
|
+
🔒 Security agent reviewing auth patterns...
|
|
310
220
|
|
|
311
|
-
|
|
221
|
+
✅ Increment 0002-nextjs-authentication created
|
|
312
222
|
|
|
313
|
-
|
|
223
|
+
# Add forgotten tasks later
|
|
224
|
+
$ /at 0002 "Add password reset flow"
|
|
225
|
+
$ /at 0002 "Add 2FA with TOTP"
|
|
226
|
+
✅ Added 2 tasks to increment 0002
|
|
314
227
|
|
|
315
|
-
|
|
228
|
+
# List all increments
|
|
229
|
+
$ /ls
|
|
316
230
|
|
|
231
|
+
Increments:
|
|
232
|
+
0001 real-estate-platform [completed] ✅
|
|
233
|
+
0002 nextjs-authentication [in-progress] 🚧
|
|
317
234
|
```
|
|
318
|
-
🔷 SpecWeave Active
|
|
319
235
|
|
|
320
|
-
|
|
321
|
-
```
|
|
236
|
+
### Example 3: Multi-Increment Project
|
|
322
237
|
|
|
323
|
-
|
|
238
|
+
```bash
|
|
239
|
+
# Create multiple increments
|
|
240
|
+
$ /pi "User authentication"
|
|
241
|
+
✅ Increment 0001 created
|
|
324
242
|
|
|
325
|
-
|
|
243
|
+
$ /pi "Real estate listings with search"
|
|
244
|
+
✅ Increment 0002 created
|
|
326
245
|
|
|
327
|
-
|
|
246
|
+
$ /pi "Admin dashboard"
|
|
247
|
+
✅ Increment 0003 created
|
|
328
248
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
SpecWeave Framework Skills (35+, all ready):
|
|
335
|
-
✅ increment-planner - Plan implementation features
|
|
336
|
-
✅ context-loader - Selective specification loading
|
|
337
|
-
✅ skill-router - Route ambiguous intents
|
|
338
|
-
✅ nodejs-backend - Node.js/Express/NestJS backend
|
|
339
|
-
✅ python-backend - Python/FastAPI/Django backend
|
|
340
|
-
✅ nextjs - Next.js App Router specialist
|
|
341
|
-
✅ frontend - React/Vue/Angular frontend
|
|
342
|
-
✅ diagrams-generator - C4 Model diagrams
|
|
343
|
-
✅ github-sync - GitHub integration
|
|
344
|
-
✅ jira-sync - JIRA integration
|
|
345
|
-
... and 25+ more!
|
|
346
|
-
|
|
347
|
-
SpecWeave Agents (10, all ready):
|
|
348
|
-
✅ pm - Product Manager (requirements, user stories)
|
|
349
|
-
✅ architect - System Architect (design, ADRs)
|
|
350
|
-
✅ security - Security Engineer (threat modeling)
|
|
351
|
-
✅ qa-lead - QA Lead (test strategy)
|
|
352
|
-
✅ devops - DevOps Engineer (deployment)
|
|
353
|
-
... and 5+ more!
|
|
354
|
-
|
|
355
|
-
Custom Skills (user-created):
|
|
356
|
-
✅ newrelic-monitor - New Relic integration
|
|
357
|
-
✅ cqrs-implementer - CQRS pattern implementation
|
|
358
|
-
```
|
|
249
|
+
# Work on them in order
|
|
250
|
+
$ /si 0001
|
|
251
|
+
$ [implement authentication]
|
|
252
|
+
$ /done 0001
|
|
359
253
|
|
|
360
|
-
|
|
254
|
+
$ /si 0002
|
|
255
|
+
$ [implement listings]
|
|
256
|
+
$ /done 0002
|
|
361
257
|
|
|
362
|
-
|
|
258
|
+
$ /si 0003
|
|
259
|
+
$ [implement admin]
|
|
260
|
+
$ /done 0003
|
|
363
261
|
|
|
364
|
-
|
|
262
|
+
# Review what's been done
|
|
263
|
+
$ /ls
|
|
365
264
|
|
|
265
|
+
Increments:
|
|
266
|
+
0001 user-authentication [completed] ✅
|
|
267
|
+
0002 real-estate-listings [completed] ✅
|
|
268
|
+
0003 admin-dashboard [completed] ✅
|
|
366
269
|
```
|
|
367
|
-
1. Parse Request: BUILD + FEATURE + REAL_TIME_CHAT
|
|
368
|
-
Request: feature_creation + complex_feature
|
|
369
|
-
|
|
370
|
-
2. Route to increment-planner:
|
|
371
|
-
Input: "Real-time chat feature"
|
|
372
|
-
Output: .specweave/increments/0004-realtime-chat/
|
|
373
|
-
- spec.md (5 user stories)
|
|
374
|
-
- plan.md (WebSocket architecture)
|
|
375
|
-
- tasks.md (78 tasks)
|
|
376
|
-
- tests.md (20 test cases)
|
|
377
|
-
|
|
378
|
-
3. Detect next request: User likely wants to implement
|
|
379
|
-
Prompt: "Increment 0004 created. Would you like to:
|
|
380
|
-
1. Review the plan
|
|
381
|
-
2. Start implementation
|
|
382
|
-
3. Load context for this increment"
|
|
383
|
-
|
|
384
|
-
4. User chooses 2 (Start implementation)
|
|
385
|
-
|
|
386
|
-
5. Route to context-loader:
|
|
387
|
-
Load: .specweave/increments/0004-realtime-chat/context-manifest.yaml
|
|
388
|
-
Output: Loaded specs/modules/realtime/**, architecture/websockets.md
|
|
389
|
-
|
|
390
|
-
6. Route to implementation:
|
|
391
|
-
Input: .specweave/increments/0004-realtime-chat/tasks.md
|
|
392
|
-
Context: Loaded specs
|
|
393
|
-
Output: Implement Phase 1 (Setup WebSocket server)
|
|
394
|
-
|
|
395
|
-
7. After implementation, coordinate testing:
|
|
396
|
-
Input: .specweave/increments/0004-realtime-chat/tests.md
|
|
397
|
-
Output: Generate test suite (E2E with Playwright)
|
|
398
|
-
|
|
399
|
-
8. Finally, update documentation:
|
|
400
|
-
Update: .specweave/docs/internal/architecture/api.md (add WebSocket endpoints)
|
|
401
|
-
|
|
402
|
-
9. Return to user:
|
|
403
|
-
✅ Increment 0004 implemented, tested, and documented
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
## Best Practices
|
|
407
270
|
|
|
408
|
-
|
|
271
|
+
## Pre-Installed Components
|
|
409
272
|
|
|
410
|
-
|
|
273
|
+
After `specweave init`, ALL components are in `.claude/`:
|
|
411
274
|
|
|
412
|
-
|
|
413
|
-
|
|
275
|
+
**10 Agents** (all ready to use):
|
|
276
|
+
- `pm` - Product Manager (requirements, user stories)
|
|
277
|
+
- `architect` - System Architect (design, ADRs)
|
|
278
|
+
- `security` - Security Engineer (threat modeling)
|
|
279
|
+
- `qa-lead` - QA Lead (test strategy)
|
|
280
|
+
- `devops` - DevOps Engineer (deployment)
|
|
281
|
+
- `tech-lead` - Technical Lead (code review)
|
|
282
|
+
- `sre` - SRE (incident response)
|
|
283
|
+
- `docs-writer` - Documentation writer
|
|
284
|
+
- `performance` - Performance optimization
|
|
285
|
+
- `diagrams-architect` - Diagram generation (C4 Model)
|
|
414
286
|
|
|
415
|
-
|
|
287
|
+
**35+ Skills** (all ready to use):
|
|
288
|
+
- Framework skills: `nextjs`, `nodejs-backend`, `python-backend`, `dotnet-backend`, `frontend`
|
|
289
|
+
- Integration skills: `jira-sync`, `ado-sync`, `github-sync`
|
|
290
|
+
- Utility skills: `diagrams-generator`, `figma-implementer`, `hetzner-provisioner`
|
|
291
|
+
- Quality skills: `increment-quality-judge`, `context-optimizer`
|
|
292
|
+
- ... and 25+ more!
|
|
416
293
|
|
|
417
|
-
|
|
418
|
-
```
|
|
294
|
+
## FAQ
|
|
419
295
|
|
|
420
|
-
###
|
|
296
|
+
### Q: Why don't I see ⏺ Skill(...) in the console?
|
|
421
297
|
|
|
422
|
-
|
|
298
|
+
**A**: SpecWeave skills don't activate proactively. You MUST use slash commands.
|
|
423
299
|
|
|
424
|
-
|
|
425
|
-
You want to "create and implement a payment feature".
|
|
300
|
+
**Correct**: `/pi "Feature description"` → ⏺ Skill(increment-planner)
|
|
426
301
|
|
|
427
|
-
|
|
428
|
-
1. Create Increment 0003 (increment-planner skill)
|
|
429
|
-
2. Load relevant specs (context-loader skill)
|
|
430
|
-
3. Implement code (nodejs-backend skill + security agent)
|
|
431
|
-
4. Generate tests (QA Lead agent)
|
|
432
|
-
5. Update documentation (Docs Writer agent)
|
|
302
|
+
**Incorrect**: "Build a feature" → No skill activation
|
|
433
303
|
|
|
434
|
-
|
|
304
|
+
### Q: When do I use slash commands vs regular conversation?
|
|
435
305
|
|
|
436
|
-
|
|
437
|
-
|
|
306
|
+
**Slash commands for SpecWeave operations**:
|
|
307
|
+
- Creating increments: `/pi`
|
|
308
|
+
- Managing increments: `/si`, `/done`, `/ls`
|
|
309
|
+
- Adding tasks: `/at`
|
|
310
|
+
- Validation: `/vi`
|
|
438
311
|
|
|
439
|
-
|
|
312
|
+
**Regular conversation for implementation**:
|
|
313
|
+
- Asking Claude to implement code
|
|
314
|
+
- Discussing architecture
|
|
315
|
+
- Debugging issues
|
|
316
|
+
- Reviewing code
|
|
440
317
|
|
|
441
|
-
|
|
318
|
+
**Example**:
|
|
319
|
+
```bash
|
|
320
|
+
# Use slash command to plan
|
|
321
|
+
$ /pi "Payment processing with Stripe"
|
|
322
|
+
✅ Increment 0003 created
|
|
442
323
|
|
|
324
|
+
# Then regular conversation to implement
|
|
325
|
+
User: "Let's implement the Stripe integration from plan.md"
|
|
326
|
+
Claude: [implements based on specifications]
|
|
443
327
|
```
|
|
444
|
-
I detected this is a SpecWeave project, but I'm not sure how to handle:
|
|
445
|
-
"What's the weather like?"
|
|
446
328
|
|
|
447
|
-
|
|
448
|
-
Would you like me to answer as regular Claude instead?
|
|
449
|
-
```
|
|
329
|
+
### Q: What if I forget to use a slash command?
|
|
450
330
|
|
|
451
|
-
|
|
331
|
+
**A**: Claude will implement directly without SpecWeave structure. Your project won't have:
|
|
332
|
+
- ❌ No increment folder
|
|
333
|
+
- ❌ No spec.md (requirements)
|
|
334
|
+
- ❌ No plan.md (architecture)
|
|
335
|
+
- ❌ No tests.md (test strategy)
|
|
336
|
+
- ❌ No traceability
|
|
452
337
|
|
|
453
|
-
|
|
338
|
+
**Solution**: Use `/pi` first, THEN implement.
|
|
454
339
|
|
|
455
|
-
|
|
456
|
-
// Log for analysis
|
|
457
|
-
logRoutingDecision({
|
|
458
|
-
userInput: "Add Stripe payments",
|
|
459
|
-
parsedRequest: "feature_creation + payments",
|
|
460
|
-
routedTo: "increment-planner",
|
|
461
|
-
wasCorrect: true, // User feedback
|
|
462
|
-
timestamp: Date.now()
|
|
463
|
-
});
|
|
464
|
-
```
|
|
340
|
+
### Q: Can I still use SpecWeave if I already started implementing?
|
|
465
341
|
|
|
466
|
-
|
|
342
|
+
**A**: Yes! Use brownfield workflow:
|
|
467
343
|
|
|
468
|
-
|
|
344
|
+
```bash
|
|
345
|
+
# Create increment retroactively
|
|
346
|
+
$ /pi "Document existing authentication implementation"
|
|
469
347
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
if (specweaveDetectorActive()) {
|
|
473
|
-
// Access loaded context
|
|
474
|
-
const context = getSpecWeaveContext();
|
|
475
|
-
// Use centralized routing
|
|
476
|
-
routeToSkill('context-loader', params);
|
|
477
|
-
}
|
|
348
|
+
# Claude will analyze existing code and create specs
|
|
349
|
+
✅ Increment 0001 created with retroactive documentation
|
|
478
350
|
```
|
|
479
351
|
|
|
480
352
|
## Testing
|
|
481
353
|
|
|
482
|
-
### TC-001:
|
|
483
|
-
- Given:
|
|
484
|
-
- When:
|
|
485
|
-
- Then:
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
-
|
|
490
|
-
-
|
|
491
|
-
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
-
|
|
496
|
-
-
|
|
497
|
-
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
- Given: User says "Help with auth"
|
|
501
|
-
- When: specweave-detector cannot determine clear request
|
|
502
|
-
- Then: Routes to skill-router for clarification
|
|
503
|
-
- And: Presents options to user
|
|
504
|
-
|
|
505
|
-
### TC-005: Graceful Degradation
|
|
506
|
-
- Given: SpecWeave project
|
|
507
|
-
- When: User asks non-development question ("What's for lunch?")
|
|
508
|
-
- Then: specweave-detector recognizes out-of-domain
|
|
509
|
-
- And: Falls back to regular Claude
|
|
354
|
+
### TC-001: Slash Command Creates Increment
|
|
355
|
+
- Given: User types `/pi "User authentication"`
|
|
356
|
+
- When: Slash command executes
|
|
357
|
+
- Then: increment-planner skill activates
|
|
358
|
+
- And: Creates `.specweave/increments/0001-user-authentication/`
|
|
359
|
+
- And: spec.md, plan.md, tasks.md, tests.md generated
|
|
360
|
+
|
|
361
|
+
### TC-002: No Slash Command = No Activation
|
|
362
|
+
- Given: User types "Build user authentication"
|
|
363
|
+
- When: Claude processes request
|
|
364
|
+
- Then: No SpecWeave skills activate
|
|
365
|
+
- And: Claude implements directly (no specs generated)
|
|
366
|
+
|
|
367
|
+
### TC-003: List Increments
|
|
368
|
+
- Given: Multiple increments exist
|
|
369
|
+
- When: User types `/ls`
|
|
370
|
+
- Then: Shows all increments with status
|
|
371
|
+
- And: Shows completion status (completed, in-progress, planned)
|
|
510
372
|
|
|
511
373
|
---
|
|
512
374
|
|
|
513
375
|
## Summary
|
|
514
376
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
-
|
|
519
|
-
-
|
|
520
|
-
-
|
|
521
|
-
-
|
|
377
|
+
**SpecWeave uses EXPLICIT SLASH COMMANDS** - no auto-activation!
|
|
378
|
+
|
|
379
|
+
**Essential commands**:
|
|
380
|
+
- `/pi` - Plan Product Increment (most important!)
|
|
381
|
+
- `/si` - Start increment
|
|
382
|
+
- `/done` - Close increment
|
|
383
|
+
- `/ls` - List increments
|
|
522
384
|
|
|
523
|
-
**
|
|
385
|
+
**Workflow**:
|
|
386
|
+
1. Init: `npx specweave init`
|
|
387
|
+
2. Plan: `/pi "Feature"`
|
|
388
|
+
3. Validate: `/vi 0001 --quality`
|
|
389
|
+
4. Start: `/si 0001`
|
|
390
|
+
5. Implement: Regular conversation
|
|
391
|
+
6. Close: `/done 0001`
|
|
524
392
|
|
|
525
|
-
**
|
|
393
|
+
**Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
|
|
@@ -6,17 +6,24 @@ This project uses **SpecWeave** - a specification-first AI development framework
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## 🔷 SpecWeave
|
|
9
|
+
## 🔷 Using SpecWeave with Slash Commands
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**CRITICAL**: This project uses SpecWeave - **USE SLASH COMMANDS to activate the framework!**
|
|
12
12
|
|
|
13
|
-
**
|
|
14
|
-
1. ✅ All development requests route through `specweave-detector` skill
|
|
15
|
-
2. ✅ Agents activate automatically based on task (PM, Architect, DevOps, etc.)
|
|
16
|
-
3. ✅ Context loaded selectively via manifests (70%+ token reduction)
|
|
17
|
-
4. ✅ Tech stack detected automatically
|
|
13
|
+
SpecWeave uses **EXPLICIT SLASH COMMANDS** - no auto-activation, no proactive detection.
|
|
18
14
|
|
|
19
|
-
**
|
|
15
|
+
**How to use**:
|
|
16
|
+
1. ✅ **Use `/pi "feature description"`** to create a new increment (Plan Product Increment)
|
|
17
|
+
2. ✅ **Use `/si 0001`** to start working on an increment
|
|
18
|
+
3. ✅ **Use `/done 0001`** to close an increment
|
|
19
|
+
4. ✅ **Regular conversation** for implementation after planning
|
|
20
|
+
|
|
21
|
+
**Why slash commands?**
|
|
22
|
+
- Auto-activation doesn't work reliably in Claude Code
|
|
23
|
+
- Explicit commands ensure SpecWeave ALWAYS activates when you want it
|
|
24
|
+
- Short aliases (`/pi`, `/si`, `/done`) save keystrokes
|
|
25
|
+
|
|
26
|
+
**See**: Full command list below in "Quick Commands" section
|
|
20
27
|
|
|
21
28
|
---
|
|
22
29
|
|
|
@@ -153,13 +160,23 @@ project-root/
|
|
|
153
160
|
|
|
154
161
|
---
|
|
155
162
|
|
|
156
|
-
## Quick Commands
|
|
163
|
+
## Quick Commands (SLASH COMMANDS - Use These!)
|
|
164
|
+
|
|
165
|
+
**IMPORTANT**: SpecWeave uses **EXPLICIT SLASH COMMANDS**. Type these commands to activate the framework.
|
|
157
166
|
|
|
158
|
-
| Command | Purpose | Example |
|
|
159
|
-
|
|
160
|
-
| `/create-increment` |
|
|
161
|
-
| `/
|
|
162
|
-
| `/
|
|
167
|
+
| Command | Alias | Purpose | Example |
|
|
168
|
+
|---------|-------|---------|---------|
|
|
169
|
+
| `/create-increment` | `/pi` | **Plan Product Increment** (create new feature) | `/pi "user auth"` |
|
|
170
|
+
| `/start-increment` | `/si` | Start working on increment | `/si 0001` |
|
|
171
|
+
| `/add-tasks` | `/at` | Add tasks to increment | `/at 0001 "add tests"` |
|
|
172
|
+
| `/validate-increment` | `/vi` | Validate increment quality | `/vi 0001 --quality` |
|
|
173
|
+
| `/close-increment` | `/done` | Close increment | `/done 0001` |
|
|
174
|
+
| `/list-increments` | `/ls` | List all increments | `/ls` |
|
|
175
|
+
| `/review-docs` | - | Review docs vs code | `/review-docs --increment=003` |
|
|
176
|
+
| `/sync-github` | - | Sync to GitHub issues | `/sync-github` |
|
|
177
|
+
|
|
178
|
+
**💡 Pro Tip**: Use short aliases (`/pi`, `/si`, `/done`) for speed!
|
|
179
|
+
- **PI** = Product Increment (standard Agile terminology)
|
|
163
180
|
|
|
164
181
|
**All commands adapt to your tech stack automatically**
|
|
165
182
|
|
|
@@ -167,9 +184,15 @@ project-root/
|
|
|
167
184
|
|
|
168
185
|
## Working with Increments
|
|
169
186
|
|
|
170
|
-
### Create New Feature
|
|
187
|
+
### Create New Feature (ALWAYS use slash command!)
|
|
188
|
+
|
|
189
|
+
**CRITICAL**: Use `/pi` (or `/create-increment`) to create new features:
|
|
171
190
|
|
|
172
191
|
```bash
|
|
192
|
+
# Short form (recommended)
|
|
193
|
+
/pi "feature description"
|
|
194
|
+
|
|
195
|
+
# Full form
|
|
173
196
|
/create-increment "feature description"
|
|
174
197
|
```
|
|
175
198
|
|
|
@@ -181,6 +204,10 @@ project-root/
|
|
|
181
204
|
- tests.md (Test strategy - QA Lead agent)
|
|
182
205
|
- context-manifest.yaml (Selective loading)
|
|
183
206
|
|
|
207
|
+
**Workflow**:
|
|
208
|
+
1. Use `/pi "feature"` to plan → SpecWeave creates specs
|
|
209
|
+
2. Then regular conversation to implement → Claude implements code
|
|
210
|
+
|
|
184
211
|
### Status Progression
|
|
185
212
|
|
|
186
213
|
```
|
|
@@ -223,8 +250,8 @@ backlog → planned → in-progress → completed → closed
|
|
|
223
250
|
|
|
224
251
|
| Skill | Purpose | Activates When |
|
|
225
252
|
|-------|---------|----------------|
|
|
226
|
-
| `specweave-detector` |
|
|
227
|
-
| `increment-planner` | Plan increments/features |
|
|
253
|
+
| `specweave-detector` | Slash command documentation | User asks about SpecWeave commands |
|
|
254
|
+
| `increment-planner` | Plan increments/features | `/pi` or `/create-increment` command |
|
|
228
255
|
| `context-loader` | Load context selectively | Working on increments |
|
|
229
256
|
| `skill-router` | Route to appropriate skill | Ambiguous requests |
|
|
230
257
|
|
|
@@ -372,14 +399,27 @@ max_context_tokens: 10000
|
|
|
372
399
|
|
|
373
400
|
## Quick Start
|
|
374
401
|
|
|
402
|
+
**CRITICAL**: SpecWeave uses **EXPLICIT SLASH COMMANDS** - type `/pi` to activate!
|
|
403
|
+
|
|
375
404
|
**Create your first feature**:
|
|
376
405
|
```bash
|
|
406
|
+
# Use short alias (recommended)
|
|
407
|
+
/pi "your feature description"
|
|
408
|
+
|
|
409
|
+
# Or full command
|
|
377
410
|
/create-increment "your feature description"
|
|
378
411
|
```
|
|
379
412
|
|
|
380
|
-
**
|
|
413
|
+
**Typical Workflow**:
|
|
414
|
+
1. `/pi "feature"` → SpecWeave creates specs (spec.md, plan.md, tasks.md)
|
|
415
|
+
2. Regular conversation → Claude implements the code
|
|
416
|
+
3. `/done 0001` → Close increment when complete
|
|
417
|
+
|
|
418
|
+
**Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits.
|
|
419
|
+
|
|
420
|
+
**Need help?**: Type `/pi` to see examples, or ask about specific workflows.
|
|
381
421
|
|
|
382
|
-
**SpecWeave Documentation**: https://
|
|
422
|
+
**SpecWeave Documentation**: https://spec-weave.com
|
|
383
423
|
|
|
384
424
|
---
|
|
385
425
|
|