agentic-qe 1.1.0 → 1.3.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/qe-coverage-analyzer.md +8 -0
- package/.claude/agents/qe-flaky-test-hunter.md +9 -1
- package/.claude/agents/qe-test-generator.md +7 -0
- package/.claude/agents/reasoning/agent.md +816 -0
- package/.claude/agents/reasoning/goal-planner.md +73 -0
- package/.claude/settings.json +64 -25
- package/.claude/skills/README.md +124 -0
- package/.claude/skills/accessibility-testing/SKILL.md +777 -0
- package/.claude/skills/agentdb-advanced/SKILL.md +550 -0
- package/.claude/skills/agentdb-learning/SKILL.md +545 -0
- package/.claude/skills/agentdb-memory-patterns/SKILL.md +339 -0
- package/.claude/skills/agentdb-optimization/SKILL.md +509 -0
- package/.claude/skills/agentdb-vector-search/SKILL.md +339 -0
- package/.claude/skills/agentic-quality-engineering/SKILL.md +604 -0
- package/.claude/skills/api-testing-patterns/SKILL.md +686 -0
- package/.claude/skills/bug-reporting-excellence/SKILL.md +632 -0
- package/.claude/skills/chaos-engineering-resilience/SKILL.md +109 -0
- package/.claude/skills/code-review-quality/SKILL.md +683 -0
- package/.claude/skills/compatibility-testing/SKILL.md +101 -0
- package/.claude/skills/compliance-testing/SKILL.md +162 -0
- package/.claude/skills/consultancy-practices/SKILL.md +540 -0
- package/.claude/skills/context-driven-testing/SKILL.md +466 -0
- package/.claude/skills/contract-testing/SKILL.md +193 -0
- package/.claude/skills/database-testing/SKILL.md +243 -0
- package/.claude/skills/exploratory-testing-advanced/SKILL.md +676 -0
- package/.claude/skills/flow-nexus-neural/SKILL.md +738 -0
- package/.claude/skills/flow-nexus-platform/SKILL.md +1157 -0
- package/.claude/skills/flow-nexus-swarm/SKILL.md +610 -0
- package/.claude/skills/github-code-review/SKILL.md +1140 -0
- package/.claude/skills/github-multi-repo/SKILL.md +874 -0
- package/.claude/skills/github-project-management/SKILL.md +1277 -0
- package/.claude/skills/github-release-management/SKILL.md +1081 -0
- package/.claude/skills/github-workflow-automation/SKILL.md +1065 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +712 -0
- package/.claude/skills/holistic-testing-pact/SKILL.md +225 -0
- package/.claude/skills/hooks-automation/SKILL.md +1201 -0
- package/.claude/skills/localization-testing/SKILL.md +115 -0
- package/.claude/skills/mobile-testing/SKILL.md +548 -0
- package/.claude/skills/mutation-testing/SKILL.md +129 -0
- package/.claude/skills/pair-programming/SKILL.md +1202 -0
- package/.claude/skills/performance-analysis/SKILL.md +563 -0
- package/.claude/skills/performance-testing/SKILL.md +662 -0
- package/.claude/skills/quality-metrics/SKILL.md +592 -0
- package/.claude/skills/reasoningbank-agentdb/SKILL.md +446 -0
- package/.claude/skills/reasoningbank-intelligence/SKILL.md +201 -0
- package/.claude/skills/refactoring-patterns/SKILL.md +778 -0
- package/.claude/skills/regression-testing/SKILL.md +1045 -0
- package/.claude/skills/risk-based-testing/SKILL.md +721 -0
- package/.claude/skills/security-testing/SKILL.md +651 -0
- package/.claude/skills/shift-left-testing/SKILL.md +535 -0
- package/.claude/skills/shift-right-testing/SKILL.md +591 -0
- package/.claude/skills/skill-builder/SKILL.md +910 -0
- package/.claude/skills/sparc-methodology/SKILL.md +1115 -0
- package/.claude/skills/stream-chain/SKILL.md +563 -0
- package/.claude/skills/swarm-advanced/SKILL.md +973 -0
- package/.claude/skills/swarm-orchestration/SKILL.md +179 -0
- package/.claude/skills/tdd-london-chicago/SKILL.md +567 -0
- package/.claude/skills/technical-writing/SKILL.md +235 -0
- package/.claude/skills/test-automation-strategy/SKILL.md +842 -0
- package/.claude/skills/test-data-management/SKILL.md +1067 -0
- package/.claude/skills/test-design-techniques/SKILL.md +160 -0
- package/.claude/skills/test-environment-management/SKILL.md +204 -0
- package/.claude/skills/test-reporting-analytics/SKILL.md +143 -0
- package/.claude/skills/verification-quality/SKILL.md +649 -0
- package/.claude/skills/visual-testing-advanced/SKILL.md +148 -0
- package/.claude/skills/xp-practices/SKILL.md +671 -0
- package/.claude/statusline-command.sh +176 -0
- package/CHANGELOG.md +623 -6
- package/README.md +101 -5
- package/config/improvement-loop.config.ts +323 -0
- package/config/neural-agent.config.ts +197 -0
- package/dist/adapters/MemoryStoreAdapter.d.ts +16 -16
- package/dist/adapters/MemoryStoreAdapter.d.ts.map +1 -1
- package/dist/adapters/MemoryStoreAdapter.js +16 -16
- package/dist/adapters/MemoryStoreAdapter.js.map +1 -1
- package/dist/agents/BaseAgent.d.ts +69 -0
- package/dist/agents/BaseAgent.d.ts.map +1 -1
- package/dist/agents/BaseAgent.js +387 -5
- package/dist/agents/BaseAgent.js.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.d.ts +13 -2
- package/dist/agents/CoverageAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/CoverageAnalyzerAgent.js +112 -12
- package/dist/agents/CoverageAnalyzerAgent.js.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.d.ts.map +1 -1
- package/dist/agents/DeploymentReadinessAgent.js +13 -13
- package/dist/agents/DeploymentReadinessAgent.js.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.d.ts +28 -0
- package/dist/agents/FlakyTestHunterAgent.d.ts.map +1 -1
- package/dist/agents/FlakyTestHunterAgent.js +160 -4
- package/dist/agents/FlakyTestHunterAgent.js.map +1 -1
- package/dist/agents/FleetCommanderAgent.d.ts.map +1 -1
- package/dist/agents/FleetCommanderAgent.js +4 -3
- package/dist/agents/FleetCommanderAgent.js.map +1 -1
- package/dist/agents/LearningAgent.d.ts +14 -5
- package/dist/agents/LearningAgent.d.ts.map +1 -1
- package/dist/agents/LearningAgent.js +36 -16
- package/dist/agents/LearningAgent.js.map +1 -1
- package/dist/agents/NeuralAgentExtension.d.ts +117 -0
- package/dist/agents/NeuralAgentExtension.d.ts.map +1 -0
- package/dist/agents/NeuralAgentExtension.js +288 -0
- package/dist/agents/NeuralAgentExtension.js.map +1 -0
- package/dist/agents/PerformanceTesterAgent.d.ts.map +1 -1
- package/dist/agents/PerformanceTesterAgent.js +11 -9
- package/dist/agents/PerformanceTesterAgent.js.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.d.ts.map +1 -1
- package/dist/agents/ProductionIntelligenceAgent.js +14 -13
- package/dist/agents/ProductionIntelligenceAgent.js.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/QualityAnalyzerAgent.js +39 -38
- package/dist/agents/QualityAnalyzerAgent.js.map +1 -1
- package/dist/agents/QualityGateAgent.d.ts.map +1 -1
- package/dist/agents/QualityGateAgent.js +7 -6
- package/dist/agents/QualityGateAgent.js.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.d.ts.map +1 -1
- package/dist/agents/RegressionRiskAnalyzerAgent.js +22 -21
- package/dist/agents/RegressionRiskAnalyzerAgent.js.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.d.ts.map +1 -1
- package/dist/agents/RequirementsValidatorAgent.js +1 -1
- package/dist/agents/RequirementsValidatorAgent.js.map +1 -1
- package/dist/agents/SecurityScannerAgent.d.ts.map +1 -1
- package/dist/agents/SecurityScannerAgent.js +8 -7
- package/dist/agents/SecurityScannerAgent.js.map +1 -1
- package/dist/agents/TestDataArchitectAgent.d.ts.map +1 -1
- package/dist/agents/TestDataArchitectAgent.js +12 -11
- package/dist/agents/TestDataArchitectAgent.js.map +1 -1
- package/dist/agents/TestExecutorAgent.d.ts.map +1 -1
- package/dist/agents/TestExecutorAgent.js +18 -19
- package/dist/agents/TestExecutorAgent.js.map +1 -1
- package/dist/agents/TestGeneratorAgent.d.ts +15 -4
- package/dist/agents/TestGeneratorAgent.d.ts.map +1 -1
- package/dist/agents/TestGeneratorAgent.js +172 -49
- package/dist/agents/TestGeneratorAgent.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +2 -1
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/mixins/NeuralCapableMixin.d.ts +130 -0
- package/dist/agents/mixins/NeuralCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/NeuralCapableMixin.js +358 -0
- package/dist/agents/mixins/NeuralCapableMixin.js.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts +34 -0
- package/dist/agents/mixins/QUICCapableMixin.d.ts.map +1 -0
- package/dist/agents/mixins/QUICCapableMixin.js +346 -0
- package/dist/agents/mixins/QUICCapableMixin.js.map +1 -0
- package/dist/cli/commands/agent/benchmark.d.ts.map +1 -1
- package/dist/cli/commands/agent/benchmark.js +2 -1
- package/dist/cli/commands/agent/benchmark.js.map +1 -1
- package/dist/cli/commands/agent/index.d.ts +5 -0
- package/dist/cli/commands/agent/index.d.ts.map +1 -1
- package/dist/cli/commands/agent/index.js +11 -6
- package/dist/cli/commands/agent/index.js.map +1 -1
- package/dist/cli/commands/agent/kill.d.ts +13 -0
- package/dist/cli/commands/agent/kill.d.ts.map +1 -0
- package/dist/cli/commands/agent/kill.js +65 -0
- package/dist/cli/commands/agent/kill.js.map +1 -0
- package/dist/cli/commands/agent/list.d.ts +19 -0
- package/dist/cli/commands/agent/list.d.ts.map +1 -0
- package/dist/cli/commands/agent/list.js +92 -0
- package/dist/cli/commands/agent/list.js.map +1 -0
- package/dist/cli/commands/agent/logs.d.ts +14 -0
- package/dist/cli/commands/agent/logs.d.ts.map +1 -0
- package/dist/cli/commands/agent/logs.js +77 -0
- package/dist/cli/commands/agent/logs.js.map +1 -0
- package/dist/cli/commands/agent/metrics.d.ts +21 -0
- package/dist/cli/commands/agent/metrics.d.ts.map +1 -0
- package/dist/cli/commands/agent/metrics.js +87 -0
- package/dist/cli/commands/agent/metrics.js.map +1 -0
- package/dist/cli/commands/agent/spawn.d.ts +28 -0
- package/dist/cli/commands/agent/spawn.d.ts.map +1 -0
- package/dist/cli/commands/agent/spawn.js +84 -0
- package/dist/cli/commands/agent/spawn.js.map +1 -0
- package/dist/cli/commands/analyze.d.ts.map +1 -1
- package/dist/cli/commands/analyze.js +2 -1
- package/dist/cli/commands/analyze.js.map +1 -1
- package/dist/cli/commands/config/list.d.ts.map +1 -1
- package/dist/cli/commands/config/list.js +2 -1
- package/dist/cli/commands/config/list.js.map +1 -1
- package/dist/cli/commands/config/set.d.ts +7 -0
- package/dist/cli/commands/config/set.d.ts.map +1 -1
- package/dist/cli/commands/config/set.js +35 -4
- package/dist/cli/commands/config/set.js.map +1 -1
- package/dist/cli/commands/fleet/logs.d.ts.map +1 -1
- package/dist/cli/commands/fleet/logs.js +2 -1
- package/dist/cli/commands/fleet/logs.js.map +1 -1
- package/dist/cli/commands/fleet/metrics.d.ts.map +1 -1
- package/dist/cli/commands/fleet/metrics.js +2 -1
- package/dist/cli/commands/fleet/metrics.js.map +1 -1
- package/dist/cli/commands/fleet/monitor.d.ts.map +1 -1
- package/dist/cli/commands/fleet/monitor.js +7 -5
- package/dist/cli/commands/fleet/monitor.js.map +1 -1
- package/dist/cli/commands/fleet.d.ts.map +1 -1
- package/dist/cli/commands/fleet.js +2 -1
- package/dist/cli/commands/fleet.js.map +1 -1
- package/dist/cli/commands/generate.d.ts.map +1 -1
- package/dist/cli/commands/generate.js +2 -1
- package/dist/cli/commands/generate.js.map +1 -1
- package/dist/cli/commands/improve/index.d.ts.map +1 -1
- package/dist/cli/commands/improve/index.js +12 -11
- package/dist/cli/commands/improve/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +24 -0
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +503 -11
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/learn/index.d.ts.map +1 -1
- package/dist/cli/commands/learn/index.js +13 -12
- package/dist/cli/commands/learn/index.js.map +1 -1
- package/dist/cli/commands/monitor/alerts.d.ts.map +1 -1
- package/dist/cli/commands/monitor/alerts.js +2 -1
- package/dist/cli/commands/monitor/alerts.js.map +1 -1
- package/dist/cli/commands/patterns/index.d.ts.map +1 -1
- package/dist/cli/commands/patterns/index.js +20 -19
- package/dist/cli/commands/patterns/index.js.map +1 -1
- package/dist/cli/commands/quality/decision.d.ts.map +1 -1
- package/dist/cli/commands/quality/decision.js +9 -7
- package/dist/cli/commands/quality/decision.js.map +1 -1
- package/dist/cli/commands/quality/gate.d.ts.map +1 -1
- package/dist/cli/commands/quality/gate.js +10 -8
- package/dist/cli/commands/quality/gate.js.map +1 -1
- package/dist/cli/commands/quality/policy.d.ts.map +1 -1
- package/dist/cli/commands/quality/policy.js +10 -8
- package/dist/cli/commands/quality/policy.js.map +1 -1
- package/dist/cli/commands/quality/risk.d.ts.map +1 -1
- package/dist/cli/commands/quality/risk.js +5 -3
- package/dist/cli/commands/quality/risk.js.map +1 -1
- package/dist/cli/commands/quality/validate.d.ts.map +1 -1
- package/dist/cli/commands/quality/validate.js +10 -8
- package/dist/cli/commands/quality/validate.js.map +1 -1
- package/dist/cli/commands/quantization.d.ts +6 -0
- package/dist/cli/commands/quantization.d.ts.map +1 -0
- package/dist/cli/commands/quantization.js +188 -0
- package/dist/cli/commands/quantization.js.map +1 -0
- package/dist/cli/commands/routing/index.d.ts +0 -6
- package/dist/cli/commands/routing/index.d.ts.map +1 -1
- package/dist/cli/commands/routing/index.js +17 -16
- package/dist/cli/commands/routing/index.js.map +1 -1
- package/dist/cli/commands/run.d.ts.map +1 -1
- package/dist/cli/commands/run.js +2 -1
- package/dist/cli/commands/run.js.map +1 -1
- package/dist/cli/commands/skills/index.d.ts +51 -0
- package/dist/cli/commands/skills/index.d.ts.map +1 -0
- package/dist/cli/commands/skills/index.js +365 -0
- package/dist/cli/commands/skills/index.js.map +1 -0
- package/dist/cli/commands/test/debug.d.ts.map +1 -1
- package/dist/cli/commands/test/debug.js +2 -1
- package/dist/cli/commands/test/debug.js.map +1 -1
- package/dist/cli/commands/test/mutate.d.ts.map +1 -1
- package/dist/cli/commands/test/mutate.js +2 -1
- package/dist/cli/commands/test/mutate.js.map +1 -1
- package/dist/cli/commands/test/parallel.d.ts.map +1 -1
- package/dist/cli/commands/test/parallel.js +6 -4
- package/dist/cli/commands/test/parallel.js.map +1 -1
- package/dist/cli/commands/test/profile.d.ts.map +1 -1
- package/dist/cli/commands/test/profile.js +3 -2
- package/dist/cli/commands/test/profile.js.map +1 -1
- package/dist/cli/commands/test/queue.d.ts.map +1 -1
- package/dist/cli/commands/test/queue.js +2 -1
- package/dist/cli/commands/test/queue.js.map +1 -1
- package/dist/cli/commands/test/retry.d.ts.map +1 -1
- package/dist/cli/commands/test/retry.js +6 -4
- package/dist/cli/commands/test/retry.js.map +1 -1
- package/dist/cli/commands/test/trace.d.ts.map +1 -1
- package/dist/cli/commands/test/trace.js +2 -1
- package/dist/cli/commands/test/trace.js.map +1 -1
- package/dist/cli/commands/test/watch.d.ts.map +1 -1
- package/dist/cli/commands/test/watch.js +3 -2
- package/dist/cli/commands/test/watch.js.map +1 -1
- package/dist/cli/commands/workflow/cancel.d.ts.map +1 -1
- package/dist/cli/commands/workflow/cancel.js +2 -1
- package/dist/cli/commands/workflow/cancel.js.map +1 -1
- package/dist/cli/index-working.js +9 -8
- package/dist/cli/index-working.js.map +1 -1
- package/dist/cli/index.js +97 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/core/EventBus.d.ts +38 -0
- package/dist/core/EventBus.d.ts.map +1 -1
- package/dist/core/EventBus.js +176 -31
- package/dist/core/EventBus.js.map +1 -1
- package/dist/core/FleetManager.d.ts +35 -1
- package/dist/core/FleetManager.d.ts.map +1 -1
- package/dist/core/FleetManager.js +121 -45
- package/dist/core/FleetManager.js.map +1 -1
- package/dist/core/MemoryManager.d.ts +19 -1
- package/dist/core/MemoryManager.d.ts.map +1 -1
- package/dist/core/MemoryManager.js +25 -1
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/coordination/OODACoordination.d.ts.map +1 -1
- package/dist/core/coordination/OODACoordination.js +2 -1
- package/dist/core/coordination/OODACoordination.js.map +1 -1
- package/dist/core/embeddings/EmbeddingCache.d.ts +134 -0
- package/dist/core/embeddings/EmbeddingCache.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingCache.js +239 -0
- package/dist/core/embeddings/EmbeddingCache.js.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts +224 -0
- package/dist/core/embeddings/EmbeddingGenerator.d.ts.map +1 -0
- package/dist/core/embeddings/EmbeddingGenerator.js +459 -0
- package/dist/core/embeddings/EmbeddingGenerator.js.map +1 -0
- package/dist/core/embeddings/index.d.ts +15 -0
- package/dist/core/embeddings/index.d.ts.map +1 -0
- package/dist/core/embeddings/index.js +22 -0
- package/dist/core/embeddings/index.js.map +1 -0
- package/dist/core/memory/AgentDBIntegration.d.ts +35 -0
- package/dist/core/memory/AgentDBIntegration.d.ts.map +1 -0
- package/dist/core/memory/AgentDBIntegration.js +75 -0
- package/dist/core/memory/AgentDBIntegration.js.map +1 -0
- package/dist/core/memory/AgentDBManager.d.ts +200 -0
- package/dist/core/memory/AgentDBManager.d.ts.map +1 -0
- package/dist/core/memory/AgentDBManager.js +246 -0
- package/dist/core/memory/AgentDBManager.js.map +1 -0
- package/dist/core/memory/AgentDBService.d.ts +160 -0
- package/dist/core/memory/AgentDBService.d.ts.map +1 -0
- package/dist/core/memory/AgentDBService.js +450 -0
- package/dist/core/memory/AgentDBService.js.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts +51 -0
- package/dist/core/memory/RealAgentDBAdapter.d.ts.map +1 -0
- package/dist/core/memory/RealAgentDBAdapter.js +231 -0
- package/dist/core/memory/RealAgentDBAdapter.js.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts +58 -0
- package/dist/core/memory/ReasoningBankAdapter.d.ts.map +1 -0
- package/dist/core/memory/ReasoningBankAdapter.js +77 -0
- package/dist/core/memory/ReasoningBankAdapter.js.map +1 -0
- package/dist/core/memory/SwarmMemoryManager.d.ts +75 -3
- package/dist/core/memory/SwarmMemoryManager.d.ts.map +1 -1
- package/dist/core/memory/SwarmMemoryManager.js +240 -55
- package/dist/core/memory/SwarmMemoryManager.js.map +1 -1
- package/dist/core/memory/index.d.ts +4 -0
- package/dist/core/memory/index.d.ts.map +1 -1
- package/dist/core/memory/index.js +9 -1
- package/dist/core/memory/index.js.map +1 -1
- package/dist/core/neural/NeuralTrainer.d.ts +137 -0
- package/dist/core/neural/NeuralTrainer.d.ts.map +1 -0
- package/dist/core/neural/NeuralTrainer.js +544 -0
- package/dist/core/neural/NeuralTrainer.js.map +1 -0
- package/dist/core/neural/index.d.ts +8 -0
- package/dist/core/neural/index.d.ts.map +1 -0
- package/dist/core/neural/index.js +24 -0
- package/dist/core/neural/index.js.map +1 -0
- package/dist/core/neural/types.d.ts +216 -0
- package/dist/core/neural/types.d.ts.map +1 -0
- package/dist/core/neural/types.js +8 -0
- package/dist/core/neural/types.js.map +1 -0
- package/dist/core/quantization/QuantizationManager.d.ts +83 -0
- package/dist/core/quantization/QuantizationManager.d.ts.map +1 -0
- package/dist/core/quantization/QuantizationManager.js +264 -0
- package/dist/core/quantization/QuantizationManager.js.map +1 -0
- package/dist/core/quantization/index.d.ts +5 -0
- package/dist/core/quantization/index.d.ts.map +1 -0
- package/dist/core/quantization/index.js +9 -0
- package/dist/core/quantization/index.js.map +1 -0
- package/dist/core/security/CertificateValidator.d.ts +130 -0
- package/dist/core/security/CertificateValidator.d.ts.map +1 -0
- package/dist/core/security/CertificateValidator.js +376 -0
- package/dist/core/security/CertificateValidator.js.map +1 -0
- package/dist/core/transport/QUICTransport.d.ts +62 -0
- package/dist/core/transport/QUICTransport.d.ts.map +1 -0
- package/dist/core/transport/QUICTransport.js +381 -0
- package/dist/core/transport/QUICTransport.js.map +1 -0
- package/dist/core/transport/SecureQUICTransport.d.ts +71 -0
- package/dist/core/transport/SecureQUICTransport.d.ts.map +1 -0
- package/dist/core/transport/SecureQUICTransport.js +253 -0
- package/dist/core/transport/SecureQUICTransport.js.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts +123 -0
- package/dist/learning/AdvancedFeatureExtractor.d.ts.map +1 -0
- package/dist/learning/AdvancedFeatureExtractor.js +423 -0
- package/dist/learning/AdvancedFeatureExtractor.js.map +1 -0
- package/dist/learning/FlakyPredictionModel.d.ts +11 -1
- package/dist/learning/FlakyPredictionModel.d.ts.map +1 -1
- package/dist/learning/FlakyPredictionModel.js +82 -35
- package/dist/learning/FlakyPredictionModel.js.map +1 -1
- package/dist/learning/FlakyTestDetector.d.ts +9 -0
- package/dist/learning/FlakyTestDetector.d.ts.map +1 -1
- package/dist/learning/FlakyTestDetector.js +28 -6
- package/dist/learning/FlakyTestDetector.js.map +1 -1
- package/dist/learning/ImprovementLoop.d.ts +16 -2
- package/dist/learning/ImprovementLoop.d.ts.map +1 -1
- package/dist/learning/ImprovementLoop.js +67 -8
- package/dist/learning/ImprovementLoop.js.map +1 -1
- package/dist/learning/ImprovementWorker.d.ts +83 -0
- package/dist/learning/ImprovementWorker.d.ts.map +1 -0
- package/dist/learning/ImprovementWorker.js +164 -0
- package/dist/learning/ImprovementWorker.js.map +1 -0
- package/dist/learning/NeuralPatternMatcher.d.ts +184 -0
- package/dist/learning/NeuralPatternMatcher.d.ts.map +1 -0
- package/dist/learning/NeuralPatternMatcher.js +702 -0
- package/dist/learning/NeuralPatternMatcher.js.map +1 -0
- package/dist/learning/NeuralTrainer.d.ts +209 -0
- package/dist/learning/NeuralTrainer.d.ts.map +1 -0
- package/dist/learning/NeuralTrainer.js +478 -0
- package/dist/learning/NeuralTrainer.js.map +1 -0
- package/dist/learning/index.d.ts +13 -7
- package/dist/learning/index.d.ts.map +1 -1
- package/dist/learning/index.js +27 -11
- package/dist/learning/index.js.map +1 -1
- package/dist/learning/types.d.ts +1 -0
- package/dist/learning/types.d.ts.map +1 -1
- package/dist/learning/types.js +16 -0
- package/dist/learning/types.js.map +1 -1
- package/dist/mcp/MCPToolRegistry.d.ts +34 -0
- package/dist/mcp/MCPToolRegistry.d.ts.map +1 -0
- package/dist/mcp/MCPToolRegistry.js +48 -0
- package/dist/mcp/MCPToolRegistry.js.map +1 -0
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts +3 -3
- package/dist/mcp/handlers/advanced/mutation-test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/advanced/mutation-test-execute.js +5 -4
- package/dist/mcp/handlers/advanced/mutation-test-execute.js.map +1 -1
- package/dist/mcp/handlers/agent-spawn.d.ts.map +1 -1
- package/dist/mcp/handlers/agent-spawn.js +2 -1
- package/dist/mcp/handlers/agent-spawn.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js +9 -8
- package/dist/mcp/handlers/analysis/coverageAnalyzeSublinear.js.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js +6 -5
- package/dist/mcp/handlers/analysis/coverageGapsDetect.js.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js +5 -4
- package/dist/mcp/handlers/analysis/performance-monitor-realtime-handler.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js +8 -7
- package/dist/mcp/handlers/analysis/performanceBenchmarkRun.js.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js +7 -6
- package/dist/mcp/handlers/analysis/performanceMonitorRealtime.js.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.d.ts.map +1 -1
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js +18 -21
- package/dist/mcp/handlers/analysis/securityScanComprehensive.js.map +1 -1
- package/dist/mcp/handlers/base-handler.d.ts.map +1 -1
- package/dist/mcp/handlers/base-handler.js +2 -9
- package/dist/mcp/handlers/base-handler.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js +4 -3
- package/dist/mcp/handlers/chaos/chaos-inject-failure.js.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.d.ts.map +1 -1
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js +6 -5
- package/dist/mcp/handlers/chaos/chaos-inject-latency.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-emit.js +2 -1
- package/dist/mcp/handlers/coordination/event-emit.js.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js +2 -1
- package/dist/mcp/handlers/coordination/event-subscribe.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-checkpoint.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-create.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-create.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-execute.js.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.d.ts.map +1 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js +2 -1
- package/dist/mcp/handlers/coordination/workflow-resume.js.map +1 -1
- package/dist/mcp/handlers/fleet-init.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-init.js +2 -1
- package/dist/mcp/handlers/fleet-init.js.map +1 -1
- package/dist/mcp/handlers/fleet-status.d.ts.map +1 -1
- package/dist/mcp/handlers/fleet-status.js +31 -30
- package/dist/mcp/handlers/fleet-status.js.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/dependency-check.js +3 -2
- package/dist/mcp/handlers/integration/dependency-check.js.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js +2 -1
- package/dist/mcp/handlers/integration/integration-test-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/optimize-tests.d.ts.map +1 -1
- package/dist/mcp/handlers/optimize-tests.js +33 -32
- package/dist/mcp/handlers/optimize-tests.js.map +1 -1
- package/dist/mcp/handlers/predict-defects.d.ts.map +1 -1
- package/dist/mcp/handlers/predict-defects.js +46 -45
- package/dist/mcp/handlers/predict-defects.js.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js +24 -23
- package/dist/mcp/handlers/prediction/deployment-readiness-check.js.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/predict-defects-ai.js +10 -9
- package/dist/mcp/handlers/prediction/predict-defects-ai.js.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js +10 -9
- package/dist/mcp/handlers/prediction/regression-risk-analyze.js.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.d.ts.map +1 -1
- package/dist/mcp/handlers/prediction/visual-test-regression.js +7 -6
- package/dist/mcp/handlers/prediction/visual-test-regression.js.map +1 -1
- package/dist/mcp/handlers/quality-analyze.d.ts.map +1 -1
- package/dist/mcp/handlers/quality-analyze.js +53 -52
- package/dist/mcp/handlers/quality-analyze.js.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.d.ts.map +1 -1
- package/dist/mcp/handlers/task-orchestrate.js +19 -18
- package/dist/mcp/handlers/task-orchestrate.js.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-execute-parallel.js +7 -6
- package/dist/mcp/handlers/test/test-execute-parallel.js.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js +2 -1
- package/dist/mcp/handlers/test/test-generate-enhanced.js.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.d.ts.map +1 -1
- package/dist/mcp/handlers/test/test-optimize-sublinear.js +3 -2
- package/dist/mcp/handlers/test/test-optimize-sublinear.js.map +1 -1
- package/dist/mcp/handlers/test-execute.d.ts.map +1 -1
- package/dist/mcp/handlers/test-execute.js +11 -10
- package/dist/mcp/handlers/test-execute.js.map +1 -1
- package/dist/mcp/handlers/test-generate.d.ts.map +1 -1
- package/dist/mcp/handlers/test-generate.js +4 -3
- package/dist/mcp/handlers/test-generate.js.map +1 -1
- package/dist/mcp/server.d.ts +4 -4
- package/dist/mcp/services/AgentRegistry.d.ts.map +1 -1
- package/dist/mcp/services/AgentRegistry.js +9 -2
- package/dist/mcp/services/AgentRegistry.js.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js +10 -9
- package/dist/mcp/streaming/CoverageAnalyzeStreamHandler.js.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.d.ts.map +1 -1
- package/dist/mcp/streaming/StreamingMCPTool.js +2 -1
- package/dist/mcp/streaming/StreamingMCPTool.js.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.d.ts.map +1 -1
- package/dist/mcp/streaming/TestExecuteStreamHandler.js +6 -5
- package/dist/mcp/streaming/TestExecuteStreamHandler.js.map +1 -1
- package/dist/reasoning/TestTemplateCreator.d.ts +10 -2
- package/dist/reasoning/TestTemplateCreator.d.ts.map +1 -1
- package/dist/reasoning/TestTemplateCreator.js +81 -21
- package/dist/reasoning/TestTemplateCreator.js.map +1 -1
- package/dist/transport/QUICTransport.d.ts +340 -0
- package/dist/transport/QUICTransport.d.ts.map +1 -0
- package/dist/transport/QUICTransport.js +814 -0
- package/dist/transport/QUICTransport.js.map +1 -0
- package/dist/transport/UDPTransport.d.ts +348 -0
- package/dist/transport/UDPTransport.d.ts.map +1 -0
- package/dist/transport/UDPTransport.js +820 -0
- package/dist/transport/UDPTransport.js.map +1 -0
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/index.d.ts +37 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -0
- package/dist/types/index.js.map +1 -1
- package/dist/types/pattern.types.d.ts +39 -3
- package/dist/types/pattern.types.d.ts.map +1 -1
- package/dist/types/quic.d.ts +339 -0
- package/dist/types/quic.d.ts.map +1 -0
- package/dist/types/quic.js +48 -0
- package/dist/types/quic.js.map +1 -0
- package/dist/utils/Config.js +3 -3
- package/dist/utils/Config.js.map +1 -1
- package/dist/utils/Database.d.ts +14 -0
- package/dist/utils/Database.d.ts.map +1 -1
- package/dist/utils/Database.js +51 -4
- package/dist/utils/Database.js.map +1 -1
- package/dist/utils/Logger.d.ts.map +1 -1
- package/dist/utils/Logger.js +111 -26
- package/dist/utils/Logger.js.map +1 -1
- package/dist/utils/ProcessExit.d.ts +23 -0
- package/dist/utils/ProcessExit.d.ts.map +1 -0
- package/dist/utils/ProcessExit.js +40 -0
- package/dist/utils/ProcessExit.js.map +1 -0
- package/dist/utils/SecureRandom.d.ts +171 -0
- package/dist/utils/SecureRandom.d.ts.map +1 -0
- package/dist/utils/SecureRandom.js +229 -0
- package/dist/utils/SecureRandom.js.map +1 -0
- package/dist/utils/SecureUrlValidator.d.ts +167 -0
- package/dist/utils/SecureUrlValidator.d.ts.map +1 -0
- package/dist/utils/SecureUrlValidator.js +306 -0
- package/dist/utils/SecureUrlValidator.js.map +1 -0
- package/dist/utils/SecureValidation.d.ts +131 -0
- package/dist/utils/SecureValidation.d.ts.map +1 -0
- package/dist/utils/SecureValidation.js +265 -0
- package/dist/utils/SecureValidation.js.map +1 -0
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +5 -4
- package/dist/utils/validation.js.map +1 -1
- package/package.json +31 -8
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review-quality
|
|
3
|
+
description: Conduct context-driven code reviews focusing on quality, testability, and maintainability. Use when reviewing code, providing feedback, or establishing review practices.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
category: development
|
|
6
|
+
tags: [code-review, quality, feedback, security, performance, maintainability]
|
|
7
|
+
difficulty: intermediate
|
|
8
|
+
estimated_time: 30-45 minutes
|
|
9
|
+
author: user
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code Review Quality
|
|
13
|
+
|
|
14
|
+
## Core Philosophy
|
|
15
|
+
|
|
16
|
+
Code review is about learning, teaching, and improving quality - not gatekeeping or showing off. Be constructive, be specific, be kind.
|
|
17
|
+
|
|
18
|
+
**Key principle:** Review code like you're helping a colleague, not judging them.
|
|
19
|
+
|
|
20
|
+
## The Code Review Mindset
|
|
21
|
+
|
|
22
|
+
### What You're Looking For
|
|
23
|
+
|
|
24
|
+
**Must address:**
|
|
25
|
+
- Bugs and logic errors
|
|
26
|
+
- Security vulnerabilities
|
|
27
|
+
- Performance issues
|
|
28
|
+
- Breaking changes
|
|
29
|
+
|
|
30
|
+
**Should address:**
|
|
31
|
+
- Unclear naming
|
|
32
|
+
- Missing tests
|
|
33
|
+
- Duplicated code
|
|
34
|
+
- Complex logic
|
|
35
|
+
|
|
36
|
+
**Nice to have:**
|
|
37
|
+
- Style inconsistencies (if not auto-fixable)
|
|
38
|
+
- Minor optimizations
|
|
39
|
+
- Suggestions for improvement
|
|
40
|
+
|
|
41
|
+
**Not your job:**
|
|
42
|
+
- Enforcing personal preferences
|
|
43
|
+
- Rewriting in your style
|
|
44
|
+
- Nitpicking formatting (use linter)
|
|
45
|
+
|
|
46
|
+
### Questions to Ask Yourself
|
|
47
|
+
|
|
48
|
+
**Is this a problem or a preference?**
|
|
49
|
+
- Problem: Will cause bugs, confuse future maintainers
|
|
50
|
+
- Preference: "I would have done it differently"
|
|
51
|
+
|
|
52
|
+
**Is this blocking or non-blocking?**
|
|
53
|
+
- Blocking: Must fix before merge
|
|
54
|
+
- Non-blocking: Suggestion for future improvement
|
|
55
|
+
|
|
56
|
+
**Am I teaching or judging?**
|
|
57
|
+
- Teaching: "Here's why this could be better"
|
|
58
|
+
- Judging: "This is wrong"
|
|
59
|
+
|
|
60
|
+
## Feedback Levels
|
|
61
|
+
|
|
62
|
+
Use these prefixes to indicate severity:
|
|
63
|
+
|
|
64
|
+
**🔴 BLOCKER** - Must fix before merging
|
|
65
|
+
```
|
|
66
|
+
🔴 This function has SQL injection vulnerability.
|
|
67
|
+
Use parameterized queries instead.
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**🟡 MAJOR** - Should fix, but not necessarily blocking
|
|
71
|
+
```
|
|
72
|
+
🟡 This test doesn't actually verify the error handling.
|
|
73
|
+
Consider adding assertion for error message.
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**🟢 MINOR** - Nice to have, optional
|
|
77
|
+
```
|
|
78
|
+
🟢 Consider extracting this into a separate function
|
|
79
|
+
for better readability (optional).
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**💡 SUGGESTION** - Ideas for improvement
|
|
83
|
+
```
|
|
84
|
+
💡 For future consideration: We could cache this
|
|
85
|
+
result to improve performance.
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## The Review Process
|
|
89
|
+
|
|
90
|
+
### 1. Understand the Context
|
|
91
|
+
|
|
92
|
+
**Before reviewing code, check:**
|
|
93
|
+
- PR description - What problem does this solve?
|
|
94
|
+
- Linked issues/tickets - Why is this needed?
|
|
95
|
+
- Related PRs - Is this part of larger change?
|
|
96
|
+
|
|
97
|
+
**Bad start:** Jump straight to code and criticize
|
|
98
|
+
**Good start:** Understand what they're trying to accomplish
|
|
99
|
+
|
|
100
|
+
### 2. Review at Different Levels
|
|
101
|
+
|
|
102
|
+
**High-level (5 min):**
|
|
103
|
+
- Does approach make sense?
|
|
104
|
+
- Are there architectural concerns?
|
|
105
|
+
- Does it fit with existing patterns?
|
|
106
|
+
|
|
107
|
+
**Detail-level (15-30 min):**
|
|
108
|
+
- Logic correctness
|
|
109
|
+
- Edge cases handled?
|
|
110
|
+
- Error handling adequate?
|
|
111
|
+
- Tests sufficient?
|
|
112
|
+
|
|
113
|
+
**Micro-level (5 min):**
|
|
114
|
+
- Naming clear?
|
|
115
|
+
- Code readable?
|
|
116
|
+
- Comments where needed?
|
|
117
|
+
|
|
118
|
+
### 3. Look for Common Issues
|
|
119
|
+
|
|
120
|
+
**Logic Errors**
|
|
121
|
+
```javascript
|
|
122
|
+
// 🔴 BLOCKER: Logic error
|
|
123
|
+
if (price > 100 && price < 50) { // Impossible condition
|
|
124
|
+
applyDiscount();
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Should be:
|
|
128
|
+
if (price > 100 || (price >= 50 && price <= 100)) {
|
|
129
|
+
applyDiscount();
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Null/Undefined Handling**
|
|
134
|
+
```javascript
|
|
135
|
+
// 🟡 MAJOR: Possible null reference
|
|
136
|
+
function calculateTotal(order) {
|
|
137
|
+
return order.items.reduce(...); // What if order.items is null?
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Suggestion:
|
|
141
|
+
function calculateTotal(order) {
|
|
142
|
+
if (!order?.items?.length) return 0;
|
|
143
|
+
return order.items.reduce(...);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Race Conditions**
|
|
148
|
+
```javascript
|
|
149
|
+
// 🔴 BLOCKER: Race condition
|
|
150
|
+
async function updateInventory(productId, quantity) {
|
|
151
|
+
const product = await db.products.findById(productId);
|
|
152
|
+
product.stock -= quantity; // Not atomic!
|
|
153
|
+
await product.save();
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Suggestion:
|
|
157
|
+
async function updateInventory(productId, quantity) {
|
|
158
|
+
await db.products.updateOne(
|
|
159
|
+
{ _id: productId, stock: { $gte: quantity } },
|
|
160
|
+
{ $inc: { stock: -quantity } }
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**Missing Tests**
|
|
166
|
+
```javascript
|
|
167
|
+
// 🟡 MAJOR: Missing test coverage
|
|
168
|
+
function calculateDiscount(price, customerType) {
|
|
169
|
+
// Complex business logic
|
|
170
|
+
// ...
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// No tests provided. Should test:
|
|
174
|
+
// - Different customer types
|
|
175
|
+
// - Edge cases (price = 0, negative)
|
|
176
|
+
// - Boundary values
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Security Issues**
|
|
180
|
+
```javascript
|
|
181
|
+
// 🔴 BLOCKER: SQL injection vulnerability
|
|
182
|
+
const query = `SELECT * FROM users WHERE email = '${email}'`;
|
|
183
|
+
|
|
184
|
+
// Use parameterized query:
|
|
185
|
+
const query = 'SELECT * FROM users WHERE email = ?';
|
|
186
|
+
db.query(query, [email]);
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Writing Good Review Comments
|
|
190
|
+
|
|
191
|
+
### Be Specific
|
|
192
|
+
|
|
193
|
+
**Bad:**
|
|
194
|
+
```
|
|
195
|
+
This function is too long.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**Good:**
|
|
199
|
+
```
|
|
200
|
+
🟡 This function has 4 distinct responsibilities:
|
|
201
|
+
1. Validation
|
|
202
|
+
2. Calculation
|
|
203
|
+
3. Database save
|
|
204
|
+
4. Email sending
|
|
205
|
+
|
|
206
|
+
Consider extracting into separate functions for easier testing:
|
|
207
|
+
- validateOrder()
|
|
208
|
+
- calculateTotal()
|
|
209
|
+
- saveOrder()
|
|
210
|
+
- sendConfirmation()
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Explain Why
|
|
214
|
+
|
|
215
|
+
**Bad:**
|
|
216
|
+
```
|
|
217
|
+
Don't use var.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**Good:**
|
|
221
|
+
```
|
|
222
|
+
🟢 Consider using `const` or `let` instead of `var`.
|
|
223
|
+
`var` has function scope which can lead to unexpected
|
|
224
|
+
behavior with closures. `const`/`let` have block scope
|
|
225
|
+
which is more predictable.
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Suggest Solutions
|
|
229
|
+
|
|
230
|
+
**Bad:**
|
|
231
|
+
```
|
|
232
|
+
This won't work.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**Good:**
|
|
236
|
+
```
|
|
237
|
+
🔴 This will fail when items array is empty.
|
|
238
|
+
|
|
239
|
+
Suggested fix:
|
|
240
|
+
if (!items || items.length === 0) {
|
|
241
|
+
return 0;
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Ask Questions
|
|
246
|
+
|
|
247
|
+
**Accusatory:**
|
|
248
|
+
```
|
|
249
|
+
Why did you do it this way?
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Curious:**
|
|
253
|
+
```
|
|
254
|
+
💡 I'm curious about the approach here. Have you
|
|
255
|
+
considered using X pattern? It might simplify
|
|
256
|
+
the error handling. What do you think?
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### Praise Good Work
|
|
260
|
+
|
|
261
|
+
**Don't just criticize, also highlight good things:**
|
|
262
|
+
```
|
|
263
|
+
✅ Nice use of early returns to avoid nested conditionals.
|
|
264
|
+
This is much more readable than the previous version!
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
```
|
|
268
|
+
✅ Great test coverage on the edge cases. The negative
|
|
269
|
+
price test is especially important.
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## The Comment Template
|
|
273
|
+
|
|
274
|
+
```markdown
|
|
275
|
+
🔴/🟡/🟢/💡 [Brief description of issue]
|
|
276
|
+
|
|
277
|
+
**Current code:**
|
|
278
|
+
```[language]
|
|
279
|
+
[code snippet]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**Issue:**
|
|
283
|
+
[Explain what's wrong and why it matters]
|
|
284
|
+
|
|
285
|
+
**Suggested fix:**
|
|
286
|
+
```[language]
|
|
287
|
+
[code snippet with solution]
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
**Alternative:**
|
|
291
|
+
[If applicable, mention other approaches]
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Example Using Template
|
|
295
|
+
|
|
296
|
+
```markdown
|
|
297
|
+
🔴 SQL injection vulnerability in user search
|
|
298
|
+
|
|
299
|
+
**Current code:**
|
|
300
|
+
```javascript
|
|
301
|
+
const query = `SELECT * FROM users WHERE name LIKE '%${searchTerm}%'`;
|
|
302
|
+
const results = await db.query(query);
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Issue:**
|
|
306
|
+
User input is directly interpolated into SQL query. An attacker
|
|
307
|
+
could inject SQL code (e.g., searchTerm = "'; DROP TABLE users--")
|
|
308
|
+
|
|
309
|
+
**Suggested fix:**
|
|
310
|
+
```javascript
|
|
311
|
+
const query = 'SELECT * FROM users WHERE name LIKE ?';
|
|
312
|
+
const results = await db.query(query, [`%${searchTerm}%`]);
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
**Alternative:**
|
|
316
|
+
If using an ORM:
|
|
317
|
+
```javascript
|
|
318
|
+
const results = await User.findAll({
|
|
319
|
+
where: {
|
|
320
|
+
name: { [Op.like]: `%${searchTerm}%` }
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
```
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
## What NOT to Review
|
|
327
|
+
|
|
328
|
+
### Don't Review (Automate Instead)
|
|
329
|
+
|
|
330
|
+
**Formatting**
|
|
331
|
+
- Indentation, spacing, line breaks
|
|
332
|
+
- **Solution:** Use Prettier, ESLint with auto-fix
|
|
333
|
+
|
|
334
|
+
**Code Style**
|
|
335
|
+
- Semicolons, quotes, naming conventions
|
|
336
|
+
- **Solution:** ESLint, style guide enforced in CI
|
|
337
|
+
|
|
338
|
+
**Import Order**
|
|
339
|
+
- Which imports come first
|
|
340
|
+
- **Solution:** ESLint plugin for imports
|
|
341
|
+
|
|
342
|
+
**Type Errors**
|
|
343
|
+
- TypeScript compile errors
|
|
344
|
+
- **Solution:** TypeScript in CI
|
|
345
|
+
|
|
346
|
+
### Focus Human Review On
|
|
347
|
+
|
|
348
|
+
- Logic correctness
|
|
349
|
+
- Business logic implementation
|
|
350
|
+
- Test quality and coverage
|
|
351
|
+
- Security concerns
|
|
352
|
+
- Performance issues
|
|
353
|
+
- API design
|
|
354
|
+
- Error handling
|
|
355
|
+
- Edge cases
|
|
356
|
+
|
|
357
|
+
## Review Checklist
|
|
358
|
+
|
|
359
|
+
### Functionality
|
|
360
|
+
- [ ] Does code do what PR says it does?
|
|
361
|
+
- [ ] Are edge cases handled?
|
|
362
|
+
- [ ] Is error handling adequate?
|
|
363
|
+
- [ ] What happens with invalid input?
|
|
364
|
+
|
|
365
|
+
### Tests
|
|
366
|
+
- [ ] Are there tests?
|
|
367
|
+
- [ ] Do tests actually test the logic?
|
|
368
|
+
- [ ] Are edge cases tested?
|
|
369
|
+
- [ ] Are error cases tested?
|
|
370
|
+
- [ ] Can I understand what's being tested?
|
|
371
|
+
|
|
372
|
+
### Security
|
|
373
|
+
- [ ] Input validation present?
|
|
374
|
+
- [ ] SQL injection prevented?
|
|
375
|
+
- [ ] XSS prevented?
|
|
376
|
+
- [ ] Authorization checks in place?
|
|
377
|
+
- [ ] Secrets not hardcoded?
|
|
378
|
+
|
|
379
|
+
### Performance
|
|
380
|
+
- [ ] No obvious performance issues?
|
|
381
|
+
- [ ] Database queries optimized?
|
|
382
|
+
- [ ] No N+1 queries?
|
|
383
|
+
- [ ] Appropriate use of caching?
|
|
384
|
+
|
|
385
|
+
### Maintainability
|
|
386
|
+
- [ ] Code is readable?
|
|
387
|
+
- [ ] Naming is clear?
|
|
388
|
+
- [ ] Complex logic is commented?
|
|
389
|
+
- [ ] No obvious duplication?
|
|
390
|
+
- [ ] Follows existing patterns?
|
|
391
|
+
|
|
392
|
+
### Documentation
|
|
393
|
+
- [ ] Public API documented?
|
|
394
|
+
- [ ] Complex logic explained?
|
|
395
|
+
- [ ] README updated if needed?
|
|
396
|
+
|
|
397
|
+
## Handling Disagreements
|
|
398
|
+
|
|
399
|
+
### When Author Disagrees with Your Feedback
|
|
400
|
+
|
|
401
|
+
**Your comment:**
|
|
402
|
+
```
|
|
403
|
+
🟡 Consider extracting this into a separate function.
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Their response:**
|
|
407
|
+
```
|
|
408
|
+
I don't think that's necessary. The function is fine as is.
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**Your options:**
|
|
412
|
+
|
|
413
|
+
**If non-blocking (🟢💡):**
|
|
414
|
+
```
|
|
415
|
+
Fair enough! It's a stylistic preference. Feel free to leave as is.
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**If important (🟡):**
|
|
419
|
+
```
|
|
420
|
+
I understand your perspective. My concern is that this
|
|
421
|
+
function currently handles 4 different responsibilities,
|
|
422
|
+
which makes it harder to test in isolation. Would you be
|
|
423
|
+
open to extracting just the calculation logic?
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
**If critical (🔴):**
|
|
427
|
+
```
|
|
428
|
+
I appreciate you're trying to keep it simple, but this
|
|
429
|
+
is a security vulnerability. We need to fix this before
|
|
430
|
+
merging. Let's discuss the best approach - happy to pair
|
|
431
|
+
on it if helpful.
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
### When You're Wrong
|
|
435
|
+
|
|
436
|
+
**Happens to everyone. Be gracious:**
|
|
437
|
+
```
|
|
438
|
+
You're absolutely right - I missed that this is handled
|
|
439
|
+
in the middleware layer. Thanks for clarifying!
|
|
440
|
+
Resolving this comment.
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
## Review Timing
|
|
444
|
+
|
|
445
|
+
### How Long Should Review Take?
|
|
446
|
+
|
|
447
|
+
**Small PR (<100 lines):** 10-15 minutes
|
|
448
|
+
**Medium PR (100-500 lines):** 30-45 minutes
|
|
449
|
+
**Large PR (>500 lines):** 1-2 hours (or ask to split)
|
|
450
|
+
|
|
451
|
+
### When to Request Changes
|
|
452
|
+
|
|
453
|
+
**Immediately:** Critical bugs, security issues
|
|
454
|
+
**Within 4 hours:** Normal business hours, blocking work
|
|
455
|
+
**Within 24 hours:** Non-urgent, non-blocking
|
|
456
|
+
|
|
457
|
+
### When PR is Too Large
|
|
458
|
+
|
|
459
|
+
```
|
|
460
|
+
This PR is quite large (847 lines). Would you consider
|
|
461
|
+
splitting into smaller PRs? It's hard to review thoroughly
|
|
462
|
+
in one go, and increases risk of missing issues.
|
|
463
|
+
|
|
464
|
+
Suggested splits:
|
|
465
|
+
1. Database schema changes
|
|
466
|
+
2. API endpoints
|
|
467
|
+
3. Frontend components
|
|
468
|
+
4. Tests
|
|
469
|
+
|
|
470
|
+
Happy to prioritize reviewing the first chunk today!
|
|
471
|
+
```
|
|
472
|
+
|
|
473
|
+
## Common Review Smells
|
|
474
|
+
|
|
475
|
+
### Unhelpful Reviews
|
|
476
|
+
|
|
477
|
+
**❌ Just "LGTM"**
|
|
478
|
+
- Not helpful unless you actually reviewed thoroughly
|
|
479
|
+
|
|
480
|
+
**❌ Nitpicking**
|
|
481
|
+
- 20 comments about spacing and naming
|
|
482
|
+
- 0 comments about logic
|
|
483
|
+
|
|
484
|
+
**❌ Rewriting in Your Style**
|
|
485
|
+
- "I would do it this way" (but their way works fine)
|
|
486
|
+
|
|
487
|
+
**❌ Demanding Perfection**
|
|
488
|
+
- "Rewrite this entire module"
|
|
489
|
+
- (When minor improvements would suffice)
|
|
490
|
+
|
|
491
|
+
**❌ Being a Gatekeeper**
|
|
492
|
+
- Blocking PRs unnecessarily
|
|
493
|
+
- Making approval feel like pulling teeth
|
|
494
|
+
|
|
495
|
+
### Helpful Reviews
|
|
496
|
+
|
|
497
|
+
**✅ Constructive Feedback**
|
|
498
|
+
- Specific, actionable, explained
|
|
499
|
+
|
|
500
|
+
**✅ Praise + Improvements**
|
|
501
|
+
- Highlight good work
|
|
502
|
+
- Suggest improvements where needed
|
|
503
|
+
|
|
504
|
+
**✅ Teaching Moments**
|
|
505
|
+
- Explain why, not just what
|
|
506
|
+
- Share knowledge and context
|
|
507
|
+
|
|
508
|
+
**✅ Focus on Impact**
|
|
509
|
+
- Prioritize important issues
|
|
510
|
+
- Let minor things go
|
|
511
|
+
|
|
512
|
+
**✅ Timely Response**
|
|
513
|
+
- Review within reasonable time
|
|
514
|
+
- Don't block progress unnecessarily
|
|
515
|
+
|
|
516
|
+
## Example Reviews
|
|
517
|
+
|
|
518
|
+
### Excellent Review Comment
|
|
519
|
+
|
|
520
|
+
```markdown
|
|
521
|
+
🔴 Memory leak in event handler
|
|
522
|
+
|
|
523
|
+
**Current code:**
|
|
524
|
+
```javascript
|
|
525
|
+
useEffect(() => {
|
|
526
|
+
window.addEventListener('resize', handleResize);
|
|
527
|
+
}, []);
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
**Issue:**
|
|
531
|
+
Event listener is registered but never cleaned up. On component
|
|
532
|
+
unmount, the listener remains active, causing a memory leak.
|
|
533
|
+
This will accumulate if component mounts/unmounts frequently.
|
|
534
|
+
|
|
535
|
+
**Suggested fix:**
|
|
536
|
+
```javascript
|
|
537
|
+
useEffect(() => {
|
|
538
|
+
window.addEventListener('resize', handleResize);
|
|
539
|
+
|
|
540
|
+
return () => {
|
|
541
|
+
window.removeEventListener('resize', handleResize);
|
|
542
|
+
};
|
|
543
|
+
}, []);
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
The return function acts as cleanup, removing the listener when
|
|
547
|
+
component unmounts.
|
|
548
|
+
|
|
549
|
+
**Further reading:**
|
|
550
|
+
React docs on cleanup: https://react.dev/learn/synchronizing-with-effects#step-3-add-cleanup-if-needed
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
### Poor Review Comment
|
|
554
|
+
|
|
555
|
+
```markdown
|
|
556
|
+
This is bad. Rewrite it.
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
**Problems:**
|
|
560
|
+
- Not specific
|
|
561
|
+
- No explanation
|
|
562
|
+
- No suggestion
|
|
563
|
+
- Unhelpful tone
|
|
564
|
+
|
|
565
|
+
## Reviewing Your Own Code
|
|
566
|
+
|
|
567
|
+
Before requesting review:
|
|
568
|
+
|
|
569
|
+
### Self-Review Checklist
|
|
570
|
+
- [ ] Read through entire diff
|
|
571
|
+
- [ ] Remove debug code, console.logs
|
|
572
|
+
- [ ] Check for commented-out code
|
|
573
|
+
- [ ] Verify tests pass locally
|
|
574
|
+
- [ ] Update documentation if needed
|
|
575
|
+
- [ ] Write clear PR description
|
|
576
|
+
- [ ] Add screenshots/videos if UI change
|
|
577
|
+
- [ ] Link related issues
|
|
578
|
+
|
|
579
|
+
### Pre-Review Your Own Comments
|
|
580
|
+
|
|
581
|
+
Add comments explaining:
|
|
582
|
+
- Non-obvious decisions
|
|
583
|
+
- Workarounds and why
|
|
584
|
+
- Areas you're unsure about
|
|
585
|
+
- Questions for reviewers
|
|
586
|
+
|
|
587
|
+
```javascript
|
|
588
|
+
// NOTE: Using setTimeout here instead of requestAnimationFrame
|
|
589
|
+
// because we need this to run after React's commit phase.
|
|
590
|
+
// Tried RAF but it caused flicker on initial render.
|
|
591
|
+
setTimeout(() => scrollToElement(ref.current), 0);
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
## Using with QE Agents
|
|
595
|
+
|
|
596
|
+
### Automated Code Review with qe-quality-analyzer
|
|
597
|
+
|
|
598
|
+
**qe-quality-analyzer** performs intelligent code review:
|
|
599
|
+
```typescript
|
|
600
|
+
// Agent analyzes PR for quality issues
|
|
601
|
+
const reviewAnalysis = await agent.reviewCode({
|
|
602
|
+
files: prChanges,
|
|
603
|
+
depth: 'comprehensive',
|
|
604
|
+
checkBugs: true,
|
|
605
|
+
checkSecurity: true,
|
|
606
|
+
checkPerformance: true,
|
|
607
|
+
checkMaintainability: true
|
|
608
|
+
});
|
|
609
|
+
|
|
610
|
+
// Returns categorized feedback
|
|
611
|
+
// {
|
|
612
|
+
// blockers: [{ file, line, issue, severity: 'BLOCKER' }],
|
|
613
|
+
// major: [{ file, line, issue, severity: 'MAJOR' }],
|
|
614
|
+
// suggestions: [{ file, line, suggestion, severity: 'MINOR' }],
|
|
615
|
+
// qualityScore: 0.87
|
|
616
|
+
// }
|
|
617
|
+
```
|
|
618
|
+
|
|
619
|
+
### Human-Agent Collaborative Review
|
|
620
|
+
|
|
621
|
+
```typescript
|
|
622
|
+
// Agent does first-pass review, human refines
|
|
623
|
+
const agentReview = await qe-quality-analyzer.reviewCode(prChanges);
|
|
624
|
+
const humanRefinements = await human.refineReview(agentReview);
|
|
625
|
+
const finalReview = await agent.formatFeedback({
|
|
626
|
+
agentFindings: agentReview,
|
|
627
|
+
humanInsights: humanRefinements,
|
|
628
|
+
useEmojis: true // 🔴 🟡 🟢 💡
|
|
629
|
+
});
|
|
630
|
+
```
|
|
631
|
+
|
|
632
|
+
### Fleet Coordination for Comprehensive Review
|
|
633
|
+
|
|
634
|
+
```typescript
|
|
635
|
+
// Multiple agents review different aspects
|
|
636
|
+
const reviewFleet = await FleetManager.coordinate({
|
|
637
|
+
strategy: 'code-review',
|
|
638
|
+
agents: [
|
|
639
|
+
'qe-quality-analyzer', // Overall quality
|
|
640
|
+
'qe-security-scanner', // Security vulnerabilities
|
|
641
|
+
'qe-performance-tester', // Performance implications
|
|
642
|
+
'qe-coverage-analyzer' // Test coverage impact
|
|
643
|
+
],
|
|
644
|
+
topology: 'parallel'
|
|
645
|
+
});
|
|
646
|
+
|
|
647
|
+
await reviewFleet.execute({
|
|
648
|
+
prNumber: 123,
|
|
649
|
+
aggregateResults: true
|
|
650
|
+
});
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
---
|
|
654
|
+
|
|
655
|
+
## Related Skills
|
|
656
|
+
|
|
657
|
+
**Core Quality Practices:**
|
|
658
|
+
- [agentic-quality-engineering](../agentic-quality-engineering/) - Agent-driven quality workflows
|
|
659
|
+
- [holistic-testing-pact](../holistic-testing-pact/) - Quality across all test quadrants
|
|
660
|
+
|
|
661
|
+
**Development Practices:**
|
|
662
|
+
- [refactoring-patterns](../refactoring-patterns/) - Code improvements post-review
|
|
663
|
+
- [tdd-london-chicago](../tdd-london-chicago/) - Test-driven development practices
|
|
664
|
+
- [xp-practices](../xp-practices/) - Pair programming and ensemble coding
|
|
665
|
+
|
|
666
|
+
**Communication:**
|
|
667
|
+
- [bug-reporting-excellence](../bug-reporting-excellence/) - Report issues found in reviews
|
|
668
|
+
- [technical-writing](../technical-writing/) - Document review processes
|
|
669
|
+
|
|
670
|
+
---
|
|
671
|
+
|
|
672
|
+
## Remember
|
|
673
|
+
|
|
674
|
+
**Good code review is:**
|
|
675
|
+
- Collaborative, not adversarial
|
|
676
|
+
- Teaching, not judging
|
|
677
|
+
- Specific, not vague
|
|
678
|
+
- Constructive, not destructive
|
|
679
|
+
- Timely, not delayed
|
|
680
|
+
|
|
681
|
+
**The goal is better code and better developers, not perfect code.**
|
|
682
|
+
|
|
683
|
+
Review with empathy. Everyone writes imperfect code sometimes. Your job is to help make it better, not to prove how smart you are.
|