speccrew 0.6.69 → 0.7.1

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 (137) hide show
  1. package/.speccrew/agents/speccrew-task-worker.md +1 -1
  2. package/.speccrew/agents/speccrew-team-leader.md +336 -189
  3. package/.speccrew/skills/speccrew-agentflow-manager/SKILL.md +161 -0
  4. package/.speccrew/skills/speccrew-agentflow-manager/workflow.agentflow.xml +347 -0
  5. package/.speccrew/skills/speccrew-deploy-build/SKILL.md +3 -56
  6. package/.speccrew/skills/speccrew-deploy-build/workflow.agentflow.xml +125 -0
  7. package/.speccrew/skills/speccrew-deploy-migrate/SKILL.md +3 -64
  8. package/.speccrew/skills/speccrew-deploy-migrate/workflow.agentflow.xml +135 -0
  9. package/.speccrew/skills/speccrew-deploy-smoke-test/SKILL.md +4 -156
  10. package/.speccrew/skills/speccrew-deploy-smoke-test/workflow.agentflow.xml +178 -0
  11. package/.speccrew/skills/speccrew-deploy-startup/SKILL.md +3 -135
  12. package/.speccrew/skills/speccrew-deploy-startup/workflow.agentflow.xml +223 -0
  13. package/.speccrew/skills/speccrew-dev-backend/SKILL.md +10 -2
  14. package/.speccrew/skills/speccrew-dev-backend/workflow.agentflow.xml +254 -0
  15. package/.speccrew/skills/speccrew-dev-desktop-electron/SKILL.md +10 -2
  16. package/.speccrew/skills/speccrew-dev-desktop-electron/workflow.agentflow.xml +259 -0
  17. package/.speccrew/skills/speccrew-dev-desktop-tauri/SKILL.md +10 -2
  18. package/.speccrew/skills/speccrew-dev-desktop-tauri/workflow.agentflow.xml +245 -0
  19. package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +10 -2
  20. package/.speccrew/skills/speccrew-dev-frontend/workflow.agentflow.xml +262 -0
  21. package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +10 -2
  22. package/.speccrew/skills/speccrew-dev-mobile/workflow.agentflow.xml +244 -0
  23. package/.speccrew/skills/speccrew-dev-review-backend/SKILL.md +10 -2
  24. package/.speccrew/skills/speccrew-dev-review-backend/workflow.agentflow.xml +251 -0
  25. package/.speccrew/skills/speccrew-dev-review-desktop/SKILL.md +10 -2
  26. package/.speccrew/skills/speccrew-dev-review-desktop/workflow.agentflow.xml +214 -0
  27. package/.speccrew/skills/speccrew-dev-review-frontend/SKILL.md +10 -2
  28. package/.speccrew/skills/speccrew-dev-review-frontend/workflow.agentflow.xml +213 -0
  29. package/.speccrew/skills/speccrew-dev-review-mobile/SKILL.md +10 -2
  30. package/.speccrew/skills/speccrew-dev-review-mobile/workflow.agentflow.xml +214 -0
  31. package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +7 -1
  32. package/.speccrew/skills/speccrew-fd-api-contract/workflow.agentflow.xml +222 -0
  33. package/.speccrew/skills/speccrew-fd-feature-analyze/SKILL.md +7 -1
  34. package/.speccrew/skills/speccrew-fd-feature-analyze/workflow.agentflow.xml +223 -0
  35. package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +7 -1
  36. package/.speccrew/skills/speccrew-fd-feature-design/workflow.agentflow.xml +322 -0
  37. package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +3 -39
  38. package/.speccrew/skills/speccrew-get-timestamp/workflow.agentflow.xml +43 -0
  39. package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +57 -508
  40. package/.speccrew/skills/{speccrew-knowledge-bizs-api-analyze-xml/SKILL.md → speccrew-knowledge-bizs-api-analyze/workflow.agentflow.xml} +1 -154
  41. package/.speccrew/skills/speccrew-knowledge-bizs-api-graph/SKILL.md +73 -283
  42. package/.speccrew/skills/{speccrew-knowledge-bizs-api-graph-xml/SKILL.md → speccrew-knowledge-bizs-api-graph/workflow.agentflow.xml} +0 -298
  43. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +931 -801
  44. package/.speccrew/skills/{speccrew-knowledge-bizs-dispatch-xml/SKILL.md → speccrew-knowledge-bizs-dispatch/workflow.agentflow.xml} +42 -272
  45. package/.speccrew/skills/speccrew-knowledge-bizs-identify-entries/SKILL.md +263 -71
  46. package/.speccrew/skills/{speccrew-knowledge-bizs-identify-entries-xml/SKILL.md → speccrew-knowledge-bizs-identify-entries/workflow.agentflow.xml} +8 -184
  47. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +200 -181
  48. package/.speccrew/skills/{speccrew-knowledge-bizs-init-features-xml/SKILL.md → speccrew-knowledge-bizs-init-features/workflow.agentflow.xml} +7 -134
  49. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +5 -89
  50. package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/workflow.agentflow.xml +129 -0
  51. package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +454 -326
  52. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-analyze-xml/SKILL.md → speccrew-knowledge-bizs-ui-analyze/workflow.agentflow.xml} +8 -128
  53. package/.speccrew/skills/speccrew-knowledge-bizs-ui-graph/SKILL.md +302 -247
  54. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-graph-xml/SKILL.md → speccrew-knowledge-bizs-ui-graph/workflow.agentflow.xml} +7 -199
  55. package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +267 -156
  56. package/.speccrew/skills/{speccrew-knowledge-bizs-ui-style-extract-xml/SKILL.md → speccrew-knowledge-bizs-ui-style-extract/workflow.agentflow.xml} +7 -151
  57. package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +3 -122
  58. package/.speccrew/skills/speccrew-knowledge-graph-query/workflow.agentflow.xml +106 -0
  59. package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +3 -80
  60. package/.speccrew/skills/speccrew-knowledge-graph-write/workflow.agentflow.xml +152 -0
  61. package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +371 -265
  62. package/.speccrew/skills/{speccrew-knowledge-module-summarize-xml/SKILL.md → speccrew-knowledge-module-summarize/workflow.agentflow.xml} +7 -197
  63. package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +45 -333
  64. package/.speccrew/skills/{speccrew-knowledge-system-summarize-xml/SKILL.md → speccrew-knowledge-system-summarize/workflow.agentflow.xml} +0 -177
  65. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +174 -727
  66. package/.speccrew/skills/{speccrew-knowledge-techs-dispatch-xml/SKILL.md → speccrew-knowledge-techs-dispatch/workflow.agentflow.xml} +10 -351
  67. package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +20 -150
  68. package/.speccrew/skills/{speccrew-knowledge-techs-generate-xml/SKILL.md → speccrew-knowledge-techs-generate/workflow.agentflow.xml} +0 -169
  69. package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +75 -587
  70. package/.speccrew/skills/{speccrew-knowledge-techs-generate-conventions-xml/SKILL.md → speccrew-knowledge-techs-generate-conventions/workflow.agentflow.xml} +0 -153
  71. package/.speccrew/skills/speccrew-knowledge-techs-generate-quality/SKILL.md +463 -297
  72. package/.speccrew/skills/{speccrew-knowledge-techs-generate-quality-xml/SKILL.md → speccrew-knowledge-techs-generate-quality/workflow.agentflow.xml} +0 -164
  73. package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +57 -292
  74. package/.speccrew/skills/{speccrew-knowledge-techs-generate-ui-style-xml/SKILL.md → speccrew-knowledge-techs-generate-ui-style/workflow.agentflow.xml} +2 -193
  75. package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +49 -335
  76. package/.speccrew/skills/{speccrew-knowledge-techs-index-xml/SKILL.md → speccrew-knowledge-techs-index/workflow.agentflow.xml} +0 -167
  77. package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +28 -109
  78. package/.speccrew/skills/{speccrew-knowledge-techs-init-xml/SKILL.md → speccrew-knowledge-techs-init/workflow.agentflow.xml} +0 -189
  79. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +3 -487
  80. package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/workflow.agentflow.xml +278 -0
  81. package/.speccrew/skills/speccrew-pm-knowledge-detector/SKILL.md +3 -71
  82. package/.speccrew/skills/speccrew-pm-knowledge-detector/workflow.agentflow.xml +108 -0
  83. package/.speccrew/skills/speccrew-pm-module-initializer/SKILL.md +3 -107
  84. package/.speccrew/skills/speccrew-pm-module-initializer/workflow.agentflow.xml +139 -0
  85. package/.speccrew/skills/speccrew-pm-module-matcher/SKILL.md +3 -115
  86. package/.speccrew/skills/speccrew-pm-module-matcher/workflow.agentflow.xml +146 -0
  87. package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +3 -343
  88. package/.speccrew/skills/speccrew-pm-requirement-analysis/workflow.agentflow.xml +174 -0
  89. package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +3 -91
  90. package/.speccrew/skills/speccrew-pm-requirement-assess/workflow.agentflow.xml +173 -0
  91. package/.speccrew/skills/speccrew-pm-requirement-clarify/SKILL.md +3 -224
  92. package/.speccrew/skills/speccrew-pm-requirement-clarify/workflow.agentflow.xml +159 -0
  93. package/.speccrew/skills/speccrew-pm-requirement-model/SKILL.md +3 -275
  94. package/.speccrew/skills/speccrew-pm-requirement-model/workflow.agentflow.xml +210 -0
  95. package/.speccrew/skills/speccrew-pm-requirement-simple/SKILL.md +3 -76
  96. package/.speccrew/skills/speccrew-pm-requirement-simple/workflow.agentflow.xml +120 -0
  97. package/.speccrew/skills/speccrew-pm-sub-prd-generate/SKILL.md +7 -1
  98. package/.speccrew/skills/speccrew-pm-sub-prd-generate/workflow.agentflow.xml +218 -0
  99. package/.speccrew/skills/speccrew-sd-backend/SKILL.md +7 -1
  100. package/.speccrew/skills/speccrew-sd-backend/workflow.agentflow.xml +264 -0
  101. package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +7 -1
  102. package/.speccrew/skills/speccrew-sd-desktop/workflow.agentflow.xml +288 -0
  103. package/.speccrew/skills/speccrew-sd-framework-evaluate/SKILL.md +7 -1
  104. package/.speccrew/skills/speccrew-sd-framework-evaluate/workflow.agentflow.xml +235 -0
  105. package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +7 -1
  106. package/.speccrew/skills/speccrew-sd-frontend/workflow.agentflow.xml +299 -0
  107. package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +7 -1
  108. package/.speccrew/skills/speccrew-sd-mobile/workflow.agentflow.xml +301 -0
  109. package/.speccrew/skills/speccrew-test-case-design/SKILL.md +165 -284
  110. package/.speccrew/skills/speccrew-test-case-design/workflow.agentflow.xml +210 -0
  111. package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +204 -324
  112. package/.speccrew/skills/speccrew-test-code-gen/workflow.agentflow.xml +265 -0
  113. package/.speccrew/skills/speccrew-test-reporter/SKILL.md +205 -184
  114. package/.speccrew/skills/speccrew-test-reporter/workflow.agentflow.xml +284 -0
  115. package/.speccrew/skills/speccrew-test-runner/SKILL.md +242 -241
  116. package/.speccrew/skills/speccrew-test-runner/workflow.agentflow.xml +314 -0
  117. package/bin/cli.js +8 -1
  118. package/lib/commands/init.js +11 -3
  119. package/lib/commands/update.js +11 -3
  120. package/lib/commands/validate.js +565 -0
  121. package/lib/utils.js +43 -0
  122. package/package.json +1 -1
  123. package/workspace-template/docs/rules/{xml-workflow-spec.md → agentflow-spec.md} +5 -5
  124. package/workspace-template/scripts/validate-agentflow.js +637 -0
  125. package/.speccrew/agents/speccrew-team-leader-xml.md +0 -480
  126. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +0 -99
  127. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +0 -176
  128. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +0 -150
  129. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +0 -106
  130. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +0 -249
  131. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/merge-features.js +0 -300
  132. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +0 -915
  133. package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +0 -226
  134. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +0 -34
  135. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +0 -1087
  136. package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +0 -26
  137. package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +0 -550
