/** * Agentic QE v3 - AST Complexity Analyzer for RuVector Integration * * Uses RuVector's AST analysis capabilities to compute code complexity metrics. * Falls back to estimation-based analysis when RuVector is unavailable. */ import type { ASTComplexityAnalyzer, FileComplexityResult, RuVectorConfig } from './interfaces'; import type { Priority } from '../../shared/types'; export interface ComplexityThresholds { cyclomatic: { low: number; medium: number; high: number; critical: number; }; cognitive: { low: number; medium: number; high: number; critical: number; }; linesOfCode: { low: number; medium: number; high: number; critical: number; }; maintainabilityIndex: { critical: number; high: number; medium: number; low: number; }; } /** * AST-based complexity analyzer that integrates with RuVector * Provides detailed code complexity metrics for test prioritization */ export declare class RuVectorASTComplexityAnalyzer implements ASTComplexityAnalyzer { private readonly config; private readonly fallback; private readonly thresholds; private readonly cache; constructor(config: RuVectorConfig, thresholds?: Partial); /** * Analyze complexity of a single file */ analyzeFile(filePath: string): Promise; /** * Analyze complexity of multiple files */ analyzeFiles(filePaths: string[]): Promise; /** * Get complexity ranking for test prioritization */ getComplexityRanking(filePaths: string[]): Promise>; /** * Suggest test focus areas based on complexity */ suggestTestFocus(filePaths: string[]): Promise>; /** * Perform AST-based complexity analysis */ private performAnalysis; /** * Get file type for analysis */ private getFileType; /** * Compute complexity metrics */ private computeMetrics; /** * Estimate base complexity from file path */ private estimateBaseComplexity; /** * Estimate number of dependencies */ private estimateDependencies; /** * Estimate inheritance depth */ private estimateInheritanceDepth; /** * Calculate coupling score (0-1) */ private calculateCoupling; /** * Calculate cohesion score (0-1) */ private calculateCohesion; /** * Calculate maintainability index (0-100) */ private calculateMaintainabilityIndex; /** * Calculate overall complexity score (0-1) */ private calculateOverallScore; /** * Convert metrics to risk level */ private metricsToRiskLevel; /** * Convert score to priority */ private scoreToPriority; /** * Identify complexity hotspots */ private identifyHotspots; /** * Generate recommendations based on metrics */ private generateRecommendations; /** * Generate reason for test focus */ private generateTestFocusReason; } /** * Create AST complexity analyzer with optional RuVector integration */ export declare function createASTComplexityAnalyzer(config: RuVectorConfig, thresholds?: Partial): ASTComplexityAnalyzer; //# sourceMappingURL=ast-complexity.d.ts.map