/** * Agentic QE v3 - Quality Partition Detector * ADR-030: Detects clusters of related quality issues * * Analyzes quality dimensions to identify partitions (clusters) of related issues. * Based on graph partitioning concepts from ruvector-mincut. */ import { QualityDimensions, QualityPartition, QualityLambda, CoherenceGatePolicy } from './types'; /** * Configuration for partition detection */ export interface PartitionDetectorConfig { /** Policy settings for thresholds */ policy: CoherenceGatePolicy; /** Minimum severity to create a partition */ minPartitionSeverity: number; /** Whether to include file paths in partitions */ includeAffectedPaths: boolean; } /** * Result of partition detection */ export interface PartitionDetectionResult { /** Detected partitions */ partitions: QualityPartition[]; /** Total number of partitions */ partitionCount: number; /** Whether quality is fragmented (multiple severe partitions) */ isFragmented: boolean; /** Overall fragmentation score (0-1, higher = more fragmented) */ fragmentationScore: number; /** Recommended priority for remediation */ priorityPartition?: QualityPartition; } /** * Quality Partition Detector * Identifies clusters of related quality issues */ export declare class PartitionDetector { private readonly config; constructor(config?: Partial); /** * Detect quality partitions from dimensions */ detect(dimensions: QualityDimensions): PartitionDetectionResult; /** * Update a lambda with partition information */ updateLambdaWithPartitions(lambda: QualityLambda): QualityLambda; /** * Get remediation recommendations for partitions */ getRemediationPlan(partitions: QualityPartition[]): RemediationPlan; /** * Analyze a dimension group for issues */ private analyzeGroup; /** * Detect mixed partition (issues spanning multiple groups) */ private detectMixedPartition; /** * Calculate fragmentation score */ private calculateFragmentation; /** * Get remediation suggestion for partition type */ private getRemediationForType; /** * Calculate priority for remediation step */ private calculatePriority; /** * Estimate effort for partition remediation (in hours) */ private estimateEffort; /** * Get specific actions for partition type */ private getPartitionActions; } /** * Remediation step for a partition */ export interface RemediationStep { partition: QualityPartition; priority: 'critical' | 'high' | 'medium' | 'low'; estimatedEffort: number; actions: string[]; } /** * Complete remediation plan */ export interface RemediationPlan { steps: RemediationStep[]; totalPartitions: number; estimatedTotalEffort: number; criticalCount: number; } /** * Factory function to create a partition detector */ export declare function createPartitionDetector(config?: Partial): PartitionDetector; /** * Convenience function to detect partitions */ export declare function detectQualityPartitions(dimensions: QualityDimensions, config?: Partial): PartitionDetectionResult; //# sourceMappingURL=partition-detector.d.ts.map