package com.correx.infrastructure.workflow

import com.fasterxml.jackson.annotation.JsonProperty

data class ExecutionPlanModel(
    val goal: String = "",
    val stages: List<PlanStage> = emptyList(),
    val edges: List<PlanEdge> = emptyList(),
)

data class PlanStage(
    val id: String = "",
    val prompt: String = "",
    val produces: String = "",
    val kind: String? = null,
    val needs: List<String> = emptyList(),
    val tools: List<String> = emptyList(),
)

data class PlanEdge(
    val from: String = "",
    val to: String = "",
    val condition: PlanCondition = PlanCondition(),
)

data class PlanCondition(
    val type: String = "always_true",
    @param:JsonProperty("artifact_id") val artifactId: String? = null,
    val key: String? = null,
    val field: String? = null,
    val value: String? = null,
    val operator: String? = null,
)
