dsh-plain-talk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,16 @@
1
- # 0.1.0
2
-
3
- - 输入框「说人话」开关:按会话记录,状态写入 `$DSH_HOME/plain-talk.json`,重启后保留。
4
- - 系统提示词区段:结论先行、默认 ≤12 行 / 300 字、禁回指、引用必须贴原文、代号首现解释、语言跟随用户。
5
- - `plain_talk_check`:发送前自检,报回指、内部信息、只给指针的引用、未解释代号、长度与列表问题。
6
- - `plain_talk_vocab`:读取与维护用户词汇清单,分常识 / 专业 / 项目 / 内部代号 / 待归类五类。
7
- - 「调研 X」两阶段学习:第一次回复把 X 当作未知,回合结束后才写入词汇清单。
8
- - `PLAIN_TALK_DEFAULT=off` 可让新会话默认关闭,用于基准测试或按需开启的用法。
9
- - 不写 session 事件;只写两个 sidecar JSON 文件。
1
+ # 0.1.1
2
+
3
+ - README 重写:只保留用户需要的信息,删除 npm 发布与收录流程说明。
4
+ - 输出对比改为左右并列表格,场景重排为 A / B / C。
5
+ - 示例代号改为中性占位符(EXP-7、DEV-1K、run-3),规则与自检提示同步。
6
+ - README 顶部加入 banner。
7
+
8
+ # 0.1.0
9
+
10
+ - 输入框「说人话」开关:按会话记录,状态写入 `$DSH_HOME/plain-talk.json`,重启后保留。
11
+ - 系统提示词区段:结论先行、默认 ≤12 行 / 300 字、禁回指、引用必须贴原文、代号首现解释、语言跟随用户。
12
+ - `plain_talk_check`:发送前自检,报回指、内部信息、只给指针的引用、未解释代号、长度与列表问题。
13
+ - `plain_talk_vocab`:读取与维护用户词汇清单,分常识 / 专业 / 项目 / 内部代号 / 待归类五类。
14
+ - 「调研 X」两阶段学习:第一次回复把 X 当作未知,回合结束后才写入词汇清单。
15
+ - `PLAIN_TALK_DEFAULT=off` 可让新会话默认关闭,用于基准测试或按需开启的用法。
16
+ - 不写 session 事件;只写两个 sidecar JSON 文件。
package/README.en.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # dsh-plain-talk
2
2
 
3
3
  <p align="center">
4
- <img src="https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/icon.svg" alt="dsh-plain-talk" width="72" height="72">
4
+ <img src="https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/assets/banner.jpg" alt="dsh-plain-talk — 说人话" width="100%">
5
5
  </p>
6
6
 
7
7
  <p align="center">
@@ -16,19 +16,19 @@
16
16
 
17
17
  A reply-shaping plugin for DeepSeek Harness: one composer switch. When it is on, replies lead with the conclusion, stay under 12 lines by default, paste the text they cite, gloss an opaque code the first time it appears, and stop re-explaining words you already use.
18
18
 
19
- > It shapes replies only. It does not plan work, does not set acceptance criteria, and writes no session events.
20
-
21
19
  ## What it does
22
20
 
23
21
  - **Conclusion first.** The first line is the answer or the verdict. No restating the question, no "let me take a look".
24
22
  - **Short by default.** ≤12 lines / 300 characters unless you ask for depth.
25
- - **Standalone.** No "as mentioned above" / "the previous step"; codes such as `M11`, `dev-1200`, `c590` get a one-line gloss at first use.
26
- - **Citations you can read.** A `file:line` reference is always accompanied by the quoted lines.
27
- - **User vocabulary.** Words you have used, project names and common terms count as known. "Research X" is the exception: X stays unknown for the first reply, then joins the vocabulary.
23
+ - **Standalone.** No "as mentioned above" / "the previous step"; codes such as `EXP-7`, `DEV-1K`, `run-3` get a one-line gloss at first use.
24
+ - **Citations you can read.** A `file:line` reference always comes with the quoted lines.
25
+ - **User vocabulary.** Words you have used, project names and common terms count as known; "research X" still explains X on the first reply, then remembers it.
28
26
 
29
27
  ## Results
30
28
 
31
- Environment: DeepSeek Harness `desktop` profile running headless, model `cmc/deepseek/deepseek-v4.1-flash` (high), 2026-11-04. Same prompt, same workspace, only the switch changes; the vocabulary is reset before each arm.
29
+ Environment: DeepSeek Harness `desktop` profile running headless, model `cmc/deepseek/deepseek-v4.1-flash` (high), 2026-11-04. Same prompt, same workspace, only the switch changes; the vocabulary is cleared before each arm.
30
+
31
+ ### Summary
32
32
 
