rj-jiangyichen/dsh-rules
Claude Code rules.md-style rule prompts: activate rule markdown files by glob-matching the files an agent reads or edits, with prompt injection and ordering support.
Glob-activated rule prompts for DeepSeek Harness — a Claude Code rules.md / # Path:-style mechanism. Each rule declares glob patterns and, when the agent reads or edits a matching file, the rule activates and its content (any prompt or markdown document) is injected into the conversation as a superseding <rules> snapshot. Rules can be plain files (.dsh/rules/*.md) or # Path: sections inside CLAUDE.md / AGENTS.md. Active rules are visible and durable — injected as a user message the UI shows as a collapsible row (for example dsh-rules · Active rules: typescript, docs) and persisted in the session log — and rendering is byte-budget bounded (32 KB default), dropping low-priority rules first and then truncating the last, with content escaped so it cannot break out of the framing tags. On session resume the last snapshot and its matched files are restored from the log, preventing duplicate injection.
Install
dsh plugin --profile desktop add dsh-rulesREADME Installation section quoted verbatim (the README's own example profile is desktop); its update form is dsh plugin --profile desktop update dsh-rules and its local-checkout form is dsh plugin --profile desktop add . from the repo root. Registry-verified live 2026-09-15: dsh-rules latest 0.1.3 (published 2026-09-13), repository field github.com/rj-jiangyichen/dsh-rules.
Compatibility
The README states it works in every DSH deployment (desktop / web / tui / headless / custom profiles). Glob matching uses picomatch-style patterns (**, *, ?, {a,b}, [abc], ! negation). Deployments with includeRuntimeContext: false are unaffected because the plugin injects its own message.
Details
- Repo: rj-jiangyichen/dsh-rules
- Category: Development & Runtime
- Stars: 0
- Version: npm dsh-rules 0.1.3 (registry-verified 2026-09-15)
- Last push: 2026-09-21
- First seen: 2026-08-16
Recent updates
The README documents the mechanism and its configuration rather than a release-by-release changelog; the latest version on the registry when checked on 2026-09-15 was 0.1.3, published 2026-09-13.
FAQ
- How do I install it?
- The README's command is dsh plugin --profile desktop add dsh-rules (use your own profile name); a local-checkout form and Windows junction guidance are also documented.
- Where do rules live?
- Per the README: .dsh/rules/.md in the workspace, optional user-level ~/.dsh/rules/.md, or # Path: sections inside CLAUDE.md / AGENTS.md.
- Are active rules visible?
- Yes — they are injected as a user message shown in the chat as a collapsible row (e.g. dsh-rules · Active rules: typescript, docs) and persisted in the session log, and on resume the last snapshot is restored to avoid duplicate injection.
Alternatives
863683348/dsh-plugin-gate · ai-eks/dsh-auth-tunnel · Airmetro/dsh-update-checker