/** * recipe-default — resolve which recipe NAME a tool should use (ADR-0022). * * Recipes are tool-scoped: `fit`, `graph`, and `sim` each own a separate recipe * registry with a disjoint namespace, so a default recipe is a per-tool setting. * Each tool reads its own `.recipe` config block. * * This helper is pure — the caller supplies the two already-read inputs and * gets back the chosen name plus a `tolerant` flag. Tolerance is the ADR-0022 * guardrail split: a name that came from CONFIG (`.recipe`) but is absent * from the active tool's registry should * fall back to the tool's built-in `default` rather than abort the run — the * default may legitimately belong to a different tool. An EXPLICIT `--recipe` * flag stays strict (`tolerant: false`) so a typo still hard-fails. * * Lives in contracts (not core, not a single tool) because all three tools * consume it and it is part of the CLI↔tool config seam. Resolution precedence: * * explicit `--recipe` > `.recipe` > `default` */ /** Where the resolved recipe name came from, in precedence order. */ export type RecipeSource = 'flag' | 'tool-config' | 'builtin'; /** Built-in recipe name every tool registers (all rules / all checks). */ export declare const BUILTIN_DEFAULT_RECIPE = "default"; /** * The outcome of {@link resolveToolRecipeName}: the chosen recipe `name`, which * input it came from (`source`), and whether an unknown `name` should be * tolerated (fall back to the built-in default) or hard-fail. */ export interface ResolvedRecipe { /** The recipe name the tool should look up in its registry. */ readonly name: string; /** Which input supplied {@link name}. */ readonly source: RecipeSource; /** * `false` only when `source === 'flag'`. When `true`, an unknown `name` * should fall back to {@link BUILTIN_DEFAULT_RECIPE} with a warning instead * of aborting — the name came from config and may target another tool. */ readonly tolerant: boolean; } /** * Resolve the recipe name for a tool from its three possible sources. See the * module docstring for precedence and the tolerance contract (ADR-0022). * * @param input.explicit The `--recipe ` flag value (strict if present). * @param input.toolRecipe The tool's own `.recipe` config default. */ export declare function resolveToolRecipeName(input: { readonly explicit?: string; readonly toolRecipe?: string; }): ResolvedRecipe; //# sourceMappingURL=recipe-default.d.ts.map