/** * PURE deterministic, INDEX-ONLY retrieval of relevant lessons for the planner. * * Reads only the bounded .bober/memory/INDEX.md (via loadLessonIndex) — never history.jsonl, * never per-lesson files. Scoring is deterministic lowercased token overlap; ties break on lessonId. * * PURE — no network, no Date.now(), no side effects. All fs access flows through loadLessonIndex. */ import type { LessonIndexRecord } from "../../state/memory.js"; /** * Load and rank at most `topK` lessons from the bounded index that are relevant * to the given `keywords`. * * Scoring is deterministic token-overlap between the lowercased keyword tokens * and each record's tags + category + summarySnippet. When overlap scores tie, * records with higher occurrences rank above lower-occurrence records. * Final tiebreak is by lessonId ASC (lexicographic) for byte-stable output. * * A non-matching keyword set (no overlap with any record) yields an empty result. * * @param projectRoot - Absolute path to the project root containing .bober/ * @param keywords - Keywords derived from the feature title/description * @param options - topK cap (default 5) and optional charBudget (ignored here; passed to serializer) * @returns At most topK records sorted by relevance (descending), then lessonId (ascending) */ export declare function retrieveRelevantLessons(projectRoot: string, keywords: string[], { topK, charBudget: _charBudget, namespace, }?: { topK?: number; charBudget?: number; namespace?: string; }): Promise; /** * Render a compact planner context block from an array of LessonIndexRecord values. * * Each lesson becomes one line: * [/] (x) tags: * * The block is prefixed with a header line and truncated to `charBudget` characters * (hard slice) so the planner always receives a predictably-bounded string. * * @param records - Already-ranked records (from retrieveRelevantLessons) * @param options - charBudget: hard character limit (default DEFAULT_CHAR_BUDGET) * @returns Compact string block, at most charBudget characters */ export declare function serializeLessonsForPlanner(records: LessonIndexRecord[], { charBudget }?: { charBudget?: number; }): string; //# sourceMappingURL=retrieve.d.ts.map