package com.correx.core.events.events

import com.correx.core.events.types.ArtifactId
import com.correx.core.events.types.SessionId
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

/**
 * The architect's validated execution_plan was compiled into a runnable WorkflowGraph and
 * locked as the baseline for phase 2. [planArtifactId] points at the validated plan JSON in
 * CAS (referenced, not inlined); [stageIds]/[startStageId] pin the compiled shape so replay
 * rebuilds the identical graph. Soft lock: later high-priority steering can still preempt.
 */
@Serializable
@SerialName("ExecutionPlanLocked")
data class ExecutionPlanLockedEvent(
    val sessionId: SessionId,
    val planArtifactId: ArtifactId,
    val workflowId: String,
    val stageIds: List<String>,
    val startStageId: String,
) : EventPayload
