Skip to content

Commit 6e7876d

Browse files
committed
feat: initial implementation of Prsist Memory System
- Add comprehensive memory system for Claude Code session tracking - Implement SQLite database for persistent storage - Create hook integration for SessionStart and PostToolUse - Add CLI interface with single-letter commands - Include configuration management and validation - Implement context injection and session lifecycle management - Add comprehensive testing and documentation Created by Fabien Dostie and co-authored by Claude Code
1 parent 93426c2 commit 6e7876d

File tree

122 files changed

+32805
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+32805
-0
lines changed

.lefthook.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Lefthook configuration for Prsist Memory System
2+
# Git hook management for automated memory tracking and correlation
3+
4+
# Pre-commit: Capture development context before commit
5+
pre-commit:
6+
parallel: true
7+
commands:
8+
memory-capture:
9+
glob: "*.{js,ts,py,go,md,yaml,json,tsx,jsx,vue,php,rb,java,cpp,c,h,hpp,cs,rs,kt,swift,scala}"
10+
run: python .prsist/hooks/git-memory-capture.py {staged_files}
11+
stage_fixed: false
12+
fail_text: "Memory capture failed - commit will proceed but memory may be incomplete"
13+
14+
# Post-commit: Correlate commit with memory system
15+
post-commit:
16+
commands:
17+
memory-correlate:
18+
run: python .prsist/hooks/git-memory-correlate.py {commit_sha}
19+
stage_fixed: true
20+
fail_text: "Memory correlation failed - commit successful but memory tracking incomplete"
21+
22+
# Pre-push: Synchronize memory before pushing
23+
pre-push:
24+
commands:
25+
memory-sync:
26+
run: python .prsist/hooks/git-memory-sync.py {branch}
27+
fail_text: "Memory sync failed - push will proceed but memory may be out of sync"
28+
29+
# Post-merge: Update memory context after merge
30+
post-merge:
31+
commands:
32+
memory-update:
33+
run: python .prsist/hooks/git-memory-update.py merge {branch}
34+
stage_fixed: true
35+
fail_text: "Memory update after merge failed - manual sync may be required"
36+
37+
# Post-checkout: Switch memory context when changing branches
38+
post-checkout:
39+
commands:
40+
context-switch:
41+
run: python .prsist/hooks/git-context-switch.py {branch}
42+
fail_text: "Context switch failed - memory may not reflect current branch state"
43+
44+
# Post-rewrite: Handle rebases and amends
45+
post-rewrite:
46+
commands:
47+
memory-rewrite:
48+
run: python .prsist/hooks/git-memory-rewrite.py {rewritten_list}
49+
fail_text: "Memory rewrite handling failed"
50+
51+
# Prepare-commit-msg: Enhance commit messages with memory context
52+
prepare-commit-msg:
53+
commands:
54+
enhance-commit-msg:
55+
run: python .prsist/hooks/git-enhance-commit-msg.py {commit_msg_file} {commit_source} {commit_sha}
56+
fail_text: "Commit message enhancement failed - using original message"
57+
58+
# Configuration
59+
assert_lefthook_installed: true
60+
colors: true
61+
no_tty: false
62+
63+
# Skip patterns for performance
64+
skip_output:
65+
- meta
66+
- success
67+
68+
# Only run on specific file types to improve performance
69+
exclude_tags:
70+
- merge
71+
- rebase
72+
73+
# Timeout settings
74+
remote:
75+
git_url: "{remote_url}"
76+
ref: "{push_branch}"
77+
config: .lefthook-remote.yml

0 commit comments

Comments
 (0)