/** * vigiles — Inline rule mode for gradual adoption. * * Parses `` HTML comments * out of any markdown file, so a project can adopt vigiles one rule at a * time without committing to a .spec.ts compile step. Every inline rule * goes through the same `checkLinterRule` verification as rules declared * in a .spec.ts — typos get closest-match suggestions, disabled rules are * flagged, etc. * * Only `enforce` is supported inline. `guidance` would be a tautology: if * you're editing the markdown, the prose around the comment already is * the guidance — there's nothing extra for a tool to render. * * A file is in "inline mode" iff it contains at least one vigiles:enforce * comment. Spec mode (`.md.spec.ts` sibling) takes precedence if both * exist; the spec compiler emits a fresh file that may overwrite the * inline markup, so users should pick one per file. */ export interface InlineRule { /** Linter rule reference, e.g. "eslint/no-console". */ linterRule: string; /** Why this rule is enforced (human-readable, shown in agent context). */ why: string; /** 1-based line number of the comment in the source file. */ line: number; } /** A `` reference (verified to exist). */ export interface InlineFileRef { /** Project-relative path to verify exists. */ path: string; /** 1-based line number of the comment in the source file. */ line: number; } /** A `` reference (npm scripts verified). */ export interface InlineCmdRef { /** Command to verify (npm scripts checked against package.json). */ command: string; /** 1-based line number of the comment in the source file. */ line: number; } export interface InlineParseResult { rules: InlineRule[]; files: InlineFileRef[]; commands: InlineCmdRef[]; /** Lines that look like vigiles: markers but failed to parse. */ errors: { line: number; message: string; raw: string; }[]; } /** * Parse inline vigiles rules out of a markdown file's contents. * Does not touch the filesystem and does not verify the rules against * any linter — callers can feed the returned rules into * `checkLinterRule` themselves. * * Lines inside fenced code blocks (``` ... ``` or ~~~ ... ~~~) are * skipped so illustrative examples in docs don't get treated as live * rules. */ export declare function parseInlineRules(content: string): InlineParseResult; /** * True if the content contains at least one parseable vigiles inline marker — * an `enforce` rule, a `file` reference, or a `cmd` reference (ignoring fenced * code blocks and malformed markers). A utility for detecting whether a file is * inline-managed (Level-0 mode). Deliberately delegates to `parseInlineRules` so * a loose prefix regex can't report a malformed marker that produces no real * reference. * * NB `require-instructions-spec` is NARROW — it is satisfied only by a `.spec.ts`, * not by inline markers — so this no longer feeds that rule. */ export declare function hasInlineRules(content: string): boolean; //# sourceMappingURL=inline.d.ts.map