/** * Coordination parent detection and rollup evidence synthesis. * * A "coordination parent" is a task that: * 1. Has no files of its own (`files` is absent, null, or empty). * 2. Has at least one registered child. * 3. Has `noAutoComplete` unset or `false`. * * These tasks act purely as scope containers — their scope was delivered * entirely by their children (e.g. T1916/T1918/T1919 in T1910). Before T9040, * they required manual evidence atoms and stayed `pending` forever unless the * orchestrator performed an expensive workaround. * * This module provides: * - {@link isCoordinationParent} — predicate used by the completion path. * - {@link buildRollupEvidence} — synthesizes verification evidence by * aggregating children's gate state. * * @task T9040 */ import type { Task, TaskVerification } from '@cleocode/contracts'; /** * Determine whether a task is a "coordination parent". * * A coordination parent has NO own implementation files but DOES own children. * This pattern arises when a task was added as a scope container for a wave of * subtasks, with no code changes on the parent itself. * * Rules: * - `task.files` is absent, `null`, or an empty array. * - `childrenCount > 0` (caller must pass the actual children length). * - `task.noAutoComplete` is NOT `true` (respects the existing opt-out flag). * * Both epic and non-epic tasks can be coordination parents. Epics already have * their own rollup path in `completeTask`; this helper is primarily used for * `type='task'` nodes that act as group containers within a larger epic. * * @param task - The task to test. * @param childrenCount - Number of registered children for the task. * @returns `true` when the task is a coordination parent. * * @task T9040 */ export declare function isCoordinationParent(task: Task, childrenCount: number): boolean; /** * Synthesize a {@link TaskVerification} for a coordination parent by * aggregating the verification state of all non-cancelled children. * * Gate synthesis rules: * - `implemented` — always `true` (children carried the scope). * - `testsPassed`, `qaPassed`, `cleanupDone`, `securityPassed`, `documented` * — `true` when ALL non-cancelled children have the gate set to `true`, OR * when no child has any verification metadata (best-effort rollup for * projects without strict enforcement). * - `passed` — always `true` for a coordination parent whose children are all * done/cancelled (the caller has already confirmed terminal state). * * The `evidence` block on each gate carries a `note` atom explaining that this * is a synthesized rollup, and a second `note` atom referencing the child IDs * that delivered the scope. * * @param parentId - ID of the coordination parent (used in evidence notes). * @param children - All registered children of the parent (including cancelled). * @returns A fully synthesized {@link TaskVerification} ready for upsert. * * @task T9040 */ export declare function buildRollupEvidence(parentId: string, children: Task[]): TaskVerification; //# sourceMappingURL=coordination-parent.d.ts.map