/** * `slowcook check prod-honesty` — the mock→prod honesty backbone. * * The mock is design scaffolding: it is *populated* (fixtures), *open* (every * route reachable, no auth walls), and *theatrical* (buttons do local-state * transitions) — all so a human can review it. Those three affordances must * NOT survive into production. The port→brew pipeline strips them when the * mock declares them through the seams; this check is the teeth that fail the * build when scaffolding leaks anyway. * * Why a check and not a test: fixtures, open routes, and dead CTAs are * *absence* obligations ("this fake thing is gone"), and a green test suite * proves presence, not absence. The defect is precisely the code no test * covers — so the enforcement cannot itself be a test. * * Pure-disk, no LLM, no tsc. Regex + readFileSync, mirroring mock-isolation. * * Scans the PRODUCTION tree (default `src/`, override `--dir`). Flags three * classes, each mapping to a field-reported defect: * * A (fixtures) — an inline literal array of ≥2 object literals that is * rendered (`.map(`) in the same file, and the file has no * data seam (`useDataDomain` / a `*BackendOn()` live-mode * gate). The canonical leak: `const ITEMS = [{…},{…}]` + * `{ITEMS.map(…)}` shipped verbatim from the mock. * B (gating) — a file under a routes/pages/app tree that renders route * definitions but contains no auth-guard reference * (`requireAuth` / `RequireAuth` / `getSession` / redirect * to a sign-in path). Heuristic; tuned to catch a router * that gates nothing. * C (dead CTA) — an `onClick`/`onSubmit` handler whose body only calls a * `setState`-shaped setter with no `fetch`/`navigate`/router * push and no explicit `deferred`/disabled acknowledgement. * * Escape hatch: a line or file carrying `// @slowcook-honest` (optionally * `// @slowcook-honest: reason`) is exempt — for the deliberate exceptions * (a genuinely public route, a label-map constant, a demo-only file). Every * exemption is greppable, so the reviewer sees exactly what was waived. */ export type HonestyClass = "fixture" | "gating" | "dead_cta"; export interface HonestyViolation { file: string; line: number; cls: HonestyClass; reason: string; } export interface ProdHonestyResult { violations: HonestyViolation[]; filesChecked: number; } export declare function checkFileHonesty(absFile: string, body: string, repoRoot: string): HonestyViolation[]; export declare function runProdHonestyCheck(repoRoot: string, dir?: string): ProdHonestyResult; export declare function runProdHonestyCli(argv: string[]): void; //# sourceMappingURL=prod-honesty.d.ts.map