dsh-anchored-standard:兩階段錨定 Standard 的 DSH 預設

前言

在 DeepSeek Harness(DSH)裏跑智能體任務,首輪請求裏暴露給模型的工具集和提示詞,會直接影響後續推理軌跡。社區評測(xiaobright/modeltest)顯示:Standard 預設首輪即暴露 25 個工具,在 Project2 V4.1b 上得分約 91/92;Minimal 預設首輪只有一行提示加 2 個工具,得分約 99/96,但工具面太窄,難以支撐真實工程。若你希望在保留 Minimal 首輪軌跡優勢的同時,後續仍能調用完整 Standard 工具目錄,下面介紹社區插件 dsh-anchored-standard

這是什麼

dsh-anchored-standard 是維護者 Jungod1121 發佈的 DSH 工作流類插件(當前版本 v1.2.1,MIT 許可證)。它實現一個兩階段 agent 預設:首輪用與 Minimal 對齊的精簡提示和少量工具完成「錨定」,在會話記錄第一次持久的 tool/call 或回覆之後,自動切換到完整 Standard 工具目錄(25 個工具)。

設計思路來自社區項目 xiaobright/dsh-anchored-standard。同一參考評測中,該方案在 Project2 V4.1b 上得分約 98/99(n=2、單一凍結任務,不代表所有場景)。

工作原理

插件的核心是兩階段提升(promotion):

sequenceDiagram
    participant U as User
    participant A as Agent loop
    participant M as DeepSeek V4 Pro

    U->>A: first message (new session)
    A->>M: request #1<br/>task-matched anchor persona<br/>tools: bash + read (± edit/write)
    Note over M: reasoning chain anchors on the task-matched scaffold
    M->>A: first tool/call
    Note over A: promotion signal (durable session event)
    A->>M: request #2<br/>same persona · all 25 Standard tools
    Note over M: full-capability work continues on the anchored trajectory
  1. 會話的第一條用戶消息決定錨定類型:
任務類型 錨定角色 首輪工具
spec — 修復 / 維護 / 調試 Minimal 原版提示 bash + read + edit
react — 從零構建 / 創建 動手實踐型提示 bash + read + write
weak — 意圖不明確 模型自行分類(Pro 用 classify instruction) bash + read

glob / grep 不出現在任何引導階段工具目錄中;edit / write 被視爲錨定安全工具。首輪請求中,錨定角色是唯一提示段落,運行時上下文被清空。

  1. 會話產生第一次持久的 tool/call 後,後續每個請求看到完整 Standard 目錄;錨定角色保持不變,plan-mode 等其餘段落恢復。模式和提升狀態寫入持久會話事件,刷新或恢復會話後仍有效。

安裝與啓用

插件通過 DSH 安裝器 bundle 分發,推薦命令如下:

dsh plugin --profile web add github:Jungod1121/dsh-anchored-standard

執行後重啓 DeepSeek Harness。bundle 會把預設複製到 $DSH_HOME/.agent-presets/anchored-standard/(冪等操作,不會覆蓋本地修改)。新建空白會話,選擇 Anchored Standard (experimental) 即可使用。

若要將其設爲新建會話的默認預設,編輯 $DSH_HOME/settings.yaml

# $DSH_HOME/settings.yaml
agent-presets:
  default: anchored-standard

也可手動複製預設目錄:

dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
cp -R preset "$dsh_home/.agent-presets/anchored-standard"

卸載:

dsh plugin --profile web remove dsh-anchored-standard
rm -rf "${DSH_HOME:-$HOME/.dsh}/.agent-presets/anchored-standard"

驗證兩階段切換

導出會話 JSONL,檢查 request/header 事件。首輪 header 只含 bash / read(及可能的 edit / write),提升後 header 包含全部 25 個工具:

seq 18  -> 2 tools  ['bash', 'read']                       # request #1
seq 137 -> 25 tools ['ask_user_question', 'bash', ...]     # request #2 (promoted)

與 Minimal、Standard 的取捨

對比對象 獲得 代價
vs Minimal 多 23 個工具(glob / grep / edit / write / web_search / subagents / workflows / skills / goals / todo 等) 引導階段多一輪推理
vs Standard 任務匹配的軌跡錨定(參考評測 98/99 vs 91/92)+ 更乾淨的首輪請求 首輪工具目錄由關鍵詞分類決定,模糊任務回退到 weak 錨定

適用場景與注意

適合誰

  • 使用 DeepSeek V4 Pro(reasoningEffort: max)在 DSH 中處理工程任務,希望首輪推理軌跡接近 Minimal、後續又能調用完整 Standard 能力。
  • 已在 Harness 0.1.0-rc.6 上驗證機制;升級上游前建議複查兼容性。

不適合誰

  • V4 Flash 模型:README 指出 Flash 對 harness 風格變化不敏感,無需此預設。

安裝前須知

  • 插件以當前 DSH 進程權限運行,安裝前應檢查 源碼 與 MIT 許可證。
  • 這是社區項目,非 DeepSeek 官方預設,與 DeepSeek / 幻方無從屬關係。
  • 98/99 評測分數來自 xiaobright/modeltest Project2 V4.1b,n=2、單一任務,是可復現的參考證據,不是通用保證。

結尾

dsh-anchored-standard 用「首輪錨定 + 後續全量工具」的兩階段策略,在 DSH 裏兼顧 Minimal 的推理軌跡與 Standard 的工具廣度。若你正在調試 Pro 模型的首輪行爲,可以從新建會話選用該預設開始。

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

小夜