agentic-qe 1.8.1 → 1.8.3
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/agents/qe-test-generator.md +580 -0
- package/.claude/agents/subagents/qe-code-reviewer.md +86 -0
- package/.claude/agents/subagents/qe-coverage-gap-analyzer.md +485 -0
- package/.claude/agents/subagents/qe-data-generator.md +86 -0
- package/.claude/agents/subagents/qe-flaky-investigator.md +416 -0
- package/.claude/agents/subagents/qe-integration-tester.md +87 -0
- package/.claude/agents/subagents/qe-performance-validator.md +98 -0
- package/.claude/agents/subagents/qe-security-auditor.md +86 -0
- package/.claude/agents/subagents/qe-test-data-architect-sub.md +553 -0
- package/.claude/agents/subagents/qe-test-implementer.md +229 -15
- package/.claude/agents/subagents/qe-test-refactorer.md +265 -15
- package/.claude/agents/subagents/qe-test-writer.md +180 -20
- package/CHANGELOG.md +182 -0
- package/README.md +52 -35
- package/dist/core/hooks/validators/TDDPhaseValidator.d.ts +110 -0
- package/dist/core/hooks/validators/TDDPhaseValidator.d.ts.map +1 -0
- package/dist/core/hooks/validators/TDDPhaseValidator.js +287 -0
- package/dist/core/hooks/validators/TDDPhaseValidator.js.map +1 -0
- package/dist/core/hooks/validators/index.d.ts +3 -1
- package/dist/core/hooks/validators/index.d.ts.map +1 -1
- package/dist/core/hooks/validators/index.js +4 -2
- package/dist/core/hooks/validators/index.js.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.d.ts +77 -2
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -1
- package/dist/core/memory/RealAgentDBAdapter.js +259 -3
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TDD Phase Validator - Runtime enforcement for TDD subagent coordination
|
|
4
|
+
*
|
|
5
|
+
* Validates that each phase of the TDD cycle produces correct output
|
|
6
|
+
* in the memory store before allowing transition to next phase.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.TDDPhaseValidator = void 0;
|
|
10
|
+
const crypto_1 = require("crypto");
|
|
11
|
+
const fs_1 = require("fs");
|
|
12
|
+
class TDDPhaseValidator {
|
|
13
|
+
constructor(memoryClient) {
|
|
14
|
+
this.memoryClient = memoryClient;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Validate RED phase output before transitioning to GREEN
|
|
18
|
+
*/
|
|
19
|
+
async validateREDPhase(cycleId) {
|
|
20
|
+
const errors = [];
|
|
21
|
+
const warnings = [];
|
|
22
|
+
const metrics = {
|
|
23
|
+
memoryKeyExists: false,
|
|
24
|
+
outputSchemaValid: false,
|
|
25
|
+
handoffReady: false,
|
|
26
|
+
fileIntegrityValid: false
|
|
27
|
+
};
|
|
28
|
+
// 1. Check memory key exists
|
|
29
|
+
const memoryKey = `aqe/tdd/cycle-${cycleId}/red/tests`;
|
|
30
|
+
let output = null;
|
|
31
|
+
try {
|
|
32
|
+
output = await this.memoryClient.retrieve(memoryKey, { partition: 'coordination' });
|
|
33
|
+
metrics.memoryKeyExists = !!output;
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
errors.push(`Failed to retrieve RED phase output from ${memoryKey}: ${e}`);
|
|
37
|
+
}
|
|
38
|
+
if (!output) {
|
|
39
|
+
errors.push(`RED phase output not found at ${memoryKey}`);
|
|
40
|
+
return { valid: false, phase: 'RED', cycleId, errors, warnings, metrics };
|
|
41
|
+
}
|
|
42
|
+
// 2. Validate schema
|
|
43
|
+
if (!output.cycleId || output.cycleId !== cycleId) {
|
|
44
|
+
errors.push(`Cycle ID mismatch: expected ${cycleId}, got ${output.cycleId}`);
|
|
45
|
+
}
|
|
46
|
+
else if (!output.testFile?.path || !output.testFile?.hash) {
|
|
47
|
+
errors.push('Missing testFile.path or testFile.hash in RED output');
|
|
48
|
+
}
|
|
49
|
+
else if (!output.validation || typeof output.validation.allTestsFailing !== 'boolean') {
|
|
50
|
+
errors.push('Missing or invalid validation.allTestsFailing in RED output');
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
metrics.outputSchemaValid = true;
|
|
54
|
+
}
|
|
55
|
+
// 3. Validate tests are failing (RED phase requirement)
|
|
56
|
+
if (output.validation && !output.validation.allTestsFailing) {
|
|
57
|
+
errors.push('RED phase violation: Tests must fail initially. Found passing tests.');
|
|
58
|
+
}
|
|
59
|
+
// 4. Check handoff readiness
|
|
60
|
+
if (!output.readyForHandoff) {
|
|
61
|
+
errors.push('RED phase not ready for handoff');
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
metrics.handoffReady = true;
|
|
65
|
+
}
|
|
66
|
+
// 5. Validate file integrity
|
|
67
|
+
if (output.testFile?.path && output.testFile?.hash) {
|
|
68
|
+
const fileValid = await this.validateFileHash(output.testFile.path, output.testFile.hash);
|
|
69
|
+
metrics.fileIntegrityValid = fileValid;
|
|
70
|
+
if (!fileValid) {
|
|
71
|
+
errors.push(`Test file hash mismatch for ${output.testFile.path}`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
valid: errors.length === 0,
|
|
76
|
+
phase: 'RED',
|
|
77
|
+
cycleId,
|
|
78
|
+
errors,
|
|
79
|
+
warnings,
|
|
80
|
+
metrics
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Validate GREEN phase output before transitioning to REFACTOR
|
|
85
|
+
*/
|
|
86
|
+
async validateGREENPhase(cycleId) {
|
|
87
|
+
const errors = [];
|
|
88
|
+
const warnings = [];
|
|
89
|
+
const metrics = {
|
|
90
|
+
memoryKeyExists: false,
|
|
91
|
+
outputSchemaValid: false,
|
|
92
|
+
handoffReady: false,
|
|
93
|
+
fileIntegrityValid: false
|
|
94
|
+
};
|
|
95
|
+
// 1. Check memory key exists
|
|
96
|
+
const memoryKey = `aqe/tdd/cycle-${cycleId}/green/impl`;
|
|
97
|
+
let output = null;
|
|
98
|
+
try {
|
|
99
|
+
output = await this.memoryClient.retrieve(memoryKey, { partition: 'coordination' });
|
|
100
|
+
metrics.memoryKeyExists = !!output;
|
|
101
|
+
}
|
|
102
|
+
catch (e) {
|
|
103
|
+
errors.push(`Failed to retrieve GREEN phase output from ${memoryKey}: ${e}`);
|
|
104
|
+
}
|
|
105
|
+
if (!output) {
|
|
106
|
+
errors.push(`GREEN phase output not found at ${memoryKey}`);
|
|
107
|
+
return { valid: false, phase: 'GREEN', cycleId, errors, warnings, metrics };
|
|
108
|
+
}
|
|
109
|
+
// 2. Validate schema
|
|
110
|
+
if (!output.cycleId || output.cycleId !== cycleId) {
|
|
111
|
+
errors.push(`Cycle ID mismatch: expected ${cycleId}, got ${output.cycleId}`);
|
|
112
|
+
}
|
|
113
|
+
else if (!output.implFile?.path || !output.implFile?.hash) {
|
|
114
|
+
errors.push('Missing implFile.path or implFile.hash in GREEN output');
|
|
115
|
+
}
|
|
116
|
+
else if (!output.validation || typeof output.validation.allTestsPassing !== 'boolean') {
|
|
117
|
+
errors.push('Missing or invalid validation.allTestsPassing in GREEN output');
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
metrics.outputSchemaValid = true;
|
|
121
|
+
}
|
|
122
|
+
// 3. Validate tests are passing (GREEN phase requirement)
|
|
123
|
+
if (output.validation && !output.validation.allTestsPassing) {
|
|
124
|
+
errors.push('GREEN phase violation: All tests must pass.');
|
|
125
|
+
}
|
|
126
|
+
// 4. Validate test file hash matches RED phase
|
|
127
|
+
try {
|
|
128
|
+
const redOutput = await this.memoryClient.retrieve(`aqe/tdd/cycle-${cycleId}/red/tests`, { partition: 'coordination' });
|
|
129
|
+
if (redOutput && output.testFile?.hash !== redOutput.testFile?.hash) {
|
|
130
|
+
errors.push(`Test file was modified between RED and GREEN phases`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (e) {
|
|
134
|
+
warnings.push(`Could not verify RED phase for test file integrity: ${e}`);
|
|
135
|
+
}
|
|
136
|
+
// 5. Check handoff readiness
|
|
137
|
+
if (!output.readyForHandoff) {
|
|
138
|
+
errors.push('GREEN phase not ready for handoff');
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
metrics.handoffReady = true;
|
|
142
|
+
}
|
|
143
|
+
// 6. Validate file integrity
|
|
144
|
+
if (output.implFile?.path && output.implFile?.hash) {
|
|
145
|
+
const fileValid = await this.validateFileHash(output.implFile.path, output.implFile.hash);
|
|
146
|
+
metrics.fileIntegrityValid = fileValid;
|
|
147
|
+
if (!fileValid) {
|
|
148
|
+
errors.push(`Implementation file hash mismatch for ${output.implFile.path}`);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
valid: errors.length === 0,
|
|
153
|
+
phase: 'GREEN',
|
|
154
|
+
cycleId,
|
|
155
|
+
errors,
|
|
156
|
+
warnings,
|
|
157
|
+
metrics
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Validate REFACTOR phase output (final validation)
|
|
162
|
+
*/
|
|
163
|
+
async validateREFACTORPhase(cycleId) {
|
|
164
|
+
const errors = [];
|
|
165
|
+
const warnings = [];
|
|
166
|
+
const metrics = {
|
|
167
|
+
memoryKeyExists: false,
|
|
168
|
+
outputSchemaValid: false,
|
|
169
|
+
handoffReady: false,
|
|
170
|
+
fileIntegrityValid: false
|
|
171
|
+
};
|
|
172
|
+
// 1. Check memory key exists
|
|
173
|
+
const memoryKey = `aqe/tdd/cycle-${cycleId}/refactor/result`;
|
|
174
|
+
let output = null;
|
|
175
|
+
try {
|
|
176
|
+
output = await this.memoryClient.retrieve(memoryKey, { partition: 'coordination' });
|
|
177
|
+
metrics.memoryKeyExists = !!output;
|
|
178
|
+
}
|
|
179
|
+
catch (e) {
|
|
180
|
+
errors.push(`Failed to retrieve REFACTOR phase output from ${memoryKey}: ${e}`);
|
|
181
|
+
}
|
|
182
|
+
if (!output) {
|
|
183
|
+
errors.push(`REFACTOR phase output not found at ${memoryKey}`);
|
|
184
|
+
return { valid: false, phase: 'REFACTOR', cycleId, errors, warnings, metrics };
|
|
185
|
+
}
|
|
186
|
+
// 2. Validate schema
|
|
187
|
+
if (!output.cycleId || output.cycleId !== cycleId) {
|
|
188
|
+
errors.push(`Cycle ID mismatch: expected ${cycleId}, got ${output.cycleId}`);
|
|
189
|
+
}
|
|
190
|
+
else if (!output.implFile?.path || !output.implFile?.hash) {
|
|
191
|
+
errors.push('Missing implFile.path or implFile.hash in REFACTOR output');
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
metrics.outputSchemaValid = true;
|
|
195
|
+
}
|
|
196
|
+
// 3. Validate tests still passing after refactor
|
|
197
|
+
if (output.validation && !output.validation.allTestsPassing) {
|
|
198
|
+
errors.push('REFACTOR phase violation: Tests must still pass after refactoring.');
|
|
199
|
+
}
|
|
200
|
+
// 4. Validate test file hash unchanged throughout cycle
|
|
201
|
+
try {
|
|
202
|
+
const redOutput = await this.memoryClient.retrieve(`aqe/tdd/cycle-${cycleId}/red/tests`, { partition: 'coordination' });
|
|
203
|
+
if (redOutput && output.testFile?.hash !== redOutput.testFile?.hash) {
|
|
204
|
+
errors.push(`Test file was modified during TDD cycle - integrity violation`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
catch (e) {
|
|
208
|
+
warnings.push(`Could not verify RED phase for test file integrity: ${e}`);
|
|
209
|
+
}
|
|
210
|
+
// 5. Check review readiness
|
|
211
|
+
if (!output.readyForReview) {
|
|
212
|
+
warnings.push('REFACTOR phase not marked ready for review');
|
|
213
|
+
}
|
|
214
|
+
else {
|
|
215
|
+
metrics.handoffReady = true;
|
|
216
|
+
}
|
|
217
|
+
// 6. Validate coverage didn't decrease
|
|
218
|
+
try {
|
|
219
|
+
const greenOutput = await this.memoryClient.retrieve(`aqe/tdd/cycle-${cycleId}/green/impl`, { partition: 'coordination' });
|
|
220
|
+
if (greenOutput && output.validation?.coverage < greenOutput.validation?.coverage) {
|
|
221
|
+
warnings.push(`Coverage decreased from ${greenOutput.validation.coverage}% to ${output.validation.coverage}%`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch (e) {
|
|
225
|
+
warnings.push(`Could not verify GREEN phase for coverage comparison: ${e}`);
|
|
226
|
+
}
|
|
227
|
+
// 7. Validate file integrity
|
|
228
|
+
if (output.implFile?.path && output.implFile?.hash) {
|
|
229
|
+
const fileValid = await this.validateFileHash(output.implFile.path, output.implFile.hash);
|
|
230
|
+
metrics.fileIntegrityValid = fileValid;
|
|
231
|
+
if (!fileValid) {
|
|
232
|
+
errors.push(`Implementation file hash mismatch for ${output.implFile.path}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return {
|
|
236
|
+
valid: errors.length === 0,
|
|
237
|
+
phase: 'REFACTOR',
|
|
238
|
+
cycleId,
|
|
239
|
+
errors,
|
|
240
|
+
warnings,
|
|
241
|
+
metrics
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Validate complete TDD cycle
|
|
246
|
+
*/
|
|
247
|
+
async validateCompleteCycle(cycleId) {
|
|
248
|
+
const redResult = await this.validateREDPhase(cycleId);
|
|
249
|
+
const greenResult = await this.validateGREENPhase(cycleId);
|
|
250
|
+
const refactorResult = await this.validateREFACTORPhase(cycleId);
|
|
251
|
+
const allValid = redResult.valid && greenResult.valid && refactorResult.valid;
|
|
252
|
+
const totalErrors = redResult.errors.length + greenResult.errors.length + refactorResult.errors.length;
|
|
253
|
+
return {
|
|
254
|
+
valid: allValid,
|
|
255
|
+
phases: [redResult, greenResult, refactorResult],
|
|
256
|
+
summary: allValid
|
|
257
|
+
? `TDD cycle ${cycleId} completed successfully with full coordination`
|
|
258
|
+
: `TDD cycle ${cycleId} has ${totalErrors} validation errors`
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Calculate SHA256 hash of a file
|
|
263
|
+
*/
|
|
264
|
+
static calculateFileHash(filePath) {
|
|
265
|
+
if (!(0, fs_1.existsSync)(filePath)) {
|
|
266
|
+
throw new Error(`File not found: ${filePath}`);
|
|
267
|
+
}
|
|
268
|
+
const content = (0, fs_1.readFileSync)(filePath, 'utf-8');
|
|
269
|
+
return (0, crypto_1.createHash)('sha256').update(content).digest('hex');
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Validate file hash matches expected
|
|
273
|
+
*/
|
|
274
|
+
async validateFileHash(filePath, expectedHash) {
|
|
275
|
+
try {
|
|
276
|
+
const actualHash = TDDPhaseValidator.calculateFileHash(filePath);
|
|
277
|
+
return actualHash === expectedHash;
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
exports.TDDPhaseValidator = TDDPhaseValidator;
|
|
285
|
+
// Export for use in hooks system
|
|
286
|
+
exports.default = TDDPhaseValidator;
|
|
287
|
+
//# sourceMappingURL=TDDPhaseValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TDDPhaseValidator.js","sourceRoot":"","sources":["../../../../src/core/hooks/validators/TDDPhaseValidator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,mCAAoC;AACpC,2BAA8C;AA8C9C,MAAa,iBAAiB;IAC5B,YAAoB,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAAG,CAAC;IAElD;;OAEG;IACH,KAAK,CAAC,gBAAgB,CAAC,OAAe;QACpC,MAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG;YACd,eAAe,EAAE,KAAK;YACtB,iBAAiB,EAAE,KAAK;YACxB,YAAY,EAAE,KAAK;YACnB,kBAAkB,EAAE,KAAK;SAC1B,CAAC;QAEF,6BAA6B;QAC7B,MAAM,SAAS,GAA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-
* Post-Task Validators - Output, Quality, Coverage, and
|
|
2
|
+
* Post-Task Validators - Output, Quality, Coverage, Performance, and TDD Phase Validation
|
|
3
3
|
*/
|
|
4
4
|
export { OutputValidator } from './OutputValidator';
|
|
5
5
|
export { QualityValidator } from './QualityValidator';
|
|
6
6
|
export { CoverageValidator } from './CoverageValidator';
|
|
7
7
|
export { PerformanceValidator } from './PerformanceValidator';
|
|
8
|
+
export { TDDPhaseValidator } from './TDDPhaseValidator';
|
|
8
9
|
export type { OutputValidationOptions, OutputValidationResult } from './OutputValidator';
|
|
9
10
|
export type { QualityValidationOptions, QualityValidationResult } from './QualityValidator';
|
|
10
11
|
export type { CoverageValidationOptions, CoverageValidationResult } from './CoverageValidator';
|
|
11
12
|
export type { PerformanceValidationOptions, PerformanceValidationResult } from './PerformanceValidator';
|
|
13
|
+
export type { TDDValidationResult, REDPhaseOutput, GREENPhaseOutput, REFACTORPhaseOutput, MemoryClient } from './TDDPhaseValidator';
|
|
12
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/validators/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/hooks/validators/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,wBAAwB,EACxB,uBAAuB,EACxB,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EACV,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,YAAY,EACV,4BAA4B,EAC5B,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACb,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
* Post-Task Validators - Output, Quality, Coverage, and
|
|
3
|
+
* Post-Task Validators - Output, Quality, Coverage, Performance, and TDD Phase Validation
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.PerformanceValidator = exports.CoverageValidator = exports.QualityValidator = exports.OutputValidator = void 0;
|
|
6
|
+
exports.TDDPhaseValidator = exports.PerformanceValidator = exports.CoverageValidator = exports.QualityValidator = exports.OutputValidator = void 0;
|
|
7
7
|
var OutputValidator_1 = require("./OutputValidator");
|
|
8
8
|
Object.defineProperty(exports, "OutputValidator", { enumerable: true, get: function () { return OutputValidator_1.OutputValidator; } });
|
|
9
9
|
var QualityValidator_1 = require("./QualityValidator");
|
|
@@ -12,4 +12,6 @@ var CoverageValidator_1 = require("./CoverageValidator");
|
|
|
12
12
|
Object.defineProperty(exports, "CoverageValidator", { enumerable: true, get: function () { return CoverageValidator_1.CoverageValidator; } });
|
|
13
13
|
var PerformanceValidator_1 = require("./PerformanceValidator");
|
|
14
14
|
Object.defineProperty(exports, "PerformanceValidator", { enumerable: true, get: function () { return PerformanceValidator_1.PerformanceValidator; } });
|
|
15
|
+
var TDDPhaseValidator_1 = require("./TDDPhaseValidator");
|
|
16
|
+
Object.defineProperty(exports, "TDDPhaseValidator", { enumerable: true, get: function () { return TDDPhaseValidator_1.TDDPhaseValidator; } });
|
|
15
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/hooks/validators/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/hooks/validators/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,qDAAoD;AAA3C,kHAAA,eAAe,OAAA;AACxB,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA;AAC1B,+DAA8D;AAArD,4HAAA,oBAAoB,OAAA;AAC7B,yDAAwD;AAA/C,sHAAA,iBAAiB,OAAA"}
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
* Updated to use createDatabase, WASMVectorSearch, and HNSWIndex
|
|
5
5
|
*/
|
|
6
6
|
import type { Pattern, RetrievalOptions, RetrievalResult } from './ReasoningBankAdapter';
|
|
7
|
+
import { ReasoningBank } from 'agentdb';
|
|
7
8
|
export declare class RealAgentDBAdapter {
|
|
8
9
|
private db;
|
|
9
10
|
private wasmSearch;
|
|
10
11
|
private hnswIndex;
|
|
12
|
+
private reasoningBank;
|
|
13
|
+
private embedder;
|
|
11
14
|
private isInitialized;
|
|
12
15
|
private dbPath;
|
|
13
16
|
private dimension;
|
|
@@ -16,13 +19,81 @@ export declare class RealAgentDBAdapter {
|
|
|
16
19
|
dimension?: number;
|
|
17
20
|
});
|
|
18
21
|
/**
|
|
19
|
-
* Initialize with real AgentDB v1.6.1 (createDatabase + WASMVectorSearch)
|
|
22
|
+
* Initialize with real AgentDB v1.6.1 (createDatabase + WASMVectorSearch + ReasoningBank)
|
|
20
23
|
*/
|
|
21
24
|
initialize(): Promise<void>;
|
|
22
25
|
/**
|
|
23
|
-
* Create patterns table
|
|
26
|
+
* Create patterns table (base AgentDB table for vector embeddings)
|
|
24
27
|
*/
|
|
25
28
|
private createPatternsTable;
|
|
29
|
+
/**
|
|
30
|
+
* Create QE Learning System Tables
|
|
31
|
+
*
|
|
32
|
+
* Creates the comprehensive schema for the Agentic QE Fleet learning system.
|
|
33
|
+
* This schema supports:
|
|
34
|
+
* - Test pattern storage and deduplication
|
|
35
|
+
* - Cross-project pattern usage tracking
|
|
36
|
+
* - Framework-agnostic pattern sharing
|
|
37
|
+
* - Pattern similarity indexing
|
|
38
|
+
* - Full-text search capabilities
|
|
39
|
+
*
|
|
40
|
+
* Tables Created:
|
|
41
|
+
* 1. test_patterns - Core pattern storage with code signatures
|
|
42
|
+
* 2. pattern_usage - Track pattern usage and quality metrics per project
|
|
43
|
+
* 3. cross_project_mappings - Enable pattern sharing across frameworks
|
|
44
|
+
* 4. pattern_similarity_index - Pre-computed similarity scores
|
|
45
|
+
* 5. pattern_fts - Full-text search index
|
|
46
|
+
* 6. schema_version - Track schema migrations
|
|
47
|
+
*
|
|
48
|
+
* @throws {Error} If table creation fails
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
private createQELearningTables;
|
|
52
|
+
/**
|
|
53
|
+
* Create test_patterns table - Core pattern storage
|
|
54
|
+
*
|
|
55
|
+
* Stores test patterns with code signatures for deduplication.
|
|
56
|
+
* Supports multiple testing frameworks and pattern types.
|
|
57
|
+
*/
|
|
58
|
+
private createTestPatternsTable;
|
|
59
|
+
/**
|
|
60
|
+
* Create pattern_usage table - Track pattern usage and quality metrics
|
|
61
|
+
*
|
|
62
|
+
* Tracks how patterns are used across different projects with
|
|
63
|
+
* success rates, execution time, coverage gains, and quality scores.
|
|
64
|
+
*/
|
|
65
|
+
private createPatternUsageTable;
|
|
66
|
+
/**
|
|
67
|
+
* Create cross_project_mappings table - Enable pattern sharing across frameworks
|
|
68
|
+
*
|
|
69
|
+
* Stores transformation rules for adapting patterns between different
|
|
70
|
+
* testing frameworks (e.g., Jest to Vitest, Cypress to Playwright).
|
|
71
|
+
*/
|
|
72
|
+
private createCrossProjectMappingsTable;
|
|
73
|
+
/**
|
|
74
|
+
* Create pattern_similarity_index table - Pre-computed similarity scores
|
|
75
|
+
*
|
|
76
|
+
* Stores pre-computed similarity scores between patterns to enable
|
|
77
|
+
* fast similarity-based pattern retrieval without runtime computation.
|
|
78
|
+
*/
|
|
79
|
+
private createPatternSimilarityIndexTable;
|
|
80
|
+
/**
|
|
81
|
+
* Create pattern_fts table - Full-text search capabilities
|
|
82
|
+
*
|
|
83
|
+
* FTS5 virtual table for fast full-text search across pattern names,
|
|
84
|
+
* descriptions, tags, and other textual content.
|
|
85
|
+
*
|
|
86
|
+
* Note: FTS5 is not available in all SQLite builds (e.g., sql.js WASM).
|
|
87
|
+
* This method gracefully handles missing FTS5 support.
|
|
88
|
+
*/
|
|
89
|
+
private createPatternFTSTable;
|
|
90
|
+
/**
|
|
91
|
+
* Create schema_version table - Track schema migrations
|
|
92
|
+
*
|
|
93
|
+
* Maintains a record of applied schema versions to support
|
|
94
|
+
* safe database migrations and version compatibility checks.
|
|
95
|
+
*/
|
|
96
|
+
private createSchemaVersionTable;
|
|
26
97
|
/**
|
|
27
98
|
* Store a pattern with vector embedding
|
|
28
99
|
*/
|
|
@@ -47,6 +118,10 @@ export declare class RealAgentDBAdapter {
|
|
|
47
118
|
* Check if initialized
|
|
48
119
|
*/
|
|
49
120
|
get initialized(): boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Get ReasoningBank instance for advanced pattern operations
|
|
123
|
+
*/
|
|
124
|
+
getReasoningBank(): ReasoningBank | null;
|
|
50
125
|
/**
|
|
51
126
|
* Insert a pattern (alias for store)
|
|
52
127
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RealAgentDBAdapter.d.ts","sourceRoot":"","sources":["../../../src/core/memory/RealAgentDBAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"RealAgentDBAdapter.d.ts","sourceRoot":"","sources":["../../../src/core/memory/RealAgentDBAdapter.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzF,OAAO,EAA+C,aAAa,EAAoB,MAAM,SAAS,CAAC;AAEvG,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,EAAE,CAAM;IAChB,OAAO,CAAC,UAAU,CAAiC;IACnD,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,SAAS,CAAS;gBAEd,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE;IAK1D;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAsDjC;;OAEG;YACW,mBAAmB;IAgBjC;;;;;;;;;;;;;;;;;;;;;OAqBG;YACW,sBAAsB;IA8BpC;;;;;OAKG;YACW,uBAAuB;IA2BrC;;;;;OAKG;YACW,uBAAuB;IA2BrC;;;;;OAKG;YACW,+BAA+B;IAqB7C;;;;;OAKG;YACW,iCAAiC;IAuB/C;;;;;;;;OAQG;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