dsh-fast-mode 1.7.1 → 1.7.2
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/BENCHMARK.md +33 -10
- package/CHANGELOG.md +16 -0
- package/README.en.md +5 -5
- package/README.md +8 -8
- package/client.js +17 -17
- package/docs/REFERENCE.md +13 -11
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/config.js +7 -7
package/BENCHMARK.md
CHANGED
|
@@ -6,6 +6,29 @@
|
|
|
6
6
|
>
|
|
7
7
|
> **口径(1.5.1 起)**:一个单元只在 `exit == 0 && 步数 ≥ 1 && 输出 > 0 && 判分完成 && 未泄漏` 时计数;运行崩溃的单元整格作废并点名,不算红、也不算快。所以「全绿」一律指**有效单元全绿**(1.5.1 29/29、W5 19/19、W7 17/17)。
|
|
8
8
|
> **1.7.0**:`lazy` 与它改 `reasoningEffort` 的那一半已删除,换成三个默认关闭的纯提示开关(`probeFirst` / `actBeforePlan` / `repeatNudge`)。第一次实测见下节「块 DP17」:三开 12 对 **0.647×**、CI95 [0.501, 0.893]、判分全绿;单开三臂都还没到显著。
|
|
9
|
+
> **1.7.1**:`actBeforePlan` 多带一条按思考长度的提醒(不新增开关,面板仍七行)。发布版本上三开对全关九对 **0.372×**、CI95 [0.240, 0.563]、判分 138/138(下节「块 DP20」);四块合池 30 对 **0.505×**、CI95 [0.401, 0.635]、26/30 更快。
|
|
10
|
+
|
|
11
|
+
## 块 DP20(2026-11-02):1.7.1 上三开 `trio17` 对 `off` 九对 **0.372×**,CI95 [0.240, 0.563],判分 138/138
|
|
12
|
+
|
|
13
|
+
`DP19` 只量了 `ab17`,且任务偏短。这一块在 1.7.1 的真实 profile 上直接对打「三开」与「全关」,任务换成 `DP18` 那三族,看发布版本在更长的任务上是否仍成立。
|
|
14
|
+
|
|
15
|
+
**方法。** 家族 `codeimpl`(14 项判分)、`ledger`(22 项判分)、`stategraph`;每族 3 对、共 9 对;两臂 `off` 与 `trio17`(`probeFirst` + `actBeforePlan` + `repeatNudge`)同对 ABBA 交替先后;18 次运行全部有效,判分 138/138 与 `off` 逐格一致、零失败、零泄漏(`bench/results/suite-DP20b.jsonl`)。运行的 CLI 是当前桌面 Host 所用的 bundle,不是旧包。
|
|
16
|
+
|
|
17
|
+
| 臂 | 汇总墙钟比 | CI95 | 更快 | 单对范围 |
|
|
18
|
+
|---|---|---|---|---|
|
|
19
|
+
| `trio17` | **0.372×** | **[0.240, 0.563]** | 8/9 | 0.10 / 1.04 |
|
|
20
|
+
|
|
21
|
+
分家族(逐对几何):`codeimpl` **0.601×**(2/3 更快)、`ledger` **0.437×**(3/3)、`stategraph` **0.196×**(3/3)。思考字符(几何均值)`off` **83823** → `trio17` **27621**(−67%);输出 token 27636 → 11914(−57%);步数 13.22 → 6.67;墙钟几何均值 464.9 秒 → 173.1 秒。
|
|
22
|
+
|
|
23
|
+
**与前三块合池(30 对):** `trio17` **0.505×** [0.401, 0.635]、26/30 更快;`ab17` 0.706× [0.586, 0.858]、20/29;`pf17` 0.809× [0.646, 1.009];`rn17` 1.007× [0.844, 1.225]。合池质量:`trio17` 30/30 绿、438/438 项;`off` 38/38 绿、546/546 项;`ab17` 29/29、408/408。几何均值输出 token `off` 16037 → `trio17` 9380、思考字符 42380 → 20872、步数 11.84 → 8.30。
|
|
24
|
+
|
|
25
|
+
**读法。** 三点:
|
|
26
|
+
|
|
27
|
+
1. **发布版本本身有效,不是只对旧任务有效。** 这一块用的就是 1.7.1 的代码与当前 Host 的 CLI,9 对点估计 0.372×,比 `DP18` 的 0.491× 更低;判分 138/138 说明省下来的是叙述与空转,不是验证。
|
|
28
|
+
2. **省的是思考,不是检查。** 思考字符降 67%、输出 token 降 57%、步数降 49%,判分项数不变、泄漏计数 0。
|
|
29
|
+
3. **`codeimpl` 有一对反过来(1.04×,步数 6→8)。** 与 `DP18` 的 `codeimpl` 0.869× 同向:实现类任务里「先动手」偶尔会多绕一步。所以推荐措辞仍是「大多数时候」,不是无条件。
|
|
30
|
+
|
|
31
|
+
**局限。** 每族 3 对,单对区间 0.10–1.04×,`stategraph` 的 0.196× 尤其需要更多样本才能当承诺。这一块只有两臂,**没有** `ab17`,所以无法在此块内把「长度提醒」与「先动手」的贡献拆开;拆账证据仍是 `DP19`(`ab17` 0.701×、`debugfix` 4/4 与 `migrate` 4/4 触发长度提醒)。另有一块 `suite-DP20.jsonl` 因误用旧包 CLI(`exit=1`、`steps=1`、`llm=0`)整块作废,已移到 `bench/results/archive/suite-DP20.void.jsonl`,其 18 行**不在**任何数字里;本块是修好 CLI 后的重跑。
|
|
9
32
|
|
|
10
33
|
## 块 DP19(2026-11-01):1.7.1 的回归复核——`actBeforePlan` 多带一条长度提醒后,`debugfix`+`migrate` 8 对 **0.701×**,判分 16/16
|
|
11
34
|
|
|
@@ -26,7 +49,7 @@
|
|
|
26
49
|
|
|
27
50
|
## 块 DP18(2026-11-01):三族复核 1.7.0 的三臂,`trio17` 9 对 **0.491×**,CI95 [0.314, 0.788],判分全绿
|
|
28
51
|
|
|
29
|
-
`DP17` 只覆盖两族短任务,所以在三族更长的任务上复核同一批 arm。**这一块量的是 1.7.0 的代码**——长度提醒(1.7.1)还没上,所以 `ab17`
|
|
52
|
+
`DP17` 只覆盖两族短任务,所以在三族更长的任务上复核同一批 arm。**这一块量的是 1.7.0 的代码**——长度提醒(1.7.1)还没上,所以 `ab17` 在这里只代表「先执行后解释」一个行为。
|
|
30
53
|
|
|
31
54
|
**方法。** 家族 `codeimpl`(14 项判分)、`ledger`(22 项判分)、`stategraph`;每族 3 对、共 9 对;四臂 `off` / `pf17` / `ab17` / `trio17` 按对轮转,同对内交替先后;共 36 次运行,全部单元判分与 `off` 逐格一致、零失败、零泄漏。
|
|
32
55
|
|
|
@@ -52,7 +75,7 @@
|
|
|
52
75
|
|
|
53
76
|
1.7.0 删掉了 `lazy` 与它改 `reasoningEffort` 的那一半(依据是 `LZ1` 里两臂对打 1.106×、CI 跨 1,见下文 `LZ1` 块),换成三个**只改提示、不改任何请求字段**的开关。这一块就是它们的第一次真测量。
|
|
54
77
|
|
|
55
|
-
**这一块量的是 1.7.0 的代码**(1.7.1 给 `actBeforePlan` 补了按思考长度的提醒,所以本块的 `ab17`
|
|
78
|
+
**这一块量的是 1.7.0 的代码**(1.7.1 给 `actBeforePlan` 补了按思考长度的提醒,所以本块的 `ab17` 只代表「先执行后解释」一个行为)。
|
|
56
79
|
|
|
57
80
|
**方法。** 家族 `debugfix`、`migrate`;每族 6 对、共 12 对;五个 arm 配置(`off`、`pf17`=`probeFirst`、`ab17`=`actBeforePlan`、`rn17`=`repeatNudge`、`trio17`=三开)按对轮转,同对内的 `off` 与各臂交替先后。共 60 次运行,全部单元的判分与 `off` 逐格一致,零失败。比值 = 该臂墙钟 / 同对 `off` 墙钟,家族与合池都用逐对几何平均;CI 是 4000 次 bootstrap 的 2.5 / 97.5 分位。
|
|
58
81
|
|
|
@@ -780,7 +803,7 @@ fixture 是“从零实现一个模块”——`ledger.py`,6 个函数,规
|
|
|
780
803
|
| 开 | 144.5 s | **10.5** | 24 274 | 22.0/22 | 8/8 |
|
|
781
804
|
|
|
782
805
|
- 墙钟 **1.49×**(配对中位 1.56×,均值 1.66×;5/8 对更快,p = 0.29——赢的三对赢得大,2.3–2.7×,输的三对只输 5–24%)。
|
|
783
|
-
- **步数 8/8 对全部下降**(符号检验 p = 0.008
|
|
806
|
+
- **步数 8/8 对全部下降**(符号检验 p = 0.008):这是最干净的一条,机制也直接——精简输出就少一步“先说明再动手”,少一次重复验证。
|
|
784
807
|
- 输出 token **−25.8%**(配对中位 −38.6%,5/8 对下降),这次越过了 20% 门槛。
|
|
785
808
|
- **正确性 16/16 次运行、22/22 全对,两个臂都一样**。这是本轮最重要的质量证据:省下来的是过程文字,不是实现质量。
|
|
786
809
|
|
|
@@ -1805,7 +1828,7 @@ python3 bench/suite-run.py --tasks debugfix,ledger,codeimpl --arms off,def15,bud
|
|
|
1805
1828
|
|
|
1806
1829
|
- 几何均值 **1.213×**(即慢 21 %),`odt15` 只赢 4/12 对。
|
|
1807
1830
|
- 输的方式不是「话变多」而是 **步数变多**:`debugfix` 4→12 步、`ledger` 8→26 步、`shellpipeline` 19→31 步;输出 token 也跟着涨(`ledger` 2.32×、`shellpipeline` 1.84×)。
|
|
1808
|
-
-
|
|
1831
|
+
- 机制解释与主结论一致:把「精简输出」当常驻文风后,模型会改用更多轮次去「确认」,而轮次和输出是绑在一起的(`steps` 0.827 × 每步输出 ≈ 墙钟)。
|
|
1809
1832
|
|
|
1810
1833
|
所以默认值不改成 `true`,也不做成「从第一步就提醒」。这条和 `shapeGate` 的空结果一起,构成「不是所有听起来合理的省 token 开关都真省时间」的两个反例——它们都是**先测后定**,不是按直觉定的。
|
|
1811
1834
|
|
|
@@ -2295,7 +2318,7 @@ python3 bench/block_score.py D2G2 def15 d2g
|
|
|
2295
2318
|
| p6 | 33.3 s | 44.0 s | **1.323×** | 7→5 | 4 046→5 582 |
|
|
2296
2319
|
| p7 | 79.3 s | 44.5 s | 0.560× | 6→5 | 8 408→4 447 |
|
|
2297
2320
|
|
|
2298
|
-
**读法:几何与胜场分离。** 快的时候快很多(0.407、0.470、0.560),慢的时候慢得不多(1.147、1.294、1.323,单看都在或接近 ±20 % 噪声带),所以几何 0.770× 而胜场只有 4/7。p3/p6 有一个共同点:`def15` 步数更少但输出 token 更多(4 553 vs 4 106、5 582 vs 4 046)——第 4
|
|
2321
|
+
**读法:几何与胜场分离。** 快的时候快很多(0.407、0.470、0.560),慢的时候慢得不多(1.147、1.294、1.323,单看都在或接近 ±20 % 噪声带),所以几何 0.770× 而胜场只有 4/7。p3/p6 有一个共同点:`def15` 步数更少但输出 token 更多(4 553 vs 4 106、5 582 vs 4 046)——第 4 步的「精简输出」提醒在这两格里像是让模型**先压缩一次、再补回来**。这是短任务上提醒本身有成本的又一条实例(与 1.5.1 里 `perfrefactor` 1.18×、`csvpipe` 1.12× 同向),不是判 FAIL 的依据:`DEF_DBG` 不承担改默认的职责,它只回答「发布版默认还快不快」。
|
|
2299
2322
|
|
|
2300
2323
|
**合池(`DEF_MIG` + `DEF_DBG`,发布版 1.5.19,12 对)。** 几何 **0.735×**(省约 26.5 %)、逐格中位 **0.708×**、9/12 更快、范围 0.407–1.323×;两族步数几何 0.886×、输出几何 0.907×。这一组是「发布版对新会话」的最干净对照(`off` = `enabled: false`,同一台机、ABBA 交错),结论:**1.5.19 减少提示之后,默认配置的提速还在,方向和量级与全池 0.823× 一致**;单块 n 小(5 和 7),对外仍只用 138 对全池口径,这组数字作为发布版复核记录。
|
|
2301
2324
|
|
|
@@ -2305,17 +2328,17 @@ python3 bench/block_score.py D2G2 def15 d2g
|
|
|
2305
2328
|
|
|
2306
2329
|
| 提醒种类 | 投递次数 |
|
|
2307
2330
|
| --- | --- |
|
|
2308
|
-
| `output-discipline
|
|
2331
|
+
| `output-discipline`(精简输出) | 754 |
|
|
2309
2332
|
| `write-and-verify`(改了 2 个文件后跑一次检查) | 84 |
|
|
2310
2333
|
| `batch-now`(一次把独立调用发齐) | 60 |
|
|
2311
2334
|
| `reuse-check`(检查原样重复,建议复用) | **0** |
|
|
2312
2335
|
|
|
2313
2336
|
951 份转录里 742 份(78 %)至少收到过一条提醒,说明投递链路本身是通的;**`reuse-check` 一条都没有**。套件任务的形状是「改文件 → 跑一次隐藏测试 → 结束」,检查不会被逐字重跑,所以复用建议没有触发条件。结论有两条:
|
|
2314
2337
|
|
|
2315
|
-
1. 已测出的 0.823×(12 块 / 138
|
|
2338
|
+
1. 已测出的 0.823×(12 块 / 138 对)**不是**复用建议带来的,它来自精简输出、批量化与步数混合。任何把 0.823× 归因到「复用检查」的说法都不成立。
|
|
2316
2339
|
2. 复用建议的实现(按产物指纹失效、写未知即停)仍然正确,但它属于**防御性正确**而不是**已证实的加速项**:本地语料里它的收益是 0。要证明它有效,必须先构造一个会逐字重跑检查的任务形状,而不是在现有套件上再跑一个块。
|
|
2317
2340
|
|
|
2318
|
-
下一步因此改成量**投递最多的那一条**:`outputDiscipline: late` 与 `off`
|
|
2341
|
+
下一步因此改成量**投递最多的那一条**:`outputDiscipline: late` 与 `off` 的差,就是「精简输出」这一条提醒单独的贡献(块 `LEN_MIG` / `LEN_DBG`,臂 `def15` vs `nodisc`,后者与前者只差 `outputDiscipline: false`)。
|
|
2319
2342
|
|
|
2320
2343
|
## 一步值多少钱:llm 秒数 ≈ 14.5 s × 步数 + 24 s × 千 token(R² = 0.42,n = 568 条合格行)
|
|
2321
2344
|
|
|
@@ -2358,7 +2381,7 @@ llm = 14.5 × steps + 24.2 × tokens − 286.8 R² = 0.416
|
|
|
2358
2381
|
llmMs ≈ 10.05 × output + 1.09 × ttftMs − 159 R² = 0.817
|
|
2359
2382
|
```
|
|
2360
2383
|
|
|
2361
|
-
- **每个输出 token 约 10 ms**:真机中位输出 264 token ⇒ 约 2.6 s/步,占该步中位 3.69 s
|
|
2384
|
+
- **每个输出 token 约 10 ms**:真机中位输出 264 token ⇒ 约 2.6 s/步,占该步中位 3.69 s 的七成。这是「精简输出」这条提醒唯一能直接触碰的项,也是它为什么值钱。
|
|
2362
2385
|
- **首字延迟整体平移**:`ttftMs` 系数 1.09(不是叠加而是同步放大),中位 1.16 s。
|
|
2363
2386
|
- 只放 `output` 时 R² = 0.649,加入 `ttftMs` 跳到 0.817;再加 `cacheRead` 不再提升(0.817)——上下文的**缓存命中**不直接影响单步耗时,影响的是首字里已经算进去的那部分。
|
|
2364
2387
|
|
|
@@ -2390,7 +2413,7 @@ python3 bench/textshare.py --arm off --limit 0 --json # 全文的口径与 t
|
|
|
2390
2413
|
|
|
2391
2414
|
1. **并行不是杠杆。** 每消息调用数 1.00 vs 1.00(比 0.994),多调用消息占比 5.2 % → 6.3 %(中位比 1.000)。加不加插件,模型都是一条消息一个调用;池化 0.823× 里没有任何一份来自「一次发多个调用」。这也解释了为什么反复打磨并行提示词没有效果(见 B1 段落)。
|
|
2392
2415
|
2. **省的是「每样都少一点」,不是某一种输出。** 步数 0.83、调用 0.79、工具参数 0.84、可见 prose 0.80、推理 0.75——全都落在 0.75–0.84。没有任何一项是「砍半」,也没有任何一项反向变大。乘起来正好是实测的 0.82× 墙钟。
|
|
2393
|
-
3. **真正的大头是推理,不是可见文字。** 每个会话中位 47.5 k 推理字符 vs 92 个可见 prose 字符——**可见文字只占总输出字符的 0.2
|
|
2416
|
+
3. **真正的大头是推理,不是可见文字。** 每个会话中位 47.5 k 推理字符 vs 92 个可见 prose 字符——**可见文字只占总输出字符的 0.2 %**。所以「精简输出」这条提醒值钱的地方不是它写的那些字,而是它连带把模型每步的**思考**压短了 25 %(0.753);只盯着可见文字去优化,天花板就是 0.2 %。
|
|
2394
2417
|
|
|
2395
2418
|
读法上的边界:这是本机 168 对套件转录,`off` 与 `def15` 各自只有一遍,落在 ±20 % 的诚实带内(见「诚实带」一节),所以「0.75–0.84」应读作方向与量级,不是精确系数;但「并行率不变」在这种样本量下是稳的(两条独立口径都给 1.00)。
|
|
2396
2419
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.7.2(面板七行改名:说清「开关做什么」,行为与数字一概不动)
|
|
4
|
+
|
|
5
|
+
用户看到的是七行标签,不是文档。旧标签里「少写过程」「先列文件清单」「重复无进展时提醒」说的是内部术语或半句话,不看 README 猜不出效果;这一版只改文案,不改任何机制、阈值、默认值或注入文本。
|
|
6
|
+
|
|
7
|
+
- **`panel.prose`:少写过程 → 精简输出。** 它控制的是输出纪律(少解释、直接给结论),「过程」容易被读成推理过程。
|
|
8
|
+
- **`panel.budget`:最多几步 → 步数上限。** 与右侧取值(`不限` / `15 步` / `30 步`)构成一个字段,而不是一个问句。
|
|
9
|
+
- **`panel.map`:先列文件清单 → 开局附文件清单。** 清单是插件在开局附上的,不是模型自己列,旧名把主体说反了。
|
|
10
|
+
- **`panel.batch`:一次读多个文件 → 批量读文件。** 四个字,与相邻行同一语法层级。
|
|
11
|
+
- **`panel.probe`:不确定时先查一次 → 不确定先查证。** 「查一次」会被误读成次数限制;它要求的是先取证再推理。
|
|
12
|
+
- **`panel.act`:先动手再解释 → 先执行后解释。** 与英文 `Act before explaining` 对齐,动词统一为「执行」。
|
|
13
|
+
- **`panel.repeat`:重复无进展时提醒 → 重复时换方法。** 旧名只说触发条件,不说该做什么;新名给出动作。
|
|
14
|
+
- 英文侧同步:`Concise output` / `Step cap` / `File inventory` / `Batched reads` / `Verify before guessing` / `Act before explaining` / `Nudge on repeats`。行内 tooltip 保持原样(它本来就是解释后果的地方),仍是七行。
|
|
15
|
+
- 面板行数、`sessions` 列的写入路径、`outputDiscipline` / `stepBudget` / `workspaceMap` / `openBatch` / `probeFirst` / `actBeforePlan` / `repeatNudge` 七个字段一个都没动;`src/config.js` 里七条描述的面板名与英文摘要同步改名。
|
|
16
|
+
- 校验:`node --test test/*.test.js` 337/337 通过;`ui-copy-lint` 干净、`zh-lint` 0 error、`style-lint` 通过。
|
|
17
|
+
|
|
3
18
|
## 1.7.1(`actBeforePlan` 补上第二个信号:本回合思考已写多长;仍然只改提示词,不加面板行)
|
|
4
19
|
|
|
5
20
|
1.7.0 用 `repeatNudge` 去抓「没新信息还在想」,但本语料里模型很少把同一个调用原样重发第三遍:`DP17` 十二个会话只发出 3 条提醒,全部来自「连续结果相同」那条分支,「同调用 ≥2 次」一次都没满足。所以第二个信号换成本来就记在会话里的东西——**这一回合已经写了多少字符的思考**。
|
|
@@ -11,6 +26,7 @@
|
|
|
11
26
|
- 测试 334 → **337 全绿**(`test/deliberation.test.js` +2、`test/usage.test.js` +1)。动 `src/deliberation.js`、`src/usage.js`、`index.js`、两个测试文件。
|
|
12
27
|
|
|
13
28
|
- **`DP19` 回归复核(1.7.1 的代码,`off` 对 `ab17`,`debugfix`+`migrate` 各 4 对、16 次运行):** `ab17` **0.701×** [0.516, 0.930]、6/8 更快、判分 16/16 绿;`debugfix` 0.756×(4/4,1.7.0 时 0.582×)、`migrate` 0.649×(2/4,1.7.0 时 0.996×),思考字符几何均值 28275 → 17834、步数 9.27 → 7.62。提醒在真实运行里发出过:4 个 `ab17` 会话各 1–2 条(每回合上限 2),`off` 0 条;同批每回合思考字符 5350–120897。结论只到「加了它没让这个臂变差」,8 对不足以说更快,也没拆开两个行为各自的贡献。
|
|
29
|
+
- **`DP20` 发布版本复核(1.7.1 + 当前 Host 的 CLI,`off` 对三开,三族各 3 对、18 次运行):** 三开 **0.372×** [0.240, 0.563]、8/9 更快、判分 138/138 与 `off` 逐格一致、零泄漏;`codeimpl` 0.601×、`ledger` 0.437×、`stategraph` 0.196×,思考字符几何均值 83823 → 27621(−67%)、输出 token 27636 → 11914(−57%)、步数 13.22 → 6.67。与 `DP17`/`DP18`/`DP19` 合池 30 对 **0.505×** [0.401, 0.635]、26/30 更快;合池质量 `trio17` 30/30 绿 438/438 项、`off` 38/38 绿 546/546 项。这一块因此把「大部分时候推荐三开」从三块的方向证据升级为发布版本上的复现;仍保留 `codeimpl` 一对 1.04× 的反例,推荐措辞是「大多数时候」。另:首次尝试误用旧包 CLI(`exit=1`、`steps=1`、`llm=0`)的 18 行整块作废,已移到 `bench/results/archive/suite-DP20.void.jsonl`,不参与任何数字。
|
|
14
30
|
|
|
15
31
|
## 1.7.0(删掉 `lazy` 与它改 `reasoningEffort` 的那一半;换成三个默认关闭的纯提示侧开关:`probeFirst`「不确定时先查一次」、`actBeforePlan`「先动手再解释」、`repeatNudge`「重复无进展时提醒」;12 对 5 臂 60 次运行里三开 0.647×,判分全绿)
|
|
16
32
|
|
package/README.en.md
CHANGED
|
@@ -105,11 +105,11 @@ Legacy `fast` / `turbo` / `max` / `ludicrous` values are read as `auto` with a d
|
|
|
105
105
|
|
|
106
106
|
The bolt is the switch: one click writes on/off, per conversation, restored on reload. Right-click it for a seven-row panel — all seven affect this conversation only:
|
|
107
107
|
|
|
108
|
-
- **
|
|
108
|
+
- **Concise output** — master switch for the step-4 reminder; with it off, long tasks take about 2.7x longer and write about twice as much. On by default.
|
|
109
109
|
- **Step cap** — `15` / `30` / off, off by default. At the cap it reports instead of truncating the task.
|
|
110
|
-
- **
|
|
111
|
-
- **
|
|
112
|
-
- **
|
|
110
|
+
- **File inventory** — before the turn's first tool call, one inventory notice (relative paths + byte sizes + visible test entry points) so the turn does not open with `ls`/`find`. Off by default; over 23 pairs it measured 0.927x geometric with a slower tail and 10% more steps, so it stays a switch to try rather than a default.
|
|
111
|
+
- **Batched reads** — batches independent reads into one call. Off by default; the measured gain shows up when it is stacked with the inventory switch (below), not alone.
|
|
112
|
+
- **Verify before guessing** (`probeFirst`) — at turn entry, one notice: if a codebase fact is uncertain, read it once instead of reasoning about it. Off by default; 0.883x over 12 pairs (7/12 faster).
|
|
113
113
|
- **Act before explaining** (`actBeforePlan`) — at most one line of plan before the first action; act as soon as the next step is clear. Since 1.7.1 it also carries a length-triggered notice: once this turn has written 4000 characters of reasoning, the next step learns how much it wrote and gets two exits — act on the evidence, or read the one fact still missing (at most two per turn). Off by default; 0.761x over 12 pairs (8/12 faster) with reasoning characters 8249 → 3152 on `debugfix`; 0.643x over 9 pairs (6/9 faster) on three families in `DP18`, 0.708x [0.558, 0.898] pooled over 21 pairs.
|
|
114
114
|
- **Nudge on repetition** (`repeatNudge`) — when the same call has already run twice this turn, or three results in a row are identical, one line says how many times it repeated and asks for a different approach or a conclusion. Off by default; 1.007x alone, but it does not drag the three-switch combination down.
|
|
115
115
|
|
|
@@ -117,7 +117,7 @@ All seven rows take effect from the next request, per conversation. No dropdown,
|
|
|
117
117
|
|
|
118
118
|
**Turn several on at once?** Yes, but only the measured pair. Defaults plus inventory plus batched reads is **0.742x** over 11 pairs; adding the step-2 reminder timing (not a panel row, still on HOLD) reaches **0.669x** over 22 pairs, CI95 [0.554, 0.799], 18/22 faster, hidden tests green. Each of those two alone lands near 0.93x with a confidence interval that crosses 1 — the gain comes from each one cutting a different share of the same cost, not from any single switch. The other knobs (`batchVerify`, `preferPatch`, step budget, wider fan-out) all land at 0.96–1.10; do not stack them.
|
|
119
119
|
|
|
120
|
-
`probeFirst` / `actBeforePlan` / `repeatNudge` are the 1.7.0 additions; 1.7.1 adds a length-triggered notice inside `actBeforePlan` (no new switch, the panel stays seven rows). All three on (`trio17`) is the only arm whose interval stays below 1 in
|
|
120
|
+
`probeFirst` / `actBeforePlan` / `repeatNudge` are the 1.7.0 additions; 1.7.1 adds a length-triggered notice inside `actBeforePlan` (no new switch, the panel stays seven rows). **Most of the time, turn all three on.** All three on (`trio17`) is the only arm whose interval stays below 1 in every block: **0.647x** [0.501, 0.893], 10/12 faster over 12 pairs in `DP17`; **0.491x** [0.314, 0.788], 8/9 faster over 9 pairs in `DP18`; **0.372x** [0.240, 0.563], 8/9 faster over 9 pairs on the released build in `DP20`; **0.505x** [0.401, 0.635], 26/30 faster pooled over 30 pairs, with 30/30 runs green and 438/438 checks passing. Reasoning characters drop 42380 → 20872 and output tokens 16037 → 9380 (geometric means). If you want only one: `probeFirst` is the most conservative (0.809x over 21 pairs), `actBeforePlan` is the one aimed at long reasoning (`debugfix` 0.582x); `repeatNudge` alone is 1.007x and fired only 3 times across twelve sessions — that is "it almost never happened", not "it does not work", and it is harmless in the combination. On implementation-shaped tasks all three occasionally take one extra step (`DP20` has one 1.04x pair), hence "most of the time" rather than always. None of them changes an answer or writes a request field, so they stay off by default.
|
|
121
121
|
|
|
122
122
|
The idea draws on `dsh-batch-tool-calls` and `dsh-ops` (batched calls, bounded execution), but their widths are static while this width comes from the conversation's own call evidence; do not install all three. Context-compaction plugins coexist.
|
|
123
123
|
|
package/README.md
CHANGED
|
@@ -105,19 +105,19 @@
|
|
|
105
105
|
|
|
106
106
|
闪电就是开关:点一下即开/关,按会话独立,重启按会话恢复。右键闪电是一块七行的面板(闪电自己就是开关,不占行),七行都只影响当前会话:
|
|
107
107
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
114
|
-
-
|
|
108
|
+
- **精简输出**:第 4 步那句「省着写」提醒的总开关,关掉后输出会变长、耗时变慢(长任务约 2.7×),默认开。
|
|
109
|
+
- **步数上限**:`15` / `30` / 不限,默认不限。到上限只先汇报,不截断任务。
|
|
110
|
+
- **开局附文件清单**:开启后,回合的第一次工具调用之前先收到一份工作目录清单(相对路径 + 字节数 + 可见的测试入口),省掉开头的 `ls`/`find` 探路。默认关;23 个配对实测几何 0.927×,尾部变慢、步数 +10%,没有达到进默认的门槛,只作为可试的开关。
|
|
111
|
+
- **批量读文件**:把互不依赖的读取合成一批发出,少几个来回。默认关;单独开测不到显著,和上一项一起开才有(见下)。
|
|
112
|
+
- **不确定先查证**(`probeFirst`):入场时提醒一句——拿不准的代码库事实去读一次,不要用推理猜。默认关;12 对实测 0.883×(7/12 更快)。
|
|
113
|
+
- **先执行后解释**(`actBeforePlan`):第一次动手前最多写一行计划,动作清楚就直接做;1.7.1 起它还带一条按思考长度触发的提醒——本回合思考写到 4000 字符(约 2000 汉字)后,下一步之前告诉你写了多少,并给「按证据动手,或去读那一个还缺的事实」两个出口(每回合最多两条)。默认关;`DP17` 12 对 0.761×(8/12 更快),`debugfix` 一族 0.582×、思考字符 8249 → 3152;`DP18` 三族 9 对 0.643×(6/9 更快),合池 21 对 0.708× [0.558, 0.898]。
|
|
114
|
+
- **重复时换方法**(`repeatNudge`):同一调用本回合已跑过两次、或连续三条结果内容完全一样时,说一句「已重复 N 次,换方法或给结论」。默认关;单开 1.007×,但在三开组合里不拖后腿。
|
|
115
115
|
|
|
116
116
|
七项都写在本会话的条目里,对下一个回合生效;另一个会话开不开、写成什么样,互不影响。没有下拉,没有倍数估算。
|
|
117
117
|
|
|
118
118
|
**几个一起开会不会更快?** 会,但只有实测过的那几个。默认 + `workspaceMap` + `openBatch` 两开:11 对 **0.742×**;再把 `disciplineAfterSteps` 提前到 2(面板里没有这一项,属于 HOLD 的时点实验)三开:22 对 **0.669×**、CI95 [0.554, 0.799]、18/22 更快、隐藏测试全绿。单独开其中任何一个都测不到显著(置信区间全跨 1)——所以增益来自它们各自省掉的是同一类成本的不同份,不是哪个开关本身。其余开关(`batchVerify`、`preferPatch`、步数预算、更宽并行)叠上去都是 0.96–1.10,没有理由跟着一起开。细节见 [BENCHMARK.md](BENCHMARK.md) 的「直接跑一次多个开关一起开」。
|
|
119
119
|
|
|
120
|
-
`probeFirst` / `actBeforePlan` / `repeatNudge` 三个是 1.7.0 新加的纯提示侧开关,1.7.1 给 `actBeforePlan`
|
|
120
|
+
`probeFirst` / `actBeforePlan` / `repeatNudge` 三个是 1.7.0 新加的纯提示侧开关,1.7.1 给 `actBeforePlan` 补了一条按思考长度触发的提醒(不新增开关、面板仍是七行)。**大部分时候推荐三个全开**:三开(`trio17`)在四块实测里都是唯一置信区间不跨 1 的臂——`DP17` 12 对 **0.647×** [0.501, 0.893]、10/12 更快;`DP18` 三族 9 对 **0.491×** [0.314, 0.788]、8/9 更快;`DP19` 发布前 `ab17` 8 对 0.701× [0.516, 0.930];`DP20` 发布版本上 9 对 **0.372×** [0.240, 0.563]、8/9 更快;四块合池 30 对 **0.505×** [0.401, 0.635]、26/30 更快,判分 30/30 绿、438/438 项。代价是思考字符几何均值 42380 → 20872、输出 token 16037 → 9380。若只想开一个:`probeFirst` 最保守(0.809×,21 对)、`actBeforePlan` 对长思考最直接(`debugfix` 一族 0.582×);`repeatNudge` 单开等于没变(1.007×,且十二个会话里只触发 3 次——这是「几乎没发生」,不是「无效」),只在组合里无害。`codeimpl` 这类实现任务里三开偶尔会多绕一步(`DP20` 有 1 对 1.04×),所以是「大多数时候」,不是无条件。它们不改答案、不写请求字段,所以默认仍然关。
|
|
121
121
|
|
|
122
122
|
思路参考了 `dsh-batch-tool-calls` 与 `dsh-ops`(批量调用、有界执行),但它们的规则是静态的,这里的宽度来自会话自身的调用证据;不需要同时装。压缩类插件可以共存。
|
|
123
123
|
|
package/client.js
CHANGED
|
@@ -91,24 +91,24 @@ window.__ModuleLoader__.load({
|
|
|
91
91
|
'chip.error': 'Fast 模式配置读取失败:{error}',
|
|
92
92
|
'chip.absent': 'Fast 模式未在此配置中声明,点击重试',
|
|
93
93
|
'panel.title': '更快',
|
|
94
|
-
'panel.prose': '
|
|
95
|
-
'panel.proseTitle': '
|
|
94
|
+
'panel.prose': '精简输出',
|
|
95
|
+
'panel.proseTitle': '少写解释与铺垫,直接给结论',
|
|
96
96
|
'panel.on': '开',
|
|
97
97
|
'panel.off': '关',
|
|
98
|
-
'panel.budget': '
|
|
98
|
+
'panel.budget': '步数上限',
|
|
99
99
|
'panel.budgetOff': '不限',
|
|
100
100
|
'panel.budgetSteps': '{n} 步',
|
|
101
101
|
'panel.scope': '只影响本会话',
|
|
102
102
|
'panel.budgetTitle': '到上限先汇报,不截断任务',
|
|
103
|
-
'panel.map': '
|
|
103
|
+
'panel.map': '开局附文件清单',
|
|
104
104
|
'panel.mapTitle': '开局把目录里的文件交给模型,省掉先翻一遍目录',
|
|
105
|
-
'panel.batch': '
|
|
105
|
+
'panel.batch': '批量读文件',
|
|
106
106
|
'panel.batchTitle': '把互不依赖的读取合成一批发出,少几个来回',
|
|
107
|
-
'panel.probe': '
|
|
107
|
+
'panel.probe': '不确定先查证',
|
|
108
108
|
'panel.probeTitle': '拿不准的事实读一次,别用推理猜',
|
|
109
|
-
'panel.act': '
|
|
109
|
+
'panel.act': '先执行后解释',
|
|
110
110
|
'panel.actTitle': '最多一行计划,动作清楚就直接做',
|
|
111
|
-
'panel.repeat': '
|
|
111
|
+
'panel.repeat': '重复时换方法',
|
|
112
112
|
'panel.repeatTitle': '重跑同一个调用或连续无新信息时提醒',
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -122,22 +122,22 @@ window.__ModuleLoader__.load({
|
|
|
122
122
|
'chip.error': 'Fast mode configuration unavailable: {error}',
|
|
123
123
|
'chip.absent': 'Fast mode is not configured in this composition. Click to retry',
|
|
124
124
|
'panel.title': 'Faster',
|
|
125
|
-
'panel.prose': '
|
|
126
|
-
'panel.proseTitle': '
|
|
125
|
+
'panel.prose': 'Concise output',
|
|
126
|
+
'panel.proseTitle': 'Drops explanations and setup; states the result',
|
|
127
127
|
'panel.on': 'On',
|
|
128
128
|
'panel.off': 'Off',
|
|
129
|
-
'panel.budget': '
|
|
129
|
+
'panel.budget': 'Step cap',
|
|
130
130
|
'panel.budgetOff': 'No cap',
|
|
131
131
|
'panel.budgetSteps': '{n} steps',
|
|
132
132
|
'panel.scope': 'This conversation only',
|
|
133
133
|
'panel.budgetTitle': 'Reports at the cap; never truncates the task',
|
|
134
|
-
'panel.map': 'File
|
|
134
|
+
'panel.map': 'File inventory',
|
|
135
135
|
'panel.mapTitle': 'Hands the directory listing to the model up front, skipping a lookup',
|
|
136
|
-
'panel.batch': '
|
|
136
|
+
'panel.batch': 'Batched reads',
|
|
137
137
|
'panel.batchTitle': 'Batches independent reads into one call, fewer round trips',
|
|
138
|
-
'panel.probe': '
|
|
138
|
+
'panel.probe': 'Verify before guessing',
|
|
139
139
|
'panel.probeTitle': 'Look up the fact you are unsure of once; a guess costs more; safety checks stay',
|
|
140
|
-
'panel.act': 'Act
|
|
140
|
+
'panel.act': 'Act before explaining',
|
|
141
141
|
'panel.actTitle': 'At most one line of plan before the first call; act when the next step is clear',
|
|
142
142
|
'panel.repeat': 'Nudge on repeats',
|
|
143
143
|
'panel.repeatTitle': 'One line when a call runs again or several steps bring nothing new; safety checks stay',
|
|
@@ -866,8 +866,8 @@ window.__ModuleLoader__.load({
|
|
|
866
866
|
|
|
867
867
|
/**
|
|
868
868
|
* One row: label on the left, current value on the right, and the
|
|
869
|
-
* consequence of the setting on hover.
|
|
870
|
-
* "
|
|
869
|
+
* consequence of the setting on hover. A four-character label cannot say
|
|
870
|
+
* what "精简输出" costs, and the settings rows use a title for the
|
|
871
871
|
* same reason.
|
|
872
872
|
*
|
|
873
873
|
* Props are assigned one by one because a dense key/value literal reads as
|
package/docs/REFERENCE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 参考手册:原理、配置与边界
|
|
2
2
|
|
|
3
|
-
本手册描述 **dsh-fast-mode 1.7.
|
|
3
|
+
本手册描述 **dsh-fast-mode 1.7.2** 的实际行为(默认配置下的注入行为与 1.5.0 一致;1.5.14 起多了右键面板,1.7.0 起为七行(只数设置项;闪电本身就是开关,不占行),七行都只影响本会话;1.7.1 给其中一行加了一条按思考长度的提醒,行数不变),对应仓库里的 `index.js`、`src/` 与 `client.js`。它不是宣传页:凡是能测量的地方给出数字,凡是没测量的地方直接说没测量。
|
|
4
4
|
|
|
5
5
|
**默认契约:Fast 模式不改变思考强度、thinking 预算或模型。** `agent/request` 钩子只做一件事——`await next()`,读一下请求携带的 `reasoningEffort`、路由名记进测量,然后原样返回。用户选的是哪一档(会话里的 UI 选择,或者 profile 里 agent-default-model 固定下来的那一档),每个请求就用哪一档。
|
|
6
6
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
## 交互细节:闪电开关与会话归属
|
|
12
12
|
|
|
13
13
|
- **一个图标就是开关。** 会话输入区的活动槽(`conversation.input.activity`)里只有一个闪电按钮:关闭时空心,开启时实心。点一下切换,再点一下切回;这一下只写当前会话。没有档位选择器,没有箭头,没有"选择 gear"的二级菜单。
|
|
14
|
-
- **右键是面板。** 右键闪电打开面板,标题是「更快」,下面是 7 行,7 行都只影响当前会话:"
|
|
15
|
-
- **会话之间互不影响,这是硬约束。** 每个会话的 `enabled`、`gear`、`outputDiscipline`、`stepBudget`、`workspaceMap`、`openBatch`、`probeFirst`、`actBeforePlan`、`repeatNudge` 都从 `sessions` 列里自己那一条解析:A 会话 `更快 +
|
|
14
|
+
- **右键是面板。** 右键闪电打开面板,标题是「更快」,下面是 7 行,7 行都只影响当前会话:"精简输出"(`outputDiscipline`)、"步数上限"(`stepBudget`,循环 0/15/30)、"开局附文件清单"(`workspaceMap`)、"批量读文件"(`openBatch`)、"不确定先查证"(`probeFirst`)、"先执行后解释"(`actBeforePlan`)、"重复时换方法"(`repeatNudge`)。7 行都把选择写进 `sessions` 列里本会话的条目,不碰共享默认值,下一个回合生效;只读或写入中时整块禁用,写失败回滚。行内 tooltip:`probeFirst`「拿不准的事实读一次,别用推理猜」、`actBeforePlan`「最多一行计划,动作清楚就直接做」、`repeatNudge`「重跑同一个调用或连续无新信息时提醒」。没有条目的会话沿用配置里的默认值(`outputDiscipline`/`stepBudget`/`workspaceMap`/`openBatch`/`probeFirst`/`actBeforePlan`/`repeatNudge`)。面板不暴露 `disciplineAfterSteps`、`disciplineEarlyCalls`、`shapeGate`、`finishLineSteps`、`shellParallel`、`disciplineRepeatAtSteps` 这些未证实或已判 HOLD 的旋钮。
|
|
15
|
+
- **会话之间互不影响,这是硬约束。** 每个会话的 `enabled`、`gear`、`outputDiscipline`、`stepBudget`、`workspaceMap`、`openBatch`、`probeFirst`、`actBeforePlan`、`repeatNudge` 都从 `sessions` 列里自己那一条解析:A 会话 `更快 + 精简输出`、B 会话 `更快 + 不写过程` 同时成立,C 会话没点过就沿用配置默认值。面板和闪电只写本会话的条目,从不写共享默认值;条目最多保留 200 个,按 `ts` 淘汰最旧的,被淘汰的会话回到默认值。
|
|
16
16
|
- **按钮只表达一个问题:这个会话开不开。** `aria-pressed` 就是状态,tooltip 写清"仅本会话 · 点击关闭 · 右键设置"。为什么快、快在哪里、单次调用上限这类说明放在插件介绍(`meta.description` 与配置项描述)里,不再占用输入区。
|
|
17
17
|
- **实时行引用的是被执行的数字**,而不是产品形容词:
|
|
18
18
|
- 开启、看门狗有上限:`自动调度 · 并行 2–8 · 单次调用 ≤ 2 分`
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
2. 读 `resolved.reasoningEffort`、路由名,写进测量标签;
|
|
34
34
|
3. `return resolved`——同一个对象、同一个字段集合,不构造新对象,也不写回任何档位。
|
|
35
35
|
|
|
36
|
-
它不写 thinking 预算,不换模型,也不添加任何 provider 专用字段。因此常备的"更快"杠杆仍是三个:并行扇出(减少往返)、输出纪律(减少过程文字)、卡顿看门狗(减少工具等待)。1.7.0
|
|
36
|
+
它不写 thinking 预算,不换模型,也不添加任何 provider 专用字段。因此常备的"更快"杠杆仍是三个:并行扇出(减少往返)、输出纪律(减少过程文字)、卡顿看门狗(减少工具等待)。1.7.0 起另有三条**纯提示**的逐会话开关(先查一次、先执行后解释、重复时提醒),它们只往会话里加文字,同样不碰请求;见"六、三个逐会话可点的提示开关"。思考深度和解码速度不在常备杠杆里——前者是用户的契约,后者任何提示词都做不到。
|
|
37
37
|
|
|
38
38
|
### 二、自适应调度器:`gear: auto`
|
|
39
39
|
|
|
@@ -146,16 +146,18 @@
|
|
|
146
146
|
|
|
147
147
|
**共用一条消息。** `probeFirst` 与 `actBeforePlan` 在本轮第一步合并成一条 notice,两个都关时不发;两个都开也只有一条消息、一句共同 GUARD(`src/deliberation.js` 的 `GUARD`):`None of this cuts validation at trust boundaries, data-loss handling, security, or accessibility.`
|
|
148
148
|
|
|
149
|
-
**`probeFirst
|
|
149
|
+
**`probeFirst`「不确定先查证」。** 何时发:打开的回合,第一步,一次。文本(`PROBE_TEXT`,逐字):``When you are unsure of a fact about the codebase — a file's contents, a signature, a test's expectation — read it once instead of reasoning about it. One call, the cheapest that answers the question: `grep` before `read`, a range before the whole file. Guessing costs a step and is usually wrong; looking costs the same step and settles it. Read again when a result surprises you, before theorising about why it surprised you.`` 它不指定查哪个文件、不替代判断,也不强制任何调用。
|
|
150
150
|
|
|
151
|
-
**`actBeforePlan
|
|
151
|
+
**`actBeforePlan`「先执行后解释」。** 何时发:同一个回合第一步、同一条消息里。文本(`ACT_TEXT`):`Do not restate the task and do not re-explain the plan: the reader already has it. Before your first tool call, one line of plan is enough; when the next action is already clear, take it now and explain afterwards only if the result is not self-evident.` "最多一行计划"是建议措辞,不是机器截断:插件不数行数、不拦截调用。
|
|
152
152
|
|
|
153
|
-
**`repeatNudge
|
|
153
|
+
**`repeatNudge`「重复时换方法」。** 何时发:轮中,只在有证据时。触发二选一——同一个调用(工具名 + 稳定参数,即 `signature`)本轮已运行 ≥ `REPEAT_CALLS`(2)次;或连续结果内容相同,即连续第 3 次相同(`STALE_RESULTS` = 2,比较结果 `digest`)。文本随实际次数走:`The call you are about to reason about has already run N times in this turn and returned what you have. If the answer did not change, a different call is what changes it — not more thinking about this one.`;或 `The last N calls returned the same content. Nothing new is arriving from that direction: decide with what you have, or ask a different question.` 上限:每轮最多 `MAX_REPEAT_NUDGES`(2)次;同一证据(`signature` + `digest`)只提醒一次;错误结果**不算**循环,并且重置「结果没变」的连击——报错是需要多想一会儿的情形。实现 `src/deliberation.js`(`createProgressWatch` / `beginTurn` / `noteCall` / `planRepeatNudge`),观察表上限 `RUN_MAX` = 64 个会话、每会话保留最近 `HISTORY_MAX` = 8 次调用;全部在既有 `catch` 内,异常不会改变工具结果。
|
|
154
154
|
|
|
155
155
|
**`actBeforePlan` 的第二个信号:思考长度(1.7.1)。** 触发不看工具调用,只看这一回合已经写了多少字符的思考。读数来自 `assistant/message` 事件里的 `reasoning` 块,由 `src/usage.js` 的 `readReasoningChars` 求和(块缺失或没有 `text` 就是 0——路由不吐思考块时这个开关保持沉默),按回合累加进 `noteReasoning` 的 `reasonChars`;`beginTurn` 在新用户消息时清零。阈值 `REASONING_CHARS`(4000)字符,第 n 次提醒的门槛是 `REASONING_CHARS × (n + 1)`,每回合上限 `MAX_REASONING_NUDGES`(2)。文本逐字:``You have written about N characters of reasoning in this turn. Past that length, more thinking about facts you already have rarely changes the next action: take the action the evidence supports, or read the one fact that is still missing.`` 因为触发条件只是长度,这段文本**不说**「没有新信息」——它给的是「按已有证据动手」或「去读那一个还缺的事实」两个出口。它不写任何请求字段,也不改变 `agent/request` 的返回值。
|
|
156
156
|
|
|
157
157
|
**它们不做什么。** 不写请求字段(含 `reasoningEffort`)、不改模型与 thinking 预算、不重写答案、不强制工具调用、不减少校验。单独开的墙钟收益很小、并且只有 `actBeforePlan` 接近显著:`debugfix` + `migrate` 共 12 对、5 臂 60 次运行里,`probeFirst` 逐对几何 0.883×〔CI 0.663–1.176〕、7/12 更快,`actBeforePlan` 0.761×〔0.578–1.032〕、8/12 更快(`debugfix` 一族 0.582×、6/6),`repeatNudge` 1.007×〔0.839–1.227〕基本没变;三条一起开才是 0.647×〔0.501–0.893〕、10/12 更快——这一条 CI 不跨 1。所以面板给的是「按任务形状试」,不是「单开就快」的保证。
|
|
158
158
|
|
|
159
|
+
**推荐怎么开(1.7.1 之后)。** 大部分时候三条全开。四块实测里只有三开这一臂的 CI 每一块都不跨 1:`DP17` 12 对 0.647×〔0.501–0.893〕、`DP18` 三族 9 对 0.491×〔0.314–0.788〕、`DP19` 发布前 `ab17` 8 对 0.701×〔0.516–0.930〕、`DP20` 发布版本上 9 对 0.372×〔0.240–0.563〕;合池 30 对 0.505×〔0.401–0.635〕、26/30 更快、30/30 绿、438/438 项。只开一个时按症状选:拿不准就去读一次(`probeFirst`,21 对 0.809×,最保守),思考链太长(`actBeforePlan`,`debugfix` 0.582×),`repeatNudge` 单开无收益、只在组合里无害。实现类任务(`codeimpl`)偶尔多绕一步(`DP20` 有一对 1.04×),所以是「大多数时候」,不是无条件。
|
|
160
|
+
|
|
159
161
|
**历史:`lazy` 为什么被删(1.6.0 → 1.7.0)。** `lazy`、`lazyEffort`、`lazyVariant`、`src/lazy.js` 与请求侧的 `reasoningEffort` 改写已全部删除,不是默认关闭。证据:`LZ1` 12 对 36 次运行里,「只发文字」逐对几何墙钟 0.389×〔CI 0.252–0.600〕,「文字 + 降档」0.430×〔CI 0.273–0.677〕,两臂直接对打 1.106×〔CI 0.682–1.792〕——区间跨 1,降档这一半没测出可测量的收益;而它是唯一会改变答案而不只是时延的机制,路由又在全部 9678 行计量里报 reasoning usage 0,所以「真的降了档」从来无法被证实。留一个不可验证、还可能改答案的旋钮不值得,于是连同代码删掉。
|
|
160
162
|
|
|
161
163
|
## 配置
|
|
@@ -187,10 +189,10 @@
|
|
|
187
189
|
| `parallel` | 由档位推导,`auto` 下为 4 | 并行上限的初始值,1–8。`auto` 只把它当起点;设为 1 表示不注入批量提示段。 |
|
|
188
190
|
| `sessions` | `''` | 插件自动维护的会话级覆盖,见上一节。**不要手改。** |
|
|
189
191
|
| `outputDiscipline` | `'late'` | 输出纪律。`late`(默认)前 4 步不写任何输出约束,第 4 步起由调度器提醒一次;`true` 全程生效;`false` 关闭输出纪律,仍注入并行与有界调用规则。 |
|
|
190
|
-
| `openBatch` | `false` | 开局批量:每轮第一步发一次「把已知要做的独立调用放进同一块、shell 命令用 `&&` 串起来」。短任务的钱几乎全是每步固定成本(首字延迟 ~0.5 s/次),少一次往返就省一次;只影响第一轮第一步,长任务可忽略。旧批次里它不优于默认,但那些数字已因测量缺陷撤回(运行目录在仓库内、指标按字节偏移切片),尚无干净重测。保持在 `false`,但 1.5.33
|
|
191
|
-
| `probeFirst` | `false` | 逐会话提示开关:拿不准的代码事实(文件内容、签名、测试期望)先读一次,而不是用推理猜;`grep` 先于 `read`,先读范围再读整文件。本轮第一步发一条 notice,一句,且只在打开时发。不指定读哪个文件、不强制调用、不改请求。1.7.0
|
|
192
|
-
| `actBeforePlan` | `false` | 逐会话提示开关:不复述任务、不重讲计划;第一个工具调用之前最多一行计划,下一步已经清楚就直接做。与 `probeFirst` 共用同一条 notice 与同一句 GUARD,两个都开也只有一条消息。"最多一行"是建议措辞,不做机器截断。1.7.0
|
|
193
|
-
| `repeatNudge` | `false` | 逐会话提示开关:只在有证据时发一条轮中证据行——同一个调用(工具名 + 稳定参数)本轮已运行 ≥ 2 次,或连续 3 次结果内容相同;句子给出实际次数,每轮最多 2 次,同一证据只提醒一次,错误结果不算循环并重置连击。实现 `src/deliberation.js`,不写请求字段。1.7.0
|
|
192
|
+
| `openBatch` | `false` | 开局批量:每轮第一步发一次「把已知要做的独立调用放进同一块、shell 命令用 `&&` 串起来」。短任务的钱几乎全是每步固定成本(首字延迟 ~0.5 s/次),少一次往返就省一次;只影响第一轮第一步,长任务可忽略。旧批次里它不优于默认,但那些数字已因测量缺陷撤回(运行目录在仓库内、指标按字节偏移切片),尚无干净重测。保持在 `false`,但 1.5.33 起进面板(「批量读文件」),逐会话可开;和 `workspaceMap` 一起开 11 对 0.742×,再加 `disciplineAfterSteps: 2` 三开 22 对 0.669×〔CI 0.554–0.799〕,单独开仍测不到显著。 |
|
|
193
|
+
| `probeFirst` | `false` | 逐会话提示开关:拿不准的代码事实(文件内容、签名、测试期望)先读一次,而不是用推理猜;`grep` 先于 `read`,先读范围再读整文件。本轮第一步发一条 notice,一句,且只在打开时发。不指定读哪个文件、不强制调用、不改请求。1.7.0 起进面板(「不确定先查证」)。 |
|
|
194
|
+
| `actBeforePlan` | `false` | 逐会话提示开关:不复述任务、不重讲计划;第一个工具调用之前最多一行计划,下一步已经清楚就直接做。与 `probeFirst` 共用同一条 notice 与同一句 GUARD,两个都开也只有一条消息。"最多一行"是建议措辞,不做机器截断。1.7.0 起进面板(「先执行后解释」)。 |
|
|
195
|
+
| `repeatNudge` | `false` | 逐会话提示开关:只在有证据时发一条轮中证据行——同一个调用(工具名 + 稳定参数)本轮已运行 ≥ 2 次,或连续 3 次结果内容相同;句子给出实际次数,每轮最多 2 次,同一证据只提醒一次,错误结果不算循环并重置连击。实现 `src/deliberation.js`,不写请求字段。1.7.0 起进面板(「重复时换方法」)。 |
|
|
194
196
|
| `shapeGate` | `false` | 形状闸门:本轮累计调用 ≥ 4 且其中写入类(不在只读名单里的工具)占比 ≥ 60 % 时,**整轮不再注入任何提醒**,行为退回原生。判断只用已有的工具名,不发请求、不加请求体字段。它给的是「不适合就别管我」的退路:写密集型的任务没有可并行的调用,每条提醒都只是一次它用不上的往返。显式设了 `stepBudget` 时该收尾线优先于闸门——「别加速」不等于「无视我叫停」。默认关,因为它会同时关掉本可以救回长尾的收尾提醒。 |
|
|
195
197
|
| `preferPatch` | `false` | 整文件写入之后提醒一次「改已有文件时只发改动的行(edit hunk),不要重发整个文件」。本步 `write` 的正文 ≥ 2000 字符才武装,之后一步发一次,每轮最多一次;文本明确要求结果与原文件逐字节相同,不限制写什么、也不影响何时结束。默认关闭:它只作用于模型的输出形式(工具调用参数),正确性由文件内容决定、与发送形式无关;实测是否真省墙钟见 `BENCHMARK.md` 的 `pp16` 臂。 |
|
|
196
198
|
| `compactRereadHint` | false | 压缩提醒里多一句「本回合写过的文件不要为确认整份重读」;不新增消息。实验旋钮,默认关 |
|
package/index.js
CHANGED
|
@@ -111,7 +111,7 @@ const TAG = '[fast-mode]'
|
|
|
111
111
|
* Shipped identity of this build. Traced into the debug log so a stale install is
|
|
112
112
|
* visible at a glance, and pinned by a test against `package.json`.
|
|
113
113
|
*/
|
|
114
|
-
export const VERSION = '1.7.
|
|
114
|
+
export const VERSION = '1.7.2'
|
|
115
115
|
const GLOBAL_AGENT = '__global__'
|
|
116
116
|
|
|
117
117
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-fast-mode",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "DeepSeek Harness fast mode: fewer round trips at the same thinking effort. Adaptive parallel tool fan-out, output discipline that never trims the answer, a cancellable stall guard, and three off-by-default switches that trim wasted deliberation (read the fact you are unsure of, act after one line of plan, stop when the evidence stops arriving). It never changes reasoning effort, the model, or the request body. Provider-agnostic, one dependency (@deepseek-ai/schemastery).",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/src/config.js
CHANGED
|
@@ -98,7 +98,7 @@ export const Config = z.object({
|
|
|
98
98
|
.default('late')
|
|
99
99
|
.volatile()
|
|
100
100
|
.description(
|
|
101
|
-
'输出纪律 / Output discipline
|
|
101
|
+
'输出纪律 / Output discipline(面板「精简输出」,也是没有自己条目的会话的默认值): 让模型少写过程、只在结论处落笔。`late`(默认)不往系统提示里放文风规则,第 4 步之后由调度器提醒一次——短任务零成本,长任务实测 6 对:墙钟中位 2.68×、步数 10.5→7.5、输出 token −52%、正确性 12/12 不变。`true` 全程生效;`false` 关闭。',
|
|
102
102
|
),
|
|
103
103
|
|
|
104
104
|
shellParallel: z
|
|
@@ -116,7 +116,7 @@ export const Config = z.object({
|
|
|
116
116
|
.default(0)
|
|
117
117
|
.volatile()
|
|
118
118
|
.description(
|
|
119
|
-
'单轮步数预算 / Steps per turn
|
|
119
|
+
'单轮步数预算 / Steps per turn(面板「步数上限」,0 显示为「不限」): 用户自设的硬上限,到达后调度器提醒一次按现状汇报;0 = 不限(默认)。步数只说明成本,不说明任务是否完成——默认不再按步数催停,避免把仍在推进的长任务截断。需要成本上限时自己设。',
|
|
120
120
|
),
|
|
121
121
|
|
|
122
122
|
finishLineSteps: z
|
|
@@ -159,7 +159,7 @@ export const Config = z.object({
|
|
|
159
159
|
.boolean()
|
|
160
160
|
.default(false)
|
|
161
161
|
.description(
|
|
162
|
-
'开局批量 / Opening batch
|
|
162
|
+
'开局批量 / Opening batch(面板名「批量读文件」): 每轮第一步提醒一次「把已知要做的独立调用放进同一块、shell 命令用 && 串起来」。短任务的钱几乎全花在每步固定成本(首字延迟 ~0.5 s/次)上,少一次往返就省一次;只发一次,不改后续调度。面板可逐会话开;和 `workspaceMap` 一起开时实测 0.742×(11 对),单独开测不到显著,所以默认仍是 false。',
|
|
163
163
|
),
|
|
164
164
|
|
|
165
165
|
probeFirst: z
|
|
@@ -167,7 +167,7 @@ export const Config = z.object({
|
|
|
167
167
|
.default(false)
|
|
168
168
|
.volatile()
|
|
169
169
|
.description(
|
|
170
|
-
'
|
|
170
|
+
'不确定先查证 / Verify before guessing(面板「不确定先查证」): 每轮第一步的提示里加一句「拿不准的仓库事实就读一次:一次调用,选最便宜的那个(grep 先于 read,读范围先于整文件);结果出乎意料时先重读,再解释为什么」。只加提示文字,不改任何请求字段、不改调度、不改完成判定。依据是本插件唯一测出大收益的机制就是提示文字(LZ1 0.389×),而参数降档测不出效果;这条专门对着「用推理代替读取」这种过思考。默认关闭。',
|
|
171
171
|
),
|
|
172
172
|
|
|
173
173
|
actBeforePlan: z
|
|
@@ -175,7 +175,7 @@ export const Config = z.object({
|
|
|
175
175
|
.default(false)
|
|
176
176
|
.volatile()
|
|
177
177
|
.description(
|
|
178
|
-
'
|
|
178
|
+
'先执行后解释 / Act before explaining(面板「先执行后解释」): 每轮第一步加一句「不复述任务、不重讲计划;第一个工具调用之前最多一行计划,动作已经清楚就直接做」。省的是每一步的输出字符(实测输出中位一万字符以上),对推理量不一定有效,所以它和另外两条是不同机制、分开开关。默认关闭。',
|
|
179
179
|
),
|
|
180
180
|
|
|
181
181
|
repeatNudge: z
|
|
@@ -183,7 +183,7 @@ export const Config = z.object({
|
|
|
183
183
|
.default(false)
|
|
184
184
|
.volatile()
|
|
185
185
|
.description(
|
|
186
|
-
'
|
|
186
|
+
'重复时换方法 / Evidence nudge(面板「重复时换方法」): 轮内检测两种「没有新信息还在想」的证据——同一个调用(工具名+参数)本轮已经出现 ≥2 次,或连续 ≥3 次工具结果的内容完全相同;命中时在下一步之前发一句带计数的提醒,每轮最多两次、同一证据不重复。它只读本轮已经发生的调用,不发请求、不写请求字段。按推理字符数触发只是「过度思考」的代理指标,短任务上会误触发,这条改用它本身的定义。默认关闭。',
|
|
187
187
|
),
|
|
188
188
|
|
|
189
189
|
preferPatch: z
|
|
@@ -235,7 +235,7 @@ export const Config = z.object({
|
|
|
235
235
|
.default(false)
|
|
236
236
|
.volatile()
|
|
237
237
|
.description(
|
|
238
|
-
'工作区清单 / Workspace inventory
|
|
238
|
+
'工作区清单 / Workspace inventory(面板「开局附文件清单」): 会话开始时不调用任何工具,harness 自己走一遍 cwd(深度 2、最多 60 条、跳过 node_modules 等)把路径、大小和现有测试入口作为一条提示交给模型。实测 `def15` 会话里 35.7% 的工具调用是 ls/find/cat 这类探路,其中 40% 出现在前两次调用里——这一步就是把那次往返拿掉。只发一次,不隐藏任何文件,读文件仍由模型自己决定。',
|
|
239
239
|
),
|
|
240
240
|
|
|
241
241
|
mapEntries: z
|