Skip to main content

Session Handoff Hook - Process Refinement System

Executes at session end to:

  1. Generate minimal context snapshot (<500 tokens)
  2. Summarize completed work
  3. Identify next priorities
  4. 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