musubi-sdd 0.1.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/LICENSE +21 -0
- package/README.ja.md +531 -0
- package/README.md +531 -0
- package/bin/musubi-init.js +321 -0
- package/bin/musubi.js +359 -0
- package/package.json +55 -0
- package/src/agents/registry.js +242 -0
- package/src/templates/agents/claude-code/CLAUDE.md +232 -0
- package/src/templates/agents/claude-code/commands/sdd-design.md +673 -0
- package/src/templates/agents/claude-code/commands/sdd-implement.md +777 -0
- package/src/templates/agents/claude-code/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/claude-code/commands/sdd-steering.md +334 -0
- package/src/templates/agents/claude-code/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/claude-code/commands/sdd-validate.md +710 -0
- package/src/templates/agents/claude-code/skills/ai-ml-engineer/SKILL.md +3055 -0
- package/src/templates/agents/claude-code/skills/api-designer/SKILL.md +1364 -0
- package/src/templates/agents/claude-code/skills/bug-hunter/SKILL.md +482 -0
- package/src/templates/agents/claude-code/skills/change-impact-analyzer/SKILL.md +397 -0
- package/src/templates/agents/claude-code/skills/cloud-architect/SKILL.md +1468 -0
- package/src/templates/agents/claude-code/skills/code-reviewer/SKILL.md +906 -0
- package/src/templates/agents/claude-code/skills/constitution-enforcer/SKILL.md +466 -0
- package/src/templates/agents/claude-code/skills/database-administrator/SKILL.md +3522 -0
- package/src/templates/agents/claude-code/skills/database-schema-designer/SKILL.md +1158 -0
- package/src/templates/agents/claude-code/skills/devops-engineer/SKILL.md +647 -0
- package/src/templates/agents/claude-code/skills/orchestrator/SKILL.md +574 -0
- package/src/templates/agents/claude-code/skills/performance-optimizer/SKILL.md +464 -0
- package/src/templates/agents/claude-code/skills/project-manager/SKILL.md +769 -0
- package/src/templates/agents/claude-code/skills/quality-assurance/SKILL.md +1059 -0
- package/src/templates/agents/claude-code/skills/release-coordinator/SKILL.md +653 -0
- package/src/templates/agents/claude-code/skills/requirements-analyst/SKILL.md +1287 -0
- package/src/templates/agents/claude-code/skills/security-auditor/SKILL.md +1107 -0
- package/src/templates/agents/claude-code/skills/site-reliability-engineer/SKILL.md +404 -0
- package/src/templates/agents/claude-code/skills/software-developer/SKILL.md +1254 -0
- package/src/templates/agents/claude-code/skills/steering/SKILL.md +383 -0
- package/src/templates/agents/claude-code/skills/system-architect/SKILL.md +1288 -0
- package/src/templates/agents/claude-code/skills/technical-writer/SKILL.md +712 -0
- package/src/templates/agents/claude-code/skills/test-engineer/SKILL.md +1262 -0
- package/src/templates/agents/claude-code/skills/traceability-auditor/SKILL.md +298 -0
- package/src/templates/agents/claude-code/skills/ui-ux-designer/SKILL.md +1009 -0
- package/src/templates/agents/codex/AGENTS.md +138 -0
- package/src/templates/agents/codex/commands/sdd-design.md +673 -0
- package/src/templates/agents/codex/commands/sdd-implement.md +777 -0
- package/src/templates/agents/codex/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/codex/commands/sdd-steering.md +334 -0
- package/src/templates/agents/codex/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/codex/commands/sdd-validate.md +710 -0
- package/src/templates/agents/cursor/AGENTS.md +138 -0
- package/src/templates/agents/cursor/commands/sdd-design.md +673 -0
- package/src/templates/agents/cursor/commands/sdd-implement.md +777 -0
- package/src/templates/agents/cursor/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/cursor/commands/sdd-steering.md +334 -0
- package/src/templates/agents/cursor/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/cursor/commands/sdd-validate.md +710 -0
- package/src/templates/agents/gemini-cli/GEMINI.md +128 -0
- package/src/templates/agents/gemini-cli/commands/sdd-design.toml +359 -0
- package/src/templates/agents/gemini-cli/commands/sdd-implement.toml +484 -0
- package/src/templates/agents/gemini-cli/commands/sdd-requirements.toml +291 -0
- package/src/templates/agents/gemini-cli/commands/sdd-steering.toml +209 -0
- package/src/templates/agents/gemini-cli/commands/sdd-tasks.toml +441 -0
- package/src/templates/agents/gemini-cli/commands/sdd-validate.toml +553 -0
- package/src/templates/agents/github-copilot/AGENTS.md +138 -0
- package/src/templates/agents/github-copilot/commands/sdd-design.md +673 -0
- package/src/templates/agents/github-copilot/commands/sdd-implement.md +777 -0
- package/src/templates/agents/github-copilot/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/github-copilot/commands/sdd-steering.md +334 -0
- package/src/templates/agents/github-copilot/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/github-copilot/commands/sdd-validate.md +710 -0
- package/src/templates/agents/qwen-code/QWEN.md +128 -0
- package/src/templates/agents/qwen-code/commands/sdd-design.md +673 -0
- package/src/templates/agents/qwen-code/commands/sdd-implement.md +777 -0
- package/src/templates/agents/qwen-code/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/qwen-code/commands/sdd-steering.md +334 -0
- package/src/templates/agents/qwen-code/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/qwen-code/commands/sdd-validate.md +710 -0
- package/src/templates/agents/windsurf/AGENTS.md +138 -0
- package/src/templates/agents/windsurf/commands/sdd-design.md +673 -0
- package/src/templates/agents/windsurf/commands/sdd-implement.md +777 -0
- package/src/templates/agents/windsurf/commands/sdd-requirements.md +438 -0
- package/src/templates/agents/windsurf/commands/sdd-steering.md +334 -0
- package/src/templates/agents/windsurf/commands/sdd-tasks.md +582 -0
- package/src/templates/agents/windsurf/commands/sdd-validate.md +710 -0
- package/src/templates/shared/constitution/constitution.md +408 -0
- package/src/templates/shared/constitution/ears-format.md +613 -0
- package/src/templates/shared/constitution/workflow.md +653 -0
- package/src/templates/shared/documents/design.md +737 -0
- package/src/templates/shared/documents/requirements.md +329 -0
- package/src/templates/shared/documents/research.md +494 -0
- package/src/templates/shared/documents/tasks.md +781 -0
- package/src/templates/shared/steering/product.md +544 -0
- package/src/templates/shared/steering/structure.md +405 -0
- package/src/templates/shared/steering/tech.md +537 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
# SDD Requirements Command
|
|
2
|
+
|
|
3
|
+
Create EARS-format requirements specification.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Instructions for Claude
|
|
8
|
+
|
|
9
|
+
You are executing the `/sdd-requirements [feature-name]` command to create a requirements specification.
|
|
10
|
+
|
|
11
|
+
### Command Format
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
/sdd-requirements authentication
|
|
15
|
+
/sdd-requirements payment-processing
|
|
16
|
+
/sdd-requirements user-dashboard
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Your Task
|
|
20
|
+
|
|
21
|
+
Generate a comprehensive requirements specification in EARS format for the specified feature.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
### 1. Read Steering Context (Article VI)
|
|
28
|
+
|
|
29
|
+
**IMPORTANT**: Before starting, read steering files to understand project context:
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Read these files first
|
|
33
|
+
steering/product.md # Business context, users, goals
|
|
34
|
+
steering/structure.md # Architecture patterns
|
|
35
|
+
steering/tech.md # Technology stack
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Extract**:
|
|
39
|
+
- Target users
|
|
40
|
+
- Product goals
|
|
41
|
+
- Existing architecture patterns
|
|
42
|
+
- Technology constraints
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### 2. Gather Requirements
|
|
47
|
+
|
|
48
|
+
**Methods** (use as appropriate):
|
|
49
|
+
|
|
50
|
+
#### A. Stakeholder Interview (if user is available)
|
|
51
|
+
Use `AskUserQuestion` tool to ask:
|
|
52
|
+
- Who are the users of this feature?
|
|
53
|
+
- What problem does this solve?
|
|
54
|
+
- What are the critical workflows?
|
|
55
|
+
- What are the acceptance criteria?
|
|
56
|
+
- Are there any constraints (performance, security, compliance)?
|
|
57
|
+
|
|
58
|
+
#### B. Research Existing System (brownfield)
|
|
59
|
+
- Search for existing implementation: `grep -r "{{feature}}" src/`
|
|
60
|
+
- Read related code
|
|
61
|
+
- Identify current behavior
|
|
62
|
+
- Document what needs to change (delta spec)
|
|
63
|
+
|
|
64
|
+
#### C. Infer from Context
|
|
65
|
+
- Analyze steering/product.md for user types
|
|
66
|
+
- Review existing requirements docs
|
|
67
|
+
- Check for similar features in codebase
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
### 3. Generate Requirements Document
|
|
72
|
+
|
|
73
|
+
Use template from `templates/requirements.md`:
|
|
74
|
+
|
|
75
|
+
**Structure**:
|
|
76
|
+
```markdown
|
|
77
|
+
# Requirements Specification: {{FEATURE_NAME}}
|
|
78
|
+
|
|
79
|
+
## Overview
|
|
80
|
+
- Purpose
|
|
81
|
+
- Scope (in/out)
|
|
82
|
+
- Business context (from steering/product.md)
|
|
83
|
+
|
|
84
|
+
## Stakeholders
|
|
85
|
+
[Table of roles]
|
|
86
|
+
|
|
87
|
+
## Functional Requirements
|
|
88
|
+
|
|
89
|
+
### REQ-{{COMPONENT}}-001: [Title]
|
|
90
|
+
[EARS Pattern - choose appropriate pattern]
|
|
91
|
+
|
|
92
|
+
**Acceptance Criteria**:
|
|
93
|
+
- [Testable criterion 1]
|
|
94
|
+
- [Testable criterion 2]
|
|
95
|
+
|
|
96
|
+
**Priority**: P0/P1/P2/P3
|
|
97
|
+
**Status**: Draft
|
|
98
|
+
**Traceability**: (leave blank for now)
|
|
99
|
+
|
|
100
|
+
[Repeat for all requirements]
|
|
101
|
+
|
|
102
|
+
## Non-Functional Requirements
|
|
103
|
+
|
|
104
|
+
### REQ-PERF-001: Performance
|
|
105
|
+
### REQ-SEC-001: Security
|
|
106
|
+
### REQ-SCALE-001: Scalability
|
|
107
|
+
### REQ-AVAIL-001: Availability
|
|
108
|
+
|
|
109
|
+
## Requirements Coverage Matrix
|
|
110
|
+
[Initial table - will be filled during design/implementation]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
### 4. Apply EARS Format (Article IV)
|
|
116
|
+
|
|
117
|
+
**CRITICAL**: All requirements MUST use one of 5 EARS patterns.
|
|
118
|
+
|
|
119
|
+
#### Pattern Selection Guide
|
|
120
|
+
|
|
121
|
+
| Scenario | EARS Pattern | Example |
|
|
122
|
+
|----------|--------------|---------|
|
|
123
|
+
| Always-active feature | **Ubiquitous**: `The [system] SHALL` | The API SHALL authenticate all requests |
|
|
124
|
+
| User action triggers | **Event-driven**: `WHEN ... THEN` | WHEN user clicks Submit, THEN validate form |
|
|
125
|
+
| Continuous condition | **State-driven**: `WHILE ... SHALL` | WHILE loading, UI SHALL show spinner |
|
|
126
|
+
| Error handling | **Unwanted**: `IF ... THEN` | IF timeout, THEN return HTTP 504 |
|
|
127
|
+
| Feature flag | **Optional**: `WHERE ... SHALL` | WHERE 2FA enabled, SHALL require OTP |
|
|
128
|
+
|
|
129
|
+
#### Requirements Quality Checklist
|
|
130
|
+
|
|
131
|
+
Each requirement MUST have:
|
|
132
|
+
- [ ] Unique ID (REQ-COMPONENT-NNN)
|
|
133
|
+
- [ ] EARS pattern (one of 5)
|
|
134
|
+
- [ ] Clear SHALL/SHALL NOT (not SHOULD/MUST/MAY)
|
|
135
|
+
- [ ] Testable acceptance criteria
|
|
136
|
+
- [ ] Priority (P0/P1/P2/P3)
|
|
137
|
+
- [ ] Status (Draft initially)
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### 5. Assign Requirement IDs
|
|
142
|
+
|
|
143
|
+
**Format**: `REQ-[COMPONENT]-[NUMBER]`
|
|
144
|
+
|
|
145
|
+
**Examples**:
|
|
146
|
+
- `REQ-AUTH-001` - Authentication component
|
|
147
|
+
- `REQ-PAY-001` - Payment component
|
|
148
|
+
- `REQ-DASH-001` - Dashboard component
|
|
149
|
+
|
|
150
|
+
**Rules**:
|
|
151
|
+
- All uppercase
|
|
152
|
+
- Sequential numbering starting from 001
|
|
153
|
+
- Unique across entire project
|
|
154
|
+
- Never reuse IDs
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
### 6. Add Non-Functional Requirements
|
|
159
|
+
|
|
160
|
+
Always include these categories:
|
|
161
|
+
|
|
162
|
+
```markdown
|
|
163
|
+
### REQ-PERF-001: Response Time
|
|
164
|
+
The {{COMPONENT}} SHALL respond within 200ms for 95% of requests.
|
|
165
|
+
|
|
166
|
+
**Acceptance Criteria**:
|
|
167
|
+
- 95th percentile < 200ms
|
|
168
|
+
- 99th percentile < 500ms
|
|
169
|
+
- Tested with 1000 concurrent users
|
|
170
|
+
|
|
171
|
+
### REQ-SEC-001: OWASP Top 10
|
|
172
|
+
The {{COMPONENT}} SHALL prevent OWASP Top 10 vulnerabilities.
|
|
173
|
+
|
|
174
|
+
**Acceptance Criteria**:
|
|
175
|
+
- Input validation on all inputs
|
|
176
|
+
- Output encoding for XSS prevention
|
|
177
|
+
- Parameterized queries (SQL injection prevention)
|
|
178
|
+
- Authentication on protected endpoints
|
|
179
|
+
|
|
180
|
+
### REQ-SCALE-001: Concurrent Users
|
|
181
|
+
The {{COMPONENT}} SHALL support 10,000 concurrent users.
|
|
182
|
+
|
|
183
|
+
**Acceptance Criteria**:
|
|
184
|
+
- Load tested with 10,000 users
|
|
185
|
+
- No performance degradation
|
|
186
|
+
- Horizontal scaling supported
|
|
187
|
+
|
|
188
|
+
### REQ-AVAIL-001: Uptime
|
|
189
|
+
The {{COMPONENT}} SHALL maintain 99.9% uptime.
|
|
190
|
+
|
|
191
|
+
**Acceptance Criteria**:
|
|
192
|
+
- 99.9% uptime SLA
|
|
193
|
+
- Health check endpoint
|
|
194
|
+
- Graceful degradation on failure
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
### 7. Brownfield: Create Delta Specification
|
|
200
|
+
|
|
201
|
+
If this is a change to existing system, add delta sections:
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
## ADDED Requirements
|
|
205
|
+
|
|
206
|
+
### REQ-AUTH-042: Two-Factor Authentication (NEW)
|
|
207
|
+
WHERE two-factor authentication is enabled,
|
|
208
|
+
the authentication system SHALL require OTP verification.
|
|
209
|
+
|
|
210
|
+
**Justification**: Security enhancement
|
|
211
|
+
**Impact**: Adds new authentication step; backward compatible
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## MODIFIED Requirements
|
|
216
|
+
|
|
217
|
+
### REQ-AUTH-001: Password Hashing (MODIFIED)
|
|
218
|
+
|
|
219
|
+
**Previous**:
|
|
220
|
+
The authentication system SHALL hash passwords using bcrypt cost 10.
|
|
221
|
+
|
|
222
|
+
**Updated**:
|
|
223
|
+
The authentication system SHALL hash passwords using bcrypt cost 12.
|
|
224
|
+
|
|
225
|
+
**Reason**: Increased security standard
|
|
226
|
+
**Breaking Change**: No (existing hashes valid)
|
|
227
|
+
**Migration**: Rehash on next login
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## REMOVED Requirements
|
|
232
|
+
|
|
233
|
+
### REQ-AUTH-015: Remember Me (REMOVED)
|
|
234
|
+
|
|
235
|
+
**Reason**: Security policy change
|
|
236
|
+
**Breaking Change**: Yes
|
|
237
|
+
**Migration**: Users must log in each visit
|
|
238
|
+
**Communication**: 30-day notice required
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
### 8. Constitutional Validation
|
|
244
|
+
|
|
245
|
+
Validate requirements against constitutional articles:
|
|
246
|
+
|
|
247
|
+
#### Article IV: EARS Format
|
|
248
|
+
- [ ] All requirements use EARS patterns
|
|
249
|
+
- [ ] No ambiguous keywords (SHOULD, MUST, MAY)
|
|
250
|
+
- [ ] All requirements have SHALL/SHALL NOT
|
|
251
|
+
|
|
252
|
+
#### Article V: Traceability
|
|
253
|
+
- [ ] All requirements have unique IDs
|
|
254
|
+
- [ ] IDs follow REQ-XXX-NNN format
|
|
255
|
+
- [ ] Requirement IDs never reused
|
|
256
|
+
|
|
257
|
+
Run validation:
|
|
258
|
+
```bash
|
|
259
|
+
@constitution-enforcer validate requirements.md
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### 9. Save Document (Bilingual)
|
|
265
|
+
|
|
266
|
+
**IMPORTANT**: Create BOTH English and Japanese versions.
|
|
267
|
+
|
|
268
|
+
**English version (Primary/Reference)**:
|
|
269
|
+
Save to: `storage/specs/{{feature-name}}-requirements.md`
|
|
270
|
+
|
|
271
|
+
**Japanese version (Translation)**:
|
|
272
|
+
Save to: `storage/specs/{{feature-name}}-requirements.ja.md`
|
|
273
|
+
|
|
274
|
+
**File Naming**:
|
|
275
|
+
- Use kebab-case
|
|
276
|
+
- Include feature name
|
|
277
|
+
- Add `-requirements` suffix
|
|
278
|
+
- Add `.ja` before `.md` for Japanese version
|
|
279
|
+
|
|
280
|
+
**Examples**:
|
|
281
|
+
- `storage/specs/authentication-requirements.md` (English)
|
|
282
|
+
- `storage/specs/authentication-requirements.ja.md` (Japanese)
|
|
283
|
+
- `storage/specs/payment-processing-requirements.md` (English)
|
|
284
|
+
- `storage/specs/payment-processing-requirements.ja.md` (Japanese)
|
|
285
|
+
|
|
286
|
+
**Generation Order**:
|
|
287
|
+
1. Generate English version FIRST
|
|
288
|
+
2. Then generate Japanese translation
|
|
289
|
+
3. Ensure requirement IDs are identical in both versions
|
|
290
|
+
4. Keep technical terms (REQ-XXX-NNN, EARS keywords) in English in Japanese version
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
### 10. Generate Summary
|
|
295
|
+
|
|
296
|
+
Present summary to user:
|
|
297
|
+
|
|
298
|
+
```markdown
|
|
299
|
+
## ✅ Requirements Specification Complete
|
|
300
|
+
|
|
301
|
+
**Feature**: {{FEATURE_NAME}}
|
|
302
|
+
**Files**:
|
|
303
|
+
- English: storage/specs/{{feature-name}}-requirements.md
|
|
304
|
+
- Japanese: storage/specs/{{feature-name}}-requirements.ja.md
|
|
305
|
+
|
|
306
|
+
### Summary:
|
|
307
|
+
- **Total Requirements**: [N]
|
|
308
|
+
- P0 (Critical): [N]
|
|
309
|
+
- P1 (High): [N]
|
|
310
|
+
- P2 (Medium): [N]
|
|
311
|
+
- P3 (Low): [N]
|
|
312
|
+
|
|
313
|
+
### Requirements Breakdown:
|
|
314
|
+
- Functional: [N]
|
|
315
|
+
- Non-Functional: [N]
|
|
316
|
+
- Performance: [N]
|
|
317
|
+
- Security: [N]
|
|
318
|
+
- Scalability: [N]
|
|
319
|
+
- Availability: [N]
|
|
320
|
+
|
|
321
|
+
### EARS Patterns Used:
|
|
322
|
+
- Ubiquitous: [N]
|
|
323
|
+
- Event-driven: [N]
|
|
324
|
+
- State-driven: [N]
|
|
325
|
+
- Unwanted behavior: [N]
|
|
326
|
+
- Optional feature: [N]
|
|
327
|
+
|
|
328
|
+
### Constitutional Compliance:
|
|
329
|
+
- ✅ Article IV: All requirements in EARS format
|
|
330
|
+
- ✅ Article V: Unique IDs assigned
|
|
331
|
+
- ✅ Article VI: Aligned with steering context
|
|
332
|
+
|
|
333
|
+
### Next Steps:
|
|
334
|
+
1. Review requirements with stakeholders
|
|
335
|
+
2. Get approval
|
|
336
|
+
3. Run design phase: `/sdd-design {{feature-name}}`
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## Example Execution
|
|
342
|
+
|
|
343
|
+
### User Command:
|
|
344
|
+
```bash
|
|
345
|
+
/sdd-requirements authentication
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Claude Actions:
|
|
349
|
+
|
|
350
|
+
1. **Read Steering**:
|
|
351
|
+
- `steering/product.md` → Target users: B2B SaaS companies
|
|
352
|
+
- `steering/tech.md` → Stack: Next.js, PostgreSQL, Prisma
|
|
353
|
+
- `steering/structure.md` → Pattern: Library-first
|
|
354
|
+
|
|
355
|
+
2. **Ask User** (if needed):
|
|
356
|
+
```
|
|
357
|
+
Questions about authentication feature:
|
|
358
|
+
1. Authentication methods: Email/password, OAuth, SSO, or all?
|
|
359
|
+
2. Required features: 2FA, password reset, session management?
|
|
360
|
+
3. Security: Any compliance requirements (SOC2, HIPAA)?
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
3. **Generate Requirements**:
|
|
364
|
+
```markdown
|
|
365
|
+
### REQ-AUTH-001: User Login
|
|
366
|
+
WHEN a user provides valid credentials,
|
|
367
|
+
THEN the authentication system SHALL authenticate the user
|
|
368
|
+
AND the system SHALL create a session
|
|
369
|
+
AND the system SHALL redirect to dashboard.
|
|
370
|
+
|
|
371
|
+
### REQ-AUTH-002: Password Strength
|
|
372
|
+
The authentication system SHALL enforce password requirements:
|
|
373
|
+
- Minimum 12 characters
|
|
374
|
+
- At least 1 uppercase, 1 lowercase, 1 number, 1 special char
|
|
375
|
+
|
|
376
|
+
[... more requirements ...]
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
4. **Save**: `storage/specs/authentication-requirements.md`
|
|
380
|
+
|
|
381
|
+
5. **Summarize**: Present summary to user
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Tool Usage
|
|
386
|
+
|
|
387
|
+
### Required Tools:
|
|
388
|
+
- **Read**: Read steering files, existing specs
|
|
389
|
+
- **Write**: Create requirements document
|
|
390
|
+
- **AskUserQuestion**: Gather stakeholder input (if needed)
|
|
391
|
+
- **Grep**: Search for existing implementations (brownfield)
|
|
392
|
+
|
|
393
|
+
### Optional Tools:
|
|
394
|
+
- **WebSearch**: Research best practices (if needed)
|
|
395
|
+
- **mcp__context7__get-library-docs**: Get framework documentation
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Validation Checklist
|
|
400
|
+
|
|
401
|
+
Before completing, verify:
|
|
402
|
+
|
|
403
|
+
- [ ] Steering context read and applied
|
|
404
|
+
- [ ] All requirements in EARS format
|
|
405
|
+
- [ ] Requirement IDs assigned (REQ-XXX-NNN)
|
|
406
|
+
- [ ] Acceptance criteria defined for each requirement
|
|
407
|
+
- [ ] Priority assigned (P0/P1/P2/P3)
|
|
408
|
+
- [ ] Non-functional requirements included
|
|
409
|
+
- [ ] Constitutional validation passed
|
|
410
|
+
- [ ] Document saved to storage/specs/
|
|
411
|
+
- [ ] Summary presented to user
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## Edge Cases
|
|
416
|
+
|
|
417
|
+
### No Steering Files
|
|
418
|
+
If `steering/` doesn't exist:
|
|
419
|
+
```markdown
|
|
420
|
+
⚠️ **Steering files not found**
|
|
421
|
+
|
|
422
|
+
Please run `/sdd-steering` first to generate project context.
|
|
423
|
+
|
|
424
|
+
Steering provides critical context for requirements generation:
|
|
425
|
+
- Product goals and users
|
|
426
|
+
- Architecture patterns
|
|
427
|
+
- Technology constraints
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
### Brownfield with Existing Requirements
|
|
431
|
+
If `storage/specs/{{feature-name}}-requirements.md` exists:
|
|
432
|
+
- Read existing file
|
|
433
|
+
- Ask user: Update existing or create new version?
|
|
434
|
+
- If update: Create delta specification (ADDED/MODIFIED/REMOVED)
|
|
435
|
+
|
|
436
|
+
---
|
|
437
|
+
|
|
438
|
+
**Execution**: Begin requirements generation now for the specified feature.
|