dsh-workspace-memory: Persisting Workspace Analysis Conclusions Across Sessions

Introduction

In DeepSeek Harness (DSH), reading source code and troubleshooting issues, conclusions often only exist in the context of the current conversation. Opening a new session in the same workspace, the model cannot see the structure, pitfalls, and unresolved issues that were sorted out in the previous round, and can only start reading from scratch.

Below introduces dsh-workspace-memory: it writes conclusions within the workspace into readable Markdown and injects a short index into the runtime context of subsequent sessions, allowing the new conversation to judge on its own whether to read the full text. It is not vector retrieval, nor does it automatically call an LLM for summarization; the timing and content of writing are entirely decided by the model when calling the tool.

What is it

dsh-workspace-memory is a Cordis bundle plugin on the Host side of DSH, maintained by yusheng-zhu12, categorized as “Memory” in the plugin community directory. A one-line definition: Workspace-isolated persistent memory — each workspace corresponds to a .dsh-memory/MEMORY.md, plus a title + summary + path index injected into subsequent sessions.

The plugin does not call the model, does not send network requests, and does not alter session logs. Unlike dsh-strand, which shares memory across workspaces, this plugin strictly isolates by workspace; unlike AGENTS.md as well — the latter is instructions for the model, while this is factual notes for subsequent conversations.

Core Features

Based on the positioning above, the capabilities can be summarized into two parts.

Six Memory Tools

Read and write both fall within the .dsh-memory/MEMORY.md of the workspace:

Tool Function (per README)
memory_save Write or update by topic (modes like replace / append)
memory_read Read the content of a specific topic
memory_list List existing topics
memory_forget Forget/Remove topic
memory_restore Restore from backup
memory_limits Query limits (e.g., max topics 100, single body 16 KiB)

Before overwriting an existing topic, if the current session hasn’t read that topic, the plugin will reject replace to avoid silently losing content; a .bak backup is kept before every modification.

Session Memory Index

A very short index (topic name, a summary sentence, file path) is injected into the runtime context of each session. The new session does not need the user to repeat the background; the model can see “what conclusions already exist in this workspace” and then memory_read as needed.

Installation and Enablement

Runtime environment requirements: Node ≥ 22, DSH ≥ 0.2.2-rc.1 (as noted in README testing). Version in package.json is 0.2.1, license MIT. The current README states it is mainly distributed via GitHub, not yet published on npm or the plugin marketplace.

The plugin accesses workspace files with the permissions of the current DSH process; it is recommended to check the repository source code and license before installation. The installation methods below are all from the official README and are executed via plugin_manager in the session.

  1. Open GitHub Releases, download yusheng-zhu12-dsh-workspace-memory-0.2.1.tgz (if the Release has no attachment, use Method 2).
  2. Execute:
plugin_manager install_bundle({ target: "D:\\path\\to\\yusheng-zhu12-dsh-workspace-memory-0.2.1.tgz" })

Unpacking installs to the real directory; uninstalling does not affect the repository source code.

Method 2: Local Repository Directory

After obtaining the repository directory (e.g., unzip via page Code → Download ZIP), execute:

plugin_manager install_bundle({ target: "D:\\path\\to\\dsh-workspace-memory" })

This is a directory-link installation: changes to source code take effect when the bundle is re-enabled. The README specifically warns: executing remove_bundle on a directory link may clear the source directory; please ensure the directory is under version control before use; tarball installation is not affected by this.

Method 3: Pointing to a Git Repository (Not verified locally in README)

plugin_manager install_bundle({ target: "github:yusheng-zhu12/dsh-workspace-memory" })

Requires pnpm’s git resolution and access to GitHub; use Method 1 or 2 if this fails.

Verification After Installation

plugin_manager list_bundles()          # Should have @yusheng-zhu12/dsh-workspace-memory, enabled: true
cordis_inspect_query Tool.listTools()  # Should have memory_save/read/list/forget/restore/limits

If the tools do not appear, restart DSH once — modules that replace or are installed for the first time are not hot-loaded in a running process.

