dsh-memoir: Persistent Memory DSH plugin for DeepSeek Harness
qinling-melon-farmers/dsh-memoir
DSH plugin for persistent memory: auto-distill session insights, inject into future agents, with a visual panel.
Let every new DeepSeek Harness session inherit past experience and avoid repeated pitfalls.
dsh plugin --profile web add github:qinling-melon-farmers/dsh-memoir- Category
- Memory & Context
- Platform
- DSH-Plugin
- Author
- qinling-melon-farmers
- Distribution
- Plugin
dsh-memoir Key Features
dsh-memoir Repository

dsh-memoir Repo Summary
dsh-memoir is a persistent memory plugin (DSH plugin) for DeepSeek Harness, developed by Qinling-Melon-Farmers in TypeScript, licensed under Apache-2.0, last updated in 2026-08. It addresses the "amnesia" problem of DSH sessions: new sessions don't remember pitfalls from previous ones, causing repeated debugging of the same issues (e.g., console Chinese garbled text, terminal escape errors). The plugin closes the loop of "record → store → auto-inject → visual maintenance". Core capabilities include: auto-distill reminders at the end of each turn with actual work, the memoir_record tool to distill work logs/lessons/action guides, project-level writing to PROJECT_MEMORY.md (committed with git), a global index at ~/.dsh/dsh-memoir.json, automatic injection of memory into the system prompt for new sessions, and a Web GUI panel accessible via the sidebar "Memory" entry (project/global tabs, full-text search, manual record/delete).
What core capabilities does the dsh-memoir DSH plugin support?
The plugin provides two tools: memoir_record(section, title?, content) records a memory entry, with section being work / lessons / actions / note; memoir_read(scope?, section?, query?) reads memories, with scope being project (default) / global / all. The Web panel (/api/dsh-memoir/*) offers a project memory tab (grouped by four categories, showing time, title, content, and session source), a global memory tab (memory buckets for all projects, supporting cross-project search), a search box (real-time fuzzy filtering on title and content), manual memory addition (writing to the same data as the agent), and per-entry deletion (automatically regenerating the project memory file after deletion).
How to install and configure dsh-memoir?
Use the following installation command, then restart DSH (dsh web) for it to take effect; the "Memory" entry appears in the sidebar.
dsh plugin --profile web add github:qinling-melon-farmers/dsh-memoir
In cordis.patch.yml, three switches can be configured (all default to true):
- insert:
- id: memoir
name: dsh-memoir
config:
enabled: true # master switch (tools, routes, injection)
announceToAgent: true # system prompt announcement
autoDistill: true # auto-remind at end of turns with actual work
How to use dsh-memoir?
In default auto mode, the plugin reminds the agent to distill at the end of each turn with actual work; the agent calls memoir_record as prompted. In manual mode (autoDistill: false), at task wrap-up, call memoir_record three times with work, lessons, and actions for "what was done / what pitfalls / next steps". When taking over a project, first use memoir_read to read project memory; for cross-project search, use memoir_read(scope: 'global', query: ...) or the panel's global tab. Typical scenarios: recurring environment pitfalls (garbled text/escape/path/permissions) → record lessons; project red lines and conventions → record actions; root cause of hard-to-find bugs → record lessons/work; fixed deployment/launch steps → record actions.
What can dsh-memoir solve, and what can't it?
It solves "repeatedly stepping on the same pit": after the first fix, record the diagnosis and fix steps as lessons; every new session of this project will automatically inject this experience, so the agent follows it directly; it can also be retrieved across projects. But it cannot "cure" terminal or console encoding defects — the root cause of garbled text is a mismatch between terminal code page and output encoding; the plugin only distills "root cause + fix command", not modifying terminal configuration.