← 返回列表
未验证
按模型路由自动追加文件阅读与思考提示词
尚未跑自动兼容性验证,可查看页面内的依赖与入口分析。 · 最近上游提交 2026/8/15 · 已提供中文文档
一个可配置的 DeepSeek Harness 插件,为选定的 GPT 模型提示词添加文件读取规范。
综合分
27.5
GitHub 分
27.5
用户评分
—
★ Stars
1
周下载量
—
兼容 / 相关生态插件(非 dsh 原生,请按其对应运行时安装)
git clone https://github.com/youxi-huang/dsh-gpt-file-discipline.git数据截至 2026/9/16(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
依赖的 DSH / Cordis 模块
@deepseek-ai/schemastery用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
dsh-gpt-file-discipline dsh-gpt-file-discipline 是一个小型 DeepSeek Harness 宿主插件,它会根据模型路由静默切换一个条件性系统提示词片段。它会等待下游 waterfall 监听器完成后再进行匹配,因此使用的是为当前确切步骤所选的 provider 和 model,而不是更早的路由候选。 - GPT 路由(provider 恰好为 codex,且模型以 gpt- 开头):追加文件纪律片段。 - DeepSeek 路由(provider 或 model 以 deepseek 开头):追加 DeepSeek 思考语言片段。 - 任何其他路由:完全原样返回下游组装结果。 该插件不注册任何静态提示词片段。它唯一能添加的提示词内容是在路由匹配后追加的那个片段,因此未匹配的路由不会产生额外的上下文、token、过滤或片段开销。 为 DSH profile 安装 本仓库发布后,使用 GitHub 包规格将其添加到 DSH profile: dsh plugin --profile add github:youxi-huang/dsh-gpt-file-discipline 该包声明 cordis.patch.yml 作为其 bundle patch。其官方 patch-entry 数组挂载一个插件行: - insert: - id: gpt-file-discipline name: dsh-gpt-file-discipline Cordis 会校验导出的 Schemastery Config,应用其默认值,并负责监听器的注册与清理。 默认值 | 路由 | 匹配条件 | 片段 | 文本 | | --- | --- | --- | --- | | GPT | provider 为 codex + model 前缀为 gpt-(不区分大小写) | model-file-discipline | 文件纪律指引(见下文) | | DeepSeek | provider 或 model 前缀为 deepseek(不区分大小写) | route:deepseek-thought | 思考语言指引(见下文) | GPT 文本: 本地文档横跨许多松散相关的系统,并包含休眠或已废弃的材料,因此不要推测性地浏览文件:先定位相关来源,只阅读最小必要的段落,并严格保持在用户定义的范围内。 DeepSeek 文本: when you thought,thought in ENGLISH,start with "We need..." 出处说明:DeepSeek 那一行是来自 Bilibili 评论区的社区共享文本,并非本包作者原创。其有效性仅为传闻;只有在证明有用时才保留它。 如果匹配路由的片段已存在,插件会保持组装结果不变。DeepSeek 在 GPT 之前检查。 配置 Cordis 配置补丁是顶层的 patch-entry 数组。为两个路由配置的 insert 如下所示: - 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 | 字段 | 默认值 | 含义 | | --- | --- | --- | | provider | codex | GPT 路由所需的精确 provider。 | | modelPrefix | gpt- | GPT 路由所需的模型前缀。 | | promptText | 文件纪律文本 | GPT 文本,保留自原始插件 API。 | | gptText | _未设置_ | 可选别名,提供时覆盖 promptText。 | | sectionName | model-file-discipline | 为 GPT 路由追加的节名称。 | | deepseekProviderPrefix | deepseek | 基于 provider 的 DeepSeek 匹配前缀。 | | deepseekModelPrefix | deepseek | 基于模型的 DeepSeek 匹配前缀。 | | deepseekText | 上方的 DeepSeek 文本 | 为 DeepSeek 路由追加的节文本。 | | deepseekSectionName | route:deepseek-thought | 为 DeepSeek 路由追加的节名称。 | | caseSensitive | false | 启用区分大小写的前缀匹配。 | 文本字段必须为非空字符串。节名称必须为 1–128 个字符,以字母或数字开头,且只能包含字母、数字、.、_、: 或 -。caseSensitive 必须为布尔值。 配置文件安装会将 bundle 应用到 DSH 主机,因此插入的插件是主机范围的。若仅用于预设,请使该包可被 DSH 解析而不添加其 bundle 层,然后向该预设的顶层条目列表添加一个普通插件行: - id: gpt-file-discipline name: dsh-gpt-file-discipline config: provider: codex modelPrefix: gpt- sectionName: route:gpt-file-discipline 一种实用的做法是将该包安装为依赖项,然后在预设中挂载该行之前,从该配置文件的 dsh.profile.bundles 列表中移除 dsh-gpt-file-discipline。不要使用以包名为键的映射:agent 预设组合是插件行的顶层数组。 卸载 使用已安装的包名从同一 DSH 配置文件中移除它: dsh plugin --profile remove dsh-gpt-file-discipline 这会移除由 bundle 管理的 Cordis 行;卸载插件会释放其监听器注册。 开发 已提交的 index.js 是包的入口点;无需构建或准备步骤。 npm run check:syntax npm test 许可证 MIT © 2026 youxi-huang
扫码进群