dshbase

插件目录 / Developer / dsh-gpt-file-discipline

dsh-gpt-file-discipline

未验证 youxi-huang

✓ 持续维护 基于 1 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
语言
2026-08-15最近推送
跨平台平台

功能简介

A configurable DeepSeek Harness plugin that adds file-reading discipline to selected GPT model prompts.

我们的评价
未验证 — 尚未实测

A configurable DeepSeek Harness plugin that adds file-reading discipline to selected GPT model prompts. 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

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

Route Match Section Text
GPT provider codex + model prefix gpt- (case-insensitive) model-file-discipline File-discipline guidance (below)
DeepSeek provider or model prefix deepseek (case-insensitive) route:deepseek-thought Thought-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
Field Default Meaning
provider codex Exact provider required for the GPT route.
modelPrefix gpt- Model prefix required for the GPT route.
promptText file-discipline text GPT text, kept from the original plugin API.
gptText unset Optional alias that overrides promptText when supplied.
sectionName model-file-discipline Section name appended for the GPT route.
deepseekProviderPrefix deepseek Prefix for provider-based DeepSeek matching.
deepseekModelPrefix deepseek Prefix for model-based DeepSeek matching.
deepseekText DeepSeek text above Section text appended for the DeepSeek route.
deepseekSectionName route:deepseek-thought Section name appended for the DeepSeek route.
caseSensitive false Enables 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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-gpt-file-discipline」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

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

Headless(CLI)profile:

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

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-27
备注:验证: runtime-fail 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →