AIGC标识 DeepSeek Harness 修改前两句系统提示词为极简模式版本

基线 dsh 0.2.2-rc.1 Web profile。只影响提示词开头两句话,工具、技能、运行时上下文都不变。

# 改前
You are an AI agent powered by DeepSeek Harness.
You are a coding agent powered by the dfmodel model.

# 改后
You are a helpful software engineer assistant.

改法

在 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加两个 patch(后命中的覆盖先命中的)。

1) 全局去掉身份句

- id: system-prompt
  name: '@deepseek-ai/dsh-system-prompt'
  config:
    includeHarnessIdentity: false
    personaPrefix: >-
      You are a coding agent powered by the {{model}} model.

personaPrefix 不能省:命中行的 config 是整体替换、不做深合并,只写 includeHarnessIdentity: false 会把 web 层原有的人设句重置成空串,第一句直接消失。

2) 覆写 standard 与 ptc 两套预设

- id: preset-standard          # 另一行是 preset-ptc,写法相同
  name: '@deepseek-ai/dsh-agent-preset'
  config:
    id: standard
    order: 1
    plugins:
      - id: persona
        name: '@deepseek-ai/dsh-persona'
        config:
          prefix: You are a helpful software engineer assistant.
      # ... 其余行原样照抄,一行不能少 ...

出厂全表在 @deepseek-ai/dsh-web-app/presets/standard.patch.yml(ptc 同名),把每行整体左移 4 空格即可。同样因为 config 整体替换,漏掉的行等于删掉对应插件。!!js 表达式逐字保留;preset-minimal、preset-cordis 不动。

不要加 complete: true——它会让该前缀成为唯一段落,工具指导和技能目录全部丢失。

生效与验证

必须新开会话:patchReload: live 只重载配置,已开会话仍用启动时的 preset 版本。

dsh --profile web --dump-config | grep -A4 '^- id: system-prompt'
dsh --profile web --dump-config | grep -A12 '^- id: preset-'

输出里的 entry "..." not found 警告(如 llm-commandcode、auto-continue)改动前就存在,与本文无关。

维护

整表照抄的代价是版本漂移:升级后上游新增的工具行不会自动出现在你的覆写里。升级时与出厂 presets/*.patch.yml 逐行对比一次,除 persona.prefix 外应完全一致。

posted @ 2026-11-06 17:46  145a  阅读(42)  评论(0)    收藏  举报