import type { RuleSeverity } from "./types.js"; /** An inline code span with its 1-based source line. */ export interface Span { readonly text: string; readonly line: number; } /** * Extract inline code spans, skipping fenced code blocks (R1). Returns each * span's trimmed text and 1-based line. */ export declare function inlineSpans(markdown: string): Span[]; /** A parsed file-qualified reference. */ export interface SymbolRef { readonly file: string; readonly symbol: string; readonly line: number; } /** A reference that failed verification. */ export interface SymbolRefError extends SymbolRef { readonly reason: string; } /** Extract the `vigiles:symbol` references from a markdown file. */ export declare function symbolRefs(markdown: string): SymbolRef[]; /** * Verify the file-qualified symbol references in a markdown file: the named * file must exist and define the named symbol. `basePath` is the directory the * paths resolve against (the instruction file's own directory). */ export declare function verifySymbolRefs(markdown: string, basePath: string): Promise; /** * Whether a span is a **linter-rule reference** that ought to be marked * (`enforce()` / inline ``) so the lint can verify the * rule exists AND is enabled. High-signal only: a slash-scoped name with no file * extension. A function-call form `` `foo(args)` `` is reduced to its callee. * * Deliberately NOT flagged (too noisy / undecidable): bare identifiers * (`runHook`, `MAX_RETRIES` — usually API prose, mark opt-in via an explicit * `vigiles:symbol`) and file paths (`src/x.ts`, `docs/y.md` — file refs). */ export declare function isCodeShaped(text: string): boolean; /** * Unmarked linter-rule references — the spans the refs-hook nudges the agent to * mark with `enforce()` / `` (or opt out of with * `` / ``). */ export declare function unmarkedCodeRefs(markdown: string): Span[]; /** * The reference issues in an instruction file, as one human-readable line each: * a `vigiles:symbol` mark whose symbol is missing, plus every unmarked * code-shaped span that ought to be a mark. The shared detector behind both the * `vigiles refs` CLI and the PostToolUse refs-hook. */ export declare function collectRefIssues(markdown: string, basePath: string): Promise; /** What the refs-hook should do given the issue count and configured severity. */ export type RefsHookAction = "ok" | "nudge" | "block"; /** * Map detected issues + the `unmarked-refs` rule severity to a hook action: * no issues or `false` → ok, `"error"` → block (exit 2), anything else * (`"warn"`, the default) → a non-blocking nudge. */ export declare function refsHookAction(issueCount: number, severity: RuleSeverity): RefsHookAction; //# sourceMappingURL=refs.d.ts.map