diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-22 19:30:45 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-22 19:30:45 -0500 |
| commit | 1e34a47803b10513443ef836aad88c0087c67e5d (patch) | |
| tree | f27d6eac734a8a00a73125385e4f0f1ec79f60a0 | |
| parent | 6f4b2c97a24967508f3970b46999052fd1f44e67 (diff) | |
feat: implement t-1o2c9vazf64
| -rw-r--r-- | AGENTS.md | 1 | ||||
| -rw-r--r-- | Omni/Task.hs | 13 | ||||
| -rw-r--r-- | Omni/Task/Core.hs | 7 | ||||
| -rw-r--r-- | Omni/Task/README.md | 19 |
4 files changed, 35 insertions, 5 deletions
@@ -191,6 +191,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) diff --git a/Omni/Task.hs b/Omni/Task.hs index 36b318b..32f259b 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -73,7 +73,7 @@ Commands: Options: -h --help Show this help - --type=<type> Task type: epic or task (default: task) + --type=<type> Task type: epic, task, or human (default: task) --parent=<id> Parent epic ID --priority=<p> Priority: 0-4 (0=critical, 4=backlog, default: 2) --status=<status> Filter by status: open, in-progress, review, done @@ -119,7 +119,8 @@ move args Nothing -> pure WorkTask Just "epic" -> pure Epic Just "task" -> pure WorkTask - Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic or task" + Just "human" -> pure HumanTask + Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic, task, or human" parent <- case Cli.getArg args (Cli.longOption "parent") of Nothing -> pure Nothing Just p -> pure <| Just (T.pack p) @@ -174,6 +175,7 @@ move args Nothing -> pure Nothing Just "epic" -> pure <| Just Epic Just "task" -> pure <| Just WorkTask + Just "human" -> pure <| Just HumanTask Just other -> panic <| "Invalid task type: " <> T.pack other maybeParent <- case Cli.getArg args (Cli.longOption "parent") of Nothing -> pure Nothing @@ -313,6 +315,13 @@ unitTests = taskStatus task Test.@?= Open taskPriority task Test.@?= P2 null (taskDependencies task) Test.@?= True, + Test.unit "can create human task" <| do + task <- createTask "Human Task" HumanTask Nothing Nothing P2 [] Nothing + taskType task Test.@?= HumanTask, + Test.unit "ready tasks exclude human tasks" <| do + task <- createTask "Human Task" HumanTask Nothing Nothing P2 [] Nothing + ready <- getReadyTasks + (taskId task `notElem` map taskId ready) Test.@?= True, Test.unit "can create task with description" <| do task <- createTask "Test task" WorkTask Nothing Nothing P2 [] (Just "My description") taskDescription task Test.@?= Just "My description", diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs index bab1912..c548f6c 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 | Done @@ -397,6 +397,7 @@ getReadyTasks = do isReady task = not (isParent (taskId task)) && all (`elem` doneIds) (blockingDepIds task) + && taskType task /= HumanTask pure <| filter isReady openTasks -- Get dependency tree for a task (returns tasks) @@ -514,7 +515,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 -> "[?]" @@ -522,7 +523,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 new file mode 100644 index 0000000..c989251 --- /dev/null +++ b/Omni/Task/README.md @@ -0,0 +1,19 @@ +# Omni/Task + +The Task Manager system for the Omnirepo. + +## Task Types + +- `Epic`: A container for related tasks. +- `WorkTask`: A standard unit of work (default). +- `HumanTask`: A task specifically for human operators. These are excluded from the `task ready` queue used by agents. + +## Usage + +```bash +# Create a human task +task create "Manual review required" --type=human + +# List all human tasks +task list --type=human +``` |