@@ -10,291 +10,172 @@ tools: Read, Write, Glob, Grep
10
10
  - When user explicitly requests test case design from feature specification
11
11
  - When user asks "Design test cases for this feature" or "Create test case matrix"
12
12
 
13
- # Workflow
14
-
15
- ## Absolute Constraints
16
-
17
- > **These rules apply to ALL document generation steps. Violation = task failure.**
18
-
19
- 1. **FORBIDDEN: `create_file` for documents** — NEVER use `create_file` to write the test case design document. It MUST be created by copying the template then filling sections with `search_replace`.
20
-
21
- 2. **FORBIDDEN: Full-file rewrite** NEVER replace the entire document content in a single operation. Always use targeted `search_replace` on specific sections.
22
-
23
- 3. **MANDATORY: Template-first workflow** — Copy template MUST execute before filling sections. Skipping copy and writing content directly is FORBIDDEN.
24
-
25
- ## Step 1: Read Feature Spec
26
-
27
- Read the feature spec document specified by `feature_spec_path`:
28
-
29
- **Default Path Pattern:**
30
- ```
31
- speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-feature-spec.md
32
- ```
33
-
34
- **Extract Key Information:**
35
-
36
- | Section | What to Extract |
37
- |---------|-----------------|
38
- | Interaction Flow Description | User scenarios and interaction flows |
39
- | Business Rule Constraints | Business rules and validation constraints |
40
- | Data Field Definition | Field definitions, types, and constraints |
41
- | Acceptance Criteria | Criteria for feature acceptance |
42
-
43
- **For Master-Sub PRD Structure:**
44
- - Read Master Feature Spec for cross-module scenarios
45
- - Read Sub Feature Specs for module-specific scenarios
46
-
47
- ## Step 2: Read API Contract
48
-
49
- If `api_contract_path` is provided, read the API contract document:
50
-
51
- **Default Path Pattern:**
52
- ```
53
- speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/[feature-name]-api-contract.md
54
- ```
55
-
56
- **Extract API Information:**
57
-
58
- | Item | What to Extract |
59
- |------|-----------------|
60
- | Interface Endpoints | API paths and HTTP methods |
61
- | Request/Response Format | Request body and response structure |
62
- | Error Codes | Error code definitions and meanings |
63
- | Interface Constraints | Rate limits, validation rules, etc. |
64
-
65
- ## Step 3: Read System Design
66
-
67
- If `system_design_path` is provided, read the system design document:
68
-
69
- **Default Path Pattern:**
70
- ```
71
- speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/[feature-name]-design.md
72
- ```
73
-
74
- **Extract System Context:**
75
-
76
- | Item | What to Extract |
77
- |------|-----------------|
78
- | Module Dependencies | How this feature depends on other modules |
79
- | Platform Constraints | Platform-specific interaction constraints |
80
- | Exception Handling | Error handling mechanisms |
81
- | State Transitions | State flow if applicable |
82
-
83
- ## Step 3.5: Read Testing Conventions (Optional)
84
-
85
- If available, read the system testing conventions for the platform:
86
-
87
- **Path Pattern:**
88
- ```
89
- speccrew-workspace/knowledges/techs/{platform_id}/conventions-system-test.md
90
- ```
91
-
92
- **Extract Testing Conventions:**
93
-
94
- | Item | What to Extract |
95
- |------|-----------------|
96
- | E2E Framework | End-to-end testing framework (Cypress, Playwright, etc.) |
97
- | Integration Test Patterns | How integration tests are structured |
98
- | Test Data Management | Fixtures, seeding, mock strategies |
99
- | API Contract Testing | Contract testing conventions if applicable |
100
-
101
- **Fallback Handling:**
102
-
103
- IF `conventions-system-test.md` not found:
104
- 1. Use default analysis dimensions defined in Step 4
105
- 2. Proceed without platform-specific testing conventions
106
- 3. Log a note: "Testing conventions file not found, using default analysis dimensions"
107
-
108
- ## Step 4: Analyze Test Dimensions
109
-
110
- Systematically analyze test dimensions to ensure comprehensive coverage:
111
-
112
- ### 4.1 Functional Positive Tests (Happy Path)
113
-
114
- | Analysis Focus | Description |
115
- |----------------|-------------|
116
- | Core User Scenarios | Main user flows from entry to completion |
117
- | Data CRUD Operations | Create, Read, Update, Delete operations |
118
- | Integration Points | Cross-module or external system interactions |
119
-
120
- ### 4.2 Boundary Value Tests
121
-
122
- | Analysis Focus | Description |
123
- |----------------|-------------|
124
- | Numeric Boundaries | Min, max, zero, negative values |
125
- | String Boundaries | Empty, max length, special characters |
126
- | Time/Date Boundaries | Timezone, date range, format edge cases |
127
- | Collection Boundaries | Empty list, single item, max items |
128
-
129
- ### 4.3 Exception/Error Handling Tests
130
-
131
- | Analysis Focus | Description |
132
- |----------------|-------------|
133
- | Input Validation Errors | Invalid format, missing required fields |
134
- | Business Rule Violations | Constraint violations, state conflicts |
135
- | System Errors | Timeout, service unavailable |
136
- | Data Errors | Not found, duplicate, conflict |
137
-
138
- ### 4.4 Business Rule Constraint Tests
139
-
140
- | Analysis Focus | Description |
141
- |----------------|-------------|
142
- | Permission Rules | Role-based access, authorization checks |
143
- | Data Constraints | Uniqueness, referential integrity |
144
- | Workflow Rules | State transitions, approval flows |
145
- | Calculation Rules | Price calculation, quantity limits |
146
-
147
- ### 4.5 Permission/Security Tests
148
-
149
- | Analysis Focus | Description |
150
- |----------------|-------------|
151
- | Authentication | Unauthenticated access attempts |
152
- | Authorization | Unauthorized operation attempts |
153
- | Data Visibility | Cross-tenant or cross-user data access |
154
- | Sensitive Data | PII handling, data masking |
155
-
156
- ### 4.6 Data Validation Tests
157
-
158
- | Analysis Focus | Description |
159
- |----------------|-------------|
160
- | Format Validation | Email, phone, URL formats |
161
- | Type Validation | String, number, boolean, date types |
162
- | Constraint Validation | Required fields, length limits, ranges |
163
- | Relationship Validation | Foreign key references, dependencies |
164
-
165
- ### 4.7 State Transition Tests (If Applicable)
166
-
167
- | Analysis Focus | Description |
168
- |----------------|-------------|
169
- | Valid Transitions | Allowed state changes |
170
- | Invalid Transitions | Prohibited state changes |
171
- | Concurrent Transitions | Race conditions, locking |
172
-
173
- ## Step 5: Generate Test Case Matrix
174
-
175
- Generate structured test cases based on the analysis. Each test case must include:
176
-
177
- ### 5.1 Test Case Naming Convention
178
-
179
- **Format:** `TC-{MODULE}-{SEQ}`
180
-
181
- | Component | Description | Example |
182
- |-----------|-------------|---------|
183
- | TC | Fixed prefix | TC |
184
- | MODULE | Module abbreviation (3-4 letters) | ORD, USR, PRD |
185
- | SEQ | Sequence number (3 digits) | 001, 002, 003 |
186
-
187
- **Examples:**
188
- - `TC-ORD-001` - Order module, test case 1
189
- - `TC-USR-015` - User module, test case 15
190
- - `TC-PRD-003` - Product module, test case 3
191
-
192
- ### 5.2 Test Case Structure
193
-
194
- Each test case contains:
195
-
196
- | Field | Description |
197
- |-------|-------------|
198
- | TC ID | Unique identifier following naming convention |
199
- | Category | Test dimension classification |
200
- | Description | Brief description of what is being tested |
201
- | Preconditions | Required state before test execution |
202
- | Steps | Numbered list of test execution steps |
203
- | Input Data | Test data description or reference |
204
- | Expected Result | Expected outcome after execution |
205
- | Priority | P0-Critical / P1-High / P2-Medium / P3-Low |
206
-
207
- ### 5.3 Priority Definition
208
-
209
- | Priority | Definition | Example Scenarios |
210
- |----------|------------|-------------------|
211
- | P0-Critical | Core functionality, blocks release | Happy path of main feature, security vulnerabilities |
212
- | P1-High | Important functionality, significant impact | Key business rules, main error handling |
213
- | P2-Medium | Standard functionality, moderate impact | Edge cases, secondary flows |
214
- | P3-Low | Minor functionality, low impact | UI polish, rare edge cases |
215
-
216
- **Priority Mapping from Feature Spec to Test Cases:**
217
-
218
- | Feature Spec Priority | Test Case Priority | Mapping Rationale |
219
- |-----------------------|-------------------|------------------|
220
- | P0 (Critical) | P0 (Critical) | Core functionality must have critical test coverage |
221
- | P1 (Important) | P1 (High) | Important features need high-priority test validation |
222
- | P2 (Standard) | P2 (Medium) | Standard features receive medium-priority testing |
223
- | P3 (Minor) | P3 (Low) | Minor features receive low-priority testing |
224
- | Unspecified | P2 (Medium) | Default to medium priority if not specified |
225
-
226
- ## Step 6: Coverage Self-Check
227
-
228
- ### 6.1 Acceptance Criteria Coverage
229
-
230
- Cross-reference test cases against Feature Spec acceptance criteria:
231
-
13
+ ## AgentFlow Definition
14
+
15
+ <!-- @agentflow: workflow.agentflow.xml -->
16
+
17
+ > **REQUIRED**: Before executing this workflow, read the XML workflow specification: `speccrew-workspace/docs/rules/agentflow-spec.md`
18
+
19
+ ```xml
20
+ <?xml version="1.0" encoding="UTF-8"?>
21
+ <workflow id="test-case-design-main" status="pending" version="1.0" desc="Design structured test cases from Feature Spec and API Contract documents">
22
+
23
+ <!-- Input Parameters -->
24
+ <block type="input" id="I1" desc="Workflow input parameters">
25
+ <field name="feature_spec_path" required="true" type="string" desc="Path to feature specification document"/>
26
+ <field name="api_contract_path" required="false" type="string" desc="Path to API contract document"/>
27
+ <field name="system_design_path" required="false" type="string" desc="Path to system design document"/>
28
+ <field name="output_dir" required="true" type="string" desc="Directory for test case design output"/>
29
+ <field name="feature_name" required="true" type="string" desc="Feature name for output file naming"/>
30
+ <field name="platform_id" required="true" type="string" desc="Target platform identifier"/>
31
+ <field name="module" required="true" type="string" desc="Module abbreviation (3-4 letters)"/>
32
+ </block>
33
+
34
+ <!-- Global Constraints -->
35
+ <block type="rule" id="R1" level="forbidden" desc="Document generation constraints">
36
+ <field name="text">NEVER use create_file to write the test case design document directly</field>
37
+ <field name="text">MUST copy template first, then fill sections with search_replace</field>
38
+ <field name="text">NEVER replace entire document content in a single operation</field>
39
+ </block>
40
+
41
+ <block type="rule" id="R2" level="mandatory" desc="Template-first workflow">
42
+ <field name="text">Copy template MUST execute before filling sections</field>
43
+ <field name="text">All section titles MUST be preserved</field>
44
+ </block>
45
+
46
+ <!-- Main Processing Sequence -->
47
+ <sequence id="S1" name="Test Case Design" status="pending" desc="Design test cases from feature specifications">
48
+
49
+ <!-- Step 1: Read Feature Spec -->
50
+ <block type="task" id="B1" action="read-file" desc="Read feature specification document">
51
+ <field name="path" value="${feature_spec_path}"/>
52
+ <field name="output" var="feature_spec"/>
53
+ </block>
54
+
55
+ <!-- Step 2: Read API Contract (if provided) -->
56
+ <block type="gateway" id="G1" mode="exclusive" desc="Check if API contract path is provided">
57
+ <branch test="${api_contract_path} != null AND ${api_contract_path} != ''">
58
+ <block type="task" id="B2" action="read-file" desc="Read API contract document">
59
+ <field name="path" value="${api_contract_path}"/>
60
+ <field name="output" var="api_contract"/>
61
+ </block>
62
+ </branch>
63
+ <branch default="true" name="No API Contract">
64
+ <block type="event" id="E1" action="log" level="info" desc="Log API contract skip">
65
+ <field name="message">API contract path not provided, skipping API contract analysis</field>
66
+ </block>
67
+ </branch>
68
+ </block>
69
+
70
+ <!-- Step 3: Read System Design (if provided) -->
71
+ <block type="gateway" id="G2" mode="exclusive" desc="Check if system design path is provided">
72
+ <branch test="${system_design_path} != null AND ${system_design_path} != ''">
73
+ <block type="task" id="B3" action="read-file" desc="Read system design document">
74
+ <field name="path" value="${system_design_path}"/>
75
+ <field name="output" var="system_design"/>
76
+ </block>
77
+ </branch>
78
+ <branch default="true" name="No System Design">
79
+ <block type="event" id="E2" action="log" level="info" desc="Log system design skip">
80
+ <field name="message">System design path not provided, skipping system design analysis</field>
81
+ </block>
82
+ </branch>
83
+ </block>
84
+
85
+ <!-- Step 4: Read Testing Conventions (optional) -->
86
+ <block type="task" id="B4" action="read-file" desc="Read testing conventions if available">
87
+ <field name="path" value="speccrew-workspace/knowledges/techs/${platform_id}/conventions-system-test.md"/>
88
+ <field name="optional" value="true"/>
89
+ <field name="output" var="testing_conventions"/>
90
+ </block>
91
+
92
+ <!-- Step 5: Analyze Test Dimensions -->
93
+ <block type="task" id="B5" action="analyze" desc="Analyze test dimensions for comprehensive coverage">
94
+ <field name="analysis_dimensions">
95
+ - Functional Positive Tests (Happy Path)
96
+ - Boundary Value Tests
97
+ - Exception/Error Handling Tests
98
+ - Business Rule Constraint Tests
99
+ - Permission/Security Tests
100
+ - Data Validation Tests
101
+ - State Transition Tests (if applicable)
102
+ </field>
103
+ <field name="output" var="test_dimensions_analysis"/>
104
+ </block>
105
+
106
+ <!-- Step 6: Generate Test Case Matrix -->
107
+ <block type="task" id="B6" action="generate" desc="Generate structured test case matrix">
108
+ <field name="module" value="${module}"/>
109
+ <field name="naming_convention">TC-{MODULE}-{SEQ}</field>
110
+ <field name="priority_mapping">
111
+ - P0 (Critical) → P0-Critical
112
+ - P1 (Important) P1-High
113
+ - P2 (Standard) → P2-Medium
114
+ - P3 (Minor) P3-Low
115
+ </field>
116
+ <field name="output" var="test_case_matrix"/>
117
+ </block>
118
+
119
+ <!-- Step 7: Coverage Self-Check -->
120
+ <block type="task" id="B7" action="analyze" desc="Perform coverage self-check against acceptance criteria">
121
+ <field name="validation_rules">
122
+ - Each acceptance criterion has corresponding test case(s)
123
+ - Test case fully validates the criterion
124
+ - Coverage status marked for each requirement
125
+ </field>
126
+ <field name="output" var="coverage_check"/>
127
+ </block>
128
+
129
+ <!-- Step 8: Read Template -->
130
+ <block type="task" id="B8" action="read-file" desc="Read test case design template">
131
+ <field name="path" value="speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md"/>
132
+ <field name="output" var="template_content"/>
133
+ </block>
134
+
135
+ <!-- Step 9: Create Output Document -->
136
+ <block type="task" id="B9" action="write-file" desc="Create test case design document from template">
137
+ <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
138
+ <field name="template" value="${template_content}"/>
139
+ <field name="output" var="document_created"/>
140
+ </block>
141
+
142
+ <!-- Step 10: Fill Document Sections -->
143
+ <block type="task" id="B10" action="edit-file" desc="Fill Test Overview section">
144
+ <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
145
+ <field name="section">Test Overview</field>
146
+ </block>
147
+
148
+ <block type="task" id="B11" action="edit-file" desc="Fill Test Case Matrix section">
149
+ <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
150
+ <field name="section">Test Case Matrix</field>
151
+ </block>
152
+
153
+ <block type="task" id="B12" action="edit-file" desc="Fill Test Data Definition section">
154
+ <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
155
+ <field name="section">Test Data Definition</field>
156
+ </block>
157
+
158
+ <block type="task" id="B13" action="edit-file" desc="Fill Coverage Traceability section">
159
+ <field name="path" value="${output_dir}/${feature_name}-test-case-design.md"/>
160
+ <field name="section">Coverage Traceability</field>
161
+ </block>
162
+
163
+ <!-- Checkpoint -->
164
+ <block type="checkpoint" id="CP1" name="document-complete" desc="Verify test case design document is complete">
165
+ <field name="file" value="${output_dir}/${feature_name}-test-case-design.md"/>
166
+ </block>
167
+
168
+ </sequence>
169
+
170
+ <!-- Output Results -->
171
+ <block type="output" id="O1" desc="Workflow output results">
172
+ <field name="test_case_design_path" value="${output_dir}/${feature_name}-test-case-design.md" type="string" desc="Path to generated test case design document"/>
173
+ <field name="test_case_count" type="number" desc="Total number of test cases designed"/>
174
+ <field name="coverage_status" type="string" desc="Coverage status (full/partial)"/>
175
+ </block>
176
+
177
+ </workflow>
232
178
  ```
