Session Handoff Hook - Process Refinement System
Executes at session end to:
- Generate minimal context snapshot (<500 tokens)
- Summarize completed work
- Identify next priorities
- Create handoff document
Usage: python session-handoff.py --event session.end python session-handoff.py --generate-snapshot
Author: CODITECT Process Refinement Version: 1.0.0 Created: 2026-01-02
File: session-handoff.py
Functions
get_project_root()
Get the project root directory.
ensure_directories()
Ensure required directories exist.
get_completed_tasks()
Get list of tasks completed in current session.
get_pending_priorities()
Get high-priority pending tasks.
get_key_decisions()
Get key decisions made in session.
generate_context_snapshot()
Generate a minimal context snapshot (<500 tokens target).
format_handoff_document(snapshot)
Format snapshot as human-readable handoff document.
save_snapshot(snapshot)
Save snapshot to file.
main()
No description
Usage
python session-handoff.py