speccrew 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.
Files changed (153) hide show
  1. package/.speccrew/agents/speccrew-feature-designer.md +142 -0
  2. package/.speccrew/agents/speccrew-product-manager.md +61 -0
  3. package/.speccrew/agents/speccrew-system-designer.md +200 -0
  4. package/.speccrew/agents/speccrew-system-developer.md +238 -0
  5. package/.speccrew/agents/speccrew-task-worker.md +80 -0
  6. package/.speccrew/agents/speccrew-team-leader.md +92 -0
  7. package/.speccrew/agents/speccrew-test-manager.md +313 -0
  8. package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
  9. package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
  10. package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
  11. package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
  12. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
  13. package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
  14. package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
  15. package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
  16. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
  17. package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
  18. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
  19. package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
  20. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
  21. package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
  22. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
  23. package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
  24. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
  25. package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
  26. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
  27. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
  28. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
  29. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
  30. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
  31. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
  32. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
  33. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
  34. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
  35. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
  36. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
  37. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
  38. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
  40. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
  41. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
  42. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
  43. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
  44. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
  45. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
  46. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
  47. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
  48. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
  49. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
  50. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
  52. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
  54. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
  56. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
  57. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
  61. package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
  62. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
  63. package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
  64. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
  65. package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
  66. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
  67. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
  68. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
  70. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
  72. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
  74. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
  75. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
  76. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
  77. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
  78. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
  79. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
  80. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
  81. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
  82. package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
  83. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
  84. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
  85. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
  86. package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
  87. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
  88. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
  89. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
  90. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
  91. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
  92. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
  93. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
  94. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
  95. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
  96. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
  97. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
  98. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
  99. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
  100. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
  101. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
  102. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
  103. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
  104. package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
  105. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
  106. package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
  107. package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
  108. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
  109. package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
  110. package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
  111. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
  112. package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
  113. package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
  114. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
  115. package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
  116. package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
  117. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
  118. package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
  119. package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
  120. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
  121. package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
  122. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
  123. package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
  124. package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
  125. package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
  126. package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
  127. package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
  128. package/LICENSE +21 -0
  129. package/README.ar.md +318 -0
  130. package/README.en.md +318 -0
  131. package/README.es.md +318 -0
  132. package/README.md +340 -0
  133. package/bin/cli.js +62 -0
  134. package/lib/commands/doctor.js +138 -0
  135. package/lib/commands/init.js +231 -0
  136. package/lib/commands/list.js +114 -0
  137. package/lib/commands/uninstall.js +117 -0
  138. package/lib/commands/update.js +351 -0
  139. package/lib/ide-adapters.js +73 -0
  140. package/lib/utils.js +104 -0
  141. package/package.json +28 -0
  142. package/workspace-template/docs/configs/document-templates.json +667 -0
  143. package/workspace-template/docs/configs/platform-mapping.json +194 -0
  144. package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
  145. package/workspace-template/docs/configs/validation-rules.json +87 -0
  146. package/workspace-template/docs/rules/mermaid-rule.md +114 -0
  147. package/workspace-template/docs/solutions/Agent/346/212/200/350/203/275/345/256/232/344/271/211+/351/234/200/346/261/202/346/226/207/346/241/243+UML/344/275/277/347/224/250/346/250/241/346/235/277/357/274/210ISA-95/345/205/255/346/256/265/345/274/217/350/236/215/345/220/210/347/211/210/357/274/211.md +586 -0
  148. package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
  149. package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
  150. package/workspace-template/docs/solutions/harness.md +410 -0
  151. package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
  152. package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
  153. package/workspace-template/docs/solutions/workspace-structure.md +318 -0
