dsh-source-preservation-guidance: Injecting Source Code Preservation Guidance for DSH

Introduction

When extending behavior with plugins in DeepSeek Harness (DSH), you often install community plugins alongside private ones, while relying on official constraints on code changes. Without unified rules for “private plugins first” and “code protection,” the model or toolchain might mistakenly modify files that should not be touched, or write content that shouldn’t be committed into the profile during multi-machine synchronization.

The plugin described below does not replace your business logic but instead writes these rules into the DSH profile as a configuration layer, providing the harness with clear source code protection guidance at runtime. The community directory SkillHub categorizes it as a “memory” plugin. The repository is maintained by vb2250158, currently has 0 GitHub stars, and is licensed under MIT.

What is this

dsh-source-preservation-guidance (English interface name: Source preservation guidance, Chinese: 源码保护指引) is an open-source DSH plugin. According to the README, its purpose is to inject “private plugins first” and official code protection rules into DSH.

The plugin package declares dsh.bundle in its package.json. Upon installation, it merges the configuration layer corresponding to cordis.patch.yml into the selected profile, rather than running a separate external service.

Environment and Version

This release requires DSH 0.2.1-alpha.1 or a version compatible with the 0.2 series. For more detailed compatibility information, please refer to docs/dsh-0.2-compatibility.md in the repository. The plugin’s own version in the package is 0.1.5.

Core Functions

According to the README, the verified capabilities include:

  1. Rule Injection: Injects the “private plugins first” strategy and official code protection-related rules into DSH (specific items are subject to the patch and documentation in the repository).
  2. Profile Configuration Layer: Points to ./cordis.patch.yml via dsh.bundle.patch. After installation, this layer is included in the profile.
  3. Display Metadata: The title and description in the plugin list switch according to the DSH interface language. Resources are sourced from locale/en.json and locale/zh.json. The icon is a self-contained icon.svg (adapted from Lucide, see ICON_LICENSE.txt).

The README does not elaborate on the business semantics of each rule; users should read cordis.patch.yml and the documentation under docs/ on GitHub before use.

Installation and Enablement

For public repositories, you must first pin the Git commit to install, and then install via the official DSH CLI. The command from the materials is as follows (replace <commit> with the actual commit hash):

pnpm dsh plugin --profile web add github:vb2250158/dsh-source-preservation-guidance#<commit>

Note: --profile web indicates adding the plugin to a profile named ‘web’; if you use a different profile name, change it to the corresponding value. After installation, the configuration layer declared by the plugin will be merged into that profile.

Configuration and Multi-machine Synchronization

Plugin-related configuration is stored in cordis.patch.yml within the DSH profile. The README emphasizes that repositories used for multi-computer synchronization typically only store the plugin repository address, pinned commit, enable/disable status, and configuration, but not the full source code of this plugin repository. When planning a synchronization strategy, distinguish between “profile metadata” and “plugin source code checkout.”

Maintainer Self-test Commands

The local verification steps provided in the repository README (for plugin developers or those reviewing the source code):

npm test
npm pack --dry-run

Here, npm test corresponds to node --test tests/*.test.mjs. For regular users who are only installing the plugin, the DSH-side installation and profile activation are sufficient.

Use Cases and Notes

Who is it for: Developers or teams already using the profile/plugin system on DSH 0.2.x who wish to have “private plugins first + code protection” guidance by default.

Recommendations before installation:

  • The plugin runs with the current dsh process permissions. Before installation, you should review the source code and MIT license of the GitHub repository yourself.
  • The installation command must use the original form from the source material (including #<commit>); do not omit the commit pinning.
  • Community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer; the plugin’s origin is determined by the GitHub repository and the commit at installation time.

Conclusion

dsh-source-preservation-guidance provides value by using a versionable plugin to write source code protection-related rules into the DSH profile, reducing ambiguities regarding accidental modifications and synchronization strategies. Directory Page: https://www.skillhub.cn/plugins/vb2250158/dsh-source-preservation-guidance; Source Code and README: https://github.com/vb2250158/dsh-source-preservation-guidance.

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

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

Xiaoye