//! CLI spec command implementation (wired into the hidden/internal `ralph __cli-spec` command).
//!
//! Responsibilities:
//! - Provide a small "command layer" entrypoint that produces the deterministic CLI spec JSON for
//! the current build of Ralph.
//! - Keep the execution/IO boundary separate from clap introspection and contract modeling.
//!
//! Not handled here:
//! - Registering a user-facing `ralph cli-spec` (or similar) top-level command in clap.
//! - Reading/writing files or printing to stdout/stderr.
//!
//! Invariants/assumptions:
//! - Uses `Cli::command()` as the canonical source of the clap command tree.
//! - Output must be deterministic across invocations within the same build.
use Result;
use CommandFactory;
use crateCliSpec;
/// Build the structured `CliSpec` for the current Ralph CLI.
/// Emit deterministic pretty JSON for the current Ralph CLI.