diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 19:41:15 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 19:41:15 -0500 |
| commit | 91d3e6aa499c3207a84f79683b86f2fbe01dee52 (patch) | |
| tree | 5bb6de6c7712b61eda4faf96b02ed2d2b6686b4b /Omni/Task | |
| parent | 010af153fa43f754d8975fd64c172ac17c523140 (diff) | |
| parent | 1e34a47803b10513443ef836aad88c0087c67e5d (diff) | |
task: complete t-1o2c9vazf64 (Merge)
Amp-Thread-ID:
https://ampcode.com/threads/T-ca3b086b-5a85-422a-b13d-256784c04221
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'Omni/Task')
| -rw-r--r-- | Omni/Task/Core.hs | 11 | ||||
| -rw-r--r-- | Omni/Task/README.md | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index 2f2cccb..1eb820f 100644 --- a/Omni/Task/Core.hs +++ b/Omni/Task/Core.hs @@ -39,7 +39,7 @@ data Task = Task } deriving (Show, Eq, Generic) -data TaskType = Epic | WorkTask +data TaskType = Epic | WorkTask | HumanTask deriving (Show, Eq, Generic) data Status = Open | InProgress | Review | Approved | Done @@ -454,9 +454,12 @@ getReadyTasks = do -- Only Blocks and ParentChild dependencies block ready work blockingDepIds task = [depId dep | dep <- taskDependencies task, depType dep `elem` [Blocks, ParentChild]] isReady task = - taskType task /= Epic + taskType task + /= Epic && not (isParent (taskId task)) && all (`elem` doneIds) (blockingDepIds task) + && taskType task + /= HumanTask pure <| filter isReady openTasks -- Get dependency tree for a task (returns tasks) @@ -575,7 +578,7 @@ showTaskTree maybeId = do let total = length children completed = length <| filter (\t -> taskStatus t == Done) children in "[" <> T.pack (show completed) <> "/" <> T.pack (show total) <> "]" - WorkTask -> case taskStatus task of + _ -> case taskStatus task of Open -> "[ ]" InProgress -> "[~]" Review -> "[?]" @@ -584,7 +587,7 @@ showTaskTree maybeId = do coloredStatusStr = case taskType task of Epic -> magenta statusStr - WorkTask -> case taskStatus task of + _ -> case taskStatus task of Open -> bold statusStr InProgress -> yellow statusStr Review -> magenta statusStr diff --git a/Omni/Task/README.md b/Omni/Task/README.md index 8e8670e..d52efba 100644 --- a/Omni/Task/README.md +++ b/Omni/Task/README.md @@ -48,6 +48,7 @@ task create "Fix type errors" --namespace="Omni/Task" **Task Types:** - `epic` - Container for related tasks - `task` - Individual work item (default) +- `human` - Task specifically for human operators (excluded from agent work queues) **Dependency Types:** - `blocks` - Hard dependency, blocks ready work queue (default) |
