/** * Learning Memory system for CLEO BRAIN. * * Records, queries, and applies accumulated insights from * historical task data (completion rates, blocker patterns, epic sizes). * * Storage: SQLite brain_learnings table per ADR-009 Section 3.2. * * @task T4769, T5241 * @epic T4763 */ /** Parameters for storing a new learning. */ export interface StoreLearningParams { insight: string; source: string; confidence: number; actionable?: boolean; application?: string; applicableTypes?: string[]; /** * T992: Internal flag — when true, bypasses the verifyAndStore gate. * Set only by storeVerifiedCandidate in extraction-gate.ts to avoid * infinite recursion (gate → storeVerifiedCandidate → storeLearning → gate). * External callers MUST NOT set this flag. */ _skipGate?: boolean; } /** Parameters for searching learnings. */ export interface SearchLearningParams { query?: string; minConfidence?: number; actionableOnly?: boolean; applicableType?: string; limit?: number; } /** * Store a new learning. * @task T4769, T5241 */ export declare function storeLearning(projectRoot: string, params: StoreLearningParams): Promise<{ applicableTypes: any; id: string; createdAt: string; source: string; confidence: number; updatedAt: string | null; peerId: string; qualityScore: number | null; memoryTier: "short" | "medium" | "long" | null; memoryType: "semantic" | "episodic" | "procedural" | null; verified: boolean; validAt: string; invalidAt: string | null; expiredAt: string | null; network: "world" | "bank" | "opinion" | "observation" | null; sourceConfidence: "owner" | "task-outcome" | "agent" | "speculative" | null; citationCount: number; tierPromotedAt: string | null; tierPromotionReason: string | null; contentHash: string | null; provenanceClass: string | null; peerScope: string; insight: string; actionable: boolean; application: string | null; applicableTypesJson: string | null; pruneCandidateAt?: undefined; pruneCandidate?: undefined; } | { id: string; insight: string; source: string; confidence: number; actionable: boolean; application: string | null; applicableTypesJson: string; applicableTypes: never[]; qualityScore: number; memoryTier: "short"; memoryType: "semantic"; sourceConfidence: "owner" | "agent" | "speculative"; verified: boolean; contentHash: string; createdAt: string; updatedAt: null; tierPromotedAt: null; tierPromotionReason: null; invalidAt: null; pruneCandidateAt: null; citationCount: number; pruneCandidate: boolean; }>; /** * Search learnings by criteria. * Results sorted by confidence (highest first). * @task T4769, T5241 */ export declare function searchLearnings(projectRoot: string, params?: SearchLearningParams): Promise<{ applicableTypes: any; id: string; createdAt: string; source: string; confidence: number; updatedAt: string | null; peerId: string; qualityScore: number | null; memoryTier: "short" | "medium" | "long" | null; memoryType: "semantic" | "episodic" | "procedural" | null; verified: boolean; validAt: string; invalidAt: string | null; expiredAt: string | null; network: "world" | "bank" | "opinion" | "observation" | null; sourceConfidence: "owner" | "task-outcome" | "agent" | "speculative" | null; citationCount: number; tierPromotedAt: string | null; tierPromotionReason: string | null; contentHash: string | null; provenanceClass: string | null; peerScope: string; insight: string; actionable: boolean; application: string | null; applicableTypesJson: string | null; }[]>; /** * Get learning statistics. * @task T4769, T5241 */ export declare function learningStats(projectRoot: string): Promise<{ total: number; actionable: number; averageConfidence: number; bySource: Record; highConfidence: number; lowConfidence: number; }>; //# sourceMappingURL=learnings.d.ts.map