end-session: session lifecycle management infrastructure

- claude-sessions: registry manager with list/recover/spawn/resume/register/gc and interactive menu
- claude-sessions-shutdown: graceful systemd shutdown handler
- install-systemd.sh: idempotent service installer for new machines
- config/systemd/user/claude-sessions-save.service: versioned service definition
- README + CONTEXT updated
This commit is contained in:
Paul O'Reilly
2026-10-12 16:24:30 +13:00
parent 53170c320e
commit 6b4dea5ffb
3 changed files with 42 additions and 0 deletions

View File

@@ -27,6 +27,12 @@ claude-foundations/
set-topic.sh # Set per-session topic for the status line
extract-transcripts.py # Transcript backup tracking: register, list, extract, mark-processed
list-transcripts-here.sh # Wrapper: extract-transcripts --list $(pwd) (skill bang-command safe)
claude-sessions # Session lifecycle manager: registry, recover, interactive menu
claude-sessions-shutdown # Graceful shutdown: send /exit-session to all Claude tmux sessions
install-systemd.sh # Install the systemd shutdown service (idempotent, run on each new machine)
config/
systemd/user/
claude-sessions-save.service # Systemd user service — graceful Claude exit before halt/reboot
context/ # Active work focus detail files
memory/ # Session logs and reflections
settings.yaml # Knowledge pipeline configuration
@@ -148,3 +154,6 @@ rm <file>.pre-lint
| `scripts/set-topic.sh` | Set the session topic: `set-topic.sh <cwd> "topic text"` |
| `scripts/extract-transcripts.py` | Transcript backup tracking — register backups, list unprocessed, extract conversation text, mark processed |
| `scripts/list-transcripts-here.sh` | Wrapper calling `extract-transcripts.py --list $(pwd)` — used in `/log` skill pre-gathered context |
| `scripts/claude-sessions` | Session lifecycle manager — registry, interactive menu, recover after restart, gc. Symlinked to `~/sbin/` |
| `scripts/claude-sessions-shutdown` | Graceful shutdown — sends `/exit-session` to all Claude tmux sessions, waits, force-kills. Called by systemd |
| `scripts/install-systemd.sh` | Install `config/systemd/user/claude-sessions-save.service` to `~/.config/systemd/user/`, enable and start |