summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.tasks/tasks.jsonl2
-rw-r--r--Omni/Task.hs13
-rw-r--r--Omni/Task/Core.hs11
-rw-r--r--Omni/Task/README.md1
4 files changed, 20 insertions, 7 deletions
diff --git a/.tasks/tasks.jsonl b/.tasks/tasks.jsonl
index a49d1e6..c7bdf7f 100644
--- a/.tasks/tasks.jsonl
+++ b/.tasks/tasks.jsonl
@@ -208,5 +208,5 @@
{"taskCreatedAt":"2025-11-22T20:37:31.615764727Z","taskDependencies":[],"taskDescription":"The 'task ready' command currently lists Epics. Update 'getReadyTasks' in Omni/Task/Core.hs to exclude tasks where taskType == Epic.","taskId":"t-1o2bxd3kezj","taskNamespace":"Omni/Task.hs","taskParent":null,"taskPriority":"P1","taskStatus":"Done","taskTitle":"Fix task ready to exclude Epics","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T22:08:41.720176373Z"}
{"taskCreatedAt":"2025-11-22T21:45:10.578083608Z","taskDependencies":[],"taskDescription":"Update Omni/Agent/start-worker.sh to run 'git sync' in the worker directory before building 'task' and 'agent'. This ensures the worker has the latest tools and code from live.","taskId":"t-1o2bxcq7999.4","taskNamespace":"Omni/Agent.hs","taskParent":"t-1o2bxcq7999","taskPriority":"P1","taskStatus":"Done","taskTitle":"Sync worker repo in start-worker.sh","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T22:01:47.245671772Z"}
{"taskCreatedAt":"2025-11-22T21:19:54.675769476Z","taskDependencies":[],"taskDescription":null,"taskId":"t-rwd249bi3","taskNamespace":"Omni/Task.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Test Approved Status","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T21:20:10.652509625Z"}
-{"taskCreatedAt":"2025-11-23T00:24:33.85216903Z","taskDependencies":[],"taskDescription":"Add HumanTask to TaskType in Omni/Task/Core.hs. Update 'task ready' and 'Omni/Agent/Worker.hs' to exclude HumanTask. Update docs (Omni/Task/README.md, AGENTS.md) to explain HumanTask usage.","taskId":"t-1o2c9vazf64","taskNamespace":"Omni/Task.hs","taskParent":null,"taskPriority":"P1","taskStatus":"Review","taskTitle":"Add HumanTask type to Task system","taskType":"WorkTask","taskUpdatedAt":"2025-11-23T00:30:55.923681196Z"}
+{"taskCreatedAt":"2025-11-23T00:24:33.85216903Z","taskDependencies":[],"taskDescription":"Add HumanTask to TaskType in Omni/Task/Core.hs. Update 'task ready' and 'Omni/Agent/Worker.hs' to exclude HumanTask. Update docs (Omni/Task/README.md, AGENTS.md) to explain HumanTask usage.","taskId":"t-1o2c9vazf64","taskNamespace":"Omni/Task.hs","taskParent":null,"taskPriority":"P1","taskStatus":"Done","taskTitle":"Add HumanTask type to Task system","taskType":"WorkTask","taskUpdatedAt":"2025-11-23T00:37:37.189983777Z"}
{"taskCreatedAt":"2025-11-23T00:25:37.243000855Z","taskDependencies":[],"taskDescription":null,"taskId":"t-1o2c9wcq3go","taskNamespace":"Biz/PodcastItLater.hs","taskParent":null,"taskPriority":"P1","taskStatus":"Open","taskTitle":"PodcastItLater: Mailgun Integration","taskType":"Epic","taskUpdatedAt":"2025-11-23T00:25:37.243000855Z"}
diff --git a/Omni/Task.hs b/Omni/Task.hs
index 82449db..653e5fe 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -78,7 +78,7 @@ Commands:
Options:
-h --help Show this help
--title=<title> Task title
- --type=<type> Task type: epic or 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, approved, done
@@ -127,7 +127,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)
@@ -247,6 +248,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
@@ -405,6 +407,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 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)