//! Lifecycle stage for assertion evolution.

use rkyv::{Archive, Deserialize, Serialize};

/// The lifecycle stage of an assertion.
///
/// Assertions progress through lifecycle stages to distinguish proposals
/// from decisions. This enables queries to filter "production-ready truth"
/// from "work-in-progress speculation."
///
/// # State Transitions
///
/// ```text
/// Proposed → UnderReview → Approved → Deprecated
///                       ↘ Rejected
/// ```
///
/// Transitions are new assertions (append-only), not mutations.
#[derive(Archive, Deserialize, Serialize, Debug, Clone, Copy, PartialEq, Eq, Default)]
#[archive(check_bytes)]
pub enum LifecycleStage {
    /// Initial proposal, idea, or RFC. Safe for research, not for implementation.
    #[default]
    Proposed,
    /// Under active review or debate. Gathering votes and feedback.
    UnderReview,
    /// Accepted as current truth. Production ready, safe for implementation.
    Approved,
    /// Was true, now superseded by a newer assertion. Historical reference only.
    Deprecated,
    /// Considered and explicitly declined. Not to be implemented.
    Rejected,
}