233
- For each acceptance criterion:
234
- 1. Find corresponding test case(s)
235
- 2. Verify test case fully validates the criterion
236
- 3. Mark coverage status
237
- ```
238
-
239
- ### 6.2 Coverage Traceability Matrix
240
-
241
- Generate a matrix mapping requirements to test cases:
242
-
243
- | Requirement ID | Requirement Description | Test Case IDs | Coverage Status |
244
- |----------------|------------------------|---------------|-----------------|
245
- | REQ-001 | {requirement text} | TC-{MOD}-001, TC-{MOD}-002 | Covered |
246
- | REQ-002 | {requirement text} | - | Not Covered |
247
-
248
- ### 6.3 Uncovered Items Handling
249
-
250
- For any uncovered acceptance criteria:
251
-
252
- | Status | Action |
253
- |--------|--------|
254
- | Not Covered | Create new test case(s) or document reason for exclusion |
255
- | Partially Covered | Add additional test cases for missing scenarios |
256
-
257
- ## Step 7: Write Output
258
-
259
- ### 7.1 Determine Output Path
260
-
261
- **Test Case Design Document:**
262
- ```
263
- speccrew-workspace/iterations/{number}-{type}-{name}/06.system-test/cases/[feature-name]-test-case-design.md
264
- ```
265
-
266
- ### 7.2 Read Template
267
-
268
- Read the template file:
269
- ```
270
- speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md
271
- ```
272
-
273
- ### 7.3 Copy Template to Document Path
274
-
275
- 1. **Read the template file**: `templates/TEST-CASE-DESIGN-TEMPLATE.md` (loaded in 7.2)
276
- 2. **Replace top-level placeholders** (feature name, module, date, etc.)
277
- 3. **Create the document** using `create_file` at the path from Step 7.1
278
- 4. **Verify**: Document has complete section structure ready for filling
279
-
280
- ### 7.4 Fill Each Section Using search_replace
281
-
282
- Fill each section with test case data using `search_replace`.
283
-
284
- > ⚠️ **CRITICAL CONSTRAINTS:**
285
- > - **FORBIDDEN: `create_file` to rewrite the entire document**
286
- > - **MUST use `search_replace` to fill each section individually**
287
- > - **All section titles MUST be preserved**
288
-
289
- **Section Filling Order:**
290
-
291
- | Section | Content Source |
292
- |---------|---------------|
293
- | **Test Overview** | Feature name, module, scope, related documents |
294
- | **Test Case Matrix** | All test cases organized by category from Step 5 |
295
- | **Test Data Definition** | Normal, boundary, and exception data sets |
296
- | **Coverage Traceability** | Requirement-to-test-case mapping from Step 6 |
297
- | **Notes** | Additional information and assumptions |
298
179
 
299
180
  # Key Rules
300
181