memento-vault
Health Uyari
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 5 GitHub stars
Code Basarisiz
- exec() — Shell command execution in benchmark/longmemeval_adapter.py
Permissions Gecti
- Permissions — No dangerous permissions requested
This tool automatically captures, triages, and stores your Claude Code session transcripts into a searchable local markdown and git repository. It optionally injects relevant past notes back into active sessions.
Security Assessment
Overall risk: Medium. The tool operates locally without demanding dangerous system permissions, cloud services, or databases. However, the automated scanner flagged a shell command execution within a benchmarking script. While likely used for local file operations or installing dependencies, executing shell commands always introduces a potential vector for injection if inputs are mishandled. Additionally, because the tool reads your complete session transcripts, it inherently handles highly sensitive data (your code, prompts, and AI responses). The installer directly modifies your `~/.claude/` directory, meaning it alters your local AI client configuration. No hardcoded secrets were detected.
Quality Assessment
The project is very new and has extremely low community visibility with only 5 stars, meaning it has not been broadly peer-reviewed or battle-tested by the open-source community. However, it is actively maintained (last updated today) and uses a standard, permissive MIT license. Its reliance on optional third-party tools like QMD and Obsidian suggests a modular but somewhat niche design.
Verdict
Use with caution. The codebase actively handles your sensitive chat transcripts and executes shell commands, so developers should inspect the flagged script and installation files before integrating this low-visibility tool into their workflow.
Persistent knowledge capture for Claude Code. Auto-triages sessions into searchable Zettelkasten notes with epistemic metadata. Local-only, markdown + git.
Memento Vault
Persistent knowledge capture for Claude Code. Sessions get triaged, scored, and filed as searchable Zettelkasten notes. No cloud services, no databases. Markdown and git.
What it does
A hook fires when a Claude Code session ends. It reads the transcript and decides what to keep. Short sessions get a one-liner in a daily log. Substantial ones spawn a background agent that writes atomic notes with YAML frontmatter, wikilinks, and epistemic metadata (how confident is this note? what would make it wrong?). Everything lives in a local git repo you can browse with Obsidian or search with QMD.
Install
git clone https://github.com/sandsower/memento-vault.git
cd memento-vault
./install.sh
Creates the vault at ~/memento, copies hooks and skills into ~/.claude/, optionally sets up Obsidian views and QMD search. Works on Linux and macOS.
Custom vault path:
MEMENTO_VAULT_PATH=~/my-vault ./install.sh
Full install
The base install captures knowledge. To also inject knowledge back into active sessions and enable background consolidation:
./install.sh --experimental
This adds two modules:
- Tenet — three retrieval hooks that inject vault notes into active sessions (briefing, recall, tool context)
- Inception — background consolidation that clusters notes and synthesizes cross-session patterns
Both require QMD. Inception also needs pip install numpy hdbscan scikit-learn. See Tenet and Inception for details.
Requirements
- Python 3
- Git
- Claude Code
- QMD (optional, semantic search)
- Obsidian (optional, browsing)
Tenet
Requires QMD.
Past knowledge flows back into active sessions via three hooks:
- Session briefing (SessionStart): injects your project's recent sessions and relevant vault notes when a session opens. Fast sync output (<50ms), QMD search deferred to background.
- Prompt recall (UserPromptSubmit): searches each prompt against the vault and surfaces matching notes before Claude processes it. Adaptive pipeline: fast BM25 path for confident matches, deep path (PRF, RRF, multi-hop wikilink-following, cross-encoder reranking) for low-confidence queries.
- Tool context (PreToolUse): injects vault notes when Claude reads files in known code areas. Directory-level BM25 with caching and rate limiting.
All three hooks stay silent when they have nothing relevant. Zero tokens injected on trivial prompts, config files, and vendor directories.
Performance
Benchmarked against 30 real sessions (381 prompts, 382 file reads, 16 projects):
| Metric | Value |
|---|---|
| Avg injected per session | ~597 chars (~149 input units) |
| Effective hit rate | 100% (when hooks search, they find relevant notes) |
| Avg recall latency | 472ms per prompt (adaptive pipeline) |
| Avg tool-context latency | 230ms per file read |
| Session briefing | <282ms (deferred QMD search is non-blocking) |
| LongMemEval NDCG@10 | 0.892 (retrieval quality, 500 questions) |
Full analysis in docs/performance-analysis.md.
Inception
Requires QMD and
pip install numpy hdbscan scikit-learn.
Inception clusters your vault notes by embedding similarity and synthesizes pattern notes -- higher-order insights that span multiple sessions. It runs as a detached background process after triage, or on demand via /inception.
Session ends -> triage completes -> inception check
-> enough new notes? spawn background process
-> HDBSCAN clusters ALL notes (not just new ones)
-> only synthesizes clusters with new notes or refresh candidates
-> writes pattern notes with source: inception
-> backlinks source notes, commits, reindexes QMD
Opt-in via config:
inception_enabled: true
inception_backend: codex # "codex" (subscription, $0) or "claude" (API, ~$1/month)
inception_threshold: 5 # new notes before triggering
inception_max_clusters: 10 # max patterns per run
Pattern notes start at certainty 3 (subject to temporal decay and defrag). Use /inception --dry-run to preview clusters before writing. Full architecture and limitations in docs/how-it-works.md.
What you get
~/memento/
fleeting/ Daily logs, one line per session
notes/ Atomic permanent notes (the good stuff)
projects/ Project indexes linking notes and sessions
archive/ Stale notes moved here by /memento-defrag
Skills
| Command | What it does |
|---|---|
/memento |
Capture insights mid-session |
/inception |
Find cross-session patterns, synthesize pattern notes (experimental) |
/memento-defrag |
Archive low-value notes, keep the vault focused |
/start-fresh |
Capture + save pending work + clear context |
/continue-work |
Recover context from local state and vault |
How triage works
Session ends -> triage hook fires
-> always: write fleeting one-liner (no LLM cost)
-> if substantial: spawn background agent for atomic notes
-> delta-check: skip if vault already covers the topic
-> auto-commit + QMD reindex
"Substantial" means 15+ exchanges, 3+ files edited, or touching notable files (plans, designs, CLAUDE.md). All thresholds are configurable.
Note format
Each note has YAML frontmatter: certainty score (1-5), optional validity context, type (decision/discovery/pattern/bugfix/tool), wikilinks to related notes. Full schema in docs/frontmatter-schema.md.
Configuration
Config lives at ~/.config/memento-vault/memento.yml. All options in docs/configuration.md.
vault_path: ~/memento
exchange_threshold: 15
file_count_threshold: 3
qmd_collection: memento
auto_commit: true
# Tenet retrieval hooks
session_briefing: true
prompt_recall: true
tool_context: true
# Retrieval pipeline
prf_enabled: true # pseudo-relevance feedback query expansion
rrf_enabled: true # reciprocal rank fusion (BM25 + vsearch)
ppr_enabled: true # personalized pagerank link expansion
reranker_enabled: true # cross-encoder reranking (local ONNX)
multi_hop_enabled: false # follow wikilinks from top results
Extension points
Three ways to layer project-specific behavior on top without forking:
project_rulesin config: map directories to project slugs and ticket patternsextra_qmd_collectionsin config: search additional QMD collections alongside the vault~/.claude/skills/memento-post/SKILL.md: post-capture hook that runs after/mementocreates notes (e.g., promote to a team vault, apply domain tags)
QMD (optional)
QMD adds semantic search over your vault. Without it the concierge agent falls back to grep, which handles keyword searches but misses conceptual matches. QMD is required for Tenet and Inception.
qmd search "caching strategy" -c memento
The concierge agent uses QMD automatically when you ask about past decisions.
Model warmup
Tenet's deferred briefing search uses vector search, which requires loading an embedding model. First call after a reboot takes 6-8s; subsequent calls are ~1.5s (model stays in OS page cache). The installer can add a background warmup to your shell rc file so the model is always cached:
# Added to .zshrc/.bashrc by the installer (optional)
command -v qmd &>/dev/null && qmd vsearch "warmup" -c memento -n 1 &>/dev/null &
Obsidian (optional)
The installer copies Obsidian config and Base views into the vault. Open ~/memento as a vault and you get:
- Graph view showing how notes connect
- Base views: by type, by project, recent, decisions, bugfixes
- Daily notes pointed at
fleeting/ - Wikilink navigation between notes
Uninstall
cd memento-vault
./uninstall.sh
Removes hooks, skills, and the agent from ~/.claude/. Your vault and notes stay untouched.
How it works
Full flow diagram in docs/how-it-works.md.
License
MIT
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi