Introduction¶
When developing agents or model inference pipelines with DeepSeek Harness (DSH), prompt iterations happen frequently. Developers often need to determine whether the differences between two prompt versions introduce new behaviors or risks, and accordingly supplement regression test cases. Existing static diff tools mostly focus on text content, lacking analysis of the impact on inference behavior and case recommendations.
What It Is¶
dsh-prompt-diff is a DSH plugin that diffs two prompt versions and provides recommended regression test cases. Built on dsh-guard-core, it identifies prompt changes through static checks and outputs the matched rules along with their source locations.
Core Features¶
- Compare differences between two prompt versions
- Output matched rules with source references (file:line)
- Provide recommended regression test cases
- Support HTML report output
Installation & Enablement¶
Install the plugin in a DSH environment:
dsh plugin --profile web add @deepwhale-cn/dsh-prompt-diff
You can also install it via npm:
npm i @deepwhale-cn/dsh-prompt-diff
Or install directly from this repository:
dsh plugin install ./
Typical Usage¶
Run in your project directory:
npx @deepwhale-cn/dsh-prompt-diff --root <project_dir>
Built-in sample demo:
npx @deepwhale-cn/dsh-prompt-diff --demo
List criteria and regulatory sources:
npx @deepwhale-cn/dsh-prompt-diff --list-rules
Generate an HTML report:
npx @deepwhale-cn/dsh-prompt-diff --html r.html
Use Cases & Notes¶
This plugin is suitable for scenarios that require comparing prompt changes and assessing potential risks. Notes:
- The plugin runs with the current dsh process permissions
- It is recommended to review the source code and license before installation
- The current rule set and known boundaries are still TODO; pay attention to updates when using
Summary¶
dsh-prompt-diff provides diff detection and regression test case recommendations for prompt iterations, helping developers more systematically assess the impact of changes. For more details, refer to:
- Directory page: https://www.skillhub.cn/plugins/feely0208/dsh-prompt-diff
- GitHub: https://github.com/feely0208/dsh-prompt-diff