D
openharness-core-rule
v0.1.0 · 2 天前发布
DSH plugin that injects the project's core underlying rules (分阶段/先问/UI 优先) as a high-priority system prompt and shows a「核心铁律」row in the web settings sidebar.
README
openharness-core-rule
一个 DeepSeek Harness(dsh)插件:往系统提示词注入「核心底层要求 · 五条铁律」的高优先级规则
(分阶段完成、有问题先问、UI 优先、可见即验收、用户确认才算完成),并在 dsh 设置页侧边栏显示「核心铁律」一项。
ctx.systemPrompt.section({ name, order: 44, text }) 注入规范(真实逻辑);settings.section 槽,显示侧边栏项(写法与已发布的公开插件 openharness-reply-in-cn / openharness-rule-for-dsh-plugin 完全同构,仅 id/label 不同)。对使用者:注入的规则正文是自包含、环境无关的——就是本仓库 000-core-rule.md 的完整内容,不依赖任何本地目录或私有资料。任何安装此插件的人都能读到同样明确、可执行的铁律。
---
注入逻辑(host half,src/host/index.ts)
```ts
export const inject = ['systemPrompt'] // 申报依赖,否则 boot 崩
export const name = 'openharness-core-rule'
export function apply(ctx, config) {
if (config?.enabled === false) return // 可通过 patch 关闭
const di
版本兼容矩阵
| DSH 版本 | 状态 | 说明 |
|---|---|---|
dsh@0.1.0-rc.6 | ✅ 兼容 | cordis patch ✅ |
dsh@0.1.0 | ✅ 兼容 | 标准 patch ✅ |
dsh@0.2.0 | ⚠️ 待验证 | 待实测(API 可能在变) |
dsh@0.3.0+ | ❓ 未知 | 尚未发布 |
💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正
元数据
- License
- MIT
- npm
- openharness-core-rule
- Repo
- —
- Engines
{}- Weekly DL
- 0
- Monthly DL
- 0
- dsh.bundle
{"bundle":{"patch":"./cordis.patch.yml"},"client":{"platform":"web","inject":["@deepseek-ai/dsh-client-runtime"]}}