specweave 0.1.5 → 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 +189 -255
- package/SPECWEAVE.md +95 -52
- package/package.json +1 -1
- package/src/commands/README.md +173 -0
- package/src/commands/at.md +114 -0
- package/src/commands/done.md +103 -0
- package/src/commands/init.md +123 -0
- package/src/commands/ls.md +100 -0
- package/src/commands/pi.md +65 -0
- package/src/commands/si.md +83 -0
- package/src/commands/vi.md +89 -0
- package/src/skills/specweave-detector/SKILL.md +270 -443
- package/src/templates/CLAUDE.md.template +59 -19
|
@@ -1,566 +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
|
|
15
|
-
2. Parses user requests
|
|
16
|
-
3. Routes to appropriate skills
|
|
17
|
-
4. Orchestrates nested skill calls
|
|
18
|
-
5. Manages context loading
|
|
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
|
-
activateSpecWeaveMode();
|
|
26
|
-
loadConfiguration();
|
|
16
|
+
## Available Slash Commands
|
|
27
17
|
|
|
28
|
-
|
|
29
|
-
await autoInstallComponents(userPrompt);
|
|
18
|
+
### Quick Reference Table
|
|
30
19
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
1. **User makes a request** (e.g., "Create Next.js authentication")
|
|
43
|
-
2. **Analyze user intent** - Extract keywords (Next.js, authentication)
|
|
44
|
-
3. **Map to required components**:
|
|
45
|
-
- "Next.js" → nextjs skill, nodejs-backend skill
|
|
46
|
-
- "authentication" → security agent
|
|
47
|
-
- "Create" → pm agent, architect agent
|
|
48
|
-
4. **Check if components installed** in `.claude/skills/` and `.claude/agents/`
|
|
49
|
-
5. **Auto-install missing components** from npm package (`node_modules/specweave/src/`)
|
|
50
|
-
6. **Proceed with routing** - now all needed components are available
|
|
51
|
-
|
|
52
|
-
### Keyword → Component Mapping
|
|
53
|
-
|
|
54
|
-
```typescript
|
|
55
|
-
// From src/utils/auto-install.ts
|
|
56
|
-
const COMPONENT_MAPPING = {
|
|
57
|
-
// Framework detection
|
|
58
|
-
'next.js': { skills: ['nextjs', 'nodejs-backend'], agents: [] },
|
|
59
|
-
'react': { skills: ['frontend'], agents: [] },
|
|
60
|
-
'fastapi': { skills: ['python-backend'], agents: [] },
|
|
61
|
-
'django': { skills: ['python-backend'], agents: [] },
|
|
62
|
-
'.net': { skills: ['dotnet-backend'], agents: [] },
|
|
63
|
-
|
|
64
|
-
// Feature detection
|
|
65
|
-
'authentication': { skills: ['nodejs-backend'], agents: ['security'] },
|
|
66
|
-
'auth': { skills: [], agents: ['security'] },
|
|
67
|
-
'oauth': { skills: [], agents: ['security'] },
|
|
68
|
-
'payment': { skills: ['stripe-integrator'], agents: ['security'] },
|
|
69
|
-
'stripe': { skills: ['stripe-integrator'], agents: ['security'] },
|
|
70
|
-
|
|
71
|
-
// Infrastructure detection
|
|
72
|
-
'deploy': { skills: [], agents: ['devops'] },
|
|
73
|
-
'hetzner': { skills: ['hetzner-provisioner'], agents: ['devops'] },
|
|
74
|
-
'aws': { skills: [], agents: ['devops'] },
|
|
75
|
-
|
|
76
|
-
// Testing detection
|
|
77
|
-
'test': { skills: [], agents: ['qa-lead'] },
|
|
78
|
-
'e2e': { skills: ['e2e-playwright'], agents: ['qa-lead'] },
|
|
79
|
-
'playwright': { skills: ['e2e-playwright'], agents: ['qa-lead'] },
|
|
80
|
-
|
|
81
|
-
// Design detection
|
|
82
|
-
'figma': { skills: ['figma-implementer', 'figma-designer'], agents: [] },
|
|
83
|
-
'design system': { skills: ['design-system-architect'], agents: [] },
|
|
84
|
-
|
|
85
|
-
// Integration detection
|
|
86
|
-
'jira': { skills: ['jira-sync'], agents: [] },
|
|
87
|
-
'github': { skills: ['github-sync'], agents: [] },
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
// Always include strategic agents for new features
|
|
91
|
-
if (prompt.includes('create') || prompt.includes('build')) {
|
|
92
|
-
agents.push('pm', 'architect');
|
|
93
|
-
}
|
|
94
|
-
```
|
|
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` |
|
|
95
30
|
|
|
96
|
-
###
|
|
31
|
+
### Command Details
|
|
97
32
|
|
|
98
|
-
|
|
99
|
-
```
|
|
100
|
-
User: "Create Next.js authentication with OAuth"
|
|
33
|
+
#### `/pi` or `/create-increment` - Plan Product Increment
|
|
101
34
|
|
|
102
|
-
|
|
35
|
+
**Most important command!** Creates a new increment with specifications.
|
|
103
36
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
✅ Installed security agent
|
|
108
|
-
✅ Installed pm agent
|
|
109
|
-
✅ Installed architect agent
|
|
37
|
+
```bash
|
|
38
|
+
# Short form (recommended)
|
|
39
|
+
/pi "User authentication with JWT and RBAC"
|
|
110
40
|
|
|
111
|
-
|
|
41
|
+
# Full form
|
|
42
|
+
/create-increment "User authentication with JWT and RBAC"
|
|
112
43
|
```
|
|
113
44
|
|
|
114
|
-
**
|
|
115
|
-
|
|
116
|
-
|
|
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)
|
|
117
51
|
|
|
118
|
-
|
|
119
|
-
(Components already installed, proceeding...)
|
|
52
|
+
#### `/si` or `/start-increment` - Start Working
|
|
120
53
|
|
|
121
|
-
|
|
122
|
-
```
|
|
54
|
+
Marks an increment as "in-progress".
|
|
123
55
|
|
|
124
|
-
|
|
56
|
+
```bash
|
|
57
|
+
/si 0001
|
|
125
58
|
```
|
|
126
|
-
User: "Create FastAPI backend with PostgreSQL"
|
|
127
59
|
|
|
128
|
-
|
|
60
|
+
#### `/at` or `/add-tasks` - Add Tasks
|
|
129
61
|
|
|
130
|
-
|
|
131
|
-
✅ Installed python-backend skill
|
|
132
|
-
✅ Installed pm agent
|
|
133
|
-
✅ Installed architect agent
|
|
62
|
+
Add additional tasks to an increment.
|
|
134
63
|
|
|
135
|
-
|
|
64
|
+
```bash
|
|
65
|
+
/at 0001 "Add password reset functionality"
|
|
66
|
+
/at 0001 "Add email verification"
|
|
136
67
|
```
|
|
137
68
|
|
|
138
|
-
|
|
69
|
+
#### `/vi` or `/validate-increment` - Validate Quality
|
|
139
70
|
|
|
140
|
-
|
|
71
|
+
Run validation checks on an increment.
|
|
141
72
|
|
|
142
|
-
```
|
|
143
|
-
#
|
|
144
|
-
|
|
73
|
+
```bash
|
|
74
|
+
# Rule-based validation only
|
|
75
|
+
/vi 0001
|
|
145
76
|
|
|
146
|
-
#
|
|
147
|
-
|
|
148
|
-
skills:
|
|
149
|
-
- nextjs
|
|
150
|
-
- nodejs-backend
|
|
151
|
-
- security
|
|
152
|
-
agents:
|
|
153
|
-
- pm
|
|
154
|
-
- architect
|
|
155
|
-
- security
|
|
77
|
+
# With AI quality assessment
|
|
78
|
+
/vi 0001 --quality
|
|
156
79
|
```
|
|
157
80
|
|
|
158
|
-
|
|
81
|
+
#### `/done` or `/close-increment` - Close Increment
|
|
159
82
|
|
|
160
|
-
|
|
83
|
+
Mark increment as completed.
|
|
161
84
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
2. **Copy component**: `src/skills/nextjs/` → `.claude/skills/nextjs/`
|
|
166
|
-
3. **Verify**: Check component has SKILL.md or AGENT.md
|
|
167
|
-
4. **Update config**: Add to `installed_components` list
|
|
168
|
-
5. **Continue routing**: Component now available for use
|
|
85
|
+
```bash
|
|
86
|
+
/done 0001
|
|
87
|
+
```
|
|
169
88
|
|
|
170
|
-
|
|
89
|
+
#### `/ls` or `/list-increments` - List All
|
|
171
90
|
|
|
172
|
-
|
|
173
|
-
- ✅ **Just-in-time** - only install what's actually needed
|
|
174
|
-
- ✅ **Automatic** - completely transparent to users
|
|
175
|
-
- ✅ **Intelligent** - understands intent from natural language
|
|
176
|
-
- ✅ **Efficient** - unused components never installed
|
|
91
|
+
Show all increments with status.
|
|
177
92
|
|
|
178
|
-
|
|
93
|
+
```bash
|
|
94
|
+
/ls
|
|
95
|
+
```
|
|
179
96
|
|
|
180
|
-
|
|
97
|
+
### Why Slash Commands?
|
|
181
98
|
|
|
182
|
-
|
|
183
|
-
1. Claude Code detects the directory
|
|
184
|
-
2. This skill loads proactively (no user action needed)
|
|
185
|
-
3. SpecWeave mode activates silently
|
|
186
|
-
4. User requests are automatically routed to appropriate skills
|
|
99
|
+
**Problem**: Auto-activation doesn't work reliably in Claude Code.
|
|
187
100
|
|
|
188
|
-
**
|
|
189
|
-
```
|
|
190
|
-
# User doesn't know SpecWeave is active
|
|
191
|
-
User: "I want to add payment processing"
|
|
192
|
-
|
|
193
|
-
# Behind the scenes:
|
|
194
|
-
# 1. specweave-detector intercepts request
|
|
195
|
-
# 2. Parses request: "add feature" + "payment processing"
|
|
196
|
-
# 3. Routes to: increment-planner skill
|
|
197
|
-
# 4. increment-planner creates Feature 002
|
|
198
|
-
# 5. Returns result to user
|
|
199
|
-
|
|
200
|
-
# User sees:
|
|
201
|
-
✅ Feature created: 002-payment-processing
|
|
202
|
-
```
|
|
101
|
+
**Solution**: Explicit slash commands (like spec-kit) ensure SpecWeave ALWAYS activates when you want it.
|
|
203
102
|
|
|
204
|
-
|
|
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)
|
|
205
108
|
|
|
206
|
-
|
|
109
|
+
## Typical Workflow
|
|
207
110
|
|
|
208
|
-
|
|
209
|
-
|-----------|--------|----------|
|
|
210
|
-
| "Plan a feature for..." | feature_planning | `increment-planner` |
|
|
211
|
-
| "Load context for..." | context_loading | `context-loader` |
|
|
212
|
-
| "Document this code..." | documentation | `docs-updater` |
|
|
213
|
-
| "Create a spec for..." | specification | `spec-author` |
|
|
214
|
-
| "Design architecture for..." | architecture | `architect` |
|
|
215
|
-
| "Implement feature 001" | development | `developer` |
|
|
216
|
-
| "Test this feature" | testing | `qa-engineer` |
|
|
111
|
+
### 1. Initialize Project
|
|
217
112
|
|
|
218
|
-
|
|
113
|
+
```bash
|
|
114
|
+
npx specweave init my-saas
|
|
115
|
+
cd my-saas
|
|
116
|
+
```
|
|
219
117
|
|
|
220
|
-
**
|
|
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
|
|
221
124
|
|
|
222
|
-
|
|
223
|
-
1. Create feature → `increment-planner`
|
|
224
|
-
2. Implement code → Load context via `context-loader`
|
|
225
|
-
3. Implement code → `developer`
|
|
226
|
-
4. Generate tests → `qa-engineer`
|
|
227
|
-
5. Update docs → `docs-updater`
|
|
125
|
+
### 2. Plan Your First Increment
|
|
228
126
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
↓
|
|
233
|
-
specweave-detector parses: CREATE + IMPLEMENT + FEATURE + PAYMENT
|
|
234
|
-
↓
|
|
235
|
-
Orchestrate nested skills:
|
|
236
|
-
↓
|
|
237
|
-
increment-planner: Create 003-payment-processing/
|
|
238
|
-
↓
|
|
239
|
-
context-loader: Load specs/modules/payments/**
|
|
240
|
-
↓
|
|
241
|
-
developer: Implement based on tasks.md
|
|
242
|
-
↓
|
|
243
|
-
qa-engineer: Generate test cases
|
|
244
|
-
↓
|
|
245
|
-
docs-updater: Update README, docs/
|
|
246
|
-
↓
|
|
247
|
-
Result: "✅ Feature 003 implemented and documented"
|
|
127
|
+
```bash
|
|
128
|
+
# Use short alias (recommended)
|
|
129
|
+
/pi "User authentication with JWT and RBAC"
|
|
248
130
|
```
|
|
249
131
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
When request is unclear:
|
|
132
|
+
**Creates**:
|
|
253
133
|
```
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
skill-router asks:
|
|
261
|
-
"What would you like to do with authentication?
|
|
262
|
-
1. Create a specification
|
|
263
|
-
2. Plan implementation
|
|
264
|
-
3. Implement code
|
|
265
|
-
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
|
|
266
140
|
```
|
|
267
141
|
|
|
268
|
-
|
|
142
|
+
### 3. Validate & Start
|
|
269
143
|
|
|
270
|
-
|
|
144
|
+
```bash
|
|
145
|
+
# Validate quality
|
|
146
|
+
/vi 0001 --quality
|
|
271
147
|
|
|
272
|
-
|
|
148
|
+
# Start working
|
|
149
|
+
/si 0001
|
|
150
|
+
```
|
|
273
151
|
|
|
274
|
-
|
|
275
|
-
// Detect active work
|
|
276
|
-
const activeIssue = detectActiveIssue(); // work/issues/###-xxx/
|
|
152
|
+
### 4. Add More Tasks (As Needed)
|
|
277
153
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
}
|
|
154
|
+
```bash
|
|
155
|
+
# As you discover new work
|
|
156
|
+
/at 0001 "Add password reset flow"
|
|
157
|
+
/at 0001 "Add 2FA support"
|
|
283
158
|
```
|
|
284
159
|
|
|
285
|
-
###
|
|
160
|
+
### 5. Close When Done
|
|
286
161
|
|
|
287
|
-
|
|
162
|
+
```bash
|
|
163
|
+
/done 0001
|
|
164
|
+
```
|
|
288
165
|
|
|
289
|
-
|
|
290
|
-
2. **Current feature** (referenced in git branch)
|
|
291
|
-
3. **User-specified** context
|
|
292
|
-
4. **Global** context (specs/overview.md, principles.md)
|
|
166
|
+
## Example Sessions
|
|
293
167
|
|
|
294
|
-
|
|
168
|
+
### Example 1: Real Estate Platform
|
|
295
169
|
|
|
296
|
-
|
|
170
|
+
```bash
|
|
171
|
+
# Initialize
|
|
172
|
+
$ npx specweave init real-estate-app
|
|
173
|
+
$ cd real-estate-app
|
|
297
174
|
|
|
298
|
-
|
|
175
|
+
# Plan increment with slash command
|
|
176
|
+
$ /pi "Real estate listing platform with search, images, admin dashboard. Node.js/Express, PostgreSQL, JWT auth"
|
|
299
177
|
|
|
300
|
-
|
|
301
|
-
User: "Create tests and update documentation"
|
|
302
|
-
↓
|
|
303
|
-
Parallel execution:
|
|
304
|
-
├─ qa-engineer: Generate tests
|
|
305
|
-
└─ docs-updater: Update docs
|
|
306
|
-
|
|
307
|
-
Wait for both to complete
|
|
308
|
-
↓
|
|
309
|
-
Result: "✅ Tests generated (15 test cases) and docs updated"
|
|
310
|
-
```
|
|
178
|
+
🔷 SpecWeave Active (/create-increment)
|
|
311
179
|
|
|
312
|
-
|
|
180
|
+
📝 Using increment-planner skill...
|
|
181
|
+
🤖 PM agent creating requirements...
|
|
182
|
+
🏗️ Architect agent designing system...
|
|
183
|
+
🛡️ Security agent reviewing authentication...
|
|
313
184
|
|
|
314
|
-
|
|
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)
|
|
315
190
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
Sequential execution:
|
|
320
|
-
1. increment-planner: Create plan (MUST complete first)
|
|
321
|
-
2. context-loader: Load relevant specs (uses plan output)
|
|
322
|
-
3. developer: Implement (uses loaded context)
|
|
323
|
-
|
|
324
|
-
Each step waits for previous to complete
|
|
325
|
-
```
|
|
191
|
+
# Validate
|
|
192
|
+
$ /vi 0001 --quality
|
|
193
|
+
✅ Quality score: 87/100 (GOOD)
|
|
326
194
|
|
|
327
|
-
|
|
195
|
+
# Start working
|
|
196
|
+
$ /si 0001
|
|
197
|
+
✅ Increment 0001 status → in-progress
|
|
328
198
|
|
|
329
|
-
|
|
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]
|
|
330
202
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
specweave-detector: Route to developer
|
|
335
|
-
↓
|
|
336
|
-
developer: ERROR - Feature 005 not found
|
|
337
|
-
↓
|
|
338
|
-
specweave-detector: Catch error, suggest:
|
|
339
|
-
"Feature 005 doesn't exist. Would you like to:
|
|
340
|
-
1. Create it first (increment-planner)
|
|
341
|
-
2. List existing features
|
|
342
|
-
3. Implement a different feature"
|
|
203
|
+
# Close when done
|
|
204
|
+
$ /done 0001
|
|
205
|
+
✅ Increment 0001 closed successfully
|
|
343
206
|
```
|
|
344
207
|
|
|
345
|
-
|
|
208
|
+
### Example 2: Next.js Authentication
|
|
346
209
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
# .specweave/config.yaml
|
|
351
|
-
principles:
|
|
352
|
-
auto_role_routing: true # Enable auto-routing
|
|
353
|
-
context_precision: true # Use context manifests
|
|
354
|
-
routing_accuracy_target: 0.90 # Accuracy threshold
|
|
210
|
+
```bash
|
|
211
|
+
# Short alias for speed
|
|
212
|
+
$ /pi "Next.js authentication with JWT, OAuth, RBAC"
|
|
355
213
|
|
|
356
|
-
|
|
357
|
-
install_location: "local" # Where skills are installed
|
|
358
|
-
auto_install: true # Auto-install missing skills
|
|
214
|
+
🔷 SpecWeave Active (/create-increment)
|
|
359
215
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
```
|
|
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...
|
|
365
220
|
|
|
366
|
-
|
|
221
|
+
✅ Increment 0002-nextjs-authentication created
|
|
367
222
|
|
|
368
|
-
|
|
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
|
|
369
227
|
|
|
370
|
-
|
|
228
|
+
# List all increments
|
|
229
|
+
$ /ls
|
|
371
230
|
|
|
231
|
+
Increments:
|
|
232
|
+
0001 real-estate-platform [completed] ✅
|
|
233
|
+
0002 nextjs-authentication [in-progress] 🚧
|
|
372
234
|
```
|
|
373
|
-
🔷 SpecWeave Active
|
|
374
235
|
|
|
375
|
-
|
|
376
|
-
```
|
|
236
|
+
### Example 3: Multi-Increment Project
|
|
377
237
|
|
|
378
|
-
|
|
238
|
+
```bash
|
|
239
|
+
# Create multiple increments
|
|
240
|
+
$ /pi "User authentication"
|
|
241
|
+
✅ Increment 0001 created
|
|
379
242
|
|
|
380
|
-
|
|
243
|
+
$ /pi "Real estate listings with search"
|
|
244
|
+
✅ Increment 0002 created
|
|
381
245
|
|
|
382
|
-
|
|
246
|
+
$ /pi "Admin dashboard"
|
|
247
|
+
✅ Increment 0003 created
|
|
383
248
|
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
SpecWeave Skills:
|
|
390
|
-
✅ increment-planner - Plan implementation features
|
|
391
|
-
✅ context-loader - Selective specification loading
|
|
392
|
-
✅ skill-router - Route ambiguous intents
|
|
393
|
-
📦 spec-author - Create specifications (install with: npx specweave install spec-author)
|
|
394
|
-
📦 architect - System design (install with: npx specweave install architect)
|
|
395
|
-
|
|
396
|
-
Custom Skills:
|
|
397
|
-
✅ newrelic-monitor - New Relic integration
|
|
398
|
-
✅ cqrs-implementer - CQRS pattern implementation
|
|
399
|
-
```
|
|
249
|
+
# Work on them in order
|
|
250
|
+
$ /si 0001
|
|
251
|
+
$ [implement authentication]
|
|
252
|
+
$ /done 0001
|
|
400
253
|
|
|
401
|
-
|
|
254
|
+
$ /si 0002
|
|
255
|
+
$ [implement listings]
|
|
256
|
+
$ /done 0002
|
|
402
257
|
|
|
403
|
-
|
|
258
|
+
$ /si 0003
|
|
259
|
+
$ [implement admin]
|
|
260
|
+
$ /done 0003
|
|
404
261
|
|
|
405
|
-
|
|
262
|
+
# Review what's been done
|
|
263
|
+
$ /ls
|
|
406
264
|
|
|
265
|
+
Increments:
|
|
266
|
+
0001 user-authentication [completed] ✅
|
|
267
|
+
0002 real-estate-listings [completed] ✅
|
|
268
|
+
0003 admin-dashboard [completed] ✅
|
|
407
269
|
```
|
|
408
|
-
1. Parse Request: BUILD + FEATURE + REAL_TIME_CHAT
|
|
409
|
-
Request: feature_creation + complex_feature
|
|
410
|
-
|
|
411
|
-
2. Route to increment-planner:
|
|
412
|
-
Input: "Real-time chat feature"
|
|
413
|
-
Output: features/004-realtime-chat/
|
|
414
|
-
- spec.md (5 user stories)
|
|
415
|
-
- plan.md (WebSocket architecture)
|
|
416
|
-
- tasks.md (78 tasks)
|
|
417
|
-
- tests.md (20 test cases)
|
|
418
|
-
|
|
419
|
-
3. Detect next request: User likely wants to implement
|
|
420
|
-
Prompt: "Feature 004 created. Would you like to:
|
|
421
|
-
1. Review the plan
|
|
422
|
-
2. Start implementation
|
|
423
|
-
3. Load context for this feature"
|
|
424
|
-
|
|
425
|
-
4. User chooses 2 (Start implementation)
|
|
426
|
-
|
|
427
|
-
5. Route to context-loader:
|
|
428
|
-
Load: features/004-realtime-chat/context-manifest.yaml
|
|
429
|
-
Output: Loaded specs/modules/realtime/**, architecture/websockets.md
|
|
430
|
-
|
|
431
|
-
6. Route to developer:
|
|
432
|
-
Input: features/004-realtime-chat/tasks.md
|
|
433
|
-
Context: Loaded specs
|
|
434
|
-
Output: Implement Phase 1 (Setup WebSocket server)
|
|
435
|
-
|
|
436
|
-
7. After implementation, route to qa-engineer:
|
|
437
|
-
Input: features/004-realtime-chat/tests.md
|
|
438
|
-
Output: Generate test suite
|
|
439
|
-
|
|
440
|
-
8. Finally, route to docs-updater:
|
|
441
|
-
Update: docs/reference/api.md (add WebSocket endpoints)
|
|
442
|
-
|
|
443
|
-
9. Return to user:
|
|
444
|
-
✅ Feature 004 implemented, tested, and documented
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
## Best Practices
|
|
448
270
|
|
|
449
|
-
|
|
271
|
+
## Pre-Installed Components
|
|
450
272
|
|
|
451
|
-
|
|
273
|
+
After `specweave init`, ALL components are in `.claude/`:
|
|
452
274
|
|
|
453
|
-
|
|
454
|
-
|
|
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)
|
|
455
286
|
|
|
456
|
-
|
|
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!
|
|
457
293
|
|
|
458
|
-
|
|
459
|
-
```
|
|
294
|
+
## FAQ
|
|
460
295
|
|
|
461
|
-
###
|
|
296
|
+
### Q: Why don't I see ⏺ Skill(...) in the console?
|
|
462
297
|
|
|
463
|
-
|
|
298
|
+
**A**: SpecWeave skills don't activate proactively. You MUST use slash commands.
|
|
464
299
|
|
|
465
|
-
|
|
466
|
-
You want to "create and implement a payment feature".
|
|
300
|
+
**Correct**: `/pi "Feature description"` → ⏺ Skill(increment-planner)
|
|
467
301
|
|
|
468
|
-
|
|
469
|
-
1. Create Feature 003 (increment-planner)
|
|
470
|
-
2. Load relevant specs (context-loader)
|
|
471
|
-
3. Implement code (developer)
|
|
472
|
-
4. Generate tests (qa-engineer)
|
|
473
|
-
5. Update documentation (docs-updater)
|
|
302
|
+
**Incorrect**: "Build a feature" → No skill activation
|
|
474
303
|
|
|
475
|
-
|
|
304
|
+
### Q: When do I use slash commands vs regular conversation?
|
|
476
305
|
|
|
477
|
-
|
|
478
|
-
|
|
306
|
+
**Slash commands for SpecWeave operations**:
|
|
307
|
+
- Creating increments: `/pi`
|
|
308
|
+
- Managing increments: `/si`, `/done`, `/ls`
|
|
309
|
+
- Adding tasks: `/at`
|
|
310
|
+
- Validation: `/vi`
|
|
479
311
|
|
|
480
|
-
|
|
312
|
+
**Regular conversation for implementation**:
|
|
313
|
+
- Asking Claude to implement code
|
|
314
|
+
- Discussing architecture
|
|
315
|
+
- Debugging issues
|
|
316
|
+
- Reviewing code
|
|
481
317
|
|
|
482
|
-
|
|
318
|
+
**Example**:
|
|
319
|
+
```bash
|
|
320
|
+
# Use slash command to plan
|
|
321
|
+
$ /pi "Payment processing with Stripe"
|
|
322
|
+
✅ Increment 0003 created
|
|
483
323
|
|
|
324
|
+
# Then regular conversation to implement
|
|
325
|
+
User: "Let's implement the Stripe integration from plan.md"
|
|
326
|
+
Claude: [implements based on specifications]
|
|
484
327
|
```
|
|
485
|
-
I detected this is a SpecWeave project, but I'm not sure how to handle:
|
|
486
|
-
"What's the weather like?"
|
|
487
328
|
|
|
488
|
-
|
|
489
|
-
Would you like me to answer as regular Claude instead?
|
|
490
|
-
```
|
|
329
|
+
### Q: What if I forget to use a slash command?
|
|
491
330
|
|
|
492
|
-
|
|
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
|
|
493
337
|
|
|
494
|
-
|
|
338
|
+
**Solution**: Use `/pi` first, THEN implement.
|
|
495
339
|
|
|
496
|
-
|
|
497
|
-
// Log for analysis
|
|
498
|
-
logRoutingDecision({
|
|
499
|
-
userInput: "Add Stripe payments",
|
|
500
|
-
parsedRequest: "feature_creation + payments",
|
|
501
|
-
routedTo: "increment-planner",
|
|
502
|
-
wasCorrect: true, // User feedback
|
|
503
|
-
timestamp: Date.now()
|
|
504
|
-
});
|
|
505
|
-
```
|
|
340
|
+
### Q: Can I still use SpecWeave if I already started implementing?
|
|
506
341
|
|
|
507
|
-
|
|
342
|
+
**A**: Yes! Use brownfield workflow:
|
|
508
343
|
|
|
509
|
-
|
|
344
|
+
```bash
|
|
345
|
+
# Create increment retroactively
|
|
346
|
+
$ /pi "Document existing authentication implementation"
|
|
510
347
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
if (specweaveDetectorActive()) {
|
|
514
|
-
// Access loaded context
|
|
515
|
-
const context = getSpecWeaveContext();
|
|
516
|
-
// Use centralized routing
|
|
517
|
-
routeToSkill('context-loader', params);
|
|
518
|
-
}
|
|
348
|
+
# Claude will analyze existing code and create specs
|
|
349
|
+
✅ Increment 0001 created with retroactive documentation
|
|
519
350
|
```
|
|
520
351
|
|
|
521
352
|
## Testing
|
|
522
353
|
|
|
523
|
-
### TC-001:
|
|
524
|
-
- Given:
|
|
525
|
-
- When:
|
|
526
|
-
- Then:
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
-
|
|
531
|
-
-
|
|
532
|
-
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
-
|
|
537
|
-
-
|
|
538
|
-
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
- Given: User says "Help with auth"
|
|
542
|
-
- When: specweave-detector cannot determine clear request
|
|
543
|
-
- Then: Routes to skill-router for clarification
|
|
544
|
-
- And: Presents options to user
|
|
545
|
-
|
|
546
|
-
### TC-005: Graceful Degradation
|
|
547
|
-
- Given: SpecWeave project
|
|
548
|
-
- When: User asks non-development question ("What's for lunch?")
|
|
549
|
-
- Then: specweave-detector recognizes out-of-domain
|
|
550
|
-
- 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)
|
|
551
372
|
|
|
552
373
|
---
|
|
553
374
|
|
|
554
375
|
## Summary
|
|
555
376
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
-
|
|
560
|
-
-
|
|
561
|
-
-
|
|
562
|
-
-
|
|
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
|
|
563
384
|
|
|
564
|
-
**
|
|
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`
|
|
565
392
|
|
|
566
|
-
**
|
|
393
|
+
**Remember**: Type `/pi` first, THEN implement! Otherwise you lose all SpecWeave benefits (specs, architecture, test strategy).
|