/**
 * Execution Plan Manager — tracks live progress for multi-step agent tasks.
 *
 * Plans are stored as JSON at .goodvibes/plans/<id>.json and rendered as
 * markdown for injection into the model's context. Self-contained, no
 * orchestrator dependency.
 */
export type PlanItemStatus = 'pending' | 'in_progress' | 'complete' | 'failed' | 'skipped';
export interface PlanItem {
    id: string;
    phase: string;
    description: string;
    status: PlanItemStatus;
    agentId?: string;
    dependencies?: string[];
}
export interface ExecutionPlan {
    id: string;
    title: string;
    createdAt: string;
    updatedAt: string;
    sessionId?: string | undefined;
    status: 'draft' | 'active' | 'complete' | 'failed';
    items: PlanItem[];
    specPath?: string;
    awaitingPlan?: boolean;
}
export interface ExecutionPlanParseIssue {
    readonly line: number;
    readonly text: string;
    readonly reason: string;
}
export type ParsedExecutionPlan = Partial<ExecutionPlan> & {
    parseIssues?: ExecutionPlanParseIssue[] | undefined;
};
export declare class ExecutionPlanManager {
    private readonly projectRoot;
    private readonly plansDir;
    private readonly activeFile;
    private lastCreatedAtMs;
    constructor(projectRoot: string);
    /** Load plan from disk (.goodvibes/plans/<id>.json). Returns null if not found. */
    load(planId: string): ExecutionPlan | null;
    /** Save plan to disk. Creates directories as needed. */
    save(plan: ExecutionPlan): void;
    /** Get the active plan for the current session, if any. */
    getActive(sessionId?: string): ExecutionPlan | null;
    private setActive;
    /** Create a new plan and set it as active. */
    create(title: string, items: Omit<PlanItem, 'id' | 'status'>[], sessionId?: string): ExecutionPlan;
    /** Update a plan item's status (and optionally assign an agent). */
    updateItem(planId: string, itemId: string, status: PlanItemStatus, agentId?: string): void;
    /** List all plans (reads directory, excludes active.json). */
    list(): ExecutionPlan[];
    private nextCreatedAt;
    /**
     * Render plan as markdown for injection into model context.
     *
     * Format:
     *   # Plan Title
     *   ## Phase 1: Setup [COMPLETE]
     *   - [x] Description — COMPLETE (agent-id)
     */
    toMarkdown(plan: ExecutionPlan): string;
    /**
     * Parse a markdown execution plan written by the model into structured format.
     * Robust to minor formatting variations models may produce.
     */
    parseFromMarkdown(markdown: string): ParsedExecutionPlan;
    /** Human-readable summary: "Phase 2: Implementation — 1/3 complete" */
    getSummary(plan: ExecutionPlan): string;
    /**
     * Replace all items in a plan with new items.
     * Used when the model provides a detailed plan in response to /plan.
     * Dependencies expressed as description strings are resolved to item IDs.
     */
    replaceItems(planId: string, items: Omit<PlanItem, 'id' | 'status'>[]): void;
    /** Get next actionable items: dependencies met, status=pending. */
    getNextItems(plan: ExecutionPlan): PlanItem[];
}
//# sourceMappingURL=execution-plan.d.ts.map