From 7e03d8f323d44b972aeceb009928c977ee64fed2 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 1 Dec 2025 13:51:21 -0500 Subject: Replace HumanTask type with NeedsHelp status - Remove HumanTask from TaskType enum (now Epic | WorkTask only) - Add NeedsHelp to Status enum for tasks requiring human guidance - Update getReadyTasks to filter NeedsHelp instead of HumanTask - Rename humanTasks to tasksNeedingHelp in HumanActionItems - Add CLI parsing for needs-help status in list/update commands - Add badge styling for NeedsHelp (amber/yellow theme) - Update all status pattern matches in tree view and print functions - Update tests to verify NeedsHelp exclusion from ready queue Task-Id: t-210 --- Omni/Task.hs | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'Omni/Task.hs') diff --git a/Omni/Task.hs b/Omni/Task.hs index ce26f41..1385a4b 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -85,11 +85,11 @@ Commands: Options: -h --help Show this help --title= Task title - --type=<type> Task type: epic, task, or human (default: task) + --type=<type> Task type: epic or task (default: task) --parent=<id> Parent epic ID --priority=<p> Priority: 0-4 (0=critical, 4=backlog, default: 2) --complexity=<c> Complexity: 1-5 for model selection (1=trivial, 5=expert) - --status=<status> Filter by status: draft, open, in-progress, review, approved, done + --status=<status> Filter by status: draft, open, in-progress, review, approved, done, needs-help --epic=<id> Filter stats by epic (recursive) --deps=<ids> Comma-separated list of dependency IDs --dep-type=<type> Dependency type: blocks, discovered-from, parent-child, related @@ -109,7 +109,7 @@ Options: Arguments: <title> Task title <id> Task ID - <status> Task status (draft, open, in-progress, review, approved, done) + <status> Task status (draft, open, in-progress, review, approved, done, needs-help) <message> Comment message <file> JSONL file to import |] @@ -147,8 +147,7 @@ move' args Nothing -> pure WorkTask Just "epic" -> pure Epic Just "task" -> pure WorkTask - Just "human" -> pure HumanTask - Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic, task, or human" + Just other -> panic <| "Invalid task type: " <> T.pack other <> ". Use: epic or task" parent <- case Cli.getArg args (Cli.longOption "parent") of Nothing -> pure Nothing Just p -> pure <| Just (T.pack p) @@ -295,7 +294,6 @@ 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 @@ -308,7 +306,8 @@ move' args Just "review" -> pure <| Just Review Just "approved" -> pure <| Just Approved Just "done" -> pure <| Just Done - Just other -> panic <| "Invalid status: " <> T.pack other <> ". Use: draft, open, in-progress, review, approved, or done" + Just "needs-help" -> pure <| Just NeedsHelp + Just other -> panic <| "Invalid status: " <> T.pack other <> ". Use: draft, open, in-progress, review, approved, done, or needs-help" maybeNamespace <- case Cli.getArg args (Cli.longOption "namespace") of Nothing -> pure Nothing Just ns -> do @@ -362,7 +361,8 @@ move' args "review" -> Review "approved" -> Approved "done" -> Done - _ -> panic "Invalid status. Use: draft, open, in-progress, review, approved, or done" + "needs-help" -> NeedsHelp + _ -> panic "Invalid status. Use: draft, open, in-progress, review, approved, done, or needs-help" -- Show verification checklist warning when marking Done without --verified when (newStatus == Done && not isVerified && not (isJsonMode args)) <| do @@ -620,11 +620,9 @@ 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 [] "Human task description" - taskType task Test.@?= HumanTask, - Test.unit "ready tasks exclude human tasks" <| do - task <- createTask "Human Task" HumanTask Nothing Nothing P2 Nothing [] "Human task" + Test.unit "ready tasks exclude NeedsHelp tasks" <| do + task <- createTask "Needs Help Task" WorkTask Nothing Nothing P2 Nothing [] "Task needing help" + updateTaskStatus (taskId task) NeedsHelp [] ready <- getReadyTasks (taskId task `notElem` map taskId ready) Test.@?= True, Test.unit "ready tasks exclude draft tasks" <| do -- cgit v1.2.3