/** * @fileoverview Resolve a recipe name → an ordered rule subset. * * Turns a `--recipe ` value into the `readonly Rule[]` the * orchestrator runs, using Plan A's generic `resolveSelector` over the * scope's rule registry. Graph rules are keyed by slug; the resolver view * exposes each rule as `{ id: slug, name: slug }` so core's `explicit`/`all` * arms match. Registration order is preserved. * * Resolution lives in this CLI-adjacent layer (not the engine): the engine * stays recipe-agnostic and consumes the resolved subset via * `RunGraphInput.rules`. */ import type { Rule } from '../types.js'; /** The effective recipe name together with its resolved rule subset. */ export interface ResolvedGraphRecipeRules { readonly name: string; readonly rules: readonly Rule[]; } /** * Resolve a recipe name to its ordered rule subset. `undefined` resolves the * built-in `default` recipe (all rules). * * Tolerance (ADR-0022): when `opts.tolerant` is true (the name came from * `graph.recipe`, not an explicit `--recipe` flag) an unknown name falls back * to the built-in `default` recipe with a warning instead of aborting, because * a copied config default may legitimately target another tool. When * `opts.tolerant` is false (the default — an explicit flag) an unknown name * throws a `ConfigurationError` so the CLI's `handleGraphError` maps it to * `EXIT_CODES.CONFIGURATION_ERROR` (typo * protection). */ export declare function resolveRecipeWithRules(name?: string, opts?: { readonly tolerant?: boolean; }): ResolvedGraphRecipeRules; /** * Resolve a recipe name to its ordered rule subset only. * * Thin convenience wrapper over {@link resolveRecipeWithRules} for callers that * do not need the effective recipe name. Shares the same tolerance / unknown- * recipe behaviour as that function. */ export declare function resolveRecipeToRules(name?: string, opts?: { readonly tolerant?: boolean; }): readonly Rule[]; //# sourceMappingURL=resolve.d.ts.map