import { GeneticRule, EvolutionSnapshot, SelfEvolutionConfig, BrainInsight } from '../types.js'; /** * Self-Evolution Engine — rules that write themselves. * * Genetic Representation: * Each rule = chromosome of floats encoding severity weight, * confidence threshold, file pattern hash, category encoding, etc. * * Fitness: accuracy × coverage × (1 / falsePositiveRate) * Selection: Tournament (k=5) * Crossover: Single-point at random position * Mutation: Gaussian noise σ = 0.1 × mutationRate * * Meta-Learning: Tracks which (rule, project_type, language) combos work best. * Bayesian updating of weights per strategy. */ export declare class SelfEvolution { private config; private population; private generation; private metaLogs; private eliteArchive; private fitnessHistory; constructor(config?: Partial); /** Run one evolution generation */ evolve(insights?: BrainInsight[]): Promise; /** Evaluate rule fitness based on insight history */ evaluateFitness(rule: GeneticRule, insights: BrainInsight[]): number; /** Tournament selection (k=5) */ private tournamentSelect; /** Single-point crossover */ crossover(a: GeneticRule, b: GeneticRule): [GeneticRule, GeneticRule]; /** Gaussian mutation */ mutate(rule: GeneticRule): GeneticRule; private initializePopulation; /** Update meta-learning log with strategy outcome */ updateMetaLearning(strategy: string, outcome: boolean, category?: string): void; /** Get best evolved rules for a category */ getBestRules(category: string, topN?: number): GeneticRule[]; /** Get current generation info */ getGeneration(): number; getPopulationSize(): number; getFitnessHistory(): Array<{ gen: number; best: number; avg: number; }>; /** Get a snapshot of the current evolution state */ getSnapshot(): EvolutionSnapshot; private saveToDisk; private loadFromDisk; } //# sourceMappingURL=self-evolution.d.ts.map