-
Notifications
You must be signed in to change notification settings - Fork 1
Context Linked Commits
Automatically bind git commits to the AI conversation that produced them.
Git records what changed (code diff) but not why (the conversation and reasoning). When you go back to a historical commit, Memora had to guess which conversation was related — using timestamps, which isn't always precise.
When your AI coding tool makes a commit during a conversation, Memora's hook detects it and records the link:
commit abc1234 ←→ session 2130af27-a863-4d3c-bc7c-747020ceccfe
This creates an exact, unbreakable association between code changes and the conversation that produced them.
- AI tool completes a turn (e.g., Claude Code runs a command)
- Memora hook fires on
turn-complete - Hook checks if any new git commits appeared in the last 30 seconds
- If yes, writes a
commit-linkevent mapping commit hash → session ID - On next sync, the link is stored in the database
Commits with a linked conversation show a 💬 icon:
💬 abc1234 feat: add user authentication +156 Mar 31 at 15:24
def5678 fix: typo in README +1 Mar 31 at 14:00
- 💬 = Full conversation context available (can restore exact reasoning)
- No icon = Code-only commit (falls back to time-based context matching)
When you Recall from a 💬 commit, Memora loads the exact conversation session instead of guessing by time. 100% precise context.
When you Branch from a 💬 commit, the CLAUDE.md in the new branch contains the actual conversation that led to this code state.
- Old commits (before this feature): No session_id, no icon, time-based matching as before
- Manual commits (not via AI): No hook fires, no link, same as old behavior
- New AI-assisted commits: Automatically linked, 💬 icon, precise context
No data migration needed. The feature enhances new data without breaking old data.