agentic-qe 1.0.1 → 1.0.2
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 +137 -0
- package/README.md +33 -2
- package/dist/agents/BaseAgent.d.ts +22 -3
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +108 -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 +35 -58
- 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 +194 -64
- 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.js +17 -7
- package/dist/core/hooks/RollbackManager.js.map +1 -1
- package/dist/core/hooks/VerificationHookManager.d.ts +0 -1
- package/dist/core/hooks/VerificationHookManager.d.ts.map +1 -1
- package/dist/core/hooks/checkers/ConfigurationChecker.d.ts.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 +40 -4
- package/dist/mcp/services/HookExecutor.d.ts.map +1 -1
- package/dist/mcp/services/HookExecutor.js +43 -7
- 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/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
|
- historical-pattern-learning
|
|
13
13
|
- blast-radius-calculation
|
|
14
14
|
- ci-optimization
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Analyzing regression risk'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/regression/history'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/code-changes/current'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/regression/risk-score' --value '${RISK_SCORE}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/regression/test-selection' --value '${SELECTED_TESTS}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/regression/file-tracked'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Engineering", "QA", "DevOps"]
|
|
@@ -745,6 +736,57 @@ ci_optimization:
|
|
|
745
736
|
avg_reduction: "96.3%"
|
|
746
737
|
```
|
|
747
738
|
|
|
739
|
+
## Coordination Protocol
|
|
740
|
+
|
|
741
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies, 100-500x faster).
|
|
742
|
+
|
|
743
|
+
**Automatic Lifecycle Hooks:**
|
|
744
|
+
```typescript
|
|
745
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
746
|
+
// Retrieve regression history
|
|
747
|
+
const history = await this.memoryStore.retrieve('aqe/regression/history', {
|
|
748
|
+
partition: 'historical_data'
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
// Retrieve current code changes
|
|
752
|
+
const codeChanges = await this.memoryStore.retrieve('aqe/code-changes/current', {
|
|
753
|
+
partition: 'code_analysis'
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
this.eventBus.emit('regression-analyzer:starting', {
|
|
757
|
+
agentId: this.agentId,
|
|
758
|
+
changesDetected: codeChanges?.files?.length || 0
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
763
|
+
// Store risk score
|
|
764
|
+
await this.memoryStore.store('aqe/regression/risk-score', data.result.riskScore, {
|
|
765
|
+
partition: 'risk_analysis'
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
// Store selected tests
|
|
769
|
+
await this.memoryStore.store('aqe/regression/test-selection', data.result.selectedTests, {
|
|
770
|
+
partition: 'test_selection'
|
|
771
|
+
});
|
|
772
|
+
|
|
773
|
+
this.eventBus.emit('regression-analyzer:completed', {
|
|
774
|
+
agentId: this.agentId,
|
|
775
|
+
riskScore: data.result.riskScore,
|
|
776
|
+
testsSelected: data.result.selectedTests.length
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
**Advanced Verification:**
|
|
782
|
+
```typescript
|
|
783
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
784
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
785
|
+
task: 'regression-risk-analysis',
|
|
786
|
+
context: { requiredVars: ['GIT_COMMIT'], minMemoryMB: 256 }
|
|
787
|
+
});
|
|
788
|
+
```
|
|
789
|
+
|
|
748
790
|
## Integration Points
|
|
749
791
|
|
|
750
792
|
### Upstream Dependencies
|
|
@@ -12,17 +12,8 @@ capabilities:
|
|
|
12
12
|
- traceability-mapping
|
|
13
13
|
- edge-case-identification
|
|
14
14
|
- requirement-completeness-check
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Validating requirements testability'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/requirements/validated'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/project-context'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/requirements/validation-report' --value '${VALIDATION_RESULTS}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/bdd-scenarios/generated' --value '${BDD_SCENARIOS}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/requirements/updated'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Product", "Engineering", "QA", "Business Analysts"]
|
|
@@ -260,6 +251,52 @@ Validates that requirements cover all necessary aspects using the **5 Ws framewo
|
|
|
260
251
|
- **Why**: Business value and user needs articulated?
|
|
261
252
|
- **How**: Technical approach and constraints documented?
|
|
262
253
|
|
|
254
|
+
## Coordination Protocol
|
|
255
|
+
|
|
256
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies).
|
|
257
|
+
|
|
258
|
+
**Automatic Lifecycle Hooks:**
|
|
259
|
+
- `onPreTask()` - Called before task execution
|
|
260
|
+
- `onPostTask()` - Called after task completion
|
|
261
|
+
- `onTaskError()` - Called on task failure
|
|
262
|
+
|
|
263
|
+
**Memory Integration:**
|
|
264
|
+
```typescript
|
|
265
|
+
// Store validation results
|
|
266
|
+
await this.memoryStore.store('aqe/requirements/validation-report', validationResults, {
|
|
267
|
+
partition: 'validation',
|
|
268
|
+
ttl: 86400 // 24 hours
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// Retrieve validated requirements
|
|
272
|
+
const validated = await this.memoryStore.retrieve('aqe/requirements/validated', {
|
|
273
|
+
partition: 'requirements'
|
|
274
|
+
});
|
|
275
|
+
|
|
276
|
+
// Store BDD scenarios
|
|
277
|
+
await this.memoryStore.store('aqe/bdd-scenarios/generated', bddScenarios, {
|
|
278
|
+
partition: 'scenarios'
|
|
279
|
+
});
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Event Bus Integration:**
|
|
283
|
+
```typescript
|
|
284
|
+
// Emit events for coordination
|
|
285
|
+
this.eventBus.emit('requirements-validator:completed', {
|
|
286
|
+
agentId: this.agentId,
|
|
287
|
+
requirementsValidated: count,
|
|
288
|
+
scenariosGenerated: scenarioCount
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
// Listen for fleet events
|
|
292
|
+
this.registerEventHandler({
|
|
293
|
+
eventType: 'requirements:validation-requested',
|
|
294
|
+
handler: async (event) => {
|
|
295
|
+
await this.validateRequirements(event.requirements);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
```
|
|
299
|
+
|
|
263
300
|
## Integration Points
|
|
264
301
|
|
|
265
302
|
### Upstream Dependencies
|
|
@@ -58,15 +58,8 @@ workflows:
|
|
|
58
58
|
- security_testing
|
|
59
59
|
- reporting
|
|
60
60
|
- remediation_tracking
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Starting security scanning'"
|
|
64
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/security/policies'"
|
|
65
|
-
post_task:
|
|
66
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
67
|
-
- "npx claude-flow@alpha memory store --key 'aqe/security/vulnerabilities' --value '${SCAN_RESULTS}'"
|
|
68
|
-
post_edit:
|
|
69
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/security/${FILE_NAME}'"
|
|
61
|
+
coordination:
|
|
62
|
+
protocol: aqe-hooks
|
|
70
63
|
description: "Multi-layer security scanning with SAST/DAST, vulnerability detection, and compliance validation"
|
|
71
64
|
---
|
|
72
65
|
|
|
@@ -100,11 +93,173 @@ description: "Multi-layer security scanning with SAST/DAST, vulnerability detect
|
|
|
100
93
|
## Workflow Orchestration
|
|
101
94
|
|
|
102
95
|
### Pre-Execution Phase
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
|
|
97
|
+
**Native TypeScript Hooks:**
|
|
98
|
+
```typescript
|
|
99
|
+
// Called automatically by BaseAgent
|
|
100
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
101
|
+
// Retrieve security policies from memory
|
|
102
|
+
const policies = await this.memoryStore.retrieve('aqe/security/policies', {
|
|
103
|
+
partition: 'configuration'
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
// Retrieve security requirements
|
|
107
|
+
const requirements = await this.memoryStore.retrieve('aqe/test-plan/security-requirements', {
|
|
108
|
+
partition: 'test_plans'
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Retrieve security baseline for comparison
|
|
112
|
+
const baseline = await this.memoryStore.retrieve('aqe/security/baselines', {
|
|
113
|
+
partition: 'baselines'
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
// Verify environment for security scanning
|
|
117
|
+
const verification = await this.hookManager.executePreTaskVerification({
|
|
118
|
+
task: 'security-scan',
|
|
119
|
+
context: {
|
|
120
|
+
requiredVars: ['TARGET_URL', 'SCAN_TYPE', 'SECURITY_PROFILE'],
|
|
121
|
+
minMemoryMB: 1024,
|
|
122
|
+
requiredModules: ['snyk', 'eslint-plugin-security']
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
// Emit security scanning started event
|
|
127
|
+
this.eventBus.emit('security-scanner:starting', {
|
|
128
|
+
agentId: this.agentId,
|
|
129
|
+
policiesCount: policies?.length || 0,
|
|
130
|
+
scanType: data.assignment.task.metadata.scanType,
|
|
131
|
+
targetUrl: data.assignment.task.metadata.targetUrl
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
this.logger.info('Security scanning starting', {
|
|
135
|
+
policies: policies?.length || 0,
|
|
136
|
+
requirements,
|
|
137
|
+
verification: verification.passed
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
142
|
+
// Store security vulnerabilities in swarm memory
|
|
143
|
+
await this.memoryStore.store('aqe/security/vulnerabilities', data.result.vulnerabilities, {
|
|
144
|
+
partition: 'scan_results',
|
|
145
|
+
ttl: 604800 // 7 days
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
// Store compliance status
|
|
149
|
+
await this.memoryStore.store('aqe/security/compliance', data.result.compliance, {
|
|
150
|
+
partition: 'compliance',
|
|
151
|
+
ttl: 2592000 // 30 days
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// Store security metrics for trend analysis
|
|
155
|
+
await this.memoryStore.store('aqe/security/metrics', {
|
|
156
|
+
timestamp: Date.now(),
|
|
157
|
+
vulnerabilitiesFound: data.result.vulnerabilities.length,
|
|
158
|
+
criticalCount: data.result.vulnerabilities.filter(v => v.severity === 'critical').length,
|
|
159
|
+
highCount: data.result.vulnerabilities.filter(v => v.severity === 'high').length,
|
|
160
|
+
complianceScore: data.result.compliance.score
|
|
161
|
+
}, {
|
|
162
|
+
partition: 'metrics',
|
|
163
|
+
ttl: 604800 // 7 days
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
// Emit completion event with scan results
|
|
167
|
+
this.eventBus.emit('security-scanner:completed', {
|
|
168
|
+
agentId: this.agentId,
|
|
169
|
+
vulnerabilitiesFound: data.result.vulnerabilities.length,
|
|
170
|
+
complianceScore: data.result.compliance.score,
|
|
171
|
+
criticalVulnerabilities: data.result.vulnerabilities.filter(v => v.severity === 'critical').length
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Validate security scan results
|
|
175
|
+
const validation = await this.hookManager.executePostTaskValidation({
|
|
176
|
+
task: 'security-scan',
|
|
177
|
+
result: {
|
|
178
|
+
output: data.result,
|
|
179
|
+
coverage: data.result.coverage,
|
|
180
|
+
metrics: {
|
|
181
|
+
vulnerabilitiesFound: data.result.vulnerabilities.length,
|
|
182
|
+
complianceScore: data.result.compliance.score
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
this.logger.info('Security scanning completed', {
|
|
188
|
+
vulnerabilities: data.result.vulnerabilities.length,
|
|
189
|
+
compliance: data.result.compliance.score,
|
|
190
|
+
validated: validation.passed
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
protected async onTaskError(data: { assignment: TaskAssignment; error: Error }): Promise<void> {
|
|
195
|
+
// Store error for fleet analysis
|
|
196
|
+
await this.memoryStore.store(`aqe/errors/${data.assignment.task.id}`, {
|
|
197
|
+
error: data.error.message,
|
|
198
|
+
timestamp: Date.now(),
|
|
199
|
+
agent: this.agentId,
|
|
200
|
+
taskType: 'security-scan',
|
|
201
|
+
scanType: data.assignment.task.metadata.scanType
|
|
202
|
+
}, {
|
|
203
|
+
partition: 'errors',
|
|
204
|
+
ttl: 604800 // 7 days
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
// Emit error event for fleet coordination
|
|
208
|
+
this.eventBus.emit('security-scanner:error', {
|
|
209
|
+
agentId: this.agentId,
|
|
210
|
+
error: data.error.message,
|
|
211
|
+
taskId: data.assignment.task.id
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
this.logger.error('Security scanning failed', {
|
|
215
|
+
error: data.error.message,
|
|
216
|
+
stack: data.error.stack
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
**Advanced Verification (Optional):**
|
|
222
|
+
```typescript
|
|
223
|
+
// Use VerificationHookManager for comprehensive validation
|
|
224
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
225
|
+
|
|
226
|
+
// Pre-task verification with security tool checks
|
|
227
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
228
|
+
task: 'security-scan',
|
|
229
|
+
context: {
|
|
230
|
+
requiredVars: ['TARGET_URL', 'SCAN_TYPE', 'API_KEY'],
|
|
231
|
+
minMemoryMB: 1024,
|
|
232
|
+
requiredModules: ['snyk', '@snyk/cli', 'eslint-plugin-security', 'semgrep']
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
// Post-task validation with vulnerability threshold checks
|
|
237
|
+
const validation = await hookManager.executePostTaskValidation({
|
|
238
|
+
task: 'security-scan',
|
|
239
|
+
result: {
|
|
240
|
+
output: scanResults,
|
|
241
|
+
coverage: coverageData,
|
|
242
|
+
metrics: {
|
|
243
|
+
criticalVulnerabilities: 0,
|
|
244
|
+
highVulnerabilities: 2,
|
|
245
|
+
complianceScore: 0.95
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
// Pre-edit verification before updating security policies
|
|
251
|
+
const editCheck = await hookManager.executePreEditVerification({
|
|
252
|
+
filePath: 'config/security-policies.json',
|
|
253
|
+
operation: 'write',
|
|
254
|
+
content: JSON.stringify(newPolicies)
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// Session finalization with security audit export
|
|
258
|
+
const finalization = await hookManager.executeSessionEndFinalization({
|
|
259
|
+
sessionId: 'security-scan-v2.0.0',
|
|
260
|
+
exportMetrics: true,
|
|
261
|
+
exportArtifacts: true
|
|
262
|
+
});
|
|
108
263
|
```
|
|
109
264
|
|
|
110
265
|
### Security Assessment Planning
|
|
@@ -167,13 +322,16 @@ nuclei -u https://app.example.com -t vulnerabilities/ -json -o nuclei-results.js
|
|
|
167
322
|
- CIS Controls validation
|
|
168
323
|
|
|
169
324
|
### Post-Execution Coordination
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
325
|
+
|
|
326
|
+
**Native TypeScript Hooks (replaces bash commands):**
|
|
327
|
+
|
|
328
|
+
All post-execution coordination is handled automatically via the `onPostTask()` lifecycle hook shown above. The agent coordinates through:
|
|
329
|
+
|
|
330
|
+
- **Memory Store**: Results stored via `this.memoryStore.store()` with proper partitioning
|
|
331
|
+
- **Event Bus**: Real-time updates via `this.eventBus.emit()` for fleet coordination
|
|
332
|
+
- **Hook Manager**: Advanced validation via `VerificationHookManager`
|
|
333
|
+
|
|
334
|
+
No external bash commands needed - all coordination is built into the agent's lifecycle hooks with 100-500x faster performance.
|
|
177
335
|
|
|
178
336
|
## Tool Integration
|
|
179
337
|
|
|
@@ -288,38 +446,63 @@ class TestWebSecurity:
|
|
|
288
446
|
## Memory Management
|
|
289
447
|
|
|
290
448
|
### Security Baseline Storage
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
449
|
+
|
|
450
|
+
**Native TypeScript memory management:**
|
|
451
|
+
|
|
452
|
+
```typescript
|
|
453
|
+
// Store security baseline metrics
|
|
454
|
+
await this.memoryStore.store('aqe/security/baselines', {
|
|
455
|
+
vulnerability_count: {
|
|
456
|
+
critical: 0,
|
|
457
|
+
high: 2,
|
|
458
|
+
medium: 5,
|
|
459
|
+
low: 10
|
|
299
460
|
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
461
|
+
security_score: 85,
|
|
462
|
+
compliance_percentage: 95,
|
|
463
|
+
last_scan_date: new Date().toISOString()
|
|
464
|
+
}, {
|
|
465
|
+
partition: 'baselines',
|
|
466
|
+
ttl: 2592000 // 30 days
|
|
467
|
+
});
|
|
468
|
+
|
|
469
|
+
// Emit baseline update event
|
|
470
|
+
this.eventBus.emit('security:baseline-updated', {
|
|
471
|
+
agentId: this.agentId,
|
|
472
|
+
securityScore: 85,
|
|
473
|
+
compliancePercentage: 95
|
|
474
|
+
});
|
|
304
475
|
```
|
|
305
476
|
|
|
306
477
|
### Policy Configuration
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
478
|
+
|
|
479
|
+
**Native TypeScript policy management:**
|
|
480
|
+
|
|
481
|
+
```typescript
|
|
482
|
+
// Configure security policies
|
|
483
|
+
await this.memoryStore.store('aqe/security/policies', {
|
|
484
|
+
vulnerability_thresholds: {
|
|
485
|
+
critical: 0,
|
|
486
|
+
high: 5,
|
|
487
|
+
medium: 20
|
|
314
488
|
},
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
489
|
+
compliance_requirements: [
|
|
490
|
+
'OWASP_Top_10',
|
|
491
|
+
'PCI_DSS',
|
|
492
|
+
'SOC_2'
|
|
319
493
|
],
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
}
|
|
494
|
+
scan_frequency: 'daily',
|
|
495
|
+
auto_remediation: true
|
|
496
|
+
}, {
|
|
497
|
+
partition: 'configuration',
|
|
498
|
+
ttl: 0 // Never expire
|
|
499
|
+
});
|
|
500
|
+
|
|
501
|
+
// Emit policy update event
|
|
502
|
+
this.eventBus.emit('security:policy-updated', {
|
|
503
|
+
agentId: this.agentId,
|
|
504
|
+
policiesUpdated: true
|
|
505
|
+
});
|
|
323
506
|
```
|
|
324
507
|
|
|
325
508
|
## Agent Coordination
|
|
@@ -12,17 +12,8 @@ capabilities:
|
|
|
12
12
|
- realistic-data-synthesis
|
|
13
13
|
- constraint-validation
|
|
14
14
|
- data-versioning
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Architecting test data'"
|
|
18
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/schemas/*'"
|
|
19
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/test-data/templates'"
|
|
20
|
-
post_task:
|
|
21
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
22
|
-
- "npx claude-flow@alpha memory store --key 'aqe/test-data/generated' --value '${DATA}'"
|
|
23
|
-
- "npx claude-flow@alpha memory store --key 'aqe/test-data/patterns' --value '${PATTERNS}'"
|
|
24
|
-
post_edit:
|
|
25
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/test-data/schema-updated'"
|
|
15
|
+
coordination:
|
|
16
|
+
protocol: aqe-hooks
|
|
26
17
|
metadata:
|
|
27
18
|
version: "1.0.0"
|
|
28
19
|
stakeholders: ["Engineering", "QA", "Data Engineering"]
|
|
@@ -838,6 +829,53 @@ class TestDataVersionManager {
|
|
|
838
829
|
}
|
|
839
830
|
```
|
|
840
831
|
|
|
832
|
+
## Coordination Protocol
|
|
833
|
+
|
|
834
|
+
This agent uses **AQE hooks (Agentic QE native hooks)** for coordination (zero external dependencies).
|
|
835
|
+
|
|
836
|
+
**Automatic Lifecycle Hooks:**
|
|
837
|
+
- `onPreTask()` - Called before task execution
|
|
838
|
+
- `onPostTask()` - Called after task completion
|
|
839
|
+
- `onTaskError()` - Called on task failure
|
|
840
|
+
|
|
841
|
+
**Memory Integration:**
|
|
842
|
+
```typescript
|
|
843
|
+
// Store generated test data
|
|
844
|
+
await this.memoryStore.store('aqe/test-data/generated', generatedData, {
|
|
845
|
+
partition: 'test_data',
|
|
846
|
+
ttl: 86400 // 24 hours
|
|
847
|
+
});
|
|
848
|
+
|
|
849
|
+
// Retrieve schemas
|
|
850
|
+
const schemas = await this.memoryStore.retrieve('aqe/schemas/*', {
|
|
851
|
+
partition: 'schemas',
|
|
852
|
+
pattern: true
|
|
853
|
+
});
|
|
854
|
+
|
|
855
|
+
// Store data patterns
|
|
856
|
+
await this.memoryStore.store('aqe/test-data/patterns', patterns, {
|
|
857
|
+
partition: 'patterns'
|
|
858
|
+
});
|
|
859
|
+
```
|
|
860
|
+
|
|
861
|
+
**Event Bus Integration:**
|
|
862
|
+
```typescript
|
|
863
|
+
// Emit events for coordination
|
|
864
|
+
this.eventBus.emit('test-data-architect:completed', {
|
|
865
|
+
agentId: this.agentId,
|
|
866
|
+
recordsGenerated: recordCount,
|
|
867
|
+
schemasCovered: schemaCount
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
// Listen for fleet events
|
|
871
|
+
this.registerEventHandler({
|
|
872
|
+
eventType: 'test-data:generation-requested',
|
|
873
|
+
handler: async (event) => {
|
|
874
|
+
await this.generateTestData(event.schema, event.count);
|
|
875
|
+
}
|
|
876
|
+
});
|
|
877
|
+
```
|
|
878
|
+
|
|
841
879
|
## Integration Points
|
|
842
880
|
|
|
843
881
|
### Upstream Dependencies
|
|
@@ -11,15 +11,8 @@ capabilities:
|
|
|
11
11
|
- real-time-reporting
|
|
12
12
|
- resource-optimization
|
|
13
13
|
- performance-tracking
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- "npx claude-flow@alpha hooks pre-task --description 'Starting test execution'"
|
|
17
|
-
- "npx claude-flow@alpha memory retrieve --key 'aqe/test-suites'"
|
|
18
|
-
post_task:
|
|
19
|
-
- "npx claude-flow@alpha hooks post-task --task-id '${TASK_ID}'"
|
|
20
|
-
- "npx claude-flow@alpha memory store --key 'aqe/test-execution/results' --value '${TEST_RESULTS}'"
|
|
21
|
-
post_edit:
|
|
22
|
-
- "npx claude-flow@alpha hooks post-edit --file '${FILE_PATH}' --memory-key 'aqe/tests/${FILE_NAME}'"
|
|
14
|
+
coordination:
|
|
15
|
+
protocol: aqe-hooks
|
|
23
16
|
metadata:
|
|
24
17
|
version: "2.0.0"
|
|
25
18
|
parallel_execution: true
|
|
@@ -46,15 +39,62 @@ The Test Executor Agent orchestrates parallel test execution across multiple fra
|
|
|
46
39
|
## Execution Workflow
|
|
47
40
|
|
|
48
41
|
### 1. Pre-Execution Phase
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
|
|
43
|
+
**Native TypeScript Hooks:**
|
|
44
|
+
```typescript
|
|
45
|
+
// Automatic lifecycle hook
|
|
46
|
+
protected async onPreTask(data: { assignment: TaskAssignment }): Promise<void> {
|
|
47
|
+
await this.validateTestEnvironment();
|
|
48
|
+
await this.prepareTestData();
|
|
49
|
+
await this.allocateWorkerPool();
|
|
50
|
+
|
|
51
|
+
// Store session data
|
|
52
|
+
await this.memoryStore.store('test/session/start', {
|
|
53
|
+
timestamp: Date.now(),
|
|
54
|
+
config: this.config,
|
|
55
|
+
workersAllocated: this.workerPool.size
|
|
56
|
+
}, {
|
|
57
|
+
partition: 'test_sessions',
|
|
58
|
+
ttl: 86400
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// Emit pre-execution event
|
|
62
|
+
this.eventBus.emit('test-executor:starting', {
|
|
63
|
+
agentId: this.agentId,
|
|
64
|
+
testSuites: this.testSuites.length
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
protected async onPostTask(data: { assignment: TaskAssignment; result: any }): Promise<void> {
|
|
69
|
+
// Store test results
|
|
70
|
+
await this.memoryStore.store('test/session/results', data.result, {
|
|
71
|
+
partition: 'test_results',
|
|
72
|
+
ttl: 86400
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// Update metrics
|
|
76
|
+
await this.memoryStore.store('test/metrics/performance', {
|
|
77
|
+
duration: data.result.duration,
|
|
78
|
+
coverage: data.result.coverage,
|
|
79
|
+
testsExecuted: data.result.totalTests
|
|
80
|
+
}, {
|
|
81
|
+
partition: 'metrics'
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
this.eventBus.emit('test-executor:completed', {
|
|
85
|
+
agentId: this.agentId,
|
|
86
|
+
testResults: data.result
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Advanced Verification:**
|
|
92
|
+
```typescript
|
|
93
|
+
const hookManager = new VerificationHookManager(this.memoryStore);
|
|
94
|
+
const verification = await hookManager.executePreTaskVerification({
|
|
95
|
+
task: 'test-execution',
|
|
96
|
+
context: { requiredVars: ['TEST_FRAMEWORK'], minMemoryMB: 2048 }
|
|
97
|
+
});
|
|
58
98
|
```
|
|
59
99
|
|
|
60
100
|
### 2. Parallel Execution Coordination
|
|
@@ -280,43 +320,7 @@ async recoverTestEnvironment() {
|
|
|
280
320
|
|
|
281
321
|
## Integration Hooks
|
|
282
322
|
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
# Validate test environment
|
|
286
|
-
npx claude-flow@alpha hooks validate-environment --framework "${FRAMEWORK}"
|
|
287
|
-
|
|
288
|
-
# Prepare test data
|
|
289
|
-
npx claude-flow@alpha hooks prepare-test-data --suite "${TEST_SUITE}"
|
|
290
|
-
|
|
291
|
-
# Allocate resources
|
|
292
|
-
npx claude-flow@alpha hooks allocate-resources --workers "${WORKER_COUNT}"
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
### Post-Execution Hooks
|
|
296
|
-
```bash
|
|
297
|
-
# Report test results
|
|
298
|
-
npx claude-flow@alpha hooks report-results --format json --output results.json
|
|
299
|
-
|
|
300
|
-
# Update test metrics
|
|
301
|
-
npx claude-flow@alpha hooks update-metrics --duration "${DURATION}" --coverage "${COVERAGE}"
|
|
302
|
-
|
|
303
|
-
# Cleanup resources
|
|
304
|
-
npx claude-flow@alpha hooks cleanup-resources --preserve-artifacts true
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
## Memory Coordination
|
|
308
|
-
|
|
309
|
-
### Test State Management
|
|
310
|
-
```bash
|
|
311
|
-
# Store test session data
|
|
312
|
-
npx claude-flow@alpha memory store --key "test/session/${SESSION_ID}" --value "{config, workers, progress}"
|
|
313
|
-
|
|
314
|
-
# Retrieve previous test results
|
|
315
|
-
npx claude-flow@alpha memory retrieve --key "test/results/latest"
|
|
316
|
-
|
|
317
|
-
# Update execution metrics
|
|
318
|
-
npx claude-flow@alpha memory store --key "test/metrics/performance" --value "${PERFORMANCE_DATA}"
|
|
319
|
-
```
|
|
323
|
+
All integration hooks are now handled via **native TypeScript lifecycle hooks** (shown above in Pre-Execution Phase). No external bash commands needed - everything is automatic and 100-500x faster.
|
|
320
324
|
|
|
321
325
|
## Commands
|
|
322
326
|
|