@su-record/vibe 2.6.25 → 2.6.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/CLAUDE.md +49 -0
  2. package/README.md +31 -0
  3. package/agents/docs/api-documenter.md +99 -0
  4. package/agents/docs/changelog-writer.md +93 -0
  5. package/agents/planning/requirements-analyst.md +84 -0
  6. package/agents/planning/ux-advisor.md +83 -0
  7. package/agents/qa/acceptance-tester.md +86 -0
  8. package/agents/qa/edge-case-finder.md +93 -0
  9. package/dist/lib/MemoryManager.d.ts +30 -0
  10. package/dist/lib/MemoryManager.d.ts.map +1 -1
  11. package/dist/lib/MemoryManager.js +74 -0
  12. package/dist/lib/MemoryManager.js.map +1 -1
  13. package/dist/lib/memory/ObservationStore.d.ts.map +1 -1
  14. package/dist/lib/memory/ObservationStore.js +0 -1
  15. package/dist/lib/memory/ObservationStore.js.map +1 -1
  16. package/dist/lib/memory/SessionRAGRetriever.d.ts +66 -0
  17. package/dist/lib/memory/SessionRAGRetriever.d.ts.map +1 -0
  18. package/dist/lib/memory/SessionRAGRetriever.js +196 -0
  19. package/dist/lib/memory/SessionRAGRetriever.js.map +1 -0
  20. package/dist/lib/memory/SessionRAGRetriever.test.d.ts +2 -0
  21. package/dist/lib/memory/SessionRAGRetriever.test.d.ts.map +1 -0
  22. package/dist/lib/memory/SessionRAGRetriever.test.js +180 -0
  23. package/dist/lib/memory/SessionRAGRetriever.test.js.map +1 -0
  24. package/dist/lib/memory/SessionRAGStore.d.ts +153 -0
  25. package/dist/lib/memory/SessionRAGStore.d.ts.map +1 -0
  26. package/dist/lib/memory/SessionRAGStore.js +673 -0
  27. package/dist/lib/memory/SessionRAGStore.js.map +1 -0
  28. package/dist/lib/memory/SessionRAGStore.test.d.ts +2 -0
  29. package/dist/lib/memory/SessionRAGStore.test.d.ts.map +1 -0
  30. package/dist/lib/memory/SessionRAGStore.test.js +326 -0
  31. package/dist/lib/memory/SessionRAGStore.test.js.map +1 -0
  32. package/dist/tools/index.d.ts +5 -0
  33. package/dist/tools/index.d.ts.map +1 -1
  34. package/dist/tools/index.js +4 -0
  35. package/dist/tools/index.js.map +1 -1
  36. package/dist/tools/memory/index.d.ts +3 -0
  37. package/dist/tools/memory/index.d.ts.map +1 -1
  38. package/dist/tools/memory/index.js +4 -0
  39. package/dist/tools/memory/index.js.map +1 -1
  40. package/dist/tools/memory/manageGoals.d.ts +11 -0
  41. package/dist/tools/memory/manageGoals.d.ts.map +1 -0
  42. package/dist/tools/memory/manageGoals.js +152 -0
  43. package/dist/tools/memory/manageGoals.js.map +1 -0
  44. package/dist/tools/memory/retrieveSessionContext.d.ts +9 -0
  45. package/dist/tools/memory/retrieveSessionContext.d.ts.map +1 -0
  46. package/dist/tools/memory/retrieveSessionContext.js +140 -0
  47. package/dist/tools/memory/retrieveSessionContext.js.map +1 -0
  48. package/dist/tools/memory/saveSessionItem.d.ts +26 -0
  49. package/dist/tools/memory/saveSessionItem.d.ts.map +1 -0
  50. package/dist/tools/memory/saveSessionItem.js +218 -0
  51. package/dist/tools/memory/saveSessionItem.js.map +1 -0
  52. package/dist/tools/memory/startSession.d.ts.map +1 -1
  53. package/dist/tools/memory/startSession.js +29 -0
  54. package/dist/tools/memory/startSession.js.map +1 -1
  55. package/dist/tools/spec/e2eTestGenerator.d.ts +62 -0
  56. package/dist/tools/spec/e2eTestGenerator.d.ts.map +1 -0
  57. package/dist/tools/spec/e2eTestGenerator.js +256 -0
  58. package/dist/tools/spec/e2eTestGenerator.js.map +1 -0
  59. package/dist/tools/spec/index.d.ts +2 -0
  60. package/dist/tools/spec/index.d.ts.map +1 -1
  61. package/dist/tools/spec/index.js +2 -0
  62. package/dist/tools/spec/index.js.map +1 -1
  63. package/package.json +1 -1
