返回目录
Agent 与会话 插件

dsh-prompt-drift

zhengqiuyang/dsh-prompt-drift

System-prompt surface drift gate for DeepSeek Harness — sections any plugin contributes are hashed and baselined; silent rewrites fail loud

Stars
0
Forks
0
Issues
0
更新
8 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:zhengqiuyang/dsh-prompt-drift

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-prompt-drift

System-prompt surface drift gate — sections any plugin contributes are hashed and baselined

CI npm license

dsh plugin --profile default add github:zhengqiuyang/dsh-prompt-drift

If this helps you, please give it a star — it helps others find it.

Part of the DSH trust layer — ten deterministic checks, no LLM in the trust path.

System-prompt surface drift gate for DeepSeek Harness (dsh).

Any plugin or preset can contribute sections to the assembled system prompt. Upgrading one can silently rewrite what the model is told; a malicious one can inject "ignore all safety rules" straight into the prompt. This plugin hooks the system-prompt/assemble waterfall, hashes every section (name → sha256(text)), baselines the surface, and diffs every later assembly against it. dsh-mcp-test guards what the model can call; this guards what the model is told. Zero LLM calls in the trust path.

Why now (checked 2026-10-12)

Empty lane. The nearest neighbour (dsh-modelprint, 0★) fingerprints model config, not the prompt surface. Prompt-injection plugins scan content flowing in; nobody watches the assembled prompt itself — the one channel every plugin can write to without anyone reviewing a diff.

How it works

system-prompt/assemble ──> sections [{name, sha256(text)}] name-sorted
                     ──> baseline absent? freeze it (commit the file)
                     ──> diff: added / removed / changed sections
                     ──> warn once per distinct drift (signature dedup)

Dynamic sections (cwd, timestamps) can be excluded via ignoreSections. Baseline file is stable, name-sorted JSON — commit it; it is the contract.

Install

dsh plugin --profile default add github:zhengqiuyang/dsh-prompt-drift

Prebuilt lib/ ships in the repo — git installs need no build step and no allowBuilds authorization.

Configure

- id: dsh-prompt-drift
  name: dsh-prompt-drift
  config:
    baselinePath: .dsh-prompt-drift/baseline.json
    rebaselineOnDrift: false
    ignoreSections: []

Compatibility

  • DSH: verified against the 0.2.x line (source snapshot 0.2.1-alpha.2); installs on any profile via dsh plugin add (prebuilt lib/, no build approval).
  • Node: >= 20 (CI matrix: Node 20/22/24 on Ubuntu and Windows).
  • Disposable-profile evidence (2026-10-19): dsh plugin --profile <fresh> add github:zhengqiuyang/dsh-prompt-drift → installed in 30s; boot shows [dsh-prompt-drift] active: …; dsh plugin --profile <fresh> remove dsh-prompt-drift → dependencies cleared, bundles restored.

Develop

npm install && npm test

Kill criteria

If dsh ships first-party prompt-surface pinning, this freezes at its last working version with a postmortem here.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类Agent 与会话
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: system-prompt。