Task Completion Trigger Hook
Automatically triggers PILOT plan updates when tasks are marked complete via TodoWrite or other task tracking mechanisms.
Hook Events:
- PostToolUse:TodoWrite - After todo list updates
- task.completed - Custom event for task completion
Usage: python3 task-completion-trigger.py --event PostToolUse:TodoWrite --input '{"todos": [...]}'
File: task-completion-trigger.py
Functions
find_pilot_plan(start_dir)
Find the PILOT plan file.
extract_completed_tasks(todos)
Extract newly completed tasks from todo list.
update_pilot_plan(plan_path, completed_tasks)
Update PILOT plan with completed tasks.
update_session_log(completed_tasks, session_log_dir)
Update today's session log with completed tasks.
git_commit(files, message, push)
Create git commit with changed files.
main()
No description
Usage
python task-completion-trigger.py