Introduction¶
When running agents in DeepSeek Harness (DSH), several common friction points exist: the model may only provide conclusions within its internal thinking, leaving you blind to its understanding of the goal, the trade-offs made, and the associated risks; thinking, permission justifications, and reports may be mixed with Chinese and English; and style constraints relying on AGENTS.md or ad-hoc verbal instructions often quietly fail after a session switch, context compaction, or upstream preset replacement, frequently only discovered when problems arise.
Introduced below is the bundle plugin dsh-zh-review-guard (Category: Workflow) released by community maintainer ROBOHAPPYIY. It is invoked during the assembly of the system prompt for every session, injecting rules via a resident section. It can optionally sync to $DSH_HOME/AGENTS.md. The goal is to transform “internal thinking reviewable by the user” and “user-facing explanations in Simplified Chinese” into an observable, reusable mechanism, rather than relying on verbal agreements within a single session.
What is this¶
dsh-zh-review-guard is a DSH bundle plugin: it injects a rule section named zh-review-guard during system prompt assembly, which is resistant to context compaction (the main channel utilizes the official system-prompt/assemble injection point). The rule text is centralized in RULES_TEXT within lib/index.js; the AGENTS.md defaults to writing a streamlined fallback version derived from the same source (the first 2 rules) to prevent divergence between the two locations and avoid paying double tokens for the same rule in every turn.
Repository: https://github.com/ROBOHAPPYIY/dsh-zh-review-guard
Directory Page: https://www.skillhub.cn/plugins/ROBOHAPPYIY/dsh-zh-review-guard
License: MIT; Current Release example version v0.2.2; Requirements: Node ≥22, DSH ≥0.0.1-rc; Zero third-party dependencies.
Core Features¶
The Seven Injected Baseline Rules¶
The key points of the rules injected by the plugin into the system prompt are as follows (refer to the repository for the complete wording):
- Internal thinking (reasoning / thinking) must use Simplified Chinese.
- Internal thinking is considered user-visible and requires review: before providing a conclusion, clearly write out the understanding of the goal, solution trade-offs, the reason for choosing A over B, risks and uncertainties, and unresolved issues.
- Where user decision or review is required, explicitly state “This is a point requiring your confirmation.”
- User-facing explanations, reports, questions, and delivery notes must be in Simplified Chinese; keep code, commands, paths, and proper nouns in their original language.
- Before requesting system-level permissions or performing irreversible operations, explain in Simplified Chinese what is being done, why it is needed, the scope of impact, and whether it is reversible.
- Attach evidence to reported conclusions (commands, output, file paths, and line numbers); investigate before acting, and do not ask the user back about objective facts that can be checked from the codebase or the local machine.
- Directly perform and report on next steps that are reversible; only stop to ask if it involves a choice belonging to the user.
Dual Channels to Ensure Rule Persistence¶
| Channel | Mechanism | Compression Resistant |
|---|---|---|
| Main | system-prompt/assemble injects section { name: 'zh-review-guard', order: 4, text: … }, replacing sections with the same name in-place |
Yes |
| Backup | Rules synced to $DSH_HOME/AGENTS.md (streamlined fallback by default), acting as a persistent baseline via @deepseek-ai/dsh-agent-instructions in the first pre-step of the session |
Yes |
Some session presets may replace the sections entirely in the first round, causing the main channel segment to be lost; the backup channel relies on the AGENTS.md baseline, so rules will still be present in the first round. Handwritten AGENTS.md files are not overwritten by default; writing only occurs if the file does not exist/is empty, or the content matches the hash recorded by the plugin, or the entire text is already this plugin’s text. A backup is available in zh-review-guard/backups/ before any overwrite.
Observability¶
Once installed, there is no need to guess “whether it is working”:
$DSH_HOME/zh-review-guard/status.json: Assembly count, replacement count, error count,agentsFileandrulesstatus, etc.$DSH_HOME/zh-review-guard/assemblies.jsonl: One record line for each assembly.$DSH_HOME/zh-review-guard/health.json: Main channel heartbeat, used to determine if the main channel has been broken by upstream modifications.
Installation and Activation¶
Prerequisite: DSH is installed on the local machine, and dsh --version outputs a result. Restart the DSH App after installation (the profile’s bundle stack is assembled at startup).
If the machine can access GitHub, use the command from the official documentation (replace desktop with your profile; web is commonly used for Web GUI):
dsh plugin --profile desktop add github:ROBOHAPPYIY/dsh-zh-review-guard#v0.2.2
If not using git, you can install the Release attachment directly:
dsh plugin --profile desktop add https://github.com/ROBOHAPPYIY/dsh-zh-review-guard/releases/download/v0.2.2/dsh-zh-review-guard-0.2.2.tgz
For offline use, download the tgz first, optionally verify the SHA256, then add locally; uninstall example:
dsh plugin --profile desktop remove dsh-zh-review-guard
For detailed steps (hashing, troubleshooting), see the repository’s INSTALL.md.
Typical Usage¶
Appending Local Rules¶
The built-in 7 rules are the baseline. In append mode (default), you can edit $DSH_HOME/zh-review-guard/rules.md, and both channels will use the parsed new text simultaneously; no restart is needed after modification, as it checks the file modification time every 60 seconds by default and records it in rulesReloads within status.json.
Windows example (adjust paths according to your $DSH_HOME):
New-Item -ItemType Directory -Force "$env:USERPROFILE\.dsh\zh-review-guard" | Out-Null
@'
- Give the conclusion first, then the evidence when reporting.
- Explain which files will be touched before starting work.
'@ | Set-Content -Encoding utf8 "$env:USERPROFILE\.dsh\zh-review-guard\rules.md"
rulesMode |
Behavior |
|---|---|
append (default) |
Built-in 7 rules + “Local Appended Rules” + your file |
replace |
Use your file entirely (still with attribution marker) |
off |
Only use the built-in 7 rules, ignore the file |
Common Configuration Options¶
All are located in the config of cordis.patch.yml and are optional. For example:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Turn off the entire plugin |
sectionName |
zh-review-guard |
Injection section name; replaces in-place if same name exists |
order |
4 |
Section sorting |
syncAgentsFile |
true |
Whether to sync AGENTS.md |
agentsDigestLines |
2 |
Number of built-in rules written to AGENTS.md; 0 for the full text |
rulesFile |
$DSH_HOME/zh-review-guard/rules.md |
Custom rules file |
rulesMode |
append |
append / replace / off |
includeSubagents |
true |
Whether to inject into sub-sessions |
syncIntervalMs |
60000 |
Interval for rule hot-reload and health checks |
Use Cases and Notes¶
Who is it for: Teams or individuals who want structured, reviewable internal thinking within DSH sessions and stable Simplified Chinese for user-visible text; workflows that require clarity on “what to do, why, impact, and reversibility” before requesting permissions.
Ecosystem Note: DSH emphasizes “Everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.
Security and Trust: The plugin runs with the permissions of the current DSH process and may read/write logs under $DSH_HOME and (under takeover conditions) AGENTS.md. It is recommended to read the source code and the MIT license before installation to ensure it complies with your policies. Do not blindly pin old tags without verifying the source; check Release notes when upgrading.
Conclusion¶
dsh-zh-review-guard transforms “Simplified Chinese + Reviewable Internal Thinking” from a session-level convention into a bundle-level resident rule, using status.json, assemblies.jsonl, and health.json to answer “Is it installed, and has it been replaced?”. If you are developing agents long-term on the DSH desktop client or Web GUI, you can install v0.2.2 using the commands above, restart the App, and verify assembly via the logs.