Preface¶
DeepSeek Harness (DSH) supports configuring global rules via ~/.dsh/AGENTS.md, allowing each session to inherit the same set of instructions. This path is not difficult for developers familiar with the terminal, but when using the web interface, changing rules often requires switching back to an editor or terminal, interrupting the current workflow.
dsh-global-rules brings this functionality into the DSH Web “Settings” panel: open a tab to read, edit, and save AGENTS.md without leaving the browser. Below, we introduce its positioning, capabilities, and installation usage.
What Is This¶
dsh-global-rules is a DSH community plugin, maintained by badai147, and classified as a client-side plugin. It adds a “Global Rules” page to the DeepSeek Harness Web settings panel, directly reading and writing ~/.dsh/AGENTS.md.
The plugin itself does not implement hot-reload logic for rules; instead, it relies on the built-in dsh-agent-instructions plugin in DSH to perform dynamic detection for the user-global scope. After saving, new sessions immediately execute according to the new content; the current session detects changes after the next filesystem tool call.
Core Features¶
Based on the GitHub README and package.json, the verified capabilities are as follows:
- New “Global Rules” tab in Settings: Loads the current content of
~/.dsh/AGENTS.mdupon opening - Edit and save, effective immediately: New sessions read the new content directly in their first step; after the next file operation in the current session, DSH injects “Updated instructions from: ~/.dsh/AGENTS.md”, and the model executes according to the new rules
- Auto-create if file does not exist: The first save creates
~/.dsh/AGENTS.md - Zero build: The client-side is a hand-written
__ModuleLoader__bundle, and the host-side is pure Node ESM
How It Works¶
The plugin is divided into Host and Client layers:
- Host (
lib/index.js): Registers two HTTP routes:GET /global-rules(read file) andPOST /global-rules(write file, with same-origin validation and a 256 KiB limit) - Client (
lib/client.js): Useswindow.__ModuleLoader__.loadto bundle and registers the “Global Rules” page insettings.section - Effective mechanism: The dynamic detection of the
user-globalscope is handled by DSH’s built-indsh-agent-instructions, so the plugin does not need to implement hot-reload itself
Directory structure:
dsh-global-rules/
├── cordis.patch.yml # Bundle patch: inserts the global-rules layer
├── lib/
│ ├── index.js # Host: HTTP routes (Node ESM)
│ └── client.js # Client: Settings page UI (__ModuleLoader__ bundle)
└── package.json
Installation and Enabling¶
First, install the plugin, then restart the web service.
Install from the DSH plugin directory:
dsh plugin --profile web add dsh-global-rules
Install from GitHub source (alternative):
dsh plugin --profile web add github:badai147/dsh-global-rules
After installation, restart dsh web, and open Settings → Global Rules in the interface to use it.
Typical Usage¶
- Open Settings → Global Rules
- Edit the rule content (in Markdown format, consistent with
AGENTS.mdsyntax) - Click “Save”
How the saved content takes effect:
- New sessions: Read the new content directly in their first step, taking effect immediately
- Current session: After the next filesystem tool call, DSH detects the file change and injects an update prompt; the model then executes according to the new rules
Use Cases and Notes¶
Who Is It For
- Developers who primarily use the DSH Web interface and wish to centrally manage global instructions
- Users who need to standardize coding style, response language, or project constraints across all sessions and want to avoid frequently switching to the terminal to edit
AGENTS.md
Precautions Before Use
- The plugin reads and writes
~/.dsh/AGENTS.mdwith the currentdshprocess permissions; it is recommended to review the source code and MIT License before installation - Writes are limited to 256 KiB; rule content should remain concise
- This plugin comes from the DSH community directory SkillHub and is not officially affiliated with DeepSeek / High-Flyer
Conclusion¶
dsh-global-rules integrates global rule editing into the web settings panel. Combined with DSH’s built-in dynamic detection, it aligns the maintenance of AGENTS.md with the web workflow. If you are already using DSH Web, you can install it using the commands above and manage global rules directly in the settings.