From 5f29e393a6696c6f1e5ef2394bddd58aab7f8eda Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sun, 9 Nov 2025 08:24:03 -0500 Subject: Fix task auto-commit with pre-commit hook Implemented proper pre-commit hook that: - Calls 'task export --flush' to consolidate tasks - Auto-stages .tasks/tasks.jsonl if modified - Runs before every commit Added reminder message after 'task update' to inform users that task changes will be committed on next git commit. Updated AGENTS.md to document the auto-commit behavior. This fixes the bug where task status updates (e.g., marking tasks as Done) were not being committed to git. --- Omni/Task.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Omni') diff --git a/Omni/Task.hs b/Omni/Task.hs index ae854a7..0aca674 100644 --- a/Omni/Task.hs +++ b/Omni/Task.hs @@ -153,6 +153,8 @@ move args _ -> panic "Invalid status. Use: open, in-progress, or done" updateTaskStatus tid newStatus putStrLn <| "Updated task " <> T.unpack tid + -- Remind user to commit changes (pre-commit hook will auto-export) + putText "Note: Task changes will be committed automatically on your next git commit." | args `Cli.has` Cli.command "deps" = do tid <- getArgText args "id" showDependencyTree tid -- cgit v1.2.3