A super-simplified LLM-wiki memory plugin: one index document (auto-loaded) + one markdown file per topic (read only when needed) — no dumping everything into the context and burning tokens. Simple and lightweight, painless to install/uninstall, and freely editable however you like.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-simple-wiki-memory
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:rainow/dsh-simple-wiki-memory
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Also works for OpenClaw: openclaw/ is a plain-text edition — rules plus directory conventions, no plugin, no hooks.
A radically simple llm-wiki-style memory plugin with three layers, each doing one job:
① Index — one document, auto-loaded into every session · ② Topics — one markdown file per topic, read only when the task needs it · ③ Tools — one markdown file per skill (named after the skill), read automatically when that skill is used
So the index never grows with your memory count, and never grows with your tool count. Plain Markdown + git — no RAG, no vector DB, no runtime LLM calls. Install and uninstall are painless; everything is editable by hand.
Built on DSH's native dsh-agent-instructions (AGENTS.md) mechanism.
Current version v0.4.0 (2026-11-05) · Changelog · 中文: README.md
What changed since 0.2.0 (if you are still on 0.2.0): every skill now gets its own markdown file for its preferences and gotchas — named after the skill, read automatically when that skill is used, so the index does not grow; the rules grew from six to seven (placement test / report-on-mismatch / lean recording / secrets red line). From 0.4.0 the placement test is "what are you doing when you read it": runtime facts → skills/, patch / upgrade / troubleshooting notes → reference/. Verified against DSH 0.2.2-rc.1.
Quick start
dsh plugin --profile web add dsh-simple-wiki-memory
That's it. On first startup the plugin syncs ~/.dsh/AGENTS.md, creates ~/.dsh/workspace/ and runs git init — idempotent, merge-only, never overwriting your existing index entries.
Three phrases you'll actually use:
| You say | It does |
|---|---|
| "remember …" (any time) | writes to pending/, reported at the start of your next session |
| "save" / "confirm" | promotes pending drafts into real memory + updates the index |
| "organize memory" | proposes a reorganisation (split / merge / archive); you approve, then it executes |
Tool details work the same way: say "remember the combo code I always order" and it lands in reference/skills/ — not in the index.
How it works
Before the first request of every session, DSH auto-injects ~/.dsh/AGENTS.md (index + rules). DSWM maintains that file plus a small wiki vault:
~/.dsh/
├── AGENTS.md # ① index + seven rules (injected into every session)
└── workspace/ # the vault (a git repo)
├── reference/ # ② topic memory (indexed, searchable)
│ └── skills/ # ③ per-tool memory (not indexed; looked up by tool name)
├── pending/ # unconfirmed drafts (not searched)
├── archive/ # outdated content (kept, not searched)
└── memory-log.md # append-only operation log (audit + freshness)
Who holds what:
| Where | What | When read | In index |
|---|---|---|---|
AGENTS.md index |
one-line topic + full path | every session | — |
reference/<topic>.md |
cross-tool preferences and facts (taste, address, how you're addressed) | when an index entry matches | ✅ |
reference/skills/<tool>.md |
stable facts about one skill / MCP server (IDs, enums, endpoints, required params) and gotchas | right before using that tool, by name | ❌ |
Example: a food-delivery MCP's store storeCode, combo codes and pickup enums → skills/mcp-mcd.md; "I don't eat cilantro" → reference/.
The seven rules at a glance
The full text lives in AGENTS.md (injected into every session); this is just the cheat sheet:
| # | Rule | In one line |
|---|---|---|
| 1 | Write trigger | Capture as it appears → straight into pending/; never wait for session end |
| 2 | Admission | Classify first → pending/ → promote only when you say "save"; per-tool memory has four extra gates |
| 3 | Unattended | Scheduled tasks / background subagents write pending/ only and never touch AGENTS.md |
| 4 | Cleanup | "organize memory" → split / merge / archive, executed only after your approval; includes budget audit and SKILL.md de-duplication |
| 5 | Backup | workspace/ is a git repo; auto-commit after memory changes |
| 6 | Retrieval | Before using a tool: check skills/ → then the index → then scan the directory as a fallback |
| 7 | Report on mismatch | When memory is wrong: mark ❓unverified, never silently rewrite, report to you, update after confirmation |
Backed by the lean-recording rules (v0.3.0): the delete test ("would removing this line cause a mistake?"), three things never to store (schema-declared / re-derivable by a query / time-varying), budgets (per-tool 6KB / 80 lines, reference 12KB, index entries 80 chars), over budget requires your approval — plus the secrets red line: never store credentials or unrelated personal-security details.
Compatibility
- Verified against DSH 0.2.2-rc.1 (latest on the
nextchannel): source review + the official compatibility evaluator + smoke tests all pass; compatible with every 0.1.x / 0.2.x release line from 0.1.0-rc.7 (including 0.2.1-rc.x, 0.2.2-rc.1 and 0.2.2-alpha). - Two 0.2.2 changes do not affect this plugin:
agent/pre-stepaddsmodelSelectionto its payload (decision shape unchanged), anddsh-agent-instructionsnow budgets per chain (user-global / project) — this plugin uses only the single~/.dsh/AGENTS.mdchain, still 64KB. engines.dsh=>=0.1.0-rc.7 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0. DSH 0.2+ uses it to block installation / activation of versions outside the range; 0.3.x is not declared yet (upgrade DSWM then, or exempt temporarily withdsh plugin allow-version).- Depends on DSH's native
dsh-agent-instructions(enabled by default in thedsh-basebundle); if your deployment disables it, memory will not be injected.
Install
npm (recommended — the market shows versions and detects updates)
dsh plugin --profile web add dsh-simple-wiki-memory
From source: dsh plugin --profile web add github:rainow/dsh-simple-wiki-memory
Let the agent do it: paste https://github.com/rainow/dsh-simple-wiki-memory into a session.
Pin a version explicitly when you need one:
dsh plugin --profile web add dsh-simple-wiki-memory@0.3.0. Without a version spec, an existing exact pin is not upgraded automatically.
Uninstall
dsh plugin --profile web remove dsh-simple-wiki-memory
Removing the plugin stops the runtime hooks (auto-commit, pending report) but keeps your data: AGENTS.md and workspace/ are not deleted. The seven rules stay in AGENTS.md (plain text your agent follows); delete that section manually if you want it gone.
Permissions & data
- Files: reads/writes
~/.dsh/AGENTS.mdand~/.dsh/workspace/(createsreference/,reference/skills/,pending/,archive/,memory-log.md) - Commands: runs
git init / add / commitinsideworkspace/ - No network, no credentials, no telemetry
- Reading memory works in any sandbox mode; writing to
workspace/requiresdanger-full-access, orworkspace-writewith per-call approval escalation
Troubleshooting
- Auto-commit not happening: check
~/.dsh/workspace/.git. Without git the plugin degrades gracefully — memory still works, just without backup - Memory not injected: make sure
dsh-agent-instructionsis enabled - Rules look outdated:
AGENTS.mdshould carry<!-- dswm:rules v=2 -->near the top. When missing, the plugin asks your agent to merge the new rules in the next session (it backs upAGENTS.md.bak-<date>first) - Rollback: the vault is a git repo —
git -C ~/.dsh/workspace log/git -C ~/.dsh/workspace reset --hard <commit>
Development
node --check lib/index.js
Package layout: lib/index.js (sync + hooks), assets/ (AGENTS.md / memory-log / skills-about templates), skills/memory-query/. Distribution uses the DSH bundle model (dsh.bundle.patch → cordis.patch.yml).
Known issue: anchored modes
Both modes clear the runtime context on the first turn and keep only your direct message, which suppresses the automatic ~/.dsh/AGENTS.md injection performed by dsh-agent-instructions. DSWM's index and rules rely on that injection, so memory is not loaded at the start of a session.
This is not a bug — it is the deliberate design of anchored modes (anchor the reasoning trace with minimal context). Just ask the agent to read the file when you need memory:
read ~/.dsh/AGENTS.md first, then start- or
follow the memory rules in AGENTS.md - liangshen can also read it manually after the first block is anchored ("we can" mode); from then on DSWM behaves normally
- Other sessions (non-anchored) are unaffected
Changelog
v0.4.0 (2026-11-05) — placement test pivoted (rules v3)
- The placement test moved from "does the memory contain tool-specific identifiers" to "what are you doing when you read it": runtime facts →
reference/skills/, patch / upgrade / troubleshooting notes →reference/(DSH plugins at the top level). Identifiers are now a hint, not the test. - Why: plugin patches, config keys and build gotchas are full of
code/id/ parameter names, so the old test filed them under per-tool memory — yet nobody reads them when using the plugin, only when changing it. - Promotion lint now checks both directions (
skills/↔reference/) instead of a one-way check with a plugin exception; rule 6 adds "before changing / upgrading / uninstalling a plugin, read the plugin's index entries, notskills/". - Template and
skills-about.mdsynced; the rules marker moves to<!-- dswm:rules v=3 -->, so v2 users get one merge prompt on their next session (bilingual change summary). - Compatibility unchanged: still verified against DSH 0.2.2-rc.1 (only the rule-version check and hint text changed in code).
v0.3.2 (2026-10-28) — DSH 0.2.1-rc.4 compatibility
- Adapted to the latest 0.2.1-rc.4:
session/event+turn/end, theagent/pre-steppayload and decision shape, and thecreateUserMessagesource kind are all unchanged; the official compatibility evaluator passes for 0.1.0-rc.8 through 0.2.2-alpha.2; peerDependenciesnow also lists the^0.2.2-alpha.1line (engines.dshalready covered<0.3.0-0);- All 19 end-to-end assertions re-run against rc.4's
dsh-llm; - README gained a "what changed since 0.2.0" summary line (for users still on 0.2.0); compatibility section updated to rc.4.
v0.3.1 (2026-10-28) — docs only (README rewrite)
- Opener rewritten as three parallel layers: ① index (auto-loaded) ② topics (read on demand) ③ tools (named after the skill, read when the skill is used);
- Added a top-of-page quick start and a "who holds what" table; the seven rules compressed into a table; changelog moved to the end; anchored-mode conflict folded away;
- Removed two unused screenshots (1.2 MB); npm tarball down to 55 KB. No code changes.
v0.3.0 (2026-10-28) — per-tool memory + lean recording
- Rules grew from six branches to seven: per-tool memory (
reference/skills/), placement test before writing, report-on-mismatch; - Added lean-recording rules (delete test / three things never to store / tabular format / budgets / exception request) — fights memory files bloating over time;
- Added the secrets red line (no credentials, no unrelated personal-security details);
- Rules section now carries a version marker
<!-- dswm:rules v=2 -->; existing users get a bilingual upgrade notice in their first session (agent merges + mandatory backup — the plugin never edits user files); scaffoldWorkspacecreatesreference/skills/and its_about.md; thememory-queryskill gained a per-tool lookup step;- Verified locally: fresh install / upgrade / up-to-date / marker missing / rules absent / pending report — 19 assertions, all passing.
v0.2.0 (2026-10-19) — DSH 0.2.x compatibility
- Compatible with DSH 0.2.1-rc.2 / 0.2.1-alpha.x / 0.2.0-rc.x, plus 0.1.6 / 0.1.7: added an
engines.dshdeclaration>=0.1.0-rc.7 <0.2.0-0 || >=0.2.0-rc.1 <0.3.0-0and extended peerDependencies to nine release lines; - Important: DSH 0.2+ now enforces plugin version requirements — when
engines.dsh(preferred) or peerDependencies are unmet, the plugin is blocked from installation and activation. Older DSWM (≤0.1.3) is rejected on 0.2.x, so upgrading to this release is required; - Fixed a DSH 0.2 breaking change: DSH 0.2 removed the shared
pluginmessage source kind ("there is no shared catch-allpluginkind") in favour of per-producerMessageSourceMapaugmentation. DSWM now declares and uses its owndswmkind (lib/types/index.d.tscarries the type extension; runtime consumers fall through unknown kinds); - Verified item by item against the
dsh-v0.2.1-rc.2source:session/event+turn/end,agent/pre-step(agent injection and{kind:'enter', messages}decision shape unchanged),createUserMessage, cordis 4.0.5prepend, patchinsert,dsh.bundle.patch— all compatible; - Checked with the real compatibility evaluator from DSH 0.2.1-rc.2: 0.1.0-rc.8 through 0.2.1-rc.2 all pass (0.3.x is not declared yet — it will prompt for an upgrade, or can be exempted temporarily with
dsh plugin allow-version); - Install/upgrade:
dsh plugin --profile web add dsh-simple-wiki-memory.
v0.1.3 (2026-09-10) — DSH 0.1.5-rc compatibility (incl. 0.1.3)
- Compatible with DSH 0.1.5-rc.2 / 0.1.5-rc.1 / 0.1.5-alpha.x / 0.1.3-alpha.x: peerDependencies extended to
^0.1.0-rc.7 || ^0.1.1-rc.2 || ^0.1.2-alpha.1 || ^0.1.3-alpha.1 || ^0.1.5-alpha.1, covering five release lines (older installs keep working); - Verified item by item against the
dsh-v0.1.5-rc.2source:session/event+turn/end,agent/pre-step(agent injection and decision shape unchanged),createUserMessage, cordis 4.0.2prepend, patchinsert,dsh.bundle.patch— all compatible; - DSWM is unaffected by the 0.1.3/0.1.5 breaking changes: the 0.1.3 session-persistence
SessionHandlerefactor, the 0.1.5 removal ofctx.agent, and the Web plugin panel slot migration are all unused by DSWM (it only hookssession/eventandagent/pre-step); - Install/upgrade:
dsh plugin --profile web add dsh-simple-wiki-memory.
v0.1.2 (2026-08-28) — DSH 0.1.2-alpha compatibility
- Compatible with DSH 0.1.2-alpha.1 / 0.1.2-alpha.2: peerDependencies extended to
^0.1.0-rc.7 || ^0.1.1-rc.2 || ^0.1.2-alpha.1, covering the0.1.0-rc.7+,0.1.1-rc.2+and0.1.2-alpha.1+release lines; - Runtime APIs (
session/event,agent/pre-step, message construction, cordis patch, …) verified against thedsh-v0.1.2-alpha.2source — no breaking changes; - Install/upgrade:
dsh plugin --profile web add dsh-simple-wiki-memory(npm source always resolves the latest).
v0.1.1 (2026-08-25) — first npm release
- Published to npm (
dsh-simple-wiki-memory) — dsh-market now shows the version and detects updates automatically; added a GitHub Actions auto-publish workflow (push av*tag to release); - DSH 0.1.1-rc.2 support: peerDependencies cover the
0.1.0-rc.7+and0.1.1-rc.2+lines; - Documented the known conflict with the liangshen / Anchored Standard anchored modes.
v0.1.0 (2026-08-18) — initial release
- Memory rule system: auto-injected index + one markdown file per topic read on demand; pending → reference → archive zones + memory-log audit + git auto-backup;
- Runtime hooks: auto-commit after each turn, pending report at session start;
- AGENTS.md is merge-only (never overwrites); uninstall keeps all your data.
License
MIT
Links
More in this category
vectorize-io/hindsight#coding-agents★ 61444
Hindsight, agent memory that learns: long-term project memory with auto recall and retain, knowledge pages, deep reflection, and per-repo memory banks.
volcengine/OpenViking#examples/dsh-memory-plugin★ 42323
OpenViking memory and context bundle for DeepSeek Harness: pre-step auto-recall and profile injection, session capture, `viking://` URI guarding, and recall/write memory tools backed by an OpenViking server.
MemTensor/MemOS#memos-local-plugin★ 12418
Local-first memory plugin for DeepSeek Harness: layered L1/L2/L3 memory with automatic capture, manual memos_* retrieval tools, and a built-in memory viewer.
agentscope-ai/ReMe#dsh★ 3814
Connects DeepSeek Harness to ReMe's local-first, self-evolving personal knowledge base: automatically captures completed main-agent conversations as user-owned Markdown memory, searches conversations and source material through reme_search with BM25, optional embeddings, and wikilink expansion, and schedules daily memory consolidation.
zilliztech/memsearch#MemSearch★ 2892
Shared Markdown memory for DSH and other coding agents, with automatic capture, pre-step context injection, searchable recall, and memory-to-skill self-evolution through a review panel.
vshulcz/deja-vu#extensions/dsh★ 1578
Cross-session memory and context recovery across forty-five other coding agents (45+) on this machine, reading session files they already wrote before install (Claude Code, Codex, Cursor, Windsurf, Trae, Antigravity, VS Code Copilot Chat, opencode, OpenClaw, Hermes, Kimi, Qoder, Cline, Zed, Magpie and more): six tools (deja_recall, deja_session, deja_blame, deja_fix, deja_how, deja_remember), a /deja command, and optional automatic recall injected into runtime context. Local BM25 CLI/MCP index, no LLM, no embeddings, no network (dsh plugin --profile web add dsh-deja).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.