AI Agent Hub
Back to plugins
dsh-rule-lens preview

dsh-rule-lens

admin-security Updated 2026.09.12

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