/** * BugProfile — the artefact emitted by `slowcook investigate`. * * Lives at `.brewing/bug-profiles/B-.yaml`. Plays the role for * the bug-fix flow that `specs/story-N.yaml` plays for the story * flow: the contract between investigate (or refine) and the next * agent down the pipeline (sift / brew). * * v1 (slowcook 0.13.0) shape. Schema version bump on any field * removal or rename. */ export declare const BUG_PROFILE_SCHEMA_VERSION: 1; /** * Bug ids are sequential under `B-`. The numbering is independent * of `story-` — bugs and stories are different artefact types. * Race-condition collision avoidance: same logic as story-id picker * (slowcook#8 fix); the picker walks `.brewing/bug-profiles/` and * matching `slowcook/bug-profile/B-*` branches before assigning. */ export type BugId = string; export interface FailureLocus { /** Repo-relative path where the failure originates (or where the * fix should land if multi-site). Always present. */ file: string; /** 1-based line of the offending statement when known. */ line?: number; /** Function / method / route name when known. */ function?: string; /** One-paragraph human-readable diagnosis from the investigate * agent. The "why broken", not the "how to fix" — fix-shaping * happens in sift. */ diagnosis: string; } export interface RelatedSpec { /** Spec or bug id that's relevant context. */ id: string; /** Relationship hint — guides chef when sequencing fixes. */ relationship: "touches" | "supersedes" | "related" | "duplicates"; /** One-line explanation. Optional. */ note?: string; } export interface BugProfile { /** $schema field for editor tooling. */ $schema?: string; schema_version: typeof BUG_PROFILE_SCHEMA_VERSION; bug_id: BugId; /** Human title — usually a paraphrase of the issue title. */ title: string; /** GitHub issue number (`#NNN`). */ source_issue: string; /** Lifecycle. Mirrors story-flow status semantics. */ status: "investigated" | "recipe-emitted" | "sifted" | "shipped" | "closed"; /** Investigate agent + version that emitted this profile. */ investigated_by: string; /** ISO-8601 timestamp of emission. */ created_at: string; /** What the user / reporter sees. Verbatim or close-paraphrase * from the issue body. Refine-style paraphrasing is forbidden; * see the "PM intent carries weight" rule. */ symptom: string[]; /** What the system should do instead. Often inferable from the * issue body; otherwise asked of the PM. */ expected: string[]; /** Minimum repro steps. Often a one-liner ("load /feed as authed * user"); rarely longer than 3 steps. */ reproduction: string[]; /** Where the bug actually lives in the code. The investigate * agent's job is to find this. */ failure_locus: FailureLocus; /** What the regression test should assert in plain English. * recipe --regression turns this into a vitest file. */ regression_assertion: string[]; /** Paths the fix is allowed to touch. Sift uses this as * allowed_paths. Narrow on purpose — bug fixes shouldn't sprawl. */ fix_scope: string[]; /** Stories or bugs this fix interacts with. */ related_specs?: RelatedSpec[]; } /** * Validate a parsed YAML object against the schema. Returns * `{ ok: true, profile }` on success, `{ ok: false, errors }` * otherwise. Hand-rolled; we don't want a JSON-schema dep. */ export declare function validateBugProfile(input: unknown): { ok: true; profile: BugProfile; } | { ok: false; errors: string[]; }; //# sourceMappingURL=schema.d.ts.map