Skip to content

feat(MEMORY-001): session-handoff.sh bridge — archive /handoff to 00_meta/sessions (ADR-014)#190

Merged
mlorentedev merged 2 commits into
mainfrom
feat/memory-001-session-bridge
May 31, 2026
Merged

feat(MEMORY-001): session-handoff.sh bridge — archive /handoff to 00_meta/sessions (ADR-014)#190
mlorentedev merged 2 commits into
mainfrom
feat/memory-001-session-bridge

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Implements the Linux/Claude core of the cross-agent session-memory bridge (ADR-014, spec MEMORY-001).

What

scripts/session-handoff.sh is wired (next increment) to Claude's SessionEnd hook. It reads the hook JSON, locates the project's MEMORY.md, and archives the ## Session Handoff block that /handoff wrote into an append-only record 00_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..4 ok (archive + 3 no-op cases)
  • shellcheck + bash -n clean

Scope

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.

…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.
@mlorentedev mlorentedev merged commit eb76ca4 into main May 31, 2026
6 checks passed
@mlorentedev mlorentedev deleted the feat/memory-001-session-bridge branch May 31, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant