diff options
| author | soryu <soryu@soryu.co> | 2026-02-11 00:33:36 +0000 |
|---|---|---|
| committer | soryu <soryu@soryu.co> | 2026-02-11 00:33:36 +0000 |
| commit | 9bd6eacaa9ebe860842b5d5cfbf2b7d2d0293ab1 (patch) | |
| tree | 2b5dceee69f2390ab5f2c29c6fe39e091d7ca318 /makima/src | |
| parent | 15b6e5fba161a194fe5427d7d29b0c4286423260 (diff) | |
| download | soryu-9bd6eacaa9ebe860842b5d5cfbf2b7d2d0293ab1.tar.gz soryu-9bd6eacaa9ebe860842b5d5cfbf2b7d2d0293ab1.zip | |
Fix DAG ordering
Diffstat (limited to 'makima/src')
| -rw-r--r-- | makima/src/db/repository.rs | 6 | ||||
| -rw-r--r-- | makima/src/orchestration/directive.rs | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/makima/src/db/repository.rs b/makima/src/db/repository.rs index 358ab48..7afbeea 100644 --- a/makima/src/db/repository.rs +++ b/makima/src/db/repository.rs @@ -5371,6 +5371,12 @@ pub async fn advance_directive_ready_steps( JOIN directive_steps ds ON ds.id = dep_id WHERE ds.status NOT IN ('completed', 'skipped') ) + AND NOT EXISTS ( + SELECT 1 FROM directive_steps prev + WHERE prev.directive_id = $1 + AND prev.order_index < directive_steps.order_index + AND prev.status NOT IN ('completed', 'skipped', 'failed') + ) RETURNING * "#, ) diff --git a/makima/src/orchestration/directive.rs b/makima/src/orchestration/directive.rs index 6121529..15cc7ed 100644 --- a/makima/src/orchestration/directive.rs +++ b/makima/src/orchestration/directive.rs @@ -641,7 +641,9 @@ For each step, define: - description: What to do and acceptance criteria - taskPlan: Full instructions for the Claude instance (include file paths, patterns to follow) - dependsOn: UUIDs of steps this depends on (use IDs from previous add-step responses) -- orderIndex: Execution order hint +- orderIndex: Execution phase number. Steps only start after ALL steps with a lower orderIndex complete. + Steps with the same orderIndex run in parallel. Use ascending values (0, 1, 2, ...) to create sequential phases. + Use dependsOn for fine-grained control within the same phase. Submit steps: makima directive add-step "Step Name" --description "..." --task-plan "..." |