33
33
  | Scenario | Metric | Off | On | Change |
34
34
  |---|---|---|---|---|
@@ -36,72 +36,49 @@ Environment: DeepSeek Harness `desktop` profile running headless, model `cmc/dee
36
36
  | | output tokens | 2,333 | 1,344 | **−42%** |
37
37
  | | tool calls | 12 | 11 | −1 |
38
38
  | | elapsed | 131 s | 107 s | −24 s |
39
- | C. Explanation | final reply chars | 410 | 350 | **−15%** |
39
+ | B. Explanation | final reply chars | 410 | 350 | **−15%** |
40
40
  | | output tokens | 732 | 326 | **−55%** |
41
41
  | | cross-turn references | 2 | 0 | **−2** |
42
- | D. Report rewrite (turn a draft into a user-facing report) | final reply chars | 558 | 496 | **−11%** |
42
+ | C. Report rewrite (turn a draft into a user-facing report) | final reply chars | 558 | 496 | **−11%** |
43
43
  | | output tokens | 2,781 | 3,066 | +10% (one extra self-check round) |
44
44
  | | unexplained codes | 6 | 0 | **−6** |
45
45
  | | pointer-only citations | 1 | 0 | **−1** |
46
46
 
47
- Total input tokens (system prompt + tool schemas + every step): A 1,832,985 → 1,572,409; C 260,351 → 260,940; D 1,570,662 → 1,573,950. That number tracks the number of steps and tools, not the rules section.
48
-
49
- The rules section costs about **+589 tokens per step** (measured on the single-step C run). Mode on is not free, and this README says so.
50
-
51
- ### D: the same draft, two rewrites
52
-
53
- The draft deliberately contains `M11`, `dev-1200`, `c590`, `G18/G19`, "上述", "上一轮", and a `reports/m11/summary.md:42` pointer with no quoted content.
54
-
55
- **Off**
56
-
57
- ```text
58
- 结论:M11(新加的实例校验模块)这次不合并。加了它的 G19 定位精度 61.2% → 63.8%,涨 2.6 个百分点,没到 3 个点的门槛。这是跑完实测后的决定,不是"无法评估"。
59
-
60
- 但对外的版本里有两个数字打架,得先查。
61
-
62
- 一是开头写"没有带来定位精度提升",和后面的 +2.6pp 冲突,应改成"有提升,但不够门槛"。
63
-
64
- 二是 1198/1200 条预测逐字节相同。只剩 2 条不同,最多撬动 0.17 个百分点,凑不出 2.6pp。这两个数至少错一个,而 2.6pp 又刚好卡在门槛下面,不解决这个矛盾,结论就站不住。
65
-
66
- 另外缺三样:AUROC(排序质量指标)只写了见 reports/m11/summary.md:42,没给数值,文件也不在当前目录;分片合并的结果本身不是 claim-eligible EvalRun(可引用评测记录),要注明是方向性对照;没有置信区间,n=1200 时 2.6pp 约等于 31 条样本的差异,是否显著未知。
47
+ The rules section costs about +589 input tokens per step (single-step, zero-tool B run: 260,351 → 260,940).
67
48
 
