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.
- package/.speccrew/agents/speccrew-feature-designer.md +142 -0
- package/.speccrew/agents/speccrew-product-manager.md +61 -0
- package/.speccrew/agents/speccrew-system-designer.md +200 -0
- package/.speccrew/agents/speccrew-system-developer.md +238 -0
- package/.speccrew/agents/speccrew-task-worker.md +80 -0
- package/.speccrew/agents/speccrew-team-leader.md +92 -0
- package/.speccrew/agents/speccrew-test-manager.md +313 -0
- package/.speccrew/skills/speccrew-create-agents/SKILL.md +98 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/designer-agent.md +54 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/dev-agent.md +79 -0
- package/.speccrew/skills/speccrew-create-agents/templates/agents/test-agent.md +80 -0
- package/.speccrew/skills/speccrew-dev-backend/SKILL.md +205 -0
- package/.speccrew/skills/speccrew-dev-backend/templates/TASK-RECORD-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-dev-desktop/SKILL.md +258 -0
- package/.speccrew/skills/speccrew-dev-desktop/templates/TASK-RECORD-TEMPLATE.md +161 -0
- package/.speccrew/skills/speccrew-dev-frontend/SKILL.md +202 -0
- package/.speccrew/skills/speccrew-dev-frontend/templates/TASK-RECORD-TEMPLATE.md +115 -0
- package/.speccrew/skills/speccrew-dev-mobile/SKILL.md +200 -0
- package/.speccrew/skills/speccrew-dev-mobile/templates/TASK-RECORD-TEMPLATE.md +125 -0
- package/.speccrew/skills/speccrew-fd-api-contract/SKILL.md +73 -0
- package/.speccrew/skills/speccrew-fd-api-contract/templates/API-CONTRACT-TEMPLATE.md +96 -0
- package/.speccrew/skills/speccrew-fd-feature-design/SKILL.md +395 -0
- package/.speccrew/skills/speccrew-fd-feature-design/templates/FEATURE-SPEC-TEMPLATE.md +387 -0
- package/.speccrew/skills/speccrew-get-timestamp/SKILL.md +80 -0
- package/.speccrew/skills/speccrew-get-timestamp/scripts/get-timestamp.js +35 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/SKILL.md +1116 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-FASTAPI.md +462 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-JAVA.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE-NET.md +464 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/FEATURE-DETAIL-TEMPLATE.md +480 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-api-analyze/templates/MODULE-OVERVIEW-TEMPLATE.md +367 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/SKILL.md +667 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/STATUS-FORMATS.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/batch-orchestrator.js +176 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-next-batch.js +150 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/get-pending-features.js +106 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/mark-stale.js +249 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/process-batch-results.js +848 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-dispatch/scripts/update-feature-status.js +226 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/SKILL.md +264 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/examples/features.json +34 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/generate-inventory.js +867 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-init-features/scripts/test-inventory.js +26 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/SKILL.md +165 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/apply-module-mapping.js +208 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/extract-module-summary.js +180 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-module-classify/scripts/reindex-modules.js +358 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/SKILL.md +1055 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-DESKTOP.md +303 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-ELECTRON.md +327 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MINIAPP.md +292 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI-MOBILE.md +281 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-analyze/templates/FEATURE-DETAIL-TEMPLATE-UI.md +324 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/SKILL.md +270 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/COMPONENT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/LAYOUT-PATTERN-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-bizs-ui-style-extract/templates/PAGE-TYPE-TEMPLATE.md +33 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/SKILL.md +229 -0
- package/.speccrew/skills/speccrew-knowledge-graph-query/scripts/graph-query.js +549 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/SKILL.md +181 -0
- package/.speccrew/skills/speccrew-knowledge-graph-write/scripts/graph-write.js +651 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/SKILL.md +305 -0
- package/.speccrew/skills/speccrew-knowledge-module-summarize/templates/MODULE-OVERVIEW-TEMPLATE.md +400 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/SKILL.md +351 -0
- package/.speccrew/skills/speccrew-knowledge-system-summarize/templates/SYSTEM-OVERVIEW-TEMPLATE.md +294 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/SKILL.md +683 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/STATUS-FORMATS.md +550 -0
- package/.speccrew/skills/speccrew-knowledge-techs-dispatch/templates/techs-manifest-EXAMPLE.json +35 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/SKILL.md +1087 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/ARCHITECTURE-TEMPLATE.md +240 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COLOR-SYSTEM-TEMPLATE.md +68 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/COMPONENT-LIBRARY-TEMPLATE.md +86 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-BUILD-TEMPLATE.md +466 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DATA-TEMPLATE.md +432 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DESIGN-TEMPLATE.md +1209 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-DEV-TEMPLATE.md +1433 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-SYSTEM-TEST-TEMPLATE.md +1052 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/CONVENTIONS-UNIT-TEST-TEMPLATE.md +946 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/INDEX-TEMPLATE.md +29 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-LAYOUTS-TEMPLATE.md +69 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +74 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate/templates/TECH-STACK-TEMPLATE.md +232 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-conventions/SKILL.md +628 -0
- package/.speccrew/skills/speccrew-knowledge-techs-generate-ui-style/SKILL.md +392 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/SKILL.md +489 -0
- package/.speccrew/skills/speccrew-knowledge-techs-index/templates/INDEX-TEMPLATE.md +243 -0
- package/.speccrew/skills/speccrew-knowledge-techs-init/SKILL.md +269 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/SKILL.md +562 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/BUSINESS-COMPONENTS-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMMON-COMPONENTS-TEMPLATE.md +177 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-INDIVIDUAL-TEMPLATE.md +80 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/COMPONENT-LIBRARY-TEMPLATE.md +118 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-INDIVIDUAL-TEMPLATE.md +97 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/LAYOUT-PATTERNS-TEMPLATE.md +208 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/NAVIGATION-PATTERNS-TEMPLATE.md +157 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-INDIVIDUAL-TEMPLATE.md +123 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/PAGE-TYPE-SUMMARY-TEMPLATE.md +58 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/SPACING-TEMPLATE.md +119 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/STYLE-SYSTEM-TEMPLATE.md +117 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/TYPOGRAPHY-TEMPLATE.md +107 -0
- package/.speccrew/skills/speccrew-knowledge-techs-ui-analyze/templates/UI-STYLE-GUIDE-TEMPLATE.md +171 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/SKILL.md +434 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/BIZS-MODELING-TEMPLATE.md +332 -0
- package/.speccrew/skills/speccrew-pm-requirement-analysis/templates/PRD-TEMPLATE.md +200 -0
- package/.speccrew/skills/speccrew-pm-requirement-assess/SKILL.md +195 -0
- package/.speccrew/skills/speccrew-project-diagnosis/SKILL.md +208 -0
- package/.speccrew/skills/speccrew-project-diagnosis/templates/DIAGNOSIS-REPORT-TEMPLATE.md +202 -0
- package/.speccrew/skills/speccrew-sd-backend/SKILL.md +188 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/INDEX-TEMPLATE.md +85 -0
- package/.speccrew/skills/speccrew-sd-backend/templates/SD-BACKEND-TEMPLATE.md +269 -0
- package/.speccrew/skills/speccrew-sd-desktop/SKILL.md +192 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/INDEX-TEMPLATE.md +271 -0
- package/.speccrew/skills/speccrew-sd-desktop/templates/SD-DESKTOP-TEMPLATE.md +673 -0
- package/.speccrew/skills/speccrew-sd-frontend/SKILL.md +176 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/INDEX-TEMPLATE.md +184 -0
- package/.speccrew/skills/speccrew-sd-frontend/templates/SD-FRONTEND-TEMPLATE.md +382 -0
- package/.speccrew/skills/speccrew-sd-mobile/SKILL.md +189 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/INDEX-TEMPLATE.md +219 -0
- package/.speccrew/skills/speccrew-sd-mobile/templates/SD-MOBILE-TEMPLATE.md +534 -0
- package/.speccrew/skills/speccrew-test-case-design/SKILL.md +284 -0
- package/.speccrew/skills/speccrew-test-case-design/templates/TEST-CASE-DESIGN-TEMPLATE.md +263 -0
- package/.speccrew/skills/speccrew-test-code-gen/SKILL.md +313 -0
- package/.speccrew/skills/speccrew-test-code-gen/templates/TEST-CODE-PLAN-TEMPLATE.md +180 -0
- package/.speccrew/skills/speccrew-test-execute/SKILL.md +283 -0
- package/.speccrew/skills/speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md +50 -0
- package/.speccrew/skills/speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md +57 -0
- package/.speccrew/skills/speccrew-workflow-diagnose/SKILL.md +155 -0
- package/LICENSE +21 -0
- package/README.ar.md +318 -0
- package/README.en.md +318 -0
- package/README.es.md +318 -0
- package/README.md +340 -0
- package/bin/cli.js +62 -0
- package/lib/commands/doctor.js +138 -0
- package/lib/commands/init.js +231 -0
- package/lib/commands/list.js +114 -0
- package/lib/commands/uninstall.js +117 -0
- package/lib/commands/update.js +351 -0
- package/lib/ide-adapters.js +73 -0
- package/lib/utils.js +104 -0
- package/package.json +28 -0
- package/workspace-template/docs/configs/document-templates.json +667 -0
- package/workspace-template/docs/configs/platform-mapping.json +194 -0
- package/workspace-template/docs/configs/tech-stack-mappings.json +313 -0
- package/workspace-template/docs/configs/validation-rules.json +87 -0
- package/workspace-template/docs/rules/mermaid-rule.md +114 -0
- 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
- package/workspace-template/docs/solutions/agent-knowledge-map.md +238 -0
- package/workspace-template/docs/solutions/bizs-knowledge-pipeline.md +678 -0
- package/workspace-template/docs/solutions/harness.md +410 -0
- package/workspace-template/docs/solutions/knowledge-incremental-sync-spec.md +943 -0
- package/workspace-template/docs/solutions/techs-knowledge-pipeline.md +803 -0
- package/workspace-template/docs/solutions/workspace-structure.md +318 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-test-execute
|
|
3
|
+
description: Executes generated test code, collects results, performs deviation detection against expected outcomes, and generates comprehensive test reports and individual bug reports for failed test cases.
|
|
4
|
+
tools: Read, Write, Glob, Grep, Terminal
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- When speccrew-test-manager dispatches test execution after test code is confirmed
|
|
10
|
+
- When user explicitly requests test execution and reporting
|
|
11
|
+
- When user mentions "run tests", "execute tests", "generate test report"
|
|
12
|
+
|
|
13
|
+
# Workflow
|
|
14
|
+
|
|
15
|
+
## Step 1: Read Inputs
|
|
16
|
+
|
|
17
|
+
Read the following documents in order:
|
|
18
|
+
|
|
19
|
+
1. **Test Cases Document**: `test_cases_path`
|
|
20
|
+
- Contains test case definitions with TC IDs, descriptions, and expected results
|
|
21
|
+
- Used for deviation detection against actual results
|
|
22
|
+
|
|
23
|
+
2. **Test Code Plan**: `test_code_plan_path`
|
|
24
|
+
- Contains mapping between TC IDs and test file locations
|
|
25
|
+
- Identifies platform_id and corresponding test framework
|
|
26
|
+
|
|
27
|
+
3. **Platform Configuration**:
|
|
28
|
+
- Confirm platform_id (frontend/backend/desktop/mobile)
|
|
29
|
+
- Identify test framework (jest/vitest/pytest/junit/etc.)
|
|
30
|
+
|
|
31
|
+
**Input Validation**:
|
|
32
|
+
- Verify all required paths are provided and files exist
|
|
33
|
+
- If any input is missing, report to user and stop
|
|
34
|
+
|
|
35
|
+
## Step 2: Environment Pre-check
|
|
36
|
+
|
|
37
|
+
Before executing tests, verify the environment is ready:
|
|
38
|
+
|
|
39
|
+
### 2.1 Check Test Dependencies
|
|
40
|
+
|
|
41
|
+
| Platform | Dependency Check Command |
|
|
42
|
+
|----------|--------------------------|
|
|
43
|
+
| Frontend | `npm ls jest` or `npm ls vitest` |
|
|
44
|
+
| Backend (Node) | `npm ls jest` or `npm ls mocha` |
|
|
45
|
+
| Backend (Python) | `pip show pytest` |
|
|
46
|
+
| Desktop | Platform-specific dependency check |
|
|
47
|
+
| Mobile | Platform-specific dependency check |
|
|
48
|
+
|
|
49
|
+
If dependencies are missing:
|
|
50
|
+
```
|
|
51
|
+
Environment Error: Missing test dependencies
|
|
52
|
+
- Missing: {dependency_name}
|
|
53
|
+
- Install command: {install_command}
|
|
54
|
+
|
|
55
|
+
Please install dependencies before proceeding.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2.2 Check Test Configuration Files
|
|
59
|
+
|
|
60
|
+
Verify test configuration files exist:
|
|
61
|
+
|
|
62
|
+
| Framework | Config Files |
|
|
63
|
+
|-----------|--------------|
|
|
64
|
+
| Jest | `jest.config.js`, `jest.config.ts`, or `jest` field in `package.json` |
|
|
65
|
+
| Vitest | `vitest.config.ts` or `vite.config.ts` with test section |
|
|
66
|
+
| Pytest | `pytest.ini`, `pyproject.toml`, or `setup.cfg` |
|
|
67
|
+
| JUnit | `junit.xml` or build tool configuration |
|
|
68
|
+
|
|
69
|
+
### 2.3 Check Service Dependencies
|
|
70
|
+
|
|
71
|
+
Determine if the system under test requires:
|
|
72
|
+
- Database service running
|
|
73
|
+
- API server running
|
|
74
|
+
- Mock services configured
|
|
75
|
+
|
|
76
|
+
**Checkpoint A**: If any environment check fails, report specific missing items and stop execution.
|
|
77
|
+
|
|
78
|
+
## Step 3: Execute Tests
|
|
79
|
+
|
|
80
|
+
### 3.1 Determine Test Command
|
|
81
|
+
|
|
82
|
+
Based on platform and framework, execute appropriate test command:
|
|
83
|
+
|
|
84
|
+
| Platform | Framework | Default Command |
|
|
85
|
+
|----------|-----------|-----------------|
|
|
86
|
+
| Frontend | Jest | `npm test -- --json --outputFile=test-results.json` |
|
|
87
|
+
| Frontend | Vitest | `npx vitest run --reporter=json --outputFile=test-results.json` |
|
|
88
|
+
| Backend | Jest | `npm test -- --json --outputFile=test-results.json` |
|
|
89
|
+
| Backend | Pytest | `pytest --json-report --json-report-file=test-results.json` |
|
|
90
|
+
| Desktop | Platform-specific | Depends on technology stack |
|
|
91
|
+
| Mobile | Platform-specific | Depends on technology stack |
|
|
92
|
+
|
|
93
|
+
### 3.2 Execute and Collect Output
|
|
94
|
+
|
|
95
|
+
Run the test command and collect:
|
|
96
|
+
- **Standard Output (stdout)**: Test progress and summary
|
|
97
|
+
- **Standard Error (stderr)**: Error messages and stack traces
|
|
98
|
+
- **Exit Code**: Success (0) or failure (non-zero)
|
|
99
|
+
- **Execution Duration**: Total time taken
|
|
100
|
+
- **Result Files**: JSON/XML reports if supported by framework
|
|
101
|
+
|
|
102
|
+
### 3.3 Handle Execution Errors
|
|
103
|
+
|
|
104
|
+
If test execution fails completely (e.g., syntax errors, configuration errors):
|
|
105
|
+
```
|
|
106
|
+
Test Execution Failed
|
|
107
|
+
- Error Type: {error_type}
|
|
108
|
+
- Error Message: {error_message}
|
|
109
|
+
- Suggested Fix: {suggestion}
|
|
110
|
+
|
|
111
|
+
Please fix the issue and retry.
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Step 4: Parse Results
|
|
115
|
+
|
|
116
|
+
### 4.1 Extract Test Summary
|
|
117
|
+
|
|
118
|
+
Parse test framework output to extract:
|
|
119
|
+
|
|
120
|
+
| Metric | Description |
|
|
121
|
+
|--------|-------------|
|
|
122
|
+
| Total | Total number of test cases executed |
|
|
123
|
+
| Passed | Number of passed tests |
|
|
124
|
+
| Failed | Number of failed tests |
|
|
125
|
+
| Errors | Number of tests with runtime errors |
|
|
126
|
+
| Skipped | Number of skipped tests |
|
|
127
|
+
| Duration | Total execution time |
|
|
128
|
+
|
|
129
|
+
### 4.2 Extract Failed Test Details
|
|
130
|
+
|
|
131
|
+
For each failed test, extract:
|
|
132
|
+
- **Test Function Name**: Full test name/suite
|
|
133
|
+
- **Error Message**: Primary error description
|
|
134
|
+
- **Stack Trace**: Call stack leading to failure
|
|
135
|
+
- **Assertion Details**: Expected vs actual values (if available)
|
|
136
|
+
|
|
137
|
+
### 4.3 Map Tests to TC IDs
|
|
138
|
+
|
|
139
|
+
Use TC ID comments in test code to reverse-map:
|
|
140
|
+
```
|
|
141
|
+
// TC-ID: TC-001
|
|
142
|
+
test('should validate user input', () => { ... });
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Extract TC IDs from:
|
|
146
|
+
- Test file comments
|
|
147
|
+
- Test description patterns
|
|
148
|
+
- Test code plan mapping
|
|
149
|
+
|
|
150
|
+
## Step 5: Deviation Detection
|
|
151
|
+
|
|
152
|
+
### 5.1 Compare Expected vs Actual
|
|
153
|
+
|
|
154
|
+
For each test case:
|
|
155
|
+
1. Read expected result from test cases document
|
|
156
|
+
2. Compare with actual test result
|
|
157
|
+
3. Classify deviation type
|
|
158
|
+
|
|
159
|
+
### 5.2 Classify Deviation Types
|
|
160
|
+
|
|
161
|
+
| Type | Code | Description | Severity |
|
|
162
|
+
|------|------|-------------|----------|
|
|
163
|
+
| FAIL | FAIL | Test assertion failed - actual result differs from expected | High |
|
|
164
|
+
| ERROR | ERROR | Runtime error - code threw exception or crashed | Critical |
|
|
165
|
+
| SKIP | SKIP | Test was skipped - preconditions not met | Medium |
|
|
166
|
+
| FLAKY | FLAKY | Intermittent failure - non-deterministic behavior | High |
|
|
167
|
+
|
|
168
|
+
### 5.3 Root Cause Analysis
|
|
169
|
+
|
|
170
|
+
For each deviation, analyze:
|
|
171
|
+
- **Assertion Failure**: Which specific assertion failed and why
|
|
172
|
+
- **Runtime Error**: Exception type and location
|
|
173
|
+
- **Skip Reason**: Why test could not execute
|
|
174
|
+
- **Flaky Pattern**: Conditions causing intermittent failure
|
|
175
|
+
|
|
176
|
+
## Step 6: Generate Test Report
|
|
177
|
+
|
|
178
|
+
### 6.1 Read Template
|
|
179
|
+
|
|
180
|
+
Read template: `speccrew-test-execute/templates/TEST-REPORT-TEMPLATE.md`
|
|
181
|
+
|
|
182
|
+
### 6.2 Fill Report Content
|
|
183
|
+
|
|
184
|
+
Generate comprehensive test report including:
|
|
185
|
+
|
|
186
|
+
**Execution Summary**:
|
|
187
|
+
- Feature name and platform
|
|
188
|
+
- Test framework and version
|
|
189
|
+
- Execution date and duration
|
|
190
|
+
- Overall pass rate
|
|
191
|
+
|
|
192
|
+
**Results Overview**:
|
|
193
|
+
- Counts and percentages for all result types
|
|
194
|
+
- Visual pass/fail indication
|
|
195
|
+
|
|
196
|
+
**Results by Test Dimension**:
|
|
197
|
+
- Breakdown by test type (happy path, boundary, exception, etc.)
|
|
198
|
+
- Pass rate per dimension
|
|
199
|
+
|
|
200
|
+
**Failed Test Details**:
|
|
201
|
+
- Table of all failed tests
|
|
202
|
+
- Links to corresponding bug reports
|
|
203
|
+
|
|
204
|
+
**Coverage Status**:
|
|
205
|
+
- Requirement-to-test-case mapping
|
|
206
|
+
- Status per requirement
|
|
207
|
+
|
|
208
|
+
**Environment Information**:
|
|
209
|
+
- OS, runtime, framework versions
|
|
210
|
+
- Key dependencies
|
|
211
|
+
|
|
212
|
+
**Recommendations**:
|
|
213
|
+
- Priority fixes needed
|
|
214
|
+
- Suggested next steps
|
|
215
|
+
|
|
216
|
+
### 6.3 Write Report
|
|
217
|
+
|
|
218
|
+
Output path: `{output_dir}/{feature}-test-report.md`
|
|
219
|
+
|
|
220
|
+
## Step 7: Generate Bug Reports
|
|
221
|
+
|
|
222
|
+
### 7.1 Read Template
|
|
223
|
+
|
|
224
|
+
Read template: `speccrew-test-execute/templates/BUG-REPORT-TEMPLATE.md`
|
|
225
|
+
|
|
226
|
+
### 7.2 Create Individual Bug Reports
|
|
227
|
+
|
|
228
|
+
For each FAIL type failure:
|
|
229
|
+
|
|
230
|
+
1. **Assign Bug ID**: `BUG-{feature}-{seq}` (sequential numbering)
|
|
231
|
+
|
|
232
|
+
2. **Determine Severity**:
|
|
233
|
+
| Criteria | Severity |
|
|
234
|
+
|----------|----------|
|
|
235
|
+
| Blocks core functionality, no workaround | Critical |
|
|
236
|
+
| Major feature broken, workaround exists | High |
|
|
237
|
+
| Minor feature issue, cosmetic problem | Medium |
|
|
238
|
+
| Enhancement, minor improvement | Low |
|
|
239
|
+
|
|
240
|
+
3. **Fill Bug Report Content**:
|
|
241
|
+
- Bug title reflecting the failure
|
|
242
|
+
- Related TC ID for traceability
|
|
243
|
+
- Clear reproduction steps
|
|
244
|
+
- Expected result from test case
|
|
245
|
+
- Actual result from execution
|
|
246
|
+
- Relevant error log excerpt
|
|
247
|
+
- Suggested fix direction
|
|
248
|
+
|
|
249
|
+
4. **Write Individual File**:
|
|
250
|
+
Output path: `{output_dir}/bugs/{feature}-bug-{seq}.md`
|
|
251
|
+
|
|
252
|
+
### 7.3 Bug Report Quality Checklist
|
|
253
|
+
|
|
254
|
+
Each bug report must include:
|
|
255
|
+
- [ ] Unique Bug ID
|
|
256
|
+
- [ ] Related TC ID
|
|
257
|
+
- [ ] Severity classification
|
|
258
|
+
- [ ] Clear reproduction steps
|
|
259
|
+
- [ ] Expected vs actual result
|
|
260
|
+
- [ ] Relevant log excerpt
|
|
261
|
+
- [ ] Suggested fix direction
|
|
262
|
+
|
|
263
|
+
# Key Rules
|
|
264
|
+
|
|
265
|
+
| Rule | Description |
|
|
266
|
+
|------|-------------|
|
|
267
|
+
| **Environment First** | Always verify environment before running tests |
|
|
268
|
+
| **Complete Output Capture** | Capture both stdout and stderr for diagnostics |
|
|
269
|
+
| **TC ID Traceability** | Every failed test must be traced back to its TC ID |
|
|
270
|
+
| **One Bug Per File** | Each bug gets its own report file for tracking |
|
|
271
|
+
| **Severity Classification** | Always classify bug severity for prioritization |
|
|
272
|
+
| **Actionable Reports** | Bug reports must include suggested fix direction |
|
|
273
|
+
|
|
274
|
+
# Checklist
|
|
275
|
+
|
|
276
|
+
- [ ] Environment pre-check passed before execution
|
|
277
|
+
- [ ] All test files from code plan were executed
|
|
278
|
+
- [ ] Failed tests are correctly traced back to TC IDs
|
|
279
|
+
- [ ] Test report includes pass rate and failure details
|
|
280
|
+
- [ ] Each FAIL has a corresponding bug report with reproduction steps
|
|
281
|
+
- [ ] Bug severity is classified (Critical/High/Medium/Low)
|
|
282
|
+
- [ ] All bug reports written to correct output path
|
|
283
|
+
- [ ] Test report written to correct output path
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Bug Report: {Bug Title}
|
|
2
|
+
|
|
3
|
+
## Bug Information
|
|
4
|
+
| Item | Value |
|
|
5
|
+
|------|-------|
|
|
6
|
+
| Bug ID | BUG-{feature}-{seq} |
|
|
7
|
+
| Related Test Case | {tc_id} |
|
|
8
|
+
| Severity | {Critical/High/Medium/Low} |
|
|
9
|
+
| Status | Open |
|
|
10
|
+
| Platform | {platform_id} |
|
|
11
|
+
| Detected Date | {date} |
|
|
12
|
+
| Detected By | speccrew-test-execute |
|
|
13
|
+
|
|
14
|
+
## Description
|
|
15
|
+
{brief_description_of_the_bug}
|
|
16
|
+
|
|
17
|
+
## Reproduction Steps
|
|
18
|
+
1. {step_1}
|
|
19
|
+
2. {step_2}
|
|
20
|
+
3. {step_3}
|
|
21
|
+
|
|
22
|
+
## Expected Result
|
|
23
|
+
{expected_result_from_test_case}
|
|
24
|
+
|
|
25
|
+
## Actual Result
|
|
26
|
+
{actual_result_observed}
|
|
27
|
+
|
|
28
|
+
## Error Log
|
|
29
|
+
```
|
|
30
|
+
{relevant_error_log_or_stack_trace}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Environment
|
|
34
|
+
| Item | Value |
|
|
35
|
+
|------|-------|
|
|
36
|
+
| OS | {os} |
|
|
37
|
+
| Runtime | {runtime_version} |
|
|
38
|
+
| Related Module | {module_name} |
|
|
39
|
+
|
|
40
|
+
## Suggested Fix Direction
|
|
41
|
+
{analysis_of_likely_root_cause_and_suggested_fix_approach}
|
|
42
|
+
|
|
43
|
+
## Related Files
|
|
44
|
+
- Test File: {test_file_path}
|
|
45
|
+
- Source File: {likely_source_file} (if identifiable)
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
**Bug Created:** {timestamp}
|
|
50
|
+
**Priority:** {priority_level}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Test Execution Report: {Feature Name}
|
|
2
|
+
|
|
3
|
+
## 1. Execution Summary
|
|
4
|
+
| Item | Value |
|
|
5
|
+
|------|-------|
|
|
6
|
+
| Feature Name | {feature_name} |
|
|
7
|
+
| Platform | {platform_id} |
|
|
8
|
+
| Test Framework | {framework} |
|
|
9
|
+
| Execution Date | {date} |
|
|
10
|
+
| Total Duration | {duration} |
|
|
11
|
+
| Executor | speccrew-test-execute |
|
|
12
|
+
|
|
13
|
+
## 2. Results Overview
|
|
14
|
+
| Metric | Count | Percentage |
|
|
15
|
+
|--------|-------|------------|
|
|
16
|
+
| Total | {total} | 100% |
|
|
17
|
+
| Passed | {passed} | {pass_rate}% |
|
|
18
|
+
| Failed | {failed} | {fail_rate}% |
|
|
19
|
+
| Error | {error} | {error_rate}% |
|
|
20
|
+
| Skipped | {skipped} | {skip_rate}% |
|
|
21
|
+
|
|
22
|
+
## 3. Results by Test Dimension
|
|
23
|
+
| Dimension | Total | Passed | Failed | Pass Rate |
|
|
24
|
+
|-----------|-------|--------|--------|-----------|
|
|
25
|
+
| Happy Path | {n} | {n} | {n} | {rate}% |
|
|
26
|
+
| Boundary Value | {n} | {n} | {n} | {rate}% |
|
|
27
|
+
| Exception Handling | {n} | {n} | {n} | {rate}% |
|
|
28
|
+
| Business Rules | {n} | {n} | {n} | {rate}% |
|
|
29
|
+
| Permission/Security | {n} | {n} | {n} | {rate}% |
|
|
30
|
+
| Data Validation | {n} | {n} | {n} | {rate}% |
|
|
31
|
+
|
|
32
|
+
## 4. Failed Test Details
|
|
33
|
+
| TC ID | Test Name | Failure Type | Error Message | Bug Report |
|
|
34
|
+
|-------|-----------|-------------|---------------|------------|
|
|
35
|
+
| {tc_id} | {test_name} | FAIL/ERROR | {message} | {bug_report_link} |
|
|
36
|
+
|
|
37
|
+
## 5. Coverage Status
|
|
38
|
+
| Requirement ID | Test Case IDs | Status |
|
|
39
|
+
|---------------|---------------|--------|
|
|
40
|
+
| {req_id} | {tc_ids} | Pass/Fail/Partial |
|
|
41
|
+
|
|
42
|
+
## 6. Environment Information
|
|
43
|
+
| Item | Value |
|
|
44
|
+
|------|-------|
|
|
45
|
+
| OS | {os} |
|
|
46
|
+
| Runtime | {runtime_version} |
|
|
47
|
+
| Test Framework | {framework_version} |
|
|
48
|
+
| Dependencies | {key_dependencies} |
|
|
49
|
+
|
|
50
|
+
## 7. Recommendations
|
|
51
|
+
- {recommendation_1}
|
|
52
|
+
- {recommendation_2}
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
**Report Generated:** {timestamp}
|
|
57
|
+
**Next Action:** {next_action}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: speccrew-workflow-diagnose
|
|
3
|
+
description: Diagnose issues in AI engineering workflows. Analyze workflow bottlenecks, Agent behavior anomalies, deliverable quality issues, and provide solutions. Trigger scenarios: user mentions "workflow stuck", "diagnose problem", "Agent not working as expected", "poor deliverable quality"
|
|
4
|
+
tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Trigger Scenarios
|
|
8
|
+
|
|
9
|
+
- AI engineering workflow stuck at a certain stage
|
|
10
|
+
- Agent output does not meet expectations
|
|
11
|
+
- Deliverable quality does not meet standards
|
|
12
|
+
- User mentions "workflow issues", "diagnose", "Agent behavior anomaly"
|
|
13
|
+
|
|
14
|
+
# Workflow
|
|
15
|
+
|
|
16
|
+
## 1. Collect Problem Information
|
|
17
|
+
|
|
18
|
+
Ask or identify the following information:
|
|
19
|
+
- Which stage did the problem occur? (PM / Solution / Design / Development / Testing)
|
|
20
|
+
- What are the specific symptoms?
|
|
21
|
+
- What solutions have been tried?
|
|
22
|
+
|
|
23
|
+
## 2. Read Related Deliverables
|
|
24
|
+
|
|
25
|
+
Based on the problem stage, read the corresponding deliverables:
|
|
26
|
+
|
|
27
|
+
| Problem Stage | Deliverables to Read |
|
|
28
|
+
|---------------|----------------------|
|
|
29
|
+
| PM Stage | `se/prd.md` |
|
|
30
|
+
| Solution Stage | `se/solution.md` |
|
|
31
|
+
| Design Stage | `se/*-design.md` |
|
|
32
|
+
| Development Stage | Related code files |
|
|
33
|
+
| Testing Stage | Test cases, test reports |
|
|
34
|
+
|
|
35
|
+
## 3. Analyze Root Cause
|
|
36
|
+
|
|
37
|
+
Common problem types and diagnostic directions:
|
|
38
|
+
|
|
39
|
+
### Agent Behavior Issues
|
|
40
|
+
|
|
41
|
+
| Symptom | Possible Cause | Solution |
|
|
42
|
+
|---------|----------------|----------|
|
|
43
|
+
| Output too generic | Agent prompt lacks project-specific information | Use `agent-optimize` Skill to supplement specific tech stack |
|
|
44
|
+
| Skipping necessary steps | Workflow description unclear | Add checklists (checkboxes) |
|
|
45
|
+
| Output format chaotic | Output specification unclear | Provide specific template examples |
|
|
46
|
+
| Responsibility overreach | Insufficient constraints | Clearly define prohibited actions |
|
|
47
|
+
|
|
48
|
+
### Workflow Handoff Issues
|
|
49
|
+
|
|
50
|
+
| Symptom | Possible Cause | Solution |
|
|
51
|
+
|---------|----------------|----------|
|
|
52
|
+
| Design document unclear | Missing transition from Solution to design | Add context input requirements for design Agent |
|
|
53
|
+
| Code does not match design | Design document not detailed enough | Output pseudo-code level details in design stage |
|
|
54
|
+
| Test cases incomplete coverage | Testing Agent lacks design input | Ensure testing Agent reads design documents |
|
|
55
|
+
|
|
56
|
+
### Deliverable Quality Issues
|
|
57
|
+
|
|
58
|
+
| Symptom | Possible Cause | Solution |
|
|
59
|
+
|---------|----------------|----------|
|
|
60
|
+
| PRD requirements vague | PM Agent did not fully explore requirements | Add multi-round dialogue confirmation |
|
|
61
|
+
| Solution lacks feasibility analysis | Technical constraints not identified | Add technical feasibility checkpoints |
|
|
62
|
+
| Design document too complex | Not following simple design principles | Split modules, design in phases |
|
|
63
|
+
|
|
64
|
+
## 4. Provide Solutions
|
|
65
|
+
|
|
66
|
+
For identified problems, provide:
|
|
67
|
+
1. **Immediate Solution** - Actions that can be taken immediately
|
|
68
|
+
2. **Long-term Improvement** - Mechanisms to prevent similar issues
|
|
69
|
+
3. **Files to Modify** - Specific configurations or documents to adjust
|
|
70
|
+
|
|
71
|
+
## 5. Execute Fixes (Optional)
|
|
72
|
+
|
|
73
|
+
If user agrees, execute fixes:
|
|
74
|
+
- Use `agent-optimize` to adjust Agent prompts
|
|
75
|
+
- Use `skill-develop` to create new check Skills
|
|
76
|
+
- Update related deliverable templates
|
|
77
|
+
|
|
78
|
+
# Diagnostic Checklist
|
|
79
|
+
|
|
80
|
+
Standard checklist items when analyzing problems:
|
|
81
|
+
|
|
82
|
+
- [ ] Problem stage accurately identified
|
|
83
|
+
- [ ] Related deliverables have been read
|
|
84
|
+
- [ ] Root cause analysis is well-founded
|
|
85
|
+
- [ ] Solutions are specific and feasible
|
|
86
|
+
- [ ] Long-term prevention measures considered
|
|
87
|
+
|
|
88
|
+
# Common Diagnostic Scenarios
|
|
89
|
+
|
|
90
|
+
## Scenario 1: Agent Output Does Not Meet Expectations
|
|
91
|
+
|
|
92
|
+
**Diagnostic Steps:**
|
|
93
|
+
1. Read the corresponding Agent file
|
|
94
|
+
2. Check if description contains trigger scenarios
|
|
95
|
+
3. Check if workflow has checklists
|
|
96
|
+
4. Check if constraints are clear
|
|
97
|
+
|
|
98
|
+
**Fix Solutions:**
|
|
99
|
+
- Optimize Agent prompts (call `agent-optimize`)
|
|
100
|
+
- Add example outputs
|
|
101
|
+
- Clearly define prohibited actions
|
|
102
|
+
|
|
103
|
+
## Scenario 2: Workflow Loops at a Certain Stage
|
|
104
|
+
|
|
105
|
+
**Diagnostic Steps:**
|
|
106
|
+
1. Check if previous stage deliverables are complete
|
|
107
|
+
2. Check if current stage input requirements are clear
|
|
108
|
+
3. Check if deliverable standards are too high or vague
|
|
109
|
+
|
|
110
|
+
**Fix Solutions:**
|
|
111
|
+
- Adjust deliverable acceptance standards
|
|
112
|
+
- Add intermediate checkpoints
|
|
113
|
+
- Split overly long workflow steps
|
|
114
|
+
|
|
115
|
+
## Scenario 3: Multiple Agent Responsibility Conflicts
|
|
116
|
+
|
|
117
|
+
**Diagnostic Steps:**
|
|
118
|
+
1. Compare responsibility descriptions of related Agents
|
|
119
|
+
2. Check for overlaps (what can/cannot be done)
|
|
120
|
+
3. Check deliverable definitions at handoff points
|
|
121
|
+
|
|
122
|
+
**Fix Solutions:**
|
|
123
|
+
- Redefine responsibility boundaries
|
|
124
|
+
- Clarify deliverable handoff standards
|
|
125
|
+
- Add dedicated handoff Agent
|
|
126
|
+
|
|
127
|
+
# Verification Checklist
|
|
128
|
+
|
|
129
|
+
- [ ] Problem root cause identified
|
|
130
|
+
- [ ] Solutions provided
|
|
131
|
+
- [ ] User understands and agrees with solution
|
|
132
|
+
- [ ] If fixes needed, fixes completed
|
|
133
|
+
|
|
134
|
+
# Output Format
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
## Workflow Diagnostic Report
|
|
138
|
+
|
|
139
|
+
### Problem Description
|
|
140
|
+
[User described problem]
|
|
141
|
+
|
|
142
|
+
### Root Cause Analysis
|
|
143
|
+
[Analyzed root cause]
|
|
144
|
+
|
|
145
|
+
### Solutions
|
|
146
|
+
1. **Immediate Measures**: [What can be done immediately]
|
|
147
|
+
2. **Long-term Improvement**: [Prevention mechanism]
|
|
148
|
+
|
|
149
|
+
### Files to Modify
|
|
150
|
+
- [File path] - [Modification content]
|
|
151
|
+
|
|
152
|
+
### Recommendations
|
|
153
|
+
[Next step action recommendations]
|
|
154
|
+
```
|
|
155
|
+
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DevCrew Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|