dsh-memory-system: A Local-First Persistent Memory Plugin for DeepSeek Harness
zhujunpeng12/dsh-memory-system
Local-first persistent memory for DeepSeek Harness: hot bootstrap, Chinese BM25 cold recall, lease-lock transactional writes, read-only governance.
Provides a six-layer memory mechanism for DeepSeek Harness, solving inter-session amnesia with Chinese BM25 cold recall and safe transactional writes.
dsh plugin --profile web add github:zhujunpeng12/dsh-memory-system- Category
- Memory & Context
- Platform
- DSH-Plugin
- Author
- zhujunpeng12
- Distribution
- Plugin
dsh-memory-system Key Features
dsh-memory-system Repository

dsh-memory-system Repo Summary
dsh-memory-system is a persistent memory plugin (DSH plugin) for DeepSeek Harness, maintained by zhujunpeng12 under the MIT license, built with TypeScript. It addresses the amnesia between agent sessions by providing a local-first six-layer memory infrastructure: hot bootstrap, working path, cold recall, authorized writes, slow governance, and trajectory review. Core capabilities include ≤14KB hot package injection, Chinese BM25 cold recall, lease-lock transactional writes, read-only governance, and zero external dependencies (pure Python + Markdown files).
What core features does the dsh-memory-system DSH plugin support?
The plugin implements a six-layer closed loop: hot bootstrap (bootstrap.py injects ≤14KB hot package with gates, instruction budget, user profile, active rules, project summary, recent events); working path (executes tasks per AGENTS.md rules); cold recall (dual-threshold trigger, exact + Chinese bigram BM25 + metadata rerank, outputs ≤4.2KB cold package); authorized writes (30s lease lock + 5s heartbeat, multi-file transactions, raw append-only); slow governance (govern.py read-only scanning, no auto-modification); trajectory review (trajectory-review.py uses user corrections as hard signals to produce candidates).
How to install the dsh-memory-system DSH plugin?
Use the following command:
dsh plugin --profile web add github:zhujunpeng12/dsh-memory-system
After installation, point to your Obsidian Vault via environment variables to use tools like memory_bootstrap, memory_recall, and memory_write.
Which DeepSeek Harness versions and platforms are compatible with dsh-memory-system?
The plugin runs on Windows/macOS/Linux, relying only on Python standard library and Markdown files—no database, no vector service. The optional backfill.py history replay requires zstandard. Last updated on 2026-08-19, with 8 stars and 0 forks.
How does dsh-memory-system ensure write safety and governance?
Writes use a single-writer lease lock (30s lease / 5s heartbeat / stale lock recovery), atomic multi-file transactions (before-image / SHA-256 / manifest / receipt), and raw append-only with supersedes for corrections. Governance follows L0-L3 boundaries, automatically collecting evidence without ever auto-deleting or modifying, keeping the memory vault healthy.
How does dsh-memory-system support Chinese cold recall?
Cold recall uses Chinese bigram BM25, combined with exact/title/path matching and metadata reranking, with fully explainable traces. Vector retrieval is off by default, zero dependencies, and outputs ≤4.2KB cold packages with sources.