fix(hooks): match STATE.md field names in notify hook

The hook was grepping for `current_phase:` and `status:` but STATE.md
uses `Phase:` and `Status:`. Now shows actual phase info instead of
always falling back to "Ready for input".

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2026-01-16 13:29:51 -06:00
parent 734134f435
commit 055cc24ec6

View File

@@ -17,8 +17,8 @@ fi
message=""
state_file="$cwd/.planning/STATE.md"
if [[ -f "$state_file" ]]; then
phase=$(grep -m1 "^current_phase:" "$state_file" 2>/dev/null | sed 's/^current_phase: *//')
status=$(grep -m1 "^status:" "$state_file" 2>/dev/null | sed 's/^status: *//')
phase=$(grep -m1 "^Phase:" "$state_file" 2>/dev/null | sed 's/^Phase: *//')
status=$(grep -m1 "^Status:" "$state_file" 2>/dev/null | sed 's/^Status: *//')
if [[ -n "$phase" && -n "$status" ]]; then
message="Phase $phase: $status"
fi