claudecode-omc 4.7.4 → 4.8.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/.claude-plugin/plugin.json +1 -1
- package/README.md +50 -0
- package/agents/test-engineer.md +74 -0
- package/bridge/cli.cjs +9335 -117
- package/dist/cli/index.js +201 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/testing/analyzers/complexity.d.ts +18 -0
- package/dist/testing/analyzers/complexity.d.ts.map +1 -0
- package/dist/testing/analyzers/complexity.js +121 -0
- package/dist/testing/analyzers/complexity.js.map +1 -0
- package/dist/testing/analyzers/coverage.d.ts +13 -0
- package/dist/testing/analyzers/coverage.d.ts.map +1 -0
- package/dist/testing/analyzers/coverage.js +99 -0
- package/dist/testing/analyzers/coverage.js.map +1 -0
- package/dist/testing/analyzers/quality-scorer.d.ts +8 -0
- package/dist/testing/analyzers/quality-scorer.d.ts.map +1 -0
- package/dist/testing/analyzers/quality-scorer.js +128 -0
- package/dist/testing/analyzers/quality-scorer.js.map +1 -0
- package/dist/testing/analyzers/types.d.ts +56 -0
- package/dist/testing/analyzers/types.d.ts.map +1 -0
- package/dist/testing/analyzers/types.js +2 -0
- package/dist/testing/analyzers/types.js.map +1 -0
- package/dist/testing/cli/agent-integration.d.ts +20 -0
- package/dist/testing/cli/agent-integration.d.ts.map +1 -0
- package/dist/testing/cli/agent-integration.js +60 -0
- package/dist/testing/cli/agent-integration.js.map +1 -0
- package/dist/testing/cli/commands.d.ts +100 -0
- package/dist/testing/cli/commands.d.ts.map +1 -0
- package/dist/testing/cli/commands.js +250 -0
- package/dist/testing/cli/commands.js.map +1 -0
- package/dist/testing/cli/ultraqa-integration.d.ts +13 -0
- package/dist/testing/cli/ultraqa-integration.d.ts.map +1 -0
- package/dist/testing/cli/ultraqa-integration.js +68 -0
- package/dist/testing/cli/ultraqa-integration.js.map +1 -0
- package/dist/testing/detectors/go.d.ts +3 -0
- package/dist/testing/detectors/go.d.ts.map +1 -0
- package/dist/testing/detectors/go.js +38 -0
- package/dist/testing/detectors/go.js.map +1 -0
- package/dist/testing/detectors/index.d.ts +8 -0
- package/dist/testing/detectors/index.d.ts.map +1 -0
- package/dist/testing/detectors/index.js +46 -0
- package/dist/testing/detectors/index.js.map +1 -0
- package/dist/testing/detectors/package-json.d.ts +3 -0
- package/dist/testing/detectors/package-json.d.ts.map +1 -0
- package/dist/testing/detectors/package-json.js +52 -0
- package/dist/testing/detectors/package-json.js.map +1 -0
- package/dist/testing/detectors/python.d.ts +3 -0
- package/dist/testing/detectors/python.d.ts.map +1 -0
- package/dist/testing/detectors/python.js +37 -0
- package/dist/testing/detectors/python.js.map +1 -0
- package/dist/testing/detectors/rust.d.ts +3 -0
- package/dist/testing/detectors/rust.d.ts.map +1 -0
- package/dist/testing/detectors/rust.js +39 -0
- package/dist/testing/detectors/rust.js.map +1 -0
- package/dist/testing/generators/contract.d.ts +14 -0
- package/dist/testing/generators/contract.d.ts.map +1 -0
- package/dist/testing/generators/contract.js +163 -0
- package/dist/testing/generators/contract.js.map +1 -0
- package/dist/testing/generators/e2e.d.ts +34 -0
- package/dist/testing/generators/e2e.d.ts.map +1 -0
- package/dist/testing/generators/e2e.js +74 -0
- package/dist/testing/generators/e2e.js.map +1 -0
- package/dist/testing/generators/go.d.ts +12 -0
- package/dist/testing/generators/go.d.ts.map +1 -0
- package/dist/testing/generators/go.js +144 -0
- package/dist/testing/generators/go.js.map +1 -0
- package/dist/testing/generators/nodejs.d.ts +12 -0
- package/dist/testing/generators/nodejs.d.ts.map +1 -0
- package/dist/testing/generators/nodejs.js +37 -0
- package/dist/testing/generators/nodejs.js.map +1 -0
- package/dist/testing/generators/python.d.ts +12 -0
- package/dist/testing/generators/python.d.ts.map +1 -0
- package/dist/testing/generators/python.js +163 -0
- package/dist/testing/generators/python.js.map +1 -0
- package/dist/testing/generators/react.d.ts +12 -0
- package/dist/testing/generators/react.d.ts.map +1 -0
- package/dist/testing/generators/react.js +31 -0
- package/dist/testing/generators/react.js.map +1 -0
- package/dist/testing/generators/rust.d.ts +11 -0
- package/dist/testing/generators/rust.d.ts.map +1 -0
- package/dist/testing/generators/rust.js +138 -0
- package/dist/testing/generators/rust.js.map +1 -0
- package/dist/testing/index.d.ts +6 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +11 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/integrations/autopilot.d.ts +42 -0
- package/dist/testing/integrations/autopilot.d.ts.map +1 -0
- package/dist/testing/integrations/autopilot.js +55 -0
- package/dist/testing/integrations/autopilot.js.map +1 -0
- package/dist/testing/integrations/cicd.d.ts +26 -0
- package/dist/testing/integrations/cicd.d.ts.map +1 -0
- package/dist/testing/integrations/cicd.js +162 -0
- package/dist/testing/integrations/cicd.js.map +1 -0
- package/dist/testing/integrations/giskard/behavioral-tests.d.ts +4 -0
- package/dist/testing/integrations/giskard/behavioral-tests.d.ts.map +1 -0
- package/dist/testing/integrations/giskard/behavioral-tests.js +66 -0
- package/dist/testing/integrations/giskard/behavioral-tests.js.map +1 -0
- package/dist/testing/integrations/giskard/types.d.ts +35 -0
- package/dist/testing/integrations/giskard/types.d.ts.map +1 -0
- package/dist/testing/integrations/giskard/types.js +2 -0
- package/dist/testing/integrations/giskard/types.js.map +1 -0
- package/dist/testing/integrations/promptfoo/config-generator.d.ts +5 -0
- package/dist/testing/integrations/promptfoo/config-generator.d.ts.map +1 -0
- package/dist/testing/integrations/promptfoo/config-generator.js +44 -0
- package/dist/testing/integrations/promptfoo/config-generator.js.map +1 -0
- package/dist/testing/integrations/promptfoo/types.d.ts +36 -0
- package/dist/testing/integrations/promptfoo/types.d.ts.map +1 -0
- package/dist/testing/integrations/promptfoo/types.js +2 -0
- package/dist/testing/integrations/promptfoo/types.js.map +1 -0
- package/dist/testing/integrations/ralph.d.ts +65 -0
- package/dist/testing/integrations/ralph.d.ts.map +1 -0
- package/dist/testing/integrations/ralph.js +69 -0
- package/dist/testing/integrations/ralph.js.map +1 -0
- package/dist/testing/performance/cache-manager.d.ts +16 -0
- package/dist/testing/performance/cache-manager.d.ts.map +1 -0
- package/dist/testing/performance/cache-manager.js +39 -0
- package/dist/testing/performance/cache-manager.js.map +1 -0
- package/dist/testing/performance/parallel-generator.d.ts +23 -0
- package/dist/testing/performance/parallel-generator.d.ts.map +1 -0
- package/dist/testing/performance/parallel-generator.js +31 -0
- package/dist/testing/performance/parallel-generator.js.map +1 -0
- package/dist/testing/types.d.ts +23 -0
- package/dist/testing/types.d.ts.map +1 -0
- package/dist/testing/types.js +2 -0
- package/dist/testing/types.js.map +1 -0
- package/docs/2026-03-06-llm-testing-system-phase1.md +0 -0
- package/docs/plans/2026-03-06-llm-testing-system-design.md +311 -0
- package/docs/plans/2026-03-06-llm-testing-system-phase1.md +1268 -0
- package/docs/plans/2026-03-06-llm-testing-system-phase2.md +3053 -0
- package/docs/plans/2026-03-06-llm-testing-system-phase3.md +1830 -0
- package/docs/testing/PHASE2.md +266 -0
- package/docs/testing/PHASE3.md +601 -0
- package/docs/testing/README.md +634 -0
- package/package.json +1 -1
- package/skills/test-gen/skill.md +531 -0
- package/skills/ultraqa.md +58 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# LLM Testing System - Phase 2 Features
|
|
2
|
+
|
|
3
|
+
Phase 2 extends the testing system with advanced features including coverage analysis, multi-language support, complexity analysis, contract testing, and workflow integration.
|
|
4
|
+
|
|
5
|
+
## New Features
|
|
6
|
+
|
|
7
|
+
### 1. Coverage Analysis
|
|
8
|
+
|
|
9
|
+
Analyze test coverage and identify gaps:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
omc test analyze
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Features:
|
|
16
|
+
- Parse c8/nyc coverage reports
|
|
17
|
+
- Identify uncovered code ranges
|
|
18
|
+
- Analyze reasons for gaps (error handling, branches, etc.)
|
|
19
|
+
- Generate supplementary tests for gaps
|
|
20
|
+
|
|
21
|
+
### 2. Multi-Language Support
|
|
22
|
+
|
|
23
|
+
Generate tests for Python, Go, and Rust:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Python (pytest)
|
|
27
|
+
omc test gen src/utils/math.py
|
|
28
|
+
|
|
29
|
+
# Go (testing package)
|
|
30
|
+
omc test gen pkg/math/math.go
|
|
31
|
+
|
|
32
|
+
# Rust (cargo test)
|
|
33
|
+
omc test gen src/math.rs
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Supported frameworks:
|
|
37
|
+
- **Python**: pytest, unittest
|
|
38
|
+
- **Go**: testing package with table-driven tests
|
|
39
|
+
- **Rust**: cargo test with #[test] attributes
|
|
40
|
+
|
|
41
|
+
### 3. Complexity Analysis
|
|
42
|
+
|
|
43
|
+
Automatically classify code as simple or complex:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
const analysis = await analyzeComplexity({ code, filePath });
|
|
47
|
+
// Returns: { complexity: 'simple' | 'complex', metrics, reasons }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Metrics:
|
|
51
|
+
- Lines of code
|
|
52
|
+
- Cyclomatic complexity
|
|
53
|
+
- Nesting levels
|
|
54
|
+
- External dependencies
|
|
55
|
+
|
|
56
|
+
Complexity indicators:
|
|
57
|
+
- Payment/auth logic
|
|
58
|
+
- Database transactions
|
|
59
|
+
- External API calls
|
|
60
|
+
- Multiple async operations
|
|
61
|
+
|
|
62
|
+
### 4. Contract Testing
|
|
63
|
+
|
|
64
|
+
Generate API contract tests from OpenAPI specs:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
omc test contract api/openapi.yaml
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Supported frameworks:
|
|
71
|
+
- **Pact**: Consumer-driven contract testing
|
|
72
|
+
- **Supertest**: REST API contract tests
|
|
73
|
+
- **MSW**: Mock Service Worker handlers
|
|
74
|
+
|
|
75
|
+
### 5. Enhanced Test-Engineer Agent
|
|
76
|
+
|
|
77
|
+
The test-engineer agent now receives enriched context:
|
|
78
|
+
|
|
79
|
+
- Tech stack detection
|
|
80
|
+
- Complexity analysis
|
|
81
|
+
- Suggested approach (auto/guided/manual)
|
|
82
|
+
- Pre-generated questions for complex code
|
|
83
|
+
|
|
84
|
+
### 6. UltraQA Integration
|
|
85
|
+
|
|
86
|
+
UltraQA now includes automatic test generation:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
/ultraqa
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Workflow:
|
|
93
|
+
1. Identify files needing tests
|
|
94
|
+
2. Generate missing tests
|
|
95
|
+
3. Run tests and analyze coverage
|
|
96
|
+
4. Generate supplementary tests for gaps
|
|
97
|
+
5. Repeat until coverage threshold met
|
|
98
|
+
|
|
99
|
+
## Usage Examples
|
|
100
|
+
|
|
101
|
+
### Example 1: Python Test Generation
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
omc test gen src/calculator.py
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Output:
|
|
108
|
+
```
|
|
109
|
+
Detected: Python + pytest
|
|
110
|
+
Generated: tests/test_calculator.py
|
|
111
|
+
|
|
112
|
+
Tests include:
|
|
113
|
+
- test_add
|
|
114
|
+
- test_subtract
|
|
115
|
+
- test_multiply
|
|
116
|
+
- test_divide
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Example 2: Coverage Analysis
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
omc test analyze
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Output:
|
|
126
|
+
```
|
|
127
|
+
Coverage Analysis:
|
|
128
|
+
- Overall: 75%
|
|
129
|
+
- Lines: 75%
|
|
130
|
+
- Functions: 90%
|
|
131
|
+
- Branches: 70%
|
|
132
|
+
|
|
133
|
+
Coverage Gaps:
|
|
134
|
+
1. src/utils/validation.ts (lines 42-48)
|
|
135
|
+
Reason: Error handling not covered
|
|
136
|
+
|
|
137
|
+
2. src/services/payment.ts (lines 67-72)
|
|
138
|
+
Reason: Edge case for retries
|
|
139
|
+
|
|
140
|
+
Generate tests for gaps? (y/n)
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Example 3: Contract Testing
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
omc test contract api/openapi.yaml --framework=pact
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
Output:
|
|
150
|
+
```
|
|
151
|
+
Generated: tests/contract/frontend-backend.pact.test.ts
|
|
152
|
+
|
|
153
|
+
Contract tests:
|
|
154
|
+
- GET /users/{id}
|
|
155
|
+
- POST /users
|
|
156
|
+
- PUT /users/{id}
|
|
157
|
+
- DELETE /users/{id}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Example 4: Complex Code with Test-Engineer
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
/test-gen src/services/payment.ts
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Output:
|
|
167
|
+
```
|
|
168
|
+
Agent: Detecting tech stack...
|
|
169
|
+
Detected: Node.js + Express + PostgreSQL + Vitest
|
|
170
|
+
|
|
171
|
+
Agent: Analyzing complexity...
|
|
172
|
+
Complex code detected:
|
|
173
|
+
- Payment processing logic
|
|
174
|
+
- External Stripe API calls
|
|
175
|
+
- Database transactions
|
|
176
|
+
- Multiple async operations
|
|
177
|
+
|
|
178
|
+
Agent: Delegating to test-engineer for detailed test cases...
|
|
179
|
+
|
|
180
|
+
Test-Engineer: I'll need some information:
|
|
181
|
+
1. What are the expected payment flows? (success, failure, retry)
|
|
182
|
+
2. Should I mock Stripe API calls?
|
|
183
|
+
3. What database states should I test?
|
|
184
|
+
4. Are there specific edge cases to cover?
|
|
185
|
+
|
|
186
|
+
[User provides details]
|
|
187
|
+
|
|
188
|
+
Test-Engineer: Generating comprehensive test suite...
|
|
189
|
+
Generated 12 test cases covering:
|
|
190
|
+
- Happy path payment processing
|
|
191
|
+
- Stripe API failure scenarios
|
|
192
|
+
- Database transaction rollbacks
|
|
193
|
+
- Idempotency checks
|
|
194
|
+
- Concurrent payment handling
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Configuration
|
|
198
|
+
|
|
199
|
+
Add to `.omc/project-config.json`:
|
|
200
|
+
|
|
201
|
+
```json
|
|
202
|
+
{
|
|
203
|
+
"testing": {
|
|
204
|
+
"coverageThreshold": 80,
|
|
205
|
+
"complexityThresholds": {
|
|
206
|
+
"lines": 50,
|
|
207
|
+
"cyclomaticComplexity": 10,
|
|
208
|
+
"nestingLevel": 3
|
|
209
|
+
},
|
|
210
|
+
"autoGenerateTests": true,
|
|
211
|
+
"languages": ["nodejs", "python", "go", "rust"]
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Architecture
|
|
217
|
+
|
|
218
|
+
```
|
|
219
|
+
src/testing/
|
|
220
|
+
├── analyzers/
|
|
221
|
+
│ ├── coverage.ts # Coverage analysis
|
|
222
|
+
│ ├── complexity.ts # Complexity analysis
|
|
223
|
+
│ └── types.ts # Analyzer types
|
|
224
|
+
├── generators/
|
|
225
|
+
│ ├── react.ts # React component tests
|
|
226
|
+
│ ├── nodejs.ts # Node.js function tests
|
|
227
|
+
│ ├── python.ts # Python pytest tests
|
|
228
|
+
│ ├── go.ts # Go table-driven tests
|
|
229
|
+
│ ├── rust.ts # Rust cargo tests
|
|
230
|
+
│ └── contract.ts # API contract tests
|
|
231
|
+
├── detectors/
|
|
232
|
+
│ ├── index.ts # Multi-language detection
|
|
233
|
+
│ ├── package-json.ts # Node.js detection
|
|
234
|
+
│ ├── python.ts # Python detection
|
|
235
|
+
│ ├── go.ts # Go detection
|
|
236
|
+
│ └── rust.ts # Rust detection
|
|
237
|
+
└── cli/
|
|
238
|
+
├── commands.ts # CLI command implementations
|
|
239
|
+
├── agent-integration.ts # Test-engineer integration
|
|
240
|
+
└── ultraqa-integration.ts # UltraQA integration
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Next Steps (Phase 3)
|
|
244
|
+
|
|
245
|
+
- Giskard integration for behavior testing
|
|
246
|
+
- E2E test generation with Playwright
|
|
247
|
+
- CI/CD integration
|
|
248
|
+
- Ralph mode test loops
|
|
249
|
+
- Autopilot automatic testing
|
|
250
|
+
- Performance optimization
|
|
251
|
+
|
|
252
|
+
## Success Metrics
|
|
253
|
+
|
|
254
|
+
Phase 2 Achievements:
|
|
255
|
+
- Multi-language support (Python, Go, Rust)
|
|
256
|
+
- Coverage analysis and gap identification
|
|
257
|
+
- Complexity analysis for smart test generation
|
|
258
|
+
- Contract testing for APIs
|
|
259
|
+
- Enhanced test-engineer agent
|
|
260
|
+
- UltraQA integration
|
|
261
|
+
|
|
262
|
+
Target Metrics:
|
|
263
|
+
- Test coverage: 80%+
|
|
264
|
+
- Test generation time: < 30 seconds/file
|
|
265
|
+
- Multi-language support: 4 languages
|
|
266
|
+
- Complexity classification accuracy: > 90%
|