pub enum ReasoningCommand {
Advisors,
Plan {
materiality: String,
confidence: String,
capabilities: Option<String>,
},
Record {
file: Option<PathBuf>,
},
Status {
task: Option<String>,
report: bool,
},
Explain {
id: String,
},
Check,
}Expand description
The reasoning subcommands, one per capability: advisors, plan and status read,
explain traces one record, check gates, and record is the one that writes.
§Example
use majordomus_cli::cli::{Cli, Command, ReasoningCommand};
use clap::Parser;
let cli = Cli::try_parse_from(["majordomus", "reasoning", "plan"]).unwrap();
let Command::Reasoning(args) = cli.command else { panic!("not the reasoning command") };
let ReasoningCommand::Plan { materiality, confidence, capabilities } = args.command else {
panic!("not plan")
};
assert_eq!((materiality.as_str(), confidence.as_str()), ("material", "medium"));
assert!(capabilities.is_none());
let cli = Cli::try_parse_from(["majordomus", "reasoning", "status", "--task", "all", "--report"]).unwrap();
let Command::Reasoning(args) = cli.command else { panic!("not the reasoning command") };
assert!(matches!(args.command, ReasoningCommand::Status { report: true, .. }));Variants§
Advisors
Every advisor with its status and why, the mode in force, and who can provide each advisory capability now; no advisor at all is an ordinary answer
Plan
Whether a stated uncertainty warrants independent review, how much, and from which available advisors — with every advisor left out and why; records nothing
Fields
Record
Record one reasoning step of the open task from JSON ({"kind":"assessment",...}) read from –file or standard input; a record that breaks a rule is refused and nothing is written
Status
The reasoning state of the open task — assessments, consultations, disagreements, conclusions, the timeline — and the report a handover carries
Fields
Explain
One record with the whole chain of its assessment: why a decision was made
Check
Check that reasoning stays provider-independent and that every record is consistent; exit 10 on a finding
Trait Implementations§
Source§impl Debug for ReasoningCommand
impl Debug for ReasoningCommand
Source§impl FromArgMatches for ReasoningCommand
impl FromArgMatches for ReasoningCommand
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 ReasoningCommand
impl Subcommand for ReasoningCommand
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