/**
 * TaskRecord — canonical task-record shape (C28 D-02, D-06).
 *
 * Superset of the legacy `ActiveTask`/`CompletedTask` shapes in `state.ts`.
 * Every writer in apt-tools.mjs and every consumer (skills, prompts, agents)
 * must agree on this shape. New fields land here first, not inline in the
 * CLI kernel.
 */
import type { LifecyclePhase } from './lifecycle';
import type { Scope } from './scope';
export type TaskTrack = 'QUICK' | 'STANDARD' | 'DEEP' | 'DEBUG';
/** One transition entry on a task's history log. `reason` is required
 * for cross-scope moves, cascade-nulls, and force operations. */
export interface TaskHistoryEntry {
    from: {
        scope: Scope;
        milestone_id: string | null;
        phase_id: string | null;
    };
    to: {
        scope: Scope;
        milestone_id: string | null;
        phase_id: string | null;
    };
    at: string;
    actor: string;
    reason?: string;
    /** True when the entry records a cascade-null from a destructive
     * roadmap edit (`roadmap set-phase-status --force --reason`). */
    cascade_nulled?: boolean;
}
export interface TaskProgress {
    subtasks_total: number;
    subtasks_completed: number;
    current_subtask: string | null;
}
export interface TaskRecord {
    id: string;
    description: string;
    track: TaskTrack;
    autonomy: 0 | 1 | 2 | 3;
    scope: Scope;
    milestone_id: string | null;
    phase_id: string | null;
    roadmap_ref_url: string | null;
    depends_on: string[];
    lifecycle_phase: LifecyclePhase;
    history: TaskHistoryEntry[];
    progress: TaskProgress;
    created_at: string;
    worktree_path?: string;
    branch?: string;
    base_branch?: string;
    remote_tracking?: boolean;
    push_warning?: string;
    worktree_warning?: string;
    /**
     * C56 A2 — URL of the PR opened by `apt:ship` for this task. Used by
     * `apt-tools task close` (when `task_isolation.auto_close_phase: true`)
     * and by `apt-tools task close-merged` (/apt:close-task) to confirm
     * merge state via `gh pr view`. Absent for quick tasks that never ship.
     */
    pr_url?: string;
}
/** Completed task row stored under `state.completed_tasks[]`. */
export interface CompletedTaskRecord {
    id: string;
    description: string;
    scope: Scope;
    completed_at: string;
    qa_verdict: 'approved' | 'approved_with_notes' | 'rejected' | 'completed';
    commits: string[];
    lifecycle_phase?: LifecyclePhase;
}
//# sourceMappingURL=task-record.d.ts.map