rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:luyy9apples/dsh-workspace-memory
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
An approval-gated assistant for maintaining shared workspace instructions and project memory.
English | 简体中文
dsh-workspace-memory helps users deliberately maintain two kinds of context shared by conversations in the same workspace.
Reusable working agreements can be curated in AGENTS.md, while stable project facts and decisions are kept separately in .dsh-memory.md. This separation helps keep behavioral instructions focused while preserving factual context that later conversations may need.
When the model identifies a possible long-term instruction or memory, it can propose a precise update to the existing document. The user reviews a focused diff and decides whether the change should be applied.
| File | What belongs there |
|---|---|
AGENTS.md |
Reusable rules for how agents should work, write, format, validate, and use tools |
.dsh-memory.md |
Stable facts, decisions, terminology, constraints, and unresolved risks that agents should know but not treat as behavioral rules |
Both are ordinary Markdown files in the session's current working directory. They remain readable, reviewable, and versionable without a database, embeddings, or a cloud service.
The demo follows the complete workflow: save a reusable working rule to AGENTS.md, record a stable project decision in .dsh-memory.md, then open another conversation in the same workspace and verify that it receives both. Every inferred update is shown as a focused diff and written only after approval.

Try the same flow after installing:
Rules the agent should repeatedly follow belong in AGENTS.md; stable facts and decisions it should know belong in .dsh-memory.md. One-off requests are not stored.
Requires DeepSeek Harness 0.1.1-rc.2 and Node.js ^22.19.0 || >=24.0.0.
dsh plugin --profile web add dsh-workspace-memory
dsh --profile web
That is all. This package declares dsh.bundle, so DSH adds its configuration layer to the web profile automatically. No profile file needs to be edited by hand. Restart an already running profile after installing or updating the package.
# Update
dsh plugin --profile web update dsh-workspace-memory@latest
# Remove
dsh plugin --profile web remove dsh-workspace-memory
AGENTS.md.AGENTS.md, while facts and decisions go to .dsh-memory.md.durable user feedback
|
+-- reusable agent behavior ----------> AGENTS.md
|
+-- stable factual project context ----> .dsh-memory.md
|
`-- one-off request or progress --------> not stored
candidate -> complete-file merge -> user confirmation -> version-guarded write
Before every accepted model step, the plugin injects one current snapshot of the two files. Unchanged visible content is not appended repeatedly; empty and deleted files are represented explicitly so stale content is superseded. Refresh happens before each model step; it is not real-time broadcasting, and conflicting proposals are rejected rather than merged automatically.
The model decides whether durable feedback is a reusable behavior rule, factual project context, or neither. Before proposing, it is instructed to review the complete target document, integrate the smallest coherent edit into the relevant section, remove affected-section duplication, and preserve unrelated content and structure. The workspace_memory tool enforces the write boundary: inferred feedback must use propose, and a proposal is written only after the user approves it. The observed file version must still match at write time.
This works alongside DSH's standard agent-instructions loader. DSH retains responsibility for discovering and applying AGENTS.md; dsh-workspace-memory assists users in maintaining the cwd-level file and stores factual context separately in .dsh-memory.md.
The npm Bundle contains both plugin halves. The Host half keeps the complete proposed replacement and performs the guarded write. The optional Web half receives only a bounded structured diff and renders the review card through DSH's client module system, so installing the Bundle does not require rebuilding the DSH Web application.
This mechanism improves continuity; it does not guarantee that a model will always classify, remember, or follow every instruction correctly.
The Bundle installs this configuration:
memoryFile: .dsh-memory.md
instructionFile: AGENTS.md
suggestUpdates: true
maxBytes: 32768
To override it, add a later row to $DSH_HOME/profiles/web/cordis.patch.yml. DSH replaces the complete config value, so restate every field:
- id: workspace-memory
config:
memoryFile: .dsh-memory.md
instructionFile: AGENTS.md
suggestUpdates: false
maxBytes: 65536
The filenames must be distinct, same-directory names without path separators. maxBytes applies separately to each complete file and to the proposal rationale. Existing files must be regular UTF-8 files; symbolic links at the final path component are rejected.
| Boundary | Behavior |
|---|---|
| Storage scope | Only the two configured files in the exact session cwd |
| Model-inferred changes | Require interactive confirmation |
| Concurrent changes | Stale whole-file replacements are rejected |
| Sandbox boundary | The calling session's policy and cwd are enforced; read-only remains read-only |
| Failed or declined proposal | The agent is instructed not to bypass workspace_memory with another write tool |
| Symbolic links | Rejected at the final path component |
| Network and telemetry | None |
| Database and embeddings | None |
See SECURITY.md for the complete authority and write-safety model.
| Environment | Status |
|---|---|
DSH Web 0.1.1-rc.2 |
Tested |
| Windows x64 | Tested |
| Ubuntu with Node.js 22 and 24 | CI target |
| macOS | Not yet verified |
| Headless profile | Use suggestUpdates: false; an interactive confirmation provider is normally unavailable |
AGENTS.md. Global, ancestor, and nested instruction discovery remains the responsibility of DSH's standard agent-instructions plugin.dsh --profile web --dump-config
Look for a # == dsh-workspace-memory layer and an entry with id: workspace-memory. If both are present, restart the profile.
Check that suggestUpdates is true and that the feedback is durable rather than a one-off task. For a deterministic test, explicitly say that the rule or decision should apply to future conversations.
Another conversation may have changed the file while the confirmation dialog was open. Read the current content, merge the candidate again, and submit a new proposal.
pnpm install
pnpm run verify
pnpm pack
Install a local checkout into DSH:
pnpm run build
dsh plugin --profile web add "link:/absolute/path/to/dsh-workspace-memory"
dsh --profile web
Release history is maintained in CHANGELOG.md. Contributions and reproducible bug reports are welcome.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。