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.
Files changed (137) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +50 -0
  3. package/agents/test-engineer.md +74 -0
  4. package/bridge/cli.cjs +9335 -117
  5. package/dist/cli/index.js +201 -0
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/testing/analyzers/complexity.d.ts +18 -0
  8. package/dist/testing/analyzers/complexity.d.ts.map +1 -0
  9. package/dist/testing/analyzers/complexity.js +121 -0
  10. package/dist/testing/analyzers/complexity.js.map +1 -0
  11. package/dist/testing/analyzers/coverage.d.ts +13 -0
  12. package/dist/testing/analyzers/coverage.d.ts.map +1 -0
  13. package/dist/testing/analyzers/coverage.js +99 -0
  14. package/dist/testing/analyzers/coverage.js.map +1 -0
  15. package/dist/testing/analyzers/quality-scorer.d.ts +8 -0
  16. package/dist/testing/analyzers/quality-scorer.d.ts.map +1 -0
  17. package/dist/testing/analyzers/quality-scorer.js +128 -0
  18. package/dist/testing/analyzers/quality-scorer.js.map +1 -0
  19. package/dist/testing/analyzers/types.d.ts +56 -0
  20. package/dist/testing/analyzers/types.d.ts.map +1 -0
  21. package/dist/testing/analyzers/types.js +2 -0
  22. package/dist/testing/analyzers/types.js.map +1 -0
  23. package/dist/testing/cli/agent-integration.d.ts +20 -0
  24. package/dist/testing/cli/agent-integration.d.ts.map +1 -0
  25. package/dist/testing/cli/agent-integration.js +60 -0
  26. package/dist/testing/cli/agent-integration.js.map +1 -0
  27. package/dist/testing/cli/commands.d.ts +100 -0
  28. package/dist/testing/cli/commands.d.ts.map +1 -0
  29. package/dist/testing/cli/commands.js +250 -0
  30. package/dist/testing/cli/commands.js.map +1 -0
  31. package/dist/testing/cli/ultraqa-integration.d.ts +13 -0
  32. package/dist/testing/cli/ultraqa-integration.d.ts.map +1 -0
  33. package/dist/testing/cli/ultraqa-integration.js +68 -0
  34. package/dist/testing/cli/ultraqa-integration.js.map +1 -0
  35. package/dist/testing/detectors/go.d.ts +3 -0
  36. package/dist/testing/detectors/go.d.ts.map +1 -0
  37. package/dist/testing/detectors/go.js +38 -0
  38. package/dist/testing/detectors/go.js.map +1 -0
  39. package/dist/testing/detectors/index.d.ts +8 -0
  40. package/dist/testing/detectors/index.d.ts.map +1 -0
  41. package/dist/testing/detectors/index.js +46 -0
  42. package/dist/testing/detectors/index.js.map +1 -0
  43. package/dist/testing/detectors/package-json.d.ts +3 -0
  44. package/dist/testing/detectors/package-json.d.ts.map +1 -0
  45. package/dist/testing/detectors/package-json.js +52 -0
  46. package/dist/testing/detectors/package-json.js.map +1 -0
  47. package/dist/testing/detectors/python.d.ts +3 -0
  48. package/dist/testing/detectors/python.d.ts.map +1 -0
  49. package/dist/testing/detectors/python.js +37 -0
  50. package/dist/testing/detectors/python.js.map +1 -0
  51. package/dist/testing/detectors/rust.d.ts +3 -0
  52. package/dist/testing/detectors/rust.d.ts.map +1 -0
  53. package/dist/testing/detectors/rust.js +39 -0
  54. package/dist/testing/detectors/rust.js.map +1 -0
  55. package/dist/testing/generators/contract.d.ts +14 -0
  56. package/dist/testing/generators/contract.d.ts.map +1 -0
  57. package/dist/testing/generators/contract.js +163 -0
  58. package/dist/testing/generators/contract.js.map +1 -0
  59. package/dist/testing/generators/e2e.d.ts +34 -0
  60. package/dist/testing/generators/e2e.d.ts.map +1 -0
  61. package/dist/testing/generators/e2e.js +74 -0
  62. package/dist/testing/generators/e2e.js.map +1 -0
  63. package/dist/testing/generators/go.d.ts +12 -0
  64. package/dist/testing/generators/go.d.ts.map +1 -0
  65. package/dist/testing/generators/go.js +144 -0
  66. package/dist/testing/generators/go.js.map +1 -0
  67. package/dist/testing/generators/nodejs.d.ts +12 -0
  68. package/dist/testing/generators/nodejs.d.ts.map +1 -0
  69. package/dist/testing/generators/nodejs.js +37 -0
  70. package/dist/testing/generators/nodejs.js.map +1 -0
  71. package/dist/testing/generators/python.d.ts +12 -0
  72. package/dist/testing/generators/python.d.ts.map +1 -0
  73. package/dist/testing/generators/python.js +163 -0
  74. package/dist/testing/generators/python.js.map +1 -0
  75. package/dist/testing/generators/react.d.ts +12 -0
  76. package/dist/testing/generators/react.d.ts.map +1 -0
  77. package/dist/testing/generators/react.js +31 -0
  78. package/dist/testing/generators/react.js.map +1 -0
  79. package/dist/testing/generators/rust.d.ts +11 -0
  80. package/dist/testing/generators/rust.d.ts.map +1 -0
  81. package/dist/testing/generators/rust.js +138 -0
  82. package/dist/testing/generators/rust.js.map +1 -0
  83. package/dist/testing/index.d.ts +6 -0
  84. package/dist/testing/index.d.ts.map +1 -0
  85. package/dist/testing/index.js +11 -0
  86. package/dist/testing/index.js.map +1 -0
  87. package/dist/testing/integrations/autopilot.d.ts +42 -0
  88. package/dist/testing/integrations/autopilot.d.ts.map +1 -0
  89. package/dist/testing/integrations/autopilot.js +55 -0
  90. package/dist/testing/integrations/autopilot.js.map +1 -0
  91. package/dist/testing/integrations/cicd.d.ts +26 -0
  92. package/dist/testing/integrations/cicd.d.ts.map +1 -0
  93. package/dist/testing/integrations/cicd.js +162 -0
  94. package/dist/testing/integrations/cicd.js.map +1 -0
  95. package/dist/testing/integrations/giskard/behavioral-tests.d.ts +4 -0
  96. package/dist/testing/integrations/giskard/behavioral-tests.d.ts.map +1 -0
  97. package/dist/testing/integrations/giskard/behavioral-tests.js +66 -0
  98. package/dist/testing/integrations/giskard/behavioral-tests.js.map +1 -0
  99. package/dist/testing/integrations/giskard/types.d.ts +35 -0
  100. package/dist/testing/integrations/giskard/types.d.ts.map +1 -0
  101. package/dist/testing/integrations/giskard/types.js +2 -0
  102. package/dist/testing/integrations/giskard/types.js.map +1 -0
  103. package/dist/testing/integrations/promptfoo/config-generator.d.ts +5 -0
  104. package/dist/testing/integrations/promptfoo/config-generator.d.ts.map +1 -0
  105. package/dist/testing/integrations/promptfoo/config-generator.js +44 -0
  106. package/dist/testing/integrations/promptfoo/config-generator.js.map +1 -0
  107. package/dist/testing/integrations/promptfoo/types.d.ts +36 -0
  108. package/dist/testing/integrations/promptfoo/types.d.ts.map +1 -0
  109. package/dist/testing/integrations/promptfoo/types.js +2 -0
  110. package/dist/testing/integrations/promptfoo/types.js.map +1 -0
  111. package/dist/testing/integrations/ralph.d.ts +65 -0
  112. package/dist/testing/integrations/ralph.d.ts.map +1 -0
  113. package/dist/testing/integrations/ralph.js +69 -0
  114. package/dist/testing/integrations/ralph.js.map +1 -0
  115. package/dist/testing/performance/cache-manager.d.ts +16 -0
  116. package/dist/testing/performance/cache-manager.d.ts.map +1 -0
  117. package/dist/testing/performance/cache-manager.js +39 -0
  118. package/dist/testing/performance/cache-manager.js.map +1 -0
  119. package/dist/testing/performance/parallel-generator.d.ts +23 -0
  120. package/dist/testing/performance/parallel-generator.d.ts.map +1 -0
  121. package/dist/testing/performance/parallel-generator.js +31 -0
  122. package/dist/testing/performance/parallel-generator.js.map +1 -0
  123. package/dist/testing/types.d.ts +23 -0
  124. package/dist/testing/types.d.ts.map +1 -0
  125. package/dist/testing/types.js +2 -0
  126. package/dist/testing/types.js.map +1 -0
  127. package/docs/2026-03-06-llm-testing-system-phase1.md +0 -0
  128. package/docs/plans/2026-03-06-llm-testing-system-design.md +311 -0
  129. package/docs/plans/2026-03-06-llm-testing-system-phase1.md +1268 -0
  130. package/docs/plans/2026-03-06-llm-testing-system-phase2.md +3053 -0
  131. package/docs/plans/2026-03-06-llm-testing-system-phase3.md +1830 -0
  132. package/docs/testing/PHASE2.md +266 -0
  133. package/docs/testing/PHASE3.md +601 -0
  134. package/docs/testing/README.md +634 -0
  135. package/package.json +1 -1
  136. package/skills/test-gen/skill.md +531 -0
  137. 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%