sdd-mcp-server 3.5.0 → 4.0.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 +97 -671
- package/agents/architect.md +15 -93
- package/agents/implementer.md +16 -141
- package/agents/planner.md +16 -84
- package/agents/reviewer.md +16 -239
- package/agents/security-auditor.md +16 -114
- package/agents/tdd-guide.md +17 -228
- package/dist/adapters/cli/SDDToolAdapter.d.ts +14 -5
- package/dist/adapters/cli/SDDToolAdapter.js +189 -362
- package/dist/adapters/cli/SDDToolAdapter.js.map +1 -1
- package/dist/application/services/ContextCompactionService.d.ts +81 -16
- package/dist/application/services/ContextCompactionService.js +370 -187
- package/dist/application/services/ContextCompactionService.js.map +1 -1
- package/dist/application/services/SpecPathResolver.d.ts +24 -0
- package/dist/application/services/SpecPathResolver.js +70 -0
- package/dist/application/services/SpecPathResolver.js.map +1 -0
- package/dist/application/services/WorkflowEngineService.d.ts +100 -46
- package/dist/application/services/WorkflowEngineService.js +468 -288
- package/dist/application/services/WorkflowEngineService.js.map +1 -1
- package/dist/cli/install-skills.d.ts +3 -9
- package/dist/cli/install-skills.js +130 -175
- package/dist/cli/install-skills.js.map +1 -1
- package/dist/cli/install-target.d.ts +45 -14
- package/dist/cli/install-target.js +26 -12
- package/dist/cli/install-target.js.map +1 -1
- package/dist/cli/sdd-mcp-cli.d.ts +1 -1
- package/dist/cli/sdd-mcp-cli.js +7 -6
- package/dist/cli/sdd-mcp-cli.js.map +1 -1
- package/dist/cli/tool-support/claude-code.js +13 -34
- package/dist/cli/tool-support/claude-code.js.map +1 -1
- package/dist/cli/tool-support/codex.d.ts +0 -53
- package/dist/cli/tool-support/codex.js +6 -94
- package/dist/cli/tool-support/codex.js.map +1 -1
- package/dist/cli/tool-support/index.d.ts +3 -2
- package/dist/cli/tool-support/index.js +3 -1
- package/dist/cli/tool-support/index.js.map +1 -1
- package/dist/cli/tool-support/omp.d.ts +5 -0
- package/dist/cli/tool-support/omp.js +43 -0
- package/dist/cli/tool-support/omp.js.map +1 -0
- package/dist/cli/tool-support/root-guidance.d.ts +2 -9
- package/dist/cli/tool-support/root-guidance.js +44 -37
- package/dist/cli/tool-support/root-guidance.js.map +1 -1
- package/dist/cli/tool-support/target-agent-renderer.d.ts +1 -0
- package/dist/cli/tool-support/target-agent-renderer.js +37 -4
- package/dist/cli/tool-support/target-agent-renderer.js.map +1 -1
- package/dist/cli/tool-support/target-installer.d.ts +8 -2
- package/dist/cli/tool-support/target-installer.js +94 -26
- package/dist/cli/tool-support/target-installer.js.map +1 -1
- package/dist/cli/utils/preserving-writer.d.ts +22 -0
- package/dist/cli/utils/preserving-writer.js +233 -11
- package/dist/cli/utils/preserving-writer.js.map +1 -1
- package/dist/domain/ports.d.ts +4 -0
- package/dist/index.d.ts +13 -10
- package/dist/index.js +16 -1199
- package/dist/index.js.map +1 -1
- package/dist/infrastructure/adapters/NodeFileSystemAdapter.d.ts +3 -0
- package/dist/infrastructure/adapters/NodeFileSystemAdapter.js +10 -0
- package/dist/infrastructure/adapters/NodeFileSystemAdapter.js.map +1 -1
- package/dist/infrastructure/mcp/CapabilityNegotiator.js +3 -3
- package/dist/infrastructure/mcp/CapabilityNegotiator.js.map +1 -1
- package/dist/infrastructure/mcp/sddToolDefinitions.d.ts +6 -0
- package/dist/infrastructure/mcp/sddToolDefinitions.js +124 -0
- package/dist/infrastructure/mcp/sddToolDefinitions.js.map +1 -0
- package/dist/utils/atomicWrite.d.ts +8 -35
- package/dist/utils/atomicWrite.js +12 -60
- package/dist/utils/atomicWrite.js.map +1 -1
- package/mcp-server.js +5 -2883
- package/package.json +5 -2
- package/scripts/context-usage-report.mjs +602 -0
- package/sdd-entry.js +17 -6
- package/skills/sdd-commit/REFERENCE.md +31 -0
- package/skills/sdd-commit/SKILL.md +17 -273
- package/skills/sdd-design/REFERENCE.md +35 -0
- package/skills/sdd-design/SKILL.md +19 -265
- package/skills/sdd-implement/REFERENCE.md +26 -0
- package/skills/sdd-implement/SKILL.md +22 -283
- package/skills/sdd-requirements/REFERENCE.md +31 -0
- package/skills/sdd-requirements/SKILL.md +23 -135
- package/skills/sdd-review/REFERENCE.md +26 -0
- package/skills/sdd-review/SKILL.md +17 -181
- package/skills/sdd-security-check/REFERENCE.md +19 -0
- package/skills/sdd-security-check/SKILL.md +18 -184
- package/skills/sdd-steering/REFERENCE.md +25 -0
- package/skills/sdd-steering/SKILL.md +18 -216
- package/skills/sdd-steering-custom/REFERENCE.md +27 -0
- package/skills/sdd-steering-custom/SKILL.md +19 -203
- package/skills/sdd-tasks/REFERENCE.md +25 -0
- package/skills/sdd-tasks/SKILL.md +19 -248
- package/skills/sdd-test-gen/REFERENCE.md +15 -0
- package/skills/sdd-test-gen/SKILL.md +17 -287
- package/skills/simple-task/REFERENCE.md +22 -0
- package/skills/simple-task/SKILL.md +17 -138
- package/templates/CLAUDE.md +18 -30
- package/rules/git-workflow.md +0 -92
- package/rules/sdd-workflow.md +0 -116
|
@@ -1,152 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: simple-task
|
|
3
|
-
description: Implement
|
|
3
|
+
description: Implement a small focused change test-first without starting the full SDD workflow.
|
|
4
|
+
disable-model-invocation: true
|
|
4
5
|
---
|
|
5
6
|
|
|
6
|
-
# Simple Task
|
|
7
|
+
# Simple Task
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
Work inline in the current turn; do not create a serial implementation specialist.
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
Use this route for a bounded bug fix, refactor, or enhancement with clear acceptance behavior. Switch to formal SDD when requirements, architecture, approval gates, or several dependent components need design.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
- Small feature additions (e.g., "add logout button")
|
|
14
|
-
- Bug fixes
|
|
15
|
-
- Minor enhancements
|
|
16
|
-
- Quick refactoring
|
|
13
|
+
## Required Workflow
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
1. Confirm the requested behavior and inspect existing patterns. Do not infer extra scope.
|
|
16
|
+
2. Locate the narrowest affected code and focused test.
|
|
17
|
+
3. **RED:** write or adjust a focused failing test for observable behavior; run it and confirm the intended failure.
|
|
18
|
+
4. **GREEN:** implement the smallest complete fix; run the focused test.
|
|
19
|
+
5. **REFACTOR:** simplify while preserving behavior; rerun the focused test.
|
|
20
|
+
6. Check boundaries, error propagation, compatibility, authorization, input validation, injection, secret handling, and sensitive logs where relevant.
|
|
21
|
+
7. Review all affected callers and artifacts. Never discard unrelated work or claim unobserved checks.
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### Step 1: Understand the Task
|
|
26
|
-
|
|
27
|
-
1. Clarify what needs to be done
|
|
28
|
-
2. Identify affected files/components
|
|
29
|
-
3. Estimate scope (if larger than expected, suggest full SDD workflow)
|
|
30
|
-
|
|
31
|
-
### Step 2: Apply TDD (Test-Driven Development)
|
|
32
|
-
|
|
33
|
-
**Reference:** `.spec/steering/tdd-guideline.md`
|
|
34
|
-
|
|
35
|
-
Follow the Red-Green-Refactor cycle:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
1. RED → Write a failing test first
|
|
39
|
-
2. GREEN → Write minimal code to pass
|
|
40
|
-
3. REFACTOR → Clean up while tests pass
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
**Quick TDD Checklist:**
|
|
44
|
-
- [ ] Write test before implementation
|
|
45
|
-
- [ ] Test describes expected behavior
|
|
46
|
-
- [ ] Minimal code to make test pass
|
|
47
|
-
- [ ] Refactor without breaking tests
|
|
48
|
-
|
|
49
|
-
### Step 3: Apply Design Principles
|
|
50
|
-
|
|
51
|
-
**Reference:** `.spec/steering/principles.md`
|
|
52
|
-
|
|
53
|
-
**SOLID Quick Reference:**
|
|
54
|
-
- **S**ingle Responsibility: Each function/class does one thing
|
|
55
|
-
- **O**pen/Closed: Extend behavior without modifying existing code
|
|
56
|
-
- **L**iskov Substitution: Subtypes must be substitutable
|
|
57
|
-
- **I**nterface Segregation: Small, focused interfaces
|
|
58
|
-
- **D**ependency Inversion: Depend on abstractions
|
|
59
|
-
|
|
60
|
-
**Other Principles:**
|
|
61
|
-
- **DRY**: Don't repeat yourself - extract common logic
|
|
62
|
-
- **KISS**: Keep it simple - avoid unnecessary complexity
|
|
63
|
-
- **YAGNI**: You aren't gonna need it - only implement what's required
|
|
64
|
-
|
|
65
|
-
### Step 4: Code Quality Review
|
|
66
|
-
|
|
67
|
-
**Reference:** `.spec/steering/linus-review.md`
|
|
68
|
-
|
|
69
|
-
Before finalizing, ask:
|
|
70
|
-
1. **Taste**: Is the solution elegant? Can special cases be eliminated?
|
|
71
|
-
2. **Simplicity**: Can it be simpler? Fewer lines? Less nesting?
|
|
72
|
-
3. **Data Structures**: Is the right data structure used?
|
|
73
|
-
4. **Breaking Changes**: Does this break existing functionality?
|
|
74
|
-
|
|
75
|
-
**Quality Checklist:**
|
|
76
|
-
- [ ] Functions are short and focused
|
|
77
|
-
- [ ] No more than 3 levels of indentation
|
|
78
|
-
- [ ] Clear, descriptive naming
|
|
79
|
-
- [ ] No unnecessary complexity
|
|
80
|
-
|
|
81
|
-
### Step 5: Security Check
|
|
82
|
-
|
|
83
|
-
**Reference:** `.spec/steering/owasp-top10-check.md`
|
|
84
|
-
|
|
85
|
-
**Quick Security Checklist:**
|
|
86
|
-
- [ ] Input validation (sanitize user inputs)
|
|
87
|
-
- [ ] No SQL/command injection (use parameterized queries)
|
|
88
|
-
- [ ] Access control enforced
|
|
89
|
-
- [ ] No secrets in code (use env vars)
|
|
90
|
-
- [ ] Proper error handling (no stack traces to users)
|
|
91
|
-
|
|
92
|
-
### Step 6: Implement and Test
|
|
93
|
-
|
|
94
|
-
1. Write the failing test (RED)
|
|
95
|
-
2. Implement minimal solution (GREEN)
|
|
96
|
-
3. Run tests to confirm pass
|
|
97
|
-
4. Refactor if needed
|
|
98
|
-
5. Run full test suite
|
|
99
|
-
6. Verify no lint/type errors
|
|
100
|
-
|
|
101
|
-
## Reference Documents
|
|
102
|
-
|
|
103
|
-
These steering documents provide detailed guidance:
|
|
104
|
-
|
|
105
|
-
| Document | Content |
|
|
106
|
-
|----------|---------|
|
|
107
|
-
| `tdd-guideline.md` | TDD methodology, test pyramid, Red-Green-Refactor |
|
|
108
|
-
| `principles.md` | SOLID, DRY, KISS, YAGNI, Separation of Concerns |
|
|
109
|
-
| `linus-review.md` | Code quality, "good taste", simplicity standards |
|
|
110
|
-
| `owasp-top10-check.md` | Security checklist (OWASP Top 10) |
|
|
23
|
+
If the work genuinely decomposes into at least two independent slices, they may run concurrently; otherwise keep it in the parent.
|
|
111
24
|
|
|
112
25
|
## Output
|
|
113
26
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
```markdown
|
|
117
|
-
## Implementation Summary
|
|
118
|
-
|
|
119
|
-
**Task:** {what was implemented}
|
|
120
|
-
|
|
121
|
-
**Changes:**
|
|
122
|
-
- {file1}: {what changed}
|
|
123
|
-
- {file2}: {what changed}
|
|
124
|
-
|
|
125
|
-
**Tests Added:**
|
|
126
|
-
- {test description}
|
|
127
|
-
|
|
128
|
-
**Principles Applied:**
|
|
129
|
-
- TDD: {how TDD was followed}
|
|
130
|
-
- Design: {which principles were applied}
|
|
131
|
-
- Security: {security considerations}
|
|
132
|
-
|
|
133
|
-
**Ready for:** {commit / further review / testing}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Example
|
|
137
|
-
|
|
138
|
-
```
|
|
139
|
-
User: /simple-task add a logout button to the navbar
|
|
140
|
-
|
|
141
|
-
Claude:
|
|
142
|
-
1. Understand: Add logout button that clears session and redirects to login
|
|
143
|
-
2. TDD: Write test for logout functionality first
|
|
144
|
-
3. Principles: Single responsibility - logout logic in AuthService
|
|
145
|
-
4. Security: Ensure session is properly invalidated
|
|
146
|
-
5. Implement: Button component + logout handler
|
|
147
|
-
6. Test: Verify all tests pass
|
|
148
|
-
```
|
|
27
|
+
Report changed paths, behavior protected, failing and passing focused test evidence, security considerations, and unresolved blockers.
|
|
149
28
|
|
|
150
|
-
##
|
|
29
|
+
## Optional Reference
|
|
151
30
|
|
|
152
|
-
|
|
31
|
+
Read [REFERENCE.md](REFERENCE.md) only for scope examples, TDD reminders, or the completion checklist.
|
package/templates/CLAUDE.md
CHANGED
|
@@ -1,43 +1,31 @@
|
|
|
1
|
-
# CLAUDE.md — Spec-Driven Development
|
|
1
|
+
# CLAUDE.md — Spec-Driven Development
|
|
2
2
|
|
|
3
|
-
This project uses
|
|
3
|
+
This project uses `sdd-mcp-server` with manual-only skills and the canonical v4 MCP runtime.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Development paths
|
|
6
6
|
|
|
7
|
-
###
|
|
8
|
-
For small features, bug fixes, and quick enhancements.
|
|
7
|
+
### Simple task
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
For complex features requiring formal specification.
|
|
9
|
+
Invoke `/simple-task` for a small feature, bug fix, or focused enhancement.
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
### Formal SDD
|
|
12
|
+
|
|
13
|
+
For work requiring approved requirements, design, and TDD tasks:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
sdd-init → /sdd-requirements → sdd-approve → /sdd-design → sdd-approve → /sdd-tasks → optional test review → sdd-approve → /sdd-implement
|
|
15
17
|
```
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
Use the installed `sdd-*` MCP tools for state changes and compact context by default. Feature-scoped calls use `featureName`, not `projectId`.
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
For continuation, call `sdd-context-load` with `featureName`; retain the returned `fingerprint` and send it as `ifNoneMatch` on the next identical request. A `not-modified` result means the prior payload remains current and must not be requested or repeated again.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
## Model execution
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Claude applies the routed model to the current skill turn: Opus for requirements, design, review, and security; Sonnet for implementation and TDD. Execute in this turn and do not spawn a second specialist merely to switch models. Commit work remains in the current turn.
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|------|-------------|
|
|
27
|
-
| `sdd-init` | Initialize new SDD spec |
|
|
28
|
-
| `sdd-status` | Check workflow progress |
|
|
29
|
-
| `sdd-approve` | Approve workflow phases |
|
|
30
|
-
| `sdd-quality-check` | Code quality analysis |
|
|
31
|
-
| `sdd-context-load` | Load project context |
|
|
32
|
-
| `sdd-validate-design` | Design quality validation |
|
|
33
|
-
| `sdd-validate-gap` | Implementation gap analysis |
|
|
34
|
-
| `sdd-spec-impl` | Execute tasks with TDD |
|
|
27
|
+
## Installed components
|
|
35
28
|
|
|
36
|
-
|
|
29
|
+
The installer appends only selected components and their effective paths. Detailed rules and references load on demand; path-scoped rule bodies are not imported into this root file.
|
|
37
30
|
|
|
38
|
-
|
|
39
|
-
2. **Steering** (optional): `/sdd-steering` to generate project-specific docs
|
|
40
|
-
3. **Specify**: `sdd-init` → `/sdd-requirements` → `/sdd-design` → `/sdd-tasks` (approve each phase)
|
|
41
|
-
4. **Implement**: `/sdd-implement` or `sdd-spec-impl`
|
|
42
|
-
5. **Review**: `sdd-quality-check`
|
|
43
|
-
6. **Commit**: `/sdd-commit`
|
|
31
|
+
To update untouched generated guidance automatically, rerun the installer. User-modified managed files are preserved. A legacy refresh uses `--refresh-generated` and stores reversible backups under `.sdd-mcp/backups/<timestamp>/claude-code/`.
|
package/rules/git-workflow.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-workflow
|
|
3
|
-
description: Git commit and branching conventions
|
|
4
|
-
priority: 80
|
|
5
|
-
alwaysActive: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Git Workflow Rules
|
|
9
|
-
|
|
10
|
-
## Commit Messages
|
|
11
|
-
|
|
12
|
-
### Format
|
|
13
|
-
```
|
|
14
|
-
<type>(<scope>): <subject>
|
|
15
|
-
|
|
16
|
-
<body>
|
|
17
|
-
|
|
18
|
-
<footer>
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Types
|
|
22
|
-
- **feat**: New feature
|
|
23
|
-
- **fix**: Bug fix
|
|
24
|
-
- **docs**: Documentation only changes
|
|
25
|
-
- **style**: Code style changes (formatting, semicolons)
|
|
26
|
-
- **refactor**: Code change that neither fixes a bug nor adds a feature
|
|
27
|
-
- **perf**: Performance improvement
|
|
28
|
-
- **test**: Adding or updating tests
|
|
29
|
-
- **chore**: Build process or auxiliary tool changes
|
|
30
|
-
|
|
31
|
-
### Subject Line
|
|
32
|
-
- Use imperative mood ("add" not "added")
|
|
33
|
-
- No period at the end
|
|
34
|
-
- Maximum 50 characters
|
|
35
|
-
- Capitalize first letter
|
|
36
|
-
|
|
37
|
-
### Body
|
|
38
|
-
- Explain "what" and "why", not "how"
|
|
39
|
-
- Wrap at 72 characters
|
|
40
|
-
- Separate from subject with blank line
|
|
41
|
-
|
|
42
|
-
### Examples
|
|
43
|
-
```
|
|
44
|
-
feat(auth): add JWT token refresh endpoint
|
|
45
|
-
|
|
46
|
-
Implement automatic token refresh to improve user experience.
|
|
47
|
-
Tokens are refreshed 5 minutes before expiration.
|
|
48
|
-
|
|
49
|
-
Closes #123
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
```
|
|
53
|
-
fix(api): handle null response from external service
|
|
54
|
-
|
|
55
|
-
The external payment API occasionally returns null instead of
|
|
56
|
-
an error object. This caused unhandled exceptions in production.
|
|
57
|
-
|
|
58
|
-
Fixes #456
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
## Branching Strategy
|
|
62
|
-
|
|
63
|
-
### Branch Types
|
|
64
|
-
- **main/master**: Production-ready code
|
|
65
|
-
- **develop**: Integration branch for features
|
|
66
|
-
- **feature/**: New features (`feature/add-user-auth`)
|
|
67
|
-
- **fix/**: Bug fixes (`fix/login-validation`)
|
|
68
|
-
- **refactor/**: Code refactoring (`refactor/better-architecture`)
|
|
69
|
-
|
|
70
|
-
### Branch Naming
|
|
71
|
-
- Use lowercase with hyphens
|
|
72
|
-
- Include ticket number if applicable
|
|
73
|
-
- Keep names descriptive but concise
|
|
74
|
-
|
|
75
|
-
## Pull Requests
|
|
76
|
-
|
|
77
|
-
### Before Creating PR
|
|
78
|
-
- Rebase on latest target branch
|
|
79
|
-
- Run all tests locally
|
|
80
|
-
- Update documentation if needed
|
|
81
|
-
- Self-review your changes
|
|
82
|
-
|
|
83
|
-
### PR Description
|
|
84
|
-
- Reference related issues
|
|
85
|
-
- Describe what changed and why
|
|
86
|
-
- Include testing instructions
|
|
87
|
-
- Add screenshots for UI changes
|
|
88
|
-
|
|
89
|
-
### Review Process
|
|
90
|
-
- Address all review comments
|
|
91
|
-
- Don't force-push after review started
|
|
92
|
-
- Squash commits when merging (if team policy)
|
package/rules/sdd-workflow.md
DELETED
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sdd-workflow
|
|
3
|
-
description: Spec-Driven Development process rules
|
|
4
|
-
priority: 85
|
|
5
|
-
alwaysActive: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# SDD Workflow Rules
|
|
9
|
-
|
|
10
|
-
## Spec-Driven Development Process
|
|
11
|
-
|
|
12
|
-
### Phase Order
|
|
13
|
-
Follow the SDD phases in strict order:
|
|
14
|
-
|
|
15
|
-
1. **Initialize** (`sdd-init`)
|
|
16
|
-
- Define feature name and description
|
|
17
|
-
- Answer clarification questions
|
|
18
|
-
- Create spec directory structure
|
|
19
|
-
|
|
20
|
-
2. **Requirements** (`sdd-requirements`)
|
|
21
|
-
- Generate EARS-formatted requirements
|
|
22
|
-
- Define acceptance criteria
|
|
23
|
-
- Identify constraints and assumptions
|
|
24
|
-
|
|
25
|
-
3. **Design** (`sdd-design`)
|
|
26
|
-
- Create technical design specifications
|
|
27
|
-
- Define component architecture
|
|
28
|
-
- Document interfaces and data flows
|
|
29
|
-
|
|
30
|
-
4. **Tasks** (`sdd-tasks`)
|
|
31
|
-
- Break down into implementable tasks
|
|
32
|
-
- Apply TDD methodology
|
|
33
|
-
- Estimate complexity
|
|
34
|
-
|
|
35
|
-
5. **Implement** (`sdd-implement`)
|
|
36
|
-
- Follow TDD (Red-Green-Refactor)
|
|
37
|
-
- Reference steering documents
|
|
38
|
-
- Update spec status
|
|
39
|
-
|
|
40
|
-
## EARS Requirements Format
|
|
41
|
-
|
|
42
|
-
Use Easy Approach to Requirements Syntax:
|
|
43
|
-
|
|
44
|
-
| Pattern | Template | Use Case |
|
|
45
|
-
|---------|----------|----------|
|
|
46
|
-
| Ubiquitous | The `<system>` SHALL `<action>` | Always true |
|
|
47
|
-
| Event-Driven | WHEN `<trigger>` THEN the `<system>` SHALL `<action>` | Response to event |
|
|
48
|
-
| State-Driven | WHILE `<state>` THE `<system>` SHALL `<action>` | During state |
|
|
49
|
-
| Optional | WHERE `<feature>` THE `<system>` SHALL `<action>` | Configurable |
|
|
50
|
-
| Unwanted | IF `<condition>` THEN the `<system>` SHALL `<action>` | Exception |
|
|
51
|
-
|
|
52
|
-
### Example
|
|
53
|
-
```markdown
|
|
54
|
-
## FR-1: User Authentication
|
|
55
|
-
WHEN a user submits valid credentials
|
|
56
|
-
THEN the system SHALL authenticate the user and return a session token
|
|
57
|
-
|
|
58
|
-
**Acceptance Criteria:**
|
|
59
|
-
1. Token expires after 24 hours of inactivity
|
|
60
|
-
2. Invalid credentials return 401 error
|
|
61
|
-
3. Rate limiting prevents brute force attempts
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Steering Documents
|
|
65
|
-
|
|
66
|
-
### Always Reference
|
|
67
|
-
- `.spec/steering/tdd-guideline.md` - TDD methodology
|
|
68
|
-
- `.spec/steering/principles.md` - SOLID, DRY, KISS, YAGNI
|
|
69
|
-
- `.spec/steering/linus-review.md` - Code review standards
|
|
70
|
-
|
|
71
|
-
### When to Reference
|
|
72
|
-
- Before writing any code, review relevant steering docs
|
|
73
|
-
- During code review, verify compliance
|
|
74
|
-
- When refactoring, ensure principles are maintained
|
|
75
|
-
|
|
76
|
-
## Approval Gates
|
|
77
|
-
|
|
78
|
-
### Requirements Approval
|
|
79
|
-
Before proceeding to design:
|
|
80
|
-
- [ ] All requirements use EARS format
|
|
81
|
-
- [ ] Each requirement is testable
|
|
82
|
-
- [ ] Acceptance criteria are specific
|
|
83
|
-
- [ ] Constraints are documented
|
|
84
|
-
|
|
85
|
-
### Design Approval
|
|
86
|
-
Before proceeding to tasks:
|
|
87
|
-
- [ ] Architecture diagram included
|
|
88
|
-
- [ ] Interfaces defined
|
|
89
|
-
- [ ] Dependencies identified
|
|
90
|
-
- [ ] Security considerations addressed
|
|
91
|
-
|
|
92
|
-
### Tasks Approval
|
|
93
|
-
Before proceeding to implementation:
|
|
94
|
-
- [ ] Tasks follow TDD structure
|
|
95
|
-
- [ ] Complexity estimated
|
|
96
|
-
- [ ] Dependencies mapped
|
|
97
|
-
- [ ] Steering doc references included
|
|
98
|
-
|
|
99
|
-
## Spec File Locations
|
|
100
|
-
|
|
101
|
-
```
|
|
102
|
-
.spec/
|
|
103
|
-
├── steering/ # Project-wide rules
|
|
104
|
-
│ ├── product.md
|
|
105
|
-
│ ├── tech.md
|
|
106
|
-
│ ├── structure.md
|
|
107
|
-
│ ├── tdd-guideline.md
|
|
108
|
-
│ ├── principles.md
|
|
109
|
-
│ └── linus-review.md
|
|
110
|
-
└── specs/ # Feature specifications
|
|
111
|
-
└── {feature-name}/
|
|
112
|
-
├── spec.json
|
|
113
|
-
├── requirements.md
|
|
114
|
-
├── design.md
|
|
115
|
-
└── tasks.md
|
|
116
|
-
```
|