package com.correx.core.events.events

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

/**
 * Records one pass through a refinement cycle (e.g. implementer→reviewer→implementer).
 * [cycleKey] identifies the loop (e.g. "implement->review"). [iteration] is 1-based.
 * Recorded so the runtime refinement guard is replay-deterministic (invariant #8).
 */
@Serializable
@SerialName("RefinementIteration")
data class RefinementIterationEvent(
    val sessionId: SessionId,
    val cycleKey: String,
    val iteration: Int,
    val maxIterations: Int,
) : EventPayload