package/CLAUDE.md CHANGED
@@ -110,16 +110,65 @@ SPEC documents use: `<role>` `<context>` `<task>` `<constraints>` `<output_forma
110
110
 
111
111
  ## Built-in Tools
112
112
 
113
+ ### Semantic & Quality
114
+
113
115
  | Tool | Purpose |
114
116
  |-------------------------------|----------------------------------|
115
117
  | `vibe_find_symbol` | Find symbol definitions |
116
118
  | `vibe_find_references` | Find references |
117
119
  | `vibe_analyze_complexity` | Analyze complexity |
118
120
  | `vibe_validate_code_quality` | Validate quality |
121
+
122
+ ### Memory & Session
123
+
124
+ | Tool | Purpose |
125
+ |-------------------------------|----------------------------------|
119
126
  | `vibe_start_session` | Restore previous session context |
120
127
  | `vibe_auto_save_context` | Save current state |
121
128
  | `vibe_save_memory` | Save important decisions |
122
129
 
130
+ ### Session RAG (v2.6.27)
131
+
132
+ 구조화된 세션 컨텍스트를 저장/검색하는 시스템. SQLite + FTS5 BM25 하이브리드 검색.
133
+
134
+ | Tool | Purpose |
135
+ |-------------------------------|----------------------------------|
136
+ | `save_session_item` | Decision/Constraint/Goal/Evidence 저장 |
137
+ | `retrieve_session_context` | 하이브리드 검색 (BM25 + recency + priority) |
138
+ | `manage_goals` | Goal 생명주기 관리 (list/update/complete) |
139
+
140
+ **4가지 엔티티:**
141
+
142
+ | Entity | Description | Key Fields |
143
+ |--------|-------------|------------|
144
+ | Decision | 사용자 확인 결정사항 | title, rationale, alternatives, impact, priority |
145
+ | Constraint | 명시적 제약조건 | title, type (technical/business/resource/quality), severity |
146
+ | Goal | 현재 목표 스택 (계층 지원) | title, status, priority, progressPercent, successCriteria |
147
+ | Evidence | 검증/테스트 결과 | title, type (test/build/lint/coverage), status, metrics |
148
+
149
+ **자동 주입:** `start_session` 호출 시 활성 Goals, 중요 Constraints, 최근 Decisions가 자동으로 세션 컨텍스트에 포함됨.
150
+
151
+ ```typescript
152
+ import { saveSessionItem, retrieveSessionContext, manageGoals } from '@su-record/vibe/tools';
153
+
154
+ // 결정 저장
155
+ await saveSessionItem({ itemType: 'decision', title: 'Use Vitest', rationale: 'Fast and modern' });
156
+
157
+ // 제약 저장
158
+ await saveSessionItem({ itemType: 'constraint', title: 'No vector DB', type: 'technical', severity: 'high' });
159
+
160
+ // 목표 저장
161
+ await saveSessionItem({ itemType: 'goal', title: 'Implement Session RAG', priority: 2 });
162
+
163
+ // 컨텍스트 검색
164
+ await retrieveSessionContext({ query: 'testing' });
165
+
166
+ // 목표 관리
167
+ await manageGoals({ action: 'list' });
168
+ await manageGoals({ action: 'update', goalId: 1, progressPercent: 80 });
169
+ await manageGoals({ action: 'complete', goalId: 1 });
170
+ ```
171
+
123
172
  ## Agents
124
173
 
125
174
  - **Review (12)**: security, performance, architecture, complexity, simplicity, data-integrity, test-coverage, git-history, python, typescript, rails, react reviewers → `.claude/agents/review/`
package/README.md CHANGED
@@ -152,6 +152,37 @@ Prompt → Complexity Analysis → Split Decision
152
152
 
153
153
  Tasks are scored by complexity. When the score exceeds the threshold (default: 15), the task is automatically split into subtasks and processed in parallel.
154
154
 
155
+ ## Session RAG
156
+
157
+ Structured session context storage with hybrid BM25 search. Keeps decisions, constraints, goals, and evidence across sessions.
158
+
159
+ | Entity | Description | Auto-injected |
160
+ |--------|-------------|---------------|
161
+ | **Decision** | User-confirmed choices with rationale | Recent active decisions |
162
+ | **Constraint** | Technical/business limitations | High/critical severity |
163
+ | **Goal** | Objective stack with progress tracking | Active goals |
164
+ | **Evidence** | Test/build/lint verification results | - |
165
+
166
+ **Tools:**
167
+
168
+ | Tool | Purpose |
169
+ |------|---------|
170
+ | `save_session_item` | Save decision/constraint/goal/evidence |
171
+ | `retrieve_session_context` | Hybrid search (BM25 + recency + priority) |
172
+ | `manage_goals` | Goal lifecycle (list/update/complete) |
173
+
174
+ Active goals and key constraints are automatically injected at session start via `start_session`.
175
+
176
+ ```typescript
177
+ import { saveSessionItem, retrieveSessionContext, manageGoals } from '@su-record/vibe/tools';
178
+
179
+ await saveSessionItem({ itemType: 'decision', title: 'Use Vitest', rationale: 'Fast and modern' });
180
+ await saveSessionItem({ itemType: 'constraint', title: 'No vector DB', type: 'technical', severity: 'high' });
181
+ await saveSessionItem({ itemType: 'goal', title: 'Implement login', priority: 2 });
182
+ await retrieveSessionContext({ query: 'testing strategy' });
183
+ await manageGoals({ action: 'complete', goalId: 1 });
184
+ ```
185
+
155
186
  ## Requirements Traceability
156
187
 
157
188
  Track from requirements to tests with `/vibe.trace`:
@@ -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
+ ```
@@ -2,13 +2,19 @@ import { MemoryRelation, MemoryGraph } from '../types/tool.js';
2
2
  import { MemoryItem } from './memory/MemoryStorage.js';
