/** * Lifecycle Engine Operations — business logic layer. * * Contains all lifecycle domain logic migrated from * `packages/cleo/src/dispatch/engines/lifecycle-engine.ts` (ENG-MIG-9 / T1576). * * Sub-domains: * lifecycle.* - RCASD-IVTR+C pipeline stage management * lifecycle.gate.* - Stage gate pass/fail recording * lifecycle.scope - Subagent scope enforcement (T1162 / ADR-054) * * Each exported function returns `EngineResult` and is importable from * `@cleocode/core/internal` so the CLI dispatch layer can call them without * any intermediate engine file. * * @task T1576 — ENG-MIG-9 * @epic T1566 */ import { type EngineResult } from '../engine-result.js'; /** * Enforce that the active session is authorised to mutate lifecycle stages for * the given epic. * * Returns `null` on success. Returns an `EngineResult` error when the caller * is denied and should immediately return that result to the caller. * * @param epicId - The epic whose lifecycle stage is being mutated. * @param projectRoot - Absolute project root (used for DB + audit I/O). * * @task T1162 */ export declare function enforceScopeForLifecycleMutation(epicId: string, projectRoot?: string): Promise; /** * List all epic IDs that have RCASD pipeline data. * * @param projectRoot - Absolute project root path. */ export declare function listRcsdEpics(projectRoot?: string): Promise; /** * lifecycle.check / lifecycle.status — Get lifecycle status for an epic. * * @param epicId - Epic task ID to query. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleStatus(epicId: string, projectRoot?: string): Promise; /** * lifecycle.history — Stage transition history. * * @param taskId - Task or epic ID to query. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleHistory(taskId: string, projectRoot?: string): Promise; /** * lifecycle.gates — Get all gate statuses for an epic. * * @param taskId - Task or epic ID to query. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleGates(taskId: string, projectRoot?: string): Promise; /** * lifecycle.prerequisites — Get required prior stages for a target stage. * * @param targetStage - The pipeline stage to query prerequisites for. * @param _projectRoot - Unused (pure data lookup, no I/O). * * @task T4785 */ export declare function lifecyclePrerequisites(targetStage: string, _projectRoot?: string): Promise; /** * lifecycle.check — Check if a stage's prerequisites are met. * * @param epicId - The epic to validate stage prerequisites against. * @param targetStage - The target stage to check prerequisites for. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleCheck(epicId: string, targetStage: string, projectRoot?: string): Promise; /** * lifecycle.progress / lifecycle.record — Record stage completion. * * Enforces forward-only stage progression and lifecycle gate checks. * Applies the T1162 scope guard to prevent subagents from bypassing gates. * * @param taskId - Epic or task ID to update. * @param stage - Stage name (accepts aliases resolved via resolveStageAlias). * @param status - New status for the stage. * @param notes - Optional notes for the stage transition. * @param projectRoot - Absolute project root path. * * @task T4785 * @task T1162 - Scope guard: subagents may not advance a parent epic's lifecycle. */ export declare function lifecycleProgress(taskId: string, stage: string, status: string, notes?: string, projectRoot?: string): Promise; /** * lifecycle.skip — Skip a stage with reason. * * Applies the T1162 scope guard to prevent subagents from skipping a parent * epic's lifecycle stages. * * @param taskId - Epic or task ID to update. * @param stage - Stage name to skip. * @param reason - Reason for skipping. * @param projectRoot - Absolute project root path. * * @task T4785 * @task T1162 - Scope guard: subagents may not skip a parent epic's lifecycle stages. */ export declare function lifecycleSkip(taskId: string, stage: string, reason: string, projectRoot?: string): Promise; /** * lifecycle.reset — Reset a stage (emergency). * * Applies the T1162 scope guard to prevent subagents from resetting a parent * epic's lifecycle stages. * * @param taskId - Epic or task ID to reset. * @param stage - Stage name to reset. * @param reason - Reason for the reset. * @param projectRoot - Absolute project root path. * * @task T4785 * @task T1162 - Scope guard: subagents may not reset a parent epic's lifecycle stages. */ export declare function lifecycleReset(taskId: string, stage: string, reason: string, projectRoot?: string): Promise; /** * lifecycle.gate.pass — Mark gate as passed. * * @param taskId - Epic or task ID. * @param gateName - Name of the gate to pass. * @param agent - Agent that performed the gate check (defaults to 'system'). * @param notes - Optional notes for the gate pass. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleGatePass(taskId: string, gateName: string, agent?: string, notes?: string, projectRoot?: string): Promise; /** * lifecycle.gate.fail — Mark gate as failed. * * @param taskId - Epic or task ID. * @param gateName - Name of the gate to fail. * @param reason - Reason the gate failed. * @param projectRoot - Absolute project root path. * * @task T4785 */ export declare function lifecycleGateFail(taskId: string, gateName: string, reason?: string, projectRoot?: string): Promise; //# sourceMappingURL=engine-ops.d.ts.map