Created and maintained by Devansh Gautam.
"Your code remembers everything."
CodeMemory X creates a new category of developer tool: The Memory Layer of Software Development. Operating silently inside VS Code, it captures uncommitted micro-edits, structural AST mutations, terminal test outputs, linter errors, and AI chat rationale into an immutable local Temporal Knowledge Graph.
Developers forget WHY code exists.
Git remembers WHAT changed.
CodeMemory X remembers WHY.
CodeMemory X bridges the gap between raw file modifications and human intent, preserving deep architectural rationale directly within your local development workspace.
- 🧠 Sub-conscious Event Capture: Passively ingests uncommitted edits, terminal commands, and AI prompts without interrupting workflow.
- 🌳 AST Symbol Lineage: Tracks functions, classes, and types across renames, moves, and complete rewrites using Tree-Sitter AST parsing.
- 📜 Symbol Storybook Engine: Visual interactive timeline reconstructing how any function or symbol evolved over time.
- 🛡️ Risk Prediction Sentinel & Drift Sentinel: Warns developers when modifying code tied to past bug regressions or architectural decisions.
- 💬 Memory Command Palette: Instant retrieval of historical rationale and Architectural Decision Records (ADRs).
CodeMemory X is engineered using Hexagonal Architecture (Ports & Adapters), Clean Architecture, and Domain-Driven Design (DDD) principles to maintain absolute decoupling between core engines and editor runtimes.
+-----------------------------------------------------------------------+
| VS Code Extension Host |
| +--------------------+ +--------------------+ +----------------+ |
| | Memory Commands | | Webview Dashboard | | Sidebar View | |
| +---------+----------+ +---------+----------+ +-------+--------+ |
+-------------|-----------------------|---------------------|-----------+
| | |
v v v
+-----------------------------------------------------------------------+
| Application Layer |
| Command Handlers & Query Handlers (CQRS) |
+-------------------------------------+---------------------------------+
|
v
+-----------------------------------------------------------------------+
| Domain Core (@codememory/core) |
| +-------------------+ +-------------------+ +-------------------+ |
| | Memory Engine | | Knowledge Graph | | Risk Predictor | |
| +-------------------+ +-------------------+ +-------------------+ |
+-------------------------------------+---------------------------------+
|
Ports (Interfaces) v Adapters (Implementations)
+-----------------------------------------------------------------------+
| Infrastructure Layer |
| +-------------------+ +-------------------+ +-------------------+ |
| | SQLite (WASM) | | Tree-Sitter AST | | Event Store | |
| +-------------------+ +-------------------+ +-------------------+ |
+-----------------------------------------------------------------------+
- Passive Event Capture: Monitors file changes, test executions, and command invocations silently in the extension host background.
- AST Parsing & Relationship Tracking: Extracts symbol boundaries and maps relations using
@codememory/tree-sitter-engineand@codememory/symbol-graph. - Immutable Persistence: Appends raw temporal events to a local WASM SQLite event store (
@codememory/event-store). - Context Engine & Query API: Aggregates memory streams into fast context snapshots exposed to the VS Code sidebar and webview dashboard.
The extension (codememory-x-vscode) integrates seamlessly into VS Code:
- Command Palette Commands:
CodeMemory X: Open Memory Dashboard— Launches the full interactive Memory Explorer & Analytics view.CodeMemory X: Record Decision (ADR)— Prompts to record architectural rationale directly into local memory.CodeMemory X: Show Symbol Story— Visualizes symbol evolution and historical refactor lineage.
- Activity Bar & Sidebar: Adds a dedicated CodeMemory X activity bar icon housing the interactive webview sidebar.
The embedded React webview dashboard (codememory-x-webview) provides:
- Memory Explorer: Searchable stream of historical edits, decisions, and session memories.
- Timeline View: Visual chronological breakdown of development activity.
- Knowledge Graph: Interactive SVG node-link view of symbol relationships.
- Story View: Step-by-step reconstruction of function and class evolution.
CodeMemory X supports zero-telemetry local LLMs and major cloud providers:
- 🏠 Ollama (Local REST endpoint:
http://localhost:11434) - 🏠 LM Studio (Local OpenAI-compatible endpoint:
http://localhost:1234/v1) - ☁️ OpenAI (GPT-4o, GPT-4, GPT-3.5)
- ☁️ Anthropic Claude (Claude 3.5 Sonnet, Claude 3 Opus)
- ☁️ Google Gemini (Gemini 1.5 Pro, Gemini 1.5 Flash)
Install directly from the VS Code Marketplace:
- Open VS Code.
- Press
Ctrl+P(orCmd+P). - Paste
ext install devansh-gautam-codememory.codememory-x-vscode.
Alternatively, search for CodeMemory X in the Extension View (Ctrl+Shift+X).
- Node.js:
>=18.0.0 - Package Manager:
npm >=10.0.0
# Clone the repository
git clone https://github.com/devanshgautam0001-ai/CodeMemory-X.git
cd CodeMemory-X
# Install workspace dependencies
npm installExecute pipeline commands from the monorepo root:
npm run buildnpm run testnpm run lintnpm run typecheckcd apps/vscode
npx @vscode/vsce package --no-dependencies --pre-releaseConfigure via VS Code Settings (Ctrl+, / Cmd+, -> search codememory):
| Setting Key | Type | Default | Description |
|---|---|---|---|
codememory.aiProvider |
string |
"ollama" |
Active LLM provider (ollama, lmstudio, openai, claude, gemini). |
codememory.apiKey |
string |
"" |
API key for cloud providers (stored in VS Code SecretStorage). |
codememory.contextRadius |
number |
3 |
Knowledge Graph hop radius for context retrieval. |
codememory.enableTelemetry |
boolean |
true |
Toggles passive local event ingestion. |
- Zero Credential Leaks: API keys are saved exclusively via VS Code
SecretStorageAPI and never written to disk or logged. - Local Persistence: All temporal event streams and SQLite databases remain local to your machine.
- Sanitized RPC & Errors: Absolute system file paths and bearer tokens are automatically redacted (
[PATH_REDACTED]).
CodeMemory X operates on a privacy-first architecture. Local event streams, AST graphs, and architectural decision logs never leave your device unless you explicitly route requests through cloud AI providers.
Contributions are welcome! Please refer to CONTRIBUTING.md for branch strategies, code style standards, and pull request procedures.
Distributed under the MIT License. See LICENSE for details.
- Extension Name:
CodeMemory X - Marketplace URL: https://marketplace.visualstudio.com/items?itemName=devansh-gautam-codememory.codememory-x-vscode
- Extension Identifier:
devansh-gautam-codememory.codememory-x-vscode
Created and maintained by Devansh Gautam.
- Publisher Display Name: Devansh Gautam
- Marketplace Publisher ID:
devansh-gautam-codememory