import type { Cli } from "../internals/clis.js"; import type { PlanContext } from "../internals/plan.js"; /** * LOADABILITY — present file ≠ loaded. The coverage matrix asks "is the bootloader * there and in sync"; this asks "will the CLI actually load it every turn, and does * the pointer chain it routes to resolve". It catches the silent-failure class a * file-existence check can't see: a Cursor `.mdc` with `alwaysApply:false` (present, * in sync, never auto-loaded), a Kiro steering file missing `inclusion: always`, a * BOM/unterminated frontmatter that won't parse, or a bootloader that points at a * `RULE_ROUTER.md` that isn't there. * * Honesty rule (D0/D6): three verdicts, never collapsed. `loads` means the * structural checks pass AND a registered Tier-2 dry-run probe printed the router * sentinel. `wontLoad` is proven broken. `unverified` is "can't prove from a repo * scan" (e.g. no bootloader yet, or no CLI context-dump probe is registered). */ export type LoadVerdict = "loads" | "wontLoad" | "unverified"; export interface LoadCheck { name: "activation" | "frontmatter-hygiene" | "router-chain" | "context-cap" | "dry-run-probe"; /** true = pass, false = fail (→ wontLoad), undefined = n/a or not runtime-proven. */ ok: boolean | undefined; detail: string; } export interface CliLoadability { cli: Cli; verdict: LoadVerdict; checks: LoadCheck[]; /** One-line fix, present only when `wontLoad`. */ fix?: string; } /** * Spawn-free loadability for reports/digests. Structural failures still fail * closed, but a structural pass becomes `unverified` unless a dry-run probe is * executed by {@link loadabilityForWithDryRun}. */ export declare function loadabilityFor(ctx: PlanContext, cli: Cli): CliLoadability; /** Runtime Tier-2 loadability for doctor --verify; executes only registered local probes. */ export declare function loadabilityForWithDryRun(ctx: PlanContext, cli: Cli): Promise; /** Compact one-line reason for the matrix tooltip / terminal remediation. */ export declare function loadReason(l: CliLoadability): string;