import type { LessonFrontmatter } from './types.js'; export interface ParsedLesson { /** Heading text after "## Lesson [—|–|-] " (em-dash, en-dash, or hyphen) */ heading: string; /** Extracted tags from the **Tags:** line */ tags: string[]; /** The lesson body text (after heading + tags line) */ body: string; /** The full raw text of this lesson section (heading through end) */ raw: string; /** 0-based index in the parsed lessons array */ index: number; /** Source file path this lesson was read from (for prune operations) */ sourcePath?: string; /** Structured metadata from YAML frontmatter or legacy field mapping (ADR-070) */ frontmatter?: LessonFrontmatter; } export interface DriftResult { /** The parsed lesson that has orphaned references */ lesson: ParsedLesson; /** File paths referenced in the lesson that no longer exist */ orphanedRefs: string[]; } /** * Parse a lessons.md file into individual lesson entries. * Splits on `## Lesson [—|–|-]` headings and extracts tags + body. * * The `lesson.raw` field preserves the user's actual separator byte-for-byte from * disk — content-hash drift detection depends on this invariant. Write-side * normalization to canonical em-dash happens separately in `rewriteLessonsFile`. */ export declare function parseLessonsFile(content: string): ParsedLesson[]; /** * Extract file path references from a lesson body. * Looks for backtick-wrapped content that looks like a real file path. */ export declare function extractFileReferences(body: string): string[]; /** * Check parsed lessons for file references that no longer exist on disk. * Returns only lessons that have at least one orphaned reference. */ export declare function detectDrift(lessons: ParsedLesson[], projectRoot: string): DriftResult[]; /** * Rewrite lessons.md content, removing lessons at the specified indices. * Returns the new file content. */ export declare function rewriteLessonsFile(content: string, indicesToRemove: Set): string; //# sourceMappingURL=drift-detector.d.ts.map