Checkpoint: File edits

Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:07:24Z
- Changes: 6 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rUvandClaude Opus 4.5 committed 2026-02-10 16:07:24 +00:00
1 parent 648f0fbbbd
commit d97987eddb
6 files changed
+22 -13

No files matched your search

+17 -8
View File
@@ -2,19 +2,28 @@
/**
* Context Persistence Hook (ADR-051)
*
* Intercepts Claude Code's PreCompact and SessionStart lifecycle events
* to persist conversation history in SQLite (primary) or JSON (fallback),
* enabling "infinite context" across compaction boundaries.
* Intercepts Claude Code's PreCompact, SessionStart, and UserPromptSubmit
* lifecycle events to persist conversation history in SQLite (primary),
* RuVector PostgreSQL (optional), or JSON (fallback), enabling "infinite
* context" across compaction boundaries.
*
* Backend priority:
* 1. better-sqlite3 (native, WAL mode, indexed queries, ACID transactions)
* 2. AgentDB from @claude-flow/memory (HNSW vector search)
* 3. JsonFileBackend (zero dependencies, always works)
* 2. RuVector PostgreSQL (if RUVECTOR_* env vars set - TB-scale, GNN search)
* 3. AgentDB from @claude-flow/memory (HNSW vector search)
* 4. JsonFileBackend (zero dependencies, always works)
*
* Proactive archiving:
* - UserPromptSubmit hook archives on every prompt, BEFORE context fills up
* - PreCompact hook is a safety net that catches any remaining unarchived turns
* - SessionStart hook restores context after compaction
* - Together, compaction becomes invisible — no information is ever lost
*
* Usage:
* node context-persistence-hook.mjs pre-compact # PreCompact: archive transcript
* node context-persistence-hook.mjs session-start # SessionStart: restore context
* node context-persistence-hook.mjs status # Show archive stats
* node context-persistence-hook.mjs pre-compact # PreCompact: archive transcript
* node context-persistence-hook.mjs session-start # SessionStart: restore context
* node context-persistence-hook.mjs user-prompt-submit # UserPromptSubmit: proactive archive
* node context-persistence-hook.mjs status # Show archive stats
*/
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
+1 -1
View File
@@ -8,4 +8,4 @@ capabilities:
optimizations:
- context-caching
- memory-persistence
createdAt: "2026-02-10T15:53:35.198Z"
createdAt: "2026-02-10T16:05:57.889Z"
+1 -1
View File
@@ -8,4 +8,4 @@ capabilities:
optimizations:
- flash-attention
- token-reduction
createdAt: "2026-02-10T15:53:35.198Z"
createdAt: "2026-02-10T16:05:57.889Z"
+1 -1
View File
@@ -7,4 +7,4 @@ capabilities:
- best-practices
optimizations:
- incremental-analysis
createdAt: "2026-02-10T15:53:35.199Z"
createdAt: "2026-02-10T16:05:57.889Z"
+1 -1
View File
@@ -7,4 +7,4 @@ capabilities:
- security-review
optimizations:
- pattern-matching
createdAt: "2026-02-10T15:53:35.198Z"
createdAt: "2026-02-10T16:05:57.889Z"
+1 -1
View File
@@ -7,4 +7,4 @@ capabilities:
- coverage
optimizations:
- parallel-execution
createdAt: "2026-02-10T15:53:35.198Z"
createdAt: "2026-02-10T16:05:57.889Z"