/**
 * Unified hierarchy policy resolution and validation.
 * Single source of truth for all hierarchy enforcement paths.
 *
 * @epic T4454
 * @task T5001
 */
import type { CleoConfig, Task } from '@cleocode/contracts';
export interface HierarchyPolicy {
    maxDepth: number;
    maxSiblings: number;
    maxActiveSiblings: number;
    countDoneInLimit: boolean;
    enforcementProfile: 'llm-agent-first' | 'human-cognitive' | 'custom';
}
export interface HierarchyValidationResult {
    valid: boolean;
    error?: {
        code: string;
        message: string;
    };
}
export declare const ENFORCEMENT_PROFILES: {
    readonly 'llm-agent-first': {
        readonly maxSiblings: 0;
        readonly maxActiveSiblings: 0;
        readonly maxDepth: 3;
        readonly countDoneInLimit: false;
    };
    readonly 'human-cognitive': {
        readonly maxSiblings: 7;
        readonly maxActiveSiblings: 3;
        readonly maxDepth: 3;
        readonly countDoneInLimit: false;
    };
};
/**
 * Resolve a full HierarchyPolicy from config, starting with a profile preset
 * and overriding with any explicitly set config.hierarchy fields.
 */
export declare function resolveHierarchyPolicy(config: CleoConfig): HierarchyPolicy;
/**
 * Assert that a parent task exists in the task list.
 * Returns an error result if not found, null if OK.
 */
export declare function assertParentExists(parentId: string, tasks: Task[]): HierarchyValidationResult | null;
/**
 * Assert that re-parenting would not create a cycle.
 * Returns an error result if a cycle is detected, null if OK.
 */
export declare function assertNoCycle(taskId: string, newParentId: string, tasks: Task[]): HierarchyValidationResult | null;
/**
 * Count active (non-done, non-cancelled, non-archived) children of a parent.
 */
export declare function countActiveChildren(parentId: string, tasks: Task[]): number;
/**
 * Validate whether a new task can be placed under the given parent
 * according to the resolved hierarchy policy.
 */
export declare function validateHierarchyPlacement(parentId: string | null, tasks: Task[], policy: HierarchyPolicy): HierarchyValidationResult;
//# sourceMappingURL=hierarchy-policy.d.ts.map