dsh-host-compliance-check: DSH Round-end Requirement Compliance Reminder Host Plugin

Introduction

When running long sessions in DeepSeek Harness (DSH), the main model often lacks a fixed gate when “finishing file modifications and preparing to end the current turn”: which paths were touched in this turn, and whether they align with the user’s original requirements. This often relies on manual recall or post-hoc diffs. Common workarounds include manually adding stop-hooks or repeatedly instructing the model to “self-check after modification” in the conversation—the former requires maintaining hook logic, while the latter is unstable.

Below is an introduction to the community workflow host plugin dsh-host-compliance-check (maintainer: liuyun847). When a main session turn ends normally, if files were actually written during the turn, it injects a compliance reminder in notice form (containing a file list and self-check guidance) into the main session. This allows the main model to decide on-site whether to finish directly, perform a brief self-check, or block and call a subagent for a deeper inspection. The DSH ecosystem advocates “everything is a plugin”; the plugin index originates from the independent community directory SkillHub and has no official affiliation with DeepSeek or High-Flyer.

What is this

dsh-host-compliance-check is a DSH host plugin that hooks into the Cordis runtime via cordis.patch.yml. The description on SkillHub reads: “DSH Host Plugin: Automatically dispatch requirement compliance check sub-agents at the end of turns (DeepSeek Harness)”. The repository README (v0.4.x) further clarifies: behaviorally mimicking Trae’s stop-hook (PostToolUse + Stop → decision handover), the current version does not automatically dispatch inspection sub-agents. Instead, it injects a notice at the end of the turn, leaving the main model to judge subsequent actions.

  • Repository: liuyun847/dsh-host-compliance-check
  • Category: Workflow (SkillHub categoryKey: agent-workflow)
  • License: MIT (SkillHub metadata)
  • Current manifest version: 0.4.2 (marked as v0.4.2 on the directory page)

Core Features

The following capabilities are derived from the repository README and the manifest description synced with SkillHub. You can view the complete README on the directory page before installation.

End-of-turn Notice Reminder

When a main session turn ends normally (listening for agent/turn-stopping, similar to Trae’s Stop), if the following conditions are met: files were modified in this turn, and a reminder has not yet been issued for the current user input, a notice is injected via agent.inject (source.form='notice', summary is a one-liner ≤120 characters). The message enters the next-step queue, and the current turn continues. The main model sees and responds to it on-site before truly ending—effectively similar to Trae’s block, rather than a silent exit.

File Collection Based on tools/result

Starting from v0.4.0, the source for collecting write paths has been changed to real-time precise recording via tools/result:

  • Top-level write / edit success → extract the actual file_path;
  • Sub-dispatches via tools.write / tools.edit within run_code also generate tools/result through the tool pipeline;
  • Top-level tool/call in the session event log is used only as a fallback.

The “reminded” flag and the current turn’s write table are reset for every new user message via agent/pre-step. skipPaths can be configured to filter paths.

Session Scope and Prompt Content

  • Triggered only for the main session; subagent sessions (header origin: 'subagent') are excluded to avoid nested reminders. Fork sessions from GUI restore/resume (with parentSession, no origin) are still treated as main sessions.
  • The prompt carries the complete user input history concatenated in chronological order (skipping plugin injections, truncated to keep the latest if too long), and includes a built-in self-check checklist and guidance on handling methods (finish directly / block and call subagent or subagent_fork for deep inspection).

Known Limitations

  • Only covers writes via standard tools.write / tools.edit; PTC raw writes (e.g., await import('node:fs') writing directly to disk, bypassing tool bindings) do not generate tools/result, and the plugin cannot detect them.
  • No automatic subagent dispatch; does not rely on ctx.get('subagents').

Configuration

In the config of the corresponding entry in cordis.patch.yml (README table):

Field Default Description
skipPaths [] Skip matching paths (RegExp/string array); if matched, do not record
diag false Write diagnostic logs to ~/.dsh/compliance-diag.log (prefer DSH_HOME; for troubleshooting)

Fields such as providerName, promptTemplate, and diffMaxChars from 0.2.x have been removed along with the 0.3.x source parsing logic.

Installation and Activation

The plugin runs with the current dsh process permissions; before installation, you should read the GitHub source code and the MIT license to confirm that the bundle patch (./cordis.patch.yml) in cordis.patch.yml meets expectations.

SkillHub marks liuyun847/dsh-host-compliance-check as installable (installability: verified) and provides a command with a precise commit (the profile example is web; replace it according to your own profile):

dsh plugin --profile web add github:liuyun847/dsh-host-compliance-check#0a02278cef3a966dd7435cf00430c68a8e484453

After execution, restart according to the installation plan, for example:

dsh --profile web

And confirm that the plugin line is mounted without startup errors.

Method 2: Profile Local Dependency in README

Under the DSH profile directory (e.g., ~/.dsh/profiles/web/):

  1. Add the file dependency to package.json and install:
{
  "dependencies": {
    "dsh-host-compliance-check": "file:./plugins/dsh-host-compliance-check"
  }
}

Then run pnpm install (or npm install) in that directory.

  1. Register it in cordis.patch.yml:
- insert:
    - id: compliance-check
      name: 'dsh-host-compliance-check'
  1. Restart dsh web to take effect.

The README notes: The repository uses plugins/dsh-host-compliance-check/ as the live source, and loads the file copy under node_modules at runtime. After modifying the live source, you need to sync lib/index.js, package.json, etc. to node_modules/dsh-host-compliance-check/ before restarting.

Typical Usage

No separate CLI is needed after activation: simply have the model use write / edit (or tools writes within run_code) to modify files in the main session as usual. When the current turn is about to end, if there are recorded writes in this turn and a reminder has not yet been issued for this user input, a notice will be automatically injected. The main model should read the file list and compare it with the user’s requirements, then choose to finish or call a subagent.

For troubleshooting, temporarily set diag: true to view ~/.dsh/compliance-diag.log (or the corresponding path under DSH_HOME).

For development-side unit tests (README):

pnpm install
node plugins/dsh-host-compliance-check/tests/diff.test.mjs

Use Cases and Notes

Suitable for: Teams or individuals who want a fixed “end-of-turn compliance gate” in the DSH main session; those who already use subagents for deep inspection but prefer the main model to decide whether to dispatch by default, rather than the plugin hardcoding an automatic fork.

Notes:

  • The plugin logic is strongly correlated with host Cordis events. Peer dependencies include @deepseek-ai/cordis, @deepseek-ai/dsh-llm, @deepseek-ai/dsh-subagent, etc. (see SkillHub manifest); pay attention to compatibility when upgrading DSH.
  • Write detection relies on the tools pipeline; PTC raw writes are not covered.
  • The GitHub repository has 0 stars (SkillHub sync data); refer to the directory page and README to understand the behavior. Do not confuse the directory page’s summary phrase “automatically dispatch sub-agents” with the v0.4.x behavior of “notice + main model judgment”.

Links

  • SkillHub Directory Page: https://www.skillhub.cn/plugins/liuyun847/dsh-host-compliance-check
  • GitHub: https://github.com/liuyun847/dsh-host-compliance-check

With the steps above, you can turn “whether to compare requirements with modified files at the end of a turn” from a verbal habit into a host-plugin-driven notice reminder within your DSH workflow, and hand it over to a subagent for deep compliance inspection when necessary.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye