export interface Frontmatter { present: boolean; fields: Record; bodyStart: number; } export interface FrontmatterFields { fields: Record; end: number; } export interface FieldSpec { enum?: readonly string[]; items?: readonly string[]; kind?: "boolean" | "integer" | "kebab"; } export interface FrontmatterSchema { required: readonly string[]; fields: Record; } export type FrontmatterSchemaCode = "invalid-enum" | "invalid-type" | "missing-required"; export interface FrontmatterSchemaDefect { code: FrontmatterSchemaCode; field: string; detail: string; line: number; } export interface FieldCheck { source: string; field: string; value: string; spec: FieldSpec; }