UNPKG

ai-debug-local-mcp

Version:

🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh

112 lines • 3.94 kB
/** * Sub-Agent Test Generation Integration * * Automatically generates tests based on sub-agent debugging findings. * Each specialized agent generates tests that prevent the specific issues they discover. * Revolutionary "Debug Once, Test Forever" approach integrated into delegation workflow. * * ENHANCED: Now includes automatic test quality review using TestReviewerAI * to ensure all generated tests meet production quality standards. */ import { type IntelligentReviewResult } from './intelligent-test-review-orchestrator.js'; export interface TestGenerationContext { agentType: string; debuggingFindings: any[]; frameworkDetected?: string; issuesFound: DebugIssue[]; optimizationsApplied: Optimization[]; sessionMetadata: { url: string; userFlow?: string[]; complexity: 'simple' | 'moderate' | 'complex' | 'revolutionary'; }; } export interface DebugIssue { type: string; severity: 'low' | 'medium' | 'high' | 'critical'; description: string; location?: string; reproductionSteps?: string[]; fixApplied?: string; } export interface Optimization { type: string; description: string; impact: string; implementation: string; } export interface GeneratedTest { testType: 'unit' | 'integration' | 'e2e' | 'performance' | 'accessibility' | 'visual-regression'; testName: string; testDescription: string; testCode: string; framework: string; priority: 'high' | 'medium' | 'low'; preventionTarget: string; agentSource: string; reviewResult?: IntelligentReviewResult; qualityScore?: number; approved?: boolean; reviewFeedback?: string; contextAware?: boolean; issueValidated?: boolean; } export declare class SubAgentTestGenerator { private static reviewOrchestrator; private static readonly AGENT_TEST_STRATEGIES; /** * Generate tests based on sub-agent debugging results * ENHANCED: Now includes automatic test quality review */ static generateTestsFromDebugging(context: TestGenerationContext): Promise<GeneratedTest[]>; /** * Generate tests that prevent specific issues found during debugging */ private static generateIssuePreventionTests; /** * Generate tests that validate optimizations continue to work */ private static generateOptimizationValidationTests; /** * Generate proactive tests based on agent specialization */ private static generateProactiveTests; /** * Review all generated tests using Intelligent Test Review Orchestrator * REVOLUTIONARY: Context-aware validation with intelligent fallback to legacy patterns */ private static reviewGeneratedTestsIntelligently; /** * Configure the intelligent test review orchestrator */ static configureReviewOrchestrator(config: { subAgentAvailable?: boolean; preferSubAgent?: boolean; environment?: 'production' | 'development' | 'ci' | 'offline'; }): void; /** * Get orchestration statistics */ static getReviewStats(): { subAgentUsage: number; legacyUsage: number; fallbackCount: number; averageScore: number; }; /** * Apply automatic fixes to test code based on review suggestions */ private static applyAutoFixes; private static generatePerformanceTest; private static generateAccessibilityTest; private static generateErrorPreventionTest; private static generateJavaScriptErrorTest; private static generateNetworkErrorTest; private static generateUserFlowTest; private static generateFrameworkTest; private static getFrameworkSpecificTestCode; private static generateOptimizationValidationTest; private static generateFrameworkOptimizationTest; private static generateProactiveTest; } //# sourceMappingURL=sub-agent-test-generation-integration.d.ts.map