feat(MEMORY-001): session-handoff.sh bridge — archive /handoff to 00_meta/sessions (ADR-014)#190
Merged
Merged
Conversation
…to 00_meta/sessions (ADR-014) The Claude SessionEnd bridge: reads the hook JSON, locates the project's MEMORY.md, and archives the /handoff '## Session Handoff' block into an append-only record 00_meta/sessions/<date>-<project>-claude.md. The agent authors (via /handoff); the hook persists. Resilient no-op on trivial/missing/malformed input. bats 4/4, shellcheck clean. AC3 (settings.json + setup hook wiring, cross-OS) and AC4 (Windows .ps1) are the tracked next increment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the Linux/Claude core of the cross-agent session-memory bridge (ADR-014, spec MEMORY-001).
What
scripts/session-handoff.shis wired (next increment) to Claude'sSessionEndhook. It reads the hook JSON, locates the project'sMEMORY.md, and archives the## Session Handoffblock that/handoffwrote into an append-only record00_meta/sessions/<date>-<project>-claude.md.Design (ADR-014): the agent authors the handoff (via
/handoff, with reasoning); the hook only persists it as durable history. Resilient: every trivial/missing/malformed input is a clean no-op — a session-end hook must never crash a session.Verification
bats tests/session-handoff.bats->1..4ok (archive + 3 no-op cases)shellcheck+bash -ncleanScope
AC1/AC2 (the bridge logic) ship here. AC3 (settings.json + cross-OS setup merge wiring) and AC4 (Windows
.ps1+ Pester) are the tracked next increment — deploy plumbing that touches the SDD-002 settings-merge, kept as a separate focused PR.Spec:
specs/MEMORY-001-cross-agent-session-bridge/. Implements ADR-014.