为 DeepSeek Harness 提供「锚定标准」两阶段预设,首轮用极简工具开局,模型动手后自动恢复完整目录。
- 语言
- JavaScript
- License
- MIT
- 分支
- main
安装
$ dsh plugin --profile web add github:Jungod1121/dsh-anchored-standard在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程
对话式安装
帮我安装 DeepSeek Harness 插件 Jungod1121/dsh-anchored-standard:先查看仓库 https://github.com/Jungod1121/dsh-anchored-standard 确认安全性,然后执行安装命令并验证插件加载成功。
把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。
一句话定位
这是一个面向 DeepSeek Harness 的「两阶段 agent 预设」:首条用户消息决定用极简工具开局,等模型做出第一个有效工具调用后,自动恢复完整的 Standard 工具目录。
核心能力
- 按首条消息关键字分类任务(修复类→spec,构建类→react,模糊→weak)
- 首轮只暴露任务匹配的最小工具集(最多 3 个),对齐 V4 Pro 的 Minimal 风格推理轨迹
- 首个持久化工具调用触发晋升,会话内所有后续请求恢复全部 25 个 Standard 工具
- 会话模式与晋升状态从持久化事件派生,刷新页面或恢复会话不会回退
- 模糊任务下根据模型版本(Pro/Flash)自动选用不同的中性引导文案
- 本地手工修改的预设文件不会被 bundle 升级覆盖(仅首次安装写入,差异件告警保留)
技术实现
- 语言: JavaScript(ESM,Node 内置模块)
- 关键依赖: 无第三方依赖;仅使用
node:fs/node:os/node:path/node:url - 架构模式: Cordis bundle patch 注入 + agent preset;安装器用
apply(ctx)把 preset 目录幂等复制到$DSH_HOME/.agent-presets/anchored-standard/,宿主再从该目录加载tool-bootstrap.mjs作为 prompt-assembly 过滤器 - 入口文件:
index.js(安装器) +preset/agent.cordis.yml(preset 定义) +preset/tool-bootstrap.mjs(两阶段分类与晋升逻辑)
适用场景
用户在 DeepSeek Harness 上做相对复杂的多回合开发会话时,会希望模型在第一步就走对推理策略——但官方 Standard 预设一次性塞 25 个工具,会让 V4 Pro 倾向于保守。本插件适合需要「首轮要稳、后续要全」的开发场景,尤其是中长会话的修复/重构/从零搭建类任务。
前置依赖与兼容性
| 依赖 | 最低版本 | 说明 |
|---|---|---|
| DeepSeek Harness | 0.1.0-rc.6 | README 与源码注释均标注此版本;harness 处于 developer preview,升级前需核对上游 |
| Node.js | 未声明 | 插件未在 package.json 声明 engines 字段 |
| 平台 | 跨平台 | preset 自动启用 bash(macOS/Linux)或 pwsh(Windows)作为任务 shell |
| 原生模块 | 无 | 仅使用 Node 内置模块 |
| 模型 | DeepSeek V4 Pro + reasoningEffort: max | 针对 Pro 设计;Flash 不需要此预设 |
安装方式
dsh plugin --profile web add github:Jungod1121/dsh-anchored-standard
安装完成后重启 Harness,新建空白会话时可在预设列表中选择「锚定标准模式」;如需设为新会话默认,可在 $DSH_HOME/settings.yaml 中将 agent-presets.default 设为 anchored-standard。
配置项
| 配置 | 类型 | 说明 | 默认值 |
|---|---|---|---|
agent-presets.default | settings 项 | 设为 anchored-standard 可让新建会话默认使用本预设 | 未设置(用户在 UI 中手动选) |
DSH_HOME | 环境变量 | 预设安装目录由此变量决定;未设置时使用 ~/.dsh | ~/.dsh |
bundle 安装器不接收运行时配置参数;preset 内置的子工具(如 bash、read、edit、write)行为由宿主预设决定,无需在本插件中配置。
常见问题
Q: 这个插件和官方 Standard 预设有什么区别?
A: 表面能力相同——完整 25 工具目录都会在首个工具调用后恢复。区别在于首轮:Standard 一次性把全部工具推给模型,本预设只暴露 2-3 个任务匹配的工具,先把推理轨迹锚定在 Minimal 风格的开局上。
Q: 我怎么知道「锚定」是否真的生效了?
A: 导出会话 JSONL,检查 request/header 事件——第一个 header 里只会出现 bash/read(spec 任务多一个 edit,react 任务多一个 write),从第二个 header 起就是完整的 25 工具目录。
Q: 卸载时会自动删除预设目录吗?
A: 不会。卸载 bundle 不会触碰 $DSH_HOME/.agent-presets/anchored-standard/,如需彻底清理需手动 rm -rf。
Q: 我修改了本地 preset 文件,会被覆盖吗?
A: 不会。安装器只在目标文件不存在时写入;内容完全一致时跳过;内容不同时保留本地版本并打印一条警告。
Q: 模糊不清的任务怎么锚定?
A: 关键词分类器返回 weak 模式后由模型自己分类:Pro 模型拿到中性 prompt 加一句分类指令;Flash 模型额外加一条「不重复已完成步骤、禁止环境检查」的引导。
Q: 这个预设适合 V4 Flash 模型吗?
A: README 明确说明 Flash 不需要——它在跨 harness 泛化时更稳定(风格变化、分数不变)。本预设专门针对 Pro + reasoningEffort: max 设计。
Q: 会话被刷新或恢复,锚定状态会丢失吗?
A: 不会。模式和晋升状态都从持久化的会话事件派生,刷新和恢复都安全。
上手难度
入门 — 安装一条命令即生效,重启后在会话预设里选中即可;除可选的 settings.yaml 默认值外无任何额外配置。
已知问题与限制
- 能力评测数据来自
xiaobright/modeltest的 Project2 V4.1b 题面,n=2 单次冻结题面,不是跨模型或跨任务的通用保证。 - harness 处于 developer preview,本预设基于
0.1.0-rc.6验证;harness 升级后若 prompt assembly 接口或事件名变化,预设可能失效,需先核对上游改动。 - 本地手工编辑的 preset 文件升级时不会被覆盖,可能导致预设与新版本错位——需自行同步。
- 模糊任务(weak)下的最终策略取决于模型自身的分类判断,存在分类错误风险。
- 设计目标只覆盖 DeepSeek V4 Pro,对 Flash / 其他第三方模型没有针对性调优。
Anchor the first request. Unlock the full stack.
A two-phase agent preset for DeepSeek Harness: bootstrap DeepSeek V4 Pro with the Minimal-aligned prompt and two tools, then expose the complete Standard catalog after the first durable tool call or reply.
The one-line idea
V4 Pro's ability ceiling is high — but which reasoning strategy it uses is
decided by what the first API request shows it. The community evaluation
at xiaobright/modeltest measured:
| Preset | First request sees | Full task sees | Project2 V4.1b (max) |
|---|---|---|---|
| Standard | 25 tools + long prompt | 25 tools | 91 / 92 |
| Minimal | 1-line prompt + 2 tools | 2 tools only | 99 / 96 — but too narrow for real work |
| Anchored Standard | 1-line prompt + 2 tools | all 25 tools | 98 / 99 |
The gain comes from anchoring the first-turn trajectory — not from keeping the tool surface small forever. This preset keeps Minimal's brain and gives it Standard's hands.
How it works
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
-
The session's first user message picks the anchor:
Task Persona First-request tools spec — fix / maintain / debug Minimal's exact prompt bash+read+editreact — build / create from zero hands-on doer prompt bash+read+writeweak — ambiguous model self-picks (Pro: classify instruction) bash+readglob/grepstay out of every bootstrap catalog — measured trajectory boundary for V4 Pro;edit/writeare anchor-safe. -
On request #1 the persona is the ONLY prompt section and runtime contexts are cleared — the cleanest possible opening.
-
After the session records its first durable
tool/call, every later request sees the full Standard catalog; the chosen persona stays constant and the remaining sections (plan-mode etc.) return. Nothing is injected after turn one (measured: post-anchor guidance hurts Pro).
Mode and promotion state live in durable session events, so refresh and resume preserve them.
Install
Option A — installer bundle (recommended)
dsh plugin --profile web add github:Jungod1121/dsh-anchored-standard
Restart DeepSeek Harness. The bundle copies the preset into
$DSH_HOME/.agent-presets/anchored-standard/ (idempotent — local edits are
never overwritten), then create a blank session and select
Anchored Standard (experimental). To make it the default preset for new
sessions:
# $DSH_HOME/settings.yaml
agent-presets:
default: anchored-standard
Option B — manual preset directory
dsh_home="${DSH_HOME:-$HOME/.dsh}"
mkdir -p "$dsh_home/.agent-presets"
cp -R preset "$dsh_home/.agent-presets/anchored-standard"
Verify
Export the session JSONL and inspect request/header events — the first
header contains only bash/read, every later header the full catalog:
seq 18 -> 2 tools ['bash', 'read'] # request #1
seq 137 -> 25 tools ['ask_user_question', 'bash', ...] # request #2 (promoted)
What you get vs what you give up
| You get | Trade-off | |
|---|---|---|
| vs Minimal | 23 more tools: glob/grep/edit/write/web_search/subagents/workflows/skills/goals/todo… | one extra reasoning round for the bootstrap |
| vs Standard | task-matched trajectory anchors (98/99 vs 91/92 in the reference eval) + a first turn that is cleaner than Standard's | the first-request catalog is decided by keyword classification — ambiguous tasks fall back to the weak anchor and let the model pick |
Evidence & honest boundaries
- Mechanism (task-matched bootstrap catalog → full catalog) is verified on
harness
0.1.0-rc.6at the wire level; the classifier and anchor tables are unit-tested. - The 98/99 ability scores are
xiaobright/modeltestProject2 V4.1b — n=2 on one frozen task. They are reproducible evidence for that task, not a universal guarantee across models or workloads. The spec/react/weak anchor design incorporates measured findings fromyjh051108/dsh-router-standard(P1-P24) and xiaobright's trajectory boundary probes. - V4 Flash does not need this: it generalizes across harnesses (style changes,
scores don't). This preset targets Pro with
reasoningEffort: max.
Uninstall
dsh plugin --profile web remove dsh-anchored-standard
rm -rf "${DSH_HOME:-$HOME/.dsh}/.agent-presets/anchored-standard"
Compatibility
Developed and verified against DeepSeek Harness 0.1.0-rc.6. The harness is a
developer preview with breaking changes — review upstream changes before
upgrading.
Community & license
This is a community project: not an official DeepSeek preset, not affiliated
with or endorsed by DeepSeek. Design inspired by
xiaobright/dsh-anchored-standard
(see NOTICE). MIT — LICENSE.
查看使用指南 →
该插件的安装步骤、关键要点、FAQ 与兼容性说明(基于已收录字段派生)。
收录徽章
[](https://deepseek-plugin.org/plugins/Jungod1121/dsh-anchored-standard)把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。