68
- 你现在就能做的:跑一次全量逐条 diff,确认到底是"1198/1200 相同"还是"+2.6pp"准确,顺带查为什么 B1/B2 两个 bug 修完预测只变了 2 条;把 AUROC 数值补进报告。如果精度确实只有 2.6pp,round10 先别跑。
69
- ```
70
-
71
- **On**
72
-
73
- ```text
74
- 结论:M11(给推理流程加“实例验证”一步的实验)没达到合并门槛,不合并。
75
-
76
- - dev-1200(1200 条开发集)上定位精度 61.2% → 63.8%,+2.6 个百分点,合并线 3 个百分点。
77
- - 对照批次是 c590:G18(基线,配置名 G18_region_gate_v3)对 G19(G18 加 m11_instance_verify 这一步,保留更早两轮的 m9/m10)。同 manifest(SHA-256 26e3406e…)、seed 42、代码 71e6489,4×V100 分 4 片各 300 条合并成 1200。
78
- - 这是实测对照,不是跑不出来:1200 条里 1198 条预测逐字节相同;B1/B2 两个 bug 已修复。
79
- - 口径瑕疵:分片合并的结果不算可入库的 EvalRun,只能说明分母、manifest、seed 一致。
80
- - AUROC 没有可核对的数值:草稿指向的 reports/m11/summary.md 不在仓库里,这条不引。
81
-
82
- 下一步:补出 summary.md,或开 round10(下一轮实验)用单个全量 run 复核 G19。
83
- ```
49
+ ### A. Completion task
84
50
 
85
- The switch glosses `M11`, `dev-1200`, `c590`, `G18`, `G19` and `round10` in place, replaces "上述设置" with the actual setting, drops the pointer-only citation, and closes with exactly one next step. The off arm keeps `AUROC`, `pp` and `round10` unexplained.
86
-
87
- ### C: explanation
51
+ | Aspect | Off | On |
52
+ |---|---|---|
53
+ | First line | 任务完成,产物都在 `bench-demo/` 目录: | 已达标:`bench-demo` 下四个文件已就位,运行脚本输出 `ABC`。 |
54
+ | Artifacts | `a.txt`, `b.txt`, `c.txt` hold A, B, C; `check.mjs` reads them in order and prints the joined result | Each file holds exactly one line; `check.mjs` reads, joins and prints, measured output `ABC` |
55
+ | Reader check | Run `node check.mjs`; output `ABC`, exit code 0. | Run `node check.mjs` in `bench-demo`; expect one line `ABC`. |
56
+ | Chars / output tokens | 144 / 2,333 | 189 / 1,344 |
88
57
 
89
- Off: 410 chars, 2 cross-turn references, 732 output tokens. On: 350 chars, 0 cross-turn references, 326 output tokens. The on version also replaces "lost in the middle" jargon with a one-line explanation of what it means.
58
+ ### B. Explanation
90
59
 
91
- ### A: completion task
60
+ | Aspect | Off | On |
61
+ |---|---|---|
62
+ | Paragraph 1 | 多数人以为这只是"上下文窗口不够长",其实窗口够长也会忘。一是截断与压缩……二是注意力是软检索……三是位置编码在超长距离上外推能力下降。 | 简单说,模型没有"记忆",它每次回答只能看到当前上下文窗口里的全部 token;窗口塞满后,早先的对话要么被截断、要么被压缩成摘要。 |
63
+ | Paragraph 2 | 再往深一层,是训练目标没给"长期记忆"发工资。预训练是逐 token 预测,几乎不惩罚"忘了前面说过什么"…… | 另一层原因是训练时的分布。模型主要在短文本上学习长距离依赖,真到几万 token 的跨度,关联能力本来就弱…… |
64
+ | Cross-turn references | 2 | 0 |
65
+ | Chars / output tokens | 410 / 732 | 350 / 326 |
92
66
 
93
- Off: 144 chars. On: 189 chars, but the first line is a verdict ("已达标") and it adds a step the reader can run; output tokens drop from 2,333 to 1,344.
67
+ ### C. Report rewrite
94
68
 
95
- ### Reading the numbers honestly
69
+ The draft contains codes, cross-turn wording and a pointer-only citation. Project codes are replaced with neutral placeholders in this example.
96
70
 
97
- - Output tokens fell in two scenarios (−42%, −55%) and rose in one (+10%, one extra self-check round). **The plugin does not guarantee fewer tokens in every case.**
98
- - The rules section adds a fixed ~590 input tokens per step; the more turns, the more it costs.
99
- - A fourth scenario (survey) produced an invalid off arm: it stopped after 24 tool calls and returned 87 characters. It is excluded rather than spun.
100
- - Reproduce by running the same model, prompt and workspace twice, switching the composer toggle between the runs; the vocabulary is cleared before each arm.
71
+ | Aspect | Off | On |
72
+ |---|---|---|
73
+ | Verdict line | 结论:EXP-7(新加的实例校验模块)这次不合并。加了它的 CAND 定位精度 61.2% → 63.8%……没到 3 个点的门槛。 | 结论:EXP-7(给推理流程加"实例验证"一步的实验)没达到合并门槛,不合并。 |
74
+ | Codes | EXP-7 and CAND glossed; AUROC, pp, round-2 left bare | EXP-7, DEV-1K, run-3, BASE, CAND, round-2 all glossed in place |
75
+ | Citation | "see reports/exp7/summary.md:42", no quoted content | says the file is not in the repository and drops the citation |
76
+ | Next step | several options in one paragraph | one action |
77
+ | Chars / output tokens | 558 / 2,781 | 496 / 3,066 |
101
78
 
102
79
  ## Install
103
80
 
104
- Requires a DeepSeek Harness version with the `conversation.input.left` slot (0.2.x line).
81
+ Requires a DeepSeek Harness build with the `conversation.input.left` slot (0.2.x line).
105
82
 
106
83
  ```sh
