import type { BrainInsight, FileChange, ProjectContext, LearnedLesson, ProjectKnowledge } from '../types.js'; import type { LLMClient } from './llm-client.js'; import { SelfEvolution } from './self-evolution.js'; export declare class LearningEngine { private store; private storePath; private saveTimer; private projectDir; private llmClient; private selfEvolution; private evolveCounter; constructor(projectDir: string, llmClient?: LLMClient); load(): Promise; save(): Promise; private scheduleSave; learnFromInsights(insights: BrainInsight[], changes: FileChange[]): void; learnFromFeedback(insightId: string, accepted: boolean): void; learnProjectPatterns(context: ProjectContext, files: string[]): Promise; getRelevantLessons(changes: FileChange[]): LearnedLesson[]; getProjectKnowledge(projectDir: string): ProjectKnowledge | null; getIntelligenceBoost(changes: FileChange[], context: ProjectContext): Promise; getStats(): { totalLessons: number; totalPatterns: number; avgConfidence: number; projectCount: number; }; /** * learnFromProject — Scan the project for patterns and extract lessons. * Called by the orchestrator during a learning cycle. */ learnFromProject(): Promise; /** * getLessons — Return all learned lessons in the format the orchestrator expects. */ getLessons(): Promise>; /** * recordInsight — Record a BrainInsight as a learned lesson. * Called by the orchestrator when critical/high-priority insights are generated. */ recordInsight(insight: BrainInsight): Promise; cleanup(): void; private dirExists; private collectSourceFiles; private createLessonFromContent; private enrichLessonsWithLLM; private extractPattern; private extractCodePattern; private contentFollowsConvention; private generateLLMInsights; /** v4.0.0: Get the self-evolution engine reference */ getSelfEvolution(): SelfEvolution; /** v4.0.0: Get evolution stats */ getEvolutionStats(): { generation: number; populationSize: number; bestFitness: number; }; } //# sourceMappingURL=learning-engine.d.ts.map