From 2ed7161079623c9f9900185df6fa0e54d7d9e855 Mon Sep 17 00:00:00 2001 From: OpenCode Test Date: Mon, 29 Dec 2025 02:14:29 -0800 Subject: [PATCH] feat: add pa-summarize hook script --- automation/pa-summarize | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 automation/pa-summarize diff --git a/automation/pa-summarize b/automation/pa-summarize new file mode 100755 index 0000000..cb61338 --- /dev/null +++ b/automation/pa-summarize @@ -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"