From 8c23b3ab6f7fabca01b0468911bae073aa5ced32 Mon Sep 17 00:00:00 2001 From: soryu Date: Mon, 9 Feb 2026 00:11:51 +0000 Subject: Add new directive mechanism v3 --- makima/src/daemon/cli/mod.rs | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'makima/src/daemon/cli/mod.rs') diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index 0805edd..faafaea 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -3,6 +3,7 @@ pub mod config; pub mod contract; pub mod daemon; +pub mod directive; pub mod server; pub mod supervisor; pub mod view; @@ -12,6 +13,7 @@ use clap::{Parser, Subcommand}; pub use config::CliConfig; pub use contract::ContractArgs; pub use daemon::DaemonArgs; +pub use directive::DirectiveArgs; pub use server::ServerArgs; pub use supervisor::SupervisorArgs; pub use view::ViewArgs; @@ -41,6 +43,10 @@ pub enum Commands { #[command(subcommand)] Contract(ContractCommand), + /// Directive commands for DAG-based project management + #[command(subcommand)] + Directive(DirectiveCommand), + /// Interactive TUI browser for contracts and tasks /// /// Provides a drill-down interface for browsing contracts, viewing their @@ -196,6 +202,49 @@ pub enum ContractCommand { CreateFile(contract::CreateFileArgs), } +/// Directive subcommands for DAG-based project management. +#[derive(Subcommand, Debug)] +pub enum DirectiveCommand { + /// List all directives + List(directive::DirectiveListArgs), + + /// Get directive status with steps + Get(DirectiveArgs), + + /// Get directive status (alias for get) + Status(DirectiveArgs), + + /// Add a step to the directive + AddStep(directive::AddStepArgs), + + /// Remove a step from the directive + RemoveStep(directive::RemoveStepArgs), + + /// Set dependencies for a step + SetDeps(directive::SetDepsArgs), + + /// Start the directive (begin executing steps) + Start(DirectiveArgs), + + /// Pause the directive + Pause(DirectiveArgs), + + /// Advance the DAG (find newly-ready steps) + Advance(DirectiveArgs), + + /// Mark a step as completed + CompleteStep(directive::StepActionArgs), + + /// Mark a step as failed + FailStep(directive::StepActionArgs), + + /// Mark a step as skipped + SkipStep(directive::StepActionArgs), + + /// Update the directive's goal (triggers re-planning) + UpdateGoal(directive::UpdateGoalArgs), +} + impl Cli { /// Parse command-line arguments pub fn parse_args() -> Self { -- cgit v1.2.3