dsh-embedded-workbench 0.7.1
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/LICENSE +21 -0
- package/README.en-US.md +262 -0
- package/README.md +260 -0
- package/cordis.patch.yml +11 -0
- package/lib/index.js +197 -0
- package/lib/types/index.d.ts +43 -0
- package/package.json +81 -0
- package/skills/c-cpp-dev/SKILL.md +121 -0
- package/skills/debug-methodology/SKILL.md +83 -0
- package/skills/debug-methodology/references/iterative-debug-case-study.md +103 -0
- package/skills/embedded-firmware-dev/SKILL.md +133 -0
- package/skills/embedded-firmware-dev/references/architecture-principles.md +204 -0
- package/skills/embedded-firmware-dev/references/embedded-patterns.md +95 -0
- package/skills/embedded-firmware-dev/references/lvgl-pitfalls.md +68 -0
- package/skills/embedded-workbench/SKILL.md +240 -0
- package/skills/embedded-workbench/references/INDEX.md +88 -0
- package/skills/embedded-workbench/references/audit-ledger.md +38 -0
- package/skills/embedded-workbench/references/contract-matrix.md +31 -0
- package/skills/embedded-workbench/references/decision-log.md +31 -0
- package/skills/embedded-workbench/references/detailed-change-plan.md +76 -0
- package/skills/embedded-workbench/references/durable-requirement-notes.md +27 -0
- package/skills/embedded-workbench/references/final-qc.md +40 -0
- package/skills/embedded-workbench/references/iteration-notes.md +53 -0
- package/skills/embedded-workbench/references/platform-tool-mapping.md +88 -0
- package/skills/embedded-workbench/references/result-note.md +54 -0
- package/skills/embedded-workbench/references/steward-memo.md +54 -0
- package/skills/embedded-workbench/references/task-charter.md +53 -0
- package/skills/hardfault-triage/SKILL.md +237 -0
- package/skills/keil-mdk-build/SKILL.md +237 -0
- package/skills/state-machine-design/SKILL.md +190 -0
- package/src/index.ts +209 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Amethyst Luna
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.en-US.md
ADDED
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
# Embedded Workbench
|
|
2
|
+
|
|
3
|
+
<p align="center"><strong>English</strong> · <a href="README.md">中文</a></p>
|
|
4
|
+
|
|
5
|
+
[](https://github.com/hashgraph-online/hol-guard)
|
|
6
|
+
|
|
7
|
+
Embedded C/C++ firmware toolbox — 4 agents, 7 skills covering FreeRTOS, ISR, NVM storage, Keil MDK (AC5/AC6), ARMCLANG, HardFault triage, state machines, architecture principles, and LVGL patterns.
|
|
8
|
+
|
|
9
|
+
**Cross-platform** — works with Claude Code, Codex CLI, Cursor, Kimi CLI, OpenCode, and ZCode. Built on the [Agent Skills](https://agentskills.io) open standard.
|
|
10
|
+
|
|
11
|
+
## Components
|
|
12
|
+
|
|
13
|
+
### Agents (4)
|
|
14
|
+
|
|
15
|
+
| Agent | Description |
|
|
16
|
+
| ------- | ------------- |
|
|
17
|
+
| `architecture-steward` | Read-only planning: design packages, module boundaries, slice breakdown |
|
|
18
|
+
| `design-reviewer` | Design doc fact-check: verifies claims against codebase |
|
|
19
|
+
| `execution-worker` | Plan → approve → implement cycle with build verification |
|
|
20
|
+
| `quality-coordinator` | Implementation review: bugs, compliance, closure |
|
|
21
|
+
|
|
22
|
+
### Skills (8)
|
|
23
|
+
|
|
24
|
+
| Skill | Description |
|
|
25
|
+
| ------- | ------------- |
|
|
26
|
+
| `embedded-workbench` | Bootstrap: workflows, policies, sub-agent mapping, proactive suggestions, platform tool mapping, document templates |
|
|
27
|
+
| `debug-methodology` | 8 iron rules, fix principles, iterative debugging case study |
|
|
28
|
+
| `embedded-firmware-dev` | FreeRTOS, ISR, NVM storage, async lifecycle, boundary analysis, architecture principles, LVGL pitfalls |
|
|
29
|
+
| `keil-mdk-build` | UV4 CLI, ARM Compiler 5/6, .map analysis, merge/packaging, build diagnostics |
|
|
30
|
+
| `c-cpp-dev` | Code generation, style, memory layout, refactoring for C/C++ |
|
|
31
|
+
| `state-machine-design` | State models, retries, timeouts, transition gates, implementation patterns |
|
|
32
|
+
| `hardfault-triage` | Processor exception triage — fault registers, stack frames, PC-to-source, root-cause classification |
|
|
33
|
+
|
|
34
|
+
`logicprobe` (design doc & plan claim verification, logic-primitive verification, adversarial probing) was **split out into its own plugin** — see [Other Plugins Recommended](#other-plugins-recommended).
|
|
35
|
+
|
|
36
|
+
> The skill content is mostly distilled from the author's personal embedded/firmware engineering experience and code-cleanliness discipline, based on real-world pitfalls and engineering constraints.
|
|
37
|
+
|
|
38
|
+
### Deep References
|
|
39
|
+
|
|
40
|
+
`embedded-firmware-dev`, `debug-methodology`, `state-machine-design`, and `c-cpp-dev` include in-depth reference material and code examples. Highlights: 12 architecture principles, embedded patterns (GIF timer safety, state latches, async lifecycle), LVGL pitfalls, 7-round iterative debugging case study, state machine implementation patterns, and embedded C specifics (volatile MMIO, linker sections, ISR wrappers).
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
### Marketplace install (recommended)
|
|
45
|
+
|
|
46
|
+
Add the marketplace to `~/.claude/settings.json`:
|
|
47
|
+
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"extraKnownMarketplaces": {
|
|
51
|
+
"embedded-workbench": {
|
|
52
|
+
"source": { "source": "github", "repo": "AmethystLuna/embedded-workbench" }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Then install from CLI:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
claude plugin install embedded-workbench@embedded-workbench
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Manual install
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.claude/plugins/dev/embedded-workbench
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then enable in `~/.claude/settings.json`:
|
|
71
|
+
|
|
72
|
+
```json
|
|
73
|
+
{
|
|
74
|
+
"enabledPlugins": {
|
|
75
|
+
"embedded-workbench@dev": true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## DeepSeek Harness (dsh)
|
|
81
|
+
|
|
82
|
+
Native dsh support ships as a cordis plugin bundle at the repository root (the root `package.json` declares `dsh.bundle`):
|
|
83
|
+
|
|
84
|
+
- The skills are discovered as-is by dsh's `skill-filesystem` provider (Agent Skills open standard) — zero code.
|
|
85
|
+
- The bundle injects the first-model-step gate (1% Rule / Red Flags / Plan Verification Gate) into the first model step of every agent session — the dsh-native counterpart of the Claude `SessionStart` hook. It also registers a model-visible catalog entry (`cordis_inspect`).
|
|
86
|
+
- The 4 custom agents are intentionally not ported — dsh's native subagent tooling covers parallel multi-agent work.
|
|
87
|
+
|
|
88
|
+
Install: see [`.dsh/INSTALL.md`](.dsh/INSTALL.md) (four options, from plain skill copy to `dsh plugin add`).
|
|
89
|
+
|
|
90
|
+
> DSH install note: the package name is `dsh-embedded-workbench`. In the web profile's `package.json`, both the dependency key and the `dsh.profile.bundles` entry must use the same name; a mismatch causes the dsh loader to fail with `ERR_MODULE_NOT_FOUND`.
|
|
91
|
+
|
|
92
|
+
## Usage
|
|
93
|
+
|
|
94
|
+
The plugin auto-injects a capability notification into the first model step with a skill table, 1% Rule, and Red Flags reinforcement. Skills are loaded on demand:
|
|
95
|
+
|
|
96
|
+
- Say "use Multi-Agent Workflow" or invoke `Skill("embedded-workbench")` for the full workflow system
|
|
97
|
+
- Domain skills activate automatically when their `Use when` description matches your task — NOT clauses prevent false triggers (e.g., formatting-only won't load c-cpp-dev)
|
|
98
|
+
- The agent proactively suggests verification, adversarial probing, and parallel subagents when it detects state machines, behavioral claims, or multi-module tasks
|
|
99
|
+
- No manual CLAUDE.md configuration required
|
|
100
|
+
|
|
101
|
+
## Codex CLI
|
|
102
|
+
|
|
103
|
+
This plugin also supports OpenAI Codex CLI. Skills follow the Agent Skills standard and work identically across both platforms. Agents are provided in Codex TOML format under `.codex/agents/`.
|
|
104
|
+
|
|
105
|
+
### Codex install
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Add as a marketplace
|
|
109
|
+
codex plugin marketplace add AmethystLuna/embedded-workbench
|
|
110
|
+
|
|
111
|
+
# Install
|
|
112
|
+
codex plugin install embedded-workbench
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Or manually:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.codex/plugins/embedded-workbench
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Skills are invoked with `$skill-name` (e.g. `$debug-methodology`) or auto-selected by Codex based on task context.
|
|
122
|
+
|
|
123
|
+
## Cursor
|
|
124
|
+
|
|
125
|
+
Cursor 2.5+ has built-in plugin support. Agents in `agents/` are auto-discovered.
|
|
126
|
+
|
|
127
|
+
### Cursor install
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Clone to Cursor plugins directory
|
|
131
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.cursor/plugins/embedded-workbench
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Or install from the Cursor plugin marketplace UI: `/add-plugin AmethystLuna/embedded-workbench`
|
|
135
|
+
|
|
136
|
+
## Kimi CLI
|
|
137
|
+
|
|
138
|
+
Kimi CLI discovers skills from `.claude/skills/` paths automatically. The `.kimi-plugin/plugin.json` manifest registers the plugin for Kimi's plugin manager.
|
|
139
|
+
|
|
140
|
+
### Kimi install
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
# Via Kimi plugin manager
|
|
144
|
+
/plugins install https://github.com/AmethystLuna/embedded-workbench.git
|
|
145
|
+
|
|
146
|
+
# Or clone manually
|
|
147
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.kimi/plugins/embedded-workbench
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Skills are invoked with `/skill:<name>` (e.g. `/skill:debug-methodology`).
|
|
151
|
+
|
|
152
|
+
## OpenCode
|
|
153
|
+
|
|
154
|
+
Skills are auto-discovered from `.claude/skills/` and `.codex/skills/` paths. Add to your `opencode.json`:
|
|
155
|
+
|
|
156
|
+
```json
|
|
157
|
+
{
|
|
158
|
+
"plugin": ["embedded-workbench@git+https://github.com/AmethystLuna/embedded-workbench.git"]
|
|
159
|
+
}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Or install via `skop` which consumes the Claude marketplace manifest. See `.opencode/INSTALL.md` for detailed instructions.
|
|
163
|
+
|
|
164
|
+
## ZCode (Z.AI)
|
|
165
|
+
|
|
166
|
+
ZCode 3.0+ follows the Agent Skills standard. No plugin marketplace — manually copy skills to `.zcode/skills/`:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git
|
|
170
|
+
cp -r embedded-workbench/skills/* .zcode/skills/
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Skills are invoked with `$skill-name`. ZCode also auto-discovers from `.claude/skills/` and `.codex/skills/`. See `.zcode/INSTALL.md` for details.
|
|
174
|
+
|
|
175
|
+
## Requirements
|
|
176
|
+
|
|
177
|
+
- Claude Code v2.1+ / Codex CLI latest / Cursor 2.5+ / Kimi CLI latest / OpenCode latest / ZCode 3.0+
|
|
178
|
+
- DeepSeek Harness (dsh): dev preview — verified on mainline 2026-08-14 (gate bundle loaded and injected in-session)
|
|
179
|
+
- No external dependencies
|
|
180
|
+
|
|
181
|
+
## Configuration
|
|
182
|
+
|
|
183
|
+
In DeepSeek Harness, the bundle accepts a small configuration object:
|
|
184
|
+
|
|
185
|
+
| Key | Type | Default | Description |
|
|
186
|
+
|---|---|---|---|
|
|
187
|
+
| `enabled` | boolean | `true` | Set to `false` to disable the session-start gate injection. |
|
|
188
|
+
| `gateContent` | string | built-in gate text | Override the text injected into the first model step. |
|
|
189
|
+
|
|
190
|
+
To change it, override the row by id in your profile's `cordis.patch.yml`:
|
|
191
|
+
|
|
192
|
+
```yaml
|
|
193
|
+
- insert:
|
|
194
|
+
- id: embedded-workbench
|
|
195
|
+
name: 'dsh-embedded-workbench'
|
|
196
|
+
config:
|
|
197
|
+
enabled: true
|
|
198
|
+
gateContent: |
|
|
199
|
+
...
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Uninstall
|
|
203
|
+
|
|
204
|
+
- If you installed through the DSH plugin manager, remove the `embedded-workbench` plugin from the target profile using the same manager you used to install it.
|
|
205
|
+
- If you copied `skills/*` manually, delete the copied skill directories from `~/.agents/skills/` or the project `.dsh/skills/`.
|
|
206
|
+
- If you added the bundle as a `cordis.patch.yml` row, remove the row with `id: embedded-workbench` from the profile patch and restart DSH.
|
|
207
|
+
|
|
208
|
+
## Permissions & Data
|
|
209
|
+
|
|
210
|
+
- The plugin runtime reads only the `skills/` directory shipped inside the package, in order to register skills through DSH's standard filesystem skill provider.
|
|
211
|
+
- It injects the configured gate text into the first model step of a session.
|
|
212
|
+
- It does not read credentials, open network connections, or access user data outside the DSH session context.
|
|
213
|
+
- When the skills are actually used, the model may read project files as directed by the user, just like any other coding skill.
|
|
214
|
+
|
|
215
|
+
## Troubleshooting
|
|
216
|
+
|
|
217
|
+
- Skills not visible in DSH: confirm you are on a DSH version that supports `ctx.skills`/Agent Skills discovery, and restart the profile after install.
|
|
218
|
+
- Gate not injected: check that `enabled` is not `false` and that the row id `embedded-workbench` is present in the active profile patch.
|
|
219
|
+
- Plugin manager rejects installation: make sure `@deepseek-ai/*` packages are declared as `peerDependencies`, not regular `dependencies`.
|
|
220
|
+
- After manual copy, DSH still doesn't see the skills: use the native bundle install (`dsh plugin add "github:AmethystLuna/embedded-workbench"`) instead of copying.
|
|
221
|
+
|
|
222
|
+
## Development
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
npm install
|
|
226
|
+
npm run typecheck
|
|
227
|
+
npm run build
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
Run the DSH skills registration test and trigger tests:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
node tests/dsh-skills-registration.test.mjs
|
|
234
|
+
bash tests/skill-triggering/run-all.sh
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
## License & Security
|
|
238
|
+
|
|
239
|
+
Licensed under MIT. See [LICENSE](LICENSE).
|
|
240
|
+
|
|
241
|
+
To report a security vulnerability, do **not** open a public issue. Use the private Security Advisory path or the contact method in [SECURITY.md](SECURITY.md).
|
|
242
|
+
|
|
243
|
+
## Other Plugins Recommended
|
|
244
|
+
|
|
245
|
+
| Plugin | Description |
|
|
246
|
+
|--------|-------------|
|
|
247
|
+
| [logicprobe](https://github.com/AmethystLuna/logicprobe) | Design doc & plan claim verification — logic-primitive verification (7 structural + 7 adversarial probes), refactoring regression detection. Split out of this plugin; the Plan Verification Gate requires it. |
|
|
248
|
+
| [superpowers](https://github.com/obra/superpowers) | The original agent discipline engine — skill loading enforcement, Red Flags, subagent-driven development. Many of this plugin's agent-compliance patterns (1% Rule, Red Flags, `<SUBAGENT-STOP>`, instruction priority) were adapted from Superpowers. |
|
|
249
|
+
|
|
250
|
+
## Acknowledgments
|
|
251
|
+
|
|
252
|
+
This plugin's agent-compliance architecture is adapted from [Superpowers](https://github.com/obra/superpowers) by Jesse Vincent (MIT License). Specific patterns adapted with gratitude:
|
|
253
|
+
|
|
254
|
+
- **1% Rule** — the insight that agents resist loading skills and need extreme language to overcome that bias
|
|
255
|
+
- **Red Flags table** — enumerating agent rationalizations to short-circuit them
|
|
256
|
+
- **`<SUBAGENT-STOP>`** — preventing subagents from re-loading bootstrap context
|
|
257
|
+
- **Instruction Priority** — user > skills > system prompt hierarchy
|
|
258
|
+
- **Skill Types** — Rigid vs Flexible classification
|
|
259
|
+
- **Session-start hook injection pattern** — injecting capability context at session start
|
|
260
|
+
- **Trigger test framework** — `tests/skill-triggering/` structure and methodology
|
|
261
|
+
|
|
262
|
+
Superpowers is a general-purpose development plugin. Embedded Workbench applies the same discipline patterns to the embedded C/C++ domain.
|
package/README.md
ADDED
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
# 嵌入式工作台
|
|
2
|
+
|
|
3
|
+
<p align="center"><a href="README.en-US.md">English</a> · <strong>中文</strong></p>
|
|
4
|
+
|
|
5
|
+
嵌入式 C/C++ 固件开发工具箱 — 4 个代理、7 个技能,覆盖 FreeRTOS、中断、NVM 存储、Keil MDK(AC5/AC6)、ARMCLANG、HardFault 分析、状态机、架构原则、LVGL 陷阱。
|
|
6
|
+
|
|
7
|
+
**跨平台** — 支持 Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode、ZCode。基于 [Agent Skills](https://agentskills.io) 开放标准构建。
|
|
8
|
+
|
|
9
|
+
## 组件
|
|
10
|
+
|
|
11
|
+
### 代理 (4)
|
|
12
|
+
|
|
13
|
+
| 代理 | 说明 |
|
|
14
|
+
| ------ | ------ |
|
|
15
|
+
| `architecture-steward` | 只读规划:设计包、模块边界、切片拆分 |
|
|
16
|
+
| `design-reviewer` | 设计文档事实核查:逐条核验声称与代码库事实 |
|
|
17
|
+
| `execution-worker` | 计划 → 审批 → 实施循环,含编译验证 |
|
|
18
|
+
| `quality-coordinator` | 实现审查:Bug 发现、合规检查、结束完整性 |
|
|
19
|
+
|
|
20
|
+
### 技能 (8)
|
|
21
|
+
|
|
22
|
+
| 技能 | 说明 |
|
|
23
|
+
| ------ | ------ |
|
|
24
|
+
| `embedded-workbench` | 引导技能:工作流、策略、子代理映射、主动建议、跨平台工具映射、文档模板 |
|
|
25
|
+
| `debug-methodology` | 8 条调试铁律、修复准则、迭代调试案例研究 |
|
|
26
|
+
| `embedded-firmware-dev` | FreeRTOS、中断、NVM 存储、异步生命周期、边界分析、架构原则、LVGL 陷阱 |
|
|
27
|
+
| `keil-mdk-build` | UV4 CLI、ARM Compiler 5/6、.map 分析、合并打包、构建诊断 |
|
|
28
|
+
| `c-cpp-dev` | C/C++ 代码生成、风格、内存布局、重构 |
|
|
29
|
+
| `state-machine-design` | 状态模型、重试、超时、转换门控、实现模式 |
|
|
30
|
+
| `hardfault-triage` | 处理器异常分类 — 故障寄存器、栈帧、PC 定位源码、根因分类 |
|
|
31
|
+
|
|
32
|
+
`logicprobe`(文档与计划声称核查、逻辑原语验证、对抗性探测)**已拆分为独立插件** — 见下方[其他插件推荐](#其他插件推荐)。
|
|
33
|
+
|
|
34
|
+
> 技能内容大多来自作者个人嵌入式/固件开发工作经验和代码洁癖,按实际工程踩坑与约束沉淀,而非泛泛的模型生成内容。
|
|
35
|
+
|
|
36
|
+
### 深度参考
|
|
37
|
+
|
|
38
|
+
`embedded-firmware-dev`、`debug-methodology`、`state-machine-design`、`c-cpp-dev` 包含深度参考或代码示例。亮点:12 条架构原则、嵌入式模式(GIF 定时器安全、状态锁存、异步生命周期)、LVGL 陷阱、7 轮迭代调试案例研究、状态机实现模式、嵌入式 C 专项(volatile MMIO、链接器段、ISR 安全路径)。
|
|
39
|
+
|
|
40
|
+
## 安装
|
|
41
|
+
|
|
42
|
+
### Marketplace 安装(推荐)
|
|
43
|
+
|
|
44
|
+
在 `~/.claude/settings.json` 中添加 marketplace:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"extraKnownMarketplaces": {
|
|
49
|
+
"embedded-workbench": {
|
|
50
|
+
"source": { "source": "github", "repo": "AmethystLuna/embedded-workbench" }
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
然后通过 CLI 安装:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
claude plugin install embedded-workbench@embedded-workbench
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 手动安装
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.claude/plugins/dev/embedded-workbench
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
然后在 `~/.claude/settings.json` 中启用:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"enabledPlugins": {
|
|
73
|
+
"embedded-workbench@dev": true
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## DeepSeek Harness (dsh)
|
|
79
|
+
|
|
80
|
+
原生 dsh 支持以 cordis 插件 bundle 的形式提供,位于**仓库根**(根 `package.json` 声明了 `dsh.bundle`):
|
|
81
|
+
|
|
82
|
+
- 技能遵循 Agent Skills 开放标准,被 dsh 的 `skill-filesystem` provider 原样发现——零代码。
|
|
83
|
+
- bundle 将首步门禁(1% Rule / Red Flags / Plan Verification Gate)注入每个 agent 会话的第一个模型步骤——是 Claude `SessionStart` hook 在 dsh 的原生对应物,并注册了模型可见的目录条目(`cordis_inspect`)。
|
|
84
|
+
- 4 个自定义 agent 有意不移植——dsh 原生 subagent 工具已覆盖并行多 agent 工作。
|
|
85
|
+
|
|
86
|
+
安装:参见 [`.dsh/INSTALL.md`](.dsh/INSTALL.md)(四种方式,从纯技能拷贝到 `dsh plugin add`)。
|
|
87
|
+
|
|
88
|
+
> DSH 安装注意:包名已使用 scoped 形式 `dsh-embedded-workbench`。在 web profile 的 `package.json` 中,依赖键与 `dsh.profile.bundles` 必须写 `dsh-embedded-workbench`;否则 dsh 加载器会因找不到 `node_modules/dsh-embedded-workbench` 而启动失败。
|
|
89
|
+
|
|
90
|
+
## 使用
|
|
91
|
+
|
|
92
|
+
插件在会话首个模型步骤自动注入能力通知(含技能表、1% Rule、Red Flags 强化)。技能按需加载:
|
|
93
|
+
|
|
94
|
+
- 说"用 Multi-Agent Workflow"或调用 `Skill("embedded-workbench")` 加载完整工作流系统
|
|
95
|
+
- 领域技能在任务匹配其 `Use when` 描述时自动激活——NOT 子句防止误触发(如纯格式化不会加载 c-cpp-dev)
|
|
96
|
+
- Agent 在检测到状态机、行为声称或多模块任务时,主动建议验证、对抗探测和并行子代理
|
|
97
|
+
- 无需手动配置 CLAUDE.md
|
|
98
|
+
|
|
99
|
+
## Codex CLI
|
|
100
|
+
|
|
101
|
+
本插件同样支持 OpenAI Codex CLI。技能遵循 Agent Skills 标准,跨平台行为一致。代理以 Codex TOML 格式提供于 `.codex/agents/`。
|
|
102
|
+
|
|
103
|
+
### Codex 安装
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
# 添加 marketplace
|
|
107
|
+
codex plugin marketplace add AmethystLuna/embedded-workbench
|
|
108
|
+
|
|
109
|
+
# 安装
|
|
110
|
+
codex plugin install embedded-workbench
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
或手动安装:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.codex/plugins/embedded-workbench
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
技能通过 `$skill-name` 调用(如 `$debug-methodology`),或由 Codex 根据任务上下文自动匹配。
|
|
120
|
+
|
|
121
|
+
## Cursor
|
|
122
|
+
|
|
123
|
+
Cursor 2.5+ 内置插件支持。`agents/` 中的代理自动发现。
|
|
124
|
+
|
|
125
|
+
### Cursor 安装
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# 克隆到 Cursor 插件目录
|
|
129
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.cursor/plugins/embedded-workbench
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
或通过 Cursor 插件市场 UI 安装:`/add-plugin AmethystLuna/embedded-workbench`
|
|
133
|
+
|
|
134
|
+
## Kimi CLI
|
|
135
|
+
|
|
136
|
+
Kimi CLI 自动从 `.claude/skills/` 等标准路径发现技能。`.kimi-plugin/plugin.json` 为 Kimi 插件管理器注册插件。
|
|
137
|
+
|
|
138
|
+
### Kimi 安装
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# 通过 Kimi 插件管理器
|
|
142
|
+
/plugins install https://github.com/AmethystLuna/embedded-workbench.git
|
|
143
|
+
|
|
144
|
+
# 或手动克隆
|
|
145
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.kimi/plugins/embedded-workbench
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
技能通过 `/skill:<name>` 调用(如 `/skill:debug-methodology`)。
|
|
149
|
+
|
|
150
|
+
## OpenCode
|
|
151
|
+
|
|
152
|
+
技能从 `.claude/skills/` 和 `.codex/skills/` 路径自动发现。在 `opencode.json` 中添加:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"plugin": ["embedded-workbench@git+https://github.com/AmethystLuna/embedded-workbench.git"]
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
或通过 `skop` 安装(兼容 Claude marketplace 清单)。详见 `.opencode/INSTALL.md`。
|
|
161
|
+
|
|
162
|
+
## ZCode(智谱 Z.AI)
|
|
163
|
+
|
|
164
|
+
ZCode 3.0+ 遵循 Agent Skills 标准。无插件商店,手动复制技能到 `.zcode/skills/`:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
git clone https://github.com/AmethystLuna/embedded-workbench.git
|
|
168
|
+
cp -r embedded-workbench/skills/* .zcode/skills/
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
技能通过 `$skill-name` 调用。ZCode 也自动从 `.claude/skills/` 和 `.codex/skills/` 发现技能。详见 `.zcode/INSTALL.md`。
|
|
172
|
+
|
|
173
|
+
## 依赖
|
|
174
|
+
|
|
175
|
+
- Claude Code v2.1+ / Codex CLI 最新版 / Cursor 2.5+ / Kimi CLI 最新版 / OpenCode 最新版 / ZCode 3.0+
|
|
176
|
+
- DeepSeek Harness (dsh): dev preview — 已实测 mainline 2026-08-14(gate bundle 加载并注入会话成功)
|
|
177
|
+
- 无外部依赖
|
|
178
|
+
|
|
179
|
+
## 配置
|
|
180
|
+
|
|
181
|
+
在 DeepSeek Harness 中,bundle 支持以下配置:
|
|
182
|
+
|
|
183
|
+
| 键 | 类型 | 默认值 | 说明 |
|
|
184
|
+
|---|---|---|---|
|
|
185
|
+
| `enabled` | boolean | `true` | 设为 `false` 可关闭首步 Gate 注入。 |
|
|
186
|
+
| `gateContent` | string | 内置 gate 文本 | 覆盖注入到首轮模型上下文中的文本。 |
|
|
187
|
+
|
|
188
|
+
在 profile 的 `cordis.patch.yml` 中按 row id 覆盖:
|
|
189
|
+
|
|
190
|
+
```yaml
|
|
191
|
+
- insert:
|
|
192
|
+
- id: embedded-workbench
|
|
193
|
+
name: 'dsh-embedded-workbench'
|
|
194
|
+
config:
|
|
195
|
+
enabled: true
|
|
196
|
+
gateContent: |
|
|
197
|
+
...
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## 卸载
|
|
201
|
+
|
|
202
|
+
- 如果通过 DSH 插件管理器安装,请使用同一管理器从目标 profile 中移除 `embedded-workbench`。
|
|
203
|
+
- 如果手动复制过 `skills/*`,请删除复制到 `~/.agents/skills/` 或项目 `.dsh/skills/` 下的对应目录。
|
|
204
|
+
- 如果通过 `cordis.patch.yml` 添加,请删除 profile patch 中 `id: embedded-workbench` 对应的行,并重启 DSH。
|
|
205
|
+
|
|
206
|
+
## 权限与数据
|
|
207
|
+
|
|
208
|
+
- 插件运行时只读取包内自带的 `skills/` 目录,用于通过 DSH 标准 filesystem skill provider 注册技能。
|
|
209
|
+
- 它会在会话首轮向模型上下文注入配置好的 gate 文本。
|
|
210
|
+
- 它不读取凭据、不发起网络连接,也不会访问 DSH 会话上下文之外的用户数据。
|
|
211
|
+
- 实际使用技能时,模型会像使用其他编码技能一样,按用户指示读取项目文件。
|
|
212
|
+
|
|
213
|
+
## 故障排查
|
|
214
|
+
|
|
215
|
+
- 技能在 DSH 中不可见:确认 DSH 版本支持 `ctx.skills` / Agent Skills 发现,并在安装后重启 profile。
|
|
216
|
+
- Gate 未注入:检查 `enabled` 是否为 `false`,以及 profile patch 中是否存在 `id: embedded-workbench` 的行。
|
|
217
|
+
- 插件管理器拒绝安装:确认 `@deepseek-ai/*` 包声明在 `peerDependencies` 中,而不是 `dependencies`。
|
|
218
|
+
- 手动复制后 DSH 仍看不到技能:改用原生 bundle 安装(`dsh plugin add "github:AmethystLuna/embedded-workbench"`)。
|
|
219
|
+
|
|
220
|
+
## 开发
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
npm install
|
|
224
|
+
npm run typecheck
|
|
225
|
+
npm run build
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
运行 DSH 技能注册测试和触发测试:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
node tests/dsh-skills-registration.test.mjs
|
|
232
|
+
bash tests/skill-triggering/run-all.sh
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## 许可证与安全
|
|
236
|
+
|
|
237
|
+
本项目使用 MIT 许可证,见 [LICENSE](LICENSE)。
|
|
238
|
+
|
|
239
|
+
如发现安全漏洞,请**不要**公开创建 issue,应使用 GitHub Security Advisory 或 [SECURITY.md](SECURITY.md) 中的联系方式私下报告。
|
|
240
|
+
|
|
241
|
+
## 其他插件推荐
|
|
242
|
+
|
|
243
|
+
| 插件 | 简介 |
|
|
244
|
+
|------|------|
|
|
245
|
+
| [logicprobe](https://github.com/AmethystLuna/logicprobe) | 文档与计划声称核查——逻辑原语验证(7 结构 + 7 对抗探针)、重构回归检测。自本插件拆分;Plan Verification Gate 依赖它。 |
|
|
246
|
+
| [superpowers](https://github.com/obra/superpowers) | 原始 agent 纪律引擎——技能加载强制、Red Flags、子代理驱动开发。本插件的多项 agent 合规模式(1% Rule、Red Flags、`<SUBAGENT-STOP>`、指令优先级)均借鉴自 Superpowers。 |
|
|
247
|
+
|
|
248
|
+
## 致谢
|
|
249
|
+
|
|
250
|
+
本插件的 agent 合规架构借鉴自 Jesse Vincent 的 [Superpowers](https://github.com/obra/superpowers)(MIT License)。特别感谢以下设计模式的启发:
|
|
251
|
+
|
|
252
|
+
- **1% Rule** — agent 会抗拒加载技能,需要极端语言突破偏见的关键洞察
|
|
253
|
+
- **Red Flags 表** — 枚举 agent 的合理化借口以预先阻断
|
|
254
|
+
- **`<SUBAGENT-STOP>`** — 阻止子代理重复加载引导上下文
|
|
255
|
+
- **指令优先级** — 用户 > 技能 > 系统提示的分层架构
|
|
256
|
+
- **技能类型** — Rigid vs Flexible 分类体系
|
|
257
|
+
- **会话启动注入模式** — 在会话启动时注入能力上下文的 hook 机制
|
|
258
|
+
- **触发测试框架** — `tests/skill-triggering/` 的结构和方法论
|
|
259
|
+
|
|
260
|
+
Superpowers 是通用开发插件。Embedded Workbench 将相同的纪律模式应用到嵌入式 C/C++ 领域。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# embedded-workbench bundle patch — one insert over the profile root.
|
|
2
|
+
#
|
|
3
|
+
# Row ids are stable identity in the config tree; later layers (the user's
|
|
4
|
+
# profile cordis.patch.yml, $DSH_HOME/cordis.patch.yml, --patch overlays)
|
|
5
|
+
# override a row by id, replacing the whole `config` (no deep merge).
|
|
6
|
+
|
|
7
|
+
- insert:
|
|
8
|
+
- id: embedded-workbench
|
|
9
|
+
name: 'dsh-embedded-workbench'
|
|
10
|
+
config:
|
|
11
|
+
enabled: true
|