@su-record/vibe 2.6.25 → 2.6.26
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/agents/docs/api-documenter.md +99 -0
- package/agents/docs/changelog-writer.md +93 -0
- package/agents/planning/requirements-analyst.md +84 -0
- package/agents/planning/ux-advisor.md +83 -0
- package/agents/qa/acceptance-tester.md +86 -0
- package/agents/qa/edge-case-finder.md +93 -0
- package/dist/lib/memory/ObservationStore.d.ts.map +1 -1
- package/dist/lib/memory/ObservationStore.js +0 -1
- package/dist/lib/memory/ObservationStore.js.map +1 -1
- package/dist/tools/spec/e2eTestGenerator.d.ts +62 -0
- package/dist/tools/spec/e2eTestGenerator.d.ts.map +1 -0
- package/dist/tools/spec/e2eTestGenerator.js +256 -0
- package/dist/tools/spec/e2eTestGenerator.js.map +1 -0
- package/dist/tools/spec/index.d.ts +2 -0
- package/dist/tools/spec/index.d.ts.map +1 -1
- package/dist/tools/spec/index.js +2 -0
- package/dist/tools/spec/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# API Documenter
|
|
2
|
+
|
|
3
|
+
<!-- API Documentation Generation Agent -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Analyze source code to extract API endpoints and interfaces
|
|
8
|
+
- Generate structured API documentation (request/response schemas)
|
|
9
|
+
- Identify undocumented endpoints and missing descriptions
|
|
10
|
+
- Verify error response documentation completeness
|
|
11
|
+
- Check authentication requirement documentation
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return documentation as text output
|
|
24
|
+
- Results can be used by other tools to generate files
|
|
25
|
+
|
|
26
|
+
## Checklist
|
|
27
|
+
|
|
28
|
+
### Endpoint Coverage
|
|
29
|
+
|
|
30
|
+
- [ ] All route handlers/controllers documented?
|
|
31
|
+
- [ ] HTTP method and path clearly specified?
|
|
32
|
+
- [ ] Request parameters (path, query, body) described?
|
|
33
|
+
- [ ] Response schemas for success and error cases?
|
|
34
|
+
- [ ] Authentication requirements noted?
|
|
35
|
+
|
|
36
|
+
### Schema Quality
|
|
37
|
+
|
|
38
|
+
- [ ] All fields have types and descriptions?
|
|
39
|
+
- [ ] Required vs optional fields marked?
|
|
40
|
+
- [ ] Enum values listed?
|
|
41
|
+
- [ ] Nested objects described?
|
|
42
|
+
- [ ] Array item types specified?
|
|
43
|
+
|
|
44
|
+
### Error Documentation
|
|
45
|
+
|
|
46
|
+
- [ ] All error status codes documented?
|
|
47
|
+
- [ ] Error response format specified?
|
|
48
|
+
- [ ] Common error scenarios listed?
|
|
49
|
+
- [ ] Rate limiting documented (if applicable)?
|
|
50
|
+
|
|
51
|
+
### Examples
|
|
52
|
+
|
|
53
|
+
- [ ] Request examples for each endpoint?
|
|
54
|
+
- [ ] Response examples (success + error)?
|
|
55
|
+
- [ ] cURL or fetch examples?
|
|
56
|
+
|
|
57
|
+
## Output Format
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## API Documentation: {feature/module name}
|
|
61
|
+
|
|
62
|
+
### Endpoints Found: {N}
|
|
63
|
+
### Undocumented: {N}
|
|
64
|
+
|
|
65
|
+
### Endpoint: {METHOD} {path}
|
|
66
|
+
|
|
67
|
+
**Authentication**: {required/optional/none}
|
|
68
|
+
|
|
69
|
+
**Parameters**:
|
|
70
|
+
| Name | In | Type | Required | Description |
|
|
71
|
+
|------|----|------|----------|-------------|
|
|
72
|
+
| id | path | string | yes | Resource identifier |
|
|
73
|
+
|
|
74
|
+
**Request Body**:
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"field": "type - description"
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Responses**:
|
|
82
|
+
| Status | Description |
|
|
83
|
+
|--------|-------------|
|
|
84
|
+
| 200 | Success - {description} |
|
|
85
|
+
| 400 | Bad Request - {when} |
|
|
86
|
+
| 401 | Unauthorized - {when} |
|
|
87
|
+
| 404 | Not Found - {when} |
|
|
88
|
+
|
|
89
|
+
**Example**:
|
|
90
|
+
```bash
|
|
91
|
+
curl -X {METHOD} /api/{path} \
|
|
92
|
+
-H "Authorization: Bearer {token}" \
|
|
93
|
+
-d '{"field": "value"}'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Missing Documentation
|
|
97
|
+
- **[DOC-001]** Endpoint {METHOD} {path} has no description
|
|
98
|
+
- **[DOC-002]** Error response {status} not documented for {endpoint}
|
|
99
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Changelog Writer
|
|
2
|
+
|
|
3
|
+
<!-- Changelog Generation Agent from Git Diff -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Analyze git diff to generate structured changelog entries
|
|
8
|
+
- Classify changes (breaking, feature, fix, refactor, docs, chore)
|
|
9
|
+
- Identify breaking changes that need migration guides
|
|
10
|
+
- Generate user-facing descriptions (not internal implementation details)
|
|
11
|
+
- Suggest semantic version bump (major/minor/patch)
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return changelog content as text output
|
|
24
|
+
|
|
25
|
+
## Checklist
|
|
26
|
+
|
|
27
|
+
### Change Classification
|
|
28
|
+
|
|
29
|
+
- [ ] Breaking changes identified (API removal, schema change, behavior change)?
|
|
30
|
+
- [ ] New features listed with user-facing descriptions?
|
|
31
|
+
- [ ] Bug fixes described with before/after behavior?
|
|
32
|
+
- [ ] Performance improvements quantified (if measurable)?
|
|
33
|
+
- [ ] Dependency updates noted?
|
|
34
|
+
|
|
35
|
+
### Migration Impact
|
|
36
|
+
|
|
37
|
+
- [ ] Breaking changes have migration steps?
|
|
38
|
+
- [ ] Deprecated features noted with replacement?
|
|
39
|
+
- [ ] Configuration changes documented?
|
|
40
|
+
- [ ] Database migration needed?
|
|
41
|
+
|
|
42
|
+
### Quality
|
|
43
|
+
|
|
44
|
+
- [ ] Descriptions are user-facing (not implementation details)?
|
|
45
|
+
- [ ] Each entry has enough context to understand the change?
|
|
46
|
+
- [ ] Related changes grouped together?
|
|
47
|
+
- [ ] PR/issue references included (if available)?
|
|
48
|
+
|
|
49
|
+
## Input
|
|
50
|
+
|
|
51
|
+
Provide the agent with:
|
|
52
|
+
- `git diff` output (staged or between branches)
|
|
53
|
+
- `git log --oneline` for commit messages
|
|
54
|
+
- Current version number
|
|
55
|
+
|
|
56
|
+
## Output Format
|
|
57
|
+
|
|
58
|
+
```markdown
|
|
59
|
+
## Changelog Analysis
|
|
60
|
+
|
|
61
|
+
### Recommended Version Bump: {major|minor|patch}
|
|
62
|
+
Reason: {why this bump level}
|
|
63
|
+
|
|
64
|
+
### Changelog Entry
|
|
65
|
+
|
|
66
|
+
## [{new-version}] - {YYYY-MM-DD}
|
|
67
|
+
|
|
68
|
+
### Breaking Changes
|
|
69
|
+
- **{component}**: {description of breaking change}
|
|
70
|
+
- Migration: {step-by-step migration guide}
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
- {User-facing description of new feature} ({files affected})
|
|
74
|
+
- {Another feature}
|
|
75
|
+
|
|
76
|
+
### Changed
|
|
77
|
+
- {Description of behavior change}
|
|
78
|
+
|
|
79
|
+
### Fixed
|
|
80
|
+
- {Description of bug fix} - previously {old behavior}, now {new behavior}
|
|
81
|
+
|
|
82
|
+
### Performance
|
|
83
|
+
- {Description of optimization} ({metric improvement if available})
|
|
84
|
+
|
|
85
|
+
### Internal
|
|
86
|
+
- {Refactoring or internal change that doesn't affect users}
|
|
87
|
+
|
|
88
|
+
### Dependencies
|
|
89
|
+
- Updated {package} from {old} to {new}
|
|
90
|
+
|
|
91
|
+
### Notes
|
|
92
|
+
- {Any additional context for users}
|
|
93
|
+
```
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Requirements Analyst
|
|
2
|
+
|
|
3
|
+
<!-- Requirements Completeness Analysis Agent -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Analyze requirements completeness in SPEC documents
|
|
8
|
+
- Identify gaps, missing flows, and undefined edge cases
|
|
9
|
+
- Detect ambiguous terms and unspecified numbers
|
|
10
|
+
- Map inter-requirement dependencies
|
|
11
|
+
- Verify non-functional requirements coverage (performance, security, accessibility)
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return analysis results as text output
|
|
24
|
+
|
|
25
|
+
## Checklist
|
|
26
|
+
|
|
27
|
+
### Completeness
|
|
28
|
+
|
|
29
|
+
- [ ] All user flows defined (happy path + error paths)?
|
|
30
|
+
- [ ] Edge cases identified for each flow?
|
|
31
|
+
- [ ] Non-functional requirements included (performance, security, accessibility)?
|
|
32
|
+
- [ ] Data validation rules specified for all inputs?
|
|
33
|
+
- [ ] Authentication/authorization requirements defined?
|
|
34
|
+
- [ ] Error handling requirements for all external dependencies?
|
|
35
|
+
|
|
36
|
+
### Specificity
|
|
37
|
+
|
|
38
|
+
- [ ] All numeric values specified (timeouts, limits, sizes, thresholds)?
|
|
39
|
+
- [ ] No ambiguous terms ("appropriate", "proper", "fast", "soon")?
|
|
40
|
+
- [ ] Clear success/failure criteria for each requirement?
|
|
41
|
+
- [ ] API contracts specified (request/response schemas)?
|
|
42
|
+
|
|
43
|
+
### Dependencies
|
|
44
|
+
|
|
45
|
+
- [ ] Inter-requirement dependencies mapped?
|
|
46
|
+
- [ ] External system dependencies identified?
|
|
47
|
+
- [ ] Data migration requirements documented?
|
|
48
|
+
- [ ] Rollback/recovery strategy defined?
|
|
49
|
+
|
|
50
|
+
### Gaps
|
|
51
|
+
|
|
52
|
+
- [ ] Missing authentication/authorization flows?
|
|
53
|
+
- [ ] Missing error handling scenarios?
|
|
54
|
+
- [ ] Missing data validation rules?
|
|
55
|
+
- [ ] Missing concurrency/race condition handling?
|
|
56
|
+
- [ ] Missing internationalization/localization requirements?
|
|
57
|
+
|
|
58
|
+
## Output Format
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Requirements Analysis: {feature-name}
|
|
62
|
+
|
|
63
|
+
### Summary
|
|
64
|
+
- Total requirements analyzed: {N}
|
|
65
|
+
- Completeness score: {N}%
|
|
66
|
+
- Issues found: {P1: N, P2: N, P3: N}
|
|
67
|
+
|
|
68
|
+
### Findings
|
|
69
|
+
|
|
70
|
+
#### P1 (Critical) - Blocks Implementation
|
|
71
|
+
- **[GAP-001]** Missing error handling for {scenario}
|
|
72
|
+
- Location: Phase {N}, AC #{N}
|
|
73
|
+
- Impact: Implementation cannot handle failure cases
|
|
74
|
+
- Recommendation: Add AC for {specific scenario}
|
|
75
|
+
|
|
76
|
+
#### P2 (Important) - Should Fix Before Implementation
|
|
77
|
+
- **[AMB-001]** Ambiguous term "{term}" in {location}
|
|
78
|
+
- Current: "{vague description}"
|
|
79
|
+
- Suggested: "{specific description with numbers}"
|
|
80
|
+
|
|
81
|
+
#### P3 (Nice-to-have) - Consider Adding
|
|
82
|
+
- **[ENH-001]** Missing non-functional requirement
|
|
83
|
+
- Suggestion: Add performance target for {operation}
|
|
84
|
+
```
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# UX Advisor
|
|
2
|
+
|
|
3
|
+
<!-- UI/UX Design Advisory Agent -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Review SPEC and Feature files for UX completeness
|
|
8
|
+
- Identify missing user interaction states (loading, error, empty, success)
|
|
9
|
+
- Verify accessibility requirements (WCAG 2.1 AA)
|
|
10
|
+
- Check responsive design considerations
|
|
11
|
+
- Suggest user feedback mechanisms and micro-interactions
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return analysis results as text output
|
|
24
|
+
|
|
25
|
+
## Checklist
|
|
26
|
+
|
|
27
|
+
### Interaction States
|
|
28
|
+
|
|
29
|
+
- [ ] Loading state defined for all async operations?
|
|
30
|
+
- [ ] Error state with user-friendly messages for all failure cases?
|
|
31
|
+
- [ ] Empty state for lists/collections with zero items?
|
|
32
|
+
- [ ] Success feedback (toast, redirect, confirmation)?
|
|
33
|
+
- [ ] Partial/degraded state for offline or slow connections?
|
|
34
|
+
|
|
35
|
+
### Accessibility (WCAG 2.1 AA)
|
|
36
|
+
|
|
37
|
+
- [ ] Keyboard navigation for all interactive elements?
|
|
38
|
+
- [ ] Screen reader support (ARIA labels, semantic HTML)?
|
|
39
|
+
- [ ] Color contrast ratios meet 4.5:1 minimum?
|
|
40
|
+
- [ ] Focus management for modals and dynamic content?
|
|
41
|
+
- [ ] Alternative text for images and icons?
|
|
42
|
+
- [ ] Form validation errors associated with inputs?
|
|
43
|
+
|
|
44
|
+
### Responsive Design
|
|
45
|
+
|
|
46
|
+
- [ ] Mobile viewport considered (320px+)?
|
|
47
|
+
- [ ] Touch targets minimum 44x44px?
|
|
48
|
+
- [ ] Content priority for small screens?
|
|
49
|
+
- [ ] Navigation pattern for mobile (hamburger, tab bar)?
|
|
50
|
+
|
|
51
|
+
### User Feedback
|
|
52
|
+
|
|
53
|
+
- [ ] Progress indicators for multi-step processes?
|
|
54
|
+
- [ ] Confirmation for destructive actions (delete, cancel)?
|
|
55
|
+
- [ ] Undo capability for reversible actions?
|
|
56
|
+
- [ ] Clear call-to-action for primary flows?
|
|
57
|
+
|
|
58
|
+
## Output Format
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## UX Review: {feature-name}
|
|
62
|
+
|
|
63
|
+
### Summary
|
|
64
|
+
- UX completeness: {N}%
|
|
65
|
+
- Issues found: {P1: N, P2: N, P3: N}
|
|
66
|
+
|
|
67
|
+
### Findings
|
|
68
|
+
|
|
69
|
+
#### P1 (Critical) - Major UX Gap
|
|
70
|
+
- **[UX-001]** Missing loading state for {operation}
|
|
71
|
+
- Location: Phase {N}, Scenario {name}
|
|
72
|
+
- Impact: Users see blank screen during API calls
|
|
73
|
+
- Recommendation: Add skeleton loader or spinner
|
|
74
|
+
|
|
75
|
+
#### P2 (Important) - UX Improvement
|
|
76
|
+
- **[A11Y-001]** Missing keyboard navigation for {component}
|
|
77
|
+
- WCAG: 2.1.1 Keyboard (Level A)
|
|
78
|
+
- Recommendation: Add tabIndex and onKeyDown handlers
|
|
79
|
+
|
|
80
|
+
#### P3 (Nice-to-have) - Enhancement
|
|
81
|
+
- **[UX-002]** Consider adding micro-interaction for {action}
|
|
82
|
+
- Suggestion: Animate {element} on {trigger}
|
|
83
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Acceptance Tester
|
|
2
|
+
|
|
3
|
+
<!-- Acceptance Criteria Testability Verification Agent -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Verify that all acceptance criteria are testable and measurable
|
|
8
|
+
- Check Given/When/Then completeness in Feature scenarios
|
|
9
|
+
- Identify criteria that cannot be automated
|
|
10
|
+
- Ensure criteria have concrete pass/fail thresholds
|
|
11
|
+
- Cross-validate SPEC acceptance criteria against Feature scenarios
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return analysis results as text output
|
|
24
|
+
|
|
25
|
+
## Target
|
|
26
|
+
|
|
27
|
+
This agent analyzes **SPEC and Feature documents**, NOT source code.
|
|
28
|
+
|
|
29
|
+
Input files:
|
|
30
|
+
- `.claude/vibe/specs/{feature-name}.md` - SPEC with `<acceptance>` section
|
|
31
|
+
- `.claude/vibe/features/{feature-name}.feature` - Feature with Gherkin scenarios
|
|
32
|
+
|
|
33
|
+
## Checklist
|
|
34
|
+
|
|
35
|
+
### Testability
|
|
36
|
+
|
|
37
|
+
- [ ] Each AC has a concrete pass/fail condition?
|
|
38
|
+
- [ ] Numeric thresholds specified (response time, limits, percentages)?
|
|
39
|
+
- [ ] No subjective criteria ("should be fast", "user-friendly")?
|
|
40
|
+
- [ ] Each AC maps to at least one Feature scenario?
|
|
41
|
+
- [ ] Scenarios have complete Given/When/Then (no missing steps)?
|
|
42
|
+
|
|
43
|
+
### Coverage
|
|
44
|
+
|
|
45
|
+
- [ ] All SPEC phases have corresponding AC?
|
|
46
|
+
- [ ] All AC have corresponding Feature scenarios?
|
|
47
|
+
- [ ] Error/failure scenarios included?
|
|
48
|
+
- [ ] Boundary conditions covered?
|
|
49
|
+
- [ ] Build/compile verification included?
|
|
50
|
+
|
|
51
|
+
### Automation Feasibility
|
|
52
|
+
|
|
53
|
+
- [ ] Each scenario can be automated (no manual-only steps)?
|
|
54
|
+
- [ ] Test data requirements identified?
|
|
55
|
+
- [ ] External dependencies mockable?
|
|
56
|
+
- [ ] Timing-dependent tests have appropriate tolerances?
|
|
57
|
+
|
|
58
|
+
## Output Format
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Acceptance Test Review: {feature-name}
|
|
62
|
+
|
|
63
|
+
### Coverage Matrix
|
|
64
|
+
| Phase | AC Count | Scenarios | Coverage |
|
|
65
|
+
|-------|----------|-----------|----------|
|
|
66
|
+
| Phase 1 | {N} | {N} | {full/partial/none} |
|
|
67
|
+
| Phase 2 | {N} | {N} | {full/partial/none} |
|
|
68
|
+
|
|
69
|
+
### Findings
|
|
70
|
+
|
|
71
|
+
#### P1 (Critical) - Untestable Criteria
|
|
72
|
+
- **[TEST-001]** AC "{criterion}" is not measurable
|
|
73
|
+
- Phase: {N}, AC #{N}
|
|
74
|
+
- Problem: No concrete pass/fail threshold
|
|
75
|
+
- Fix: Change to "{specific measurable criterion}"
|
|
76
|
+
|
|
77
|
+
#### P2 (Important) - Incomplete Scenarios
|
|
78
|
+
- **[COV-001]** AC "{criterion}" has no Feature scenario
|
|
79
|
+
- Phase: {N}, AC #{N}
|
|
80
|
+
- Recommendation: Add Scenario with Given/When/Then
|
|
81
|
+
|
|
82
|
+
#### P3 (Nice-to-have) - Improvements
|
|
83
|
+
- **[ENH-001]** Consider adding boundary test for {value}
|
|
84
|
+
- Current: Only tests happy path
|
|
85
|
+
- Suggestion: Add scenario for min/max/zero values
|
|
86
|
+
```
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Edge Case Finder
|
|
2
|
+
|
|
3
|
+
<!-- Edge Case and Boundary Condition Detection Agent -->
|
|
4
|
+
|
|
5
|
+
## Role
|
|
6
|
+
|
|
7
|
+
- Identify edge cases, boundary conditions, and corner cases in SPEC and code
|
|
8
|
+
- Detect potential race conditions and concurrency issues
|
|
9
|
+
- Find missing null/empty/undefined handling
|
|
10
|
+
- Identify data overflow and type boundary risks
|
|
11
|
+
- Suggest defensive coding scenarios
|
|
12
|
+
|
|
13
|
+
## Model
|
|
14
|
+
|
|
15
|
+
**Haiku** (inherit) - Fast analysis
|
|
16
|
+
|
|
17
|
+
## CRITICAL: NO FILE CREATION
|
|
18
|
+
|
|
19
|
+
**THIS AGENT MUST NEVER CREATE FILES.**
|
|
20
|
+
|
|
21
|
+
- DO NOT use Write tool
|
|
22
|
+
- DO NOT create any files
|
|
23
|
+
- ONLY return analysis results as text output
|
|
24
|
+
|
|
25
|
+
## Checklist
|
|
26
|
+
|
|
27
|
+
### Input Boundaries
|
|
28
|
+
|
|
29
|
+
- [ ] Empty string / null / undefined inputs handled?
|
|
30
|
+
- [ ] Maximum length inputs tested?
|
|
31
|
+
- [ ] Special characters (unicode, emoji, RTL, zero-width)?
|
|
32
|
+
- [ ] Numeric boundaries (0, -1, MAX_INT, NaN, Infinity)?
|
|
33
|
+
- [ ] Empty arrays/collections?
|
|
34
|
+
- [ ] Deeply nested structures?
|
|
35
|
+
|
|
36
|
+
### State Boundaries
|
|
37
|
+
|
|
38
|
+
- [ ] First-time use (no data, no history)?
|
|
39
|
+
- [ ] Single item vs many items?
|
|
40
|
+
- [ ] Maximum capacity reached?
|
|
41
|
+
- [ ] Concurrent modifications (race conditions)?
|
|
42
|
+
- [ ] Interrupted operations (network drop, browser close)?
|
|
43
|
+
- [ ] Session expiry mid-operation?
|
|
44
|
+
|
|
45
|
+
### Environment Boundaries
|
|
46
|
+
|
|
47
|
+
- [ ] Slow network / offline mode?
|
|
48
|
+
- [ ] API timeout handling?
|
|
49
|
+
- [ ] Disk full / quota exceeded?
|
|
50
|
+
- [ ] Clock skew / timezone changes?
|
|
51
|
+
- [ ] Multiple browser tabs/windows?
|
|
52
|
+
- [ ] Different locales (date format, number format)?
|
|
53
|
+
|
|
54
|
+
### Data Boundaries
|
|
55
|
+
|
|
56
|
+
- [ ] Duplicate entries handling?
|
|
57
|
+
- [ ] Circular references?
|
|
58
|
+
- [ ] Data type mismatches (string where number expected)?
|
|
59
|
+
- [ ] Large file uploads?
|
|
60
|
+
- [ ] Malformed/corrupt data?
|
|
61
|
+
|
|
62
|
+
## Output Format
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
## Edge Case Analysis: {feature-name}
|
|
66
|
+
|
|
67
|
+
### Summary
|
|
68
|
+
- Edge cases identified: {N}
|
|
69
|
+
- By severity: {P1: N, P2: N, P3: N}
|
|
70
|
+
- Categories: Input({N}), State({N}), Environment({N}), Data({N})
|
|
71
|
+
|
|
72
|
+
### Findings
|
|
73
|
+
|
|
74
|
+
#### P1 (Critical) - Likely to Cause Bugs
|
|
75
|
+
- **[EDGE-001]** No handling for empty {input} in {function/scenario}
|
|
76
|
+
- Location: Phase {N}, {context}
|
|
77
|
+
- Scenario: User submits form with empty {field}
|
|
78
|
+
- Expected: Validation error message
|
|
79
|
+
- Actual risk: Unhandled exception / silent failure
|
|
80
|
+
- Recommendation: Add validation for empty input
|
|
81
|
+
|
|
82
|
+
#### P2 (Important) - Could Cause Issues
|
|
83
|
+
- **[RACE-001]** Potential race condition in {operation}
|
|
84
|
+
- Scenario: Two users {action} simultaneously
|
|
85
|
+
- Risk: Data inconsistency / lost update
|
|
86
|
+
- Recommendation: Add optimistic locking or mutex
|
|
87
|
+
|
|
88
|
+
#### P3 (Nice-to-have) - Defensive Improvement
|
|
89
|
+
- **[BOUND-001]** No maximum limit for {collection}
|
|
90
|
+
- Current: Unbounded growth possible
|
|
91
|
+
- Risk: Memory exhaustion over time
|
|
92
|
+
- Suggestion: Add configurable limit with pagination
|
|
93
|
+
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationStore.d.ts","sourceRoot":"","sources":["../../../src/lib/memory/ObservationStore.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObservationStore.d.ts","sourceRoot":"","sources":["../../../src/lib/memory/ObservationStore.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAA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AAW,GAAG,WAAW,EAAE;IAS1E;;OAEG;IACI,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,WAAW,EAAE;IAyB/D;;OAEG;IACI,QAAQ,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE;IAepE;;OAEG;IACI,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAKjD,OAAO,CAAC,gBAAgB;CAczB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservationStore.js","sourceRoot":"","sources":["../../../src/lib/memory/ObservationStore.ts"],"names":[],"mappings":"AAAA,gEAAgE;
|
|
1
|
+
{"version":3,"file":"ObservationStore.js","sourceRoot":"","sources":["../../../src/lib/memory/ObservationStore.ts"],"names":[],"mappings":"AAAA,gEAAgE;AA4ChE,MAAM,OAAO,gBAAgB;IACnB,EAAE,CAAoB;IAE9B,YAAY,OAAsB;QAChC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAClC,CAAC;IAED;;OAEG;IACI,GAAG,CAAC,KAAuB;QAChC,MAAM,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;;;KAG5B,CAAC,CAAC;QAEH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CACrB,KAAK,CAAC,SAAS,IAAI,IAAI,EACvB,KAAK,CAAC,IAAI,EACV,KAAK,CAAC,KAAK,EACX,KAAK,CAAC,SAAS,IAAI,IAAI,EACvB,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAChD,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAA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CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QAC9F,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAEO,gBAAgB,CAAC,GAAmB;QAC1C,OAAO;YACL,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,IAAI,EAAE,GAAG,CAAC,IAAuB;YACjC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,KAAK,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;YAC7C,QAAQ,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE;YACtD,aAAa,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE;YACrE,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,WAAW,EAAE,GAAG,CAAC,WAAW;SAC7B,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* E2E Test Generator - SPEC acceptance criteria + Feature scenarios → Playwright test skeletons
|
|
3
|
+
* v2.7.0: BDD-driven test generation from SPEC review
|
|
4
|
+
*/
|
|
5
|
+
/** Phase별 acceptance criteria */
|
|
6
|
+
export interface AcceptanceCriterion {
|
|
7
|
+
phase: string;
|
|
8
|
+
phaseName: string;
|
|
9
|
+
criteria: string[];
|
|
10
|
+
}
|
|
11
|
+
/** Gherkin 시나리오 (Given/When/Then 포함) */
|
|
12
|
+
export interface GherkinScenario {
|
|
13
|
+
name: string;
|
|
14
|
+
phase: string;
|
|
15
|
+
given: string[];
|
|
16
|
+
when: string[];
|
|
17
|
+
then: string[];
|
|
18
|
+
and: string[];
|
|
19
|
+
verification?: string;
|
|
20
|
+
}
|
|
21
|
+
/** 생성된 E2E 테스트 */
|
|
22
|
+
export interface GeneratedE2ETest {
|
|
23
|
+
fileName: string;
|
|
24
|
+
content: string;
|
|
25
|
+
scenarioCount: number;
|
|
26
|
+
phase: string;
|
|
27
|
+
}
|
|
28
|
+
/** E2E 생성기 옵션 */
|
|
29
|
+
export interface E2EGeneratorOptions {
|
|
30
|
+
specPath?: string;
|
|
31
|
+
featurePath?: string;
|
|
32
|
+
outputDir?: string;
|
|
33
|
+
projectPath?: string;
|
|
34
|
+
}
|
|
35
|
+
/** 생성 결과 */
|
|
36
|
+
export interface E2EGenerationResult {
|
|
37
|
+
featureName: string;
|
|
38
|
+
tests: GeneratedE2ETest[];
|
|
39
|
+
totalScenarios: number;
|
|
40
|
+
outputDir: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* SPEC의 <acceptance> 블록에서 Phase별 criteria 추출
|
|
44
|
+
*/
|
|
45
|
+
export declare function parseAcceptanceCriteria(specContent: string): AcceptanceCriterion[];
|
|
46
|
+
/**
|
|
47
|
+
* Feature 파일에서 Gherkin 시나리오 추출 (Given/When/Then 포함)
|
|
48
|
+
*/
|
|
49
|
+
export declare function parseGherkinScenarios(featureContent: string): GherkinScenario[];
|
|
50
|
+
/**
|
|
51
|
+
* Playwright test skeleton 생성
|
|
52
|
+
*/
|
|
53
|
+
export declare function generatePlaywrightSkeleton(criteria: AcceptanceCriterion[], scenarios: GherkinScenario[], featureName: string): GeneratedE2ETest[];
|
|
54
|
+
/**
|
|
55
|
+
* 메인 함수: SPEC + Feature → E2E test skeletons
|
|
56
|
+
*/
|
|
57
|
+
export declare function generateE2ETests(featureName: string, options?: E2EGeneratorOptions): E2EGenerationResult;
|
|
58
|
+
/**
|
|
59
|
+
* 생성 결과 요약을 포맷팅
|
|
60
|
+
*/
|
|
61
|
+
export declare function formatGenerationSummary(result: E2EGenerationResult): string;
|
|
62
|
+
//# sourceMappingURL=e2eTestGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2eTestGenerator.d.ts","sourceRoot":"","sources":["../../../src/tools/spec/e2eTestGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,iCAAiC;AACjC,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wCAAwC;AACxC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,EAAE,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,kBAAkB;AAClB,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iBAAiB;AACjB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,YAAY;AACZ,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAoClF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,cAAc,EAAE,MAAM,GAAG,eAAe,EAAE,CAgE/E;AAMD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,mBAAmB,EAAE,EAC/B,SAAS,EAAE,eAAe,EAAE,EAC5B,WAAW,EAAE,MAAM,GAClB,gBAAgB,EAAE,CAuFpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,mBAAwB,GAChC,mBAAmB,CAyCrB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAY3E"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* E2E Test Generator - SPEC acceptance criteria + Feature scenarios → Playwright test skeletons
|
|
3
|
+
* v2.7.0: BDD-driven test generation from SPEC review
|
|
4
|
+
*/
|
|
5
|
+
import * as fs from 'fs';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
// ============================================
|
|
8
|
+
// Parsing Functions
|
|
9
|
+
// ============================================
|
|
10
|
+
/**
|
|
11
|
+
* SPEC의 <acceptance> 블록에서 Phase별 criteria 추출
|
|
12
|
+
*/
|
|
13
|
+
export function parseAcceptanceCriteria(specContent) {
|
|
14
|
+
const results = [];
|
|
15
|
+
// <acceptance> 블록 추출
|
|
16
|
+
const acceptanceMatch = specContent.match(/<acceptance>([\s\S]*?)<\/acceptance>/);
|
|
17
|
+
if (!acceptanceMatch)
|
|
18
|
+
return results;
|
|
19
|
+
const block = acceptanceMatch[1];
|
|
20
|
+
// Phase별로 분할
|
|
21
|
+
const phasePattern = /###\s*Phase\s*(\d+)[:\s]*([^\n]*)\n([\s\S]*?)(?=###\s*Phase|\s*$)/gi;
|
|
22
|
+
let match;
|
|
23
|
+
while ((match = phasePattern.exec(block)) !== null) {
|
|
24
|
+
const phaseNum = match[1];
|
|
25
|
+
const phaseName = match[2].trim();
|
|
26
|
+
const criteriaBlock = match[3];
|
|
27
|
+
// - [ ] 패턴으로 criteria 추출
|
|
28
|
+
const criteria = [];
|
|
29
|
+
const criteriaPattern = /- \[ \] (.+)/g;
|
|
30
|
+
let criterionMatch;
|
|
31
|
+
while ((criterionMatch = criteriaPattern.exec(criteriaBlock)) !== null) {
|
|
32
|
+
criteria.push(criterionMatch[1].trim());
|
|
33
|
+
}
|
|
34
|
+
if (criteria.length > 0) {
|
|
35
|
+
results.push({
|
|
36
|
+
phase: phaseNum,
|
|
37
|
+
phaseName,
|
|
38
|
+
criteria,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return results;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Feature 파일에서 Gherkin 시나리오 추출 (Given/When/Then 포함)
|
|
46
|
+
*/
|
|
47
|
+
export function parseGherkinScenarios(featureContent) {
|
|
48
|
+
const results = [];
|
|
49
|
+
// Phase 추출
|
|
50
|
+
const phasePattern = /##\s*Phase\s*(\d+)[:\s]*([^\n]*)\n([\s\S]*?)(?=##\s*Phase|\s*$)/gi;
|
|
51
|
+
let phaseMatch;
|
|
52
|
+
while ((phaseMatch = phasePattern.exec(featureContent)) !== null) {
|
|
53
|
+
const phaseNum = phaseMatch[1];
|
|
54
|
+
const phaseBlock = phaseMatch[3];
|
|
55
|
+
// 시나리오 추출
|
|
56
|
+
const scenarioPattern = /###\s*Scenario\s*\d*[:\s]*([^\n]*)\n```gherkin\n([\s\S]*?)```(?:\n\*\*Verification\*\*[:\s]*([^\n]*))?/gi;
|
|
57
|
+
let scenarioMatch;
|
|
58
|
+
while ((scenarioMatch = scenarioPattern.exec(phaseBlock)) !== null) {
|
|
59
|
+
const name = scenarioMatch[1].trim();
|
|
60
|
+
const gherkinBlock = scenarioMatch[2];
|
|
61
|
+
const verification = scenarioMatch[3]?.trim();
|
|
62
|
+
const given = [];
|
|
63
|
+
const when = [];
|
|
64
|
+
const then = [];
|
|
65
|
+
const and = [];
|
|
66
|
+
// Gherkin 라인 파싱
|
|
67
|
+
const lines = gherkinBlock.split('\n').map(l => l.trim()).filter(Boolean);
|
|
68
|
+
let currentSection = null;
|
|
69
|
+
for (const line of lines) {
|
|
70
|
+
if (line.startsWith('Scenario:'))
|
|
71
|
+
continue;
|
|
72
|
+
if (line.startsWith('Given ')) {
|
|
73
|
+
currentSection = 'given';
|
|
74
|
+
given.push(line.replace(/^Given /, ''));
|
|
75
|
+
}
|
|
76
|
+
else if (line.startsWith('When ')) {
|
|
77
|
+
currentSection = 'when';
|
|
78
|
+
when.push(line.replace(/^When /, ''));
|
|
79
|
+
}
|
|
80
|
+
else if (line.startsWith('Then ')) {
|
|
81
|
+
currentSection = 'then';
|
|
82
|
+
then.push(line.replace(/^Then /, ''));
|
|
83
|
+
}
|
|
84
|
+
else if (line.startsWith('And ')) {
|
|
85
|
+
const text = line.replace(/^And /, '');
|
|
86
|
+
and.push(text);
|
|
87
|
+
// And는 직전 섹션에 추가
|
|
88
|
+
if (currentSection === 'given')
|
|
89
|
+
given.push(text);
|
|
90
|
+
else if (currentSection === 'when')
|
|
91
|
+
when.push(text);
|
|
92
|
+
else if (currentSection === 'then')
|
|
93
|
+
then.push(text);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
results.push({
|
|
97
|
+
name,
|
|
98
|
+
phase: phaseNum,
|
|
99
|
+
given,
|
|
100
|
+
when,
|
|
101
|
+
then,
|
|
102
|
+
and,
|
|
103
|
+
verification,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return results;
|
|
108
|
+
}
|
|
109
|
+
// ============================================
|
|
110
|
+
// Generation Functions
|
|
111
|
+
// ============================================
|
|
112
|
+
/**
|
|
113
|
+
* Playwright test skeleton 생성
|
|
114
|
+
*/
|
|
115
|
+
export function generatePlaywrightSkeleton(criteria, scenarios, featureName) {
|
|
116
|
+
const tests = [];
|
|
117
|
+
for (const phase of criteria) {
|
|
118
|
+
const phaseScenarios = scenarios.filter(s => s.phase === phase.phase);
|
|
119
|
+
const slugName = slugify(phase.phaseName || `phase-${phase.phase}`);
|
|
120
|
+
const fileName = `phase-${phase.phase}-${slugName}.spec.ts`;
|
|
121
|
+
let content = `import { test, expect } from '@playwright/test';\n\n`;
|
|
122
|
+
content += `test.describe('Phase ${phase.phase}: ${phase.phaseName}', () => {\n`;
|
|
123
|
+
let scenarioCount = 0;
|
|
124
|
+
// Gherkin 시나리오 → test blocks
|
|
125
|
+
for (const scenario of phaseScenarios) {
|
|
126
|
+
content += `\n test('${escapeQuotes(scenario.name)}', async ({ page }) => {\n`;
|
|
127
|
+
if (scenario.given.length > 0) {
|
|
128
|
+
content += ` // Given\n`;
|
|
129
|
+
for (const g of scenario.given) {
|
|
130
|
+
content += ` // - ${g}\n`;
|
|
131
|
+
}
|
|
132
|
+
content += ` // TODO: Setup test preconditions\n\n`;
|
|
133
|
+
}
|
|
134
|
+
if (scenario.when.length > 0) {
|
|
135
|
+
content += ` // When\n`;
|
|
136
|
+
for (const w of scenario.when) {
|
|
137
|
+
content += ` // - ${w}\n`;
|
|
138
|
+
}
|
|
139
|
+
content += ` // TODO: Execute action\n\n`;
|
|
140
|
+
}
|
|
141
|
+
if (scenario.then.length > 0) {
|
|
142
|
+
content += ` // Then\n`;
|
|
143
|
+
for (const t of scenario.then) {
|
|
144
|
+
content += ` // - ${t}\n`;
|
|
145
|
+
}
|
|
146
|
+
content += ` // TODO: Assert expected outcome\n`;
|
|
147
|
+
}
|
|
148
|
+
if (scenario.verification) {
|
|
149
|
+
content += `\n // Verification: ${scenario.verification}\n`;
|
|
150
|
+
}
|
|
151
|
+
content += ` });\n`;
|
|
152
|
+
scenarioCount++;
|
|
153
|
+
}
|
|
154
|
+
// 매칭되지 않은 AC → 추가 test blocks
|
|
155
|
+
const coveredByScenario = new Set(phaseScenarios.flatMap(s => {
|
|
156
|
+
// verification 필드에서 AC 번호 추출
|
|
157
|
+
const match = s.verification?.match(/#(\d+)/);
|
|
158
|
+
return match ? [parseInt(match[1]) - 1] : [];
|
|
159
|
+
}));
|
|
160
|
+
for (let i = 0; i < phase.criteria.length; i++) {
|
|
161
|
+
if (!coveredByScenario.has(i) && phaseScenarios.length > 0) {
|
|
162
|
+
// 시나리오가 이미 있고 이 AC가 커버되지 않은 경우에만 추가
|
|
163
|
+
content += `\n test('AC: ${escapeQuotes(phase.criteria[i])}', async ({ page }) => {\n`;
|
|
164
|
+
content += ` // TODO: Implement test for acceptance criterion\n`;
|
|
165
|
+
content += ` // AC: Phase ${phase.phase} - ${phase.criteria[i]}\n`;
|
|
166
|
+
content += ` });\n`;
|
|
167
|
+
scenarioCount++;
|
|
168
|
+
}
|
|
169
|
+
else if (phaseScenarios.length === 0) {
|
|
170
|
+
// Feature 시나리오가 없으면 AC에서만 생성
|
|
171
|
+
content += `\n test('${escapeQuotes(phase.criteria[i])}', async ({ page }) => {\n`;
|
|
172
|
+
content += ` // TODO: Implement test for acceptance criterion\n`;
|
|
173
|
+
content += ` // AC: Phase ${phase.phase} - ${phase.criteria[i]}\n`;
|
|
174
|
+
content += ` });\n`;
|
|
175
|
+
scenarioCount++;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
content += `});\n`;
|
|
179
|
+
tests.push({
|
|
180
|
+
fileName,
|
|
181
|
+
content,
|
|
182
|
+
scenarioCount,
|
|
183
|
+
phase: `Phase ${phase.phase}: ${phase.phaseName}`,
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
return tests;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* 메인 함수: SPEC + Feature → E2E test skeletons
|
|
190
|
+
*/
|
|
191
|
+
export function generateE2ETests(featureName, options = {}) {
|
|
192
|
+
const { projectPath = process.cwd(), specPath = `.claude/vibe/specs/${featureName}.md`, featurePath = `.claude/vibe/features/${featureName}.feature`, outputDir = `tests/e2e/${featureName}`, } = options;
|
|
193
|
+
// SPEC 파일 읽기
|
|
194
|
+
const specFullPath = path.join(projectPath, specPath);
|
|
195
|
+
const specContent = readFileSafe(specFullPath);
|
|
196
|
+
// Feature 파일 읽기 (split 구조도 지원)
|
|
197
|
+
let featureFullPath = path.join(projectPath, featurePath);
|
|
198
|
+
let featureContent = readFileSafe(featureFullPath);
|
|
199
|
+
// split 구조: {feature-name}/_index.feature
|
|
200
|
+
if (!featureContent) {
|
|
201
|
+
const splitPath = path.join(projectPath, `.claude/vibe/features/${featureName}/_index.feature`);
|
|
202
|
+
featureContent = readFileSafe(splitPath);
|
|
203
|
+
if (featureContent)
|
|
204
|
+
featureFullPath = splitPath;
|
|
205
|
+
}
|
|
206
|
+
// 파싱
|
|
207
|
+
const criteria = specContent ? parseAcceptanceCriteria(specContent) : [];
|
|
208
|
+
const scenarios = featureContent ? parseGherkinScenarios(featureContent) : [];
|
|
209
|
+
// 생성
|
|
210
|
+
const tests = generatePlaywrightSkeleton(criteria, scenarios, featureName);
|
|
211
|
+
const totalScenarios = tests.reduce((sum, t) => sum + t.scenarioCount, 0);
|
|
212
|
+
return {
|
|
213
|
+
featureName,
|
|
214
|
+
tests,
|
|
215
|
+
totalScenarios,
|
|
216
|
+
outputDir,
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* 생성 결과 요약을 포맷팅
|
|
221
|
+
*/
|
|
222
|
+
export function formatGenerationSummary(result) {
|
|
223
|
+
if (result.tests.length === 0) {
|
|
224
|
+
return 'No acceptance criteria or feature scenarios found to generate tests.';
|
|
225
|
+
}
|
|
226
|
+
let output = `Generated E2E test skeletons:\n`;
|
|
227
|
+
for (const test of result.tests) {
|
|
228
|
+
output += ` ${result.outputDir}/${test.fileName} (${test.scenarioCount} scenarios)\n`;
|
|
229
|
+
}
|
|
230
|
+
output += ` Total: ${result.totalScenarios} test skeletons across ${result.tests.length} files\n`;
|
|
231
|
+
return output;
|
|
232
|
+
}
|
|
233
|
+
// ============================================
|
|
234
|
+
// Helper Functions
|
|
235
|
+
// ============================================
|
|
236
|
+
function readFileSafe(filePath) {
|
|
237
|
+
try {
|
|
238
|
+
return fs.readFileSync(filePath, 'utf-8');
|
|
239
|
+
}
|
|
240
|
+
catch {
|
|
241
|
+
return null;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
function slugify(text) {
|
|
245
|
+
return text
|
|
246
|
+
.toLowerCase()
|
|
247
|
+
.replace(/[^a-z0-9\s-]/g, '')
|
|
248
|
+
.replace(/\s+/g, '-')
|
|
249
|
+
.replace(/-+/g, '-')
|
|
250
|
+
.replace(/^-|-$/g, '')
|
|
251
|
+
.slice(0, 40);
|
|
252
|
+
}
|
|
253
|
+
function escapeQuotes(text) {
|
|
254
|
+
return text.replace(/'/g, "\\'");
|
|
255
|
+
}
|
|
256
|
+
//# sourceMappingURL=e2eTestGenerator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e2eTestGenerator.js","sourceRoot":"","sources":["../../../src/tools/spec/e2eTestGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAgD7B,+CAA+C;AAC/C,oBAAoB;AACpB,+CAA+C;AAE/C;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,WAAmB;IACzD,MAAM,OAAO,GAA0B,EAAE,CAAC;IAE1C,qBAAqB;IACrB,MAAM,eAAe,GAAG,WAAW,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;IAClF,IAAI,CAAC,eAAe;QAAE,OAAO,OAAO,CAAC;IAErC,MAAM,KAAK,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAEjC,aAAa;IACb,MAAM,YAAY,GAAG,qEAAqE,CAAC;IAC3F,IAAI,KAAK,CAAC;IAEV,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACnD,MAAM,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,OAAO,IAAI;SACR,WAAW,EAAE;SACb,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;SACrB,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -9,6 +9,8 @@ export { generateSpec } from './specGenerator.js';
|
|
|
9
9
|
export type { SpecGeneratorOptions, GeneratedSpec } from './specGenerator.js';
|
|
10
10
|
export { generateTraceabilityMatrix, formatMatrixAsMarkdown, formatMatrixAsHtml } from './traceabilityMatrix.js';
|
|
11
11
|
export type { TraceItem, TraceabilityMatrix, TraceSummary, TraceMatrixOptions } from './traceabilityMatrix.js';
|
|
12
|
+
export { generateE2ETests, parseAcceptanceCriteria, parseGherkinScenarios, formatGenerationSummary } from './e2eTestGenerator.js';
|
|
13
|
+
export type { AcceptanceCriterion, GherkinScenario, GeneratedE2ETest, E2EGeneratorOptions, E2EGenerationResult } from './e2eTestGenerator.js';
|
|
12
14
|
export { bumpSpecVersion, extractVersion, incrementVersion, generateChangelog, createGitTag, detectSpecChanges, getLatestSpecCommit, loadVersionHistory, saveVersionHistory, createBaseline } from './specVersioning.js';
|
|
13
15
|
export type { SpecVersion, ChangeEntry, VersionHistory, BumpType } from './specVersioning.js';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/spec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,QAAQ,EACR,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,oBAAoB,EACpB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACT,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/spec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,QAAQ,EACR,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,WAAW,EACX,SAAS,EACT,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,oBAAoB,EACpB,aAAa,EACd,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,SAAS,EACT,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,WAAW,EACX,WAAW,EACX,cAAc,EACd,QAAQ,EACT,MAAM,qBAAqB,CAAC"}
|
package/dist/tools/spec/index.js
CHANGED
|
@@ -10,6 +10,8 @@ export { parsePRD, parsePRDFile } from './prdParser.js';
|
|
|
10
10
|
export { generateSpec } from './specGenerator.js';
|
|
11
11
|
// Traceability Matrix
|
|
12
12
|
export { generateTraceabilityMatrix, formatMatrixAsMarkdown, formatMatrixAsHtml } from './traceabilityMatrix.js';
|
|
13
|
+
// E2E Test Generator
|
|
14
|
+
export { generateE2ETests, parseAcceptanceCriteria, parseGherkinScenarios, formatGenerationSummary } from './e2eTestGenerator.js';
|
|
13
15
|
// SPEC Versioning
|
|
14
16
|
export { bumpSpecVersion, extractVersion, incrementVersion, generateChangelog, createGitTag, detectSpecChanges, getLatestSpecCommit, loadVersionHistory, saveVersionHistory, createBaseline } from './specVersioning.js';
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/spec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iBAAiB;AACjB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAE5B,aAAa;AACb,OAAO,EACL,QAAQ,EACR,YAAY,EACb,MAAM,gBAAgB,CAAC;AAOxB,iBAAiB;AACjB,OAAO,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAM5B,sBAAsB;AACtB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAQjC,kBAAkB;AAClB,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/spec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,iBAAiB;AACjB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,aAAa,EACb,aAAa,EACb,gBAAgB,EACjB,MAAM,oBAAoB,CAAC;AAE5B,aAAa;AACb,OAAO,EACL,QAAQ,EACR,YAAY,EACb,MAAM,gBAAgB,CAAC;AAOxB,iBAAiB;AACjB,OAAO,EACL,YAAY,EACb,MAAM,oBAAoB,CAAC;AAM5B,sBAAsB;AACtB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AAQjC,qBAAqB;AACrB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAS/B,kBAAkB;AAClB,OAAO,EACL,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC"}
|