tix-tracker 0.12.0

A terminal issue tracker: markdown + YAML frontmatter issues with a kanban TUI and CLI
Documentation
#[allow(clippy::wildcard_imports)]
use super::*;

#[derive(Debug, Clone, Subcommand)]
pub enum CapacityCommand {
    /// List every configured ceiling, one tab-separated row per entry
    ///
    /// Columns: `id`, `scope`, `reference`, `display`, `capacity`, `unit`,
    /// `enabled`. The header prints even with no entries, so an empty section is
    /// visibly empty rather than indistinguishable from a failure.
    List,
    /// Show one ceiling by the reference it names
    ///
    /// A reference is a cycle's name or stable id, a team label, or an assignee
    /// identity; `--scope` narrows it when one reference names two scopes.
    Show {
        /// Cycle name/stable id, team label, or assignee identity
        #[arg(value_name = "REFERENCE")]
        reference: String,
        /// Restrict the match to one scope: `cycle`, `team` or `assignee`
        #[arg(long, value_name = "SCOPE")]
        scope: Option<String>,
    },
    /// Set one scope's ceiling; validated before persistence
    ///
    /// The scope and the unit are explicit: a value with no unit, a unit no board
    /// declares, an unknown cycle/team, or a second ceiling for one scope is
    /// refused before `tix.toml` changes.
    Set {
        /// Scope dimension: `cycle`, `team` or `assignee`
        #[arg(long, value_name = "SCOPE")]
        scope: String,
        /// The scope's reference (a cycle name or stable id, a team label, an identity)
        #[arg(long, value_name = "ID")]
        id: String,
        /// The ceiling, in `--unit`, at or above zero
        ///
        /// A negative value is accepted by the parser and refused by the shared
        /// validator with its field path (`capacity.<id>.capacity`), which is a better
        /// message than clap's "unexpected argument".
        #[arg(long, value_name = "N", allow_hyphen_values = true)]
        value: i64,
        /// The estimate unit the ceiling counts in (declared by the active board)
        #[arg(long, value_name = "UNIT")]
        unit: String,
        /// Keep the value and the unit, but enforce nothing
        #[arg(long)]
        disabled: bool,
    },
    /// Delete one scope's ceiling
    Delete {
        /// Scope dimension: `cycle`, `team` or `assignee`
        #[arg(long, value_name = "SCOPE")]
        scope: String,
        /// The scope's reference (a cycle name or stable id, a team label, an identity)
        #[arg(long, value_name = "ID")]
        id: String,
    },
    /// Calculate one scope's committed/completed/remaining/overflow/utilization
    ///
    /// Every value comes from the shared calculation DTO; a value the calculation
    /// could not derive prints as `-`, never as a zero. Findings go to stderr.
    Calculate {
        /// Scope dimension: `cycle`, `team` or `assignee`
        #[arg(long, value_name = "SCOPE")]
        scope: String,
        /// The scope's reference (a cycle name or stable id, a team label, an identity)
        #[arg(long, value_name = "ID")]
        id: String,
        /// Also render the overflow report (estimate and reference findings always render)
        #[arg(long)]
        warnings: bool,
    },
    /// Read back a closed cycle's immutable capacity evidence
    Snapshot {
        /// Cycle name or stable `<schedule-id>:<sequence>` id
        #[arg(value_name = "CYCLE")]
        cycle: String,
        /// Also render the overflow finding the close recorded
        #[arg(long)]
        warnings: bool,
    },
}