speccrew 0.2.7 → 0.3.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.
- package/.speccrew/agents/speccrew-feature-designer.md +220 -27
- package/.speccrew/agents/speccrew-product-manager.md +90 -0
- package/.speccrew/agents/speccrew-system-designer.md +237 -31
- package/.speccrew/agents/speccrew-system-developer.md +44 -10
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +15 -1
- package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +36 -7
- package/.speccrew/skills/speccrew-dev-review/SKILL.md +16 -7
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +150 -35
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +140 -18
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +4 -1
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +29 -15
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +51 -6
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +18 -20
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +7 -10
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +19 -23
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +151 -153
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +23 -63
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +32 -68
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +6 -2
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +203 -17
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +16 -1
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +33 -6
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +25 -5
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +17 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +20 -3
- package/.speccrew/skills/speccrew-test-execute/SKILL.md +8 -0
- package/package.json +1 -1
|
@@ -24,10 +24,15 @@ tools: Read, Write, Glob, Grep
|
|
|
24
24
|
|
|
25
25
|
## Step 1: Read Inputs
|
|
26
26
|
|
|
27
|
+
**Input Parameters** (from agent context):
|
|
28
|
+
- `feature_id` (optional): Feature identifier, e.g., `F-CRM-01`. If provided, use new naming format.
|
|
29
|
+
- `feature_name`: Feature name, e.g., `customer-list`.
|
|
30
|
+
- `platform_id`: Target platform, e.g., `frontend-vue`, `frontend-react`.
|
|
31
|
+
|
|
27
32
|
Read in order:
|
|
28
33
|
|
|
29
|
-
1. **Feature Spec document(s)**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/
|
|
30
|
-
2. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/
|
|
34
|
+
1. **Feature Spec document(s)**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/{feature-id}-{feature-name}-feature-spec.md`
|
|
35
|
+
2. **API Contract**: `speccrew-workspace/iterations/{number}-{type}-{name}/02.feature-design/{feature-id}-{feature-name}-api-contract.md`
|
|
31
36
|
3. **Frontend techs knowledge** (paths from agent context):
|
|
32
37
|
- `speccrew-workspace/knowledges/techs/{platform_id}/tech-stack.md`
|
|
33
38
|
- `speccrew-workspace/knowledges/techs/{platform_id}/architecture.md`
|
|
@@ -56,6 +61,8 @@ Document findings for reference in later steps.
|
|
|
56
61
|
|
|
57
62
|
Parse Feature Spec to identify all functions (Section 2.N pattern).
|
|
58
63
|
|
|
64
|
+
> **Note**: With the new fine-grained Feature Spec format, each Feature Spec typically contains **3-8 functions** (previously 10-20). The extraction logic remains the same, but the scope is more focused.
|
|
65
|
+
|
|
59
66
|
For each function, extract:
|
|
60
67
|
|
|
61
68
|
| Aspect | Content to Extract |
|
|
@@ -89,7 +96,10 @@ Read `SD-FRONTEND-TEMPLATE.md` for document structure.
|
|
|
89
96
|
2. **Replace top-level placeholders** with known variables:
|
|
90
97
|
- Module name, feature name, platform ID, etc.
|
|
91
98
|
3. **Create the document file** using `create_file`:
|
|
92
|
-
- Target path
|
|
99
|
+
- **Target path pattern**:
|
|
100
|
+
- With `feature_id`: `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md`
|
|
101
|
+
- Example: `03.system-design/frontend-vue/F-CRM-01-customer-list-design.md`
|
|
102
|
+
- Without `feature_id` (backward compatibility): `speccrew-workspace/iterations/{number}-{type}-{name}/03.system-design/{platform_id}/{module}-design.md`
|
|
93
103
|
- Content: Template with top-level placeholders replaced
|
|
94
104
|
4. **Verify**: Document should have complete section structure ready for filling
|
|
95
105
|
|
|
@@ -161,6 +171,15 @@ Read `INDEX-TEMPLATE.md` for document structure.
|
|
|
161
171
|
|
|
162
172
|
Create table with links to each module design document.
|
|
163
173
|
|
|
174
|
+
| Column | Content |
|
|
175
|
+
|--------|---------|
|
|
176
|
+
| **ID** | Use `feature_id` if available (e.g., `F-CRM-01`), otherwise use module name |
|
|
177
|
+
| **Name** | Feature or module name |
|
|
178
|
+
| **Document** | Link to design file (e.g., `F-CRM-01-customer-list-design.md`) |
|
|
179
|
+
| **Status** | `[NEW]`, `[MODIFIED]`, or `[EXISTING]` |
|
|
180
|
+
|
|
181
|
+
Example row with `feature_id`: `| F-CRM-01 | Customer List | F-CRM-01-customer-list-design.md | NEW |`
|
|
182
|
+
|
|
164
183
|
### 5.4 Verify Output
|
|
165
184
|
|
|
166
185
|
Verify the completed INDEX.md:
|
|
@@ -207,11 +226,11 @@ After completing all steps, output a structured completion report for the System
|
|
|
207
226
|
- **Status**: SUCCESS
|
|
208
227
|
- **Task ID**: {task_id from context}
|
|
209
228
|
- **Platform**: {platform_id}
|
|
229
|
+
- **Feature ID**: {feature_id}
|
|
210
230
|
- **Feature**: {feature_name}
|
|
211
231
|
- **Output Files**:
|
|
212
232
|
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/INDEX.md
|
|
213
|
-
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/{
|
|
214
|
-
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/{module2}-design.md
|
|
233
|
+
- speccrew-workspace/iterations/{iter}/03.system-design/{platform_id}/{feature-id}-{feature-name}-design.md (or {module}-design.md if no feature_id)
|
|
215
234
|
- **Summary**: Frontend system design completed for {feature_name} on {platform_id} with {count} module designs
|
|
216
235
|
```
|
|
217
236
|
|
|
@@ -222,6 +241,7 @@ After completing all steps, output a structured completion report for the System
|
|
|
222
241
|
- **Status**: FAILED
|
|
223
242
|
- **Task ID**: {task_id from context}
|
|
224
243
|
- **Platform**: {platform_id}
|
|
244
|
+
- **Feature ID**: {feature_id}
|
|
225
245
|
- **Feature**: {feature_name}
|
|
226
246
|
- **Output Files**: []
|
|
227
247
|
- **Error**: {description of what went wrong}
|
|
@@ -98,6 +98,13 @@ speccrew-workspace/knowledges/techs/{platform_id}/conventions-system-test.md
|
|
|
98
98
|
| Test Data Management | Fixtures, seeding, mock strategies |
|
|
99
99
|
| API Contract Testing | Contract testing conventions if applicable |
|
|
100
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
|
+
|
|
101
108
|
## Step 4: Analyze Test Dimensions
|
|
102
109
|
|
|
103
110
|
Systematically analyze test dimensions to ensure comprehensive coverage:
|
|
@@ -206,6 +213,16 @@ Each test case contains:
|
|
|
206
213
|
| P2-Medium | Standard functionality, moderate impact | Edge cases, secondary flows |
|
|
207
214
|
| P3-Low | Minor functionality, low impact | UI polish, rare edge cases |
|
|
208
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
|
+
|
|
209
226
|
## Step 6: Coverage Self-Check
|
|
210
227
|
|
|
211
228
|
### 6.1 Acceptance Criteria Coverage
|
|
@@ -50,7 +50,7 @@ Load platform testing conventions to understand the target test framework:
|
|
|
50
50
|
speccrew-workspace/knowledges/techs/{platform_id}/conventions-system-test.md
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
### 2.2
|
|
53
|
+
### 2.2 Unit Test Convention Path (Fallback)
|
|
54
54
|
|
|
55
55
|
If `conventions-system-test.md` does not exist or for unit test specifics, read:
|
|
56
56
|
|
|
@@ -58,7 +58,7 @@ If `conventions-system-test.md` does not exist or for unit test specifics, read:
|
|
|
58
58
|
speccrew-workspace/knowledges/techs/{platform_id}/conventions-unit-test.md
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
### 2.3
|
|
61
|
+
### 2.3 Generic Convention Path (Last Resort)
|
|
62
62
|
|
|
63
63
|
If neither conventions file exists, read `conventions-dev.md` and infer:
|
|
64
64
|
|
|
@@ -66,7 +66,7 @@ If neither conventions file exists, read `conventions-dev.md` and infer:
|
|
|
66
66
|
|-----------------|-------------------|
|
|
67
67
|
| conventions-dev.md | Extract framework from tech stack, infer unit test framework |
|
|
68
68
|
|
|
69
|
-
### 2.
|
|
69
|
+
### 2.4 Information to Extract
|
|
70
70
|
|
|
71
71
|
| Item | Purpose |
|
|
72
72
|
|------|---------|
|
|
@@ -109,6 +109,23 @@ For mocking strategy planning:
|
|
|
109
109
|
|
|
110
110
|
Create a comprehensive test code generation plan:
|
|
111
111
|
|
|
112
|
+
### 4.0 Determine File Grouping Strategy
|
|
113
|
+
|
|
114
|
+
Before organizing test files, determine the grouping strategy:
|
|
115
|
+
|
|
116
|
+
| Condition | Grouping Strategy |
|
|
117
|
+
|-----------|-------------------|
|
|
118
|
+
| Test cases share same module/component | Group into single test file |
|
|
119
|
+
| Test cases are independent | One test file per test case |
|
|
120
|
+
| Test cases span multiple modules | Create separate test files per module |
|
|
121
|
+
|
|
122
|
+
**File Grouping Rules:**
|
|
123
|
+
|
|
124
|
+
1. **IF test cases share same module/component THEN** group into single test file
|
|
125
|
+
2. **IF test cases are independent THEN** one test file per test case
|
|
126
|
+
3. **Maximum test cases per file:** 10 (split into multiple files if exceeded)
|
|
127
|
+
4. **Naming convention:** `{module-name}.test.{ext}` or `{module-name}.spec.{ext}`
|
|
128
|
+
|
|
112
129
|
### 4.1 Test File Structure Planning
|
|
113
130
|
|
|
114
131
|
Determine how test files are organized:
|
|
@@ -85,6 +85,12 @@ Determine if the system under test requires:
|
|
|
85
85
|
|
|
86
86
|
**Checkpoint A**: If any environment check fails, report specific missing items and stop execution.
|
|
87
87
|
|
|
88
|
+
✋ **STOP IF FAILED**: IF any pre-check fails THEN:
|
|
89
|
+
1. Stop workflow immediately
|
|
90
|
+
2. Report all failures to user
|
|
91
|
+
3. Do NOT proceed to test execution
|
|
92
|
+
4. Fix all environment issues before retry
|
|
93
|
+
|
|
88
94
|
## Step 3: Execute Tests
|
|
89
95
|
|
|
90
96
|
### 3.1 Determine Test Command
|
|
@@ -183,6 +189,8 @@ For each deviation, analyze:
|
|
|
183
189
|
- **Skip Reason**: Why test could not execute
|
|
184
190
|
- **Flaky Pattern**: Conditions causing intermittent failure
|
|
185
191
|
|
|
192
|
+
> 📋 **Output Requirement**: These root cause analysis results MUST be included in Step 6 Report under the "Recommendations" section. Each root cause should map to its corresponding test case ID for traceability.
|
|
193
|
+
|
|
186
194
|
## Step 6: Generate Test Report
|
|
187
195
|
|
|
188
196
|
### 6.1 Read Template
|