Introduction¶
DeepSeek Harness (DSH) supports extending the system through plugins. In practical development, developers usually maintain files such as .cursorrules, GEMINI.md, or .github/copilot-instructions.md in the project root directory to define the behavior rules for AI assistants. DSH does not read these files by default, which prevents the rules from taking effect in Harness.
This plugin aims to resolve this fragmentation problem. It reads and merges the existing workspace instructions of Cursor, Gemini CLI, and GitHub Copilot, and uniformly injects them into the DeepSeek Harness system prompt.
Plugin Overview¶
- Name:
youjiaqi421/dsh-plugin-workspace-rules - Positioning: Workflow plugin
- Description: Loads the existing workspace instructions of Cursor, Gemini CLI, and GitHub Copilot into DeepSeek Harness.
Core Features¶
- File reading order: Reads files in a fixed order:
.cursorrules,GEMINI.md,.github/copilot-instructions.md. Missing or empty files are ignored. - Unified merging: Merges the read content into a single system prompt section.
- Real-time updates: No Harness restart is required. The plugin re-reads the files before each model request, ensuring rule changes take effect immediately.
- Syntax preservation: Preserves
{{...}}text and does not parse it as Harness variables. - Size limits: Uses
maxFileBytesandmaxTotalBytesto limit individual file size and total size, preventing issues caused by overly large prompts.
Installation and Enablement¶
The plugin has not yet been published to npm. It must be installed from GitHub to the specified profile:
dsh plugin --profile web add github:youjiaqi421/dsh-plugin-workspace-rules
During installation, if you encounter the issue where pnpm 10+ blocks build scripts of git dependencies by default, add the following configuration to the profile’s pnpm-workspace.yaml:
allowBuilds:
dsh-plugin-workspace-rules: true
After adding the configuration, run the installation command above again.
Configuration and Usage¶
After installation, the plugin works without additional configuration. To customize the paths or limits, edit the profile’s cordis.patch.yml:
- id: workspace-rules
config:
root: .
files:
- .cursorrules
- GEMINI.md
- .github/copilot-instructions.md
- docs/agent-rules.md
maxFileBytes: 65536
maxTotalBytes: 131072
order: 20
Configuration explanation:
- root: Starting directory, relative to the dsh working directory.
- files: List of files to read.
- maxFileBytes: Maximum byte size for a single file.
- maxTotalBytes: Maximum total byte size after merging all files.
- order: Order of the inserted system prompt in the prompt chain.
Notes¶
-
Environment requirements:
- Node.js
^22.19.0or>=24.0.0is required. - pnpm must be installed.
- Node.js
-
pnpm 10+ behavior: By default, pnpm 10+ blocks build scripts of git dependencies. You need to allow them through the
allowBuildsconfiguration. -
Path resolution: The
rootpath must be a relative path based on thedshworking directory, and all file paths must be located within this root directory. -
Encoding handling: Files must use valid UTF-8 encoding. A byte order mark (BOM) at the beginning of a file will be removed automatically.
-
Security: The plugin reads files from the project root directory. Before installing and using it, it is recommended to review the source code and license.
Summary¶
This plugin gives DSH the ability to load rules from external AI tools in a unified way. By configuring cordis.patch.yml, you can flexibly control the scope of files to read and the size limits, helping developers reuse existing workflow configurations in Harness.
- GitHub: https://github.com/youjiaqi421/dsh-plugin-workspace-rules
- Plugin directory: https://www.skillhub.cn/plugins/youjiaqi421/dsh-plugin-workspace-rules