youjiaqi421/dsh-plugin-workspace-rules ↗★ 0
dsh-plugin-workspace-rules
Load Cursor, Gemini CLI, and GitHub Copilot workspace instructions into DeepSeek Harness.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:youjiaqi421/dsh-plugin-workspace-rules说明文档
阅读完整 README ↗dsh-plugin-workspace-rules
English | 中文
将 Cursor、Gemini CLI 和 GitHub Copilot 已有的工作区指令加载到 DeepSeek Harness 中。
插件默认按以下顺序读取工作区根目录中的文件:
.cursorrulesGEMINI.md.github/copilot-instructions.md
缺失和空文件会被忽略。已有文件会合并成一个有序的系统提示段,并在每次模型请求前重新读取,因此修改规则后不需要重启 Harness。文件中的 {{...}} 会保持原样,不会被当作 Harness 提示变量解析。
从 GitHub 安装
在 npm 版本发布前,可以直接把 GitHub 仓库安装到 Harness profile:
dsh plugin --profile web add github:youjiaqi421/dsh-plugin-workspace-rules
pnpm 10 及以上版本默认禁止 Git 依赖运行构建脚本。如果安装过程要求批准构建,请把它提示的准确包名加入该 profile 的 pnpm-workspace.yaml:
allowBuilds:
dsh-plugin-workspace-rules: true
然后重新执行安装命令。批准构建意味着允许本仓库的 prepare 脚本在本机运行;在受信任环境中使用时,请先审查源码并固定具体提交。
配置
安装后的 bundle 无需配置即可工作。如需覆盖默认值,请编辑 profile 的 cordis.patch.yml:
- id: workspace-rules
config:
root: .
files:
- .cursorrules
- GEMINI.md
- .github/copilot-instructions.md
- docs/agent-rules.md
maxFileBytes: 65536
maxTotalBytes: 131072
order: 20
root 相对于启动 dsh 时的目录解析。每个文件路径都必须是相对路径,并且不能离开该根目录。重复路径、目录、无效 UTF-8、无法读取的文件以及大小超限都会明确报错,避免智能体在指令静默缺失的情况下运行。
行为
- 文件顺序就是配置顺序。
- 缺失文件和仅包含空白的文件不产生内容。
- 文件使用严格 UTF-8 解码,并移除开头的字节顺序标记。
maxFileBytes限制单个源文件大小。maxTotalBytes限制包含标题在内的最终 Markdown 大小。- 系统提示段默认顺序为
20,位于部署 persona 之后、工具说明之前。 - 规则文本会进入请求中记录的系统提示,保持 Harness 的回放行为。
开发
需要 Node.js ^22.19.0 || >=24 和 pnpm。
pnpm install
pnpm run check
在本目录中将当前 checkout 安装到本地 profile:
dsh plugin --profile web add .