summaryrefslogtreecommitdiff
path: root/makima/src/daemon
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-02-08 21:07:30 +0000
committersoryu <soryu@soryu.co>2026-02-08 21:07:30 +0000
commit3662b334dfd68cfdf00ed44ae88927c2e1b2aabe (patch)
treebff5ae1e189fb8bcc0211d97dab3b9acb4257038 /makima/src/daemon
parent87fa8c4af66745bd30bc84b6c5ef657dd4dec002 (diff)
downloadsoryu-3662b334dfd68cfdf00ed44ae88927c2e1b2aabe.tar.gz
soryu-3662b334dfd68cfdf00ed44ae88927c2e1b2aabe.zip
Remove directive mechanism
Diffstat (limited to 'makima/src/daemon')
-rw-r--r--makima/src/daemon/api/directive.rs106
-rw-r--r--makima/src/daemon/api/mod.rs1
-rw-r--r--makima/src/daemon/cli/directive.rs60
-rw-r--r--makima/src/daemon/cli/mod.rs40
-rw-r--r--makima/src/daemon/skills/directive.md88
-rw-r--r--makima/src/daemon/skills/mod.rs4
6 files changed, 0 insertions, 299 deletions
diff --git a/makima/src/daemon/api/directive.rs b/makima/src/daemon/api/directive.rs
deleted file mode 100644
index c51882b..0000000
--- a/makima/src/daemon/api/directive.rs
+++ /dev/null
@@ -1,106 +0,0 @@
-//! Directive API methods.
-
-use serde::Serialize;
-use uuid::Uuid;
-
-use super::client::{ApiClient, ApiError};
-use super::supervisor::JsonValue;
-
-/// Request to update a directive.
-#[derive(Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct UpdateDirectiveRequest {
- #[serde(skip_serializing_if = "Option::is_none")]
- pub status: Option<String>,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub version: Option<i32>,
-}
-
-impl ApiClient {
- /// Get directive status and details.
- pub async fn directive_status(&self, directive_id: Uuid) -> Result<JsonValue, ApiError> {
- self.get(&format!("/api/v1/directives/{}", directive_id))
- .await
- }
-
- /// List chains for a directive.
- pub async fn directive_chains(&self, directive_id: Uuid) -> Result<JsonValue, ApiError> {
- self.get(&format!("/api/v1/directives/{}/chains", directive_id))
- .await
- }
-
- /// Get a chain with its steps.
- pub async fn directive_chain(
- &self,
- directive_id: Uuid,
- chain_id: Uuid,
- ) -> Result<JsonValue, ApiError> {
- self.get(&format!(
- "/api/v1/directives/{}/chains/{}",
- directive_id, chain_id
- ))
- .await
- }
-
- /// Update a directive.
- pub async fn directive_update(
- &self,
- directive_id: Uuid,
- req: UpdateDirectiveRequest,
- ) -> Result<JsonValue, ApiError> {
- self.put(&format!("/api/v1/directives/{}", directive_id), &req)
- .await
- }
-
- /// Start a directive (transition from draft to planning).
- pub async fn directive_start(&self, directive_id: Uuid) -> Result<JsonValue, ApiError> {
- self.post_empty(&format!("/api/v1/directives/{}/start", directive_id))
- .await
- }
-
- /// Trigger a manual evaluation for a step.
- pub async fn directive_evaluate_step(
- &self,
- directive_id: Uuid,
- step_id: Uuid,
- ) -> Result<JsonValue, ApiError> {
- self.post_empty(&format!(
- "/api/v1/directives/{}/steps/{}/evaluate",
- directive_id, step_id
- ))
- .await
- }
-
- /// Submit a chain plan for a directive.
- pub async fn directive_submit_plan(
- &self,
- directive_id: Uuid,
- plan_json: &str,
- ) -> Result<JsonValue, ApiError> {
- #[derive(serde::Serialize)]
- #[serde(rename_all = "camelCase")]
- struct SubmitPlanBody {
- plan: String,
- }
- self.post(
- &format!("/api/v1/directives/{}/submit-plan", directive_id),
- &SubmitPlanBody {
- plan: plan_json.to_string(),
- },
- )
- .await
- }
-
- /// List evaluations for a step.
- pub async fn directive_evaluations(
- &self,
- directive_id: Uuid,
- step_id: Uuid,
- ) -> Result<JsonValue, ApiError> {
- self.get(&format!(
- "/api/v1/directives/{}/steps/{}/evaluations",
- directive_id, step_id
- ))
- .await
- }
-}
diff --git a/makima/src/daemon/api/mod.rs b/makima/src/daemon/api/mod.rs
index 2d1efbf..49d80e0 100644
--- a/makima/src/daemon/api/mod.rs
+++ b/makima/src/daemon/api/mod.rs
@@ -2,7 +2,6 @@
pub mod client;
pub mod contract;
-pub mod directive;
pub mod supervisor;
pub use client::ApiClient;
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs
deleted file mode 100644
index 4c29c14..0000000
--- a/makima/src/daemon/cli/directive.rs
+++ /dev/null
@@ -1,60 +0,0 @@
-//! 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,
-}
-
-/// Arguments for evaluate command (trigger manual evaluation).
-#[derive(Args, Debug)]
-pub struct EvaluateArgs {
- #[command(flatten)]
- pub common: DirectiveArgs,
-
- /// Step ID to evaluate
- pub step_id: Uuid,
-}
-
-/// Arguments for evaluations command (list evaluation history).
-#[derive(Args, Debug)]
-pub struct EvaluationsArgs {
- #[command(flatten)]
- pub common: DirectiveArgs,
-
- /// Step ID to list evaluations for
- pub step_id: Uuid,
-}
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index 954f219..0805edd 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -3,7 +3,6 @@
pub mod config;
pub mod contract;
pub mod daemon;
-pub mod directive;
pub mod server;
pub mod supervisor;
pub mod view;
@@ -13,7 +12,6 @@ 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;
@@ -43,10 +41,6 @@ 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
@@ -202,40 +196,6 @@ 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),
-
- /// Start a directive (create planning contract and begin orchestration)
- Start(DirectiveArgs),
-
- /// Trigger a manual evaluation for a step
- Evaluate(directive::EvaluateArgs),
-
- /// List evaluation history for a step
- Evaluations(directive::EvaluationsArgs),
-
- /// Submit a chain plan for a directive (reads JSON from stdin)
- SubmitPlan(DirectiveArgs),
-}
-
impl Cli {
/// Parse command-line arguments
pub fn parse_args() -> Self {
diff --git a/makima/src/daemon/skills/directive.md b/makima/src/daemon/skills/directive.md
deleted file mode 100644
index 0d1e9d6..0000000
--- a/makima/src/daemon/skills/directive.md
+++ /dev/null
@@ -1,88 +0,0 @@
----
-name: makima-directive
-description: Directive orchestration tools for autonomous goal-driven execution. Use when working with directives, chains, steps, verifiers, and approvals.
----
-
-# Makima Directive Commands
-
-These commands let orchestrators interact with directive state. Environment variables (`MAKIMA_API_URL`, `MAKIMA_API_KEY`, `MAKIMA_DIRECTIVE_ID`) are pre-configured by the daemon.
-
-## Status and Information
-
-### Get directive status
-```bash
-makima directive status
-```
-Returns full directive details including status, autonomy level, thresholds, and tracking info.
-
-### Get directive goals
-```bash
-makima directive goals
-```
-Returns the goal, requirements, acceptance criteria, constraints, and external dependencies.
-
-### List chains
-```bash
-makima directive chains
-```
-Returns all chains (plan generations) for the directive, ordered by generation.
-
-### Get chain with steps
-```bash
-makima directive chain <chain_id>
-```
-Returns a chain and all its steps with status, dependencies, and evaluation info.
-
-### List steps in a chain
-```bash
-makima directive steps <chain_id>
-```
-Returns just the steps array from a chain.
-
-## Status Updates
-
-### Update directive status
-```bash
-makima directive update-status <status>
-```
-Updates the directive status. Valid statuses: `draft`, `planning`, `active`, `paused`, `completed`, `archived`, `failed`.
-
-## Evaluation
-
-### Trigger manual evaluation for a step
-```bash
-makima directive evaluate <step_id>
-```
-Triggers a monitoring evaluation for the specified step. The step must have been executed (have a contract). Sets the step to "evaluating" and dispatches a monitoring contract.
-
-### List evaluations for a step
-```bash
-makima directive evaluations <step_id>
-```
-Returns the evaluation history for a step, ordered by evaluation number.
-
-## Output Format
-
-All commands output JSON to stdout.
-
-Example workflow:
-```bash
-# Check directive details and goals
-makima directive status
-makima directive goals
-
-# List execution chains
-makima directive chains
-
-# Get details of a specific chain
-makima directive chain <chain_id>
-
-# Trigger manual evaluation of a step
-makima directive evaluate <step_id>
-
-# Check evaluation history
-makima directive evaluations <step_id>
-
-# Update status to active
-makima directive update-status active
-```
diff --git a/makima/src/daemon/skills/mod.rs b/makima/src/daemon/skills/mod.rs
index 6e5d0a8..0b05f3a 100644
--- a/makima/src/daemon/skills/mod.rs
+++ b/makima/src/daemon/skills/mod.rs
@@ -9,12 +9,8 @@ pub const SUPERVISOR_SKILL: &str = include_str!("supervisor.md");
/// Contract skill content - task-contract interaction commands
pub const CONTRACT_SKILL: &str = include_str!("contract.md");
-/// Directive skill content - directive orchestration commands
-pub const DIRECTIVE_SKILL: &str = include_str!("directive.md");
-
/// All skills as (name, content) pairs for installation
pub const ALL_SKILLS: &[(&str, &str)] = &[
("makima-supervisor", SUPERVISOR_SKILL),
("makima-contract", CONTRACT_SKILL),
- ("makima-directive", DIRECTIVE_SKILL),
];