feat: add pa-summarize hook script
This commit is contained in:
21
automation/pa-summarize
Executable file
21
automation/pa-summarize
Executable 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"
|
||||||
Reference in New Issue
Block a user