summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-07 01:11:26 +0000
committersoryu <soryu@soryu.co>2026-02-07 01:11:26 +0000
commit9e9f18884c78c21f5785908fb7ccd00e2fa5436b (patch)
treef2ca7c2a3db5350186282ae0be0e539aa77c0320 /makima/src/daemon/cli
parentb8d563d45f14a2b1db1f684aa0a8dcd7e5b6ad56 (diff)
downloadsoryu-9e9f18884c78c21f5785908fb7ccd00e2fa5436b.tar.gz
soryu-9e9f18884c78c21f5785908fb7ccd00e2fa5436b.zip
Add new directive initial implementation
Diffstat (limited to 'makima/src/daemon/cli')
-rw-r--r--makima/src/daemon/cli/directive.rs40
-rw-r--r--makima/src/daemon/cli/mod.rs28
2 files changed, 68 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs
new file mode 100644
index 0000000..5ce88c5
--- /dev/null
+++ b/makima/src/daemon/cli/directive.rs
@@ -0,0 +1,40 @@
+//! Directive subcommand - directive orchestration commands.
+
+use clap::Args;
+use uuid::Uuid;
+
+/// Common arguments for directive commands.
+#[derive(Args, Debug, Clone)]
+pub struct DirectiveArgs {
+ /// API URL
+ #[arg(long, env = "MAKIMA_API_URL", default_value = "https://api.makima.jp", global = true)]
+ pub api_url: String,
+
+ /// API key for authentication
+ #[arg(long, env = "MAKIMA_API_KEY", global = true)]
+ pub api_key: String,
+
+ /// Directive ID
+ #[arg(long, env = "MAKIMA_DIRECTIVE_ID", global = true)]
+ pub directive_id: Uuid,
+}
+
+/// Arguments for chain command (get specific chain).
+#[derive(Args, Debug)]
+pub struct ChainArgs {
+ #[command(flatten)]
+ pub common: DirectiveArgs,
+
+ /// Chain ID to retrieve
+ pub chain_id: Uuid,
+}
+
+/// Arguments for update-status command.
+#[derive(Args, Debug)]
+pub struct UpdateStatusArgs {
+ #[command(flatten)]
+ pub common: DirectiveArgs,
+
+ /// New status (draft, planning, active, paused, completed, archived, failed)
+ pub status: String,
+}
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index 0805edd..9fba216 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 autonomous goal-driven execution
+ #[command(subcommand)]
+ Directive(DirectiveCommand),
+
/// Interactive TUI browser for contracts and tasks
///
/// Provides a drill-down interface for browsing contracts, viewing their
@@ -196,6 +202,28 @@ pub enum ContractCommand {
CreateFile(contract::CreateFileArgs),
}
+/// Directive subcommands for autonomous goal-driven execution.
+#[derive(Subcommand, Debug)]
+pub enum DirectiveCommand {
+ /// Get directive status and details
+ Status(DirectiveArgs),
+
+ /// Get goal, requirements, acceptance criteria
+ Goals(DirectiveArgs),
+
+ /// List chains for the directive
+ Chains(DirectiveArgs),
+
+ /// Get a chain with its steps
+ Chain(directive::ChainArgs),
+
+ /// List steps in a chain
+ Steps(directive::ChainArgs),
+
+ /// Update directive status
+ UpdateStatus(directive::UpdateStatusArgs),
+}
+
impl Cli {
/// Parse command-line arguments
pub fn parse_args() -> Self {