Skip to main content

spec_driven_docs/cli/
hooks.rs

1//! `hooks` subcommand: parse-shape.
2//!
3//! Holds the clap derive struct only. No I/O, no business logic.
4
5use crate::services::hooks_render::Style;
6
7/// Render the delivered gate set as pre-commit hook entries.
8#[derive(Debug, clap::Args)]
9pub struct HooksArgs {
10    /// The output shape: a managed block for an instance's configuration,
11    /// or the top-level manifest published to remote-hook consumers.
12    #[arg(long, value_enum, default_value = "block")]
13    pub style: Style,
14
15    /// What replaces `{docs_root}` in wiring patterns — a literal root for an
16    /// instance, a pattern for the published manifest.
17    #[arg(long, default_value = "_docs")]
18    pub docs_root: String,
19
20    /// The command prefix every entry invokes.
21    #[arg(long, default_value = "sdd")]
22    pub entry: String,
23
24    /// The pre-commit language the entries declare.
25    #[arg(long, default_value = "system")]
26    pub language: String,
27
28    /// The sequence-item indentation of the consumer's repos entries.
29    #[arg(long, default_value = "  ")]
30    pub indent: String,
31}