DeepSeek Harness 插件

dsh-gpt-file-discipline

A configurable DeepSeek Harness host plugin that adds file-discipline guidance to selected model steps.(英文原文)

跳到安装方式

来源信息

GitHub 仓库
youxi-huang/dsh-gpt-file-discipline
最近更新
2026年8月15日
分类
模型与服务商
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/youxi-huang/dsh-gpt-file-discipline
插件名:dsh-gpt-file-discipline
作者:youxi-huang

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-gpt-file-discipline

dsh-gpt-file-discipline is a small DeepSeek Harness host plugin that silently switches one conditional system-prompt section by model route. It waits for downstream waterfall listeners before matching, so it uses the provider and model chosen for the exact step rather than an earlier route candidate.

  • GPT route (provider is exactly codex and the model starts with gpt-): appends the file-discipline section.
  • DeepSeek route (the provider or the model starts with deepseek): appends the DeepSeek thought-language section.
  • Any other route: returns the downstream assembly completely unchanged.

The plugin registers no static prompt section. The only prompt content it can add is the one appended section after a route matches, so an unmatched route costs no extra context, token, filtering, or section overhead.

Install for a DSH profile

After this repository is published, add it to a DSH profile with the GitHub package spec:

dsh plugin --profile <profile> add github:youxi-huang/dsh-gpt-file-discipline

The package declares cordis.patch.yml as its bundle patch. Its official patch-entry array mounts one plugin row:

- insert:
    - id: gpt-file-discipline
      name: dsh-gpt-file-discipline

Cordis validates the exported Schemastery Config, applies its defaults, and owns listener registration and cleanup.

Defaults

RouteMatchSectionText
GPTprovider codex + model prefix gpt- (case-insensitive)model-file-disciplineFile-discipline guidance (below)
DeepSeekprovider or model prefix deepseek (case-insensitive)route:deepseek-thoughtThought-language guidance (below)

GPT text:

> Local documents span many loosely related systems and include dormant or retired material, so do not browse files speculatively: locate the relevant source first, read only the smallest necessary passages, and stay strictly within the user-defined scope.

DeepSeek text:

> when you thought,thought in ENGLISH,start with "We need..."

> Attribution note: the DeepSeek line is community-shared text from a Bilibili comment section, not original work by this package's author. Its effectiveness is anecdotal; keep it only if it proves useful.

If the matching route's section already exists, the plugin leaves the assembly unchanged. DeepSeek is checked before GPT.

Configuration

Cordis configuration patches are top-level patch-entry arrays. A configured insert for both routes looks like this:

- insert:
    - id: gpt-file-discipline
      name: dsh-gpt-file-discipline
      config:
        provider: codex
        modelPrefix: gpt-
        gptText: Use only the designated project sources.
        sectionName: route:gpt-file-discipline
        deepseekProviderPrefix: deepseek
        deepseekModelPrefix: deepseek
        deepseekText: '**when you thought,thought in ENGLISH,start with "We need..."**'
        deepseekSectionName: route:deepseek-thought
        caseSensitive: false
FieldDefaultMeaning
providercodexExact provider required for the GPT route.
modelPrefixgpt-Model prefix required for the GPT route.
promptTextfile-discipline textGPT text, kept from the original plugin API.
gptText_unset_Optional alias that overrides promptText when supplied.
sectionNamemodel-file-disciplineSection name appended for the GPT route.
deepseekProviderPrefixdeepseekPrefix for provider-based DeepSeek matching.
deepseekModelPrefixdeepseekPrefix for model-based DeepSeek matching.
deepseekTextDeepSeek text aboveSection text appended for the DeepSeek route.
deepseekSectionNameroute:deepseek-thoughtSection name appended for the DeepSeek route.
caseSensitivefalseEnables case-sensitive prefix matching.

Text fields must be nonblank strings. Section names must be 1–128 characters, start with a letter or digit, and contain only letters, digits, ., _, :, or -. caseSensitive must be a boolean.

Profile installation applies the bundle to the DSH host, so the inserted plugin is host-wide. For preset-only use, make the package resolvable to DSH without adding its bundle layer, then add an ordinary plugin row to that preset's top-level entry list:

- id: gpt-file-discipline
  name: dsh-gpt-file-discipline
  config:
    provider: codex
    modelPrefix: gpt-
    sectionName: route:gpt-file-discipline

One practical route is to install the package as a dependency and then remove dsh-gpt-file-discipline from that profile's dsh.profile.bundles list before mounting the row in the preset. Do not use a map keyed by package name: agent preset compositions are top-level arrays of plugin rows.

Uninstall

Remove it from the same DSH profile using the installed package name:

dsh plugin --profile <profile> remove dsh-gpt-file-discipline

This removes the bundle-managed Cordis row; unloading the plugin disposes its listener registration.

Development

The committed index.js is the package entry point; no build or prepare step is required.

npm run check:syntax
npm test

License

MIT © 2026 youxi-huang