From Conversation Recorder to Context Engine: Building Local-First Memory for AI Development
How ContextVault 1.3 unifies browser conversations, terminal sessions, and coding-agent decisions in one searchable local context engine — without a backend, tracking, or hidden AI calls.
You spend forty-five minutes walking a coding agent through a Redis connection bug. Together, you find the root cause, test a fix, and uncover a configuration detail that is not documented anywhere. Then the context window fills up. Two weeks later, the same bug appears in staging. The original session is gone, the browser conversation is buried, and the next agent knows nothing about what you already discovered. You start again. This is context fragmentation: project knowledge scattered across ChatGPT conversations, coding-agent sessions, terminals, accounts, models, and limited context windows. It creates a quiet tax on every AI-assisted workflow.
Building the Local Index
After importing or recording context, rebuild the index with:
contextvault index
The engine reads terminal sessions and imported browser conversations, normalizes them, and writes a local JSON index to .contextvault/index/context-index.json.
Markdown remains the source of truth. The JSON index is derived data. If it becomes corrupted or outdated, delete it and rebuild from the original Markdown files:
Local Markdown
↓
Normalize
↓
Rebuildable JSON index
There is no proprietary database format and no dependency on a hosted service. Users can inspect, edit, archive, or process their context without ContextVault.
Retrieving Evidence Across Capture Surfaces
Once indexed, context can be queried across both surfaces:
contextvault history --since 2w
contextvault decisions auth --source codex
contextvault problems redis --since 30d
contextvault retrieve "auth middleware" --type decision,task
Supported filters: --type, --source, --since, --limit.
Retrieval is local and deterministic. Ranking considers phrase matches, token matches, event-type boosts, and recency. It does not use embeddings, vector databases, semantic search, external models, or hidden AI calls.
The engine answers: What have I captured about this topic?
It does not claim to answer: What does all my project data mean?
The first question is grounded and testable. The second requires a semantic retrieval layer that ContextVault does not currently include.
Preparing Context for the Next Agent
The prepare command creates a focused context package:
contextvault prepare "auth middleware"
The generated file is written to .contextvault/exports/prepared-context.md. It can include project memory, relevant sessions, decisions, tasks, problems, and source metadata — portable Markdown that can be handed directly to Codex, Claude Code, Cursor, or another AI tool.
ContextVault does not call those tools. It prepares grounded context for the user to move explicitly.
Architecture Overview
ContextVault preserves that intermediate state. An /agent event records what the agent said — not what you later remember. A /decision event captures an explicit project decision. A /problem event keeps an unresolved issue available for future retrieval.
ContextVault is not a replacement for documentation. It is the context layer that makes future documentation easier to produce because the underlying evidence remains searchable.
Roadmap
The Unified Context Engine now exists. The next phase is reducing manual handoffs and improving retrieval without weakening the local-first model.
MCP Server — Expose project context through the Model Context Protocol so compatible agents can query it through an explicit integration.
VS Code Extension — Surface project decisions, tasks, problems, and related sessions directly inside the editor.
Agent Integrations — Build adapters for Codex, Claude Code, Cursor, and similar tools that can emit the shared context structure automatically.
Optional Local Semantic Indexing — Improve ranking with optional local embeddings while preserving the existing deterministic retrieval path.
Encrypted Backups and Optional Self-Hosted Sync — Support off-machine durability without requiring a third-party hosted service.
These are roadmap items, not implemented features. The current architecture provides the shared models, normalization layer, index schema, and adapter boundaries needed to build them incrementally.
Try ContextVault
ContextVault is fully open source and available today under the MIT License.
Initialize Vault Terminal directly from npm:
npx @aliabdm/contextvault init
Or install it globally:
npm install -g @aliabdm/contextvault
contextvault init
Start recording:
contextvault record
Build and query the local context index:
contextvault index
contextvault history --since 2w
contextvault retrieve "auth middleware"
Capture browser conversations, record coding-agent sessions, build a local context index, and prepare grounded context packages — all while keeping your data on your own machine.
Project links:
If you try ContextVault, I'd genuinely appreciate technical feedback. Does retrieval surface the context you expected? Is there a command or workflow you think is missing? How would you improve the developer experience?
Feel free to open an issue, submit a pull request, or connect with me on ·
SOCIAL SHARE CARD GENERATOR