diff options
Diffstat (limited to 'makima/src/daemon/cli')
| -rw-r--r-- | makima/src/daemon/cli/directive.rs | 26 | ||||
| -rw-r--r-- | makima/src/daemon/cli/mod.rs | 7 |
2 files changed, 33 insertions, 0 deletions
diff --git a/makima/src/daemon/cli/directive.rs b/makima/src/daemon/cli/directive.rs index cc7b224..0f04720 100644 --- a/makima/src/daemon/cli/directive.rs +++ b/makima/src/daemon/cli/directive.rs @@ -177,6 +177,32 @@ pub struct CreateOrderArgs { pub labels: Option<String>, } +/// Arguments for verify command — checks the current worktree can merge into the +/// directive's base branch with no conflicts. Runs entirely locally; no API call. +#[derive(Args, Debug)] +pub struct VerifyArgs { + /// Base branch to attempt merging into (e.g., "master", "main"). + #[arg(long, default_value = "master")] + pub base: String, + + /// Remote name to fetch from (default: "origin"). + #[arg(long, default_value = "origin")] + pub remote: String, + + /// Head ref to verify (default: current HEAD). + #[arg(long)] + pub head: Option<String>, + + /// Skip the `git fetch` step (use already-fetched remote ref). + #[arg(long, default_value = "false")] + pub skip_fetch: bool, + + /// Optional directive goal text. When provided the goal is echoed back as a + /// reminder so the calling orchestrator can self-check goal alignment. + #[arg(long)] + pub goal: Option<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 af6f885..7affc55 100644 --- a/makima/src/daemon/cli/mod.rs +++ b/makima/src/daemon/cli/mod.rs @@ -255,6 +255,13 @@ pub enum DirectiveCommand { /// Create an order for future work (spike or chore only) CreateOrder(directive::CreateOrderArgs), + + /// Verify the current worktree merges cleanly into the directive's base branch. + /// + /// Mandatory pre-flight before creating or pushing a directive PR — fails + /// with a non-zero exit code (and a list of conflicting files) if the merge + /// would conflict with the base branch. + Verify(directive::VerifyArgs), } impl Cli { |
