speckeeper 0.9.2 → 0.9.3
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 +2 -0
- package/cli-contract.yaml +574 -0
- package/docs/cli-reference.md +449 -0
- package/docs/design/actors.md +72 -0
- package/docs/design/arch-actors.md +42 -0
- package/docs/design/artifacts.md +69 -0
- package/docs/design/cli-commands.md +332 -0
- package/docs/design/constraints.md +66 -0
- package/docs/design/containers.md +86 -0
- package/docs/design/entities.md +161 -0
- package/docs/design/external-systems.md +42 -0
- package/docs/design/functional-requirements.md +810 -0
- package/docs/design/glossary.md +242 -0
- package/docs/design/nonfunctional-requirements.md +242 -0
- package/docs/design/test-refs.md +258 -0
- package/docs/design/usecases.md +114 -0
- package/docs/directory-entries.md +22 -0
- package/docs/framework_requirements_spec.md +1052 -0
- package/docs/model-guide.md +762 -0
- package/docs/model_entity_catalog.md +67 -0
- package/docs/scaffold-mermaid-spec.md +357 -0
- package/package.json +7 -2
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Test Reference List
|
|
2
|
+
|
|
3
|
+
| ID | Description | Framework | Requirements Count |
|
|
4
|
+
|----|-------------|-----------|-------------------|
|
|
5
|
+
| TEST-003 | Config file loading utility verification test | vitest | 1 |
|
|
6
|
+
| TEST-004 | File writing utility verification test | vitest | 1 |
|
|
7
|
+
| TEST-018 | Model level configuration feature verification test | vitest | 1 |
|
|
8
|
+
| TEST-019 | Project initialization feature verification test | vitest | 1 |
|
|
9
|
+
| TEST-020 | Lint command verification test | vitest | 2 |
|
|
10
|
+
| TEST-021 | Check command verification test | vitest | 2 |
|
|
11
|
+
| TEST-022 | Build command verification test | vitest | 2 |
|
|
12
|
+
| TEST-023 | Impact command verification test | vitest | 1 |
|
|
13
|
+
| TEST-024 | Drift command verification test | vitest | 1 |
|
|
14
|
+
| TEST-025 | New command verification test | vitest | 1 |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## TEST-003: Config file loading utility verification test
|
|
19
|
+
|
|
20
|
+
### Test Source
|
|
21
|
+
|
|
22
|
+
- **Path**: `test/utils/config-loader.test.ts`
|
|
23
|
+
- **Framework**: vitest
|
|
24
|
+
- **Result JSON**: `test-results/all.json`
|
|
25
|
+
|
|
26
|
+
### Verified Requirements
|
|
27
|
+
|
|
28
|
+
- CR-002
|
|
29
|
+
|
|
30
|
+
### Test Case Patterns
|
|
31
|
+
|
|
32
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
33
|
+
|------------------------|---------|-------------|
|
|
34
|
+
| CR-002-01 | `default config|no config file` | Default config test |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## TEST-004: File writing utility verification test
|
|
39
|
+
|
|
40
|
+
### Test Source
|
|
41
|
+
|
|
42
|
+
- **Path**: `test/utils/file-writer.test.ts`
|
|
43
|
+
- **Framework**: vitest
|
|
44
|
+
- **Result JSON**: `test-results/all.json`
|
|
45
|
+
|
|
46
|
+
### Verified Requirements
|
|
47
|
+
|
|
48
|
+
- FR-300
|
|
49
|
+
|
|
50
|
+
### Test Case Patterns
|
|
51
|
+
|
|
52
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
53
|
+
|------------------------|---------|-------------|
|
|
54
|
+
| FR-300-01 | `write.*file|file.*writ` | File output test |
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## TEST-018: Model level configuration feature verification test
|
|
59
|
+
|
|
60
|
+
### Test Source
|
|
61
|
+
|
|
62
|
+
- **Path**: `test/core/model-level.test.ts`
|
|
63
|
+
- **Framework**: vitest
|
|
64
|
+
- **Result JSON**: `test-results/all.json`
|
|
65
|
+
|
|
66
|
+
### Verified Requirements
|
|
67
|
+
|
|
68
|
+
- FR-104
|
|
69
|
+
|
|
70
|
+
### Test Case Patterns
|
|
71
|
+
|
|
72
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
73
|
+
|------------------------|---------|-------------|
|
|
74
|
+
| FR-104-08 | `FR-104-08.*modelLevel configuration` | modelLevel setting test |
|
|
75
|
+
| FR-104-09 | `FR-104-09.*level.*property` | level property retrieval test |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## TEST-019: Project initialization feature verification test
|
|
80
|
+
|
|
81
|
+
### Test Source
|
|
82
|
+
|
|
83
|
+
- **Path**: `test/cli/init.test.ts`
|
|
84
|
+
- **Framework**: vitest
|
|
85
|
+
- **Result JSON**: `test-results/all.json`
|
|
86
|
+
|
|
87
|
+
### Verified Requirements
|
|
88
|
+
|
|
89
|
+
- FR-105
|
|
90
|
+
|
|
91
|
+
### Implemented Command
|
|
92
|
+
|
|
93
|
+
- CMD-INIT
|
|
94
|
+
|
|
95
|
+
### Test Case Patterns
|
|
96
|
+
|
|
97
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
98
|
+
|------------------------|---------|-------------|
|
|
99
|
+
| FR-105-01 | `FR-105-01.*creates design/` | Design directory creation test |
|
|
100
|
+
| FR-105-02 | `FR-105-02.*speckeeper.config.ts` | Config file generation test |
|
|
101
|
+
| FR-105-03 | `FR-105-03.*package.json` | Package.json generation test |
|
|
102
|
+
| FR-105-04 | `FR-105-04.*tsconfig.json` | tsconfig.json generation test |
|
|
103
|
+
| FR-105-05 | `FR-105-05.*model definitions` | Model definitions generation test |
|
|
104
|
+
| FR-105-06 | `FR-105-06.*sample specification` | Sample specification generation test |
|
|
105
|
+
| FR-105-07 | `FR-105-07.*speckeeper lint` | Generated project lint test |
|
|
106
|
+
| FR-105-08 | `FR-105-08.*typecheck` | Generated project typecheck test |
|
|
107
|
+
| FR-105-09 | `FR-105-09.*--force` | Force overwrite test |
|
|
108
|
+
| FR-105-10 | `FR-105-10.*skips package.json` | Skip existing package.json test |
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## TEST-020: Lint command verification test
|
|
113
|
+
|
|
114
|
+
### Test Source
|
|
115
|
+
|
|
116
|
+
- **Path**: `test/cli/lint.test.ts`
|
|
117
|
+
- **Framework**: vitest
|
|
118
|
+
|
|
119
|
+
### Verified Requirements
|
|
120
|
+
|
|
121
|
+
- FR-401
|
|
122
|
+
- FR-402
|
|
123
|
+
|
|
124
|
+
### Implemented Command
|
|
125
|
+
|
|
126
|
+
- CMD-LINT
|
|
127
|
+
|
|
128
|
+
### Test Case Patterns
|
|
129
|
+
|
|
130
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
131
|
+
|------------------------|---------|-------------|
|
|
132
|
+
| FR-401-01 | `FR-401-01.*lintAll.*exits.*code 1` | Error-severity results trigger exit(1) |
|
|
133
|
+
| FR-401-03 | `FR-401-03.*exits.*code 1.*error message` | Ref-exists error triggers exit and output |
|
|
134
|
+
| FR-402-01 | `FR-402-01.*lintAll.*outputs warning` | Warnings output without exit |
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## TEST-021: Check command verification test
|
|
139
|
+
|
|
140
|
+
### Test Source
|
|
141
|
+
|
|
142
|
+
- **Path**: `test/cli/check.test.ts`
|
|
143
|
+
- **Framework**: vitest
|
|
144
|
+
|
|
145
|
+
### Verified Requirements
|
|
146
|
+
|
|
147
|
+
- FR-602
|
|
148
|
+
- FR-603
|
|
149
|
+
|
|
150
|
+
### Implemented Command
|
|
151
|
+
|
|
152
|
+
- CMD-CHECK
|
|
153
|
+
|
|
154
|
+
### Test Case Patterns
|
|
155
|
+
|
|
156
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
157
|
+
|------------------------|---------|-------------|
|
|
158
|
+
| FR-602-01 | `FR-602-01.*check.*consistency` | Check runs external SSOT check |
|
|
159
|
+
| FR-602-04 | `FR-602-04.*skips.*without external` | Skips models without external source |
|
|
160
|
+
| FR-603-03 | `FR-603-03.*exits.*code 1.*outputs.*error` | Outputs error/warning messages and exits |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## TEST-022: Build command verification test
|
|
165
|
+
|
|
166
|
+
### Test Source
|
|
167
|
+
|
|
168
|
+
- **Path**: `test/cli/build.test.ts`
|
|
169
|
+
- **Framework**: vitest
|
|
170
|
+
|
|
171
|
+
### Verified Requirements
|
|
172
|
+
|
|
173
|
+
- FR-300
|
|
174
|
+
- FR-301
|
|
175
|
+
|
|
176
|
+
### Implemented Command
|
|
177
|
+
|
|
178
|
+
- CMD-BUILD
|
|
179
|
+
|
|
180
|
+
### Test Case Patterns
|
|
181
|
+
|
|
182
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
183
|
+
|------------------------|---------|-------------|
|
|
184
|
+
| FR-300-01 | `FR-300-01.*exporter\.single.*batchWriteFiles` | Calls exporter and passes to batchWriteFiles |
|
|
185
|
+
| FR-301-05 | `FR-301-05.*exporter\.single.*identical arguments` | Same arguments on repeated builds |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## TEST-023: Impact command verification test
|
|
190
|
+
|
|
191
|
+
### Test Source
|
|
192
|
+
|
|
193
|
+
- **Path**: `test/cli/impact.test.ts`
|
|
194
|
+
- **Framework**: vitest
|
|
195
|
+
|
|
196
|
+
### Verified Requirements
|
|
197
|
+
|
|
198
|
+
- FR-700
|
|
199
|
+
|
|
200
|
+
### Implemented Command
|
|
201
|
+
|
|
202
|
+
- CMD-IMPACT
|
|
203
|
+
|
|
204
|
+
### Test Case Patterns
|
|
205
|
+
|
|
206
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
207
|
+
|------------------------|---------|-------------|
|
|
208
|
+
| FR-700-01 | `FR-700-01.*target info.*analysis phase` | Reaches analysis phase for valid ID |
|
|
209
|
+
| FR-700-03 | `FR-700-03.*depth value.*--depth` | Outputs depth from --depth option |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## TEST-024: Drift command verification test
|
|
214
|
+
|
|
215
|
+
### Test Source
|
|
216
|
+
|
|
217
|
+
- **Path**: `test/cli/drift.test.ts`
|
|
218
|
+
- **Framework**: vitest
|
|
219
|
+
|
|
220
|
+
### Verified Requirements
|
|
221
|
+
|
|
222
|
+
- FR-500
|
|
223
|
+
|
|
224
|
+
### Implemented Command
|
|
225
|
+
|
|
226
|
+
- CMD-DRIFT
|
|
227
|
+
|
|
228
|
+
### Test Case Patterns
|
|
229
|
+
|
|
230
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
231
|
+
|------------------------|---------|-------------|
|
|
232
|
+
| FR-500-01 | `FR-500-01.*No drift detected.*content match` | No drift when content matches |
|
|
233
|
+
| FR-500-02 | `FR-500-02.*exits.*code 1.*failOnDrift` | Exits with code 1 on failOnDrift |
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## TEST-025: New command verification test
|
|
238
|
+
|
|
239
|
+
### Test Source
|
|
240
|
+
|
|
241
|
+
- **Path**: `test/cli/new.test.ts`
|
|
242
|
+
- **Framework**: vitest
|
|
243
|
+
|
|
244
|
+
### Verified Requirements
|
|
245
|
+
|
|
246
|
+
- FR-104
|
|
247
|
+
|
|
248
|
+
### Implemented Command
|
|
249
|
+
|
|
250
|
+
- CMD-NEW
|
|
251
|
+
|
|
252
|
+
### Test Case Patterns
|
|
253
|
+
|
|
254
|
+
| Acceptance Criteria ID | Pattern | Description |
|
|
255
|
+
|------------------------|---------|-------------|
|
|
256
|
+
| FR-104-01 | `FR-104-01.*available model types header` | Outputs model types header when type omitted |
|
|
257
|
+
|
|
258
|
+
---
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Use Cases
|
|
2
|
+
|
|
3
|
+
| ID | Name | Actor |
|
|
4
|
+
|----|------|-------|
|
|
5
|
+
| UC-001 | Define Requirements | UC-ACTOR-001 |
|
|
6
|
+
| UC-002 | Define Architecture | UC-ACTOR-002 |
|
|
7
|
+
| UC-004 | Define Concept Model | UC-ACTOR-002 |
|
|
8
|
+
| UC-006 | Check External SSOT Consistency | UC-ACTOR-003 |
|
|
9
|
+
| UC-010 | Check Design Consistency | UC-ACTOR-SYS-001 |
|
|
10
|
+
| UC-011 | Detect Drift | UC-ACTOR-SYS-001 |
|
|
11
|
+
| UC-012 | Check Contract Consistency | UC-ACTOR-SYS-001 |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## UC-001: Define Requirements
|
|
16
|
+
|
|
17
|
+
**Actor**: UC-ACTOR-001
|
|
18
|
+
|
|
19
|
+
### Main Flow
|
|
20
|
+
|
|
21
|
+
1. Requirements engineer creates or edits design/requirements.ts
|
|
22
|
+
2. IDE displays type completion and validation errors
|
|
23
|
+
3. Define requirements using DSL
|
|
24
|
+
4. DSL builder validates input
|
|
25
|
+
5. Run speckeeper build
|
|
26
|
+
6. Markdown is generated in docs/requirements/
|
|
27
|
+
7. Run speckeeper lint
|
|
28
|
+
8. Requirement consistency is verified
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## UC-002: Define Architecture
|
|
33
|
+
|
|
34
|
+
**Actor**: UC-ACTOR-002
|
|
35
|
+
|
|
36
|
+
### Main Flow
|
|
37
|
+
|
|
38
|
+
1. Create or edit design/architecture.ts
|
|
39
|
+
2. IDE displays type completion
|
|
40
|
+
3. Define components and relationships
|
|
41
|
+
4. DSL builder validates input
|
|
42
|
+
5. Run speckeeper build
|
|
43
|
+
6. Mermaid C4 diagram is generated in docs/architecture/
|
|
44
|
+
7. Run speckeeper lint
|
|
45
|
+
8. Layer violations, boundary crossings, etc. are verified
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## UC-004: Define Concept Model
|
|
50
|
+
|
|
51
|
+
**Actor**: UC-ACTOR-002
|
|
52
|
+
|
|
53
|
+
### Main Flow
|
|
54
|
+
|
|
55
|
+
1. Create or edit design/concept-model.ts
|
|
56
|
+
2. IDE displays type completion
|
|
57
|
+
3. Define entities and relations
|
|
58
|
+
4. Run speckeeper build
|
|
59
|
+
5. Mermaid ER diagram is generated in docs/data-model/
|
|
60
|
+
6. Common vocabulary JSON is generated in specs/schemas/
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## UC-006: Check External SSOT Consistency
|
|
65
|
+
|
|
66
|
+
**Actor**: UC-ACTOR-003
|
|
67
|
+
|
|
68
|
+
### Main Flow
|
|
69
|
+
|
|
70
|
+
1. Run speckeeper check external-ssot
|
|
71
|
+
2. Load OpenAPI/DDL files
|
|
72
|
+
3. Verify requirement-external SSOT consistency
|
|
73
|
+
4. Display verification results
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## UC-010: Check Design Consistency
|
|
78
|
+
|
|
79
|
+
**Actor**: UC-ACTOR-SYS-001
|
|
80
|
+
|
|
81
|
+
### Main Flow
|
|
82
|
+
|
|
83
|
+
1. Run speckeeper lint
|
|
84
|
+
2. Verify ID uniqueness
|
|
85
|
+
3. Verify reference integrity
|
|
86
|
+
4. Verify layer dependency direction
|
|
87
|
+
5. Display verification results to stdout
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## UC-011: Detect Drift
|
|
92
|
+
|
|
93
|
+
**Actor**: UC-ACTOR-SYS-001
|
|
94
|
+
|
|
95
|
+
### Main Flow
|
|
96
|
+
|
|
97
|
+
1. Run speckeeper drift
|
|
98
|
+
2. Regenerate artifacts from TS models
|
|
99
|
+
3. Compare existing artifacts with regenerated artifacts
|
|
100
|
+
4. Report if differences exist
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## UC-012: Check Contract Consistency
|
|
105
|
+
|
|
106
|
+
**Actor**: UC-ACTOR-SYS-001
|
|
107
|
+
|
|
108
|
+
### Main Flow
|
|
109
|
+
|
|
110
|
+
1. Run speckeeper check contract
|
|
111
|
+
2. Compare implementation and contract definition
|
|
112
|
+
3. Report if violations exist
|
|
113
|
+
|
|
114
|
+
---
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
```
|
|
2
|
+
├── design/ # TypeScript (source of truth) = upstream SSOT (requirement/design models)
|
|
3
|
+
│ ├── _models/ # Model definitions (schemas, lint rules, exporters)
|
|
4
|
+
│ ├── requirements.ts # Requirement definitions
|
|
5
|
+
│ ├── usecases.ts # Use case and actor definitions
|
|
6
|
+
│ ├── architecture.ts # Logical architecture (C4 System/Container)
|
|
7
|
+
│ ├── concept-model.ts # Concept model (Entity/Relation)
|
|
8
|
+
│ ├── glossary.ts # Glossary
|
|
9
|
+
│ ├── artifacts.ts # Artifact and directory structure definitions
|
|
10
|
+
│ └── cli-commands.ts # CLI command specifications
|
|
11
|
+
├── docs/ # Human-readable documents (auto-updated via embedoc)
|
|
12
|
+
│ ├── framework_requirements_spec.md # Framework requirements specification (sections auto-updated via embedoc)
|
|
13
|
+
│ ├── model-design.md # Model design guide
|
|
14
|
+
│ ├── model-guide.md # Model definition guide
|
|
15
|
+
│ ├── model_entity_catalog.md # Model and entity catalog
|
|
16
|
+
│ └── framework_evaluation.md # Framework evaluation
|
|
17
|
+
├── specs/ # Machine-readable artifacts (JSON Schema for consistency checking)
|
|
18
|
+
│ ├── schemas/ # JSON Schema
|
|
19
|
+
│ │ └── entities/ # Entity JSON Schema (E-001.json, etc.)
|
|
20
|
+
│ └── index.json # Aggregated data (reference graph for all models)
|
|
21
|
+
└── src/ # Application implementation code (not managed by speckeeper)
|
|
22
|
+
```
|