/**
 * /goal-style workflow: translate a goal into a plan + tasks, claim steps,
 * track progress, and produce deterministic handoffs — local-only, no hosted calls.
 */
import type { Database } from "bun:sqlite";
import type { Task, TaskPriority } from "../types/index.js";
export declare const GOAL_WORKFLOW_VERSION = "todos.goal-workflow.v1";
export interface GoalStep {
    title: string;
    description?: string;
    priority?: TaskPriority;
    estimated_minutes?: number;
    tags?: string[];
}
export interface GoalInput {
    goal: string;
    project_id?: string;
    task_list_id?: string;
    agent_id?: string;
    steps?: GoalStep[];
    /** Chain steps sequentially with dependencies (default true) */
    sequential?: boolean;
}
export interface GoalManifest {
    schema_version: typeof GOAL_WORKFLOW_VERSION;
    goal: string;
    plan_id: string;
    plan_name: string;
    root_task_id: string;
    step_task_ids: string[];
    project_id: string | null;
    agent_id: string | null;
    created_at: string;
}
export interface GoalProgress {
    plan_id: string;
    goal: string;
    total_steps: number;
    pending: number;
    in_progress: number;
    completed: number;
    failed: number;
    current_step: Task | null;
    steps: Array<{
        id: string;
        title: string;
        status: string;
        short_id: string | null;
    }>;
}
export interface ParsedGoalCommand {
    action: "execute" | "status" | "handoff" | "create" | "unknown";
    target: string;
    raw: string;
}
/** Command recipes for Codex, Claude Code, Takumi, and MCP agents */
export declare const GOAL_COMMAND_RECIPES: readonly [{
    readonly host: "codex|claude-code|takumi|mcp";
    readonly command: "/goal execute <plan-name>";
    readonly description: "Claim and start the next ready step for a goal plan";
    readonly equivalent_cli: "todos goal execute <plan-name> --agent <name>";
}, {
    readonly host: "codex|claude-code|takumi|mcp";
    readonly command: "/goal create \"<goal text>\" --steps step1,step2,step3";
    readonly description: "Create a plan and decompose into sequential tasks";
    readonly equivalent_cli: "todos goal create \"<goal>\" --step \"step1\" --step \"step2\"";
}, {
    readonly host: "codex|claude-code|takumi|mcp";
    readonly command: "/goal status <plan-name>";
    readonly description: "Show plan progress and current step";
    readonly equivalent_cli: "todos goal status <plan-name>";
}, {
    readonly host: "codex|claude-code|takumi|mcp";
    readonly command: "/goal handoff <plan-name>";
    readonly description: "Produce JSON/Markdown handoff packet for session transfer";
    readonly equivalent_cli: "todos goal handoff <plan-name> --format md";
}];
export declare function parseGoalCommand(command: string): ParsedGoalCommand;
export declare function resolvePlanId(planRef: string, db?: Database): string | null;
export declare function createGoalWorkflow(input: GoalInput, db?: Database): GoalManifest;
export declare function getGoalProgress(planRef: string, db?: Database): GoalProgress | null;
export declare function claimGoalStep(planRef: string, agentId: string, db?: Database): Task | null;
export declare function logGoalProgress(taskId: string, message: string, agentId?: string, pctComplete?: number, db?: Database): void;
export declare function formatGoalHandoff(planRef: string, format?: "json" | "markdown", agentId?: string, db?: Database): string | null;
export declare function getGoalCommandRecipesMarkdown(): string;
//# sourceMappingURL=goal-workflow.d.ts.map