107
84
  dsh plugin --profile desktop add dsh-plain-talk
@@ -109,30 +86,28 @@ dsh plugin --profile desktop add github:lizilong1993/dsh-plain-talk
109
86
  dsh plugin --profile desktop add ./dsh-plain-talk
110
87
  ```
111
88
 
112
- Restart DSH afterwards. `bundles` decides whether it loads; `cordis.patch.yml` is only the config layer.
89
+ Restart DSH afterwards.
113
90
 
114
91
  ## Use
115
92
 
116
- 1. Open any session: a speech-bubble icon appears in the composer tool row, after the permission selector.
93
+ 1. Open any session: a speech-bubble icon appears next to the permission selector in the composer.
117
94
  2. It starts on (blue). Click it to turn it off (grey) for that session only.
118
- 3. State lives in `$DSH_HOME/plain-talk.json`, keyed by session id, and survives restarts.
119
- 4. Want new sessions to start off? Set `PLAIN_TALK_DEFAULT=off` in the environment that launches DSH.
120
-
121
- A failed write rolls the button back, so the UI never claims a state the model did not receive.
95
+ 3. State lives in `$DSH_HOME/plain-talk.json` and survives restarts.
96
+ 4. Want new sessions to start off? Set `PLAIN_TALK_DEFAULT=off` where DSH launches.
122
97
 
123
98
  ## Vocabulary
124
99
 
125
- `$DSH_HOME/plain-talk-vocab.json`, shared across sessions:
100
+ `$DSH_HOME/plain-talk-vocab.json`, shared across sessions.
126
101
 
127
102
  | Category | Meaning | Examples |
128
103
  |---|---|---|
129
104
  | common | built in, never explained | arXiv, DOI, API, GPU |
130
105
  | domain | field terms you have used | diffusion model, AUROC |
131
- | project | repositories, products, workspace names | MechDW, GeoEvidence_V2 |
132
- | internal | experiment/task/commit codes | M11, dev-1200, c590 |
106
+ | project | repositories, products, workspace names | AcmeService_V2, DataHub_V3 |
107
+ | internal | experiment/task/commit codes | EXP-7, DEV-1K, run-3 |
133
108
  | unclassified | recorded, not classified yet | other detected codes |
134
109
 
135
- "Research X" is two-phase: X is marked pending for that session, the first reply still explains it, and the turn end moves it into the vocabulary. Common terms are exempt.
110
+ "Research X" is two-phase: X is marked pending, the first reply still explains it, and the turn end records it. Common terms such as arXiv are unaffected.
136
111
 
137
112
  Maintain it with `plain_talk_vocab` (`list` / `add` / `remove` / `classify`) or by editing the JSON.
138
113
 
@@ -143,84 +118,29 @@ Maintain it with `plain_talk_vocab` (`list` / `add` / `remove` / `classify`) or
143
118
  - errors: cross-turn wording, session/subagent/tool names, pointer-only citations;
144
119
  - warnings: unexplained codes, over 12 lines / 300 characters, lists over 5, preamble, closing offer, English-only reply to a Chinese user.
145
120
 
146
- The section asks the model to run it for completion reports and replies over 12 lines. It advises; it never blocks.
121
+ The section asks the model to run it for completion reports and replies over 12 lines.
147
122
 
148
123
  ## How it works
149
124
 
150
125
  - Host (`dsh/index.js`) registers one `systemPrompt` section (`plain-talk`, order 55) whose text function returns the rules only while that session's switch is on.
151
126
  - Browser half (`lib/client.js`) registers into `conversation.input.left` and renders a 24×24 button.
152
- - Loopback route `/plain-talk/state` (GET/POST, 127.0.0.1/::1 only, 8 KB body limit).
153
- - Two atomic sidecar files; 256 sessions and 2,000 vocabulary terms are bounded.
154
- - No session events are written.
127
+ - The switch is read and written over the loopback route `/plain-talk/state` (127.0.0.1 / ::1 only, 8 KB body limit).
128
+ - Switch and vocabulary are atomic JSON sidecar files; no session events are written.
155
129
 
156
- ## Permissions and data
130
+ ## Data
157
131
 
158
- It writes only those two JSON files. No network, no upload, no credential access. A corrupt state file reads as "no choice recorded".
132
+ Only `$DSH_HOME/plain-talk.json` and `$DSH_HOME/plain-talk-vocab.json` are written. No network, no upload, no credential access. A corrupt state file reads as "no choice recorded".
159
133
 
160
134
  ## Configuration
161
135
 
162
- No profile config; only `PLAIN_TALK_DEFAULT=on|off`.
136
+ Environment variable `PLAIN_TALK_DEFAULT` (`on` / `off`, default `on`).
163
137
 
164
- ## Known limits
138
+ ## Notes
165
139
 
166
- - The button position depends on `conversation.input.left`; a host redesign may move it, without breaking the feature.
167
- - Rules are prompt constraints, not enforcement. `plain_talk_check` warns; it cannot stop a send.
168
- - Vocabulary is per user, not per project.
169
- - Code detection is heuristic: `M11`, `dev-1200`, `c590` are flagged; plain English project names and Chinese terms are not forced into glosses.
170
- - Mode on adds roughly 590 input tokens per step.
171
-
172
- ## Repository contents
173
-
174
- The repository keeps runtime and documentation only: `dsh/` (host), `lib/` (browser), `cordis.patch.yml`, `locale/`, `icon.svg`, both READMEs, `CHANGELOG.md`, `LICENSE`, `package.json`. Test scripts, benchmark data, screenshots and local debugging files are not committed and never enter the npm tarball.
175
-
176
- ## Publishing to npm
177
-
178
- 1. Keep `files` to runtime needs only: `dsh/`, `lib/`, `cordis.patch.yml`, `locale/`, `icon.svg`, `README*.md`, `CHANGELOG.md`, `LICENSE`. Test scripts, screenshots and benchmark data stay out.
179
- 2. Use raw absolute URLs for README images (`https://raw.githubusercontent.com/lizilong1993/dsh-plain-talk/main/...`); a relative path does not render on npm.
180
- 3. Ship the prebuilt client; users never run the build.
181
- 4. Check the tarball before publishing:
182
-
183
- ```sh
184
- npm pack --dry-run
185
- ```
186
-
187
- The current tarball is **14 files / 31.0 kB** (`npm pack --dry-run`, 2026-11-04); re-check after any change so screenshots or test data do not slip in.
188
-
189
- 5. With 2FA enabled, a classic token is rejected with 403. Use an Automation token or a Granular token with "Bypass 2FA":
190
-
191
- ```sh
192
- npm config set //registry.npmjs.org/:_authToken=<token>
193
- npm publish
194
- ```
195
-
196
- ## Listing on awesome-dsh-plugin
197
-
198
- One file is the whole submission: `data/plugins/<owner>__<repo>.yml`.
199
-
200
- ```yaml
201
- # data/plugins/lizilong1993__dsh-plain-talk.yml
202
- url: https://github.com/lizilong1993/dsh-plain-talk
203
- name: lizilong1993/dsh-plain-talk
204
- category: ui
205
- description:
206
- en: 'Composer toggle that shapes replies: conclusion first, inline quotes, no cross-turn references.'
207
- zh: '输入框「说人话」开关:结论先行、引用原文、去掉需要翻前文的表述。'
208
- ```
209
-
210
- Requirements:
211
-
212
- - `package.json` declares `dsh.bundle.patch` and the repo has `cordis.patch.yml` (`dsh.client` alone is not installable).
213
- - The repository is at least one day old and carries the `dsh-plugin` topic.
214
- - Real, working code; accurate description, no marketing; quote a description that contains `: `.
215
- - One PR adds only that file; never edit the generated READMEs or another entry.
216
-
217
- Local pre-check (run inside the upstream `awesome-dsh-plugin` repository; needs `GITHUB_TOKEN`):
218
-
219
- ```sh
220
- git clone https://github.com/awesome-dsh-plugin/awesome-dsh-plugin
221
- cd awesome-dsh-plugin
222
- node scripts/check-submission.mjs --base origin/main
223
- ```
140
+ - The button position depends on `conversation.input.left`; a host redesign may move it beside other left-side controls.
141
+ - Rules are prompt constraints; `plain_talk_check` warns but never blocks a send.
142
+ - Vocabulary is shared per user, not per project; code detection is heuristic.
143
+ - With the mode on, each request carries about 590 extra input tokens.
224
144
 
225
145
  ## License
226
146