from __future__ import annotations

from datetime import datetime
from typing import Literal

from pydantic import BaseModel, Field


SkillLifecycleAction = Literal[
    "created_candidate",
    "promoted_to_shadow",
    "promoted_to_active",
    "degraded_to_deprecated",
    "retired",
    "reactivated",
    "feedback_recorded",
    "no_change",
]


class SkillLifecycleDecision(BaseModel):
    skill_name: str
    action: SkillLifecycleAction
    previous_status: str | None = None
    new_status: str
    reason: str
    evidence_refs: list[dict[str, object]] = Field(default_factory=list)
    confidence: float | None = None
    review_after: datetime | None = None
