Appends ambiguity-handling rules to the dsh system prompt so the agent asks clarifying options before guessing.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:changlianxiya-139/dsh-ambiguity-handling
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
A DeepSeek Harness (dsh) plugin that appends the "Ambiguity-Handling Rules" to the system prompt whenever a user request is ambiguous, unclear in scope, or open to multiple interpretations. It guides the model to clarify the user's intent first instead of guessing or making assumptions.
Listed on dsh.pub
Features
- Injects the ambiguity-handling rules into the system prompt as a standalone section without overwriting existing system prompt content.
- The injected section is named
ambiguity-handlingwith anorderof50, which controls its position relative to other system prompt sections. - The rules require the model to: explicitly point out the ambiguity, list 2–4 likely interpretations in Chinese, provide an "Other" option for additional clarification, and ask the user to confirm before continuing.
Injected Rule Text
The plugin appends the following text to the system prompt:
# 歧义处理规则
当用户请求存在歧义、范围不清或可能有多重理解时,你必须:
1. 明确指出请求存在歧义,不要臆测、不要假设。
2. 列出 2-4 种最可能的中文理解。
3. 额外提供一个"其他"选项,让用户自行补充。
4. 请用户选择其中一项或补充说明。
输出格式示例:
"您的请求存在多种理解,请选择最符合您意图的一项:
A. ...
B. ...
C. ...
D. 其他(请补充说明)"
Directory Structure
dsh-ambiguity-handling/
├── index.ts # Plugin source: exports name / inject / apply and injects a section into systemPrompt
├── index.js # Prebuilt JS entry (package.json main points here)
├── package.json # Plugin metadata + dsh.bundle manifest
├── cordis.patch.yml # Bundle patch layer that references this package by name
├── test/smoke.test.mjs # node:test smoke tests
├── scripts/validate-package.mjs # Publishable manifest validation script
├── .github/workflows/ci.yml # GitHub Actions CI
├── README.md # Documentation (Chinese)
├── README.en.md # Documentation (English)
├── PUBLISHING.md # Publishing & marketplace guide
├── CHANGELOG.md # Changelog
├── SECURITY.md # Security policy
└── LICENSE # MIT license
Installation
Option 1: install as a bundle (recommended after publishing to npm / GitHub)
dsh reads the dsh.bundle manifest and activates the cordis.patch.yml layer automatically, so no manual profile patch edit is needed:
# after npm publish
dsh plugin --profile web add dsh-ambiguity-handling
# from a GitHub repository
dsh plugin --profile web add github:changlianxiya-139/dsh-ambiguity-handling
# from a local tarball
dsh plugin --profile web add ./dsh-ambiguity-handling-1.0.0.tgz
Repeat with headless instead of web if that profile should load it too. See PUBLISHING.md for the full publish/submission checklist.
Option 2: local file: deployment (current setup on this machine)
The plugin directory is located at:
/home/aa/.dsh/plugins/dsh-ambiguity-handling
Configuration (local file: deployment)
dsh loads cordis.patch.yml per profile. For local deployment, the plugin must be registered in the profile you actually use.
web profile
Add the following entry to the - insert: list in ~/.dsh/profiles/web/cordis.patch.yml:
- id: dsh-ambiguity-handling
name: 'file:/home/aa/.dsh/plugins/dsh-ambiguity-handling'
Full example:
# Web profile user patch layer
- insert:
- id: tool-cordis
name: '@deepseek-ai/dsh-tool-cordis'
- id: dsh-ambiguity-handling
name: 'file:/home/aa/.dsh/plugins/dsh-ambiguity-handling'
headless profile
The content of ~/.dsh/profiles/headless/cordis.patch.yml should be:
- insert:
- id: dsh-ambiguity-handling
name: 'file:/home/aa/.dsh/plugins/dsh-ambiguity-handling'
How It Works
- The plugin declares its dependency on dsh's
systemPromptinjection point viaexport const inject = ['systemPrompt']. - dsh calls
apply(ctx)when loading the plugin. ctx.systemPrompt.section({ ... })registers the rules as an ordered section:
ctx.systemPrompt.section({
name: 'ambiguity-handling',
order: 50,
text: ambiguityRule,
})
name: unique section identifier, preventing conflicts when injection happens repeatedly.order: section ordering; smaller numbers come first (actual behavior follows dsh's final prompt assembly implementation).text: the actual text appended to the system prompt.
Activation and Verification
After changing the patch configuration or plugin code, you must restart dsh (the corresponding web / headless profile) to reload the plugin.
Verify that the plugin row reached the effective configuration with
--dump-config:dsh --profile web --dump-config | grep -A1 'id: dsh-ambiguity-handling'After restarting, start a new session and confirm that the system prompt contains the "歧义处理规则" block and the
ambiguity-handlingsection.Quick check: send the model an ambiguous request (e.g., "帮我写一下") and observe whether it lists A/B/C/D options to ask for clarification as required by the rules.
Modifying the Rules
- The source lives in the
ambiguityRuletemplate literal inindex.ts. - Keep the prebuilt
index.jsin sync after changing the source, otherwise published packages would still carry the old rule text. - Restart dsh for the change to take effect.
Disabling the Plugin
- Bundle install:
dsh plugin --profile <name> remove dsh-ambiguity-handling - Local file: deployment: remove the
- id: dsh-ambiguity-handlingentry from the corresponding profile'scordis.patch.yml
Then restart dsh.
Marketplace Status
- dsh.pub: listed
- DSH Hub: submitted (Issue #5, pending)
- awesome-dsh-plugin / dsh-market: submit after the repo is at least 1 day old and has 10 or more commits
Publishing
See PUBLISHING.md for the complete checklist covering npm, GitHub, and community marketplaces (dsh-market / DSH Hub / dsh.pub, etc.).
License
MIT, see LICENSE.
Links
More in this category
Q00/ouroboros#integrations/dsh-plugin★ 6178
Config-only bundle that mounts Ouroboros through the DSH MCP client, exposing 36 interview, Seed, execution, evaluation, and evolution workflow tools in DSH.
loopx-project/loopx#dsh-loopx-plugin★ 6146
LoopX, a provider-neutral, local-first state kernel and control plane for long-horizon agents: keeps Goal, Todo, gate, evidence, quota, recovery, and handoff state above DeepSeek Harness, while the plugin bootstraps the CLI and skills, admits bounded same-session continuation, and adds a loopback GoalBar for the exact bound loop.
chuspeeism/dashi-taskboard#deepseek-harness★ 3282
Embeds the active installed Codex Taskboard runtime in the DeepSeek Harness sidebar, using its launcher runtime descriptor instead of a fixed port.
NanmiCoder/dsh-agent-teams★ 1907
AgentTeams multi-agent teams.
EthanYoQ/AI-Novel-Writer#dsh-ai-novel-writer★ 1287
Installs a dedicated AI novel-writing preset and workbench: revisioned local project assets, a compact side drawer, and native approval-gated single-file changes.
tong-io/tongflow#dsh-tongflow★ 1035
TongFlow film-crew studio for image, voice, music and video production: the agent writes per-asset TongFlow workflow files (.tongflow.json) that run through TongFlow plugins, with an embedded workflow canvas, a shot/character/take project layout and a manga-drama template; sessions starting with @tongflow open the Studio view.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.