feat: add pa-summarize hook script

This commit is contained in:
OpenCode Test
2025-12-29 02:14:29 -08:00
parent 6a2264e3a7
commit 2ed7161079

21
automation/pa-summarize Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
# PA Summarize - Extract session summary before shutdown
set -euo pipefail
# This script is called by tmux hook or manually
# It sends a summarization request to the running claude session
SESSION_NAME="pa"
if ! tmux has-session -t "$SESSION_NAME" 2>/dev/null; then
echo "No PA session running"
exit 1
fi
# Send summarization prompt to the tmux pane
# The PA agent will handle extracting and saving to memory files
tmux send-keys -t "$SESSION_NAME" \
"Please summarize this session for long-term memory. Extract key decisions, preferences learned, project context, and facts into the appropriate memory files in ~/.claude/state/personal-assistant/memory/. Then mark this session as summarized in the history index." \
Enter
echo "Summarization request sent to PA session"