pub enum IntentCommand {
List,
Show {
id: String,
},
Validate,
Coverage,
Preflight {
issue: Option<String>,
paths: Vec<String>,
},
Binding {
issue: Option<String>,
intent: Option<String>,
paths: Vec<String>,
exempt: Option<String>,
because: Option<String>,
},
Realization {
intent: Option<String>,
},
Explain {
id: String,
},
Propose {
statement: String,
title: Option<String>,
id: Option<String>,
},
}Expand description
The subcommands of majordomus intent: the command line of intents.list,
intents.record, intents.validate and intents.preflight.
use majordomus_cli::cli::{Cli, Command, IntentCommand};
use clap::Parser;
let cli = Cli::parse_from(["majordomus", "intent", "show", "intent-lifecycle"]);
let Command::Intent(args) = cli.command else { panic!("intent") };
let IntentCommand::Show { id } = args.command else { panic!("show") };
assert_eq!(id, "intent-lifecycle");Variants§
List
Every intent, with the stage derived from its milestones and its evidence
Show
One intent in full: each milestone’s derived status and each criterion’s evidence state
Validate
Every finding over the intents; exit 10 when any is a failure
Coverage
Which work carries which criterion, and the reason every issue exists
Preflight
Which intent the work on an issue, or on some paths, serves, whether it is maintenance, or why it may not proceed; exit 10 when refused
Fields
Binding
What a piece of work is bound to before it starts: the issue, the intent or the paths it names resolved to the criteria it serves, or an exemption the policy declares, with the two pins a resumed worker compares; exit 10 when refused
Fields
Realization
Which work realises which intent — tasks, episodes, providers, handovers, peer claims — each link with its provenance, and each intent’s unmet criteria and drift; exit 10 when an intent whose milestones are all DONE is contradicted by its evidence
Explain
Why an intent stands where it stands: its stage, each criterion, the work realising it
Propose
Write a new, unplanned intent: what must become true (ADR 0144)
Trait Implementations§
Source§impl Debug for IntentCommand
impl Debug for IntentCommand
Source§impl FromArgMatches for IntentCommand
impl FromArgMatches for IntentCommand
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for IntentCommand
impl Subcommand for IntentCommand
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand