agentic-qe 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/analysis/code-analyzer.md +209 -0
- package/.claude/agents/analysis/code-review/analyze-code-quality.md +180 -0
- package/.claude/agents/architecture/system-design/arch-system-design.md +156 -0
- package/.claude/agents/base-template-generator.md +42 -0
- package/.claude/agents/consensus/byzantine-coordinator.md +63 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +997 -0
- package/.claude/agents/consensus/gossip-coordinator.md +63 -0
- package/.claude/agents/consensus/performance-benchmarker.md +851 -0
- package/.claude/agents/consensus/quorum-manager.md +823 -0
- package/.claude/agents/consensus/raft-manager.md +63 -0
- package/.claude/agents/consensus/security-manager.md +622 -0
- package/.claude/agents/core/coder.md +266 -0
- package/.claude/agents/core/planner.md +168 -0
- package/.claude/agents/core/researcher.md +190 -0
- package/.claude/agents/core/reviewer.md +326 -0
- package/.claude/agents/core/tester.md +319 -0
- package/.claude/agents/data/ml/data-ml-model.md +193 -0
- package/.claude/agents/development/backend/dev-backend-api.md +142 -0
- package/.claude/agents/devops/ci-cd/ops-cicd-github.md +164 -0
- package/.claude/agents/documentation/api-docs/docs-api-openapi.md +174 -0
- package/.claude/agents/flow-nexus/app-store.md +88 -0
- package/.claude/agents/flow-nexus/authentication.md +69 -0
- package/.claude/agents/flow-nexus/challenges.md +81 -0
- package/.claude/agents/flow-nexus/neural-network.md +88 -0
- package/.claude/agents/flow-nexus/payments.md +83 -0
- package/.claude/agents/flow-nexus/sandbox.md +76 -0
- package/.claude/agents/flow-nexus/swarm.md +76 -0
- package/.claude/agents/flow-nexus/user-tools.md +96 -0
- package/.claude/agents/flow-nexus/workflow.md +84 -0
- package/.claude/agents/github/code-review-swarm.md +538 -0
- package/.claude/agents/github/github-modes.md +173 -0
- package/.claude/agents/github/issue-tracker.md +319 -0
- package/.claude/agents/github/multi-repo-swarm.md +553 -0
- package/.claude/agents/github/pr-manager.md +191 -0
- package/.claude/agents/github/project-board-sync.md +509 -0
- package/.claude/agents/github/release-manager.md +367 -0
- package/.claude/agents/github/release-swarm.md +583 -0
- package/.claude/agents/github/repo-architect.md +398 -0
- package/.claude/agents/github/swarm-issue.md +573 -0
- package/.claude/agents/github/swarm-pr.md +428 -0
- package/.claude/agents/github/sync-coordinator.md +452 -0
- package/.claude/agents/github/workflow-automation.md +635 -0
- package/.claude/agents/goal/code-goal-planner.md +446 -0
- package/.claude/agents/goal/goal-planner.md +168 -0
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +130 -0
- package/.claude/agents/hive-mind/queen-coordinator.md +203 -0
- package/.claude/agents/hive-mind/scout-explorer.md +242 -0
- package/.claude/agents/hive-mind/swarm-memory-manager.md +193 -0
- package/.claude/agents/hive-mind/worker-specialist.md +217 -0
- package/.claude/agents/neural/safla-neural.md +74 -0
- package/.claude/agents/optimization/benchmark-suite.md +665 -0
- package/.claude/agents/optimization/load-balancer.md +431 -0
- package/.claude/agents/optimization/performance-monitor.md +672 -0
- package/.claude/agents/optimization/resource-allocator.md +674 -0
- package/.claude/agents/optimization/topology-optimizer.md +808 -0
- package/.claude/agents/qe-api-contract-validator.md +1088 -0
- package/.claude/agents/qe-chaos-engineer.md +736 -0
- package/.claude/agents/qe-coverage-analyzer.md +282 -0
- package/.claude/agents/qe-deployment-readiness.md +1109 -0
- package/.claude/agents/qe-flaky-test-hunter.md +1121 -0
- package/.claude/agents/qe-fleet-commander.md +641 -0
- package/.claude/agents/qe-performance-tester.md +354 -0
- package/.claude/agents/qe-production-intelligence.md +1162 -0
- package/.claude/agents/qe-quality-gate.md +294 -0
- package/.claude/agents/qe-regression-risk-analyzer.md +947 -0
- package/.claude/agents/qe-requirements-validator.md +691 -0
- package/.claude/agents/qe-security-scanner.md +430 -0
- package/.claude/agents/qe-test-data-architect.md +1007 -0
- package/.claude/agents/qe-test-executor.md +365 -0
- package/.claude/agents/qe-test-generator.md +332 -0
- package/.claude/agents/qe-visual-tester.md +754 -0
- package/.claude/agents/sparc/architecture.md +472 -0
- package/.claude/agents/sparc/pseudocode.md +318 -0
- package/.claude/agents/sparc/refinement.md +525 -0
- package/.claude/agents/sparc/specification.md +276 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +226 -0
- package/.claude/agents/swarm/adaptive-coordinator.md +396 -0
- package/.claude/agents/swarm/hierarchical-coordinator.md +327 -0
- package/.claude/agents/swarm/mesh-coordinator.md +392 -0
- package/.claude/agents/templates/automation-smart-agent.md +205 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +105 -0
- package/.claude/agents/templates/github-pr-manager.md +177 -0
- package/.claude/agents/templates/implementer-sparc-coder.md +259 -0
- package/.claude/agents/templates/memory-coordinator.md +187 -0
- package/.claude/agents/templates/migration-plan.md +746 -0
- package/.claude/agents/templates/orchestrator-task.md +139 -0
- package/.claude/agents/templates/performance-analyzer.md +199 -0
- package/.claude/agents/templates/sparc-coordinator.md +183 -0
- package/.claude/agents/testing/unit/tdd-london-swarm.md +244 -0
- package/.claude/agents/testing/validation/production-validator.md +395 -0
- package/.claude/aqe-fleet.json +47 -0
- package/.claude/commands/README.md +106 -0
- package/.claude/commands/agents/README.md +10 -0
- package/.claude/commands/agents/agent-capabilities.md +21 -0
- package/.claude/commands/agents/agent-coordination.md +28 -0
- package/.claude/commands/agents/agent-spawning.md +28 -0
- package/.claude/commands/agents/agent-types.md +26 -0
- package/.claude/commands/analysis/COMMAND_COMPLIANCE_REPORT.md +54 -0
- package/.claude/commands/analysis/README.md +9 -0
- package/.claude/commands/analysis/bottleneck-detect.md +162 -0
- package/.claude/commands/analysis/performance-bottlenecks.md +59 -0
- package/.claude/commands/analysis/performance-report.md +25 -0
- package/.claude/commands/analysis/token-efficiency.md +45 -0
- package/.claude/commands/analysis/token-usage.md +25 -0
- package/.claude/commands/aqe-analyze.md +344 -0
- package/.claude/commands/aqe-benchmark.md +466 -0
- package/.claude/commands/aqe-chaos.md +443 -0
- package/.claude/commands/aqe-execute.md +322 -0
- package/.claude/commands/aqe-fleet-status.md +431 -0
- package/.claude/commands/aqe-generate.md +301 -0
- package/.claude/commands/aqe-optimize.md +361 -0
- package/.claude/commands/aqe-report.md +411 -0
- package/.claude/commands/automation/README.md +9 -0
- package/.claude/commands/automation/auto-agent.md +122 -0
- package/.claude/commands/automation/self-healing.md +106 -0
- package/.claude/commands/automation/session-memory.md +90 -0
- package/.claude/commands/automation/smart-agents.md +73 -0
- package/.claude/commands/automation/smart-spawn.md +25 -0
- package/.claude/commands/automation/workflow-select.md +25 -0
- package/.claude/commands/coordination/README.md +9 -0
- package/.claude/commands/coordination/agent-spawn.md +25 -0
- package/.claude/commands/coordination/init.md +44 -0
- package/.claude/commands/coordination/orchestrate.md +43 -0
- package/.claude/commands/coordination/spawn.md +45 -0
- package/.claude/commands/coordination/swarm-init.md +85 -0
- package/.claude/commands/coordination/task-orchestrate.md +25 -0
- package/.claude/commands/flow-nexus/app-store.md +124 -0
- package/.claude/commands/flow-nexus/challenges.md +120 -0
- package/.claude/commands/flow-nexus/login-registration.md +65 -0
- package/.claude/commands/flow-nexus/neural-network.md +134 -0
- package/.claude/commands/flow-nexus/payments.md +116 -0
- package/.claude/commands/flow-nexus/sandbox.md +83 -0
- package/.claude/commands/flow-nexus/swarm.md +87 -0
- package/.claude/commands/flow-nexus/user-tools.md +152 -0
- package/.claude/commands/flow-nexus/workflow.md +115 -0
- package/.claude/commands/github/README.md +11 -0
- package/.claude/commands/github/code-review-swarm.md +514 -0
- package/.claude/commands/github/code-review.md +25 -0
- package/.claude/commands/github/github-modes.md +147 -0
- package/.claude/commands/github/github-swarm.md +121 -0
- package/.claude/commands/github/issue-tracker.md +292 -0
- package/.claude/commands/github/issue-triage.md +25 -0
- package/.claude/commands/github/multi-repo-swarm.md +519 -0
- package/.claude/commands/github/pr-enhance.md +26 -0
- package/.claude/commands/github/pr-manager.md +170 -0
- package/.claude/commands/github/project-board-sync.md +471 -0
- package/.claude/commands/github/release-manager.md +338 -0
- package/.claude/commands/github/release-swarm.md +544 -0
- package/.claude/commands/github/repo-analyze.md +25 -0
- package/.claude/commands/github/repo-architect.md +367 -0
- package/.claude/commands/github/swarm-issue.md +482 -0
- package/.claude/commands/github/swarm-pr.md +285 -0
- package/.claude/commands/github/sync-coordinator.md +301 -0
- package/.claude/commands/github/workflow-automation.md +442 -0
- package/.claude/commands/hive-mind/README.md +17 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +18 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-metrics.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-resume.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-sessions.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +21 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +8 -0
- package/.claude/commands/hive-mind/hive-mind-wizard.md +8 -0
- package/.claude/commands/hive-mind/hive-mind.md +27 -0
- package/.claude/commands/hooks/README.md +11 -0
- package/.claude/commands/hooks/overview.md +132 -0
- package/.claude/commands/hooks/post-edit.md +117 -0
- package/.claude/commands/hooks/post-task.md +112 -0
- package/.claude/commands/hooks/pre-edit.md +113 -0
- package/.claude/commands/hooks/pre-task.md +111 -0
- package/.claude/commands/hooks/session-end.md +118 -0
- package/.claude/commands/hooks/setup.md +103 -0
- package/.claude/commands/memory/README.md +9 -0
- package/.claude/commands/memory/memory-persist.md +25 -0
- package/.claude/commands/memory/memory-search.md +25 -0
- package/.claude/commands/memory/memory-usage.md +25 -0
- package/.claude/commands/memory/neural.md +47 -0
- package/.claude/commands/memory/usage.md +46 -0
- package/.claude/commands/monitoring/README.md +9 -0
- package/.claude/commands/monitoring/agent-metrics.md +25 -0
- package/.claude/commands/monitoring/agents.md +44 -0
- package/.claude/commands/monitoring/real-time-view.md +25 -0
- package/.claude/commands/monitoring/status.md +46 -0
- package/.claude/commands/monitoring/swarm-monitor.md +25 -0
- package/.claude/commands/optimization/README.md +9 -0
- package/.claude/commands/optimization/auto-topology.md +62 -0
- package/.claude/commands/optimization/cache-manage.md +25 -0
- package/.claude/commands/optimization/parallel-execute.md +25 -0
- package/.claude/commands/optimization/parallel-execution.md +50 -0
- package/.claude/commands/optimization/topology-optimize.md +25 -0
- package/.claude/commands/pair/commands.md +546 -0
- package/.claude/commands/pair/config.md +510 -0
- package/.claude/commands/pair/examples.md +512 -0
- package/.claude/commands/pair/modes.md +348 -0
- package/.claude/commands/pair/session.md +407 -0
- package/.claude/commands/pair/start.md +209 -0
- package/.claude/commands/sparc/analyzer.md +52 -0
- package/.claude/commands/sparc/architect.md +53 -0
- package/.claude/commands/sparc/batch-executor.md +54 -0
- package/.claude/commands/sparc/coder.md +54 -0
- package/.claude/commands/sparc/debugger.md +54 -0
- package/.claude/commands/sparc/designer.md +53 -0
- package/.claude/commands/sparc/documenter.md +54 -0
- package/.claude/commands/sparc/innovator.md +54 -0
- package/.claude/commands/sparc/memory-manager.md +54 -0
- package/.claude/commands/sparc/optimizer.md +54 -0
- package/.claude/commands/sparc/orchestrator.md +132 -0
- package/.claude/commands/sparc/researcher.md +54 -0
- package/.claude/commands/sparc/reviewer.md +54 -0
- package/.claude/commands/sparc/sparc-modes.md +174 -0
- package/.claude/commands/sparc/swarm-coordinator.md +54 -0
- package/.claude/commands/sparc/tdd.md +54 -0
- package/.claude/commands/sparc/tester.md +54 -0
- package/.claude/commands/sparc/workflow-manager.md +54 -0
- package/.claude/commands/stream-chain/pipeline.md +121 -0
- package/.claude/commands/stream-chain/run.md +70 -0
- package/.claude/commands/swarm/README.md +15 -0
- package/.claude/commands/swarm/analysis.md +95 -0
- package/.claude/commands/swarm/development.md +96 -0
- package/.claude/commands/swarm/examples.md +168 -0
- package/.claude/commands/swarm/maintenance.md +102 -0
- package/.claude/commands/swarm/optimization.md +117 -0
- package/.claude/commands/swarm/research.md +136 -0
- package/.claude/commands/swarm/swarm-analysis.md +8 -0
- package/.claude/commands/swarm/swarm-background.md +8 -0
- package/.claude/commands/swarm/swarm-init.md +19 -0
- package/.claude/commands/swarm/swarm-modes.md +8 -0
- package/.claude/commands/swarm/swarm-monitor.md +8 -0
- package/.claude/commands/swarm/swarm-spawn.md +19 -0
- package/.claude/commands/swarm/swarm-status.md +8 -0
- package/.claude/commands/swarm/swarm-strategies.md +8 -0
- package/.claude/commands/swarm/swarm.md +27 -0
- package/.claude/commands/swarm/testing.md +131 -0
- package/.claude/commands/training/README.md +9 -0
- package/.claude/commands/training/model-update.md +25 -0
- package/.claude/commands/training/neural-patterns.md +74 -0
- package/.claude/commands/training/neural-train.md +25 -0
- package/.claude/commands/training/pattern-learn.md +25 -0
- package/.claude/commands/training/specialization.md +63 -0
- package/.claude/commands/truth/start.md +143 -0
- package/.claude/commands/verify/check.md +50 -0
- package/.claude/commands/verify/start.md +128 -0
- package/.claude/commands/workflows/README.md +9 -0
- package/.claude/commands/workflows/development.md +78 -0
- package/.claude/commands/workflows/research.md +63 -0
- package/.claude/commands/workflows/workflow-create.md +25 -0
- package/.claude/commands/workflows/workflow-execute.md +25 -0
- package/.claude/commands/workflows/workflow-export.md +25 -0
- package/.claude/helpers/checkpoint-manager.sh +251 -0
- package/.claude/helpers/github-safe.js +106 -0
- package/.claude/helpers/github-setup.sh +28 -0
- package/.claude/helpers/quick-start.sh +19 -0
- package/.claude/helpers/setup-mcp.sh +18 -0
- package/.claude/helpers/standard-checkpoint-hooks.sh +179 -0
- package/.claude/settings.json +114 -0
- package/.claude/settings.local.json +10 -0
- package/CONTRIBUTING.md +897 -0
- package/LICENSE +21 -0
- package/README.md +632 -0
- package/bin/aqe +959 -0
- package/config/fleet.yaml +50 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts +222 -0
- package/dist/agents/ApiContractValidatorAgent.d.ts.map +1 -0
- package/dist/agents/ApiContractValidatorAgent.js +787 -0
- package/dist/agents/ApiContractValidatorAgent.js.map +1 -0
- package/dist/agents/BaseAgent.d.ts +147 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -0
- package/dist/agents/BaseAgent.js +374 -0
- package/dist/agents/BaseAgent.js.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts +103 -0
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/CoverageAnalyzerAgent.js +466 -0
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts +244 -0
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -0
- package/dist/agents/DeploymentReadinessAgent.js +974 -0
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts +172 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -0
- package/dist/agents/FlakyTestHunterAgent.js +867 -0
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -0
- package/dist/agents/FleetCommanderAgent.d.ts +154 -0
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -0
- package/dist/agents/FleetCommanderAgent.js +924 -0
- package/dist/agents/FleetCommanderAgent.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts +194 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -0
- package/dist/agents/PerformanceTesterAgent.js +972 -0
- package/dist/agents/PerformanceTesterAgent.js.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts +224 -0
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -0
- package/dist/agents/ProductionIntelligenceAgent.js +856 -0
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts +67 -0
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/QualityAnalyzerAgent.js +453 -0
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -0
- package/dist/agents/QualityGateAgent.d.ts +104 -0
- package/dist/agents/QualityGateAgent.d.ts.map +1 -0
- package/dist/agents/QualityGateAgent.js +522 -0
- package/dist/agents/QualityGateAgent.js.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts +274 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js +1076 -0
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts +195 -0
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -0
- package/dist/agents/RequirementsValidatorAgent.js +992 -0
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -0
- package/dist/agents/SecurityScannerAgent.d.ts +126 -0
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -0
- package/dist/agents/SecurityScannerAgent.js +695 -0
- package/dist/agents/SecurityScannerAgent.js.map +1 -0
- package/dist/agents/TestDataArchitectAgent.d.ts +452 -0
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -0
- package/dist/agents/TestDataArchitectAgent.js +1346 -0
- package/dist/agents/TestDataArchitectAgent.js.map +1 -0
- package/dist/agents/TestExecutorAgent.d.ts +101 -0
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -0
- package/dist/agents/TestExecutorAgent.js +730 -0
- package/dist/agents/TestExecutorAgent.js.map +1 -0
- package/dist/agents/TestGeneratorAgent.d.ts +109 -0
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -0
- package/dist/agents/TestGeneratorAgent.js +450 -0
- package/dist/agents/TestGeneratorAgent.js.map +1 -0
- package/dist/agents/index.d.ts +51 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +738 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts +32 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -0
- package/dist/cli/commands/analyze.js +764 -0
- package/dist/cli/commands/analyze.js.map +1 -0
- package/dist/cli/commands/fleet.d.ts +36 -0
- package/dist/cli/commands/fleet.d.ts.map +1 -0
- package/dist/cli/commands/fleet.js +745 -0
- package/dist/cli/commands/fleet.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +24 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +424 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/init.d.ts +17 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +570 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/run.d.ts +25 -0
- package/dist/cli/commands/run.d.ts.map +1 -0
- package/dist/cli/commands/run.js +558 -0
- package/dist/cli/commands/run.js.map +1 -0
- package/dist/cli/index-spec.d.ts +3 -0
- package/dist/cli/index-spec.d.ts.map +1 -0
- package/dist/cli/index-spec.js +154 -0
- package/dist/cli/index-spec.js.map +1 -0
- package/dist/cli/index-working.d.ts +7 -0
- package/dist/cli/index-working.d.ts.map +1 -0
- package/dist/cli/index-working.js +470 -0
- package/dist/cli/index-working.js.map +1 -0
- package/dist/cli/index.d.ts +9 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +174 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/Agent.d.ts +189 -0
- package/dist/core/Agent.d.ts.map +1 -0
- package/dist/core/Agent.js +288 -0
- package/dist/core/Agent.js.map +1 -0
- package/dist/core/EventBus.d.ts +40 -0
- package/dist/core/EventBus.d.ts.map +1 -0
- package/dist/core/EventBus.js +114 -0
- package/dist/core/EventBus.js.map +1 -0
- package/dist/core/FleetManager.d.ts +219 -0
- package/dist/core/FleetManager.d.ts.map +1 -0
- package/dist/core/FleetManager.js +354 -0
- package/dist/core/FleetManager.js.map +1 -0
- package/dist/core/MemoryManager.d.ts +119 -0
- package/dist/core/MemoryManager.d.ts.map +1 -0
- package/dist/core/MemoryManager.js +460 -0
- package/dist/core/MemoryManager.js.map +1 -0
- package/dist/core/Task.d.ts +264 -0
- package/dist/core/Task.d.ts.map +1 -0
- package/dist/core/Task.js +397 -0
- package/dist/core/Task.js.map +1 -0
- package/dist/core/coverage-analyzer.d.ts +50 -0
- package/dist/core/coverage-analyzer.d.ts.map +1 -0
- package/dist/core/coverage-analyzer.js +146 -0
- package/dist/core/coverage-analyzer.js.map +1 -0
- package/dist/core/index.d.ts +14 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +20 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/quality-gate.d.ts +81 -0
- package/dist/core/quality-gate.d.ts.map +1 -0
- package/dist/core/quality-gate.js +254 -0
- package/dist/core/quality-gate.js.map +1 -0
- package/dist/coverage/coverage-collector.d.ts +62 -0
- package/dist/coverage/coverage-collector.d.ts.map +1 -0
- package/dist/coverage/coverage-collector.js +61 -0
- package/dist/coverage/coverage-collector.js.map +1 -0
- package/dist/coverage/coverage-reporter.d.ts +42 -0
- package/dist/coverage/coverage-reporter.d.ts.map +1 -0
- package/dist/coverage/coverage-reporter.js +53 -0
- package/dist/coverage/coverage-reporter.js.map +1 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/handlers/agent-spawn.d.ts +72 -0
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -0
- package/dist/mcp/handlers/agent-spawn.js +255 -0
- package/dist/mcp/handlers/agent-spawn.js.map +1 -0
- package/dist/mcp/handlers/base-handler.d.ts +53 -0
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -0
- package/dist/mcp/handlers/base-handler.js +77 -0
- package/dist/mcp/handlers/base-handler.js.map +1 -0
- package/dist/mcp/handlers/fleet-init.d.ts +55 -0
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-init.js +149 -0
- package/dist/mcp/handlers/fleet-init.js.map +1 -0
- package/dist/mcp/handlers/fleet-status.d.ts +103 -0
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -0
- package/dist/mcp/handlers/fleet-status.js +244 -0
- package/dist/mcp/handlers/fleet-status.js.map +1 -0
- package/dist/mcp/handlers/optimize-tests.d.ts +219 -0
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -0
- package/dist/mcp/handlers/optimize-tests.js +532 -0
- package/dist/mcp/handlers/optimize-tests.js.map +1 -0
- package/dist/mcp/handlers/predict-defects.d.ts +194 -0
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -0
- package/dist/mcp/handlers/predict-defects.js +721 -0
- package/dist/mcp/handlers/predict-defects.js.map +1 -0
- package/dist/mcp/handlers/quality-analyze.d.ts +273 -0
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -0
- package/dist/mcp/handlers/quality-analyze.js +702 -0
- package/dist/mcp/handlers/quality-analyze.js.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts +152 -0
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -0
- package/dist/mcp/handlers/task-orchestrate.js +629 -0
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -0
- package/dist/mcp/handlers/test-execute.d.ts +132 -0
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -0
- package/dist/mcp/handlers/test-execute.js +436 -0
- package/dist/mcp/handlers/test-execute.js.map +1 -0
- package/dist/mcp/handlers/test-generate.d.ts +107 -0
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -0
- package/dist/mcp/handlers/test-generate.js +437 -0
- package/dist/mcp/handlers/test-generate.js.map +1 -0
- package/dist/mcp/server.d.ts +99 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +214 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/services/AgentRegistry.d.ts +191 -0
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -0
- package/dist/mcp/services/AgentRegistry.js +403 -0
- package/dist/mcp/services/AgentRegistry.js.map +1 -0
- package/dist/mcp/services/HookExecutor.d.ts +165 -0
- package/dist/mcp/services/HookExecutor.d.ts.map +1 -0
- package/dist/mcp/services/HookExecutor.js +327 -0
- package/dist/mcp/services/HookExecutor.js.map +1 -0
- package/dist/mcp/start.d.ts +7 -0
- package/dist/mcp/start.d.ts.map +1 -0
- package/dist/mcp/start.js +35 -0
- package/dist/mcp/start.js.map +1 -0
- package/dist/mcp/tools.d.ts +81 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +471 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/optimization/sublinear-solver.d.ts +72 -0
- package/dist/optimization/sublinear-solver.d.ts.map +1 -0
- package/dist/optimization/sublinear-solver.js +263 -0
- package/dist/optimization/sublinear-solver.js.map +1 -0
- package/dist/scripts/verifyComplexity.d.ts +8 -0
- package/dist/scripts/verifyComplexity.d.ts.map +1 -0
- package/dist/scripts/verifyComplexity.js +56 -0
- package/dist/scripts/verifyComplexity.js.map +1 -0
- package/dist/types/api-contract.types.d.ts +273 -0
- package/dist/types/api-contract.types.d.ts.map +1 -0
- package/dist/types/api-contract.types.js +18 -0
- package/dist/types/api-contract.types.js.map +1 -0
- package/dist/types/errors.d.ts +104 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +226 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/events.d.ts +101 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +6 -0
- package/dist/types/events.js.map +1 -0
- package/dist/types/index.d.ts +570 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +131 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/Config.d.ts +128 -0
- package/dist/utils/Config.d.ts.map +1 -0
- package/dist/utils/Config.js +232 -0
- package/dist/utils/Config.js.map +1 -0
- package/dist/utils/Database.d.ts +112 -0
- package/dist/utils/Database.d.ts.map +1 -0
- package/dist/utils/Database.js +352 -0
- package/dist/utils/Database.js.map +1 -0
- package/dist/utils/Logger.d.ts +58 -0
- package/dist/utils/Logger.d.ts.map +1 -0
- package/dist/utils/Logger.js +125 -0
- package/dist/utils/Logger.js.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +14 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts +84 -0
- package/dist/utils/sublinear/coverageOptimizer.d.ts.map +1 -0
- package/dist/utils/sublinear/coverageOptimizer.js +415 -0
- package/dist/utils/sublinear/coverageOptimizer.js.map +1 -0
- package/dist/utils/sublinear/index.d.ts +50 -0
- package/dist/utils/sublinear/index.d.ts.map +1 -0
- package/dist/utils/sublinear/index.js +390 -0
- package/dist/utils/sublinear/index.js.map +1 -0
- package/dist/utils/sublinear/matrixSolver.d.ts +132 -0
- package/dist/utils/sublinear/matrixSolver.d.ts.map +1 -0
- package/dist/utils/sublinear/matrixSolver.js +642 -0
- package/dist/utils/sublinear/matrixSolver.js.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts +195 -0
- package/dist/utils/sublinear/temporalPredictor.d.ts.map +1 -0
- package/dist/utils/sublinear/temporalPredictor.js +474 -0
- package/dist/utils/sublinear/temporalPredictor.js.map +1 -0
- package/dist/utils/sublinear/testSelector.d.ts +81 -0
- package/dist/utils/sublinear/testSelector.d.ts.map +1 -0
- package/dist/utils/sublinear/testSelector.js +303 -0
- package/dist/utils/sublinear/testSelector.js.map +1 -0
- package/package.json +131 -0
|
@@ -0,0 +1,702 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Quality Analysis Handler
|
|
4
|
+
*
|
|
5
|
+
* Handles comprehensive quality analysis and reporting.
|
|
6
|
+
* Generates insights and recommendations for quality improvement.
|
|
7
|
+
*
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
* @author Agentic QE Team
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.QualityAnalyzeHandler = void 0;
|
|
13
|
+
const base_handler_js_1 = require("./base-handler.js");
|
|
14
|
+
class QualityAnalyzeHandler extends base_handler_js_1.BaseHandler {
|
|
15
|
+
constructor(registry, hookExecutor) {
|
|
16
|
+
super();
|
|
17
|
+
this.analysisHistory = new Map();
|
|
18
|
+
this.analyzers = new Map();
|
|
19
|
+
this.registry = registry;
|
|
20
|
+
this.hookExecutor = hookExecutor;
|
|
21
|
+
this.initializeAnalyzers();
|
|
22
|
+
}
|
|
23
|
+
async handle(args) {
|
|
24
|
+
const requestId = this.generateRequestId();
|
|
25
|
+
this.log('info', 'Starting quality analysis', { requestId, params: args.params });
|
|
26
|
+
let agentId;
|
|
27
|
+
try {
|
|
28
|
+
// Validate required parameters
|
|
29
|
+
this.validateRequired(args, ['params']);
|
|
30
|
+
this.validateQualityAnalysisParams(args.params);
|
|
31
|
+
// Spawn or find quality-gate agent
|
|
32
|
+
const spawnResult = await this.registry.spawnAgent('quality-gate', {
|
|
33
|
+
name: 'quality-analyzer',
|
|
34
|
+
description: `Quality analysis for ${args.params.scope}`
|
|
35
|
+
});
|
|
36
|
+
agentId = spawnResult.id;
|
|
37
|
+
this.log('info', 'Quality-gate agent spawned', { agentId });
|
|
38
|
+
// Execute pre-task hook
|
|
39
|
+
await this.hookExecutor.executePreTask({
|
|
40
|
+
description: `Analyzing quality: ${args.params.scope} with metrics: ${args.params.metrics.join(', ')}`,
|
|
41
|
+
agentType: 'quality-gate',
|
|
42
|
+
agentId,
|
|
43
|
+
sessionId: requestId
|
|
44
|
+
});
|
|
45
|
+
// Execute quality analysis through agent
|
|
46
|
+
const { result: qualityReport, executionTime } = await this.measureExecutionTime(async () => {
|
|
47
|
+
const taskResult = await this.registry.executeTask(agentId, {
|
|
48
|
+
taskType: 'analyze-quality',
|
|
49
|
+
input: args.params,
|
|
50
|
+
dataSource: args.dataSource
|
|
51
|
+
});
|
|
52
|
+
// If agent returns a quality report, use it; otherwise, perform analysis locally
|
|
53
|
+
if (taskResult.output && typeof taskResult.output === 'object' && 'id' in taskResult.output) {
|
|
54
|
+
return taskResult.output;
|
|
55
|
+
}
|
|
56
|
+
// Fallback to local analysis if agent doesn't implement quality analysis yet
|
|
57
|
+
this.log('info', 'Agent did not return quality report, performing local analysis');
|
|
58
|
+
return await this.performQualityAnalysis(args.params, args.dataSource);
|
|
59
|
+
});
|
|
60
|
+
this.log('info', `Quality analysis completed in ${executionTime.toFixed(2)}ms`, {
|
|
61
|
+
reportId: qualityReport.id,
|
|
62
|
+
overallScore: qualityReport.score.overall,
|
|
63
|
+
grade: qualityReport.score.grade
|
|
64
|
+
});
|
|
65
|
+
// Execute post-task hook with results
|
|
66
|
+
await this.hookExecutor.executePostTask({
|
|
67
|
+
taskId: agentId,
|
|
68
|
+
agentType: 'quality-gate',
|
|
69
|
+
agentId,
|
|
70
|
+
sessionId: requestId,
|
|
71
|
+
results: {
|
|
72
|
+
reportId: qualityReport.id,
|
|
73
|
+
scope: qualityReport.scope,
|
|
74
|
+
score: qualityReport.score,
|
|
75
|
+
thresholdsPassed: qualityReport.thresholds.passed,
|
|
76
|
+
recommendations: qualityReport.recommendations.length,
|
|
77
|
+
assessments: qualityReport.assessments.length
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
return this.createSuccessResponse(qualityReport, requestId);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
this.log('error', 'Quality analysis failed', { error: error instanceof Error ? error.message : String(error) });
|
|
84
|
+
// Execute error notification hook if agent was spawned
|
|
85
|
+
if (agentId) {
|
|
86
|
+
await this.hookExecutor.notify({
|
|
87
|
+
message: `Quality analysis failed: ${error instanceof Error ? error.message : String(error)}`,
|
|
88
|
+
level: 'error'
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return this.createErrorResponse(error instanceof Error ? error.message : 'Quality analysis failed', requestId);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
initializeAnalyzers() {
|
|
95
|
+
this.analyzers.set('code', {
|
|
96
|
+
metrics: ['complexity', 'coverage', 'duplication', 'debt'],
|
|
97
|
+
tools: ['sonarqube', 'eslint', 'complexity-analysis'],
|
|
98
|
+
thresholds: {
|
|
99
|
+
cyclomaticComplexity: 10,
|
|
100
|
+
coverage: 80,
|
|
101
|
+
duplication: 3
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
this.analyzers.set('tests', {
|
|
105
|
+
metrics: ['reliability', 'effectiveness', 'efficiency', 'coverage'],
|
|
106
|
+
tools: ['mutation-testing', 'flaky-test-detection', 'test-metrics'],
|
|
107
|
+
thresholds: {
|
|
108
|
+
flakyRate: 2,
|
|
109
|
+
mutationScore: 75,
|
|
110
|
+
successRate: 98
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
this.analyzers.set('performance', {
|
|
114
|
+
metrics: ['responseTime', 'throughput', 'resources', 'bottlenecks'],
|
|
115
|
+
tools: ['performance-profiler', 'load-testing', 'apm'],
|
|
116
|
+
thresholds: {
|
|
117
|
+
responseTime: 200,
|
|
118
|
+
throughput: 1000,
|
|
119
|
+
cpuUsage: 80
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
this.analyzers.set('security', {
|
|
123
|
+
metrics: ['vulnerabilities', 'compliance', 'dependencies'],
|
|
124
|
+
tools: ['security-scanner', 'dependency-checker', 'compliance-validator'],
|
|
125
|
+
thresholds: {
|
|
126
|
+
criticalVulns: 0,
|
|
127
|
+
highVulns: 2,
|
|
128
|
+
complianceScore: 85
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
validateQualityAnalysisParams(params) {
|
|
133
|
+
const validScopes = ['code', 'tests', 'performance', 'security', 'all'];
|
|
134
|
+
if (!validScopes.includes(params.scope)) {
|
|
135
|
+
throw new Error(`Invalid scope: ${params.scope}. Must be one of: ${validScopes.join(', ')}`);
|
|
136
|
+
}
|
|
137
|
+
if (!params.metrics || params.metrics.length === 0) {
|
|
138
|
+
throw new Error('At least one metric must be specified');
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
async performQualityAnalysis(params, dataSource) {
|
|
142
|
+
const reportId = `quality-report-${Date.now()}-${Math.random().toString(36).substr(2, 6)}`;
|
|
143
|
+
this.log('info', 'Performing quality analysis', { reportId, scope: params.scope });
|
|
144
|
+
// Collect metrics based on scope
|
|
145
|
+
const metrics = await this.collectMetrics(params, dataSource);
|
|
146
|
+
// Perform assessments
|
|
147
|
+
const assessments = await this.performAssessments(metrics, params);
|
|
148
|
+
// Generate recommendations
|
|
149
|
+
const recommendations = params.generateRecommendations
|
|
150
|
+
? await this.generateRecommendations(assessments, metrics)
|
|
151
|
+
: [];
|
|
152
|
+
// Analyze trends if historical comparison is enabled
|
|
153
|
+
const trends = params.historicalComparison
|
|
154
|
+
? await this.analyzeTrends(reportId, metrics)
|
|
155
|
+
: this.createEmptyTrends();
|
|
156
|
+
// Evaluate thresholds
|
|
157
|
+
const thresholds = await this.evaluateThresholds(metrics, params.thresholds);
|
|
158
|
+
// Calculate composite score
|
|
159
|
+
const score = this.calculateCompositeScore(assessments, thresholds);
|
|
160
|
+
const qualityReport = {
|
|
161
|
+
id: reportId,
|
|
162
|
+
scope: params.scope,
|
|
163
|
+
analysisType: 'comprehensive',
|
|
164
|
+
generatedAt: new Date().toISOString(),
|
|
165
|
+
metrics,
|
|
166
|
+
assessments,
|
|
167
|
+
recommendations,
|
|
168
|
+
trends,
|
|
169
|
+
thresholds,
|
|
170
|
+
score
|
|
171
|
+
};
|
|
172
|
+
// Store report
|
|
173
|
+
this.analysisHistory.set(reportId, qualityReport);
|
|
174
|
+
return qualityReport;
|
|
175
|
+
}
|
|
176
|
+
async collectMetrics(params, dataSource) {
|
|
177
|
+
const metrics = {
|
|
178
|
+
code: await this.collectCodeMetrics(params, dataSource),
|
|
179
|
+
test: await this.collectTestMetrics(params, dataSource),
|
|
180
|
+
performance: await this.collectPerformanceMetrics(params, dataSource),
|
|
181
|
+
security: await this.collectSecurityMetrics(params, dataSource),
|
|
182
|
+
maintainability: await this.collectMaintainabilityMetrics(params, dataSource)
|
|
183
|
+
};
|
|
184
|
+
return metrics;
|
|
185
|
+
}
|
|
186
|
+
async collectCodeMetrics(params, dataSource) {
|
|
187
|
+
// Simulate code quality metrics collection
|
|
188
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
189
|
+
return {
|
|
190
|
+
complexity: {
|
|
191
|
+
cyclomatic: Math.random() * 15 + 5, // 5-20
|
|
192
|
+
cognitive: Math.random() * 20 + 10, // 10-30
|
|
193
|
+
maintainabilityIndex: Math.random() * 40 + 60 // 60-100
|
|
194
|
+
},
|
|
195
|
+
coverage: {
|
|
196
|
+
line: Math.random() * 20 + 75, // 75-95%
|
|
197
|
+
branch: Math.random() * 25 + 70, // 70-95%
|
|
198
|
+
function: Math.random() * 15 + 80, // 80-95%
|
|
199
|
+
statement: Math.random() * 20 + 75 // 75-95%
|
|
200
|
+
},
|
|
201
|
+
duplication: {
|
|
202
|
+
percentage: Math.random() * 8 + 2, // 2-10%
|
|
203
|
+
lines: Math.floor(Math.random() * 500 + 50), // 50-550
|
|
204
|
+
blocks: Math.floor(Math.random() * 20 + 5) // 5-25
|
|
205
|
+
},
|
|
206
|
+
technicalDebt: {
|
|
207
|
+
ratio: Math.random() * 0.3 + 0.1, // 10-40%
|
|
208
|
+
estimatedHours: Math.random() * 100 + 20, // 20-120 hours
|
|
209
|
+
issues: this.generateTechnicalDebtIssues()
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
async collectTestMetrics(params, dataSource) {
|
|
214
|
+
// Simulate test quality metrics collection
|
|
215
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
216
|
+
return {
|
|
217
|
+
reliability: {
|
|
218
|
+
flakyTests: Math.floor(Math.random() * 5), // 0-5
|
|
219
|
+
successRate: Math.random() * 5 + 95, // 95-100%
|
|
220
|
+
averageRetries: Math.random() * 0.5 + 0.1 // 0.1-0.6
|
|
221
|
+
},
|
|
222
|
+
effectiveness: {
|
|
223
|
+
mutationScore: Math.random() * 25 + 70, // 70-95%
|
|
224
|
+
defectDetectionRate: Math.random() * 20 + 75, // 75-95%
|
|
225
|
+
falsePositiveRate: Math.random() * 5 + 1 // 1-6%
|
|
226
|
+
},
|
|
227
|
+
efficiency: {
|
|
228
|
+
executionTime: Math.random() * 300 + 60, // 60-360 seconds
|
|
229
|
+
parallelization: Math.random() * 0.3 + 0.6, // 60-90%
|
|
230
|
+
resourceUsage: Math.random() * 30 + 40 // 40-70%
|
|
231
|
+
},
|
|
232
|
+
coverage: {
|
|
233
|
+
achieved: Math.random() * 20 + 75, // 75-95%
|
|
234
|
+
target: 80,
|
|
235
|
+
gaps: this.generateCoverageGaps()
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
async collectPerformanceMetrics(params, dataSource) {
|
|
240
|
+
// Simulate performance metrics collection
|
|
241
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
242
|
+
return {
|
|
243
|
+
responseTime: {
|
|
244
|
+
average: Math.random() * 200 + 50, // 50-250ms
|
|
245
|
+
p95: Math.random() * 500 + 100, // 100-600ms
|
|
246
|
+
p99: Math.random() * 1000 + 200 // 200-1200ms
|
|
247
|
+
},
|
|
248
|
+
throughput: {
|
|
249
|
+
requestsPerSecond: Math.random() * 2000 + 500, // 500-2500 RPS
|
|
250
|
+
concurrent: Math.random() * 100 + 50 // 50-150 concurrent
|
|
251
|
+
},
|
|
252
|
+
resources: {
|
|
253
|
+
cpu: Math.random() * 40 + 30, // 30-70%
|
|
254
|
+
memory: Math.random() * 30 + 50, // 50-80%
|
|
255
|
+
network: Math.random() * 20 + 10 // 10-30%
|
|
256
|
+
},
|
|
257
|
+
bottlenecks: this.generatePerformanceBottlenecks()
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
async collectSecurityMetrics(params, dataSource) {
|
|
261
|
+
// Simulate security metrics collection
|
|
262
|
+
await new Promise(resolve => setTimeout(resolve, 100));
|
|
263
|
+
return {
|
|
264
|
+
vulnerabilities: {
|
|
265
|
+
critical: Math.floor(Math.random() * 2), // 0-1
|
|
266
|
+
high: Math.floor(Math.random() * 5), // 0-4
|
|
267
|
+
medium: Math.floor(Math.random() * 10 + 2), // 2-12
|
|
268
|
+
low: Math.floor(Math.random() * 20 + 5) // 5-25
|
|
269
|
+
},
|
|
270
|
+
compliance: {
|
|
271
|
+
owasp: Math.random() * 20 + 75, // 75-95%
|
|
272
|
+
score: Math.random() * 25 + 70, // 70-95
|
|
273
|
+
issues: this.generateSecurityIssues()
|
|
274
|
+
},
|
|
275
|
+
dependencies: {
|
|
276
|
+
outdated: Math.floor(Math.random() * 10 + 2), // 2-12
|
|
277
|
+
vulnerable: Math.floor(Math.random() * 3), // 0-2
|
|
278
|
+
licenses: this.generateLicenseIssues()
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
async collectMaintainabilityMetrics(params, dataSource) {
|
|
283
|
+
// Simulate maintainability metrics collection
|
|
284
|
+
await new Promise(resolve => setTimeout(resolve, 50));
|
|
285
|
+
return {
|
|
286
|
+
readability: Math.random() * 25 + 70, // 70-95
|
|
287
|
+
documentation: Math.random() * 30 + 60, // 60-90
|
|
288
|
+
testability: Math.random() * 20 + 75, // 75-95
|
|
289
|
+
modularity: Math.random() * 25 + 70, // 70-95
|
|
290
|
+
changeability: Math.random() * 30 + 65 // 65-95
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
async performAssessments(metrics, params) {
|
|
294
|
+
const assessments = [];
|
|
295
|
+
if (params.scope === 'all' || params.scope === 'code') {
|
|
296
|
+
assessments.push(...this.assessCodeQuality(metrics.code));
|
|
297
|
+
}
|
|
298
|
+
if (params.scope === 'all' || params.scope === 'tests') {
|
|
299
|
+
assessments.push(...this.assessTestQuality(metrics.test));
|
|
300
|
+
}
|
|
301
|
+
if (params.scope === 'all' || params.scope === 'performance') {
|
|
302
|
+
assessments.push(...this.assessPerformanceQuality(metrics.performance));
|
|
303
|
+
}
|
|
304
|
+
if (params.scope === 'all' || params.scope === 'security') {
|
|
305
|
+
assessments.push(...this.assessSecurityQuality(metrics.security));
|
|
306
|
+
}
|
|
307
|
+
return assessments;
|
|
308
|
+
}
|
|
309
|
+
assessCodeQuality(metrics) {
|
|
310
|
+
return [
|
|
311
|
+
{
|
|
312
|
+
category: 'code-complexity',
|
|
313
|
+
score: this.normalizeScore(20 - metrics.complexity.cyclomatic, 0, 20) * 100,
|
|
314
|
+
status: metrics.complexity.cyclomatic < 10 ? 'good' : metrics.complexity.cyclomatic < 15 ? 'fair' : 'poor',
|
|
315
|
+
details: `Cyclomatic complexity: ${metrics.complexity.cyclomatic.toFixed(1)}`,
|
|
316
|
+
evidence: ['complexity-analysis', 'static-analysis'],
|
|
317
|
+
impact: metrics.complexity.cyclomatic > 15 ? 'high' : 'medium'
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
category: 'code-coverage',
|
|
321
|
+
score: metrics.coverage.line,
|
|
322
|
+
status: metrics.coverage.line > 85 ? 'excellent' : metrics.coverage.line > 75 ? 'good' : 'fair',
|
|
323
|
+
details: `Line coverage: ${metrics.coverage.line.toFixed(1)}%`,
|
|
324
|
+
evidence: ['coverage-report', 'test-execution'],
|
|
325
|
+
impact: metrics.coverage.line < 70 ? 'high' : 'medium'
|
|
326
|
+
}
|
|
327
|
+
];
|
|
328
|
+
}
|
|
329
|
+
assessTestQuality(metrics) {
|
|
330
|
+
return [
|
|
331
|
+
{
|
|
332
|
+
category: 'test-reliability',
|
|
333
|
+
score: metrics.reliability.successRate,
|
|
334
|
+
status: metrics.reliability.successRate > 98 ? 'excellent' : metrics.reliability.successRate > 95 ? 'good' : 'fair',
|
|
335
|
+
details: `Test success rate: ${metrics.reliability.successRate.toFixed(1)}%, Flaky tests: ${metrics.reliability.flakyTests}`,
|
|
336
|
+
evidence: ['test-execution-history', 'flaky-test-detection'],
|
|
337
|
+
impact: metrics.reliability.successRate < 95 ? 'high' : 'medium'
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
category: 'test-effectiveness',
|
|
341
|
+
score: metrics.effectiveness.mutationScore,
|
|
342
|
+
status: metrics.effectiveness.mutationScore > 80 ? 'excellent' : metrics.effectiveness.mutationScore > 70 ? 'good' : 'fair',
|
|
343
|
+
details: `Mutation score: ${metrics.effectiveness.mutationScore.toFixed(1)}%`,
|
|
344
|
+
evidence: ['mutation-testing', 'defect-analysis'],
|
|
345
|
+
impact: metrics.effectiveness.mutationScore < 70 ? 'high' : 'medium'
|
|
346
|
+
}
|
|
347
|
+
];
|
|
348
|
+
}
|
|
349
|
+
assessPerformanceQuality(metrics) {
|
|
350
|
+
return [
|
|
351
|
+
{
|
|
352
|
+
category: 'response-time',
|
|
353
|
+
score: this.normalizeScore(500 - metrics.responseTime.p95, 0, 500) * 100,
|
|
354
|
+
status: metrics.responseTime.p95 < 200 ? 'excellent' : metrics.responseTime.p95 < 500 ? 'good' : 'fair',
|
|
355
|
+
details: `P95 response time: ${metrics.responseTime.p95.toFixed(0)}ms`,
|
|
356
|
+
evidence: ['performance-testing', 'apm-monitoring'],
|
|
357
|
+
impact: metrics.responseTime.p95 > 500 ? 'high' : 'medium'
|
|
358
|
+
}
|
|
359
|
+
];
|
|
360
|
+
}
|
|
361
|
+
assessSecurityQuality(metrics) {
|
|
362
|
+
return [
|
|
363
|
+
{
|
|
364
|
+
category: 'security-vulnerabilities',
|
|
365
|
+
score: this.calculateSecurityScore(metrics.vulnerabilities),
|
|
366
|
+
status: metrics.vulnerabilities.critical === 0 && metrics.vulnerabilities.high < 2 ? 'good' : 'poor',
|
|
367
|
+
details: `Critical: ${metrics.vulnerabilities.critical}, High: ${metrics.vulnerabilities.high}`,
|
|
368
|
+
evidence: ['security-scanning', 'vulnerability-assessment'],
|
|
369
|
+
impact: metrics.vulnerabilities.critical > 0 ? 'critical' : metrics.vulnerabilities.high > 3 ? 'high' : 'medium'
|
|
370
|
+
}
|
|
371
|
+
];
|
|
372
|
+
}
|
|
373
|
+
async generateRecommendations(assessments, metrics) {
|
|
374
|
+
const recommendations = [];
|
|
375
|
+
// Generate recommendations based on assessments
|
|
376
|
+
for (const assessment of assessments) {
|
|
377
|
+
if (assessment.score < 70 || assessment.status === 'poor' || assessment.status === 'critical') {
|
|
378
|
+
const recommendation = this.createRecommendationForAssessment(assessment);
|
|
379
|
+
recommendations.push(recommendation);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
// Add proactive recommendations
|
|
383
|
+
recommendations.push(...this.generateProactiveRecommendations(metrics));
|
|
384
|
+
return recommendations;
|
|
385
|
+
}
|
|
386
|
+
createRecommendationForAssessment(assessment) {
|
|
387
|
+
const recommendationMap = {
|
|
388
|
+
'code-complexity': {
|
|
389
|
+
title: 'Reduce Code Complexity',
|
|
390
|
+
description: 'Break down complex functions and classes to improve maintainability',
|
|
391
|
+
effort: 'medium',
|
|
392
|
+
impact: 'high',
|
|
393
|
+
actions: [
|
|
394
|
+
{
|
|
395
|
+
type: 'code',
|
|
396
|
+
description: 'Extract methods from complex functions',
|
|
397
|
+
automated: false
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
'code-coverage': {
|
|
402
|
+
title: 'Improve Test Coverage',
|
|
403
|
+
description: 'Add tests for uncovered code paths',
|
|
404
|
+
effort: 'medium',
|
|
405
|
+
impact: 'high',
|
|
406
|
+
actions: [
|
|
407
|
+
{
|
|
408
|
+
type: 'test',
|
|
409
|
+
description: 'Generate tests for uncovered functions',
|
|
410
|
+
automated: true
|
|
411
|
+
}
|
|
412
|
+
]
|
|
413
|
+
},
|
|
414
|
+
'test-reliability': {
|
|
415
|
+
title: 'Fix Flaky Tests',
|
|
416
|
+
description: 'Identify and fix unreliable tests',
|
|
417
|
+
effort: 'high',
|
|
418
|
+
impact: 'high',
|
|
419
|
+
actions: [
|
|
420
|
+
{
|
|
421
|
+
type: 'test',
|
|
422
|
+
description: 'Analyze and fix flaky test patterns',
|
|
423
|
+
automated: false
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
};
|
|
428
|
+
const template = recommendationMap[assessment.category] || {
|
|
429
|
+
title: 'Improve Quality',
|
|
430
|
+
description: 'Address quality issues in this category',
|
|
431
|
+
effort: 'medium',
|
|
432
|
+
impact: 'medium',
|
|
433
|
+
actions: []
|
|
434
|
+
};
|
|
435
|
+
return {
|
|
436
|
+
id: `rec-${Date.now()}-${Math.random().toString(36).substr(2, 4)}`,
|
|
437
|
+
category: assessment.category,
|
|
438
|
+
priority: assessment.impact === 'critical' ? 'critical' : assessment.impact === 'high' ? 'high' : 'medium',
|
|
439
|
+
title: template.title,
|
|
440
|
+
description: template.description,
|
|
441
|
+
effort: template.effort,
|
|
442
|
+
impact: template.impact,
|
|
443
|
+
actions: template.actions,
|
|
444
|
+
estimatedHours: this.estimateHours(template.effort, template.impact)
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
generateProactiveRecommendations(metrics) {
|
|
448
|
+
const recommendations = [];
|
|
449
|
+
// Add proactive recommendations based on trends and best practices
|
|
450
|
+
if (metrics.maintainability.documentation < 80) {
|
|
451
|
+
recommendations.push({
|
|
452
|
+
id: `rec-proactive-${Date.now()}`,
|
|
453
|
+
category: 'documentation',
|
|
454
|
+
priority: 'medium',
|
|
455
|
+
title: 'Improve Documentation',
|
|
456
|
+
description: 'Enhance code documentation to improve maintainability',
|
|
457
|
+
effort: 'low',
|
|
458
|
+
impact: 'medium',
|
|
459
|
+
actions: [
|
|
460
|
+
{
|
|
461
|
+
type: 'code',
|
|
462
|
+
description: 'Add JSDoc comments to functions',
|
|
463
|
+
automated: true
|
|
464
|
+
}
|
|
465
|
+
],
|
|
466
|
+
estimatedHours: 8
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
return recommendations;
|
|
470
|
+
}
|
|
471
|
+
async analyzeTrends(reportId, metrics) {
|
|
472
|
+
// Simulate trend analysis
|
|
473
|
+
return {
|
|
474
|
+
direction: Math.random() > 0.5 ? 'improving' : Math.random() > 0.5 ? 'stable' : 'declining',
|
|
475
|
+
velocity: Math.random() * 10 - 5, // -5 to +5
|
|
476
|
+
predictions: [
|
|
477
|
+
{
|
|
478
|
+
metric: 'overall-quality',
|
|
479
|
+
predictedValue: Math.random() * 20 + 75, // 75-95
|
|
480
|
+
confidence: Math.random() * 20 + 70, // 70-90%
|
|
481
|
+
timeframe: '30 days'
|
|
482
|
+
}
|
|
483
|
+
],
|
|
484
|
+
historical: this.generateHistoricalData()
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
createEmptyTrends() {
|
|
488
|
+
return {
|
|
489
|
+
direction: 'stable',
|
|
490
|
+
velocity: 0,
|
|
491
|
+
predictions: [],
|
|
492
|
+
historical: []
|
|
493
|
+
};
|
|
494
|
+
}
|
|
495
|
+
async evaluateThresholds(metrics, thresholds) {
|
|
496
|
+
const failed = [];
|
|
497
|
+
const warnings = [];
|
|
498
|
+
// Evaluate each threshold
|
|
499
|
+
for (const [metric, threshold] of Object.entries(thresholds)) {
|
|
500
|
+
const actual = this.getMetricValue(metrics, metric);
|
|
501
|
+
if (actual !== undefined) {
|
|
502
|
+
if (actual < threshold) {
|
|
503
|
+
failed.push({
|
|
504
|
+
metric,
|
|
505
|
+
actual,
|
|
506
|
+
threshold,
|
|
507
|
+
severity: actual < threshold * 0.8 ? 'critical' : actual < threshold * 0.9 ? 'error' : 'warning'
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
else if (actual < threshold * 1.1) {
|
|
511
|
+
warnings.push({
|
|
512
|
+
metric,
|
|
513
|
+
actual,
|
|
514
|
+
threshold,
|
|
515
|
+
message: `${metric} is close to threshold`
|
|
516
|
+
});
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
return {
|
|
521
|
+
passed: failed.length === 0,
|
|
522
|
+
failed,
|
|
523
|
+
warnings
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
calculateCompositeScore(assessments, thresholds) {
|
|
527
|
+
// Calculate weighted average of assessment scores
|
|
528
|
+
const totalScore = assessments.reduce((sum, assessment) => sum + assessment.score, 0);
|
|
529
|
+
const averageScore = assessments.length > 0 ? totalScore / assessments.length : 0;
|
|
530
|
+
// Apply threshold penalties
|
|
531
|
+
const thresholdPenalty = thresholds.failed.length * 5; // 5 points per failed threshold
|
|
532
|
+
const finalScore = Math.max(0, averageScore - thresholdPenalty);
|
|
533
|
+
// Calculate breakdown by category
|
|
534
|
+
const breakdown = {};
|
|
535
|
+
for (const assessment of assessments) {
|
|
536
|
+
breakdown[assessment.category] = assessment.score;
|
|
537
|
+
}
|
|
538
|
+
// Determine grade
|
|
539
|
+
let grade;
|
|
540
|
+
if (finalScore >= 95)
|
|
541
|
+
grade = 'A+';
|
|
542
|
+
else if (finalScore >= 90)
|
|
543
|
+
grade = 'A';
|
|
544
|
+
else if (finalScore >= 85)
|
|
545
|
+
grade = 'B+';
|
|
546
|
+
else if (finalScore >= 80)
|
|
547
|
+
grade = 'B';
|
|
548
|
+
else if (finalScore >= 75)
|
|
549
|
+
grade = 'C+';
|
|
550
|
+
else if (finalScore >= 70)
|
|
551
|
+
grade = 'C';
|
|
552
|
+
else if (finalScore >= 60)
|
|
553
|
+
grade = 'D';
|
|
554
|
+
else
|
|
555
|
+
grade = 'F';
|
|
556
|
+
return {
|
|
557
|
+
overall: Math.round(finalScore * 100) / 100,
|
|
558
|
+
breakdown,
|
|
559
|
+
grade,
|
|
560
|
+
interpretation: this.interpretScore(finalScore, grade)
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
// Helper methods
|
|
564
|
+
normalizeScore(value, min, max) {
|
|
565
|
+
return Math.max(0, Math.min(1, (value - min) / (max - min)));
|
|
566
|
+
}
|
|
567
|
+
calculateSecurityScore(vulnerabilities) {
|
|
568
|
+
const weights = { critical: 50, high: 20, medium: 5, low: 1 };
|
|
569
|
+
const totalDeduction = vulnerabilities.critical * weights.critical +
|
|
570
|
+
vulnerabilities.high * weights.high +
|
|
571
|
+
vulnerabilities.medium * weights.medium +
|
|
572
|
+
vulnerabilities.low * weights.low;
|
|
573
|
+
return Math.max(0, 100 - totalDeduction);
|
|
574
|
+
}
|
|
575
|
+
estimateHours(effort, impact) {
|
|
576
|
+
const effortMultiplier = { low: 1, medium: 2, high: 4 };
|
|
577
|
+
const impactMultiplier = { low: 1, medium: 1.5, high: 2 };
|
|
578
|
+
return Math.round(4 * // Base hours
|
|
579
|
+
(effortMultiplier[effort] || 2) *
|
|
580
|
+
(impactMultiplier[impact] || 1.5));
|
|
581
|
+
}
|
|
582
|
+
getMetricValue(metrics, metricPath) {
|
|
583
|
+
// Simple path resolution for nested metrics
|
|
584
|
+
const paths = {
|
|
585
|
+
'coverage': metrics.code.coverage.line,
|
|
586
|
+
'complexity': metrics.code.complexity.cyclomatic,
|
|
587
|
+
'duplication': metrics.code.duplication.percentage,
|
|
588
|
+
'success-rate': metrics.test.reliability.successRate,
|
|
589
|
+
'mutation-score': metrics.test.effectiveness.mutationScore,
|
|
590
|
+
'response-time': metrics.performance.responseTime.p95
|
|
591
|
+
};
|
|
592
|
+
return paths[metricPath];
|
|
593
|
+
}
|
|
594
|
+
interpretScore(score, grade) {
|
|
595
|
+
if (score >= 90)
|
|
596
|
+
return 'Excellent quality with minimal issues';
|
|
597
|
+
if (score >= 80)
|
|
598
|
+
return 'Good quality with some areas for improvement';
|
|
599
|
+
if (score >= 70)
|
|
600
|
+
return 'Acceptable quality but needs attention';
|
|
601
|
+
if (score >= 60)
|
|
602
|
+
return 'Below average quality requiring significant improvement';
|
|
603
|
+
return 'Poor quality requiring immediate attention';
|
|
604
|
+
}
|
|
605
|
+
generateTechnicalDebtIssues() {
|
|
606
|
+
return [
|
|
607
|
+
{
|
|
608
|
+
file: 'src/complex-function.js',
|
|
609
|
+
line: 45,
|
|
610
|
+
type: 'complexity',
|
|
611
|
+
severity: 'high',
|
|
612
|
+
estimatedHours: 4,
|
|
613
|
+
description: 'Function has high cyclomatic complexity'
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
file: 'src/duplicate-code.js',
|
|
617
|
+
line: 12,
|
|
618
|
+
type: 'duplication',
|
|
619
|
+
severity: 'medium',
|
|
620
|
+
estimatedHours: 2,
|
|
621
|
+
description: 'Code block is duplicated across multiple files'
|
|
622
|
+
}
|
|
623
|
+
];
|
|
624
|
+
}
|
|
625
|
+
generateCoverageGaps() {
|
|
626
|
+
return [
|
|
627
|
+
{
|
|
628
|
+
file: 'src/uncovered.js',
|
|
629
|
+
lines: [23, 24, 25, 35],
|
|
630
|
+
functions: ['errorHandler', 'cleanup'],
|
|
631
|
+
priority: 'high'
|
|
632
|
+
}
|
|
633
|
+
];
|
|
634
|
+
}
|
|
635
|
+
generatePerformanceBottlenecks() {
|
|
636
|
+
return [
|
|
637
|
+
{
|
|
638
|
+
type: 'database-query',
|
|
639
|
+
location: 'UserService.findAll()',
|
|
640
|
+
impact: 0.4,
|
|
641
|
+
recommendation: 'Add database index on user.email'
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
type: 'memory-leak',
|
|
645
|
+
location: 'EventHandler.subscribe()',
|
|
646
|
+
impact: 0.2,
|
|
647
|
+
recommendation: 'Implement proper cleanup in event handlers'
|
|
648
|
+
}
|
|
649
|
+
];
|
|
650
|
+
}
|
|
651
|
+
generateSecurityIssues() {
|
|
652
|
+
return [
|
|
653
|
+
{
|
|
654
|
+
type: 'sql-injection',
|
|
655
|
+
severity: 'high',
|
|
656
|
+
description: 'Potential SQL injection vulnerability',
|
|
657
|
+
location: 'UserController.search()',
|
|
658
|
+
cwe: 'CWE-89'
|
|
659
|
+
}
|
|
660
|
+
];
|
|
661
|
+
}
|
|
662
|
+
generateLicenseIssues() {
|
|
663
|
+
return [
|
|
664
|
+
{
|
|
665
|
+
dependency: 'some-package',
|
|
666
|
+
license: 'GPL-3.0',
|
|
667
|
+
compatibility: 'incompatible',
|
|
668
|
+
risk: 'high'
|
|
669
|
+
}
|
|
670
|
+
];
|
|
671
|
+
}
|
|
672
|
+
generateHistoricalData() {
|
|
673
|
+
const data = [];
|
|
674
|
+
const now = new Date();
|
|
675
|
+
for (let i = 30; i >= 0; i--) {
|
|
676
|
+
const date = new Date(now.getTime() - i * 24 * 60 * 60 * 1000);
|
|
677
|
+
data.push({
|
|
678
|
+
date: date.toISOString().split('T')[0],
|
|
679
|
+
metrics: {
|
|
680
|
+
'overall-quality': Math.random() * 20 + 70 + i * 0.5, // Improving trend
|
|
681
|
+
'coverage': Math.random() * 10 + 75 + i * 0.3,
|
|
682
|
+
'complexity': Math.random() * 5 + 8 - i * 0.1
|
|
683
|
+
}
|
|
684
|
+
});
|
|
685
|
+
}
|
|
686
|
+
return data;
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* Get quality report by ID
|
|
690
|
+
*/
|
|
691
|
+
getReport(reportId) {
|
|
692
|
+
return this.analysisHistory.get(reportId);
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* List all quality reports
|
|
696
|
+
*/
|
|
697
|
+
listReports() {
|
|
698
|
+
return Array.from(this.analysisHistory.values());
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
exports.QualityAnalyzeHandler = QualityAnalyzeHandler;
|
|
702
|
+
//# sourceMappingURL=quality-analyze.js.map
|