diff options
Diffstat (limited to 'makima/src/daemon')
| -rw-r--r-- | makima/src/daemon/cli/directive.rs | 39 | ||||
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 3 | ||||
| -rw-r--r-- | makima/src/daemon/skills/directive.md | 27 |
3 files changed, 69 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs index 8a6a9f2..7c8451f 100644 --- a/makima/src/daemon/cli/directive.rs +++ b/makima/src/daemon/cli/directive.rs @@ -111,6 +111,45 @@ pub struct BatchAddStepsArgs { pub json: String, } +/// Arguments for ask command (ask user a question from directive context). +#[derive(Args, Debug)] +pub struct AskArgs { + #[command(flatten)] + pub common: DirectiveArgs, + + /// The question to ask + #[arg(index = 1)] + pub question: String, + + /// Optional choices (comma-separated) + #[arg(long)] + pub choices: Option<String>, + + /// Context about what this relates to + #[arg(long)] + pub context: Option<String>, + + /// Timeout in seconds (default: 3600 = 1 hour) + #[arg(long, default_value = "3600")] + pub timeout: i32, + + /// Block indefinitely until user responds (no timeout) + #[arg(long, default_value = "false")] + pub phaseguard: bool, + + /// Allow selecting multiple choices (response will be comma-separated) + #[arg(long, default_value = "false")] + pub multi_select: bool, + + /// Non-blocking mode - returns immediately without waiting for response + #[arg(long, default_value = "false")] + pub non_blocking: bool, + + /// Question type (general, phase_confirmation, contract_complete) + #[arg(long, default_value = "general")] + pub question_type: String, +} + /// Arguments for update command. #[derive(Args, Debug)] pub struct UpdateArgs { diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs index bcaaa70..8063541 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -249,6 +249,9 @@ pub enum DirectiveCommand { /// Update directive metadata (PR URL, etc.) Update(directive::UpdateArgs), + + /// Ask a question and wait for user feedback + Ask(directive::AskArgs), } impl Cli { diff --git a/makima/src/daemon/skills/directive.md b/makima/src/daemon/skills/directive.md index 9d2b644..02de836 100644 --- a/makima/src/daemon/skills/directive.md +++ b/makima/src/daemon/skills/directive.md @@ -82,6 +82,32 @@ makima directive update --pr-url "<url>" --pr-branch "<branch>" ``` Updates the directive's PR URL and/or PR branch. Used by completion tasks to store the PR URL after creating it. +### Ask User a Question +```bash +makima directive ask "<question>" +``` +Asks the user a question and waits for their response. Questions appear on the directive page with a yellow indicator and can be answered inline. + +Options: +- `--choices "opt1,opt2,opt3"` - Provide choices for the user to select from +- `--context "<context>"` - Additional context to help the user understand the question +- `--timeout <seconds>` - Wait timeout (default: 3600 = 1 hour) +- `--phaseguard` - Block indefinitely until the user responds (no timeout). Recommended for critical decisions during planning. +- `--multi-select` - Allow the user to select multiple choices +- `--non-blocking` - Return immediately without waiting for a response +- `--question-type <general|phase_confirmation|contract_complete>` - Question type + +**When to use:** +- During planning, when you need clarification on requirements or approach +- When there are multiple valid approaches and user preference matters +- When a decision requires domain knowledge you don't have +- Always use `--phaseguard` for questions that block progress (the reconcile mode on the directive also controls this) + +**Example:** +```bash +makima directive ask "Should we use REST or GraphQL for the new API?" --choices "REST,GraphQL" --context "The existing codebase uses REST but the frontend team prefers GraphQL" --phaseguard +``` + ## Memory Commands Directives have an optional key-value memory system that persists across steps and planning cycles. Use memory to share context, decisions, and learned information between steps — so downstream tasks don't need to re-discover what earlier steps already figured out. @@ -167,6 +193,7 @@ makima directive memory-batch-set --json '{"framework": "axum", "orm": "sqlx", " ### Initial Setup 1. Check the directive status to understand the goal 2. Decompose the goal into steps with clear dependencies + - If requirements are unclear, use `makima directive ask` to get clarification before finalizing the plan 3. Add steps using `add-step` with appropriate `--depends-on` flags 4. Start the directive with `start` 5. Steps with no dependencies will become `ready` immediately |
