/** * Red-line classifier — turns raw markdown lines into RedLineEntry. * * Algorithm: for each MarkdownLine, check whether the line text contains one * of the four red-line markers (MANDATORY / BLOCKING / MUST NOT / RED LINE). * On a hit, extract the surrounding ±2 lines as context, look up the red * line in the catalog, and emit a RedLineEntry. Lines that contain a marker * but match no catalog entry still produce a RedLineEntry (with backing = * prose-only and enforcerRef = null) — those are the "discovered but not yet * enforced" red lines the L2 redesign is working to eliminate. */ import type { RedLineEntry, RedLineMarker } from './types.js'; export declare function detectMarker(lineText: string): RedLineMarker | null; /** * Derive a human-readable rule name from the marker line. Heuristic: take * the first 8 words of the line, lowercase, trimmed. Catalog matching is * the source of truth for the canonical rule name; this is the fallback * when no catalog entry matches. */ export declare function deriveRuleName(lineText: string): string; export interface ClassifyFileInput { readonly file: string; readonly lines: readonly string[]; } export interface ClassifyResult { readonly entries: readonly RedLineEntry[]; readonly warnings: readonly string[]; } /** * Classify a single markdown file. Returns 0+ RedLineEntry; one entry per * marker hit. Marker hits that appear multiple times on the same line are * counted once. */ export declare function classifyFile(input: ClassifyFileInput): ClassifyResult; /** * Batch wrapper — classify each input file and flatten the entries. */ export declare function classifyFiles(inputs: readonly ClassifyFileInput[]): ClassifyResult;