DSH-Ops-Conventions: Operational Conventions for Deterministic Injection Before Execution

Preface

It is very common to use OpenViking skills or memory in DSH to note down operational conventions like “check the checklist before writing scripts” or “back up files before modifying them.” However, when actually starting to modify code or write files, the model doesn’t always proactively read these conventions—if they are recorded but not recalled during execution, they are effectively the same as not being recorded at all. Relying on stuffing the full context into the prompt every turn or solely depending on AGENTS.md either wastes tokens or remains unstable.

Below is an introduction to the DSH workflow plugin dsh-ops-conventions released by maintainer HeliosTangDev (GitHub: HeliosTangDev/dsh-ops-conventions): it injects an ultra-short “doorbell” and the operational index path into the context before starting work, and optionally provides hard interception to reject write-type tool calls before INDEX.md has been read. It is categorized as a workflow; the community directory page can be found at the SkillHub entry.

What is this

dsh-ops-conventions is a Cordis bundle plugin for DeepSeek Harness, licensed under MIT. Its positioning is to deterministically write “operational conventions” into the session context before starting work, and optionally enforce the model to read the convention entry checklist first. The convention content itself can be placed in the package’s example directory, a self-built directory, or aligned with the OpenViking skill directory; the plugin handles the injection timing and (optional) execution thresholds.

Core Features

Based on the repository README, the capabilities can be summarized as follows:

  1. Doorbell Injection: Injected only once per session and per convention version (the README states it’s about 150 tokens; the FAQ also mentions a plugin source message on the scale of about 70 tokens). It does not filter by “whether it looks like starting work”—it injects even in chatty turns. After modifying the VERSION in the convention directory, the next message of any type will trigger a re-injection.
  2. Built-in Resident Conventions: The doorbell contains about 6 lines of resident conventions (finishing self-checks, memory consolidation, clearing _tasks, not listing multiple solutions, backup and rollback, modifying only the tool area, etc.), reducing reliance on profile.md sections that might be extracted and rewritten by OpenViking.
  3. Injection Logging: Records a log line for every injection (including the selected convention directory and whether the index exists) to facilitate verification of effectiveness.
  4. Hard Interception (Enabled by Default): In “operational” turns, if INDEX.md has not been successfully read in the current session, it directly denys write-type tools like write and edit, prompting to read the index first. Once read, it allows passage for the current session. Chatty turns are not intercepted; bash / shell are not intercepted by default but can be added to the interception list in the config.
  5. Zero Configuration Usage: The package comes with a skills/ example checklist; it can also point to a custom directory or an OpenViking storage path.

Hook exceptions result in a fail-open (allow passage) behavior with a log written; no interception occurs if there is no valid INDEX.md. Multiple sessions are independent of each other.

Installation and Activation

The official recommendation is to use the installation script within the repository (cross-platform, zero dependencies). Do not manually piece together dsh plugin add commands based on the plugin name.

git clone https://github.com/HeliosTangDev/dsh-ops-conventions.git
cd dsh-ops-conventions
node install.mjs                       # Default install to ~/.dsh/profiles/desktop
node install.mjs /path/to/profile      # Specify profile
node install.mjs /path/to/profile --uninstall   # Uninstall

The script copies the package to <profile>/node_modules/dsh-ops-conventions, registers it in the dependencies of package.json, and adds the package name to dsh.profile.bundles (it will not load if not added).

For manual installation, you need to place the entire repository into <profile>/node_modules/dsh-ops-conventions and declare the dependency and bundles in package.json; it is mandatory to preserve the package’s dsh.bundle.patch pointing to cordis.patch.yml, otherwise the plugin manager will report “no bundle declared” and will not load it.

After installation: To hot-reload, simply turn off and then on dsh-ops-conventions on the DSH plugin page (usually no need to restart DSH when changing skills/ or config). If you modify index.mjs / rule.mjs, turning off and on does not guarantee re-importing; restarting DeepSeek Harness is the safest method.

Convention Directory and Configuration

The convention directory must contain INDEX.md; VERSION is optional and used to trigger re-injection.

skills/
├── INDEX.md          # Entry checklist (path provided in injected text)
├── VERSION           # Version number; re-injects on the next turn after modification
└── ops-scripts/
    └── SKILL.md      # Various checklists, referenced by INDEX.md

The package example contains six categories: ops-scripts, ops-notes, ops-files, ops-check, ops-longtask, ops-dsh. You can modify them into your own checklists as needed.

skillsDir resolution order (checks if the directory actually contains INDEX.md one by one, taking the first valid one):

  1. Config item skillsDir
  2. Environment variable DSH_OPS_CONVENTIONS_DIR
  3. Package internal skills/
  4. OpenViking: ~/.openviking/data/viking/default/user/default/memories/ops-conventions
  5. ~/.dsh/ops-conventions/skills

In the profile’s cordis.patch.yml, you can write, for example:

- id: dsh-ops-conventions
  name: "dsh-ops-conventions"
  config:
    skillsDir: "D:/my-conventions/skills"
    enforce: true
    # blockedTools: ["write", "edit", "bash"]
Config Item Environment Variable Default Description
skillsDir DSH_OPS_CONVENTIONS_DIR Package skills/ Convention directory, must contain INDEX.md
logFile DSH_OPS_CONVENTIONS_LOG ~/.dsh/ops-conventions/ops-conventions.log Injection / interception log
enforce — true If false, only injects doorbell, no hard interception
blockedTools — write edit multi_edit apply_patch notebook_edit Can add bash / pwsh manually

Typical usage: Keep defaults or point skillsDir to your checklist; when enforce is enabled, the model will be required to read the INDEX.md from the injected message and execute according to the checklist before retrying write operations. If a “hard interception” rejection occurs, simply read the index via the prompted path; if interception is not needed, set enforce: false.

Mechanism Brief

  • Listens to agent/pre-step (waterfall): Before the model call, if this session hasn’t injected this version yet, appends a message from the instructions source.
  • Hard interception listens to tools/pre-execute: In operational turns, if INDEX.md has not been successfully read, returns deny for configured write-type tools; tools/result observes a successful INDEX read and then allows passage.
  • The log may contain entries like inject vN, guard deny, guard index-read, guard loaded enforce=... for verifying behavior.

Use Cases and Notes

Suitable for users who have already written operational conventions in OpenViking skills or local Markdown checklists but wish for DSH to provide stable reminders during sessions and enforce reading the index first when necessary. The plugin runs with the permissions of the current DSH process. Please read the GitHub repository source code and MIT license before installation; local script installations will not appear in plugin market search results and need to be confirmed in the “Installed” list. If the card reports “no bundle declared,” check if package.json preserves dsh.bundle.patch.

Conclusion

dsh-ops-conventions addresses the issue of “conventions recorded but not recalled during execution”: using a versioned short doorbell + optional hard interception, it turns “read INDEX.md first” into a verifiable and configurable workflow step. Directory and documentation: SkillHub, GitHub.

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

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

Xiaoye