dsh-embedded-workbench 0.7.1 → 0.8.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/README.en-US.md CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
  [![HOL Guard Scanner](https://img.shields.io/badge/HOL%20Guard-passing-00a67e)](https://github.com/hashgraph-online/hol-guard)
6
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.
7
+ Embedded C/C++ firmware toolbox — 4 agents, 8 skills covering FreeRTOS, ISR, NVM
8
+ storage, Keil MDK (AC5/AC6), ARMCLANG, HardFault triage, state machines,
9
+ architecture principles, LVGL patterns, and claim fact-checking.
8
10
 
9
11
  **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
12
 
@@ -31,7 +33,7 @@ Embedded C/C++ firmware toolbox — 4 agents, 7 skills covering FreeRTOS, ISR, N
31
33
  | `state-machine-design` | State models, retries, timeouts, transition gates, implementation patterns |
32
34
  | `hardfault-triage` | Processor exception triage — fault registers, stack frames, PC-to-source, root-cause classification |
33
35
 
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).
36
+ `logicprobe` (design-doc & plan claim verification) was **split out into its own plugin** — see [Other Plugins Recommended](#other-plugins-recommended).
35
37
 
36
38
  > 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
39
 
@@ -244,7 +246,7 @@ To report a security vulnerability, do **not** open a public issue. Use the priv
244
246
 
245
247
  | Plugin | Description |
246
248
  |--------|-------------|
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. |
249
+ | [logicprobe](https://github.com/AmethystLuna/logicprobe) | Claim-verification skill: checks every verifiable claim in design docs, architecture specs, and refactoring plans against the codebase, escalating behavioral claims to executable-model verification. Split out of this plugin; the Plan Verification Gate requires it. |
248
250
  | [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
251
 
250
252
  ## Acknowledgments
package/README.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  <p align="center"><a href="README.en-US.md">English</a> · <strong>中文</strong></p>
4
4
 
5
- 嵌入式 C/C++ 固件开发工具箱 — 4 个代理、7 个技能,覆盖 FreeRTOS、中断、NVM 存储、Keil MDK(AC5/AC6)、ARMCLANG、HardFault 分析、状态机、架构原则、LVGL 陷阱。
5
+ 嵌入式 C/C++ 固件开发工具箱 — 4 个代理、8 个技能,覆盖 FreeRTOS、中断、NVM 存储、Keil
6
+ MDK(AC5/AC6)、ARMCLANG、HardFault 分析、状态机、架构原则、LVGL 陷阱。
6
7
 
7
8
  **跨平台** — 支持 Claude Code、Codex CLI、Cursor、Kimi CLI、OpenCode、ZCode。基于 [Agent Skills](https://agentskills.io) 开放标准构建。
8
9
 
@@ -29,7 +30,7 @@
29
30
  | `state-machine-design` | 状态模型、重试、超时、转换门控、实现模式 |
30
31
  | `hardfault-triage` | 处理器异常分类 — 故障寄存器、栈帧、PC 定位源码、根因分类 |
31
32
 
32
- `logicprobe`(文档与计划声称核查、逻辑原语验证、对抗性探测)**已拆分为独立插件** — 见下方[其他插件推荐](#其他插件推荐)。
33
+ `logicprobe`(文档与计划声称核查技能)**已拆分为独立插件** — 见下方[其他插件推荐](#其他插件推荐)。
33
34
 
34
35
  > 技能内容大多来自作者个人嵌入式/固件开发工作经验和代码洁癖,按实际工程踩坑与约束沉淀,而非泛泛的模型生成内容。
35
36
 
@@ -85,7 +86,7 @@ git clone https://github.com/AmethystLuna/embedded-workbench.git ~/.claude/plugi
85
86
 
86
87
  安装:参见 [`.dsh/INSTALL.md`](.dsh/INSTALL.md)(四种方式,从纯技能拷贝到 `dsh plugin add`)。
87
88
 
88
- > DSH 安装注意:包名已使用 scoped 形式 `dsh-embedded-workbench`。在 web profile 的 `package.json` 中,依赖键与 `dsh.profile.bundles` 必须写 `dsh-embedded-workbench`;否则 dsh 加载器会因找不到 `node_modules/dsh-embedded-workbench` 而启动失败。
89
+ > DSH 安装注意:npm 包名为 `dsh-embedded-workbench`(无 scope)。在 web profile 的 `package.json` 中,依赖键与 `dsh.profile.bundles` 必须写 `dsh-embedded-workbench`;否则 dsh 加载器会因找不到 `node_modules/dsh-embedded-workbench` 而启动失败。
89
90
 
90
91
  ## 使用
91
92
 
@@ -242,7 +243,7 @@ bash tests/skill-triggering/run-all.sh
242
243
 
243
244
  | 插件 | 简介 |
244
245
  |------|------|
245
- | [logicprobe](https://github.com/AmethystLuna/logicprobe) | 文档与计划声称核查——逻辑原语验证(7 结构 + 7 对抗探针)、重构回归检测。自本插件拆分;Plan Verification Gate 依赖它。 |
246
+ | [logicprobe](https://github.com/AmethystLuna/logicprobe) | 声称核查技能:逐条核验设计文档、架构规格、重构计划中的可验证声称与代码库是否一致,行为类声称升级为可执行模型验证。自本插件拆分;Plan Verification Gate 依赖它。 |
246
247
  | [superpowers](https://github.com/obra/superpowers) | 原始 agent 纪律引擎——技能加载强制、Red Flags、子代理驱动开发。本插件的多项 agent 合规模式(1% Rule、Red Flags、`<SUBAGENT-STOP>`、指令优先级)均借鉴自 Superpowers。 |
247
248
 
248
249
  ## 致谢
package/lib/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Workbench toolbox. Injects the session-start gate text (1% Rule, Red
4
4
  * Flags, Plan Verification Gate, skills roster) into the first model step
5
5
  * of every agent session, mirroring the SessionStart hook the Claude Code
6
- * plugin installs. The 7 skills ship in this package's `skills/` directory
6
+ * plugin installs. The 8 skills ship in this package's `skills/` directory
7
7
  * and are registered at apply time into dsh's `ctx.skills` registry through
8
8
  * the standard filesystem provider, so they appear in every session catalog
9
9
  * without a manual copy step.
@@ -53,15 +53,15 @@ Plugin embedded-workbench is active. You have embedded C/C++ firmware developmen
53
53
  | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
54
54
  | "I can just read the file directly" | Skills have patterns and pitfalls you will not discover by reading. |
55
55
  | "I remember this skill content" | Skills evolve. Always load the current version. |
56
- | "I've explored enough, time to exit plan mode" | The exit_plan_mode tool is the verification gate. Have you loaded the logicprobe skill? Every plan must pass this gate before exit. |
57
- | "This plan is too simple for logicprobe" | The skill auto-classifies depth. You don't decide. |
58
- | "I already read the code, I know the file paths are correct" | Load the logicprobe skill, run Phase 0, append the "## Plan Verification" block. |
56
+ | "I've explored enough, time to exit plan mode" | The exit_plan_mode tool is the verification gate. Have you loaded the logicprobe skill — or, if it is not installed, the built-in fallback fact-check skill? Every plan must pass this gate before exit. |
57
+ | "This plan is too simple for logicprobe" | logicprobe auto-classifies depth; the fallback fact-check verifies every claim regardless. You don't decide. |
58
+ | "I already read the code, I know the file paths are correct" | Load the logicprobe skill or the fallback fact-check skill, verify each claim, append the "## Plan Verification" block. |
59
59
 
60
- **Plan Verification Gate**: Before calling exit_plan_mode (or presenting a plan for approval), either load the logicprobe skill (a separate plugin — if it is missing from your skill catalog, tell the user to install it) OR inform the user "此计划未经 logicprobe 验证,是否需要核查?" Silent skip is not an option.
60
+ **Plan Verification Gate**: Before calling exit_plan_mode (or presenting a plan for approval), load the logicprobe skill (a separate plugin)or, if it is missing from your skill catalog, load the built-in fallback fact-check skill for claim-by-claim verification, tell the user that behavioral/model claims degrade to manual confirmation, and recommend installing logicprobe. If neither is loaded, inform the user "此计划未经核查,是否需要我先做事实核查?" Silent skip is not an option.
61
61
 
62
62
  To load workflows and engineering policies: load the embedded-workbench skill.
63
63
 
64
- **Proactive features**: When you see state machines, protocol refactoring, behavioral claims ("always"/"never"), or multi-module tasks — suggest verification, adversarial probing, or parallel subagents BEFORE the user asks. Most users do not know these exist.
64
+ **Proactive features**: When you see state machines, protocol refactoring, behavioral claims ("always"/"never"), or multi-module tasks — suggest verification (logicprobe, or the built-in fact-check fallback if logicprobe is not installed), adversarial probing, or parallel subagents BEFORE the user asks. Most users do not know these exist.
65
65
  </EXTREMELY_IMPORTANT>`;
66
66
  export const Config = z.object({
67
67
  enabled: z.boolean().default(true),
@@ -3,7 +3,7 @@
3
3
  * Workbench toolbox. Injects the session-start gate text (1% Rule, Red
4
4
  * Flags, Plan Verification Gate, skills roster) into the first model step
5
5
  * of every agent session, mirroring the SessionStart hook the Claude Code
6
- * plugin installs. The 7 skills ship in this package's `skills/` directory
6
+ * plugin installs. The 8 skills ship in this package's `skills/` directory
7
7
  * and are registered at apply time into dsh's `ctx.skills` registry through
8
8
  * the standard filesystem provider, so they appear in every session catalog
9
9
  * without a manual copy step.
package/package.json CHANGED
@@ -1,81 +1,100 @@
1
1
  {
2
- "name": "dsh-embedded-workbench",
3
- "version": "0.7.1",
4
- "description": "Embedded C/C++ firmware development toolbox — 4 agents, 7 skills covering FreeRTOS, ISR, NVM storage, Keil MDK, ARMCLANG, HardFault, state machines, architecture, and LVGL patterns. Ships a native DeepSeek Harness (dsh) bundle that injects the session-start gate into the first model step.",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/types/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/types/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./cordis.patch.yml": "./cordis.patch.yml",
14
- "./package.json": "./package.json"
15
- },
16
- "files": [
17
- "lib",
18
- "src",
19
- "skills",
20
- "cordis.patch.yml"
21
- ],
22
- "dsh": {
23
- "category": "skill",
24
- "displayName": "嵌入式工作台",
25
- "bundle": {
26
- "patch": "./cordis.patch.yml"
27
- }
2
+ "name": "dsh-embedded-workbench",
3
+ "version": "0.8.1",
4
+ "description": "Embedded C/C++ firmware development toolbox — 4 agents, 8 skills covering FreeRTOS, ISR, NVM storage, Keil MDK, ARMCLANG, HardFault, state machines, architecture, LVGL patterns, and claim fact-checking. Ships a native DeepSeek Harness (dsh) bundle that injects the session-start gate into the first model step.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/types/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./cordis.patch.yml": "./cordis.patch.yml",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "lib",
18
+ "src",
19
+ "skills",
20
+ "cordis.patch.yml"
21
+ ],
22
+ "engines": {
23
+ "node": ">=20"
24
+ },
25
+ "dsh": {
26
+ "engines": {
27
+ "dsh": ">=0.1.0-rc.7"
28
+ },
29
+ "category": "skill",
30
+ "displayName": "嵌入式工作台",
31
+ "bundle": {
32
+ "patch": "./cordis.patch.yml"
33
+ },
34
+ "compatibility": {
35
+ "dsh": "^0.1.0-rc.7 || ^0.1.1-rc.1 || ^0.1.2-alpha.2",
36
+ "dshReleases": {
37
+ "0.1.0-rc.7": "compatible",
38
+ "0.1.0-rc.8": "compatible",
39
+ "0.1.1-rc.1": "compatible",
40
+ "0.1.1-rc.2": "compatible",
41
+ "0.1.2-alpha.2": "compatible"
28
42
  },
29
- "scripts": {
30
- "build": "tsc -p tsconfig.json",
31
- "typecheck": "tsc -p tsconfig.json --noEmit"
32
- },
33
- "dependencies": {},
34
- "peerDependencies": {
35
- "@deepseek-ai/cordis": "^4.0.1",
36
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
37
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
38
- "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
39
- "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.6",
40
- "@deepseek-ai/schemastery": "^3.18.1"
41
- },
42
- "devDependencies": {
43
- "@deepseek-ai/cordis": "^4.0.1",
44
- "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
45
- "@deepseek-ai/dsh-cordis-host-runner": "^0.1.0-rc.6",
46
- "@deepseek-ai/dsh-home-paths": "^0.1.0-rc.6",
47
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.1",
48
- "@deepseek-ai/dsh-scope": "^0.1.0-rc.6",
49
- "@deepseek-ai/dsh-session": "^0.0.1-rc.1",
50
- "@deepseek-ai/dsh-skill": "^0.1.0-rc.6",
51
- "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.6",
52
- "@deepseek-ai/schemastery": "^3.18.1",
53
- "@deepseek-ai/dsh-timeout": "^0.0.1-rc.1",
54
- "@types/node": "^20.0.0",
55
- "typescript": "^5.0.0"
56
- },
57
- "author": {
58
- "name": "Amethyst Luna",
59
- "url": "https://github.com/AmethystLuna"
60
- },
61
- "license": "MIT",
62
- "repository": "https://github.com/AmethystLuna/embedded-workbench",
63
- "keywords": [
64
- "embedded",
65
- "firmware",
66
- "c",
67
- "cpp",
68
- "freertos",
69
- "debugging",
70
- "keil",
71
- "armclang",
72
- "cortex-m",
73
- "hardfault",
74
- "state-machine",
75
- "lvgl",
76
- "architecture",
77
- "agentskills",
78
- "plugin",
79
- "dsh"
80
- ]
43
+ "profiles": [
44
+ "headless"
45
+ ]
46
+ }
47
+ },
48
+ "scripts": {
49
+ "build": "tsc -p tsconfig.json",
50
+ "typecheck": "tsc -p tsconfig.json --noEmit",
51
+ "bump": "node scripts/bump-version.mjs"
52
+ },
53
+ "peerDependencies": {
54
+ "@deepseek-ai/cordis": "^4.0.1",
55
+ "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
56
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
57
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6",
58
+ "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.8",
59
+ "@deepseek-ai/schemastery": "^3.18.1"
60
+ },
61
+ "devDependencies": {
62
+ "@deepseek-ai/cordis": "^4.0.1",
63
+ "@deepseek-ai/dsh-agent": "^0.1.0-rc.6",
64
+ "@deepseek-ai/dsh-cordis-host-runner": "^0.1.0-rc.8",
65
+ "@deepseek-ai/dsh-home-paths": "^0.1.0-rc.8",
66
+ "@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
67
+ "@deepseek-ai/dsh-scope": "^0.1.0-rc.8",
68
+ "@deepseek-ai/dsh-session": "^0.1.0-rc.6",
69
+ "@deepseek-ai/dsh-skill": "^0.1.0-rc.8",
70
+ "@deepseek-ai/dsh-skill-filesystem": "^0.1.0-rc.8",
71
+ "@deepseek-ai/dsh-timeout": "^0.0.1-rc.1",
72
+ "@deepseek-ai/schemastery": "^3.18.1",
73
+ "@types/node": "^20.0.0",
74
+ "typescript": "^7.0.2"
75
+ },
76
+ "author": {
77
+ "name": "Amethyst Luna",
78
+ "url": "https://github.com/AmethystLuna"
79
+ },
80
+ "license": "MIT",
81
+ "repository": "https://github.com/AmethystLuna/embedded-workbench",
82
+ "keywords": [
83
+ "embedded",
84
+ "firmware",
85
+ "c",
86
+ "cpp",
87
+ "freertos",
88
+ "debugging",
89
+ "keil",
90
+ "armclang",
91
+ "cortex-m",
92
+ "hardfault",
93
+ "state-machine",
94
+ "lvgl",
95
+ "architecture",
96
+ "agentskills",
97
+ "plugin",
98
+ "dsh"
99
+ ]
81
100
  }
@@ -36,9 +36,9 @@ If you catch yourself thinking any of these, STOP — you are rationalizing:
36
36
  | "The worker can figure out the details" | The worker has NO context from previous calls. A vague plan = the worker guessing. |
37
37
  | "I'll review it myself, no need for quality-coordinator" | Self-review catches ~60% of issues. A second pair catches the other 40%. |
38
38
  | "This change is too small for a Detailed Change Plan" | If it touches more than one function, it needs a plan. Even single-function changes benefit from explicit invariants. |
39
- | "I've explored enough, time to exit plan mode" | ExitPlanMode is the verification gate. Have you loaded `Skill("logicprobe")` (独立插件 / standalone plugin)? Every plan — simple or complex — must pass this gate before exit. |
40
- | "This plan is too simple for logicprobe" | The skill auto-classifies depth (LIGHTWEIGHT/STANDARD/ESCALATED). You don't decide whether verification is needed. Load it (外部插件) and let Phase 0 determine. |
41
- | "I already read the code, I know the file paths and API names are correct" | Organic verification leaves no audit trail. Load `Skill("logicprobe")` (外部插件), run Phase 0, append the `## Plan Verification` block. |
39
+ | "I've explored enough, time to exit plan mode" | ExitPlanMode is the verification gate. Have you loaded `Skill("logicprobe")` or, if it is not installed, the built-in fallback `Skill("fact-check")`? Every plan — simple or complex — must pass this gate before exit. |
40
+ | "This plan is too simple for logicprobe" | logicprobe auto-classifies depth (LIGHTWEIGHT/STANDARD/ESCALATED); the fallback fact-check verifies every claim regardless. You don't decide whether verification is needed. |
41
+ | "I already read the code, I know the file paths and API names are correct" | Organic verification leaves no audit trail. Load `Skill("logicprobe")` or the fallback `Skill("fact-check")`, verify each claim, append the `## Plan Verification` block. |
42
42
 
43
43
  ---
44
44
 
@@ -94,12 +94,13 @@ Claude Code's built-in `EnterPlanMode` / `ExitPlanMode` maps to the **Plan phase
94
94
 
95
95
  ### Plan Verification Gate
96
96
 
97
- > **logicprobe 已拆分为独立插件 / moved to a standalone plugin** (v0.6.0): the verification skill below now ships in its own plugin — <https://github.com/AmethystLuna/logicprobe>. Install it with `claude plugin install logicprobe@logicprobe` (or clone to `~/.claude/plugins/dev/logicprobe`). Without it, this gate degrades to option 2 below.
97
+ > **⚠️ logicprobe 已拆分为独立插件 / moved to a standalone plugin** (v0.6.0): the full verification skill (executable model checks, adversarial probing) now ships in its own plugin — <https://github.com/AmethystLuna/logicprobe>. Install it with `claude plugin install logicprobe@logicprobe` (or clone to `~/.claude/plugins/dev/logicprobe`). This plugin ships a built-in simplified fallback — `Skill("fact-check")` — for claim-by-claim verification when logicprobe is not installed; behavioral/model claims then degrade to manual confirmation.
98
98
 
99
99
  **Before calling `ExitPlanMode`**, exactly one of the following must happen:
100
100
 
101
- 1. **Load `Skill("logicprobe")`** (standalone plugin — install separately if missing) — the skill classifies depth (LIGHTWEIGHT / STANDARD / ESCALATED) based on objective plan features, runs verification, and appends a `## Plan Verification` summary block to the plan file.
102
- 2. **Inform the user** if you choose not to load the skill, you MUST say: *"此计划未经 logicprobe 验证。是否需要我在审批前运行核查?(This plan has not been fact-verified. Would you like me to run verification before approving?)"* The user must have the option to request verification before approving.
101
+ 1. **Load `Skill("logicprobe")`** (standalone plugin — install separately if missing) — the skill classifies depth (LIGHTWEIGHT / STANDARD / ESCALATED), runs verification (including executable model checks), and appends a `## Plan Verification` summary block to the plan file.
102
+ 2. **Load `Skill("fact-check")`** (built-in fallback, only when logicprobe is not installed) verifies every verifiable claim against the codebase with evidence, appends a `## Plan Verification` block marked `fact-check (fallback)`, and tells the user that state-machine/behavioral claims degrade to manual confirmation recommend installing logicprobe.
103
+ 3. **Inform the user** — if you choose not to load either skill, you MUST say: *"此计划未经核查。是否需要我在审批前运行事实核查?(This plan has not been fact-verified. Would you like me to run verification before approving?)"* The user must have the option to request verification before approving.
103
104
 
104
105
  Silent skip is not an option. Either verify, or tell the user you didn't.
105
106
 
@@ -154,6 +155,7 @@ Each domain skill is classified by how strictly it should be followed:
154
155
 
155
156
  - `debug-methodology`: 8 iron rules are non-negotiable
156
157
  - `logicprobe` (external plugin): claim verification must check every claim
158
+ - `fact-check` (built-in fallback): claim-by-claim verification when logicprobe is not installed
157
159
 
158
160
  **Flexible** — adapt principles to context. These are patterns and references, not commands.
159
161
 
@@ -169,15 +171,15 @@ If unsure, treat a skill as Rigid until you confirm otherwise.
169
171
 
170
172
  When multiple skills could apply, use this order:
171
173
 
172
- 1. **Diagnosis skills first** — `debug-methodology`, `hardfault-triage`, `logicprobe` (external plugin). These determine WHAT is wrong.
174
+ 1. **Diagnosis skills first** — `debug-methodology`, `hardfault-triage`, `logicprobe` (external plugin; use the built-in `fact-check` fallback if logicprobe is not installed). These determine WHAT is wrong.
173
175
  2. **Design skills second** — `state-machine-design`. These determine HOW to fix it.
174
176
  3. **Implementation skills third** — `c-cpp-dev`, `embedded-firmware-dev`, `keil-mdk-build`. These guide execution.
175
177
 
176
178
  "HardFault crash" → hardfault-triage first, then debug-methodology if root cause is complex.
177
179
  "Add retry logic" → state-machine-design first, then c-cpp-dev for implementation.
178
- "Review this design" → logicprobe first, then escalate findings to design-reviewer agent.
180
+ "Review this design" → logicprobe first (or the built-in fact-check fallback if logicprobe is not installed), then escalate findings to design-reviewer agent.
179
181
 
180
- **Cross-domain links**: load secondary skills ONLY when the primary skill's findings indicate they are needed. Don't pre-load. `hardfault-triage` ↔ `keil-mdk-build` (.map file bridge — load keil-mdk-build only if .map analysis is needed). `hardfault-triage` ↔ `debug-methodology` (root-cause analysis — load debug-methodology only if the fault cause is complex). `embedded-firmware-dev` ↔ `state-machine-design` (state transitions — load state-machine-design only if state logic is involved). `embedded-firmware-dev` ↔ `debug-methodology` (debugging process). `logicprobe` ↔ `design-reviewer` agent (design doc review, logic verification). `logicprobe` ↔ `state-machine-design` (behavioral claim probing).
182
+ **Cross-domain links**: load secondary skills ONLY when the primary skill's findings indicate they are needed. Don't pre-load. `hardfault-triage` ↔ `keil-mdk-build` (.map file bridge — load keil-mdk-build only if .map analysis is needed). `hardfault-triage` ↔ `debug-methodology` (root-cause analysis — load debug-methodology only if the fault cause is complex). `embedded-firmware-dev` ↔ `state-machine-design` (state transitions — load state-machine-design only if state logic is involved). `embedded-firmware-dev` ↔ `debug-methodology` (debugging process). `logicprobe` ↔ `design-reviewer` agent (design doc review, logic verification). `logicprobe` ↔ `state-machine-design` (behavioral claim probing). `logicprobe` ↔ `fact-check` (built-in fallback when the logicprobe plugin is not installed).
181
183
 
182
184
  ## Domain Skills
183
185
 
@@ -192,7 +194,7 @@ Load domain-specific guidance when the task matches. Skills marked with 📚 hav
192
194
  | Keil MDK, ARMCLANG, build system, .map optimization | `Skill("keil-mdk-build")` | Flexible | — |
193
195
  | State machines, retries, timeouts | `Skill("state-machine-design")` | Flexible | — |
194
196
 
195
- Design doc review, claim verification, logic primitive + adversarial probing → `Skill("logicprobe")` — **standalone plugin** (see Plan Verification Gate above).
197
+ Design doc review, claim verification, logic primitive + adversarial probing → `Skill("logicprobe")` — **standalone plugin**; when logicprobe is not installed, use the built-in `Skill("fact-check")` fallback for claim-by-claim verification (see Plan Verification Gate above).
196
198
 
197
199
  ## Templates & References
198
200
 
@@ -235,6 +237,6 @@ When you observe any of these patterns in the user's task, **suggest the relevan
235
237
  ### Suggestion Rules
236
238
 
237
239
  - **Suggest once per task**, not repeatedly. If the user declines, don't push.
238
- - **Be specific about what the feature does** — don't just name-drop. Say "I can find deadlocks and missing transitions" not "I can run logicprobe."
240
+ - **Be specific about what the feature does** — don't just name-drop. Say "I can find deadlocks and missing transitions" not "I can run logicprobe." If logicprobe is not installed, offer the built-in fact-check skill: "I can check every claim in the plan against the codebase."
239
241
  - **Estimate cost**: for lightweight checks, say "this takes ~30 seconds." For Python harness runs, say "this will generate and run a verification script."
240
242
  - **Respect the user's decision**: if they decline, move on. The features are tools, not requirements.
@@ -73,7 +73,7 @@ This plugin defines 4 sub-agents. On platforms without an `Agent` tool:
73
73
  | Claude Code Agent | Alternative Approach |
74
74
  |-------------------|---------------------|
75
75
  | `architecture-steward` | Ask user to run a separate session with planning prompt |
76
- | `design-reviewer` | Load `logicprobe` skill (standalone plugin) in current session; manually verify claims |
76
+ | `design-reviewer` | Load `logicprobe` skill (standalone plugin; built-in `fact-check` fallback if logicprobe is not installed); manually verify claims |
77
77
  | `execution-worker` | Sequential implementation in current session with approval gates |
78
78
  | `quality-coordinator` | Self-review checklist from `references/final-qc.md` template |
79
79
 
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: fact-check
3
+ description: "Use when reviewing design documents, architecture specs, technical proposals, or plans that make claims about API names, file paths, enum values, counts, or mechanism feasibility — a lightweight claim-by-claim check against the codebase with evidence. Built into embedded-workbench as the fallback when the full logicprobe plugin is not installed. NOT for state machines, protocol/retry logic, or 'always'/'never' behavioral claims that need executable model verification — those require the logicprobe plugin."
4
+ ---
5
+
6
+ # Fact Check (fallback)
7
+
8
+ Lightweight claim verification built into this plugin. Use it when the full
9
+ `logicprobe` plugin is not installed — it checks every verifiable claim in a
10
+ document/plan against the codebase with evidence, without model escalation.
11
+
12
+ ## When to use
13
+
14
+ - Design docs, architecture specs, technical proposals, refactoring plans
15
+ that name APIs, types, files, enums, counts, or mechanisms.
16
+ - Proactively when a plan will be approved (plan-mode gate) and logicprobe is
17
+ unavailable.
18
+
19
+ ## What to verify (per claim)
20
+
21
+ | Claim type | Method |
22
+ |-----------|--------|
23
+ | Numeric claims (counts, sizes, frequencies) | `grep -c` / `grep -rn` |
24
+ | API/type/enum names | Extract actual signatures/values from headers |
25
+ | File paths and line numbers | Confirm existence and content |
26
+ | Mechanism feasibility | Check language standard / compiler support |
27
+
28
+ ## Process
29
+
30
+ 1. Enumerate every verifiable claim (quote it verbatim).
31
+ 2. Verify each against the codebase with evidence (file:line + excerpt).
32
+ 3. Output per claim: claim → evidence → verdict.
33
+
34
+ ## Output format
35
+
36
+ - **Claim**: <verbatim quote>
37
+ - **Evidence**: <file:line + grep/read excerpt>
38
+ - **Verdict**: confirmed | refuted | unverifiable
39
+ - **Correction direction** (when refuted) — never fix inline.
40
+
41
+ Append a `## Plan Verification` block:
42
+
43
+ ```markdown
44
+ ## Plan Verification
45
+ - **Mode**: fact-check (fallback — logicprobe plugin not installed)
46
+ - **Claims checked**: [N] confirmed, [M] refuted, [K] unverifiable
47
+ - **Escalation**: model verification NOT run (requires logicprobe plugin)
48
+ ```
49
+
50
+ ## Boundaries
51
+
52
+ - **No executable model verification** — no state-space exploration, no harness.
53
+ - State machines (≥3 states), ACK/NACK/retry/timeout logic, lock/unlock
54
+ ordering, and "always"/"never"/"guaranteed" claims require the `logicprobe`
55
+ plugin: install it (see `.dsh/INSTALL.md`) or tell the user verification is
56
+ degraded to manual mode for those claims.
57
+ - Checking a claim is not a security audit; being checked ≠ being safe.
package/src/index.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Workbench toolbox. Injects the session-start gate text (1% Rule, Red
4
4
  * Flags, Plan Verification Gate, skills roster) into the first model step
5
5
  * of every agent session, mirroring the SessionStart hook the Claude Code
6
- * plugin installs. The 7 skills ship in this package's `skills/` directory
6
+ * plugin installs. The 8 skills ship in this package's `skills/` directory
7
7
  * and are registered at apply time into dsh's `ctx.skills` registry through
8
8
  * the standard filesystem provider, so they appear in every session catalog
9
9
  * without a manual copy step.
@@ -62,15 +62,15 @@ Plugin embedded-workbench is active. You have embedded C/C++ firmware developmen
62
62
  | "Let me explore the codebase first" | Skills tell you HOW to explore. Check first. |
63
63
  | "I can just read the file directly" | Skills have patterns and pitfalls you will not discover by reading. |
64
64
  | "I remember this skill content" | Skills evolve. Always load the current version. |
65
- | "I've explored enough, time to exit plan mode" | The exit_plan_mode tool is the verification gate. Have you loaded the logicprobe skill? Every plan must pass this gate before exit. |
66
- | "This plan is too simple for logicprobe" | The skill auto-classifies depth. You don't decide. |
67
- | "I already read the code, I know the file paths are correct" | Load the logicprobe skill, run Phase 0, append the "## Plan Verification" block. |
65
+ | "I've explored enough, time to exit plan mode" | The exit_plan_mode tool is the verification gate. Have you loaded the logicprobe skill — or, if it is not installed, the built-in fallback fact-check skill? Every plan must pass this gate before exit. |
66
+ | "This plan is too simple for logicprobe" | logicprobe auto-classifies depth; the fallback fact-check verifies every claim regardless. You don't decide. |
67
+ | "I already read the code, I know the file paths are correct" | Load the logicprobe skill or the fallback fact-check skill, verify each claim, append the "## Plan Verification" block. |
68
68
 
69
- **Plan Verification Gate**: Before calling exit_plan_mode (or presenting a plan for approval), either load the logicprobe skill (a separate plugin — if it is missing from your skill catalog, tell the user to install it) OR inform the user "此计划未经 logicprobe 验证,是否需要核查?" Silent skip is not an option.
69
+ **Plan Verification Gate**: Before calling exit_plan_mode (or presenting a plan for approval), load the logicprobe skill (a separate plugin)or, if it is missing from your skill catalog, load the built-in fallback fact-check skill for claim-by-claim verification, tell the user that behavioral/model claims degrade to manual confirmation, and recommend installing logicprobe. If neither is loaded, inform the user "此计划未经核查,是否需要我先做事实核查?" Silent skip is not an option.
70
70
 
71
71
  To load workflows and engineering policies: load the embedded-workbench skill.
72
72
 
73
- **Proactive features**: When you see state machines, protocol refactoring, behavioral claims ("always"/"never"), or multi-module tasks — suggest verification, adversarial probing, or parallel subagents BEFORE the user asks. Most users do not know these exist.
73
+ **Proactive features**: When you see state machines, protocol refactoring, behavioral claims ("always"/"never"), or multi-module tasks — suggest verification (logicprobe, or the built-in fact-check fallback if logicprobe is not installed), adversarial probing, or parallel subagents BEFORE the user asks. Most users do not know these exist.
74
74
  </EXTREMELY_IMPORTANT>`
75
75
 
76
76
  export interface Config {