import { Result } from 'neverthrow'; import { WorkPlan } from '../../term/plan/work_plan.js'; import { WorkPlanId } from '../../term/plan/work_plan_id.js'; import { PlanEvent } from './events.js'; import { TaskList } from '../../term/task/task_list.js'; import { PrTaskId } from '../../term/task/pr_task_id.js'; /** * 語彙「計画コマンド」 * domain type: command */ type PlanCreated = Extract; type CreatePlanCommand = (request: CreatePlanRequested) => Result; type UpdateTasksCommand = (existingPlan: WorkPlan, request: UpdatePlanRequested) => Result; type CreatePlanRequested = { name: string; featureBranch: string; originWorktreePath: string; evolvingPRDPath: string; evolvingDesignDocPath: string; description?: string; tasks: Array<{ id: string; title: string; description: string; dependencies?: PrTaskId[]; acceptanceCriteria: Array<{ scenario: string; given: string[]; when: string[]; then: string[]; }>; definitionOfReady: readonly string[]; }>; }; type UpdatePlanRequested = { planId: WorkPlanId; taskUpdates: Parameters[1]; }; type PlanFailed = { type: 'ValidationFailed'; reason: string; } | { type: 'PlanNotFound'; planId: string; } | { type: 'InvalidStateTransition'; reason: string; }; /** * @command createPlan: Create a new work plan. * @command updateTasks: Update tasks in an existing work plan. * @utility toErrorMessage: Convert a PlanFailed error to a user-friendly string. */ export declare const PlanAggregate: { readonly createPlan: CreatePlanCommand; readonly updateTasks: UpdateTasksCommand; readonly toErrorMessage: (error: PlanFailed) => string; }; export {}; //# sourceMappingURL=aggregate.d.ts.map