/** * `slowcook check spec [file...]` — 0.19.4-α (sc#146 finding 2). * * Re-runs the spec content validators (the same ones refine/agent.ts * calls in-process at emit time) against one or more on-disk spec * files. Designed for CI to catch drift on PRs that AMEND a spec * post-merge — the in-process lint never fires on amendments because * those go straight to git, bypassing refine. * * Three validators wrap one CLI: * - validateAndRepairSpec — token truncation / shape repair * - validateEntityFieldReferences — `entity.field` ↔ auto/backend-entities.md * - validateComponentReuseShape — components_to_reuse mock mentions spec fields * * If `auto/backend-entities.md` is absent the entity-field check is * skipped quietly (its `parseEntityCatalog` returns empty). Same for * the mock reader when the mock/ tree is missing. * * Exit codes: * 0 — no findings across all files * 1 — at least one finding (printed) * 2 — invocation error (unreadable file, parse failure, etc.) */ import { type SpecValidationFinding } from "../refine/spec-validate.js"; export interface SpecCheckPerFileResult { file: string; storyId: string | null; findings: SpecValidationFinding[]; /** Set when the file couldn't be parsed at all (Zod / YAML failure). */ parseError?: string; } export interface SpecCheckResult { perFile: SpecCheckPerFileResult[]; filesChecked: number; totalFindings: number; hasParseErrors: boolean; } /** * Run the check. If `specPaths` is given, validates exactly those * files (used by CI which passes the PR's changed-files list). If * empty/undefined, scans `specs/story-*.yaml`. */ export declare function runSpecValidateCheck(repoRoot: string, specPaths?: string[]): SpecCheckResult; /** CLI wrapper. Wraps `runSpecValidateCheck`, prints, exits. */ export declare function runSpecValidateCli(argv: string[]): void; //# sourceMappingURL=spec-validate.d.ts.map