147-sys/dsh-memory-rules ↗★ 1

dsh-memory-rules

Local memory and standing rules for DeepSeek Harness — SQLite-backed four-layer memory (world facts, experiences, beliefs, standing answers) with structured fact extraction per turn, four-path retrieval (semantic/keyword/graph/timeline), 7-day belief consolidation, Markdown export, a pre-step recall hook, an editable set of system-prompt blocks carrying the user's hard collaboration rules (formerly the separate dsh-user-rules bundle), and a 记忆与规则 Web UI with 信念库 and 提示词 tabs.

Package
dsh-memory-rules
Compatibility
Unverified
Version
3.2.0
License
MIT
Last updated
Nov 2, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:147-sys/dsh-memory-rules

Configuration

Precedence: plugin config (cordis.patch.yml) → environment variable → default.

Config keyEnv varDefaultMeaning
enabledDSH_MEMORY_ENABLEDtruemaster switch
memoryDirDSH_MEMORY_DIR$DSH_HOME/memorymemory root
dbFileDSH_MEMORY_DB/memory.dbdatabase file (a relative value stays inside the root)
dbEngineDSH_MEMORY_DB_ENGINEautoauto / node:sqlite / sql.js
captureEnabledDSH_MEMORY_CAPTUREtruewrite path on/off
ingestEnabledDSH_MEMORY_INGESTtrueper-turn fact extraction
ingestMaxFactsPerTurn—8ceiling per turn
ingestMinConfidence—0.35drop weak candidates
markdownMirrorDSH_MEMORY_MIRRORtrueappend facts to the day file
recallEnabledDSH_MEMORY_RECALLtrueinjection on/off
maxTokensDSH_MEMORY_MAX_TOKENS1200hard token bound for the injected block (floored at 120)
recallEntries—6entries offered per turn
pathSemantic … pathTimeline—trueenable/disable each retrieval path
answerShortcut—trueconsult standing answers before retrieval
reflectEnabledDSH_MEMORY_REFLECTtruebackground consolidation
reflectDays—[1, 8, 15, 22, 29]days of the month (0 3 */7 * *)
reflectAt—'03:00'local time of the run
reflectMinEvidence—3facts needed before merging
reflectQualityGateDSH_MEMORY_REFLECT_QUALITYtrueblock boilerplate / questions / instructions from becoming evidence
reflectMinChars—12shortest fact eligible as evidence
reflectSkipPatterns—[]extra regular expressions (strings) that disqualify a fact
answerStaleDays—60when a standing answer is considered stale