sdd-pipeline 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,378 +1,376 @@
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
18
- sdd bmad "landing page for my SaaS"
19
-
20
- # 5. Use Claude Code for full pipeline
21
- /sdd spec # Generate SPEC.md
22
- /sdd tasks # Generate tasks
23
- /ck:cook # Implement tasks
24
-
25
- # 6. Validate
26
- pwsh run-converge.ps1 -Url 'http://localhost:3000' -Strict
27
- ```
28
-
29
- ---
30
-
31
- ## Output Directory Structure
32
-
33
- All generated artifacts are organized in the `sdd/` directory:
34
-
35
- ```
36
- project/
37
- ├── sdd/ # All generated artifacts
38
- │ ├── brief.md # Phase 0: BMAD brief
39
- ├── SPEC.md # Phase 2: Specification
40
- │ ├── tasks/ # Phase 3: Task directories
41
- │ └── task-260829-1700-feature/
42
- ├── MASTER-TASKS.md
43
- │ └── T-001-*.md
44
- │ └── converge/ # Phase 5: Validation reports
45
- │ ├── validation.md # Full project converge
46
- │ └── task-T-001/
47
- └── report.md # Per-task converge
48
- ├── .sdd/config.json # Pipeline state & config
49
- ├── templates/ # SDD templates
50
- └── .claude/commands/ # Claude Code commands
51
- ```
52
-
53
- **Key features:**
54
- - All artifacts in one place (`sdd/`)
55
- - Easy cleanup: delete `sdd/` to reset
56
- - Legacy files auto-migrated on first use
57
- - Configurable via `.sdd/config.json`
58
-
59
- ---
60
-
61
- ## Pipeline Phases
62
-
63
- ```
64
- Raw Idea
65
-
66
- ├── /sdd bmad → sdd/brief.md (Phase 0)
67
- ├── /sdd spec → sdd/SPEC.md (Phase 2)
68
- ├── /sdd tasks → sdd/tasks/ (Phase 3)
69
- ├── /ck:cook Implementation (Phase 4)
70
-
71
- └── /sdd converge sdd/converge/ (Phase 5)
72
-
73
- ├── PASSMerge / Deploy
74
- └── FAIL → Fix → Re-enter
75
- ```
76
-
77
- | Phase | Command | Output | Gate |
78
- |-------|---------|--------|------|
79
- | 0 | `/sdd bmad <desc>` | `sdd/brief.md` | None |
80
- | 2 | `/sdd spec` | `sdd/SPEC.md` | Requires `sdd/brief.md` + confidence ≥20 |
81
- | 3 | `/sdd tasks` | `sdd/tasks/task-*/` | Requires `sdd/SPEC.md` |
82
- | 4 | `/ck:cook` | Code | Requires task files |
83
- | 5 | `pwsh run-converge.ps1` | `sdd/converge/` | All phases |
84
-
85
- ---
86
-
87
- ## Commands Reference
88
-
89
- ### Core Pipeline Commands
90
-
91
- | Command | Phase | Output | Description |
92
- |---------|-------|--------|-------------|
93
- | `/sdd init` | | `.sdd/`, `templates/`, `sdd/` | Initialize SDD pipeline. Creates directory structure. Run once per project. |
94
- | `/sdd bmad <desc>` | 0 | `sdd/brief.md` | Interactive brainstorm. Asks 9 discovery questions, generates confidence-scored brief. |
95
- | `/sdd spec` | 2 | `sdd/SPEC.md` | Generate SPEC.md from brief. Validates confidence ≥20/100 + expiry check. |
96
- | `/sdd tasks` | 3 | `sdd/tasks/task-*/` | Break SPEC.md into tasks (≤2 hours each). Creates MASTER-TASKS.md + T-XXX-*.md files. |
97
- | `/sdd cook` | 4 | | Execute tasks sequentially. Args: `[--all \| --task T-XXX]`. |
98
- | `/sdd converge` | 5 | `sdd/converge/` | Validate implementation. Self-correcting loop. Args: `[--task <task-id>]`. |
99
-
100
- ### Utility Commands
101
-
102
- | Command | Description |
103
- |---------|-------------|
104
- | `/sdd status` | Show pipeline phase status. Displays current phase, completed phases, next command. |
105
- | `/sdd check <file>` | Real-time validation. Check file(s) against SPEC.md clauses ([SC-xxx], [AC-xxx]). |
106
- | `/sdd task-status T-XXX <status>` | Update task status. Args: `pending \| in-progress \| completed`. |
107
-
108
- ### Shell CLI (npm global)
109
-
110
- ```powershell
111
- sdd init # Same as /sdd init
112
- sdd bmad <desc> # Same as /sdd bmad
113
- sdd status # Same as /sdd status
114
- sdd help # Show help
115
-
116
- # Full pipeline requires Claude Code
117
- claude "/sdd spec"
118
- claude "/sdd tasks"
119
- pwsh run-converge.ps1 -Strict
120
- ```
121
-
122
- ---
123
-
124
- ## Usage Examples
125
-
126
- ### Example 1: Landing Page
127
-
128
- ```powershell
129
- cd my-saas-project
130
-
131
- # Initialize
132
- sdd init
133
-
134
- # Start with feature description
135
- sdd bmad "landing page for my SaaS product"
136
-
137
- # Claude Code generates spec
138
- /sdd spec
139
-
140
- # Break into tasks
141
- /sdd tasks
142
-
143
- # Implement each task
144
- /sdd cook --task T-001
145
- /sdd cook --task T-002
146
- /sdd cook --task T-003
147
-
148
- # Validate (with dev server running)
149
- /sdd converge
150
- ```
151
-
152
- ### Example 2: API Feature
153
-
154
- ```powershell
155
- cd my-api-project
156
- sdd init
157
-
158
- # Set domain to API
159
- # Edit .sdd/config.json: set project.domain = "api"
160
-
161
- sdd bmad "user authentication with JWT tokens"
162
-
163
- # /sdd spec now includes OpenAPI validation sections
164
- /sdd spec
165
- /sdd tasks
166
- /ck:cook --all
167
- ```
168
-
169
- ### Example 3: Real-Time Validation
170
-
171
- ```powershell
172
- # During implementation, check your work
173
- /sdd check src/components/Button.tsx
174
-
175
- # Result:
176
- # SC-001: "Start Free Trial" found
177
- # ✅ SC-COLOR-001: #22c55e found
178
- # SC-002: "Get Started" NOT FOUND
179
-
180
- # Fix the issue, then continue
181
- /sdd cook --task T-002
182
- ```
183
-
184
- ---
185
-
186
- ## Phase Gates
187
-
188
- Phase gates enforce deliberate progress. Commands fail if prerequisites are missing:
189
-
190
- | Command | Gate | If Missing |
191
- |---------|------|------------|
192
- | `/sdd spec` | BMAD-brief.md | ERROR: Phase 0 not complete. Run `/sdd bmad` first. |
193
- | `/sdd spec` | Confidence ≥20 | WARNING: Confidence is Weak. Spec may be incomplete. |
194
- | `/sdd tasks` | SPEC.md | ERROR: SPEC.md not found. Run `/sdd spec` first. |
195
- | `/sdd converge` | All artifacts | ERROR: Missing artifacts. Run full pipeline first. |
196
-
197
- ---
198
-
199
- ## BMAD Confidence Score
200
-
201
- BMAD calculates a 0-100 confidence score before generating SPEC.md:
202
-
203
- | Score | Level | Action |
204
- |-------|-------|--------|
205
- | <20 | None | `/sdd spec` BLOCKED. Re-run BMAD with more detail. |
206
- | 20-49 | Weak | WARNING. Proceed with caution — spec may need iteration. |
207
- | 50-69 | Medium | Acceptable. Answer more questions for better spec. |
208
- | ≥70 | Strong | Full confidence. Proceed to spec. |
209
-
210
- **Scoring factors:**
211
- - Input quality (0-30 pts) — more detail = higher score
212
- - Interview completion (0-30 pts) — more answers = higher score
213
- - Problem clarity (0-20 pts) — specific, measurable = higher score
214
- - Technical awareness (0-20 pts) — stack/integration detail = higher score
215
-
216
- ---
217
-
218
- ## Task Format
219
-
220
- Each task in MASTER-TASKS.md:
221
- - Takes ≤2 hours
222
- - Independently verifiable
223
- - Has frontmatter with `depends_on`, `spec_sections`
224
-
225
- ```
226
- task-260829-1657-landing-page/
227
- ├── MASTER-TASKS.md # Task index, phases, status
228
- ├── T-001-html-structure.md
229
- ├── T-002-mobile-css.md
230
- ├── T-003-desktop-css.md
231
- └── ...
232
- ```
233
-
234
- ---
235
-
236
- ## Extension System
237
-
238
- Domain-specific templates activate via `.sdd/config.json`:
239
-
240
- ```json
241
- {
242
- "project": {
243
- "domain": "frontend"
244
- }
245
- }
246
- ```
247
-
248
- | Domain | Adds |
249
- |--------|------|
250
- | `general` | Base pipeline only |
251
- | `api` | OpenAPI spec, endpoint validation, API checklist |
252
- | `frontend` | Design system prompts, Lighthouse targets, UX checklist |
253
- | `backend` | Data models, security requirements, backend checklist |
254
-
255
- Extensions are **additive** — base pipeline always works.
256
-
257
- ---
258
-
259
- ## Security
260
-
261
- | Layer | Protection |
262
- |-------|-----------|
263
- | Input | Sanitize regex blocks prompt injection patterns |
264
- | URL | SSRF prevention blocks private IPs, localhost |
265
- | npm | `--ignore-scripts` on global installs |
266
- | GitHub Actions | Least-privilege permissions block |
267
-
268
- ---
269
-
270
- ## Architecture
271
-
272
- ```
273
- Two Interfaces (same logic):
274
-
275
- Shell CLI: sdd bmad "feature" → bin/sdd.js
276
- Claude Code: /sdd bmad "feature" → .claude/commands/sdd.md
277
-
278
- Pipeline files:
279
- ├── .sdd/config.json # Phase tracking, template versions
280
- ├── templates/ # SDD artifact templates
281
- ├── .claude/commands/ # Claude Code slash commands
282
- ├── commands/ # Standalone CLI scripts
283
- ├── run-converge.ps1 # Converge automation
284
- └── extensions/ # Domain-specific (api/frontend/backend)
285
-
286
- npm package (sdd-pipeline):
287
- ├── bin/sdd.js # CLI entry
288
- ├── lib/init.js # Extract pipeline
289
- ├── lib/bmad/ # BMAD orchestrator (8 modules)
290
- └── lib/bundle/ # 31 pipeline files for distribution
291
- ```
292
-
293
- ---
294
-
295
- ## Requirements
296
-
297
- - Windows 11 + PowerShell (primary), Bash (fallback)
298
- - Git 2.52+
299
- - Node.js 18+ + npm 9+
300
- - Claude Code CLI (`npx @anthropic-ai/claude-code`)
301
-
302
- ## CI/CD
303
-
304
- GitHub Actions workflow runs converge on push/PR:
305
-
306
- ```yaml
307
- on: [push, pull_request]
308
- jobs:
309
- converge:
310
- runs-on: windows-latest
311
- steps:
312
- - uses: actions/checkout@v4
313
- - run: pwsh run-converge.ps1 -Url '${{ env.DEV_URL }}' -Strict
314
- ```
315
-
316
- On failure: artifacts uploaded + GitHub Issue created with fix recommendations.
317
-
318
- ---
319
-
320
- ## File Structure
321
-
322
- ```
323
- project/
324
- ├── .sdd/config.json # Pipeline state
325
- ├── BMAD-brief.md # Phase 0 output
326
- ├── SPEC.md # Phase 2 output
327
- ├── task-*/ # Phase 3 output
328
- ├── MASTER-TASKS.md
329
- │ └── T-XXX-*.md
330
- ├── converge/ # Phase 5 output
331
- │ └── validation.md
332
- └── .claude/commands/ # SDD commands
333
- ```
334
-
335
- ## Status
336
-
337
- ```powershell
338
- sdd status # Quick status (npm package)
339
- pwsh commands/sdd-status.ps1 --Verify # Full verification
340
- ```
341
-
342
- ---
343
-
344
- ## npm Package
345
-
346
- | Field | Value |
347
- |-------|-------|
348
- | Name | `sdd-pipeline` |
349
- | Version | `1.0.2` |
350
- | Registry | npmjs.com |
351
- | CLI command | `sdd` |
352
- | Claude Code command | `/sdd` |
353
- | Install | `npm install -g sdd-pipeline` |
354
-
355
- ---
356
-
357
- ## Key Features
358
-
359
- - **Phase gates** — `/sdd spec` fails if BMAD-brief.md missing — no bypass
360
- - **Confidence scoring** — BMAD quantifies spec readiness before implementation
361
- - **Problem-first** — Solution→problem inversion surfaces actual user needs
362
- - **Self-correcting converge** — Loop back to appropriate phase on failure
363
- - **Domain extensions** — API, frontend, backend set via config
364
- - **SSRF protection** — URL validation blocks private IPs, localhost
365
- - **GitHub Actions CI** — Runs converge on push/PR, creates Issue on failure
366
-
367
- ---
368
-
369
- ## Documentation
370
-
371
- | Document | Purpose |
372
- |----------|---------|
373
- | `docs/project-overview-pdr.md` | Project overview, problem statement, solution |
374
- | `docs/system-architecture.md` | System architecture, component map, CI/CD flow |
375
- | `docs/spec-pipeline-synthesis.md` | Full pipeline specification (1,200+ lines) |
376
- | `docs/codebase-summary.md` | Codebase overview, file inventory, key contracts |
377
- | `docs/deployment-guide.md` | Deployment instructions |
378
- | `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
+ claude "/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
+ pwsh run-converge.ps1 -Url 'http://localhost:3000' -Strict
27
+ ```
28
+
29
+ > **Important:** Always use `claude "/sdd-<cmd>"` format for interactive commands.
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
+ │ ├── PLAN.md # Phase 3: Implementation plan
43
+ ├── tasks/ # Phase 3: Task directories
44
+ └── task-260829-1700-feature/
45
+ ├── MASTER-TASKS.md
46
+ └── T-001-*.md
47
+ └── converge/ # Phase 5: Validation reports
48
+ ├── validation.md # Full project converge
49
+ │ └── task-T-001/
50
+ └── report.md # Per-task converge
51
+ ├── .sdd/config.json # Pipeline state & config
52
+ ├── templates/ # SDD templates
53
+ └── .claude/commands/ # Claude Code commands
54
+ ```
55
+
56
+ **Key features:**
57
+ - All artifacts in one place (`sdd/`)
58
+ - Easy cleanup: delete `sdd/` to reset
59
+ - Configurable via `.sdd/config.json`
60
+
61
+ ---
62
+
63
+ ## Pipeline Phases
64
+
65
+ ```
66
+ Raw Idea
67
+
68
+ ├── claude "/sdd-bmad" → sdd/brief.md (Phase 0)
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 | `claude "/sdd-bmad <desc>"` | `sdd/brief.md` | None |
82
+ | 2 | `claude "/sdd-spec"` | `sdd/SPEC.md` | Requires `sdd/brief.md` + confidence ≥20 |
83
+ | 3 | `claude "/sdd-tasks"` | `sdd/tasks/task-*/` | Requires `sdd/SPEC.md` |
84
+ | 4 | `claude "/sdd-cook"` | Code | Requires task files |
85
+ | 5 | `pwsh run-converge.ps1` | `sdd/converge/` | All phases |
86
+
87
+ ---
88
+
89
+ ## Commands Reference
90
+
91
+ ### Core Pipeline Commands
92
+
93
+ | Command | Phase | Output | Description |
94
+ |---------|-------|--------|-------------|
95
+ | `claude "/sdd init"` | | `.sdd/`, `templates/`, `sdd/` | Initialize SDD pipeline. Creates directory structure. Run once per project. |
96
+ | `claude "/sdd-bmad <desc>"` | 0 | `sdd/brief.md` | Interactive brainstorm. Asks 9 discovery questions, generates confidence-scored brief. |
97
+ | `claude "/sdd-spec"` | 2 | `sdd/SPEC.md` | Generate SPEC.md from brief. Validates confidence ≥20/100 + expiry check. |
98
+ | `claude "/sdd-tasks"` | 3 | `sdd/tasks/task-*/` | Break SPEC.md into tasks (≤2 hours each). Creates MASTER-TASKS.md + T-XXX-*.md files. |
99
+ | `claude "/sdd-cook"` | 4 | Code | Execute tasks. Args: `[--all \| --task T-XXX]`. |
100
+ | `claude "/sdd-converge"` | 5 | `sdd/converge/` | Validate implementation. Self-correcting loop. |
101
+
102
+ ### Utility Commands
103
+
104
+ | Command | Description |
105
+ |---------|-------------|
106
+ | `/sdd status` | Show pipeline phase status. Displays current phase, completed phases, next command. |
107
+ | `/sdd check <file>` | Real-time validation. Check file(s) against SPEC.md clauses ([SC-xxx], [AC-xxx]). |
108
+ | `/sdd task-status T-XXX <status>` | Update task status. Args: `pending \| in-progress \| completed`. |
109
+
110
+ ### Shell CLI (npm global)
111
+
112
+ ```powershell
113
+ sdd init # Initialize pipeline
114
+ sdd bmad <desc> # Non-interactive brief (low confidence)
115
+ sdd status # Show pipeline status
116
+ sdd help # Show help
117
+
118
+ # For interactive commands, use Claude Code
119
+ claude "/sdd bmad <desc>" # Interactive 9-question interview
120
+ ```
121
+
122
+ ---
123
+
124
+ ## Usage Examples
125
+
126
+ ### Example 1: Landing Page
127
+
128
+ ```powershell
129
+ cd my-saas-project
130
+
131
+ # Initialize
132
+ claude "/sdd init"
133
+
134
+ # Start with feature description (interactive)
135
+ claude "/sdd-bmad landing page for my SaaS product"
136
+
137
+ # Generate SPEC.md
138
+ claude "/sdd-spec"
139
+
140
+ # Break into tasks
141
+ claude "/sdd-tasks"
142
+
143
+ # Implement tasks
144
+ claude "/sdd-cook --task T-001"
145
+ claude "/sdd-cook --task T-002"
146
+ claude "/sdd-cook --task T-003"
147
+
148
+ # Validate (with dev server running)
149
+ claude "/sdd-converge"
150
+ ```
151
+
152
+ ### Example 2: API Feature
153
+
154
+ ```powershell
155
+ cd my-api-project
156
+ claude "/sdd init"
157
+
158
+ # Set domain to API
159
+ # Edit .sdd/config.json: set project.domain = "api"
160
+
161
+ claude "/sdd-bmad user authentication with JWT tokens"
162
+ claude "/sdd-spec"
163
+ claude "/sdd-tasks"
164
+ claude "/sdd-cook --all"
165
+ ```
166
+
167
+ ### Example 3: Real-Time Validation
168
+
169
+ ```powershell
170
+ # During implementation, check your work
171
+ claude "/sdd check src/components/Button.tsx"
172
+
173
+ # Result:
174
+ # ✅ SC-001: "Start Free Trial" found
175
+ # ✅ SC-COLOR-001: #22c55e found
176
+ # SC-002: "Get Started" NOT FOUND
177
+
178
+ # Fix the issue, then continue
179
+ claude "/sdd-cook --task T-002"
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Phase Gates
185
+
186
+ Phase gates enforce deliberate progress. Commands fail if prerequisites are missing:
187
+
188
+ | Command | Gate | If Missing |
189
+ |---------|------|------------|
190
+ | `claude "/sdd-spec"` | sdd/brief.md | ERROR: Phase 0 not complete. Run `claude "/sdd-bmad"` first. |
191
+ | `claude "/sdd-spec"` | Confidence ≥20 | WARNING: Confidence is Weak. Spec may be incomplete. |
192
+ | `claude "/sdd-tasks"` | sdd/SPEC.md | ERROR: SPEC.md not found. Run `claude "/sdd-spec"` first. |
193
+ | `claude "/sdd-converge"` | All artifacts | ERROR: Missing artifacts. Run full pipeline first. |
194
+
195
+ ---
196
+
197
+ ## BMAD Confidence Score
198
+
199
+ BMAD calculates a 0-100 confidence score before generating SPEC.md:
200
+
201
+ | Score | Level | Action |
202
+ |-------|-------|--------|
203
+ | <20 | None | `claude "/sdd-spec"` BLOCKED. Re-run BMAD with more detail. |
204
+ | 20-49 | Weak | WARNING. Proceed with caution — spec may need iteration. |
205
+ | 50-69 | Medium | Acceptable. Answer more questions for better spec. |
206
+ | ≥70 | Strong | Full confidence. Proceed to spec. |
207
+
208
+ **Scoring factors:**
209
+ - Input quality (0-30 pts) — more detail = higher score
210
+ - Interview completion (0-30 pts) — more answers = higher score
211
+ - Problem clarity (0-20 pts) — specific, measurable = higher score
212
+ - Technical awareness (0-20 pts) — stack/integration detail = higher score
213
+
214
+ ---
215
+
216
+ ## Task Format
217
+
218
+ Each task in MASTER-TASKS.md:
219
+ - Takes ≤2 hours
220
+ - Independently verifiable
221
+ - Has frontmatter with `depends_on`, `spec_sections`
222
+
223
+ ```
224
+ task-260829-1657-landing-page/
225
+ ├── MASTER-TASKS.md # Task index, phases, status
226
+ ├── T-001-html-structure.md
227
+ ├── T-002-mobile-css.md
228
+ ├── T-003-desktop-css.md
229
+ └── ...
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Extension System
235
+
236
+ Domain-specific templates activate via `.sdd/config.json`:
237
+
238
+ ```json
239
+ {
240
+ "project": {
241
+ "domain": "frontend"
242
+ }
243
+ }
244
+ ```
245
+
246
+ | Domain | Adds |
247
+ |--------|------|
248
+ | `general` | Base pipeline only |
249
+ | `api` | OpenAPI spec, endpoint validation, API checklist |
250
+ | `frontend` | Design system prompts, Lighthouse targets, UX checklist |
251
+ | `backend` | Data models, security requirements, backend checklist |
252
+
253
+ Extensions are **additive** base pipeline always works.
254
+
255
+ ---
256
+
257
+ ## Security
258
+
259
+ | Layer | Protection |
260
+ |-------|-----------|
261
+ | Input | Sanitize regex blocks prompt injection patterns |
262
+ | URL | SSRF prevention — blocks private IPs, localhost |
263
+ | npm | `--ignore-scripts` on global installs |
264
+ | GitHub Actions | Least-privilege permissions block |
265
+
266
+ ---
267
+
268
+ ## Architecture
269
+
270
+ ```
271
+ Two Interfaces (same logic):
272
+
273
+ Shell CLI: sdd bmad "feature" → bin/sdd.js
274
+ Claude Code: /sdd bmad "feature" → .claude/commands/sdd.md
275
+
276
+ Pipeline files:
277
+ ├── .sdd/config.json # Phase tracking, template versions
278
+ ├── templates/ # SDD artifact templates
279
+ ├── .claude/commands/ # Claude Code slash commands
280
+ ├── commands/ # Standalone CLI scripts
281
+ ├── run-converge.ps1 # Converge automation
282
+ └── extensions/ # Domain-specific (api/frontend/backend)
283
+
284
+ npm package (sdd-pipeline):
285
+ ├── bin/sdd.js # CLI entry
286
+ ├── lib/init.js # Extract pipeline
287
+ ├── lib/bmad/ # BMAD orchestrator (8 modules)
288
+ └── lib/bundle/ # 31 pipeline files for distribution
289
+ ```
290
+
291
+ ---
292
+
293
+ ## Requirements
294
+
295
+ - Windows 11 + PowerShell (primary), Bash (fallback)
296
+ - Git 2.52+
297
+ - Node.js 18+ + npm 9+
298
+ - Claude Code CLI (`npx @anthropic-ai/claude-code`)
299
+
300
+ ## CI/CD
301
+
302
+ GitHub Actions workflow runs converge on push/PR:
303
+
304
+ ```yaml
305
+ on: [push, pull_request]
306
+ jobs:
307
+ converge:
308
+ runs-on: windows-latest
309
+ steps:
310
+ - uses: actions/checkout@v4
311
+ - run: pwsh run-converge.ps1 -Url '${{ env.DEV_URL }}' -Strict
312
+ ```
313
+
314
+ On failure: artifacts uploaded + GitHub Issue created with fix recommendations.
315
+
316
+ ---
317
+
318
+ ## File Structure
319
+
320
+ ```
321
+ project/
322
+ ├── .sdd/config.json # Pipeline state
323
+ ├── BMAD-brief.md # Phase 0 output
324
+ ├── SPEC.md # Phase 2 output
325
+ ├── task-*/ # Phase 3 output
326
+ ├── MASTER-TASKS.md
327
+ │ └── T-XXX-*.md
328
+ ├── converge/ # Phase 5 output
329
+ │ └── validation.md
330
+ └── .claude/commands/ # SDD commands
331
+ ```
332
+
333
+ ## Status
334
+
335
+ ```powershell
336
+ sdd status # Quick status (npm package)
337
+ pwsh commands/sdd-status.ps1 --Verify # Full verification
338
+ ```
339
+
340
+ ---
341
+
342
+ ## npm Package
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 |