/** * YAML frontmatter extraction and legacy field mapping for lessons. * Implements the dual-parse (fail-open) strategy from ADR-070. */ import { type LessonFrontmatter } from './types.js'; export interface FrontmatterParseResult { frontmatter: LessonFrontmatter; /** Content after the YAML block (or full content if no YAML) */ body: string; /** Whether YAML frontmatter was detected (even if invalid) */ hadYaml: boolean; /** Whether YAML was both detected AND validated successfully */ validYaml: boolean; } /** * Extract YAML frontmatter from lesson content. * If YAML is present, parse and validate against the schema. * If missing or invalid, return defaults and the full content as body. */ export declare function extractFrontmatter(content: string, onWarn?: (msg: string) => void): FrontmatterParseResult; /** * Build a LessonFrontmatter from legacy markdown fields. * Maps **Tags:**, **Pattern:**, **Engine:**, **Scope:**, **Severity:**, **Applies-to:** into the schema. */ export declare function buildFrontmatterFromLegacy(tags: string[], body: string): LessonFrontmatter; //# sourceMappingURL=lesson-frontmatter.d.ts.map