pub struct Cli {Show 23 fields
pub file: Option<PathBuf>,
pub init: bool,
pub add: Option<String>,
pub pending: bool,
pub question: Option<String>,
pub why: Option<String>,
pub prompt: Option<String>,
pub tag: Vec<String>,
pub severity: Option<String>,
pub expect: Option<String>,
pub expect_ok: Option<String>,
pub expect_err: Option<String>,
pub network: bool,
pub timeout: Option<f64>,
pub promote: Option<String>,
pub remove: Option<String>,
pub def: Option<String>,
pub list: bool,
pub flatten: bool,
pub hook: Option<String>,
pub quiet: bool,
pub explain: Option<Format>,
pub probe: Vec<String>,
}Fields§
§file: Option<PathBuf>Rule store. Default: the nearest .ct/rules.jsonc walking upward (created by –init/–add when absent).
init: boolCreate .ct/rules.jsonc (commented scaffold) if it does not exist.
add: Option<String>Record a rule with this id: the probe (after --) is gate-validated and RUN now; it must hold unless –pending.
pending: boolWith –add: record an aspiration that does not yet hold; reported as PENDING, never enforced, until –promote.
question: Option<String>With –add: the question this rule answers (required).
why: Option<String>With –add: why this invariant exists; printed whenever it fails. Accepts file:PATH / text:VALUE payloads.
prompt: Option<String>With –add: the verbatim human request behind this rule, retained in the store so the intent can be revisited; strip all prompts later with –flatten. Accepts file:PATH / text:VALUE payloads.
tag: Vec<String>With –add: tags for selection (comma-separated).
severity: Option<String>With –add: fail (default) or warn (violations report but never redden the exit).
expect: Option<String>With –add: outcome adapter for bridge probes: exit (default) or empty.
expect_ok: Option<String>With –add: matcher adapter — the rule holds when this pattern appears in the probe’s output.
expect_err: Option<String>With –add: matcher adapter — a violation when this pattern appears in the probe’s output.
network: boolWith –add: permit network access where the bridge entry deems it meaningful (cargo deny).
timeout: Option<f64>With –add: per-rule probe bound in seconds (fractional allowed).
promote: Option<String>Re-run a pending rule’s probe; if it now holds, clear the pending flag (enforce it).
remove: Option<String>Remove the rule with this exact id.
def: Option<String>Set a def: NAME=VALUE. VALUE is parsed as JSON (e.g. [“A”,“B”]) or taken as a string.
list: boolPrint defs and rules without changing anything.
flatten: boolStrip the retained “prompt” prose from every rule, leaving only the mechanical definitions.
hook: Option<String>Write the build hook for an ecosystem (currently: cargo — a tests/ shim that runs ct check).
quiet: boolSuppress informational output.
explain: Option<Format>Print agent usage docs (md or json) and exit.
probe: Vec<String>The probe for –add (after --): an argv run directly, never through a shell.
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.