Introduction

The DeepSeek Harness (DSH) plugin ecosystem aims to extend the toolset through modular extensions. The narrative-prompt-polish plugin is located under the “Model Reasoning” category and is maintained by shengyvself. It addresses a common pain point: raw drafts are often lacking in clarity and cannot easily be delivered directly to an AI Agent. It polishes prompts by launching a conversational sub-agent, rather than immediately overwriting the text. This plugin requires DSH version ≥ 0.1.5.

Core Features

  1. Main box ✨ → conversational sub-agent polishing
    Click the ✨ in the bottom-right corner of the main box. The server starts a continuable sub-agent under the main session via POST /api/polish.start. The sub-agent inherits the current session’s provider, model, and presets. The client then opens that sub-agent session, entering a multi-turn follow-up phase. Once satisfied, the user manually copies the result back into the main input box.

  2. Option C and Prompt Cache
    By default, it uses full mode, replicating the [system] + [...history] prefix via deriveMessages. This ensures the prefix matches the main session, thereby hitting the prompt cache and only incrementally calculating the draft and polishing instructions. If the main session is not a live session, it falls back to partial (recent conversation) or none (bare draft).

  3. Intent classification and safe write-back
    The plugin includes local regex-based intent classification (debug/implement/explain/chat). Under the CAS (Check-And-Set) mechanism, if the draft is modified by the user during polishing, the plugin refuses to overwrite and shows “Draft changed; polish not applied.”

  4. Trace and event bus
    Each call appends a JSONL trace to lore/traces/prompt-polish/YYYY-MM-DD.jsonl, recording intent, context mode, cache hits, and other information. The plugin supports event bus integration; external modules can trigger a single polish workflow by broadcasting narrative:prompt-polish:trigger.

Installation and Enablement

Installation depends on the sub-agent orchestration service provided by the DSH kernel.

dsh plugin --profile web add github:shengyvself/narrative-prompt-polish

After installation, restart DSH Web for it to take effect. Starting with version 0.2.0, the plugin removed all third-party dependencies.

Typical Usage

  1. Enter a draft in the main box.
  2. Click the ✨ in the bottom-right corner of the input box.
  3. The sub-agent session is opened, and the task brief enters the first round of conversation.
  4. Ask multiple follow-up questions in the sub-agent session to optimize prompt details.
  5. Once satisfied, manually copy the result back into the main input box.

Use Cases and Notes

This plugin is intended to assist prompt optimization and is suitable for developers who need to convert vague requirements into concrete execution instructions.

  • Repository migration: The original repository narrative-prompt-polish has been migrated to dsh-prompt-only-forge; the old repository remains read-only and no longer accepts new commits.
  • UI and security: No rogue DOM injection; the UI uses official slots. There are no static @deepseek-ai/* imports on the server side.
  • Configuration tuning: strictFull: true can be changed to hard fail (no-session); the sidebar floating button was removed in 0.2.0.

Short Conclusion

Through the sub-agent mechanism and Option C, this plugin provides DSH users with intent-aware prompt polishing. For more details and source code, see the plugin directory or GitHub.