/** * recall Tool * * Check institutional memory for relevant scars before taking action. * Core GitMem MVP tool that enables "check before act" workflow. * * Performance target: <2000ms response time * * Uses local vector search when available for speed, * falls back to Supabase scar_search when local cache isn't ready. * * After scar search, fetches related knowledge triples and * includes them in the formatted response for relationship context. */ import type { KnowledgeTriple } from "../services/supabase-client.js"; import { type ScarWithVariant } from "../services/variant-assignment.js"; import type { Project, PerformanceData } from "../types/index.js"; /** * Confidence cutoff for scar rendering. * * Matches below this similarity are flagged `[low confidence]` and, per the * 1.5.0 UX-audit calibration, are N/A ~66% of the time. They pass the pro-tier * 0.45 inclusion filter but are rendered as stubs (header only) rather than full * bodies — the tag boundary and the stub boundary share this constant so they * can never drift apart. */ export declare const LOW_CONFIDENCE_THRESHOLD = 0.55; /** * Parameters for recall tool */ export interface RecallParams { plan: string; project?: Project; match_count?: number; issue_id?: string; similarity_threshold?: number; } /** * Required verification block for enforcement gate */ interface RequiredVerification { when: string; queries: string[]; must_show: string; blocking?: boolean; } /** * Formatted scar for response */ interface FormattedScar { id: string; title: string; learning_type?: string; severity: string; description: string; counter_arguments: string[]; applies_when: string[]; source_issue?: string; similarity: number; is_starter?: boolean; required_verification?: RequiredVerification; variant_info?: ScarWithVariant; why_this_matters?: string; action_protocol?: string[]; self_check_criteria?: string[]; related_triples?: KnowledgeTriple[]; decay_multiplier?: number; } /** * Result from recall tool */ export interface RecallResult { activated: boolean; plan: string; project: Project; match_count: number; scars: FormattedScar[]; performance_ms: number; formatted_response: string; display?: string; performance: PerformanceData; } /** * Execute recall tool * * Queries the learnings table for scars matching the provided plan * using weighted semantic search (severity-weighted, temporally-decayed). */ export declare function recall(params: RecallParams): Promise; export {}; //# sourceMappingURL=recall.d.ts.map