/**
 * 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<string, Phase>, 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<string, Phase>): 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, Phase>): string | null;
/**
 * Check if all phases are complete.
 */
export declare function allPhasesComplete(phases: Record<string, Phase>): boolean;
//# sourceMappingURL=phase-tracking.d.ts.map