/** * Consistency enforcement system for cross-project standards * Ensures all projects follow the same patterns, use same packages, and maintain quality */ export interface ConsistencyRule { id: string; name: string; category: 'package-versions' | 'code-patterns' | 'documentation' | 'configuration' | 'best-practices'; severity: 'error' | 'warning' | 'info'; description: string; check: (project: ProjectContext) => ConsistencyViolation[]; autoFix?: (project: ProjectContext, violation: ConsistencyViolation) => Promise; } export interface ConsistencyViolation { rule: string; severity: 'error' | 'warning' | 'info'; project: string; files: string[]; message: string; suggestion: string; autoFixable: boolean; impact: { technical: string; business: string; effort: number; }; } export interface ProjectContext { name: string; path: string; framework: string; packageJson: any; files: Map; cortexPackages: string[]; claudeConfig: any; } export interface AutoFixResult { success: boolean; filesModified: string[]; error?: string; validation?: ConsistencyViolation[]; } export declare class ConsistencyEnforcer { private rules; constructor(); /** * Check all consistency rules across projects */ enforceConsistency(projects: ProjectContext[]): Promise; /** * Apply a specific fix across all projects */ propagateFix(fix: PropagatedFix): Promise; /** * Initialize standard consistency rules */ private initializeStandardRules; private checkCortexPackageVersions; private checkReactPatterns; private checkImportPatterns; private checkClaudeMdConsistency; private checkPackageScripts; private checkTypeScriptConfig; private checkCortexPackageUsage; private fixPackageVersions; private fixImportPatterns; private fixClaudeMd; private fixPackageScripts; private groupViolationsByProject; private generateSummary; private getTopViolations; private calculateProjectHealth; private loadProject; private applyFix; } interface ConsistencyReport { projects: number; totalViolations: number; criticalViolations: number; autoFixed: number; violations: Record; autoFixResults: AutoFixResult[]; summary: ConsistencySummary; } interface ConsistencySummary { projectsAnalyzed: number; violationsFound: number; autoFixable: number; estimatedFixTime: number; topViolations: { rule: string; count: number; }[]; projectHealth: ProjectHealth[]; } interface ProjectHealth { project: string; healthScore: number; violations: number; critical: number; warnings: number; status: 'excellent' | 'good' | 'needs-attention' | 'critical'; } interface PropagatedFix { id: string; name: string; description: string; targetProjects: string[]; files: { path: string; changes: FileChange[]; }[]; } interface FileChange { type: 'replace' | 'insert' | 'delete'; line?: number; search?: string; replacement: string; } interface PropagationResult { fix: string; totalProjects: number; successful: number; failed: number; results: ProjectFixResult[]; } interface ProjectFixResult { project: string; success: boolean; error?: string; filesModified: string[]; } export {}; //# sourceMappingURL=consistency-enforcer.d.ts.map