sdd-pipeline 1.2.7 → 1.2.9
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
CHANGED
|
@@ -1,376 +1,343 @@
|
|
|
1
|
-
# XDM Method — Spec-Driven Development Pipeline
|
|
2
|
-
|
|
3
|
-
**Spec-Driven Development pipeline for Claude Code CLI.** Transforms raw feature requests into validated, shipped code through a self-correcting converge loop.
|
|
4
|
-
|
|
5
|
-
## Quick Start
|
|
6
|
-
|
|
7
|
-
```powershell
|
|
8
|
-
# 1. Install globally (once)
|
|
9
|
-
npm install -g sdd-pipeline
|
|
10
|
-
|
|
11
|
-
# 2. Navigate to your project
|
|
12
|
-
cd my-project
|
|
13
|
-
|
|
14
|
-
# 3. Initialize pipeline
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
# 4. Start with a feature (interactive 9-question interview)
|
|
18
|
-
claude "/sdd-bmad landing page for my SaaS"
|
|
19
|
-
|
|
20
|
-
# 5. Use Claude Code for full pipeline
|
|
21
|
-
claude "/sdd-spec" # Generate SPEC.md
|
|
22
|
-
claude "/sdd-tasks" # Generate tasks
|
|
23
|
-
claude "/sdd-cook"
|
|
24
|
-
|
|
25
|
-
# 6. Validate
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
> **Important:**
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## Output Directory Structure
|
|
34
|
-
|
|
35
|
-
All generated artifacts are organized in the `sdd/` directory (v1.1.0+):
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
project/
|
|
39
|
-
├── sdd/ # All generated artifacts
|
|
40
|
-
│ ├── brief.md
|
|
41
|
-
│ ├── SPEC.md
|
|
42
|
-
│ ├──
|
|
43
|
-
│
|
|
44
|
-
│ │
|
|
45
|
-
│ │
|
|
46
|
-
│
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
├── claude "/sdd-spec"
|
|
70
|
-
├── claude "/sdd-tasks"
|
|
71
|
-
├── claude "/sdd-cook"
|
|
72
|
-
│
|
|
73
|
-
└── claude "/sdd-converge"
|
|
74
|
-
│
|
|
75
|
-
├── PASS → Merge / Deploy
|
|
76
|
-
└── FAIL → Fix → Re-enter
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
| Phase | Command | Output | Gate |
|
|
80
|
-
|-------|---------|--------|------|
|
|
81
|
-
| 0 | `
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
| `
|
|
97
|
-
| `
|
|
98
|
-
| `claude "/sdd-
|
|
99
|
-
| `claude "/sdd-
|
|
100
|
-
| `claude "/sdd-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
|
107
|
-
|
|
108
|
-
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
sdd
|
|
116
|
-
sdd
|
|
117
|
-
|
|
118
|
-
#
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
claude "/sdd-cook --task T-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
#
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
claude "/sdd-
|
|
163
|
-
claude "/sdd-
|
|
164
|
-
claude "/sdd-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
#
|
|
175
|
-
# ✅ SC-
|
|
176
|
-
#
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
| `claude "/sdd-spec"` |
|
|
192
|
-
| `claude "/sdd-
|
|
193
|
-
| `claude "/sdd-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
| 20
|
|
205
|
-
|
|
|
206
|
-
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
-
|
|
221
|
-
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
├──
|
|
227
|
-
├── T-
|
|
228
|
-
├── T-
|
|
229
|
-
└── ...
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
|
263
|
-
|
|
264
|
-
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
├──
|
|
281
|
-
├──
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
├──
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
| Field | Value |
|
|
345
|
-
|-------|-------|
|
|
346
|
-
| Name | `sdd-pipeline` |
|
|
347
|
-
| Version | `1.1.0` |
|
|
348
|
-
| Registry | npmjs.com |
|
|
349
|
-
| CLI command | `sdd` |
|
|
350
|
-
| Claude Code command | `/sdd` |
|
|
351
|
-
| Install | `npm install -g sdd-pipeline` |
|
|
352
|
-
|
|
353
|
-
---
|
|
354
|
-
|
|
355
|
-
## Key Features
|
|
356
|
-
|
|
357
|
-
- **Phase gates** — `/sdd spec` fails if BMAD-brief.md missing — no bypass
|
|
358
|
-
- **Confidence scoring** — BMAD quantifies spec readiness before implementation
|
|
359
|
-
- **Problem-first** — Solution→problem inversion surfaces actual user needs
|
|
360
|
-
- **Self-correcting converge** — Loop back to appropriate phase on failure
|
|
361
|
-
- **Domain extensions** — API, frontend, backend — set via config
|
|
362
|
-
- **SSRF protection** — URL validation blocks private IPs, localhost
|
|
363
|
-
- **GitHub Actions CI** — Runs converge on push/PR, creates Issue on failure
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Documentation
|
|
368
|
-
|
|
369
|
-
| Document | Purpose |
|
|
370
|
-
|----------|---------|
|
|
371
|
-
| `docs/project-overview-pdr.md` | Project overview, problem statement, solution |
|
|
372
|
-
| `docs/system-architecture.md` | System architecture, component map, CI/CD flow |
|
|
373
|
-
| `docs/spec-pipeline-synthesis.md` | Full pipeline specification (1,200+ lines) |
|
|
374
|
-
| `docs/codebase-summary.md` | Codebase overview, file inventory, key contracts |
|
|
375
|
-
| `docs/deployment-guide.md` | Deployment instructions |
|
|
376
|
-
| `docs/project-roadmap.md` | Future plans |
|
|
1
|
+
# XDM Method — Spec-Driven Development Pipeline
|
|
2
|
+
|
|
3
|
+
**Spec-Driven Development pipeline for Claude Code CLI.** Transforms raw feature requests into validated, shipped code through a self-correcting converge loop.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```powershell
|
|
8
|
+
# 1. Install globally (once)
|
|
9
|
+
npm install -g sdd-pipeline
|
|
10
|
+
|
|
11
|
+
# 2. Navigate to your project
|
|
12
|
+
cd my-project
|
|
13
|
+
|
|
14
|
+
# 3. Initialize pipeline
|
|
15
|
+
sdd init
|
|
16
|
+
|
|
17
|
+
# 4. Start with a feature (interactive 9-question interview)
|
|
18
|
+
claude "/sdd-bmad landing page for my SaaS"
|
|
19
|
+
|
|
20
|
+
# 5. Use Claude Code for full pipeline
|
|
21
|
+
claude "/sdd-spec" # Generate SPEC.md
|
|
22
|
+
claude "/sdd-tasks" # Generate tasks
|
|
23
|
+
claude "/sdd-cook" # Implement tasks
|
|
24
|
+
|
|
25
|
+
# 6. Validate
|
|
26
|
+
claude "/sdd-converge"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
> **Important:** Use `claude "/sdd-<cmd>"` format for interactive commands (BMAD interview, SPEC generation, TASKS, COOK, CONVERGE).
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Output Directory Structure
|
|
34
|
+
|
|
35
|
+
All generated artifacts are organized in the `sdd/` directory (v1.1.0+):
|
|
36
|
+
|
|
37
|
+
```
|
|
38
|
+
project/
|
|
39
|
+
├── sdd/ # All generated artifacts
|
|
40
|
+
│ ├── brief.md # Phase 0: BMAD brief
|
|
41
|
+
│ ├── SPEC.md # Phase 2: Specification
|
|
42
|
+
│ ├── tasks/ # Phase 3: Task directories
|
|
43
|
+
│ │ └── task-260830-1200-feature/
|
|
44
|
+
│ │ ├── MASTER-TASKS.md
|
|
45
|
+
│ │ └── T-001-*.md
|
|
46
|
+
│ └── converge/ # Phase 5: Validation reports
|
|
47
|
+
├── .sdd/config.json # Pipeline state & config
|
|
48
|
+
├── skills/ # Implementation skills (Phase 4)
|
|
49
|
+
├── templates/ # SDD templates
|
|
50
|
+
└── .claude/commands/ # Claude Code commands
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Key features:**
|
|
54
|
+
- All artifacts in one place (`sdd/`)
|
|
55
|
+
- Skills directory for implementation guidance
|
|
56
|
+
- Easy cleanup: delete `sdd/` to reset
|
|
57
|
+
- Configurable via `.sdd/config.json`
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Pipeline Phases
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Raw Idea
|
|
65
|
+
│
|
|
66
|
+
├── sdd bmad "idea" → sdd/brief.md (Phase 0)
|
|
67
|
+
├── claude "/sdd-bmad" → Interactive 9-Q interview
|
|
68
|
+
│
|
|
69
|
+
├── claude "/sdd-spec" → sdd/SPEC.md (Phase 2)
|
|
70
|
+
├── claude "/sdd-tasks" → sdd/tasks/ (Phase 3)
|
|
71
|
+
├── claude "/sdd-cook" → Implementation (Phase 4)
|
|
72
|
+
│
|
|
73
|
+
└── claude "/sdd-converge" → sdd/converge/ (Phase 5)
|
|
74
|
+
│
|
|
75
|
+
├── PASS → Merge / Deploy
|
|
76
|
+
└── FAIL → Fix → Re-enter
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Phase | Command | Output | Gate |
|
|
80
|
+
|-------|---------|--------|------|
|
|
81
|
+
| 0 | `sdd bmad "idea"` | `sdd/brief.md` | None |
|
|
82
|
+
| 0 | `claude "/sdd-bmad"` | `sdd/brief.md` (interactive) | None |
|
|
83
|
+
| 2 | `claude "/sdd-spec"` | `sdd/SPEC.md` | Requires `sdd/brief.md` + confidence ≥20 |
|
|
84
|
+
| 3 | `claude "/sdd-tasks"` | `sdd/tasks/task-*/` | Requires `sdd/SPEC.md` |
|
|
85
|
+
| 4 | `claude "/sdd-cook"` | Code | Requires task files |
|
|
86
|
+
| 5 | `claude "/sdd-converge"` | `sdd/converge/` | All phases |
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Commands Reference
|
|
91
|
+
|
|
92
|
+
### Core Pipeline Commands
|
|
93
|
+
|
|
94
|
+
| Command | Phase | Output | Description |
|
|
95
|
+
|---------|-------|--------|-------------|
|
|
96
|
+
| `sdd init` | — | `.sdd/`, `templates/`, `sdd/`, `skills/` | Initialize SDD pipeline. Run once per project. |
|
|
97
|
+
| `sdd bmad <desc>` | 0 | `sdd/brief.md` | Fast mode brief (low confidence). |
|
|
98
|
+
| `claude "/sdd-bmad <desc>"` | 0 | `sdd/brief.md` | Interactive 9-question brainstorm. Generates confidence-scored brief. |
|
|
99
|
+
| `claude "/sdd-spec"` | 2 | `sdd/SPEC.md` | Generate SPEC.md from brief. Validates confidence ≥20/100. |
|
|
100
|
+
| `claude "/sdd-tasks"` | 3 | `sdd/tasks/task-*/` | Break SPEC.md into tasks (≤2 hours each). |
|
|
101
|
+
| `claude "/sdd-cook [--all\|--task T-XXX]"` | 4 | Code | Unified: execution plan + implementation guidance + status tracking. |
|
|
102
|
+
| `claude "/sdd-converge"` | 5 | `sdd/converge/` | Validate implementation. Self-correcting loop. |
|
|
103
|
+
|
|
104
|
+
### Utility Commands
|
|
105
|
+
|
|
106
|
+
| Command | Description |
|
|
107
|
+
|---------|-------------|
|
|
108
|
+
| `sdd status` | Show pipeline phase status. |
|
|
109
|
+
| `claude "/sdd check <file>"` | Real-time validation. Check file(s) against SPEC.md clauses. |
|
|
110
|
+
| `pwsh commands/sdd-task-status.ps1 -TaskId T-001 -Status completed` | Mark task complete. Updates MASTER-TASKS.md and frontmatter. |
|
|
111
|
+
|
|
112
|
+
### Shell CLI (npm global)
|
|
113
|
+
|
|
114
|
+
```powershell
|
|
115
|
+
sdd init # Initialize pipeline
|
|
116
|
+
sdd bmad <desc> # Fast mode brief (low confidence)
|
|
117
|
+
sdd status # Show pipeline status
|
|
118
|
+
sdd help # Show help
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Usage Examples
|
|
124
|
+
|
|
125
|
+
### Example 1: Landing Page
|
|
126
|
+
|
|
127
|
+
```powershell
|
|
128
|
+
cd my-saas-project
|
|
129
|
+
|
|
130
|
+
# Initialize
|
|
131
|
+
sdd init
|
|
132
|
+
|
|
133
|
+
# Start with feature description (interactive)
|
|
134
|
+
claude "/sdd-bmad landing page for my SaaS product"
|
|
135
|
+
|
|
136
|
+
# Generate SPEC.md
|
|
137
|
+
claude "/sdd-spec"
|
|
138
|
+
|
|
139
|
+
# Break into tasks
|
|
140
|
+
claude "/sdd-tasks"
|
|
141
|
+
|
|
142
|
+
# Implement all tasks (unified command)
|
|
143
|
+
claude "/sdd-cook --all"
|
|
144
|
+
|
|
145
|
+
# Or implement one by one
|
|
146
|
+
claude "/sdd-cook --task T-001"
|
|
147
|
+
claude "/sdd-cook --task T-002"
|
|
148
|
+
|
|
149
|
+
# Validate
|
|
150
|
+
claude "/sdd-converge"
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Example 2: API Feature
|
|
154
|
+
|
|
155
|
+
```powershell
|
|
156
|
+
cd my-api-project
|
|
157
|
+
sdd init
|
|
158
|
+
|
|
159
|
+
# Set domain to API
|
|
160
|
+
# Edit .sdd/config.json: set project.domain = "api"
|
|
161
|
+
|
|
162
|
+
claude "/sdd-bmad user authentication with JWT tokens"
|
|
163
|
+
claude "/sdd-spec"
|
|
164
|
+
claude "/sdd-tasks"
|
|
165
|
+
claude "/sdd-cook --all"
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Example 3: Real-Time Validation
|
|
169
|
+
|
|
170
|
+
```powershell
|
|
171
|
+
# During implementation, check your work
|
|
172
|
+
claude "/sdd check src/components/Button.tsx"
|
|
173
|
+
|
|
174
|
+
# Result:
|
|
175
|
+
# ✅ SC-001: "Start Free Trial" found
|
|
176
|
+
# ✅ SC-COLOR-001: #22c55e found
|
|
177
|
+
# ❌ SC-002: "Get Started" NOT FOUND
|
|
178
|
+
|
|
179
|
+
# Fix the issue, then continue
|
|
180
|
+
claude "/sdd-cook --task T-002"
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Phase Gates
|
|
186
|
+
|
|
187
|
+
Phase gates enforce deliberate progress:
|
|
188
|
+
|
|
189
|
+
| Command | Gate | If Missing |
|
|
190
|
+
|---------|------|------------|
|
|
191
|
+
| `claude "/sdd-spec"` | sdd/brief.md | ERROR: Run `claude "/sdd-bmad"` first. |
|
|
192
|
+
| `claude "/sdd-spec"` | Confidence ≥20 | WARNING: Spec may be incomplete. |
|
|
193
|
+
| `claude "/sdd-tasks"` | sdd/SPEC.md | ERROR: Run `claude "/sdd-spec"` first. |
|
|
194
|
+
| `claude "/sdd-converge"` | All artifacts | ERROR: Run full pipeline first. |
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## BMAD Confidence Score
|
|
199
|
+
|
|
200
|
+
BMAD calculates a 0-100 confidence score:
|
|
201
|
+
|
|
202
|
+
| Score | Level | Action |
|
|
203
|
+
|-------|-------|--------|
|
|
204
|
+
| <20 | None | BLOCKED. Re-run BMAD with more detail. |
|
|
205
|
+
| 20-49 | Weak | WARNING. Proceed with caution. |
|
|
206
|
+
| 50-69 | Medium | Acceptable. |
|
|
207
|
+
| ≥70 | Strong | Full confidence. |
|
|
208
|
+
|
|
209
|
+
**Scoring factors:**
|
|
210
|
+
- Input quality (0-30 pts) — more detail = higher
|
|
211
|
+
- Interview completion (0-30 pts) — more answers = higher
|
|
212
|
+
- Problem clarity (0-20 pts) — specific, measurable = higher
|
|
213
|
+
- Technical awareness (0-20 pts) — stack detail = higher
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Task Format
|
|
218
|
+
|
|
219
|
+
Each task in MASTER-TASKS.md:
|
|
220
|
+
- Takes ≤2 hours
|
|
221
|
+
- Independently verifiable
|
|
222
|
+
- Has frontmatter with `depends_on`, `spec_sections`
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
task-260830-1200-feature/
|
|
226
|
+
├── MASTER-TASKS.md # Task index, phases, status
|
|
227
|
+
├── T-001-*.md # Individual task files
|
|
228
|
+
├── T-002-*.md
|
|
229
|
+
└── ...
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
**Mark tasks complete:**
|
|
233
|
+
```powershell
|
|
234
|
+
pwsh commands/sdd-task-status.ps1 -TaskId T-001 -Status completed
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
|
|
239
|
+
## Extension System
|
|
240
|
+
|
|
241
|
+
Domain-specific templates via `.sdd/config.json`:
|
|
242
|
+
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"project": {
|
|
246
|
+
"domain": "frontend"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
| Domain | Adds |
|
|
252
|
+
|--------|------|
|
|
253
|
+
| `general` | Base pipeline |
|
|
254
|
+
| `api` | OpenAPI spec, endpoint validation |
|
|
255
|
+
| `frontend` | Design system prompts, UX checklist |
|
|
256
|
+
| `backend` | Data models, security requirements |
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Security
|
|
261
|
+
|
|
262
|
+
| Layer | Protection |
|
|
263
|
+
|-------|-----------|
|
|
264
|
+
| Input | Sanitize regex blocks prompt injection |
|
|
265
|
+
| URL | SSRF prevention — blocks private IPs |
|
|
266
|
+
| npm | `--ignore-scripts` on global installs |
|
|
267
|
+
| GitHub Actions | Least-privilege permissions |
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Architecture
|
|
272
|
+
|
|
273
|
+
```
|
|
274
|
+
Two Interfaces (same logic):
|
|
275
|
+
|
|
276
|
+
Shell CLI: sdd bmad "feature" → bin/sdd.cjs
|
|
277
|
+
Claude Code: /sdd bmad "feature" → .claude/commands/sdd.md
|
|
278
|
+
|
|
279
|
+
Pipeline files:
|
|
280
|
+
├── .sdd/config.json # Phase tracking
|
|
281
|
+
├── templates/ # SDD templates
|
|
282
|
+
├── skills/ # Implementation skills (Phase 4)
|
|
283
|
+
├── .claude/commands/ # Claude Code slash commands
|
|
284
|
+
├── commands/ # Standalone PowerShell scripts
|
|
285
|
+
├── run-converge.ps1 # Validation automation
|
|
286
|
+
└── extensions/ # Domain-specific (api/frontend/backend)
|
|
287
|
+
|
|
288
|
+
npm package (sdd-pipeline):
|
|
289
|
+
├── bin/sdd.cjs # CLI entry
|
|
290
|
+
├── lib/init.js # Extract pipeline
|
|
291
|
+
├── lib/bmad/ # BMAD orchestrator
|
|
292
|
+
└── lib/bundle/ # 70 pipeline files for distribution
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Requirements
|
|
298
|
+
|
|
299
|
+
- Windows 11 + PowerShell (primary)
|
|
300
|
+
- Git 2.52+
|
|
301
|
+
- Node.js 18+ + npm 9+
|
|
302
|
+
- Claude Code CLI (`npx @anthropic-ai/claude-code`)
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
## CI/CD
|
|
307
|
+
|
|
308
|
+
GitHub Actions workflow:
|
|
309
|
+
|
|
310
|
+
```yaml
|
|
311
|
+
on: [push, pull_request]
|
|
312
|
+
jobs:
|
|
313
|
+
converge:
|
|
314
|
+
runs-on: windows-latest
|
|
315
|
+
steps:
|
|
316
|
+
- uses: actions/checkout@v4
|
|
317
|
+
- run: pwsh run-converge.ps1 -Url '${{ env.DEV_URL }}' -Strict
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## npm Package
|
|
323
|
+
|
|
324
|
+
| Field | Value |
|
|
325
|
+
|-------|-------|
|
|
326
|
+
| Name | `sdd-pipeline` |
|
|
327
|
+
| Version | `1.2.7` |
|
|
328
|
+
| Registry | npmjs.com |
|
|
329
|
+
| CLI command | `sdd` |
|
|
330
|
+
| Claude Code command | `/sdd` |
|
|
331
|
+
| Install | `npm install -g sdd-pipeline` |
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
|
|
335
|
+
## Key Features
|
|
336
|
+
|
|
337
|
+
- **Phase gates** — Commands fail if prerequisites missing
|
|
338
|
+
- **Confidence scoring** — BMAD quantifies spec readiness
|
|
339
|
+
- **Problem-first** — Solution→problem inversion surfaces needs
|
|
340
|
+
- **Unified Phase 4** — `sdd-cook` handles planning + implementation
|
|
341
|
+
- **Domain extensions** — API, frontend, backend via config
|
|
342
|
+
- **SSRF protection** — URL validation blocks private IPs
|
|
343
|
+
- **GitHub Actions CI** — Runs converge on push/PR
|
|
@@ -92,12 +92,23 @@ Write-Host "[OK] Project: $projectName" -ForegroundColor Green
|
|
|
92
92
|
Write-Host "[OK] Features: $($features.Count)" -ForegroundColor Green
|
|
93
93
|
Write-Host "[OK] Test categories: $($testCategories -join ', ')" -ForegroundColor Green
|
|
94
94
|
|
|
95
|
-
# Create task directory
|
|
95
|
+
# Create task directory (check for existing first)
|
|
96
96
|
$timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
|
|
97
97
|
$safeName = $projectName -replace '[^a-zA-Z0-9]', '-' -replace '-+', '-'
|
|
98
98
|
$taskDir = "$SDD_TASKS_DIR/task-$timestamp-$safeName"
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
|
|
100
|
+
# Check for existing task directories for this project
|
|
101
|
+
$existingDirs = Get-ChildItem -Path $SDD_TASKS_DIR -Filter "task-*-${safeName}" -Directory -ErrorAction SilentlyContinue
|
|
102
|
+
if ($existingDirs) {
|
|
103
|
+
$existingDir = $existingDirs[0].FullName
|
|
104
|
+
Write-Host ""
|
|
105
|
+
Write-Host "[WARN] Task directory already exists: $existingDir" -ForegroundColor Yellow
|
|
106
|
+
Write-Host "[INFO] Using existing directory" -ForegroundColor Cyan
|
|
107
|
+
$taskDir = $existingDir
|
|
108
|
+
} else {
|
|
109
|
+
New-Item -ItemType Directory -Path $taskDir -Force | Out-Null
|
|
110
|
+
Write-Host "[OK] Created: $taskDir" -ForegroundColor Green
|
|
111
|
+
}
|
|
101
112
|
|
|
102
113
|
# Generate tasks
|
|
103
114
|
$tasks = @()
|
|
@@ -182,39 +193,69 @@ Auto-generated by SDD Pipeline v1.2.2
|
|
|
182
193
|
Set-Content -Path "$taskDir/MASTER-TASKS.md" -Value $masterContent -Encoding UTF8
|
|
183
194
|
Write-Host " [CREATED] MASTER-TASKS.md" -ForegroundColor Gray
|
|
184
195
|
|
|
185
|
-
# Generate individual task files
|
|
196
|
+
# Generate individual task files with SPEC details
|
|
186
197
|
$taskNum = 1
|
|
187
198
|
foreach ($task in $tasks) {
|
|
188
199
|
$safeName = $task.Name -replace '[^a-zA-Z0-9]', '-' -replace '-+', '-'
|
|
189
200
|
$filename = "$($task.Id)-$safeName.md"
|
|
190
201
|
|
|
202
|
+
# Extract feature content if available
|
|
203
|
+
$featureContent = ""
|
|
204
|
+
$specSection = "4.1"
|
|
205
|
+
$extractedClauses = @()
|
|
206
|
+
|
|
207
|
+
if ($task.Name -eq "Project Setup") {
|
|
208
|
+
# Setup task - extract colors and dimensions from SPEC
|
|
209
|
+
$colors = @()
|
|
210
|
+
if ($specContent -match '(?s)## 3\.2.*?Colors(.+?)(?=##|\Z)') {
|
|
211
|
+
$colorMatches = [regex]::Matches($Matches[1], '`([^`]+)`')
|
|
212
|
+
foreach ($m in $colorMatches) {
|
|
213
|
+
$colors += $m.Groups[1].Value
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
$featureContent = "## Files to Create`n`n"
|
|
217
|
+
$featureContent += "- `index.html` — Main calculator page`n"
|
|
218
|
+
$featureContent += "- `styles.css` — Calculator styling`n"
|
|
219
|
+
$featureContent += "- `app.js` — Calculator logic`n`n"
|
|
220
|
+
$featureContent += "## Implementation Steps`n`n"
|
|
221
|
+
$featureContent += "1. Create `index.html` with calculator structure`n"
|
|
222
|
+
$featureContent += "2. Create `styles.css` with colors from SPEC §3.2`n"
|
|
223
|
+
$featureContent += "3. Create `app.js` with calculator state`n"
|
|
224
|
+
$specSection = "3.1, 3.2, 3.3, 6"
|
|
225
|
+
} else {
|
|
226
|
+
# Feature tasks - extract from feature content
|
|
227
|
+
$featureContent = "## Files to Modify/Create`n`n"
|
|
228
|
+
$featureContent += "- `app.js` — Add calculator logic`n`n"
|
|
229
|
+
$featureContent += "## Implementation Steps`n`n"
|
|
230
|
+
$featureContent += "1. Read SPEC.md §4.1 for feature details`n"
|
|
231
|
+
$featureContent += "2. Implement the feature logic`n"
|
|
232
|
+
$featureContent += "3. Test with manual verification`n"
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
$dependsStr = ""
|
|
236
|
+
if ($task.DependsOn.Count -gt 0 -and $task.DependsOn[0]) {
|
|
237
|
+
$dependsStr = '"' + ($task.DependsOn -join '", "') + '"'
|
|
238
|
+
}
|
|
239
|
+
|
|
191
240
|
$taskContent = @"
|
|
192
241
|
---
|
|
193
242
|
name: $filename
|
|
194
243
|
description: "$($task.Name)"
|
|
195
244
|
phase: $($task.Phase)
|
|
196
245
|
estimate: 1h
|
|
197
|
-
spec_sections: ["
|
|
198
|
-
depends_on: [$
|
|
246
|
+
spec_sections: ["$specSection"]
|
|
247
|
+
depends_on: [$dependsStr]
|
|
199
248
|
---
|
|
200
249
|
|
|
201
250
|
# $($task.Id): $($task.Name)
|
|
202
251
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- [List files]
|
|
206
|
-
|
|
207
|
-
## Implementation Steps
|
|
208
|
-
|
|
209
|
-
1. [Step 1]
|
|
210
|
-
2. [Step 2]
|
|
211
|
-
3. [Step 3]
|
|
252
|
+
$featureContent
|
|
212
253
|
|
|
213
254
|
## Verification
|
|
214
255
|
|
|
215
|
-
- [ ]
|
|
216
|
-
- [ ]
|
|
217
|
-
- [ ]
|
|
256
|
+
- [ ] Implementation matches SPEC requirements
|
|
257
|
+
- [ ] No console errors
|
|
258
|
+
- [ ] Manual test passes
|
|
218
259
|
"@
|
|
219
260
|
|
|
220
261
|
Set-Content -Path "$taskDir/$filename" -Value $taskContent -Encoding UTF8
|
|
@@ -4,6 +4,23 @@ Standard patterns for spawning subagents during SDD task execution.
|
|
|
4
4
|
|
|
5
5
|
**IMPORTANT:** All subagent names listed here are verified to exist in the Claude Code environment.
|
|
6
6
|
|
|
7
|
+
## IMPORTANT: Claude Code Commands vs CLI Commands
|
|
8
|
+
|
|
9
|
+
**When running SDD pipeline commands in subagents, use Claude Code commands:**
|
|
10
|
+
```bash
|
|
11
|
+
# CORRECT
|
|
12
|
+
claude "/sdd-bmad simple calculator app..."
|
|
13
|
+
claude "/sdd-spec"
|
|
14
|
+
claude "/sdd-tasks"
|
|
15
|
+
claude "/sdd-cook --task T-001"
|
|
16
|
+
|
|
17
|
+
# WRONG
|
|
18
|
+
sdd bmad "simple calculator app..."
|
|
19
|
+
sdd spec
|
|
20
|
+
sdd tasks
|
|
21
|
+
sdd cook --task T-001
|
|
22
|
+
```
|
|
23
|
+
|
|
7
24
|
## Task Tool Pattern
|
|
8
25
|
|
|
9
26
|
```
|
|
@@ -2,6 +2,28 @@
|
|
|
2
2
|
|
|
3
3
|
Standard templates for spawning subagents during SDD task execution.
|
|
4
4
|
|
|
5
|
+
## IMPORTANT: Claude Code Commands vs CLI Commands
|
|
6
|
+
|
|
7
|
+
**When running SDD pipeline commands in subagents, use Claude Code commands:**
|
|
8
|
+
```bash
|
|
9
|
+
# CORRECT - Interactive mode with higher confidence
|
|
10
|
+
claude "/sdd-bmad simple calculator app..."
|
|
11
|
+
claude "/sdd-spec"
|
|
12
|
+
claude "/sdd-tasks"
|
|
13
|
+
claude "/sdd-cook --task T-001"
|
|
14
|
+
|
|
15
|
+
# WRONG - Fast CLI mode with lower confidence
|
|
16
|
+
sdd bmad "simple calculator app..."
|
|
17
|
+
sdd spec
|
|
18
|
+
sdd tasks
|
|
19
|
+
sdd cook --task T-001
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Why:** Claude Code commands run in interactive mode, which:
|
|
23
|
+
- Generates higher confidence briefs (50-100 vs 5-30)
|
|
24
|
+
- Provides better prompts for SPEC generation
|
|
25
|
+
- Enables the full 9-question BMAD interview
|
|
26
|
+
|
|
5
27
|
## Task Tool Pattern
|
|
6
28
|
|
|
7
29
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sdd-pipeline",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"description": "Spec-Driven Development pipeline for Claude Code CLI — transforms raw feature requests into validated, shipped code through a self-correcting converge loop",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|