2.3 KiB

name description trigger
task-and-input-logging Task lifecycle logging with start/end/status tracking, and user input logging On every user message, log input. On every task start, create task log. On task end, update status.

Task & Input Logging

Input Logging

  • Every user message must be appended to ~/input-logs/YYYY-MM-DD.log
  • Format: [HH:MM:SS] USER: <message_preview_first_200_chars>
  • Create the daily log file if it doesn't exist
  • Append, never overwrite

Task Logging

  • Every task (including subtasks from delegate_task, cron jobs, or multi-step workflows) gets a log entry
  • Task log files live in ~/task-logs/
  • Naming: ~/task-logs/YYYY-MM-DD_HHMMSS_<short_task_name>.log
  • Each task log contains:
    Task: <task description>
    Started: YYYY-MM-DD HH:MM:SS
    Status: running -> completed | failed | cancelled
    Ended: YYYY-MM-DD HH:MM:SS (when done)
    ---
    [Progress notes, key decisions, file paths, errors]
    

Non-Negotiable Rules

  1. Log EVERY user input — no exceptions, even if you're in the middle of a task. Append to ~/input-logs/YYYYMMDD_inputs.log before doing anything else.
  2. Never let user input interrupt a running task — if a background process, delegate_task, or long-running command is active, the user's new message does NOT cancel it. Log the input, note the task switch, and decide whether to interleave or queue the new request.
  3. Every task gets a log file — start time, end time, and status must be visible. If the logging capability is missing, create it first (write the script, create the directories) before proceeding with the primary task.

Workflow

Helper Script

Use ~/.hermes/scripts/log_helper.py for programmatic logging:

python3 ~/.hermes/scripts/log_helper.py input "user message text"
python3 ~/.hermes/scripts/log_helper.py start "task description"
python3 ~/.hermes/scripts/log_helper.py end <logfile_name> completed "summary"
python3 ~/.hermes/scripts/log_helper.py update <logfile_name> status "message"
python3 ~/.hermes/scripts/log_helper.py list

Summary Index

  • Maintain ~/task-logs/INDEX.md with a table of all tasks:
    Date Task Started Ended Status

Verification

  • After logging, verify the file was written (cat last 3 lines)
  • If logging fails, note it in memory but continue with the primary task