← Back to home@passerby325799

dsh-trans-md

Keeps DSH chat replies short: final replies over 15 lines are written to a Markdown file in the workspace, leaving a digest and file path in chat.

Stars
0
Language
JavaScript
Created
Sep 23, 2026
Updated
Sep 23, 2026
GitHub repo

Introduction

dsh-trans-md

Long replies become Markdown files — for DeepSeek Harness (dsh).

Very long assistant replies can be truncated mid-stream by the transport. dsh-trans-md moves the bulk of long replies into a workspace Markdown file and keeps the chat reply short. It also saves tokens: content written to a file as a tool argument is paid for once, while a long chat reply stays in context and is re-sent on every later request.

Install

dsh plugin --profile web add github:<owner>/dsh-trans-md

Restart dsh (or reload the profile), then the rule is active for new turns.

What it does

The plugin contributes one system-prompt section (order 40) stating a single rule:

  • If a user-facing final reply would exceed 15 lines, write the full content to docs/<prefix>-<topic>.md in the current workspace instead of sending it in chat.
  • The chat reply becomes a short digest (at most 10 lines) plus the file path.
  • Replies under 15 lines are sent normally in chat.
  • Writing the file and also pasting its body into chat is explicitly disallowed.
  • Investigation depth is unchanged — only the delivery location changes.

It registers no tools, no UI, and makes no network requests. The docs/ directory is created on first use.

Configuration

All fields are optional; the defaults are shown.

KeyDefaultMeaning
enabledtrueTurn the rule off without uninstalling.
maxLines15Line threshold above which a reply goes to a file.
docsDir"docs"Workspace-relative directory for the files.
filePrefix"notes"Prefix for generated filenames.
ruleFile—Path to a Markdown file that replaces the built-in rule text entirely.
workspaceRoot—Optional absolute base path; when omitted the process working directory is used.

Set them through the profile patch:

- id: dsh-trans-md
  name: dsh-trans-md
  config:
    maxLines: 20
    docsDir: notes

Custom rule text

Point ruleFile at any Markdown file to replace the built-in instruction. A non-empty file wins entirely; an empty or unreadable file silently falls back to the built-in text, so a bad path never breaks prompt assembly. Content is capped at 4000 characters.

Scope and limits

  • This is a prompt-level instruction, not a hard interception. It makes the behaviour the strongly preferred default; it cannot guarantee it in every turn. A hard guarantee would require an output hooks layer, which this plugin deliberately does not add.
  • The rule applies to the final user-facing reply. Intermediate narration between tool calls is exempt.
  • Styles apply to the main conversation only.

Requirements

  • DeepSeek Harness with a systemPrompt service available. If that service is absent the plugin mounts and contributes nothing rather than failing profile load.
  • No runtime dependencies.

License

MIT