/** * Phase tracking - manage project phases and task-phase relationships. * Ported from lib/tasks/phase-tracking.sh * * @epic T4454 * @task T4529 */ import type { Phase, PhaseStatus, PhaseTransition, ProjectMeta, Task } from '@cleocode/contracts'; /** Phase progress information. */ export interface PhaseProgress { name: string; status: PhaseStatus; total: number; done: number; active: number; pending: number; blocked: number; percentComplete: number; } /** * Get the current active phase from project metadata. */ export declare function getCurrentPhase(project: ProjectMeta): Phase | null; /** * Get tasks belonging to a specific phase. */ export declare function getTasksByPhase(phaseName: string, tasks: Task[]): Task[]; /** * Calculate progress for a phase. */ export declare function calculatePhaseProgress(phaseName: string, tasks: Task[]): PhaseProgress; /** * Get progress for all phases. */ export declare function getAllPhaseProgress(phases: Record, tasks: Task[]): PhaseProgress[]; /** * Validate a phase transition. */ export interface PhaseTransitionValidation { valid: boolean; error?: string; } export declare function validatePhaseTransition(fromPhase: string | null, toPhase: string, phases: Record): PhaseTransitionValidation; /** * Create a phase transition record. */ export declare function createPhaseTransition(phase: string, transitionType: PhaseTransition['transitionType'], taskCount: number, fromPhase?: string | null, reason?: string): PhaseTransition; /** * Apply a phase transition to project metadata. * Returns updated project data. */ export declare function applyPhaseTransition(project: ProjectMeta, toPhase: string, transitionType: PhaseTransition['transitionType'], taskCount: number, reason?: string): ProjectMeta; /** * Get the next phase in order. */ export declare function getNextPhase(currentPhaseName: string | null, phases: Record): string | null; /** * Check if all phases are complete. */ export declare function allPhasesComplete(phases: Record): boolean; //# sourceMappingURL=phase-tracking.d.ts.map