dsh-rules 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.zh.md CHANGED
@@ -1,188 +1,188 @@
1
- # dsh-rules
2
-
3
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
- [![DSH Plugin topic](https://img.shields.io/badge/topic-dsh--plugin-blue)](https://github.com/topics/dsh-plugin)
5
-
6
- [English](./README.md) | **中文**
7
-
8
- 面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的 rules 插件:**通过 glob 匹配文件路径,激活对应的提示词 / markdown 文档**,对标 Claude Code 的 `rules.md` / `# Path:` 规则机制。每条规则声明 glob 模式;当 agent **读取或编辑**了匹配文件时规则激活,其内容(任意提示词或 markdown 文档)作为一条"取代旧快照"的 `<rules>` 用户消息注入对话。
9
-
10
- > 适用于**所有 DSH 部署**:desktop / web / tui / headless / 自定义 profile——插件本身没有任何 desktop 专属依赖。
11
-
12
- ## 目录
13
-
14
- - [特性](#特性)
15
- - [工作原理](#工作原理)
16
- - [安装](#安装)
17
- - [规则格式](#规则格式)
18
- - [配置项](#配置项)
19
- - [发现与收录](#发现与收录)
20
- - [已知限制](#已知限制)
21
- - [开发](#开发)
22
- - [许可证](#许可证)
23
-
24
- ## 特性
25
-
26
- - **glob 激活** —— 按 agent 触碰的文件逐个激活规则:`**`、`*`、`?`、`{a,b}`、`[abc]`、`!` 取反(picomatch)。
27
- - **Claude Code 兼容** —— 既支持规则文件(`.dsh/rules/*.md`),也支持 `CLAUDE.md` / `AGENTS.md` 内的 `# Path:` 段落。
28
- - **可见且持久** —— 激活的规则以用户消息注入,UI 可见、会话日志持久化;每个快照取代更早快照,模型始终看到最新集合。
29
- - **预算可控** —— 字节预算渲染(默认 32 KB):先丢弃低优先级规则,再截断最后一条;正文转义,无法逃逸框架标签。
30
- - **恢复友好** —— 恢复会话时从日志恢复最近一次快照与已匹配文件列表,避免重复注入。
31
- - **按会话跟踪** —— 每个 agent/会话独立跟踪触碰文件(含子代理);无 `path:` 的全局规则恒激活。
32
-
33
- ## 工作原理
34
-
35
- ```
36
- 工作区
37
- .dsh/rules/*.md ← 规则定义(frontmatter 声明 glob)
38
- ~/.dsh/rules/*.md ← 用户级规则(可选)
39
- CLAUDE.md ← 可选:# Path: 段落(Claude Code 兼容)
40
-
41
- agent 读取/编辑文件(fs/observed)→ 记录每会话触碰路径
42
- ↓ 每个 step(agent/pre-step)
43
- 按 glob 匹配触碰路径 → 收集激活规则 → 渲染 <rules> 快照注入对话
44
- ```
45
-
46
- - **注入点**:`agent/pre-step` 瀑布监听器追加一条 `<rules>` 框架的用户消息;快照文本变化时才注入新消息。
47
- - **发现与缓存**:每个 step 重新探测规则源并做版本缓存(`fs.stat().version`,Node 回退为 `mtimeMs:size`)——规则文件改动在下一步即生效。
48
- - **读取**:优先 harness `fs` 服务(遵守沙箱约束);无 `fs` 服务时回退 Node 文件系统。
49
-
50
- ## 安装
51
-
52
- ### 通用安装(任意 DSH 部署)
53
-
54
- 已发布到 npm registry —— `dsh plugin` 一步完成安装**并激活**:
55
-
56
- ```powershell
57
- # profile 名按你的部署调整:desktop / web / tui / headless
58
- dsh plugin --profile desktop add dsh-rules
59
- ```
60
-
61
- 插件包声明了 `dsh.bundle.patch`,`dsh plugin add` 的 reconcile 步骤会自动把 `dsh-rules` 追加到 profile 的 `dsh.profile.bundles` 层列表——**无需手动编辑 cordis.patch.yml**。重启 DSH(桌面版重启应用;web/headless 重启进程),插件随下次 Cordis 组合加载。
62
-
63
- 更新:`dsh plugin --profile desktop update dsh-rules`(或 remove 后 add)。
64
-
65
- 从本地仓库安装(开发模式):
66
-
67
- ```powershell
68
- # 在仓库根目录执行——同样自动激活 bundle
69
- dsh plugin --profile desktop add .
70
- ```
71
-
72
- > ⚠️ pnpm 会按空格拆分 `add` 参数,仓库**路径含空格**时必须通过无空格 junction 安装(见下)。
73
-
74
- ### DSH Desktop(Windows)一键脚本
75
-
76
- ```powershell
77
- # 1. 克隆本仓库后,在仓库根目录执行:
78
- node scripts\install-desktop.mjs
79
-
80
- # 2. 重启 DSH Desktop(插件在下次启动时随 Cordis 组合加载)
81
- ```
82
-
83
- 脚本会创建指向仓库的无空格 junction,并通过它执行桌面自带的 `dsh plugin add`(pnpm 按空格拆分 `add` 参数,路径含空格时必须走 junction):
84
-
85
- ```powershell
86
- # 0) 为仓库创建无空格 junction(路径含空格时需要)
87
- mklink /J "C:\code_repos\dsh-rules" "C:\code_repos\dsh rules plugin"
88
-
89
- # 1) 用桌面自带的 dsh 命令把插件装进 profile(经 junction 路径)
90
- & "C:\Program Files\DSH Desktop\DSH Desktop.exe" --expose-internals `
91
- "C:\Program Files\DSH Desktop\resources\app.asar.unpacked\lib\desktop-cli.js" `
92
- plugin --profile desktop add "C:\code_repos\dsh-rules"
93
- ```
94
-
95
- 按 profile 自定义配置(可选):插件按代码默认值加载;如需定制,在 `<profile>/cordis.patch.yml` 里以 id 定位覆盖该条目的 `config`:
96
-
97
- ```yaml
98
- - id: dsh-rules
99
- name: dsh-rules
100
- config:
101
- includeClaudeSections: true
102
- projectRootMarkers: [".git", ".dsh"]
103
- ```
104
-
105
- **卸载**:`node scripts\install-desktop.mjs --uninstall`(或 `dsh plugin --profile desktop remove dsh-rules`),再重启应用。安装/卸载均不修改 DSH 安装目录(`resources\app.asar.unpacked`),只动 profile 配置,可随时回滚。
106
-
107
- ## 规则格式
108
-
109
- ### 来源 A:规则文件(`.dsh/rules/*.md` 与 `~/.dsh/rules/*.md`)
110
-
111
- ```markdown
112
- ---
113
- path:
114
- - "src/**/*.ts"
115
- - "!src/**/*.test.ts"
116
- ---
117
- 规则正文(markdown,激活时原样注入,可以是任意提示词内容)
118
- ```
119
-
120
- | frontmatter 字段 | 说明 |
121
- | --- | --- |
122
- | `path` | 字符串或字符串数组;glob 相对项目根、使用 `/` 分隔符;`!` 前缀为排除模式。**缺省或为空 = 全局常驻规则**(工作区任意会话都激活)。 |
123
- | `name` | 可选;规则标识(用于同名规则去重),缺省取文件名(去掉 `.md`)。 |
124
-
125
- ### 来源 B:`# Path:` 段落(需 `includeClaudeSections: true`)
126
-
127
- 从 `AGENTS.md` / `CLAUDE.md`(含 `.local.md`,以及 `~/.dsh/AGENTS.md`)中解析 `# Path: <glob…>` 标题段落:
128
-
129
- ```markdown
130
- # 项目说明(此段之前的内容交给 agent-instructions 基线处理,本插件不注入)
131
-
132
- # Path: src/**/*.ts, scripts/**
133
- 本段仅在触碰 src 下 .ts 或 scripts 下文件时激活
134
- ```
135
-
136
- - 每个 `# Path:` 标题之后直到下一个标题(或文件尾)是一条规则。
137
- - glob 支持逗号或空格分隔。
138
- - 首个 `# Path:` 之前的内容**不**由本插件注入(DSH 内置的 `agent-instructions` 已负责注入 AGENTS.md/CLAUDE.md 基线全文)。
139
-
140
- ### 优先级与去重
141
-
142
- 项目规则(rank 100)> 用户规则(rank 200)> `# Path:` 段落(rank 300)。同名规则仅保留最高优先级者;渲染顺序按(rank, 名称)确定,保证跨 step 稳定。
143
-
144
- ## 配置项
145
-
146
- | 配置 | 默认 | 说明 |
147
- | --- | --- | --- |
148
- | `dshHome` | `$DSH_HOME` / `~/.dsh` | 用户级规则与 `~/.dsh/AGENTS.md` 所在根目录 |
149
- | `projectRootMarkers` | `[".git"]` | 向上寻找项目根的标记文件/目录 |
150
- | `ruleDirNames` | `[".dsh/rules"]` | 项目内规则目录(相对项目根,可多个) |
151
- | `includeUserRules` | `true` | 是否启用 `~/.dsh/rules/*.md` |
152
- | `includeClaudeSections` | `false` | 是否解析 `# Path:` 段落 |
153
- | `instructionFileCandidates` | `["AGENTS.md", "CLAUDE.md"]` | `# Path:` 段落候选文件名 |
154
- | `localInstructionFileCandidates` | `["AGENTS.local.md", "CLAUDE.local.md"]` | 目录级候选文件名 |
155
- | `maxBytes` | `32768` | 每次注入的渲染预算(UTF-8 字节),`<= 0` 关闭插件 |
156
- | `maxSourceBytes` | `1048576` | 单条规则源文件大小上限,超出跳过 |
157
- | `maxTouchedPaths` | `512` | 每会话记录的触碰路径上限(FIFO 淘汰) |
158
-
159
- ## 发现与收录
160
-
161
- 本插件通过 GitHub [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic 被 DSH 生态发现——这是 [DeepSeek Harness 官方 README](https://github.com/deepseek-ai/deepseek-harness) "Community and support" 章节推荐的插件收录渠道(*Add the `dsh-plugin` topic to your plugin repository for discoverability*)。社区插件列表与市场(如 awesome-dsh-plugin、dsh-plugin-marketplace)据此自动扫描收录;仓库 About 栏可查看/添加该标签。
162
-
163
- ## 已知限制
164
-
165
- - 只有**项目根内**的文件能激活规则;读取项目外文件不触发(避免 `../` 误匹配)。
166
- - 触碰集合是内存态:恢复会话后,规则随 agent 重新读取文件逐步重新激活(已匹配文件列表会从日志恢复)。
167
- - `includeRuntimeContext: false` 的部署不受影响(本插件注入独立消息,不依赖运行时上下文快照)。
168
- - 规则注入为"取代旧快照"的消息流,会话日志中会保留历史快照;每个快照本身是完整集合,模型以最新快照为准。
169
-
170
- ## 开发
171
-
172
- ```powershell
173
- pnpm install
174
- pnpm test # node --test:解析 / glob / 优先级 / 预算 / 确定性 / fs 回退
175
- ```
176
-
177
- 代码结构:
178
-
179
- - `lib/index.js` — 插件入口(`name` / `Config` / `apply`):`fs/observed` 触碰跟踪、`agent/pre-step` 注入、`agent/disposed` 清理。
180
- - `lib/rules.js` — 纯函数:frontmatter 与 `# Path:` 解析、glob 编译匹配、优先级合并、预算渲染。
181
- - `lib/fs.js` — 版本化发现/读取:优先 harness `fs` 服务,缺失时回退 Node fs。
182
- - `test/rules.test.mjs` — 单元测试。
183
- - `examples/.dsh/rules/` — 示例规则(可直接复制到项目使用)。
184
- - `fixtures/demo-project/` — 现成的体验项目。
185
-
186
- ## 许可证
187
-
188
- [MIT](LICENSE)
1
+ # dsh-rules
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
4
+ [![DSH Plugin topic](https://img.shields.io/badge/topic-dsh--plugin-blue)](https://github.com/topics/dsh-plugin)
5
+
6
+ [English](./README.md) | **中文**
7
+
8
+ 面向 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)的 rules 插件:**通过 glob 匹配文件路径,激活对应的提示词 / markdown 文档**,对标 Claude Code 的 `rules.md` / `# Path:` 规则机制。每条规则声明 glob 模式;当 agent **读取或编辑**了匹配文件时规则激活,其内容(任意提示词或 markdown 文档)作为一条"取代旧快照"的 `<rules>` 用户消息注入对话。
9
+
10
+ > 适用于**所有 DSH 部署**:desktop / web / tui / headless / 自定义 profile——插件本身没有任何 desktop 专属依赖。
11
+
12
+ ## 目录
13
+
14
+ - [特性](#特性)
15
+ - [工作原理](#工作原理)
16
+ - [安装](#安装)
17
+ - [规则格式](#规则格式)
18
+ - [配置项](#配置项)
19
+ - [发现与收录](#发现与收录)
20
+ - [已知限制](#已知限制)
21
+ - [开发](#开发)
22
+ - [许可证](#许可证)
23
+
24
+ ## 特性
25
+
26
+ - **glob 激活** —— 按 agent 触碰的文件逐个激活规则:`**`、`*`、`?`、`{a,b}`、`[abc]`、`!` 取反(picomatch)。
27
+ - **Claude Code 兼容** —— 既支持规则文件(`.dsh/rules/*.md`),也支持 `CLAUDE.md` / `AGENTS.md` 内的 `# Path:` 段落。
28
+ - **可见且持久** —— 激活的规则以用户消息注入,UI 可见、会话日志持久化;每次注入在对话里显示为一行可折叠的通知(与工具调用行同款外观,如 `dsh-rules · Active rules: typescript, docs`),展开可见完整规则文本;每个快照取代更早快照,模型始终看到最新集合。
29
+ - **预算可控** —— 字节预算渲染(默认 32 KB):先丢弃低优先级规则,再截断最后一条;正文转义,无法逃逸框架标签。
30
+ - **恢复友好** —— 恢复会话时从日志恢复最近一次快照与已匹配文件列表,避免重复注入。
31
+ - **按会话跟踪** —— 每个 agent/会话独立跟踪触碰文件(含子代理);无 `path:` 的全局规则恒激活。
32
+
33
+ ## 工作原理
34
+
35
+ ```
36
+ 工作区
37
+ .dsh/rules/*.md ← 规则定义(frontmatter 声明 glob)
38
+ ~/.dsh/rules/*.md ← 用户级规则(可选)
39
+ CLAUDE.md ← 可选:# Path: 段落(Claude Code 兼容)
40
+
41
+ agent 读取/编辑文件(fs/observed)→ 记录每会话触碰路径
42
+ ↓ 每个 step(agent/pre-step)
43
+ 按 glob 匹配触碰路径 → 收集激活规则 → 渲染 <rules> 快照注入对话
44
+ ```
45
+
46
+ - **注入点**:`agent/pre-step` 瀑布监听器追加一条 `<rules>` 框架的用户消息;快照文本变化时才注入新消息。
47
+ - **发现与缓存**:每个 step 重新探测规则源并做版本缓存(`fs.stat().version`,Node 回退为 `mtimeMs:size`)——规则文件改动在下一步即生效。
48
+ - **读取**:优先 harness `fs` 服务(遵守沙箱约束);无 `fs` 服务时回退 Node 文件系统。
49
+
50
+ ## 安装
51
+
52
+ ### 通用安装(任意 DSH 部署)
53
+
54
+ 已发布到 npm registry —— `dsh plugin` 一步完成安装**并激活**:
55
+
56
+ ```powershell
57
+ # profile 名按你的部署调整:desktop / web / tui / headless
58
+ dsh plugin --profile desktop add dsh-rules
59
+ ```
60
+
61
+ 插件包声明了 `dsh.bundle.patch`,`dsh plugin add` 的 reconcile 步骤会自动把 `dsh-rules` 追加到 profile 的 `dsh.profile.bundles` 层列表——**无需手动编辑 cordis.patch.yml**。重启 DSH(桌面版重启应用;web/headless 重启进程),插件随下次 Cordis 组合加载。
62
+
63
+ 更新:`dsh plugin --profile desktop update dsh-rules`(或 remove 后 add)。
64
+
65
+ 从本地仓库安装(开发模式):
66
+
67
+ ```powershell
68
+ # 在仓库根目录执行——同样自动激活 bundle
69
+ dsh plugin --profile desktop add .
70
+ ```
71
+
72
+ > ⚠️ pnpm 会按空格拆分 `add` 参数,仓库**路径含空格**时必须通过无空格 junction 安装(见下)。
73
+
74
+ ### DSH Desktop(Windows)一键脚本
75
+
76
+ ```powershell
77
+ # 1. 克隆本仓库后,在仓库根目录执行:
78
+ node scripts\install-desktop.mjs
79
+
80
+ # 2. 重启 DSH Desktop(插件在下次启动时随 Cordis 组合加载)
81
+ ```
82
+
83
+ 脚本会创建指向仓库的无空格 junction,并通过它执行桌面自带的 `dsh plugin add`(pnpm 按空格拆分 `add` 参数,路径含空格时必须走 junction):
84
+
85
+ ```powershell
86
+ # 0) 为仓库创建无空格 junction(路径含空格时需要)
87
+ mklink /J "C:\code_repos\dsh-rules" "C:\code_repos\dsh rules plugin"
88
+
89
+ # 1) 用桌面自带的 dsh 命令把插件装进 profile(经 junction 路径)
90
+ & "C:\Program Files\DSH Desktop\DSH Desktop.exe" --expose-internals `
91
+ "C:\Program Files\DSH Desktop\resources\app.asar.unpacked\lib\desktop-cli.js" `
92
+ plugin --profile desktop add "C:\code_repos\dsh-rules"
93
+ ```
94
+
95
+ 按 profile 自定义配置(可选):插件按代码默认值加载;如需定制,在 `<profile>/cordis.patch.yml` 里以 id 定位覆盖该条目的 `config`:
96
+
97
+ ```yaml
98
+ - id: dsh-rules
99
+ name: dsh-rules
100
+ config:
101
+ includeClaudeSections: true
102
+ projectRootMarkers: [".git", ".dsh"]
103
+ ```
104
+
105
+ **卸载**:`node scripts\install-desktop.mjs --uninstall`(或 `dsh plugin --profile desktop remove dsh-rules`),再重启应用。安装/卸载均不修改 DSH 安装目录(`resources\app.asar.unpacked`),只动 profile 配置,可随时回滚。
106
+
107
+ ## 规则格式
108
+
109
+ ### 来源 A:规则文件(`.dsh/rules/*.md` 与 `~/.dsh/rules/*.md`)
110
+
111
+ ```markdown
112
+ ---
113
+ path:
114
+ - "src/**/*.ts"
115
+ - "!src/**/*.test.ts"
116
+ ---
117
+ 规则正文(markdown,激活时原样注入,可以是任意提示词内容)
118
+ ```
119
+
120
+ | frontmatter 字段 | 说明 |
121
+ | --- | --- |
122
+ | `path` | 字符串或字符串数组;glob 相对项目根、使用 `/` 分隔符;`!` 前缀为排除模式。**缺省或为空 = 全局常驻规则**(工作区任意会话都激活)。 |
123
+ | `name` | 可选;规则标识(用于同名规则去重),缺省取文件名(去掉 `.md`)。 |
124
+
125
+ ### 来源 B:`# Path:` 段落(需 `includeClaudeSections: true`)
126
+
127
+ 从 `AGENTS.md` / `CLAUDE.md`(含 `.local.md`,以及 `~/.dsh/AGENTS.md`)中解析 `# Path: <glob…>` 标题段落:
128
+
129
+ ```markdown
130
+ # 项目说明(此段之前的内容交给 agent-instructions 基线处理,本插件不注入)
131
+
132
+ # Path: src/**/*.ts, scripts/**
133
+ 本段仅在触碰 src 下 .ts 或 scripts 下文件时激活
134
+ ```
135
+
136
+ - 每个 `# Path:` 标题之后直到下一个标题(或文件尾)是一条规则。
137
+ - glob 支持逗号或空格分隔。
138
+ - 首个 `# Path:` 之前的内容**不**由本插件注入(DSH 内置的 `agent-instructions` 已负责注入 AGENTS.md/CLAUDE.md 基线全文)。
139
+
140
+ ### 优先级与去重
141
+
142
+ 项目规则(rank 100)> 用户规则(rank 200)> `# Path:` 段落(rank 300)。同名规则仅保留最高优先级者;渲染顺序按(rank, 名称)确定,保证跨 step 稳定。
143
+
144
+ ## 配置项
145
+
146
+ | 配置 | 默认 | 说明 |
147
+ | --- | --- | --- |
148
+ | `dshHome` | `$DSH_HOME` / `~/.dsh` | 用户级规则与 `~/.dsh/AGENTS.md` 所在根目录 |
149
+ | `projectRootMarkers` | `[".git"]` | 向上寻找项目根的标记文件/目录 |
150
+ | `ruleDirNames` | `[".dsh/rules"]` | 项目内规则目录(相对项目根,可多个) |
151
+ | `includeUserRules` | `true` | 是否启用 `~/.dsh/rules/*.md` |
152
+ | `includeClaudeSections` | `false` | 是否解析 `# Path:` 段落 |
153
+ | `instructionFileCandidates` | `["AGENTS.md", "CLAUDE.md"]` | `# Path:` 段落候选文件名 |
154
+ | `localInstructionFileCandidates` | `["AGENTS.local.md", "CLAUDE.local.md"]` | 目录级候选文件名 |
155
+ | `maxBytes` | `32768` | 每次注入的渲染预算(UTF-8 字节),`<= 0` 关闭插件 |
156
+ | `maxSourceBytes` | `1048576` | 单条规则源文件大小上限,超出跳过 |
157
+ | `maxTouchedPaths` | `512` | 每会话记录的触碰路径上限(FIFO 淘汰) |
158
+
159
+ ## 发现与收录
160
+
161
+ 本插件通过 GitHub [`dsh-plugin`](https://github.com/topics/dsh-plugin) topic 被 DSH 生态发现——这是 [DeepSeek Harness 官方 README](https://github.com/deepseek-ai/deepseek-harness) "Community and support" 章节推荐的插件收录渠道(*Add the `dsh-plugin` topic to your plugin repository for discoverability*)。社区插件列表与市场(如 awesome-dsh-plugin、dsh-plugin-marketplace)据此自动扫描收录;仓库 About 栏可查看/添加该标签。
162
+
163
+ ## 已知限制
164
+
165
+ - 只有**项目根内**的文件能激活规则;读取项目外文件不触发(避免 `../` 误匹配)。
166
+ - 触碰集合是内存态:恢复会话后,规则随 agent 重新读取文件逐步重新激活(已匹配文件列表会从日志恢复)。
167
+ - `includeRuntimeContext: false` 的部署不受影响(本插件注入独立消息,不依赖运行时上下文快照)。
168
+ - 规则注入为"取代旧快照"的消息流,会话日志中会保留历史快照;每个快照本身是完整集合,模型以最新快照为准。
169
+
170
+ ## 开发
171
+
172
+ ```powershell
173
+ pnpm install
174
+ pnpm test # node --test:解析 / glob / 优先级 / 预算 / 确定性 / fs 回退
175
+ ```
176
+
177
+ 代码结构:
178
+
179
+ - `lib/index.js` — 插件入口(`name` / `Config` / `apply`):`fs/observed` 触碰跟踪、`agent/pre-step` 注入、`agent/disposed` 清理。
180
+ - `lib/rules.js` — 纯函数:frontmatter 与 `# Path:` 解析、glob 编译匹配、优先级合并、预算渲染。
181
+ - `lib/fs.js` — 版本化发现/读取:优先 harness `fs` 服务,缺失时回退 Node fs。
182
+ - `test/rules.test.mjs` — 单元测试。
183
+ - `examples/.dsh/rules/` — 示例规则(可直接复制到项目使用)。
184
+ - `fixtures/demo-project/` — 现成的体验项目。
185
+
186
+ ## 许可证
187
+
188
+ [MIT](LICENSE)
package/cordis.patch.yml CHANGED
@@ -1,20 +1,20 @@
1
- # dsh-rules bundle layer: register the glob-activated rules plugin
2
- # (Claude Code rules.md style) into the host plane.
3
- #
4
- # This layer is applied by the profile loader because package.json declares
5
- # `dsh.bundle.patch`; `dsh plugin --profile <name> add dsh-rules` therefore
6
- # activates the plugin automatically — no manual cordis.patch.yml edits are
7
- # needed in the target profile.
8
- #
9
- # Per-profile customization (e.g. `includeClaudeSections: true`, extra
10
- # `projectRootMarkers`) belongs in the profile's own cordis.patch.yml as an
11
- # id-targeted override of this entry's `config`:
12
- #
13
- # - id: dsh-rules
14
- # name: dsh-rules
15
- # config:
16
- # includeClaudeSections: true
17
- # projectRootMarkers: [".git", ".dsh"]
18
- - insert:
19
- - id: dsh-rules
20
- name: dsh-rules
1
+ # dsh-rules bundle layer: register the glob-activated rules plugin
2
+ # (Claude Code rules.md style) into the host plane.
3
+ #
4
+ # This layer is applied by the profile loader because package.json declares
5
+ # `dsh.bundle.patch`; `dsh plugin --profile <name> add dsh-rules` therefore
6
+ # activates the plugin automatically — no manual cordis.patch.yml edits are
7
+ # needed in the target profile.
8
+ #
9
+ # Per-profile customization (e.g. `includeClaudeSections: true`, extra
10
+ # `projectRootMarkers`) belongs in the profile's own cordis.patch.yml as an
11
+ # id-targeted override of this entry's `config`:
12
+ #
13
+ # - id: dsh-rules
14
+ # name: dsh-rules
15
+ # config:
16
+ # includeClaudeSections: true
17
+ # projectRootMarkers: [".git", ".dsh"]
18
+ - insert:
19
+ - id: dsh-rules
20
+ name: dsh-rules