About this project
## What this is
The DSH Web plugin "Prompt Optimizer" (dsh-prompt-optimizer) 0.6 mainline, current version 0.6.8-beta.2. It intercepts a message before the user presses Enter to send it, clarifies "what exactly is wanted this turn," and hands that understanding to the downstream working AI. Its design positioning is "evidence porter + gap filler": it does not rewrite the user's original words, only supplements the evidence relevant to this request from [original words] [session context] [project files] into a command that lets downstream get it right in one pass.
## Main capabilities
- **Each turn independently produces its goal**: at the start of each turn, the previous turn's entries are retired as a whole (archived, not deleted); this turn's content is derived anew only from this turn's original words and the context read in this turn, with no cross-turn inheritance.
- **Verbatim evidence**: facts may only come from the context or files actually read this time; merely having listed a directory does not count as knowing its contents; a factual assertion without a source is treated as a defect.
- **Control interface**: tier (off/light/standard/heavy), permissions, optimization model, context (turns 0-10 / full-text toggle), read-only tool toggle, plus a `?` user manual.
- **Interception overlay**: split into a thinking layer and an output layer; the thinking layer has a fixed display range, no scrollbar, and does not truncate its body text; a persistent action bar at the bottom (confirm submit / regenerate / roll back / release / retry).
- **Real token usage**: uses the provider-reported three components of input/output/cache, records k/M above one thousand, shows `—` when missing, and does not estimate.
- **Interface language follows DSH**: if DSH is set to Chinese, everything is in Chinese; if set to English, everything is in English; switching takes effect immediately.
## Tiers and permissions
Tiers are equivalent to an evidence budget: off = no interception at all; light = only original words + context; standard = reads project files as needed to verify; heavy = deep reading and cross-checking, with each change carrying its source. Permissions are divided into "requires review" (output is editable, sent after confirmation) and "automatic output" (sent as soon as optimization completes; on failure it is still sent as the original text). The context reading scope is determined only by "turns / full text"; when over budget, only the presentation is compressed, not the scope, and what was compressed is stated explicitly.
## Installation and running
Install via `dsh plugin --profile <profile> add <tarball or repository address>`, and register the package name in the profile's `dsh.profile.bundles`; you can also use a profile patch to insert an entry, but you may choose only one of the two methods, otherwise it reports `duplicate loader entry id`. The plugin has zero runtime dependencies and requires no build. The 0.6 line targets dsh-0.1.6-alpha.1 (0.1.5-rc.1 also runs), does not share configuration with the 0.5 line, and should not be installed into the same profile.
## Privacy and boundaries
Optimization requests send the input text and the session context read according to settings; when read-only permission is enabled (enabled by default), the standard/heavy tiers use read/glob/grep to read project files within this session's working directory, without writing to disk or executing commands. The session, working directory, and downstream form are parsed only once; if they cannot be parsed, it does not guess and degrades to a pure restatement of requirements. The mini window sends no messages by default; only the three paths of confirm submit, automatic output, and release hand back to the official send pipeline. The plugin is a client + host local plugin and does not introduce third-party services.
## License
BSD-3-Clause, fully open source; use, modification, Issues, and PRs are welcome.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.