/** * `slowcook check mock-isolation` — 0.16.0-α.13. * * Static structural check: every TypeScript file under `mock/src/` and * `mock/scenarios/` must only import from: * * - npm packages (anything not starting with "." or "/" or "@/") * - relative paths that stay inside mock/ (`./`, `../` that don't escape) * - the `@/` alias (which resolves to mock/src/, NOT the consumer's * production src/) — and the resolved target file must exist * * Specifically REJECTS: * * - `@/` imports that resolve to a path NOT present in mock/src/ * (e.g. vibe writing `import { X } from "@/lib/emotions"` when * emotions only exists in the consumer's production `src/lib/`) * - Relative parent-traversal imports that escape `mock/` * * Why a hard check: vibe's prompt includes a "DO NOT cross-import" * rule (slowcook 0.16.0-α.12), but prompts are soft signals. A real * structural check fails CI on slippage and gives the architecture's * "two filesystems" rule a teeth-bearing enforcement. * * The check runs in two contexts: * * - Locally via `slowcook check mock-isolation [--cwd ]` * - Inside the `slowcook-vibe.yml` workflow as a post-emit step * (so vibe's PR fails if the LLM regresses and pushes a bad * import) * * Pure-disk check; no LLM. No tsc dependency. Regex + readFileSync. */ export interface MockIsolationViolation { file: string; line: number; importPath: string; reason: string; } export interface MockIsolationResult { violations: MockIsolationViolation[]; filesChecked: number; } /** * Run the check. Returns the list of violations + how many files were * scanned. Empty violations array = clean. */ export declare function runMockIsolationCheck(repoRoot: string): MockIsolationResult; /** * Inspect one file's import statements. Returns violations. */ export declare function checkFile(absFile: string, body: string, repoRoot: string, mockRoot: string): MockIsolationViolation[]; //# sourceMappingURL=mock-isolation.d.ts.map