agentic-qe 1.0.1 → 1.0.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-api-contract-validator.md +51 -11
- package/.claude/agents/qe-chaos-engineer.md +95 -43
- package/.claude/agents/qe-coverage-analyzer.md +134 -57
- package/.claude/agents/qe-deployment-readiness.md +48 -11
- package/.claude/agents/qe-flaky-test-hunter.md +57 -11
- package/.claude/agents/qe-fleet-commander.md +106 -49
- package/.claude/agents/qe-performance-tester.md +98 -45
- package/.claude/agents/qe-production-intelligence.md +48 -11
- package/.claude/agents/qe-quality-gate.md +160 -28
- package/.claude/agents/qe-regression-risk-analyzer.md +53 -11
- package/.claude/agents/qe-requirements-validator.md +48 -11
- package/.claude/agents/qe-security-scanner.md +230 -47
- package/.claude/agents/qe-test-data-architect.md +49 -11
- package/.claude/agents/qe-test-executor.md +59 -55
- package/.claude/agents/qe-test-generator.md +222 -48
- package/.claude/agents/qe-visual-tester.md +66 -65
- package/CHANGELOG.md +162 -0
- package/README.md +33 -2
- package/dist/adapters/MemoryStoreAdapter.d.ts +157 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -0
- package/dist/adapters/MemoryStoreAdapter.js +433 -0
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/index.d.ts.map +1 -0
- package/dist/adapters/index.js +12 -0
- package/dist/adapters/index.js.map +1 -0
- package/dist/agents/BaseAgent.d.ts +22 -3
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +110 -6
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts +0 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts +0 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityGateAgent.d.ts +0 -1
- package/dist/agents/QualityGateAgent.d.ts.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +17 -7
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.js +17 -7
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/index.js +2 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/cli/commands/agent/assign.js +17 -7
- package/dist/cli/commands/agent/assign.js.map +1 -1
- package/dist/cli/commands/agent/attach.d.ts +0 -1
- package/dist/cli/commands/agent/attach.d.ts.map +1 -1
- package/dist/cli/commands/agent/attach.js +17 -7
- package/dist/cli/commands/agent/attach.js.map +1 -1
- package/dist/cli/commands/agent/benchmark.js +1 -2
- package/dist/cli/commands/agent/benchmark.js.map +1 -1
- package/dist/cli/commands/agent/clone.js +1 -2
- package/dist/cli/commands/agent/clone.js.map +1 -1
- package/dist/cli/commands/agent/detach.js +17 -7
- package/dist/cli/commands/agent/detach.js.map +1 -1
- package/dist/cli/commands/agent/index.js +3 -3
- package/dist/cli/commands/agent/index.js.map +1 -1
- package/dist/cli/commands/agent/inspect.js +17 -7
- package/dist/cli/commands/agent/inspect.js.map +1 -1
- package/dist/cli/commands/agent/migrate.js +1 -2
- package/dist/cli/commands/agent/migrate.js.map +1 -1
- package/dist/cli/commands/agent/restart.js +17 -7
- package/dist/cli/commands/agent/restart.js.map +1 -1
- package/dist/cli/commands/analyze.js +17 -7
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/config/export.js +17 -7
- package/dist/cli/commands/config/export.js.map +1 -1
- package/dist/cli/commands/config/get.js +19 -9
- package/dist/cli/commands/config/get.js.map +1 -1
- package/dist/cli/commands/config/import.js +17 -7
- package/dist/cli/commands/config/import.js.map +1 -1
- package/dist/cli/commands/config/init.js +19 -9
- package/dist/cli/commands/config/init.js.map +1 -1
- package/dist/cli/commands/config/list.js +1 -2
- package/dist/cli/commands/config/list.js.map +1 -1
- package/dist/cli/commands/config/reset.js +1 -2
- package/dist/cli/commands/config/reset.js.map +1 -1
- package/dist/cli/commands/config/set.js +19 -9
- package/dist/cli/commands/config/set.js.map +1 -1
- package/dist/cli/commands/config/validate.js +19 -9
- package/dist/cli/commands/config/validate.js.map +1 -1
- package/dist/cli/commands/debug/agent.js +18 -9
- package/dist/cli/commands/debug/agent.js.map +1 -1
- package/dist/cli/commands/debug/diagnostics.js +18 -9
- package/dist/cli/commands/debug/diagnostics.js.map +1 -1
- package/dist/cli/commands/debug/health-check.js +18 -9
- package/dist/cli/commands/debug/health-check.js.map +1 -1
- package/dist/cli/commands/debug/profile.js +18 -9
- package/dist/cli/commands/debug/profile.js.map +1 -1
- package/dist/cli/commands/debug/trace.js +18 -9
- package/dist/cli/commands/debug/trace.js.map +1 -1
- package/dist/cli/commands/debug/troubleshoot.js +18 -9
- package/dist/cli/commands/debug/troubleshoot.js.map +1 -1
- package/dist/cli/commands/fleet/backup.js +1 -2
- package/dist/cli/commands/fleet/backup.js.map +1 -1
- package/dist/cli/commands/fleet/health.js +17 -7
- package/dist/cli/commands/fleet/health.js.map +1 -1
- package/dist/cli/commands/fleet/init.js +17 -7
- package/dist/cli/commands/fleet/init.js.map +1 -1
- package/dist/cli/commands/fleet/logs.js +17 -7
- package/dist/cli/commands/fleet/logs.js.map +1 -1
- package/dist/cli/commands/fleet/metrics.js +17 -7
- package/dist/cli/commands/fleet/metrics.js.map +1 -1
- package/dist/cli/commands/fleet/monitor.js +17 -7
- package/dist/cli/commands/fleet/monitor.js.map +1 -1
- package/dist/cli/commands/fleet/optimize.js +1 -2
- package/dist/cli/commands/fleet/optimize.js.map +1 -1
- package/dist/cli/commands/fleet/recover.js +1 -2
- package/dist/cli/commands/fleet/recover.js.map +1 -1
- package/dist/cli/commands/fleet/restart.js +17 -7
- package/dist/cli/commands/fleet/restart.js.map +1 -1
- package/dist/cli/commands/fleet/scale.js +17 -7
- package/dist/cli/commands/fleet/scale.js.map +1 -1
- package/dist/cli/commands/fleet/shutdown.js +17 -7
- package/dist/cli/commands/fleet/shutdown.js.map +1 -1
- package/dist/cli/commands/fleet/status.js +17 -7
- package/dist/cli/commands/fleet/status.js.map +1 -1
- package/dist/cli/commands/fleet/topology.js +17 -7
- package/dist/cli/commands/fleet/topology.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts +0 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +37 -60
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/generate.js +17 -7
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +250 -82
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/memory/compact.js +1 -2
- package/dist/cli/commands/memory/compact.js.map +1 -1
- package/dist/cli/commands/memory/index.js +4 -5
- package/dist/cli/commands/memory/index.js.map +1 -1
- package/dist/cli/commands/memory/stats.js +1 -2
- package/dist/cli/commands/memory/stats.js.map +1 -1
- package/dist/cli/commands/memory/vacuum.js +1 -2
- package/dist/cli/commands/memory/vacuum.js.map +1 -1
- package/dist/cli/commands/monitor/alerts.js +17 -7
- package/dist/cli/commands/monitor/alerts.js.map +1 -1
- package/dist/cli/commands/monitor/analyze.js +17 -7
- package/dist/cli/commands/monitor/analyze.js.map +1 -1
- package/dist/cli/commands/monitor/compare.js +17 -7
- package/dist/cli/commands/monitor/compare.js.map +1 -1
- package/dist/cli/commands/monitor/dashboard.js +17 -7
- package/dist/cli/commands/monitor/dashboard.js.map +1 -1
- package/dist/cli/commands/monitor/export.js +17 -7
- package/dist/cli/commands/monitor/export.js.map +1 -1
- package/dist/cli/commands/quality/baseline.js +1 -2
- package/dist/cli/commands/quality/baseline.js.map +1 -1
- package/dist/cli/commands/quality/compare.js +1 -2
- package/dist/cli/commands/quality/compare.js.map +1 -1
- package/dist/cli/commands/quality/decision.js +2 -2
- package/dist/cli/commands/quality/decision.js.map +1 -1
- package/dist/cli/commands/quality/gate.js +2 -2
- package/dist/cli/commands/quality/gate.js.map +1 -1
- package/dist/cli/commands/quality/index.js +2 -2
- package/dist/cli/commands/quality/index.js.map +1 -1
- package/dist/cli/commands/quality/policy.js +19 -9
- package/dist/cli/commands/quality/policy.js.map +1 -1
- package/dist/cli/commands/quality/risk.js +2 -2
- package/dist/cli/commands/quality/risk.js.map +1 -1
- package/dist/cli/commands/quality/trends.js +1 -2
- package/dist/cli/commands/quality/trends.js.map +1 -1
- package/dist/cli/commands/quality/validate.js +19 -9
- package/dist/cli/commands/quality/validate.js.map +1 -1
- package/dist/cli/commands/run.js +17 -7
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/test/analyze-failures.js +1 -2
- package/dist/cli/commands/test/analyze-failures.js.map +1 -1
- package/dist/cli/commands/test/clean.js +18 -9
- package/dist/cli/commands/test/clean.js.map +1 -1
- package/dist/cli/commands/test/debug.js +18 -9
- package/dist/cli/commands/test/debug.js.map +1 -1
- package/dist/cli/commands/test/diff.js +18 -9
- package/dist/cli/commands/test/diff.js.map +1 -1
- package/dist/cli/commands/test/flakiness.js +1 -2
- package/dist/cli/commands/test/flakiness.js.map +1 -1
- package/dist/cli/commands/test/index.js +2 -2
- package/dist/cli/commands/test/index.js.map +1 -1
- package/dist/cli/commands/test/mutate.js +1 -2
- package/dist/cli/commands/test/mutate.js.map +1 -1
- package/dist/cli/commands/test/parallel.js +1 -2
- package/dist/cli/commands/test/parallel.js.map +1 -1
- package/dist/cli/commands/test/profile.js +18 -9
- package/dist/cli/commands/test/profile.js.map +1 -1
- package/dist/cli/commands/test/queue.js +1 -2
- package/dist/cli/commands/test/queue.js.map +1 -1
- package/dist/cli/commands/test/retry.js +1 -2
- package/dist/cli/commands/test/retry.js.map +1 -1
- package/dist/cli/commands/test/snapshot.js +1 -2
- package/dist/cli/commands/test/snapshot.js.map +1 -1
- package/dist/cli/commands/test/trace.js +18 -9
- package/dist/cli/commands/test/trace.js.map +1 -1
- package/dist/cli/commands/test/watch.js +1 -2
- package/dist/cli/commands/test/watch.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +2 -3
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/commands/workflow/list.js +2 -3
- package/dist/cli/commands/workflow/list.js.map +1 -1
- package/dist/cli/commands/workflow/pause.js +2 -3
- package/dist/cli/commands/workflow/pause.js.map +1 -1
- package/dist/cli/index-working.js +17 -7
- package/dist/cli/index-working.js.map +1 -1
- package/dist/cli/index.js +17 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/core/Agent.d.ts +0 -1
- package/dist/core/Agent.d.ts.map +1 -1
- package/dist/core/ArtifactWorkflow.js +17 -7
- package/dist/core/ArtifactWorkflow.js.map +1 -1
- package/dist/core/EventBus.d.ts +0 -1
- package/dist/core/EventBus.d.ts.map +1 -1
- package/dist/core/FleetManager.d.ts +0 -1
- package/dist/core/FleetManager.d.ts.map +1 -1
- package/dist/core/FleetManager.js +17 -7
- package/dist/core/FleetManager.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +0 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/Task.d.ts +0 -1
- package/dist/core/Task.d.ts.map +1 -1
- package/dist/core/coordination/BlackboardCoordination.d.ts +0 -1
- package/dist/core/coordination/BlackboardCoordination.d.ts.map +1 -1
- package/dist/core/coordination/ConsensusGating.d.ts +0 -1
- package/dist/core/coordination/ConsensusGating.d.ts.map +1 -1
- package/dist/core/coordination/GOAPCoordination.d.ts +0 -1
- package/dist/core/coordination/GOAPCoordination.d.ts.map +1 -1
- package/dist/core/coordination/OODACoordination.d.ts +0 -1
- package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
- package/dist/core/events/QEEventBus.d.ts +0 -1
- package/dist/core/events/QEEventBus.d.ts.map +1 -1
- package/dist/core/hooks/RollbackManager.d.ts +2 -2
- package/dist/core/hooks/RollbackManager.d.ts.map +1 -1
- package/dist/core/hooks/RollbackManager.js +17 -7
- package/dist/core/hooks/RollbackManager.js.map +1 -1
- package/dist/core/hooks/VerificationHookManager.d.ts +2 -3
- package/dist/core/hooks/VerificationHookManager.d.ts.map +1 -1
- package/dist/core/hooks/VerificationHookManager.js.map +1 -1
- package/dist/core/hooks/checkers/ConfigurationChecker.d.ts +2 -2
- package/dist/core/hooks/checkers/ConfigurationChecker.d.ts.map +1 -1
- package/dist/core/hooks/checkers/ConfigurationChecker.js.map +1 -1
- package/dist/core/hooks/checkers/EnvironmentChecker.js +17 -7
- package/dist/core/hooks/checkers/EnvironmentChecker.js.map +1 -1
- package/dist/core/hooks/checkers/PermissionChecker.js +17 -7
- package/dist/core/hooks/checkers/PermissionChecker.js.map +1 -1
- package/dist/core/hooks/checkers/ResourceChecker.js +17 -7
- package/dist/core/hooks/checkers/ResourceChecker.js.map +1 -1
- package/dist/core/memory/CompressionManager.js +17 -7
- package/dist/core/memory/CompressionManager.js.map +1 -1
- package/dist/core/memory/EncryptionManager.js +17 -7
- package/dist/core/memory/EncryptionManager.js.map +1 -1
- package/dist/core/memory/EnhancedSwarmMemoryManager.js +17 -7
- package/dist/core/memory/EnhancedSwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +17 -7
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/VersionHistory.js +17 -7
- package/dist/core/memory/VersionHistory.js.map +1 -1
- package/dist/coverage/coverage-collector.js +17 -7
- package/dist/coverage/coverage-collector.js.map +1 -1
- package/dist/coverage/coverage-reporter.js +17 -7
- package/dist/coverage/coverage-reporter.js.map +1 -1
- package/dist/mcp/handlers/advanced/api-breaking-changes.js +1 -2
- package/dist/mcp/handlers/advanced/api-breaking-changes.js.map +1 -1
- package/dist/mcp/handlers/advanced/mutation-test-execute.js +1 -2
- package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
- package/dist/mcp/handlers/advanced/production-incident-replay.js +1 -2
- package/dist/mcp/handlers/advanced/production-incident-replay.js.map +1 -1
- package/dist/mcp/handlers/advanced/production-rum-analyze.js +1 -2
- package/dist/mcp/handlers/advanced/production-rum-analyze.js.map +1 -1
- package/dist/mcp/handlers/advanced/requirements-generate-bdd.js +1 -2
- package/dist/mcp/handlers/advanced/requirements-generate-bdd.js.map +1 -1
- package/dist/mcp/handlers/advanced/requirements-validate.js +1 -2
- package/dist/mcp/handlers/advanced/requirements-validate.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +1 -2
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +1 -2
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +1 -2
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +1 -2
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js +1 -2
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +3 -4
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +3 -4
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-resilience-test.js +3 -4
- package/dist/mcp/handlers/chaos/chaos-resilience-test.js.map +1 -1
- package/dist/mcp/handlers/integration/contract-validate.js +1 -2
- package/dist/mcp/handlers/integration/contract-validate.js.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.js +1 -2
- package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js +1 -2
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/test-execute.js +17 -7
- package/dist/mcp/handlers/test-execute.js.map +1 -1
- package/dist/mcp/server.js +3 -3
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +3 -3
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/services/HookExecutor.d.ts +79 -6
- package/dist/mcp/services/HookExecutor.d.ts.map +1 -1
- package/dist/mcp/services/HookExecutor.js +313 -17
- package/dist/mcp/services/HookExecutor.js.map +1 -1
- package/dist/types/api-contract.types.js +1 -2
- package/dist/types/api-contract.types.js.map +1 -1
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +5 -5
- package/dist/types/errors.js.map +1 -1
- package/dist/types/hook.types.d.ts +147 -0
- package/dist/types/hook.types.d.ts.map +1 -0
- package/dist/types/hook.types.js +7 -0
- package/dist/types/hook.types.js.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/memory-interfaces.d.ts +104 -0
- package/dist/types/memory-interfaces.d.ts.map +1 -0
- package/dist/types/memory-interfaces.js +9 -0
- package/dist/types/memory-interfaces.js.map +1 -0
- package/dist/utils/Config.d.ts +2 -2
- package/dist/utils/Config.d.ts.map +1 -1
- package/dist/utils/Config.js +17 -7
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/FakerDataGenerator.d.ts.map +1 -1
- package/dist/utils/SecurityScanner.js +17 -7
- package/dist/utils/SecurityScanner.js.map +1 -1
- package/dist/utils/TestFrameworkExecutor.js +17 -7
- package/dist/utils/TestFrameworkExecutor.js.map +1 -1
- package/dist/utils/validation.js +6 -7
- package/dist/utils/validation.js.map +1 -1
- package/package.json +19 -15
|
@@ -12,17 +12,8 @@ capabilities:
|
|
|
12
12
|
- consumer-impact-analysis
|
|
13
13
|
- contract-testing
|
|
14
14
|
- semantic-versioning-validation
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Validating API contracts'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/contracts/current'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/api-schemas/baseline'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/contracts/validation-result' --value '${RESULT}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/breaking-changes/detected' --value '${BREAKING_CHANGES}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/contracts/schema-updated'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Engineering", "API Teams", "Integration Partners", "DevOps"]
|
|
@@ -935,6 +926,55 @@ class SemanticVersioningValidator {
|
|
|
935
926
|
- **qe-fleet-commander**: Orchestrates contract validation
|
|
936
927
|
- **qe-requirements-validator**: Validates API requirements
|
|
937
928
|
|
|
929
|
+
## Coordination Protocol
|
|
930
|
+
|
|
931
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
932
|
+
|
|
933
|
+
**Automatic Lifecycle Hooks:**
|
|
934
|
+
```typescript
|
|
935
|
+
// Automatically called by BaseAgent
|
|
936
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
937
|
+
// Load baseline contracts and schemas
|
|
938
|
+
const contracts = await this.memoryStore.retrieve('aqe/contracts/current');
|
|
939
|
+
const baseline = await this.memoryStore.retrieve('aqe/api-schemas/baseline');
|
|
940
|
+
this.logger.info('Loaded API contracts and baseline schemas');
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
944
|
+
// Store validation results and breaking changes
|
|
945
|
+
await this.memoryStore.store('aqe/contracts/validation-result', data.result.validation);
|
|
946
|
+
await this.memoryStore.store('aqe/breaking-changes/detected', data.result.breakingChanges);
|
|
947
|
+
|
|
948
|
+
// Emit events for downstream agents
|
|
949
|
+
this.eventBus.emit('contract-validator:completed', {
|
|
950
|
+
breakingChanges: data.result.breakingChanges.length,
|
|
951
|
+
validationStatus: data.result.validation.passed
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
protected async onPostEdit(data: { filePath: string; changes: any }): Promise<void> {
|
|
956
|
+
// Track schema updates
|
|
957
|
+
const fileName = data.filePath.split('/').pop();
|
|
958
|
+
await this.memoryStore.store(`aqe/contracts/schema-updated/${fileName}`, {
|
|
959
|
+
timestamp: Date.now(),
|
|
960
|
+
changes: data.changes
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
```
|
|
964
|
+
|
|
965
|
+
**Advanced Verification (Optional):**
|
|
966
|
+
```typescript
|
|
967
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
968
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
969
|
+
task: 'contract-validation',
|
|
970
|
+
context: {
|
|
971
|
+
requiredVars: ['NODE_ENV', 'API_VERSION'],
|
|
972
|
+
minMemoryMB: 512,
|
|
973
|
+
requiredKeys: ['aqe/api-schemas/baseline']
|
|
974
|
+
}
|
|
975
|
+
});
|
|
976
|
+
```
|
|
977
|
+
|
|
938
978
|
## Memory Keys
|
|
939
979
|
|
|
940
980
|
### Input Keys
|
|
@@ -13,17 +13,8 @@ capabilities:
|
|
|
13
13
|
- hypothesis-testing
|
|
14
14
|
- rollback-automation
|
|
15
15
|
- observability-integration
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Chaos Engineer: Initializing chaos experiment'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/chaos/experiments/queue'"
|
|
20
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/chaos/safety/constraints'"
|
|
21
|
-
post_task:
|
|
22
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/chaos/experiments/results' --value '${EXPERIMENT_RESULTS}'"
|
|
24
|
-
- "npx claude-flow@alpha memory store --key 'aqe/chaos/metrics/resilience' --value '${RESILIENCE_METRICS}'"
|
|
25
|
-
post_edit:
|
|
26
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/chaos/config/${FILE_NAME}'"
|
|
16
|
+
coordination:
|
|
17
|
+
protocol: aqe-hooks
|
|
27
18
|
metadata:
|
|
28
19
|
version: "2.0.0"
|
|
29
20
|
frameworks: ["chaos-mesh", "gremlin", "litmus", "toxiproxy"]
|
|
@@ -176,21 +167,32 @@ const insights = generateResilience Insights({
|
|
|
176
167
|
## Integration Points
|
|
177
168
|
|
|
178
169
|
### Memory Coordination
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
```typescript
|
|
171
|
+
// Store experiment configuration
|
|
172
|
+
await this.memoryStore.store(`aqe/chaos/experiments/${experimentId}`, experimentConfig, {
|
|
173
|
+
partition: 'coordination',
|
|
174
|
+
ttl: 86400 // 24 hours
|
|
175
|
+
});
|
|
182
176
|
|
|
183
|
-
|
|
184
|
-
|
|
177
|
+
// Store safety constraints
|
|
178
|
+
await this.memoryStore.store('aqe/chaos/safety/constraints', safetyRules, {
|
|
179
|
+
partition: 'coordination'
|
|
180
|
+
});
|
|
185
181
|
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
// Store experiment results
|
|
183
|
+
await this.memoryStore.store(`aqe/chaos/results/${experimentId}`, results, {
|
|
184
|
+
partition: 'coordination'
|
|
185
|
+
});
|
|
188
186
|
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
// Store resilience metrics
|
|
188
|
+
await this.memoryStore.store('aqe/chaos/metrics/resilience', resilienceMetrics, {
|
|
189
|
+
partition: 'coordination'
|
|
190
|
+
});
|
|
191
191
|
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
// Store rollback history
|
|
193
|
+
await this.memoryStore.store(`aqe/chaos/rollbacks/${experimentId}`, rollbackData, {
|
|
194
|
+
partition: 'coordination'
|
|
195
|
+
});
|
|
194
196
|
```
|
|
195
197
|
|
|
196
198
|
### EventBus Integration
|
|
@@ -225,6 +227,52 @@ eventBus.publish('chaos:steady-state-violated', {
|
|
|
225
227
|
- **QE Coverage Analyzer**: Measures chaos experiment coverage
|
|
226
228
|
- **Fleet Commander**: Reports chaos experiment impact on fleet health
|
|
227
229
|
|
|
230
|
+
## Coordination Protocol
|
|
231
|
+
|
|
232
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
233
|
+
|
|
234
|
+
**Automatic Lifecycle Hooks:**
|
|
235
|
+
```typescript
|
|
236
|
+
// Automatically called by BaseAgent
|
|
237
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
238
|
+
// Load experiment queue and safety constraints
|
|
239
|
+
const experiments = await this.memoryStore.retrieve('aqe/chaos/experiments/queue');
|
|
240
|
+
const safetyRules = await this.memoryStore.retrieve('aqe/chaos/safety/constraints');
|
|
241
|
+
const systemHealth = await this.memoryStore.retrieve('aqe/system/health');
|
|
242
|
+
|
|
243
|
+
this.logger.info('Chaos experiment initialized', {
|
|
244
|
+
pendingExperiments: experiments?.length || 0,
|
|
245
|
+
systemHealthy: systemHealth?.healthy || false
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
250
|
+
// Store experiment results and resilience metrics
|
|
251
|
+
await this.memoryStore.store('aqe/chaos/experiments/results', data.result.experimentOutcomes);
|
|
252
|
+
await this.memoryStore.store('aqe/chaos/metrics/resilience', data.result.resilienceMetrics);
|
|
253
|
+
|
|
254
|
+
// Emit chaos completion event
|
|
255
|
+
this.eventBus.emit('chaos:experiment-completed', {
|
|
256
|
+
experimentId: data.assignment.id,
|
|
257
|
+
passed: data.result.steadyStateValidated,
|
|
258
|
+
rollbackTriggered: data.result.rollbackTriggered
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
**Advanced Verification (Optional):**
|
|
264
|
+
```typescript
|
|
265
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
266
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
267
|
+
task: 'chaos-experiment',
|
|
268
|
+
context: {
|
|
269
|
+
requiredVars: ['CHAOS_ENABLED', 'BLAST_RADIUS_MAX'],
|
|
270
|
+
minMemoryMB: 1024,
|
|
271
|
+
requiredKeys: ['aqe/chaos/safety/constraints', 'aqe/system/health']
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
```
|
|
275
|
+
|
|
228
276
|
## Memory Keys
|
|
229
277
|
|
|
230
278
|
### Input Keys
|
|
@@ -250,30 +298,34 @@ eventBus.publish('chaos:steady-state-violated', {
|
|
|
250
298
|
## Coordination Protocol
|
|
251
299
|
|
|
252
300
|
### Swarm Integration
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
301
|
+
```typescript
|
|
302
|
+
// Initialize chaos engineering workflow via task manager
|
|
303
|
+
await this.taskManager.orchestrate({
|
|
304
|
+
task: 'Execute chaos experiment: database failure',
|
|
305
|
+
agents: ['qe-chaos-engineer', 'qe-performance-tester', 'qe-test-executor'],
|
|
306
|
+
strategy: 'sequential-with-monitoring'
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
// Coordinate with monitoring agents via EventBus
|
|
310
|
+
this.eventBus.emit('chaos:spawn-monitor', {
|
|
311
|
+
agentType: 'monitoring-agent',
|
|
312
|
+
capabilities: ['metrics-collection', 'alerting']
|
|
313
|
+
});
|
|
264
314
|
```
|
|
265
315
|
|
|
266
316
|
### Neural Pattern Training
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
317
|
+
```typescript
|
|
318
|
+
// Train chaos patterns from experiment results via neural manager
|
|
319
|
+
await this.neuralManager.trainPattern({
|
|
320
|
+
patternType: 'chaos-resilience',
|
|
321
|
+
trainingData: experimentOutcomes
|
|
322
|
+
});
|
|
323
|
+
|
|
324
|
+
// Predict failure modes
|
|
325
|
+
const prediction = await this.neuralManager.predict({
|
|
326
|
+
modelId: 'failure-prediction-model',
|
|
327
|
+
input: systemArchitecture
|
|
328
|
+
});
|
|
277
329
|
```
|
|
278
330
|
|
|
279
331
|
## Fault Injection Techniques
|
|
@@ -11,15 +11,8 @@ capabilities:
|
|
|
11
11
|
- multi-framework-support
|
|
12
12
|
- sublinear-optimization
|
|
13
13
|
- temporal-prediction
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Starting coverage analysis'"
|
|
17
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/coverage/gaps'"
|
|
18
|
-
post_task:
|
|
19
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
20
|
-
- "npx claude-flow@alpha memory store --key 'aqe/coverage/results' --value '${COVERAGE_RESULTS}'"
|
|
21
|
-
post_edit:
|
|
22
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/coverage/${FILE_NAME}'"
|
|
14
|
+
coordination:
|
|
15
|
+
protocol: aqe-hooks
|
|
23
16
|
metadata:
|
|
24
17
|
version: "2.0.0"
|
|
25
18
|
optimization: "O(log n)"
|
|
@@ -52,39 +45,64 @@ Specialized agent for intelligent test coverage analysis and optimization using
|
|
|
52
45
|
## Analysis Workflow
|
|
53
46
|
|
|
54
47
|
### Phase 1: Pre-Execution Analysis
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
48
|
+
```typescript
|
|
49
|
+
// Coverage matrix initialization
|
|
50
|
+
await this.memoryStore.store('aqe/coverage/matrix-init', coverageMatrixSparse, {
|
|
51
|
+
partition: 'coordination'
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
// Gap prediction using sublinear algorithms
|
|
55
|
+
const predictedGaps = await this.sublinearPredictor.predict({
|
|
56
|
+
input: coverageHistory,
|
|
57
|
+
output: 'predicted-gaps'
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
// Critical path identification
|
|
61
|
+
const criticalPaths = await this.coverageAnalyzer.identifyPaths({
|
|
62
|
+
algorithm: 'johnson-lindenstrauss',
|
|
63
|
+
targetDimension: Math.log(n)
|
|
64
|
+
});
|
|
64
65
|
```
|
|
65
66
|
|
|
66
67
|
### Phase 2: Real-time Monitoring
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
68
|
+
```typescript
|
|
69
|
+
// Live coverage tracking
|
|
70
|
+
await this.coverageMonitor.track({
|
|
71
|
+
mode: 'real-time',
|
|
72
|
+
optimization: 'sublinear'
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Gap detection during execution
|
|
76
|
+
const gaps = await this.gapDetector.detect({
|
|
77
|
+
threshold: 0.85,
|
|
78
|
+
algorithm: 'spectral-sparse'
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
// Memory coordination
|
|
82
|
+
await this.memoryStore.store('aqe/coverage/live-gaps', currentGaps, {
|
|
83
|
+
partition: 'coordination'
|
|
84
|
+
});
|
|
76
85
|
```
|
|
77
86
|
|
|
78
87
|
### Phase 3: Post-Execution Optimization
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
+
```typescript
|
|
89
|
+
// Coverage trend analysis
|
|
90
|
+
const trends = await this.trendAnalyzer.analyze({
|
|
91
|
+
history: '30d',
|
|
92
|
+
predictNextRun: true
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Optimization recommendations
|
|
96
|
+
const suggestions = await this.optimizer.suggest({
|
|
97
|
+
algorithm: 'sublinear',
|
|
98
|
+
targetCoverage: 0.95
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
// Report generation
|
|
102
|
+
await this.reportGenerator.generate({
|
|
103
|
+
format: 'enhanced',
|
|
104
|
+
includePredictions: true
|
|
105
|
+
});
|
|
88
106
|
```
|
|
89
107
|
|
|
90
108
|
## Sublinear Algorithm Features
|
|
@@ -110,30 +128,44 @@ coverage-report --format enhanced --include-predictions
|
|
|
110
128
|
## Memory Management
|
|
111
129
|
|
|
112
130
|
### Coverage Data Patterns
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
131
|
+
```typescript
|
|
132
|
+
// Store coverage matrices (sparse format)
|
|
133
|
+
await this.memoryStore.store('aqe/coverage/matrix-sparse', sparseMatrixJson, {
|
|
134
|
+
partition: 'coordination'
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
// Store gap detection results
|
|
138
|
+
await this.memoryStore.store('aqe/coverage/gaps-detected', gapAnalysisJson, {
|
|
139
|
+
partition: 'coordination'
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// Store optimization recommendations
|
|
143
|
+
await this.memoryStore.store('aqe/coverage/optimizations', optimizationSuggestions, {
|
|
144
|
+
partition: 'coordination'
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Store trend analysis
|
|
148
|
+
await this.memoryStore.store('aqe/coverage/trends', trendDataJson, {
|
|
149
|
+
partition: 'coordination'
|
|
150
|
+
});
|
|
125
151
|
```
|
|
126
152
|
|
|
127
153
|
### Cross-Agent Coordination
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
154
|
+
```typescript
|
|
155
|
+
// Share findings with test execution agents
|
|
156
|
+
await this.memoryStore.store('aqe/shared/critical-paths', criticalPathsJson, {
|
|
157
|
+
partition: 'coordination'
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
// Coordinate with performance analyzer via EventBus
|
|
161
|
+
this.eventBus.emit('coverage:hotspots-detected', {
|
|
162
|
+
hotspots: performanceHotspots
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// Update test prioritization
|
|
166
|
+
await this.memoryStore.store('aqe/shared/test-priority', priorityMatrix, {
|
|
167
|
+
partition: 'coordination'
|
|
168
|
+
});
|
|
137
169
|
```
|
|
138
170
|
|
|
139
171
|
## Integration with Test Execution
|
|
@@ -261,6 +293,51 @@ agentic-qe agent optimize --name qe-coverage-analyzer --target 95% --time-budget
|
|
|
261
293
|
agentic-qe agent analyze-multi --name qe-coverage-analyzer --frameworks "jest,pytest,junit"
|
|
262
294
|
```
|
|
263
295
|
|
|
296
|
+
## Coordination Protocol
|
|
297
|
+
|
|
298
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
299
|
+
|
|
300
|
+
**Automatic Lifecycle Hooks:**
|
|
301
|
+
```typescript
|
|
302
|
+
// Automatically called by BaseAgent
|
|
303
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
304
|
+
// Load existing coverage gaps and baseline data
|
|
305
|
+
const gaps = await this.memoryStore.retrieve('aqe/coverage/gaps');
|
|
306
|
+
const trends = await this.memoryStore.retrieve('aqe/coverage/trends');
|
|
307
|
+
|
|
308
|
+
this.logger.info('Coverage analysis initialized', {
|
|
309
|
+
knownGaps: gaps?.length || 0,
|
|
310
|
+
algorithm: 'johnson-lindenstrauss'
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
315
|
+
// Store coverage results and detected gaps
|
|
316
|
+
await this.memoryStore.store('aqe/coverage/results', data.result.coverageData);
|
|
317
|
+
await this.memoryStore.store('aqe/coverage/gaps', data.result.gaps);
|
|
318
|
+
|
|
319
|
+
// Emit coverage analysis completion
|
|
320
|
+
this.eventBus.emit('coverage-analyzer:completed', {
|
|
321
|
+
totalCoverage: data.result.coverageData.overallPercentage,
|
|
322
|
+
gapsDetected: data.result.gaps.length,
|
|
323
|
+
optimizationTime: data.result.executionTime
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Advanced Verification (Optional):**
|
|
329
|
+
```typescript
|
|
330
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
331
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
332
|
+
task: 'coverage-analysis',
|
|
333
|
+
context: {
|
|
334
|
+
requiredVars: ['NODE_ENV'],
|
|
335
|
+
minMemoryMB: 1024,
|
|
336
|
+
algorithm: 'sublinear'
|
|
337
|
+
}
|
|
338
|
+
});
|
|
339
|
+
```
|
|
340
|
+
|
|
264
341
|
## Fleet Integration
|
|
265
342
|
|
|
266
343
|
### EventBus Coordination
|
|
@@ -12,17 +12,8 @@ capabilities:
|
|
|
12
12
|
- stakeholder-reporting
|
|
13
13
|
- deployment-gate-enforcement
|
|
14
14
|
- post-deployment-monitoring
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Assessing deployment readiness'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/quality-signals/*'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/deployment/history'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/deployment/decision' --value '${GO_NO_GO}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/deployment/risk-score' --value '${RISK_SCORE}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/deployment/config-updated'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Engineering", "QA", "DevOps", "Product", "Executive"]
|
|
@@ -578,6 +569,52 @@ const postDeploymentMonitoring = {
|
|
|
578
569
|
- **qe-fleet-commander**: Orchestrates readiness assessment workflow
|
|
579
570
|
- **qe-production-intelligence**: Provides historical deployment insights
|
|
580
571
|
|
|
572
|
+
## Coordination Protocol
|
|
573
|
+
|
|
574
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
575
|
+
|
|
576
|
+
**Automatic Lifecycle Hooks:**
|
|
577
|
+
```typescript
|
|
578
|
+
// Automatically called by BaseAgent
|
|
579
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
580
|
+
// Load all quality signals for deployment assessment
|
|
581
|
+
const qualitySignals = await this.memoryStore.retrievePattern('aqe/quality-signals/*');
|
|
582
|
+
const deploymentHistory = await this.memoryStore.retrieve('aqe/deployment/history');
|
|
583
|
+
|
|
584
|
+
this.logger.info('Deployment readiness assessment started', {
|
|
585
|
+
qualitySignalsCollected: Object.keys(qualitySignals).length,
|
|
586
|
+
historicalDeployments: deploymentHistory?.length || 0
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
591
|
+
// Store deployment decision and risk score
|
|
592
|
+
await this.memoryStore.store('aqe/deployment/decision', data.result.decision);
|
|
593
|
+
await this.memoryStore.store('aqe/deployment/risk-score', data.result.riskScore);
|
|
594
|
+
await this.memoryStore.store('aqe/deployment/confidence', data.result.confidence);
|
|
595
|
+
|
|
596
|
+
// Emit deployment readiness event
|
|
597
|
+
this.eventBus.emit('deployment-readiness:assessed', {
|
|
598
|
+
decision: data.result.decision.status,
|
|
599
|
+
riskLevel: data.result.riskScore.level,
|
|
600
|
+
confidence: data.result.confidence.score
|
|
601
|
+
});
|
|
602
|
+
}
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
**Advanced Verification (Optional):**
|
|
606
|
+
```typescript
|
|
607
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
608
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
609
|
+
task: 'deployment-assessment',
|
|
610
|
+
context: {
|
|
611
|
+
requiredVars: ['DEPLOYMENT_ENV', 'VERSION'],
|
|
612
|
+
minMemoryMB: 512,
|
|
613
|
+
requiredKeys: ['aqe/quality-signals/code-quality', 'aqe/deployment/history']
|
|
614
|
+
}
|
|
615
|
+
});
|
|
616
|
+
```
|
|
617
|
+
|
|
581
618
|
## Memory Keys
|
|
582
619
|
|
|
583
620
|
### Input Keys
|
|
@@ -12,17 +12,8 @@ capabilities:
|
|
|
12
12
|
- trend-tracking
|
|
13
13
|
- reliability-scoring
|
|
14
14
|
- predictive-flakiness
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Hunting flaky tests'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/test-results/history'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/flaky-tests/known'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/flaky-tests/detected' --value '${FLAKY_TESTS}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/test-reliability/scores' --value '${RELIABILITY}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/flaky-tests/test-updated'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Engineering", "QA", "DevOps"]
|
|
@@ -962,6 +953,61 @@ class FlakinessPredictor {
|
|
|
962
953
|
- **qe-fleet-commander**: Orchestrates flaky test hunting
|
|
963
954
|
- **qe-quality-gate**: Blocks builds with too many flaky tests
|
|
964
955
|
|
|
956
|
+
## Coordination Protocol
|
|
957
|
+
|
|
958
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
959
|
+
|
|
960
|
+
**Automatic Lifecycle Hooks:**
|
|
961
|
+
```typescript
|
|
962
|
+
// Automatically called by BaseAgent
|
|
963
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
964
|
+
// Load test history and known flaky tests
|
|
965
|
+
const testHistory = await this.memoryStore.retrieve('aqe/test-results/history');
|
|
966
|
+
const knownFlaky = await this.memoryStore.retrieve('aqe/flaky-tests/known');
|
|
967
|
+
|
|
968
|
+
this.logger.info('Flaky test detection started', {
|
|
969
|
+
historicalRuns: testHistory?.length || 0,
|
|
970
|
+
knownFlakyTests: knownFlaky?.length || 0
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
975
|
+
// Store detected flaky tests and reliability scores
|
|
976
|
+
await this.memoryStore.store('aqe/flaky-tests/detected', data.result.flakyTests);
|
|
977
|
+
await this.memoryStore.store('aqe/test-reliability/scores', data.result.reliabilityScores);
|
|
978
|
+
|
|
979
|
+
// Emit flaky test detection event
|
|
980
|
+
this.eventBus.emit('flaky-hunter:completed', {
|
|
981
|
+
newFlakyTests: data.result.flakyTests.length,
|
|
982
|
+
quarantined: data.result.quarantined.length,
|
|
983
|
+
avgReliability: data.result.reliabilityScores.average
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
protected async onPostEdit(data: { filePath: string; changes: any }): Promise<void> {
|
|
988
|
+
// Track test file updates
|
|
989
|
+
if (data.filePath.includes('test')) {
|
|
990
|
+
await this.memoryStore.store(`aqe/flaky-tests/test-updated/${data.filePath}`, {
|
|
991
|
+
timestamp: Date.now(),
|
|
992
|
+
stabilizationAttempt: true
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
```
|
|
997
|
+
|
|
998
|
+
**Advanced Verification (Optional):**
|
|
999
|
+
```typescript
|
|
1000
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
1001
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
1002
|
+
task: 'flaky-detection',
|
|
1003
|
+
context: {
|
|
1004
|
+
requiredVars: ['NODE_ENV', 'TEST_FRAMEWORK'],
|
|
1005
|
+
minMemoryMB: 512,
|
|
1006
|
+
minHistoricalRuns: 10
|
|
1007
|
+
}
|
|
1008
|
+
});
|
|
1009
|
+
```
|
|
1010
|
+
|
|
965
1011
|
## Memory Keys
|
|
966
1012
|
|
|
967
1013
|
### Input Keys
|