Environment:1jehuang Jcode Local Storage
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Data_Storage |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Local filesystem storage for jcode's memory system, persisting memory entries in JSON files under the user's home directory without requiring a database or external service.
Description
The Local Storage environment provides the filesystem-backed persistence layer for jcode's memory system. Memory entries are stored as JSON files in a per-scope directory under ~/.jcode/. The MemoryManager handles storage and retrieval using file-based I/O without any database dependency. Memory is organized by scope (global, per-project, per-session) and entries are keyed by stable identifiers. This approach avoids the need for embeddings or a vector database — relevance scoring is done via the Jev Decisions API at recall time.
Usage
Use this environment for MemoryManager — the memory storage and retrieval implementation. It is the mandatory persistence layer for jcode's memory recall system. The storage is read at session start and written when memories are created or updated.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Cross-platform | Linux, macOS, Windows |
| Hardware | Any | Minimal I/O requirements |
| Disk | Local filesystem | SSD preferred for fast recall; ~1MB typical usage |
Dependencies
System Packages
- Read/write filesystem access to
~/.jcode/ - `serde_json` = 1 (Rust crate for JSON serialization)
Directory Structure
- `~/.jcode/` — Root config/data directory
- Memory files stored per-scope under this hierarchy
Credentials
No credentials required for local storage itself. Provider credentials are stored separately in ~/.jcode/auth.json.
Quick Install
# Local storage is created automatically on first run.
# Verify the directory exists:
ls -la ~/.jcode/
# Memory files are managed by the MemoryManager implementation.
# No manual setup required.
Code Evidence
Memory system documentation references from docs/MEMORY_ARCHITECTURE.md and docs/MEMORY_BUDGET.md describe the file-based persistence approach.
The memory system uses no embeddings or vector database — relevance scoring is delegated to the Jev Decisions API at recall time, as documented in crates/jcode-base/src/memory_jev.rs:
//! Direct, fail-closed typed relevance selection. No embeddings, lexical prefilter,
//! sidecar, cached answers, or recent-memory cap are used.
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `Permission denied` writing memory | ~/.jcode/ not writable |
Check ownership: chown -R $USER ~/.jcode/
|
| `No such file or directory` | First run, directory not created | Run jcode once to initialize
|
Compatibility Notes
- All platforms: Uses standard filesystem operations; cross-platform via
dirscrate for home directory resolution. - No database dependency: Pure JSON file storage avoids SQLite/Postgres requirements.
- No embeddings: Relevance scoring uses Jev API, not local vector similarity, so no GPU or embedding model is needed.