Deactivation and Uninstallation

  • Deactivate: plugin_manager set_bundle({ target: "@yusheng-zhu12/dsh-workspace-memory", enabled: false }) — tools and index disappear, .dsh-memory/ files remain.
  • Re-enable: Just enabled: true, no restart needed.
  • Uninstall: plugin_manager remove_bundle({ target: "@yusheng-zhu12/dsh-workspace-memory" }). Uninstalling does not delete .dsh-memory/ in the workspace; to completely clear it, manually delete that directory.

Typical Usage

The plugin does not take notes automatically; it only calls tools to write after the model is prompted. The README suggests splitting by topic: one memory_save per topic. Topic names are best using “Domain: Object” (e.g., auth: token refresh). The summary appears in the index and determines whether to read the full text later.

Creating Workspace Memory for the First Time

A description directly given to the model (excerpted from README; path separators can be adjusted according to the local machine):

This workspace has no memory yet. Please read through all the content of our conversation this time and organize the conclusions worth keeping for subsequent conversations into workspace memory.

Requirements:
1. Split by topic, one memory_save per topic; use 'Domain: Object' for topic names
   (e.g., auth: token refresh, build: release).
2. Give a summary that can be understood independently for each one — it will appear in the index and determine if the subsequent conversation should read it.
3. For details, write: key file paths, structure/data flow, invariants, pitfalls, and unresolved issues.
   Do not recount the conversation process, and do not write process descriptions like "user asked me to..." or "I first read...".
4. Skip one-time content: temporary commands, trial and error processes, and conclusions that have been overturned.
5. Do not record any keys, tokens, or passwords.
6. For the first creation, using mode 'replace' is fine (when the topic doesn't exist, replace and append both create a new one).
7. After finishing, list which topics you created and their byte sizes.

When the conversation is long, you can first ask the model to list the topic list, confirm, and then memory_save one by one to avoid writing one giant note.

Appending in the Same or New Session

Subsequent overwriting is constrained by “must read first”: to replace a topic entirely, you must memory_read it in the current session first. When appending to an existing topic, append is commonly used, and the summary is rewritten as requested to cover the entire note.

When supplementing in a new session, the README recommends:

This time I read <module/file>. Please supplement the conclusions into workspace memory:
1. First memory_list to see existing topics; for the one to append, first memory_read it once;
2. For existing topics use mode: append, rewrite the summary into a version that covers the entire note;
3. Only create a new topic if it is indeed a new domain; do not make the title duplicate an existing topic;
4. Do not record keys; after finishing, list which topics you modified and which you added.

Call examples from README (excerpt):

memory_save(topic="auth: token refresh", mode="replace",
            summary="Access tokens live 15 minutes; refresh tokens rotate and are single-use.",
            details="### Where it lives\n- src/auth/refresh.ts — rotation, single-use enforcement")

After successful writing, starting from the next request, the workspace memory block <system-reminder> for each session context of that workspace will appear with the topic count and summary.

Applicable Scenarios and Notes

Who is it for: Developers who open multiple conversations in the same DSH workspace and repeatedly analyze the same repository; scenarios where “conclusions after reading code” need to be left on disk and humans can directly edit MEMORY.md.

Not suitable as: Semantic search or vector memory banks; cross-workspace knowledge synchronization (should look at dsh-strand); a replacement for the instruction layer of AGENTS.md. The README also notes: if @deepseek-ai/dsh-agent-instructions is inactive in this profile, AGENTS.md itself will not be loaded — this is a separate line from workspace memory.

Writing habits: Topic names do not support fuzzy matching; auth: refresh and auth: token refresh are two separate topics. Use append when they can be incorporated into an existing topic to avoid duplication. Although there is a fallback for sanitizing sensitive information, keys should still not be written.

The DSH ecosystem emphasizes “everything is a plugin”; community sites like the SkillHub Plugin Directory have no official affiliation with DeepSeek / Huanfang.

Conclusion

dsh-workspace-memory uses a Markdown file and a lightweight index to pin “what was learned after analyzing code” in the workspace, allowing the next round of conversation to see the index first and then decide whether to read the details. To view the introduction and classification, you can open the directory page; installation details and full scripts follow the repository README.

  • Directory Page: https://www.skillhub.cn/plugins/yusheng-zhu12/dsh-workspace-memory
  • GitHub: https://github.com/yusheng-zhu12/dsh-workspace-memory
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye