Introduction¶
Developers of DeepSeek Harness (DSH) often need to switch between the global configuration (~/.dsh/AGENTS.md) and project-specific rules when configuring agent behavior. Manually maintaining these files can easily cause path errors or conflicting content. The dsh-rule-manager plugin integrates global rule editing, project rule editing, and LLM-based automatic rule splitting into the “Rule Management” entry point in the Web UI, providing a unified operation interface and replacing the previously scattered legacy plugins.
Features¶
The plugin includes the following three core features:
-
Global Rule Editing
Edit~/.dsh/AGENTS.mddirectly from the plugin interface. After saving changes, new sessions take effect immediately; the current session will recognize the changes after the next file operation. -
Project Rule Editing
Select the target workspace from the interface, then edit anyAGENTS.mdfile in that workspace’s root directory or a subdirectory. This is more intuitive than operating directly on the file system and makes cross-project management easier. -
LLM Automatic Splitting
Paste lengthy project rules into the interface, and the LLM will split them into a “concise general outline” and on-demand.dsh/skills/<topic>/SKILL.mdfiles. It supports overwrite or merge modes; before confirming the write, the original file is backed up automatically and a preview is provided.
Installation and Enablement¶
Install this plugin using DSH’s plugin command:
dsh plugin --profile web add dsh-rule-manager
After installation is complete, restart the dsh web service.
Typical Usage¶
- Open Settings → Rule Management in the browser.
- Switch among the three tabs as needed:
- Global Rules: Write general instructions that apply to all projects.
- Project Rules: Select the current workspace and adjust project-specific constraints.
- Automatic Splitting: Paste complex project rules, select a model, preview the split result, and confirm the write.
Notes¶
- Upgrade Compatibility: This plugin merges the functionality of the legacy
dsh-global-rulesanddsh-rule-splitterplugins. If these two legacy plugins are already installed, uninstall them first and then install this plugin to avoid multiple rule entry points. - Content Limits: The rule content limit per operation is 256 KiB, and the timeout is 180 seconds. If the rules are too long, it is recommended to simplify them first before trying again.
- Effect Mechanism: The plugin relies on DSH’s built-in
dsh-agent-instructionsfor dynamic detection. After saving, new sessions load the new rules immediately; the current session needs to wait until the next file operation before refreshing. - Tech Stack: The plugin uses a zero-build approach. The Host side is pure Node ESM, and the Client side is a hand-written
__ModuleLoader__bundle.
Conclusion¶
By combining file-system operations with LLM capabilities, dsh-rule-manager lowers the barrier to maintaining DSH rules. To view the source code or report issues, visit its GitHub repository or community directory.