import type { ActiveSprint, Handoff, Phase, SprintFile, Task, TaskExecutionInfo } from '../types'; import type { KyroScopeStatus } from '../artifacts/schema'; /** * Pure lifecycle-status derivation. These functions compute the *truth* of a phase/sprint/scope from * the authoritative leaf — `task.status` — so display and analyze never depend on an authored status * field that the instruction layer forgot to update. No I/O, no mutation. */ export type DerivedPhaseStatus = 'pending' | 'active' | 'blocked' | 'done'; export type DerivedSprintStatus = 'planned' | 'executing' | 'complete'; export type { TaskBlockReason, TaskExecutionInfo, TaskExecutionState } from '../types'; /** All active task records in deterministic phase/emergent order. */ export declare function collectSprintTasks(active: ActiveSprint): Task[]; /** Verified completion: done + fresh pass, and never a disposition. */ export declare function isTaskVerifiedComplete(task: Task): boolean; /** * Computes dependency readiness without changing task records. Blockage propagates only as a derived * read-model; siblings remain ready and a newly resolved prerequisite immediately unblocks descendants. */ export declare function taskExecutionInfo(sprint: SprintFile): TaskExecutionInfo[]; /** First dependency-satisfied task in stable phase/emergent order. */ export declare function nextExecutableTaskId(sprint: SprintFile, skipId?: string): string | null; export declare function reviewPendingTaskIds(sprint: SprintFile): string[]; /** One routing truth for writers and read models: an active sprint with no ready/review task is not executable. */ export declare function deriveLiveWorkHandoff(sprint: SprintFile, scope: string, recomputeExecutionRoute?: boolean): Pick; /** * With execution state supplied, a phase is active whenever it has a ready task or pending review; * otherwise a true dependency/self block is surfaced. The fallback preserves legacy call sites. */ export declare function derivePhaseStatus(phase: Phase, execution?: ReadonlyMap): DerivedPhaseStatus; /** From all tasks in the sprint (phases + emergent): none → planned; all done → complete; else executing. */ export declare function deriveActiveSprintStatus(active: ActiveSprint): DerivedSprintStatus; /** * A scope is active whenever work can be executed or reviewed. It is blocked only when unfinished, * undisposed work remains but every route is blocked/waiting. Explicit handoff blockers remain a * human-authored scope-wide stop signal. */ export declare function deriveScopeStatus(sprint: SprintFile, hasActiveSprint: boolean): KyroScopeStatus; /** Map stored status vocabulary onto the derived vocabulary for legacy coherence checks. */ export declare function normalizeStoredPhaseStatus(stored: string): DerivedPhaseStatus | string; /** Unfinished tasks that still lack a typed disposition — close must refuse these. */ export declare function undisposedCloseTasks(active: ActiveSprint): Task[]; export declare function disposedCloseTasks(active: ActiveSprint): Task[]; /** Sprint-level close class. Callers still refuse undisposed tasks before persisting. */ export declare function deriveSprintCloseOutcomeClass(active: ActiveSprint): 'completed' | 'partial'; //# sourceMappingURL=status.d.ts.map