3
3
  import { SearchStrategy, SearchOptions } from './memory/MemorySearch.js';
4
4
  import { Observation, ObservationInput, ObservationType } from './memory/ObservationStore.js';
5
+ import { Decision, DecisionInput, Constraint, ConstraintInput, Goal, GoalInput, Evidence, EvidenceInput, SessionRAGStats, DecisionStatus, ConstraintType, ConstraintSeverity, GoalStatus, EvidenceType, EvidenceStatus } from './memory/SessionRAGStore.js';
6
+ import { RetrievalOptions, SessionRAGResult } from './memory/SessionRAGRetriever.js';
5
7
  export { MemoryItem } from './memory/MemoryStorage.js';
6
8
  export { Observation, ObservationInput, ObservationType } from './memory/ObservationStore.js';
9
+ export { Decision, DecisionInput, Constraint, ConstraintInput, Goal, GoalInput, Evidence, EvidenceInput, SessionRAGStats, DecisionStatus, ConstraintType, ConstraintSeverity, GoalStatus, EvidenceType, EvidenceStatus } from './memory/SessionRAGStore.js';
10
+ export { RetrievalOptions, SessionRAGResult } from './memory/SessionRAGRetriever.js';
7
11
  export declare class MemoryManager {
8
12
  private storage;
9
13
  private graph;
10
14
  private memorySearch;
11
15
  private observations;
16
+ private sessionRAG;
17
+ private ragRetriever;
12
18
  private static instances;
13
19
  private static instance;
14
20
  private static cleanupRegistered;
@@ -50,6 +56,30 @@ export declare class MemoryManager {
50
56
  total: number;
51
57
  byType: Record<string, number>;
52
58
  };
59
+ addDecision(input: DecisionInput): number;
60
+ getDecision(id: number): Decision | null;
61
+ updateDecision(id: number, updates: Partial<DecisionInput>): boolean;
62
+ listDecisions(sessionId?: string, status?: DecisionStatus, limit?: number): Decision[];
63
+ searchDecisions(query: string, limit?: number): Decision[];
64
+ addConstraint(input: ConstraintInput): number;
65
+ getConstraint(id: number): Constraint | null;
66
+ updateConstraint(id: number, updates: Partial<ConstraintInput>): boolean;
67
+ listConstraints(sessionId?: string, type?: ConstraintType, severity?: ConstraintSeverity, limit?: number): Constraint[];
68
+ addGoal(input: GoalInput): number;
69
+ getGoal(id: number): Goal | null;
70
+ updateGoal(id: number, updates: Partial<GoalInput>): boolean;
71
+ getActiveGoals(limit?: number): Goal[];
72
+ listGoals(sessionId?: string, status?: GoalStatus, limit?: number): Goal[];
73
+ addEvidence(input: EvidenceInput): number;
74
+ getEvidence(id: number): Evidence | null;
75
+ listEvidence(sessionId?: string, type?: EvidenceType, status?: EvidenceStatus, limit?: number): Evidence[];
76
+ retrieveSessionContext(options: RetrievalOptions): SessionRAGResult;
77
+ retrieveActiveContext(): {
78
+ goals: Goal[];
79
+ constraints: Constraint[];
80
+ decisions: Decision[];
81
+ };
82
+ getSessionRAGStats(): SessionRAGStats;
53
83
  close(): void;
54
84
  static resetInstance(projectPath?: string): void;
55
85
  }