dsh-rule-lens
Run the following command in DeepSeek Harness:
dsh plugin install jackeyunjie/dsh-rule-lens
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install jackeyunjie/dsh-rule-lens in your DeepSeek Harness terminal to install the plugin; the source code is available at https://github.com/jackeyunjie/dsh-rule-lens .
About this plugin
Rule files for DeepSeek Harness tend to scatter across ~/.agents/, /.agents/rules/, /rules/, .cursor/rules/ and other layers, making it hard to tell which rule is in effect, who overrides whom, or whether the model actually complies. dsh-rule-lens pulls that chain back into view: at session start it injects layers in L1 through L5 order, loads L5 on-demand the first time a subdirectory is touched, and when the token budget is exceeded it evicts from the widest scope first, logging every decision so no injection is silent.
The plugin ships FORBID hard blocks (a single line like FORBID: write *.env instantly denies matching tool calls), write-back protection (intercepts full-file overwrites of existing .md files and steers the model toward targeted edits), a four-point rule lint (overly long, missing prohibition verbs, reads like a tutorial, duplicated content), and persistent compliance tracking via log.jsonl and compliance.jsonl that the web panel can export at a glance.
If you maintain rule files across multiple projects or directory layers, need an auditable compliance trail, or want zero-runtime-dependency, locally hosted rule governance, dsh-rule-lens is the observability kernel of the RuleScope family.
Screenshots
Use Cases
- Need to confirm which multi-layer rule takes precedence
- Want rule compliance with traceable injection and denial reasons
- Want to inspect rule quality, budget, and compliance in a local panel
Best For
- AI engineering teams maintaining multi-project rule files
- Admins who need to audit model rule behavior
- Users who want FORBID hard rules to reduce risky operations
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.