supa-seed
Version:
A constraint-aware, framework-agnostic database seeding framework with deep PostgreSQL business logic discovery and MakerKit integration support
140 lines • 4.11 kB
TypeScript
/**
* Architecture Detection Engine for Epic 2: Smart Platform Detection Engine
* Main engine for detecting platform architecture (individual/team/hybrid) with confidence scoring
* Part of Task 2.1.3: Implement main architecture detection engine with confidence scoring
*/
import type { PlatformArchitectureDetectionResult, ArchitectureDetectionConfig, DetectionAnalysisContext, DetectionStatistics } from './detection-types';
/**
* Main Architecture Detection Engine
* Orchestrates the complete platform architecture detection process
*/
export declare class ArchitectureDetectionEngine {
private patternOrchestrator;
private detectionCache;
private statistics;
constructor();
/**
* Detect platform architecture from database schema
*/
detectArchitecture(context: DetectionAnalysisContext, config?: Partial<ArchitectureDetectionConfig>): Promise<PlatformArchitectureDetectionResult>;
/**
* Execute detection based on configured strategy
*/
private executeDetectionStrategy;
/**
* Comprehensive detection strategy - thorough analysis with maximum accuracy
*/
private comprehensiveDetection;
/**
* Fast detection strategy - quick analysis with good accuracy
*/
private fastDetection;
/**
* Conservative detection strategy - high precision, may classify as hybrid when uncertain
*/
private conservativeDetection;
/**
* Aggressive detection strategy - favor clear classifications, higher confidence
*/
private aggressiveDetection;
/**
* Collect comprehensive evidence from all analysis sources
*/
private collectComprehensiveEvidence;
/**
* Collect structural evidence from schema analysis
*/
private collectStructuralEvidence;
/**
* Collect relationship evidence
*/
private collectRelationshipEvidence;
/**
* Collect constraint evidence
*/
private collectConstraintEvidence;
/**
* Collect high-confidence evidence only (for fast/conservative modes)
*/
private collectHighConfidenceEvidence;
/**
* Collect all available evidence (for aggressive mode)
*/
private collectAllEvidence;
/**
* Analyze platform features in depth
*/
private analyzePlatformFeatures;
/**
* Analyze key platform features only (for fast mode)
*/
private analyzeKeyPlatformFeatures;
/**
* Calculate comprehensive confidence score
*/
private calculateComprehensiveConfidence;
/**
* Generate detailed reasoning for the detection
*/
private generateDetailedReasoning;
/**
* Generate alternative architecture possibilities
*/
private generateAlternatives;
/**
* Generate simple alternatives (for fast mode)
*/
private generateSimpleAlternatives;
/**
* Generate recommendations based on detection results
*/
private generateRecommendations;
/**
* Generate basic recommendations (for fast mode)
*/
private generateBasicRecommendations;
/**
* Get confidence level from numeric confidence
*/
private getConfidenceLevel;
/**
* Calculate schema complexity score
*/
private calculateSchemaComplexity;
/**
* Handle manual override
*/
private handleManualOverride;
/**
* Validate manual override against detected patterns
*/
private validateOverride;
/**
* Create fallback result for errors
*/
private createFallbackResult;
/**
* Merge config with defaults
*/
private mergeWithDefaults;
/**
* Cache management methods
*/
private getCachedResult;
private cacheResult;
private generateSchemaHash;
/**
* Update detection statistics
*/
private updateStatistics;
/**
* Get detection statistics
*/
getStatistics(): DetectionStatistics;
/**
* Clear detection cache
*/
clearCache(): void;
}
export default ArchitectureDetectionEngine;
//# sourceMappingURL=architecture-detector.d.ts.map