feat(14-02): add phase domain events

- PhaseQueuedEvent for tracking phases awaiting execution
- PhaseStartedEvent for phase execution start
- PhaseCompletedEvent for phase completion with success flag
- PhaseBlockedEvent for blocked phases with reason
This commit is contained in:
Lukas May
2026-02-02 13:32:24 +01:00
parent a55d08fffe
commit cd02439ca9

View File

@@ -240,6 +240,45 @@ export interface TaskBlockedEvent extends DomainEvent {
};
}
/**
* Phase Events
*/
export interface PhaseQueuedEvent extends DomainEvent {
type: 'phase:queued';
payload: {
phaseId: string;
initiativeId: string;
dependsOn: string[];
};
}
export interface PhaseStartedEvent extends DomainEvent {
type: 'phase:started';
payload: {
phaseId: string;
initiativeId: string;
};
}
export interface PhaseCompletedEvent extends DomainEvent {
type: 'phase:completed';
payload: {
phaseId: string;
initiativeId: string;
success: boolean;
message?: string;
};
}
export interface PhaseBlockedEvent extends DomainEvent {
type: 'phase:blocked';
payload: {
phaseId: string;
reason: string;
};
}
/**
* Merge Coordination Events
*/
@@ -308,6 +347,10 @@ export type DomainEventMap =
| TaskDispatchedEvent
| TaskCompletedEvent
| TaskBlockedEvent
| PhaseQueuedEvent
| PhaseStartedEvent
| PhaseCompletedEvent
| PhaseBlockedEvent
| MergeQueuedEvent
| MergeStartedEvent
| MergeCompletedEvent