@@ -0,0 +1,284 @@
1
+ ---
2
+ name: speccrew-test-case-design
3
+ description: Designs structured test cases from Feature Spec and API Contract documents. Focuses on comprehensive test scenario analysis, test case matrix generation, and coverage traceability without involving any code implementation.
4
+ tools: Read, Write, Glob, Grep
5
+ ---
6
+
7
+ # Trigger Scenarios
8
+
9
+ - When speccrew-test-manager dispatches test case design for a specific platform/feature
10
+ - When user explicitly requests test case design from feature specification
11
+ - When user asks "Design test cases for this feature" or "Create test case matrix"
12
+
13
+ # Workflow
14
+
15
+ ## Step 1: Read Feature Spec
16
+
17
+ Read the feature spec document specified by `feature_spec_path`:
18
+
19
+ **Default Path Pattern:**
20
+ ```
21
+ speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-feature-spec.md
22
+ ```
23
+
24
+ **Extract Key Information:**
25
+
26
+ | Section | What to Extract |
27
+ |---------|-----------------|
28
+ | Interaction Flow Description | User scenarios and interaction flows |
29
+ | Business Rule Constraints | Business rules and validation constraints |
30
+ | Data Field Definition | Field definitions, types, and constraints |
31
+ | Acceptance Criteria | Criteria for feature acceptance |
32
+
33
+ **For Master-Sub PRD Structure:**
34
+ - Read Master Feature Spec for cross-module scenarios
35
+ - Read Sub Feature Specs for module-specific scenarios
36
+
37
+ ## Step 2: Read API Contract
38
+
39
+ If `api_contract_path` is provided, read the API contract document:
40
+
41
+ **Default Path Pattern:**
42
+ ```
43
+ speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-api-contract.md
44
+ ```
45
+
46
+ **Extract API Information:**
47
+
48
+ | Item | What to Extract |
49
+ |------|-----------------|
50
+ | Interface Endpoints | API paths and HTTP methods |
51
+ | Request/Response Format | Request body and response structure |
52
+ | Error Codes | Error code definitions and meanings |
53
+ | Interface Constraints | Rate limits, validation rules, etc. |
54
+
55
+ ## Step 3: Read System Design
56
+
57
+ If `system_design_path` is provided, read the system design document:
58
+
59
+ **Default Path Pattern:**
60
+ ```
61
+ speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/[feature-name]-design.md
62
+ ```
63
+
64
+ **Extract System Context:**
65
+
66
+ | Item | What to Extract |
67
+ |------|-----------------|
68
+ | Module Dependencies | How this feature depends on other modules |
69
+ | Platform Constraints | Platform-specific interaction constraints |
70
+ | Exception Handling | Error handling mechanisms |
71
+ | State Transitions | State flow if applicable |
72
+
73
+ ## Step 3.5: Read Testing Conventions (Optional)
74
+
75
+ If available, read the system testing conventions for the platform:
76
+
77
+ **Path Pattern:**
78
+ ```
79
+ speccrew-workspace/knowledges/techs/{platform_id}/conventions-system-test.md
80
+ ```
81
+
82
+ **Extract Testing Conventions:**
83
+
84
+ | Item | What to Extract |
85
+ |------|-----------------|
86
+ | E2E Framework | End-to-end testing framework (Cypress, Playwright, etc.) |
87
+ | Integration Test Patterns | How integration tests are structured |
88
+ | Test Data Management | Fixtures, seeding, mock strategies |
89
+ | API Contract Testing | Contract testing conventions if applicable |
90
+
91
+ ## Step 4: Analyze Test Dimensions
92
+
93
+ Systematically analyze test dimensions to ensure comprehensive coverage:
94
+
95
+ ### 4.1 Functional Positive Tests (Happy Path)
96
+
97
+ | Analysis Focus | Description |
98
+ |----------------|-------------|
99
+ | Core User Scenarios | Main user flows from entry to completion |
100
+ | Data CRUD Operations | Create, Read, Update, Delete operations |
101
+ | Integration Points | Cross-module or external system interactions |
102
+
103
+ ### 4.2 Boundary Value Tests
104
+
105
+ | Analysis Focus | Description |
106
+ |----------------|-------------|
107
+ | Numeric Boundaries | Min, max, zero, negative values |
108
+ | String Boundaries | Empty, max length, special characters |
109
+ | Time/Date Boundaries | Timezone, date range, format edge cases |
110
+ | Collection Boundaries | Empty list, single item, max items |
111
+
112
+ ### 4.3 Exception/Error Handling Tests
113
+
114
+ | Analysis Focus | Description |
115
+ |----------------|-------------|
116
+ | Input Validation Errors | Invalid format, missing required fields |
117
+ | Business Rule Violations | Constraint violations, state conflicts |
118
+ | System Errors | Timeout, service unavailable |
119
+ | Data Errors | Not found, duplicate, conflict |
120
+
121
+ ### 4.4 Business Rule Constraint Tests
122
+
123
+ | Analysis Focus | Description |
124
+ |----------------|-------------|
125
+ | Permission Rules | Role-based access, authorization checks |
126
+ | Data Constraints | Uniqueness, referential integrity |
127
+ | Workflow Rules | State transitions, approval flows |
128
+ | Calculation Rules | Price calculation, quantity limits |
129
+
130
+ ### 4.5 Permission/Security Tests
131
+
132
+ | Analysis Focus | Description |
133
+ |----------------|-------------|
134
+ | Authentication | Unauthenticated access attempts |
135
+ | Authorization | Unauthorized operation attempts |
136
+ | Data Visibility | Cross-tenant or cross-user data access |
137
+ | Sensitive Data | PII handling, data masking |
138
+
139
+ ### 4.6 Data Validation Tests
140
+
141
+ | Analysis Focus | Description |
142
+ |----------------|-------------|
143
+ | Format Validation | Email, phone, URL formats |
144
+ | Type Validation | String, number, boolean, date types |
145
+ | Constraint Validation | Required fields, length limits, ranges |
146
+ | Relationship Validation | Foreign key references, dependencies |
147
+
148
+ ### 4.7 State Transition Tests (If Applicable)
149
+
150
+ | Analysis Focus | Description |
151
+ |----------------|-------------|
152
+ | Valid Transitions | Allowed state changes |
153
+ | Invalid Transitions | Prohibited state changes |
154
+ | Concurrent Transitions | Race conditions, locking |
155
+
156
+ ## Step 5: Generate Test Case Matrix
157
+
158
+ Generate structured test cases based on the analysis. Each test case must include:
159
+
160
+ ### 5.1 Test Case Naming Convention
161
+
162
+ **Format:** `TC-{MODULE}-{SEQ}`
163
+
164
+ | Component | Description | Example |
165
+ |-----------|-------------|---------|
166
+ | TC | Fixed prefix | TC |
167
+ | MODULE | Module abbreviation (3-4 letters) | ORD, USR, PRD |
168
+ | SEQ | Sequence number (3 digits) | 001, 002, 003 |
169
+
170
+ **Examples:**
171
+ - `TC-ORD-001` - Order module, test case 1
172
+ - `TC-USR-015` - User module, test case 15
173
+ - `TC-PRD-003` - Product module, test case 3
174
+
175
+ ### 5.2 Test Case Structure
176
+
177
+ Each test case contains:
178
+
179
+ | Field | Description |
180
+ |-------|-------------|
181
+ | TC ID | Unique identifier following naming convention |
182
+ | Category | Test dimension classification |
183
+ | Description | Brief description of what is being tested |
184
+ | Preconditions | Required state before test execution |
185
+ | Steps | Numbered list of test execution steps |
186
+ | Input Data | Test data description or reference |
187
+ | Expected Result | Expected outcome after execution |
188
+ | Priority | P0-Critical / P1-High / P2-Medium / P3-Low |
189
+
190
+ ### 5.3 Priority Definition
191
+
192
+ | Priority | Definition | Example Scenarios |
193
+ |----------|------------|-------------------|
194
+ | P0-Critical | Core functionality, blocks release | Happy path of main feature, security vulnerabilities |
195
+ | P1-High | Important functionality, significant impact | Key business rules, main error handling |
196
+ | P2-Medium | Standard functionality, moderate impact | Edge cases, secondary flows |
197
+ | P3-Low | Minor functionality, low impact | UI polish, rare edge cases |
198
+
199
+ ## Step 6: Coverage Self-Check
200
+
201
+ ### 6.1 Acceptance Criteria Coverage
202
+
203
+ Cross-reference test cases against Feature Spec acceptance criteria:
204
+
205
+ ```
206
+ For each acceptance criterion:
207
+ 1. Find corresponding test case(s)
208
+ 2. Verify test case fully validates the criterion
209
+ 3. Mark coverage status
210
+ ```
211
+
212
+ ### 6.2 Coverage Traceability Matrix
213
+
214
+ Generate a matrix mapping requirements to test cases:
215
+
216
+ | Requirement ID | Requirement Description | Test Case IDs | Coverage Status |
217
+ |----------------|------------------------|---------------|-----------------|
218
+ | REQ-001 | {requirement text} | TC-{MOD}-001, TC-{MOD}-002 | Covered |
219
+ | REQ-002 | {requirement text} | - | Not Covered |
220
+
221
+ ### 6.3 Uncovered Items Handling
222
+
223
+ For any uncovered acceptance criteria:
224
+
225
+ | Status | Action |
226
+ |--------|--------|
227
+ | Not Covered | Create new test case(s) or document reason for exclusion |
228
+ | Partially Covered | Add additional test cases for missing scenarios |
229
+
230
+ ## Step 7: Write Output
231
+
232
+ ### 7.1 Determine Output Path
233
+
234
+ **Test Case Design Document:**
235
+ ```
236
+ speccrew-workspace/iterations/{number}-{type}-{name}/05.tests/cases/[feature-name]-test-case-design.md
237
+ ```
238
+
239
+ ### 7.2 Read Template
240
+
241
+ Read the template file:
242
+ ```
243
+ speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md
244
+ ```
245
+
246
+ ### 7.3 Fill Template
247
+
248
+ Fill in the template with:
249
+
250
+ | Section | Content |
251
+ |---------|---------|
252
+ | Test Overview | Feature name, module, scope, related documents |
253
+ | Test Case Matrix | All test cases organized by category |
254
+ | Test Data Definition | Normal, boundary, and exception data sets |
255
+ | Coverage Traceability | Requirement-to-test-case mapping |
256
+ | Notes | Additional information and assumptions |
257
+
258
+ ### 7.4 Write Document
259
+
260
+ Write the completed test case design document to the output path.
261
+
262
+ # Key Rules
263
+
264
+ | Rule | Description |
265
+ |------|-------------|
266
+ | **No Code Implementation** | Do NOT write actual test code, only test case specifications |
267
+ | **Coverage First** | Prioritize acceptance criteria coverage over exhaustive testing |
268
+ | **Clear Expected Results** | Every test case must have unambiguous expected result |
269
+ | **Traceability Required** | All test cases must trace back to requirements |
270
+ | **Naming Convention** | Strictly follow TC-{MODULE}-{SEQ} format |
271
+ | **Priority Alignment** | Test case priority should align with requirement priority |
272
+
273
+ # Checklist
274
+
275
+ - [ ] All acceptance criteria from Feature Spec have corresponding test cases
276
+ - [ ] Each test dimension has at least one test case (if applicable)
277
+ - [ ] Test case IDs follow naming convention (TC-{MODULE}-{SEQ})
278
+ - [ ] All test cases have clear expected results
279
+ - [ ] Coverage traceability matrix is complete
280
+ - [ ] Test data sets cover normal, boundary, and exception scenarios
281
+ - [ ] Priority assignments are consistent with requirement priorities
282
+ - [ ] Preconditions are clearly stated for each test case
283
+ - [ ] Steps are detailed enough for execution without ambiguity
284
+ - [ ] Document written to correct output path
@@ -0,0 +1,263 @@
1
+ # Test Case Design: {Feature Name}
2
+
3
+ > **Source Document**: Feature Spec: [Link to feature spec]
4
+ > **API Contract**: [Link to API contract]
5
+ > **System Design**: [Link to system design]
6
+
7
+ ---
8
+
9
+ ## 1. Test Overview
10
+
11
+ | Item | Value |
12
+ |------|-------|
13
+ | Feature Name | {feature_name} |
14
+ | Module | {module_name} |
15
+ | Test Scope | {scope_description} |
16
+ | Related Documents | Feature Spec: {path}, API Contract: {path} |
17
+ | Platform | {platform_id} |
18
+ | Total Test Cases | {count} |
19
+ | Created Date | {date} |
20
+
21
+ ### 1.1 Test Scope Summary
22
+
23
+ **In Scope:**
24
+ - {scope_item_1}
25
+ - {scope_item_2}
26
+ - {scope_item_3}
27
+
28
+ **Out of Scope:**
29
+ - {out_of_scope_item_1}
30
+ - {out_of_scope_item_2}
31
+
32
+ ### 1.2 Test Approach
33
+
34
+ | Aspect | Approach |
35
+ |--------|----------|
36
+ | Test Type | Functional Testing, Boundary Testing, Exception Testing |
37
+ | Test Level | Integration Testing, System Testing |
38
+ | Test Method | Manual / Automated |
39
+ | Entry Criteria | Feature Spec approved, API Contract finalized |
40
+ | Exit Criteria | All P0/P1 test cases pass, coverage >= 100% for acceptance criteria |
41
+
42
+ ---
43
+
44
+ ## 2. Test Case Matrix
45
+
46
+ ### 2.1 Functional Positive Tests (Happy Path)
47
+
48
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
49
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
50
+ | TC-{MOD}-001 | {description} | {preconditions} | 1. {step1}<br>2. {step2}<br>3. {step3} | {input} | {expected} | P0 |
51
+ | TC-{MOD}-002 | {description} | {preconditions} | 1. {step1}<br>2. {step2} | {input} | {expected} | P0 |
52
+ | TC-{MOD}-003 | {description} | {preconditions} | 1. {step1}<br>2. {step2} | {input} | {expected} | P1 |
53
+
54
+ ### 2.2 Boundary Value Tests
55
+
56
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
57
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
58
+ | TC-{MOD}-010 | {description} - Minimum value | {preconditions} | 1. {step1}<br>2. {step2} | {boundary_value} | {expected} | P1 |
59
+ | TC-{MOD}-011 | {description} - Maximum value | {preconditions} | 1. {step1}<br>2. {step2} | {boundary_value} | {expected} | P1 |
60
+ | TC-{MOD}-012 | {description} - Empty value | {preconditions} | 1. {step1} | {empty_value} | {expected} | P2 |
61
+
62
+ ### 2.3 Exception/Error Handling Tests
63
+
64
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
65
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
66
+ | TC-{MOD}-020 | Invalid input format | {preconditions} | 1. {step1}<br>2. {step2} | {invalid_input} | Error: {error_message} | P1 |
67
+ | TC-{MOD}-021 | Missing required field | {preconditions} | 1. {step1} | {missing_field} | Error: {error_message} | P1 |
68
+ | TC-{MOD}-022 | Business rule violation | {preconditions} | 1. {step1}<br>2. {step2} | {violation_data} | Error: {error_message} | P1 |
69
+ | TC-{MOD}-023 | System error handling | {preconditions} | 1. {step1}<br>2. Simulate system error | {input} | Graceful error handling | P2 |
70
+
71
+ ### 2.4 Business Rule Constraint Tests
72
+
73
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
74
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
75
+ | TC-{MOD}-030 | {business_rule_1} validation | {preconditions} | 1. {step1}<br>2. {step2} | {input} | {expected_result} | P0 |
76
+ | TC-{MOD}-031 | {business_rule_2} validation | {preconditions} | 1. {step1}<br>2. {step2} | {input} | {expected_result} | P1 |
77
+ | TC-{MOD}-032 | {business_rule_3} validation | {preconditions} | 1. {step1} | {input} | {expected_result} | P1 |
78
+
79
+ ### 2.5 Permission/Security Tests
80
+
81
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
82
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
83
+ | TC-{MOD}-040 | Unauthenticated access | None | 1. Access feature without login | N/A | Redirect to login / 401 error | P0 |
84
+ | TC-{MOD}-041 | Unauthorized operation | User without permission | 1. Attempt restricted operation | {operation_data} | Permission denied / 403 error | P0 |
85
+ | TC-{MOD}-042 | Cross-user data access | User A logged in | 1. Attempt to access User B's data | {user_b_id} | Access denied / Data not found | P0 |
86
+ | TC-{MOD}-043 | Role-based feature visibility | User with limited role | 1. Navigate to feature area | N/A | Restricted features hidden/disabled | P1 |
87
+
88
+ ### 2.6 Data Validation Tests
89
+
90
+ | TC ID | Description | Preconditions | Steps | Input Data | Expected Result | Priority |
91
+ |-------|-------------|---------------|-------|------------|-----------------|----------|
92
+ | TC-{MOD}-050 | Field format validation - {field_name} | {preconditions} | 1. Enter invalid format<br>2. Submit | {invalid_format} | Validation error: {error_message} | P1 |
93
+ | TC-{MOD}-051 | Field type validation - {field_name} | {preconditions} | 1. Enter wrong type<br>2. Submit | {wrong_type} | Validation error: {error_message} | P1 |
94
+ | TC-{MOD}-052 | Field constraint validation - {field_name} | {preconditions} | 1. Enter value violating constraint | {constraint_violation} | Validation error: {error_message} | P1 |
95
+ | TC-{MOD}-053 | Relationship validation | {preconditions} | 1. Enter invalid reference | {invalid_reference} | Validation error: {error_message} | P1 |
96
+
97
+ ### 2.7 State Transition Tests (If Applicable)
98
+
99
+ | TC ID | Description | Current State | Action | Expected State | Expected Result | Priority |
100
+ |-------|-------------|---------------|--------|----------------|-----------------|----------|
101
+ | TC-{MOD}-060 | Transition: {state_A} to {state_B} | {state_A} | {action} | {state_B} | {expected_result} | P0 |
102
+ | TC-{MOD}-061 | Invalid transition: {state_A} to {state_C} | {state_A} | {invalid_action} | {state_A} | Error: {error_message} | P1 |
103
+ | TC-{MOD}-062 | Concurrent state change | {state_A} | Simultaneous updates | {expected_state} | Conflict handling | P2 |
104
+
105
+ ---
106
+
107
+ ## 3. Test Data Definition
108
+
109
+ ### 3.1 Normal Data Set
110
+
111
+ | Field | Valid Value | Description |
112
+ |-------|------------|-------------|
113
+ | {field_1} | {valid_value_1} | {description} |
114
+ | {field_2} | {valid_value_2} | {description} |
115
+ | {field_3} | {valid_value_3} | {description} |
116
+ | {field_4} | {valid_value_4} | {description} |
117
+ | {field_5} | {valid_value_5} | {description} |
118
+
119
+ **Complete Normal Test Record:**
120
+
121
+ ```json
122
+ {
123
+ "{field_1}": "{value_1}",
124
+ "{field_2}": "{value_2}",
125
+ "{field_3}": "{value_3}",
126
+ "{field_4}": "{value_4}",
127
+ "{field_5}": "{value_5}"
128
+ }
129
+ ```
130
+
131
+ ### 3.2 Boundary Data Set
132
+
133
+ | Field | Boundary Type | Boundary Value | Expected Behavior |
134
+ |-------|--------------|----------------|-------------------|
135
+ | {field_1} | Minimum | {min_value} | Accept / Reject with {reason} |
136
+ | {field_1} | Maximum | {max_value} | Accept / Reject with {reason} |
137
+ | {field_1} | Below minimum | {below_min} | Reject with {error_message} |
138
+ | {field_1} | Above maximum | {above_max} | Reject with {error_message} |
139
+ | {field_2} | Empty string | "" | Accept as optional / Reject |
140
+ | {field_2} | Max length | {max_length_string} | Accept / Truncate |
141
+ | {field_2} | Exceed max length | {exceed_string} | Reject with {error_message} |
142
+
143
+ ### 3.3 Exception Data Set
144
+
145
+ | Field | Invalid Value | Expected Error |
146
+ |-------|--------------|----------------|
147
+ | {field_1} | {invalid_value_1} | {error_message_1} |
148
+ | {field_1} | {invalid_value_2} | {error_message_2} |
149
+ | {field_2} | {invalid_value_3} | {error_message_3} |
150
+ | {field_3} | {invalid_value_4} | {error_message_4} |
151
+ | {field_4} | null (for required field) | {error_message_5} |
152
+
153
+ ### 3.4 Special Character Data Set
154
+
155
+ | Field | Special Character | Expected Behavior |
156
+ |-------|------------------|-------------------|
157
+ | {field_1} | < > & " ' | Sanitize / Reject |
158
+ | {field_1} | Unicode characters (中文, emoji) | Accept / Reject |
159
+ | {field_1} | SQL injection patterns | Sanitize / Reject |
160
+ | {field_1} | XSS patterns | Sanitize / Reject |
161
+
162
+ ---
163
+
164
+ ## 4. Coverage Traceability Matrix
165
+
166
+ ### 4.1 Acceptance Criteria Coverage
167
+
168
+ | AC ID | Acceptance Criteria | Test Case IDs | Coverage Status | Notes |
169
+ |-------|--------------------|---------------|-----------------|-------|
170
+ | AC-001 | {acceptance_criteria_1} | TC-{MOD}-001, TC-{MOD}-002 | Covered | |
171
+ | AC-002 | {acceptance_criteria_2} | TC-{MOD}-003, TC-{MOD}-030 | Covered | |
172
+ | AC-003 | {acceptance_criteria_3} | TC-{MOD}-004 | Covered | |
173
+ | AC-004 | {acceptance_criteria_4} | TC-{MOD}-040, TC-{MOD}-041 | Covered | |
174
+ | AC-005 | {acceptance_criteria_5} | - | Not Covered | Reason: {explanation} |
175
+
176
+ ### 4.2 API Endpoint Coverage
177
+
178
+ | API Endpoint | Method | Test Case IDs | Coverage Status |
179
+ |--------------|--------|---------------|-----------------|
180
+ | {/api/path/1} | GET | TC-{MOD}-001, TC-{MOD}-040 | Covered |
181
+ | {/api/path/1} | POST | TC-{MOD}-002, TC-{MOD}-020, TC-{MOD}-021 | Covered |
182
+ | {/api/path/1}/{id} | PUT | TC-{MOD}-003, TC-{MOD}-050 | Covered |
183
+ | {/api/path/1}/{id} | DELETE | TC-{MOD}-004, TC-{MOD}-041 | Covered |
184
+
185
+ ### 4.3 Business Rule Coverage
186
+
187
+ | Rule ID | Business Rule | Test Case IDs | Coverage Status |
188
+ |---------|---------------|---------------|-----------------|
189
+ | BR-001 | {business_rule_1} | TC-{MOD}-030 | Covered |
190
+ | BR-002 | {business_rule_2} | TC-{MOD}-031 | Covered |
191
+ | BR-003 | {business_rule_3} | TC-{MOD}-032 | Covered |
192
+
193
+ ### 4.4 Coverage Summary
194
+
195
+ | Dimension | Total Items | Covered | Coverage Rate |
196
+ |-----------|------------|---------|---------------|
197
+ | Acceptance Criteria | {total_ac} | {covered_ac} | {rate}% |
198
+ | API Endpoints | {total_api} | {covered_api} | {rate}% |
199
+ | Business Rules | {total_br} | {covered_br} | {rate}% |
200
+
201
+ ---
202
+
203
+ ## 5. Test Execution Guidelines
204
+
205
+ ### 5.1 Prerequisites
206
+
207
+ - [ ] Test environment is properly configured
208
+ - [ ] Required test data is prepared and loaded
209
+ - [ ] Test accounts with appropriate permissions are available
210
+ - [ ] Dependent systems/services are accessible
211
+
212
+ ### 5.2 Test Data Preparation
213
+
214
+ | Data Type | Description | Quantity |
215
+ |-----------|-------------|----------|
216
+ | User Accounts | {user_account_description} | {count} |
217
+ | Master Data | {master_data_description} | {count} |
218
+ | Transaction Data | {transaction_data_description} | {count} |
219
+
220
+ ### 5.3 Execution Sequence
221
+
222
+ | Sequence | Test Category | Test Case IDs | Dependency |
223
+ |----------|---------------|---------------|------------|
224
+ | 1 | Permission/Security | TC-{MOD}-040 ~ TC-{MOD}-043 | None |
225
+ | 2 | Functional Positive | TC-{MOD}-001 ~ TC-{MOD}-003 | Permission tests pass |
226
+ | 3 | Business Rule | TC-{MOD}-030 ~ TC-{MOD}-032 | Functional tests pass |
227
+ | 4 | Boundary Value | TC-{MOD}-010 ~ TC-{MOD}-012 | None |
228
+ | 5 | Data Validation | TC-{MOD}-050 ~ TC-{MOD}-053 | None |
229
+ | 6 | Exception/Error | TC-{MOD}-020 ~ TC-{MOD}-023 | None |
230
+ | 7 | State Transition | TC-{MOD}-060 ~ TC-{MOD}-062 | Functional tests pass |
231
+
232
+ ---
233
+
234
+ ## 6. Notes
235
+
236
+ ### 6.1 Assumptions
237
+
238
+ - {assumption_1}
239
+ - {assumption_2}
240
+ - {assumption_3}
241
+
242
+ ### 6.2 Dependencies
243
+
244
+ - {dependency_1}
245
+ - {dependency_2}
246
+
247
+ ### 6.3 Risk Areas
248
+
249
+ | Risk | Impact | Mitigation |
250
+ |------|--------|------------|
251
+ | {risk_1} | {impact_level} | {mitigation_strategy} |
252
+ | {risk_2} | {impact_level} | {mitigation_strategy} |
253
+
254
+ ### 6.4 Additional Notes
255
+
256
+ - {additional_note_1}
257
+ - {additional_note_2}
258
+
259
+ ---
260
+
261
+ **Document Status:** Draft / In Review / Published
262
+ **Last Updated:** {date}
263
+ **Author:** {author}