summaryrefslogtreecommitdiff
path: root/makima/src/daemon/cli/mod.rs
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-05 23:42:48 +0000
committersoryu <soryu@soryu.co>2026-02-05 23:42:48 +0000
commit88a4f15ce1310f8ee8693835be14aa5280233f17 (patch)
tree5c1a0417e02071d2198d13478ffa85533b19f891 /makima/src/daemon/cli/mod.rs
parentf1a50b80f3969d150bd1c31edde0aff05369157e (diff)
downloadsoryu-88a4f15ce1310f8ee8693835be14aa5280233f17.tar.gz
soryu-88a4f15ce1310f8ee8693835be14aa5280233f17.zip
Add directive-first chain system redesign
Redesigns the chain system with a directive-first architecture where Directive is the top-level entity (the "why/what") and Chains are generated execution plans (the "how") that can be dynamically modified. Backend: - Add database migration for directive system tables - Add Directive, DirectiveChain, ChainStep, DirectiveEvent models - Add DirectiveVerifier and DirectiveApproval models - Add orchestration module with engine, planner, and verifier - Add comprehensive API handlers for directives - Add daemon CLI commands for directive management - Add directive skill documentation - Integrate contract completion with directive engine - Add SSE endpoint for real-time directive events Frontend: - Add directives route with split-view layout - Add 6-tab detail view (Overview, Chain, Events, Evaluations, Approvals, Verifiers) - Add React Flow DAG visualization for chain steps - Add SSE subscription hook for real-time event updates - Add useDirectives and useDirectiveEventSubscription hooks - Add directive types and API functions Fixes: - Fix test failures in ws/protocol, task_output, completion_gate, patch - Fix word boundary matching in looks_like_task() - Fix parse_last() to find actual last completion gate - Fix create_export_patch when merge-base equals HEAD - Clean up clippy warnings in new code Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/daemon/cli/mod.rs')
-rw-r--r--makima/src/daemon/cli/mod.rs56
1 files changed, 56 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index 035a784..91ef87c 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -4,6 +4,7 @@ pub mod chain;
pub mod config;
pub mod contract;
pub mod daemon;
+pub mod directive;
pub mod server;
pub mod supervisor;
pub mod view;
@@ -14,6 +15,7 @@ pub use chain::ChainArgs;
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;
@@ -68,6 +70,14 @@ pub enum Commands {
/// in parallel when no dependencies exist.
#[command(subcommand)]
Chain(ChainCommand),
+
+ /// Directive commands for autonomous goal-driven orchestration
+ ///
+ /// Directives are top-level goals that generate chains of steps executed
+ /// autonomously with configurable guardrails. Steps spawn contracts with
+ /// supervisors and are verified with programmatic and LLM evaluation.
+ #[command(subcommand)]
+ Directive(DirectiveCommand),
}
/// Config subcommands for CLI configuration.
@@ -248,6 +258,52 @@ pub enum ChainCommand {
Archive(chain::ArchiveArgs),
}
+/// Directive subcommands for autonomous goal-driven orchestration.
+#[derive(Subcommand, Debug)]
+pub enum DirectiveCommand {
+ /// Create a new directive from a goal
+ Create(directive::CreateArgs),
+
+ /// Get directive status and progress
+ Status(directive::StatusArgs),
+
+ /// List all directives
+ List(directive::ListArgs),
+
+ /// List steps in the directive's chain
+ Steps(directive::StepsArgs),
+
+ /// Display ASCII DAG visualization
+ ///
+ /// Shows the directive's chain structure as an ASCII graph with
+ /// steps as nodes and dependencies as edges.
+ Graph(directive::GraphArgs),
+
+ /// Show recent events for a directive
+ Events(directive::EventsArgs),
+
+ /// Approve a pending approval request
+ Approve(directive::ApproveArgs),
+
+ /// Deny a pending approval request
+ Deny(directive::DenyArgs),
+
+ /// Start a directive (generates chain and begins execution)
+ Start(directive::StartArgs),
+
+ /// Pause a running directive
+ Pause(directive::PauseArgs),
+
+ /// Resume a paused directive
+ Resume(directive::ResumeArgs),
+
+ /// Stop a directive
+ Stop(directive::StopArgs),
+
+ /// Archive a directive
+ Archive(directive::ArchiveArgs),
+}
+
impl Cli {
/// Parse command-line arguments
pub fn parse_args() -> Self {