git-subtree-dir: apps/viewer-3d git-subtree-mainline:5e10bb1be4git-subtree-split:a71790070d
13 lines
610 B
Bash
13 lines
610 B
Bash
#!/usr/bin/env bash
|
|
# PostToolUse hook (Edit|Write) — nudge to update PROGRESS.md when runtime code changes.
|
|
# Reads the tool call JSON from stdin; if the touched file is under src/ or tools/,
|
|
# emit a one-line reminder. Non-zero/empty output otherwise.
|
|
input="$(cat)"
|
|
path="$(printf '%s' "$input" | grep -o '"file_path"[[:space:]]*:[[:space:]]*"[^"]*"' | head -1 | sed 's/.*"file_path"[[:space:]]*:[[:space:]]*"//;s/"$//')"
|
|
case "$path" in
|
|
*"/src/"*|*"/tools/"*)
|
|
echo "Edited runtime code ($path). If a PLAN.md task finished, run /report to update PROGRESS.md and flip its status."
|
|
;;
|
|
esac
|
|
exit 0
|