/** * Parses the frozen master-plan markdown (produced by the master-plan skill) * into structured stages and tasks. This is the contract between the skill's * output format and diablo's engine, so it is strict: a malformed plan throws * rather than silently producing an empty pipeline. * * Pure (no I/O) so it is unit-tested directly against the skill's exact format: * * ### Stage N - Title * [T-00X] - Task title * - Objective: ... * - Target Files: a.ts, b.ts * - Dependency: T-001 , T-002 (or None) * - Acceptance Criterias: * - Criterion 1 * - Criterion 2 */ export interface PlanTask { id: string; title: string; objective: string; targetFiles: string[]; dependencies: string[]; acceptanceCriteria: string[]; } export interface PlanStage { number: number; title: string; tasks: PlanTask[]; } export interface Plan { stages: PlanStage[]; } /** * Thrown when the frozen plan markdown does not match the master-plan skill's * contract. Carries a `diagnostic` — a specific, actionable description of what * was expected and not found — so the run can (a) halt with a message a human * can act on, and (b) re-ask the planner with the exact complaint injected, * rather than crashing with a generic error after the priciest step has run. */ export declare class PlanParseError extends Error { readonly diagnostic: string; constructor(diagnostic: string); } export declare function parsePlan(markdown: string): Plan;