/**
 * Deterministic impeccable scan — runs the `impeccable detect --json` CLI
 * against a design directory and returns structured findings.
 *
 * No LLM call; the refinement loop surfaces these findings to the
 * apply-changes stage so the agent can fix banned anti-patterns
 * alongside user feedback.
 */
/** Shape of a single finding emitted by `impeccable detect --json`. */
export interface ScanFinding {
    readonly antipattern: string;
    readonly name: string;
    readonly description: string;
    readonly file: string;
    readonly line: number;
    readonly snippet: string;
}
/**
 * Result of running the scanner. Discriminated on `available` so callers
 * can distinguish "ran successfully, no findings" from "scanner missing".
 */
export type ScanResult = {
    readonly available: true;
    readonly findings: readonly ScanFinding[];
} | {
    readonly available: false;
    readonly reason: string;
};
/**
 * Run `impeccable detect --json` against `designDir`. The CLI exits 0
 * whether or not findings exist, so we parse the JSON array and return
 * its length. If the CLI is missing or its output is not parseable,
 * return `{ available: false, reason }` so the caller can gracefully
 * proceed without scan input.
 */
export declare function runImpeccableScan(designDir: string): Promise<ScanResult>;
/**
 * Returns true iff the scanner ran successfully AND reported at least
 * one finding. Narrows the union so callers can access `findings`.
 */
export declare function hasBlockingFindings(scan: ScanResult): scan is {
    available: true;
    findings: readonly ScanFinding[];
};
/**
 * Render findings as a human-readable block for inclusion in agent
 * prompts. Groups by anti-pattern id, lists each file:line with snippet.
 */
export declare function renderScanFindings(findings: readonly ScanFinding[]): string;
//# sourceMappingURL=scan.d.ts.map