/** * Selective Context Memory (SCM) query-intent classifier (#2760). * * Dream-cycle #2760 (SCM routed memory 86% LongMemEval): agents perform * dramatically better on long-memory retrieval when the query is routed * to the RIGHT memory tier — episodic (session recall) vs semantic * (learned patterns) vs procedural (skills/recipes). Ruflo previously * had all these tiers writing to different namespaces but the search * command didn't discriminate — every query searched everything. * * v1 classifier: keyword-scored intent detection. Ships as a bounded * MVP so users can opt in via `memory search --intent auto|episodic| * semantic|procedural|mixed`. Default remains `mixed` (existing * behavior) so no baseline retrieval is disturbed. * * v2 (future): embedding-based classifier trained on the trajectory * store's actual routing outcomes. */ export type MemoryIntent = 'episodic' | 'semantic' | 'procedural' | 'mixed'; export interface ClassifiedIntent { intent: MemoryIntent; confidence: number; /** Per-intent scores for transparency; sums roughly to 1. */ scores: Record, number>; /** Namespaces the caller should search for this intent (relative to memory backend). */ namespaces: string[]; /** Human-readable rationale. */ reason: string; } /** * Keyword catalog per intent — case-insensitive substring match. * Order matters for ties: earlier categories win when scores tie. */ declare const KEYWORDS: Record, readonly string[]>; /** * Namespaces owned by each intent. These match ruflo's actual * memory-write conventions: * episodic → session/trajectory writes (hooks_post-task, session-checkpoints) * semantic → pattern/learning writes (patterns/, learned-*, adr-patterns) * procedural → skill/workflow writes (skills/, agents/, workflow-templates) * A namespace listed under more than one intent means it's genuinely dual-nature. */ declare const NAMESPACES: Record, readonly string[]>; export declare function classifyQueryIntent(query: string): ClassifiedIntent; /** * Given a user-requested intent (which may be `auto`), resolve to a * concrete ClassifiedIntent for the given query. */ export declare function resolveIntent(query: string, requested?: MemoryIntent | 'auto'): ClassifiedIntent; export { KEYWORDS as INTENT_KEYWORDS, NAMESPACES as INTENT_NAMESPACES }; //# sourceMappingURL=scm-classifier.d.ts.map