/**
 * Task creation logic.
 * @task T4460
 * @epic T4454
 */
import type { Task, TaskPriority, TaskSize, TaskStatus, TaskType, TaskVerification } from '@cleocode/contracts';
import type { DataAccessor } from '../store/data-accessor.js';
/**
 * Options for creating a task.
 *
 * `description` is **required** per CLEO's anti-hallucination rules —
 * every task must have both a title and a description, and they must differ.
 */
export interface AddTaskOptions {
    title: string;
    description: string;
    status?: TaskStatus;
    priority?: TaskPriority;
    type?: TaskType;
    parentId?: string | null;
    size?: TaskSize;
    phase?: string;
    labels?: string[];
    files?: string[];
    acceptance?: string[];
    depends?: string[];
    notes?: string;
    position?: number;
    addPhase?: boolean;
    dryRun?: boolean;
    /** RCASD-IVTR+C pipeline stage to assign. Auto-resolved if not provided. @task T060 */
    pipelineStage?: string;
}
/** Result of adding a task. */
export interface AddTaskResult {
    task: Task;
    duplicate?: boolean;
    dryRun?: boolean;
}
/**
 * Build the default verification metadata applied to every new task.
 * Gates are initialized to false (not yet passed). `passed` starts false
 * because no gates have been verified yet.
 * @task T061
 */
export declare function buildDefaultVerification(initializedAt: string): TaskVerification;
/**
 * Validate a task title.
 * @task T4460
 */
export declare function validateTitle(title: string): void;
/**
 * Validate task status.
 * @task T4460
 */
export declare function validateStatus(status: string): asserts status is TaskStatus;
/** Valid string priority values. */
export declare const VALID_PRIORITIES: readonly TaskPriority[];
/**
 * Normalize priority to canonical string format.
 * Accepts both string names ("critical","high","medium","low") and numeric (1-9).
 * Returns the canonical string format per todo.schema.json.
 * @task T4572
 */
export declare function normalizePriority(priority: string | number): TaskPriority;
/**
 * Validate task priority.
 * @task T4460
 * @task T4572
 */
export declare function validatePriority(priority: string): asserts priority is TaskPriority;
/**
 * Validate task type.
 * @task T4460
 */
export declare function validateTaskType(type: string): asserts type is TaskType;
/**
 * Validate task size.
 * @task T4460
 */
export declare function validateSize(size: string): asserts size is TaskSize;
/**
 * Validate label format.
 * @task T4460
 */
export declare function validateLabels(labels: string[]): void;
/**
 * Validate phase slug format.
 * @task T4460
 */
export declare function validatePhaseFormat(phase: string): void;
/**
 * Validate dependency IDs exist.
 * @task T4460
 */
export declare function validateDepends(depends: string[], tasks: Task[]): void;
/**
 * Validate parent hierarchy constraints.
 * @task T4460
 */
export declare function validateParent(parentId: string, tasks: Task[], maxDepth?: number, maxSiblings?: number): void;
/**
 * Get the depth of a task in the hierarchy.
 * @task T4460
 */
export declare function getTaskDepth(taskId: string, tasks: Task[]): number;
/**
 * Infer task type from parent context.
 * @task T4460
 */
export declare function inferTaskType(parentId: string | null | undefined, tasks: Task[]): TaskType;
/**
 * Get the next position for a task within a parent scope.
 * @task T4460
 */
export declare function getNextPosition(parentId: string | null | undefined, tasks: Task[]): number;
/**
 * Log an operation to the audit log.
 * @task T4460
 */
export declare function logOperation(operation: string, taskId: string, details: Record<string, unknown>, accessor?: import('../store/data-accessor.js').DataAccessor): Promise<void>;
/**
 * Check for recent duplicate task.
 * @task T4460
 */
export declare function findRecentDuplicate(title: string, phase: string | undefined, tasks: Task[], windowSeconds?: number): Task | null;
/**
 * Add a new task to the todo file.
 * @task T4460
 */
export declare function addTask(options: AddTaskOptions, cwd?: string, accessor?: DataAccessor): Promise<AddTaskResult>;
//# sourceMappingURL=add.d.ts.map