release-kit 0.9.12

A canonical release workflow: a technology-agnostic method, per-technology bindings, and the rk CLI that lands and serves them.
Documentation
//! Arguments for `rk init`.

use camino::Utf8PathBuf;
use clap::Args;

use super::profile_flags::ProfileFlags;

/// Land the files the target configuration selects into a repository.
#[derive(Debug, Clone, Args)]
#[expect(
    clippy::struct_excessive_bools,
    reason = "each field is one clap flag, and an opt-in capability's flag is a boolean by design; a state machine would hide the command line this struct describes"
)]
pub struct InitArgs {
    /// The project profile and the Git workflow.
    #[command(flatten)]
    pub profile: ProfileFlags,

    /// The repository the files land into.
    #[arg(long)]
    pub target: Utf8PathBuf,

    /// Opt the landing into the Nix capability: a seeded package
    /// expression and a seed flake pair where the target has none.
    /// Recorded as a capability request; off by default, because a
    /// packaging surface is a decision, not a default.
    #[arg(long, alias = "nix")]
    pub nix_packaging: bool,

    /// Request the landed vulnerability reporting policy, `SECURITY.md`.
    /// An automatic release requests it by default; a release-less
    /// profile asks for it with this flag.
    #[arg(long)]
    pub reporting_policy: bool,

    /// Opt the landing into the Scorecard capability: a workflow that
    /// computes an `OpenSSF` Scorecard result and publishes it to the public
    /// Scorecard API. GitHub only. Recorded as a capability request; off by
    /// default, because publishing a score is a decision, not a default.
    #[arg(long)]
    pub scorecard: bool,

    /// Opt the landing into the workflow guards: the agent and commit
    /// policy lines, the glossary, the workflow hooks, and the two workflow
    /// setup steps. Off by default, because they shape how a project works
    /// rather than what its release needs.
    #[arg(long)]
    pub workflow_guards: bool,

    /// Land the Git workflow and nothing of a release: a preset that sets
    /// `profile.release.mode = "none"`, `git.integration = "local"`,
    /// `git.checkout_mode = "linked-worktree"`, and
    /// `capabilities.workflow_guards = true`, and records those four
    /// answers alone. A flag that contradicts one of them refuses before
    /// any write; a flag the preset does not set, such as `--merge-form`,
    /// combines with it.
    #[arg(long)]
    pub workflow_only: bool,

    /// Opt the landing into code scanning, naming the provider: codeql,
    /// GitHub's own analyzer, whose terms cover an open-source codebase so
    /// the landing reads the driver's declared licence and refuses the pair
    /// where it states no such codebase; or semgrep, which carries no licence
    /// condition and runs on either forge. Recorded as a capability
    /// request; off by default, because a scanning surface is a decision.
    #[arg(long, value_name = "PROVIDER")]
    pub code_scanning: Option<String>,

    /// Land the answers a stage resolved, read from its receipt and
    /// never its bytes; refuses a stage another binary wrote or one taken
    /// for another target.
    #[arg(long, value_name = "ROOT")]
    pub stage: Option<Utf8PathBuf>,

    /// Save a copy of this conflict, then replace it: an unattributed
    /// file, or a recorded rendered file someone edited. Repeatable;
    /// every conflict not named still refuses.
    #[arg(long = "replace", value_name = "PATH")]
    pub replace: Vec<String>,

    /// Write the files; without it the destinations are listed and nothing
    /// is touched.
    #[arg(long)]
    pub apply: bool,

    /// Emit one JSON object on stdout instead of the human report.
    #[arg(long)]
    pub json: bool,
}