summaryrefslogtreecommitdiff
path: root/makima/src/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/daemon')
-rw-r--r--makima/src/daemon/api/supervisor.rs25
-rw-r--r--makima/src/daemon/cli/mod.rs3
-rw-r--r--makima/src/daemon/cli/supervisor.rs15
-rw-r--r--makima/src/daemon/task/manager.rs22
4 files changed, 65 insertions, 0 deletions
diff --git a/makima/src/daemon/api/supervisor.rs b/makima/src/daemon/api/supervisor.rs
index 74c27e0..e79a9bb 100644
--- a/makima/src/daemon/api/supervisor.rs
+++ b/makima/src/daemon/api/supervisor.rs
@@ -299,6 +299,31 @@ impl ApiClient {
self.delete(&format!("/api/v1/mesh/tasks/{}", task_id)).await
}
+ /// Mark a deliverable as complete.
+ pub async fn supervisor_mark_deliverable(
+ &self,
+ contract_id: Uuid,
+ deliverable_id: &str,
+ phase: Option<&str>,
+ ) -> Result<JsonValue, ApiError> {
+ #[derive(Serialize)]
+ #[serde(rename_all = "camelCase")]
+ struct MarkDeliverableRequest {
+ deliverable_id: String,
+ #[serde(skip_serializing_if = "Option::is_none")]
+ phase: Option<String>,
+ }
+ let req = MarkDeliverableRequest {
+ deliverable_id: deliverable_id.to_string(),
+ phase: phase.map(|s| s.to_string()),
+ };
+ self.post(
+ &format!("/api/v1/contracts/{}/deliverables/complete", contract_id),
+ &req,
+ )
+ .await
+ }
+
/// Update a task.
pub async fn update_task(
&self,
diff --git a/makima/src/daemon/cli/mod.rs b/makima/src/daemon/cli/mod.rs
index 216f281..0805edd 100644
--- a/makima/src/daemon/cli/mod.rs
+++ b/makima/src/daemon/cli/mod.rs
@@ -157,6 +157,9 @@ pub enum SupervisorCommand {
/// Resume a completed contract (reactivate it)
ResumeContract(supervisor::ResumeContractArgs),
+
+ /// Mark a deliverable as complete
+ MarkDeliverable(supervisor::MarkDeliverableArgs),
}
/// Contract subcommands for task-contract interaction.
diff --git a/makima/src/daemon/cli/supervisor.rs b/makima/src/daemon/cli/supervisor.rs
index 3bc8525..4f36fd8 100644
--- a/makima/src/daemon/cli/supervisor.rs
+++ b/makima/src/daemon/cli/supervisor.rs
@@ -220,6 +220,21 @@ pub struct AdvancePhaseArgs {
pub phase: String,
}
+/// Arguments for mark-deliverable command.
+#[derive(Args, Debug)]
+pub struct MarkDeliverableArgs {
+ #[command(flatten)]
+ pub common: SupervisorArgs,
+
+ /// The deliverable ID to mark as complete (e.g., 'plan-document', 'pull-request', 'research-notes')
+ #[arg(index = 1)]
+ pub deliverable_id: String,
+
+ /// Phase the deliverable belongs to. Defaults to current contract phase if not specified.
+ #[arg(long)]
+ pub phase: Option<String>,
+}
+
/// Arguments for task command (get individual task details).
#[derive(Args, Debug)]
pub struct GetTaskArgs {
diff --git a/makima/src/daemon/task/manager.rs b/makima/src/daemon/task/manager.rs
index 86d7e05..8abff3f 100644
--- a/makima/src/daemon/task/manager.rs
+++ b/makima/src/daemon/task/manager.rs
@@ -720,6 +720,9 @@ makima supervisor status
# Advance to the next phase (specify, plan, execute, review)
makima supervisor advance-phase <phase>
+
+# Mark a phase deliverable as complete (e.g., 'plan-document', 'pull-request')
+makima supervisor mark-deliverable <deliverable_id> [--phase <phase>]
```
### User Feedback
@@ -781,6 +784,25 @@ makima supervisor advance-phase <phase>
Valid phases: `specify`, `plan`, `execute`, `review`
+### Marking Deliverables Complete
+
+Each phase has deliverables that must be completed before advancing. Use `mark-deliverable` to explicitly mark them as complete when you've verified the requirement is satisfied:
+
+```bash
+# Mark a deliverable complete (defaults to current phase)
+makima supervisor mark-deliverable plan-document
+
+# Mark a deliverable for a specific phase
+makima supervisor mark-deliverable pull-request --phase execute
+```
+
+Common deliverable IDs by phase:
+- **plan**: `plan-document`, `requirements-document`
+- **execute**: `pull-request`
+- **review**: `release-notes`, `retrospective`
+
+**Use `status` to see which deliverables are pending for the current phase.**
+
## When to Advance Phases
**IMPORTANT**: You MUST advance the contract phase as you complete work in each phase!