/** * Task update logic. * @task T4461 * @epic T4454 */ import type { Task, TaskKind, TaskPriority, TaskRecord, TaskScope, TaskSeverity, TaskSize, TaskStatus, TaskType } from '@cleocode/contracts'; import { type EngineResult } from '../engine-result.js'; import type { DataAccessor } from '../store/data-accessor.js'; /** Options for updating a task. */ export interface UpdateTaskOptions { taskId: string; title?: string; status?: TaskStatus; priority?: TaskPriority; type?: TaskType; size?: TaskSize; phase?: string; description?: string; labels?: string[]; addLabels?: string[]; removeLabels?: string[]; depends?: string[]; addDepends?: string[]; removeDepends?: string[]; notes?: string; acceptance?: string[]; files?: string[]; /** Add files incrementally without replacing the full array. @task T9242 */ addFiles?: string[]; /** Remove files incrementally. @task T9242 */ removeFiles?: string[]; blockedBy?: string; /** Clear the blockedBy free-text reason. @task T9241 */ clearBlockedBy?: boolean; parentId?: string | null; noAutoComplete?: boolean; /** RCASD-IVTR+C pipeline stage transition target. Must be >= current stage. @task T060 */ pipelineStage?: string; /** * Task kind axis — intent of work, orthogonal to {@link type}. * @task T944 * @task T9072 */ kind?: TaskKind; /** * Task scope axis — granularity of work, orthogonal to {@link type} and {@link kind}. * @task T944 */ scope?: TaskScope; /** * Severity level — valid for any role (widened from bug-only by T9073). * Orthogonal to priority — does NOT auto-map priority. * @task T9073 */ severity?: TaskSeverity; /** * Operator-supplied justification required to override the * acceptance-criteria immutability guard once a task has entered the * implementation pipeline stage. When supplied, the override is recorded * in `.cleo/audit/ac-changes.jsonl` together with the before/after AC. * * Without `--reason`, an attempt to mutate `acceptance` on a task in * stage `implementation` (or any later stage) is rejected with * {@link ExitCode.AC_LOCKED}. * * @epic T1586 Foundation Lockdown * @task T1590 */ reason?: string; /** Set related tasks (replaces existing). @task T9327 */ relates?: Array<{ taskId: string; type: string; reason?: string; }>; /** Add related tasks without overwriting existing. @task T9327 */ addRelates?: Array<{ taskId: string; type: string; reason?: string; }>; /** Remove related tasks by taskId. @task T9327 */ removeRelates?: string[]; } /** Result of updating a task. */ export interface UpdateTaskResult { task: Task; changes: string[]; } /** * Update a task's fields. * @task T4461 */ export declare function updateTask(options: UpdateTaskOptions, cwd?: string, accessor?: DataAccessor): Promise; /** * Update a task's fields, wrapped in EngineResult. * * @param projectRoot - Absolute path to the project root * @param taskId - Task identifier to update * @param updates - Fields to update (only provided fields are changed) * @returns EngineResult with the updated task record and list of changes * * @task T1568 * @epic T1566 */ export declare function taskUpdate(projectRoot: string, taskId: string, updates: { title?: string; description?: string; status?: string; priority?: string; notes?: string; labels?: string[]; addLabels?: string[]; removeLabels?: string[]; depends?: string[]; addDepends?: string[]; removeDepends?: string[]; acceptance?: string[]; parent?: string | null; type?: string; size?: string; files?: string[]; addFiles?: string[]; removeFiles?: string[]; pipelineStage?: string; kind?: string; scope?: string; severity?: string; reason?: string; /** Set the blockedBy free-text reason. @task T9241 (gh#1106) */ blockedBy?: string; clearBlockedBy?: boolean; /** @task T9327 */ relates?: Array<{ taskId: string; type: string; reason?: string; }>; /** @task T9327 */ addRelates?: Array<{ taskId: string; type: string; reason?: string; }>; /** @task T9327 */ removeRelates?: string[]; }): Promise>; //# sourceMappingURL=update.d.ts.map