DeepSeek Harness (DSH) provides a plugin architecture that allows developers to manage prompts with fine-grained control. dsh-granular-prompt is a plugin for prompt composition management. It provides a mechanism for viewing, suppressing, replacing, and restoring individual parts of system prompts in real time, and it supports custom system prompts and a persona library.
Positioning¶
This is a client-side plugin maintained by joao-paulo-santos. It does not change the underlying logic, but instead provides visual prompt editing and management through the “Prompt” tab in “Granular Settings” and the “Persona Picker” in the chat editor.
Core Features¶
1. Real-time Prompt Inventory
In the Prompt tab of Granular Settings, it lists all system prompt parts included in the request that is about to be sent. Each part supports actions to view the full text, disable it, replace it (based on the Scratchpad), and restore it.
2. Custom System Prompts
Library management is supported. It provides “Addition Mode” and “Full Mode”. In Full Mode, the text entered by the user becomes the entire prompt (subject to registry enforcement).
3. Persona Library and Picker
A global default persona and per-session selection are supported. The chat editor includes a persona picker for quickly switching the persona used in the current session. The resolution logic is: session settings > default persona > none.
Installation and Enablement¶
The plugin requires checking out the DeepSeek Harness source code and specifying a profile (web is used in the example).
- Ensure the dependencies are installed:
dsh-granular-settings,dsh-scratchpad(required for the UI), and the optionaldsh-event-relay. - Run the installation command:
pnpm dsh plugin --profile web add ~/dsh-plugins/dsh-granular-prompt
- Restart Harness, and the Prompt tab will be available in Granular Settings.
Typical Usage¶
- View the prompt that will be sent: Open the Prompt tab in Granular Settings. It displays the prompt composition of the next request in real time.
- Replace or disable a specific part: Check the Suppress checkbox for a part to remove it. Use the Replace feature to select text from the Scratchpad to override that part.
- Customize system prompts: Add content to the Persona or System Prompt library and select it in the chat interface to make it effective. If “Full Mode” is used, you must provide the complete prompt text.
Applicable Scenarios and Notes¶
- Runtime permissions: The plugin runs with the permissions of the current DSH process.
- Dependency check: Before installation, confirm that the dependencies (especially
dsh-scratchpad) are correctly linked; otherwise, the UI may not activate. - Data storage: Configuration is stored in the
~/.dsh/settings/prompt-manager.directory.
This plugin solves the invisibility problem in the DSH prompt assembly process through a visual interface, making it suitable for developers who need precise prompt control or debugging. For more details, see the GitHub repository: link.