/** * `slowcook recipe --regression --bug B-` — emits a regression * test from a bug-profile. * * **Status: alpha.3a**. Stub-only emitter: writes a deterministic * vitest skeleton at `tests/regression/B--.test.ts` that * asserts via `expect.fail()` so the test is red until sift replaces * the body with real assertions (alpha.4) or alpha.3b upgrades this * emitter to write real tests via an LLM agent. * * The skeleton structure is what sift expects to see: * - one `describe` named for the bug id + title * - one `it` per regression_assertion line * - body of each `it` calls `expect.fail(...)` referencing the bug * profile so the failure message points the operator at the right * artefact when the test runs. * * Usage: * slowcook recipe --regression --bug B-1 [--cwd ] * * Internally invoked from the CLI's `recipe`/`testgen` dispatch when * `--regression` is present (see cli.ts wiring). */ import { type BugProfile } from "../investigate/schema.js"; export interface RecipeRegressionArgs { bugId: string; repoRoot: string; dryRun: boolean; /** * 0.13.0-alpha.3b: when true, route through the LLM-backed emitter * (real test, can be flipped green by sift). When false, fall back * to the deterministic alpha.3a stub (expect.fail body — only * useful for testing the file-system layout). Stub stays as the * default through 0.13.0 because LLM mode requires ANTHROPIC_API_KEY * + actually exercises the agent; CI / scripted runs that just * want a placeholder file don't want an LLM call. */ useLlm: boolean; /** Anthropic model (LLM mode only). Default sonnet — single-shot * regression test emission shouldn't need Opus. */ model: string; } export declare function parseRecipeRegressionArgs(argv: string[]): RecipeRegressionArgs; /** * Accept "1", "B-1", or "B1" and normalise to "B-". */ export declare function normaliseBugId(raw: string): string; export declare function recipeRegression(argv: string[], cliVersion: string): Promise; export declare function loadBugProfile(repoRoot: string, bugId: string): BugProfile; export interface RegressionFile { path: string; contents: string; } /** * Build the stub regression test for a bug profile. Deterministic — * same profile → same file. Sift overwrites with real assertions in * alpha.4; alpha.3b will replace this stub emitter with an LLM-written * real test. */ export declare function renderRegressionStub(profile: BugProfile, cliVersion: string): RegressionFile; //# sourceMappingURL=index.d.ts.map