agentic-qe 1.8.2 → 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.
@@ -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,GAAG,iBAAiB,OAAO,YAAY,CAAC;QACvD,IAAI,MAAM,GAA0B,IAAI,CAAC;QAEzC,IAAI,CAAC;YACH,MAAM,GAAG,MAAM,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;YACpF,OAAO,CAAC,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;QACrC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,IAAI,CAAC,4CAA4C,SAAS,KAAK,CAAC,EAAE,CAAC,CAAC;QAC7E,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;YAC1D,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EA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C1B,MAAM,IAAI,KAAK,CAAC,mBAAmB,QAAQ,EAAE,CAAC,CAAC;QACjD,CAAC;QACD,MAAM,OAAO,GAAG,IAAA,iBAAY,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAChD,OAAO,IAAA,mBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,gBAAgB,CAAC,QAAgB,EAAE,YAAoB;QACnE,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;YACjE,OAAO,UAAU,KAAK,YAAY,CAAC;QACrC,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF;AA3SD,8CA2SC;AAED,iCAAiC;AACjC,kBAAe,iBAAiB,CAAC"}
@@ -1,12 +1,14 @@
1
1
  /**
2
- * Post-Task Validators - Output, Quality, Coverage, and Performance Validation
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;AAE9D,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"}
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 Performance Validation
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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-qe",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "description": "Agentic Quality Engineering Fleet System - AI-driven quality management platform with 38 QE skills, learning, pattern reuse, ML-based flaky detection, Multi-Model Router (70-81% cost savings), streaming progress updates, 102 MCP tools, and native TypeScript hooks",
5
5
  "main": "dist/cli/index.js",
6
6
  "types": "dist/cli/index.d.ts",