dsh-persona
dsh-persona is a DeepSeek Harness dual-end plugin that adds a configurable collaboration-style layer to model requests. It is built for people installing or using DSH Web, with a small settings page for choosing how the coding agent communicates.
The plugin contributes one collaboration-oriented system prompt section at order 5, after DSH's core identity and deployment persona prefix. It guides task ownership, evidence-based work, progress reporting, and tone; DSH still owns the core prompt, tool policy, safety rules, and runtime behavior.
What It Adds
- Profile-backed
dsh-persona plugin settings for the selected style and shared prompt.
- A host-side system prompt section named
dsh-persona:style.
- A DSH Web settings section for style configuration while the plugin row is running.
- Two built-in style options shown in Chinese:
友好协作 and 务实直接.
- An editable common prompt block that is prepended to the selected style.
The current UI intentionally does not include a final injected-prompt preview. Users configure the shared block and chosen style separately; the host renders the final prompt section at request time.
Install
Requires Node.js 22 or newer. The compatibility baseline is DSH 0.2.0-rc.2, matching the development dependencies. The CI Web smoke test uses the same release to verify package installation and startup.
Install the plugin into the DSH Web profile from the repository:
dsh plugin --profile web add github:Diluka/dsh-persona
Restart the DSH Web profile so the Cordis patch mounts the plugin, then open the existing DSH Web GUI.
If the package is later published to npm, it can be installed by package name with the same profile target:
dsh plugin --profile web add dsh-persona
Settings Page
Use the dsh-persona component row in the DSH Plugins manager to start or stop the plugin. While the row is running, open DSH Web and go to:
Settings -> 沟通风格
Depending on the active UI language or navigation labels, the section may also appear as Communication Style.
The dedicated page currently provides:
preset: stores the selected built-in style.
- style selector: uses a DSH-style dropdown trigger instead of the browser's native select control.
- style prompt preview: shows the complete read-only style prompt directly after the selector.
shared: edits the common prompt block applied before the style; this editor appears at the end.
- reset action: restores the inherited common prompt (the plugin default unless the composition supplies one); save to apply it.
Changes are persisted through the selected profile's DSH Settings forms and apply to subsequent model requests. If an agent preset registers a complete system-prompt section, DSH intentionally omits additional sections, including this style layer; the plugin does not bypass that preset contract.
Runtime Storage
Runtime options live in the profile's dsh-persona plugin entry and are edited through DSH Settings forms. The root Config is marked volatile so edits update the prompt layer without a restart.
Composition defaults may still be supplied when mounting the plugin:
- id: dsh-persona
name: dsh-persona
config:
preset: pragmatic
shared: |-
# Work Presentation
- Keep the user clearly informed about ongoing actions without unnecessary detail.
Settings-page edits persist to the selected profile's Cordis composition. Clearing an override restores the value inherited from the composition.
Safety And Scope
dsh-persona is a style layer, not a control plane for agent behavior.
- It appends one additional system-prompt section; it does not replace DSH's core prompt.
- It guides completing authorized work, asking focused questions, using evidence, validating changes, and communicating results.
- It does not implement memory, preference learning, chat history distillation, or long-term user profiling.
- It does not grant tools, change sandbox or approval policy, or widen file/network access.
- Built-in style text is read-only so installed behavior remains predictable; users customize the shared block instead.
The effective authority remains with DSH's host composition, active agent configuration, tool definitions, sandbox policy, approval policy, and model routing.
Styles
The default common prompt encourages Codex-like collaboration habits using DSH's available tools and interaction features:
- Carry implementation requests through inspection, changes, relevant checks, and a clear result; respect question, review, and planning-only requests.
- Make routine, reversible decisions from context and keep working within existing authorization. Ask when a consequential choice or required approval is unresolved.
- Preserve the objective and completed work across follow-ups; recover from failures using evidence and report real blockers.
- Inspect relevant source, batch independent work when supported, keep changes scoped, and preserve unrelated user edits.
- Give concise progress updates and distinguish completed work, observed validation results, and remaining uncertainty.
The style selector changes tone while retaining the same shared work guidance:
friendly / 友好协作: warm, patient explanations and approachable collaboration, without routine praise or extra confirmation steps.
pragmatic / 务实直接: direct conclusions, concrete recommendations, and concise discussion of relevant tradeoffs.
These prompts guide behavior; they do not reproduce Codex's runtime or guarantee the same model performance. DSH's active mode, tool availability, and approval rules continue to apply.
An explicitly configured shared value, including an empty string, is preserved when upgrading. Profiles without a shared value use the new default automatically. For a profile with a saved override, retain any custom instructions you still need, then use 恢复默认共通提示词 (Reset shared prompt) in Settings -> 沟通风格 and save. Reset restores the inherited composition value, falling back to the installed plugin's default; if the composition itself supplies an older shared block, update or remove that composition value to adopt the new default.
The DSH component-row switch is the no-style-layer case; the plugin Config contains only the selected style and shared prompt.
Architecture Overview
This repository is a DSH plugin package, not a standalone web app.
- Host entry: registers settings-backed runtime behavior and contributes the rendered
systemPrompt section.
- Prompt model: keeps shared/style rendering logic separate from DSH side effects.
- Client entry: registers a
settings.section UI inside DSH Web, reads the dsh-persona entry through configForms, and writes only volatile fields.
- Profile patch: mounts the plugin into a DSH composition with optional defaults.
At runtime the host reads the volatile plugin Config, combines the common prompt block with the selected read-only style prompt, and appends the result as a style section for future model requests. The client edits profile configuration only; it does not own prompt injection.
Uninstall
Remove the plugin from the DSH Web profile:
dsh plugin --profile web remove dsh-persona
Restart the DSH Web profile after removal so the composition no longer mounts the plugin.
The style options are part of the profile's plugin configuration rather than a separate runtime settings store. Any remaining composition defaults or overrides are governed by that profile's Cordis patch.
Development And Verification
Install dependencies and run the project checks:
pnpm install --frozen-lockfile
pnpm check
Verify package contents without publishing:
pnpm pack:dry-run
Tests cover pure prompt logic, mocked Host wiring, real Cordis/system-prompt registration, volatile Config resolution, settings-form policy cleanup, literal {{...}} text, and complete-prompt precedence.
CI packs the plugin, installs that tarball into a temporary DSH Web profile using DSH 0.2.0-rc.2, starts dsh web, and fails if the server does not become reachable or exits early. This smoke test proves package installation and server startup, not browser interaction.
Useful local validation flow:
- Install or link the plugin into a DSH Web profile.
- Restart that DSH profile so the Cordis patch is mounted.
- Open the existing DSH Web GUI, normally
http://127.0.0.1:3080.
- Confirm the DSH Plugins manager shows
dsh-persona as running and Settings -> 沟通风格 is available.
- Choose a style, edit
shared, and verify subsequent model requests reflect the style layer.
- Disable the
dsh-persona component row in the DSH Plugins manager and confirm the settings page and style layer disappear; re-enable the row to restore them.
Do not validate this package by starting a replacement Vite server; DSH Web provides the runtime boot context for the plugin.
Current Scope
Included now:
- global DSH style prompt layer;
- profile-backed
preset and shared configuration in dsh-persona;
- dedicated DSH Web settings section while the component row is running;
- DSH-style custom dropdown for choosing a style;
- editable common prompt block with reset;
- read-only
friendly and pragmatic style prompts;
- Chinese style labels
友好协作 and 务实直接;
- no final injected-prompt preview in the settings UI.
Deferred until there is a concrete need:
- custom user-created styles;
- import/export of style packs;
- per-agent, per-session, or per-workspace overrides;
- prompt diff/history UI;
- memory or preference-learning features;
- richer browser E2E coverage against a running DSH profile.