software-design-test 1.2.0
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/CHANGELOG.md +63 -0
- package/LICENSE +21 -0
- package/README.md +275 -0
- package/cordis.patch.yml +23 -0
- package/docs/FRAMEWORK.zh-en.md +149 -0
- package/docs/INSTALL.zh-en.md +226 -0
- package/docs/USAGE.zh-en.md +295 -0
- package/icon.svg +21 -0
- package/lib/index.js +197 -0
- package/lib/self-check.js +313 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +80 -0
- package/scripts/capture.mjs +318 -0
- package/scripts/guard.mjs +311 -0
- package/scripts/report.mjs +484 -0
- package/scripts/session.mjs +709 -0
- package/scripts/verify.mjs +205 -0
- package/skills/observed-test-plan/MATRIX.md +99 -0
- package/skills/observed-test-plan/PERMISSIONS.md +109 -0
- package/skills/observed-test-plan/PLAN-TEMPLATE.md +93 -0
- package/skills/observed-test-plan/SKILL.md +135 -0
- package/skills/observed-ui-test/BANNED-INPUTS.md +161 -0
- package/skills/observed-ui-test/EVIDENCE.md +113 -0
- package/skills/observed-ui-test/FRAMEWORK.md +181 -0
- package/skills/observed-ui-test/LEVELS.md +137 -0
- package/skills/observed-ui-test/REPORT-TEMPLATE.md +111 -0
- package/skills/observed-ui-test/SKILL.md +210 -0
- package/skills/software-design-test/DEFECTS.md +205 -0
- package/skills/software-design-test/HEURISTICS.md +236 -0
- package/skills/software-design-test/PERSONAS-SCENARIOS.md +159 -0
- package/skills/software-design-test/SKILL.md +211 -0
- package/skills/software-design-test/SOURCES.md +118 -0
- package/skills/software-design-test/TEST-CONTENT.md +257 -0
- package/skills/software-design-test/WORKFLOW.md +293 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# 变更记录 / Changelog
|
|
2
|
+
|
|
3
|
+
本项目遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/) 与[语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
|
+
This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [SemVer](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## [1.2.0] - 2026-10-04
|
|
7
|
+
|
|
8
|
+
### 新增 / Added
|
|
9
|
+
|
|
10
|
+
- **触发词即开始**:用户说「模拟真实用户测试」或英文等价表达(`simulate a real user test`、
|
|
11
|
+
`run a real-user simulation test`、`simulated user testing`、`test it like a real user`)时,
|
|
12
|
+
插件**立即进入真实模拟测试**:一句话确认对象 → 发权限问卷 → 建会话开跑,不再讨论方法论。
|
|
13
|
+
- **测试内容清单 `TEST-CONTENT.md`**:15 类"测什么",每类含检查项 / 怎么看 / 判据——
|
|
14
|
+
窗口与界面尺寸、鼠标速度与指针、目标尺寸与间距、工具栏与菜单、文字排版、布局层级、反馈状态、
|
|
15
|
+
效率流程、键盘焦点、可访问性、性能响应、错误恢复、数据输入、跨设备一致性、视觉打磨,
|
|
16
|
+
附阈值速查表(WCAG 2.5.8 / 2.5.5 / 1.4.3 / 1.4.4 / 1.4.10、Apple 44pt、Material 48dp、
|
|
17
|
+
0.1s–1s–10s 响应时限、悬停 300–500ms)。
|
|
18
|
+
- **窗口尺寸与指针速度专项**:窗口尺寸矩阵(最小 / 默认 / 最大化 / 分屏 / 缩放 200% / 多显示器)、
|
|
19
|
+
指针总行程与精细操作测量法(录屏帧估算,不需要任何自动化工具)。
|
|
20
|
+
- 会话脚手架新增 `content.md`(15 类跟踪表 + 十分钟快扫 + 尺寸/速度测量表);
|
|
21
|
+
发现条目新增 `content`(测试内容类别)与 `criteria`(判据)字段。
|
|
22
|
+
- 报告新增 **「测试内容分布」** 一节,按测试内容聚合发现、给出每类最坏级别与判据。
|
|
23
|
+
- 并入已核验的调研细节:单人启发式评估的发现率(严重 42% / 轻微 32%)、严重级=频率×影响×持续性、
|
|
24
|
+
认知走查会话组织(任一问"否"即 Fail)、出声思维"不许救援"、N=5 只是发现法则、
|
|
25
|
+
检查类方法与真人会话必须交替;观察记录 11 字段与 issue record 字段清单。
|
|
26
|
+
- 修正两处以讹传讹:巡游按书中的"城区"分组(Configuration / Dirty Harry 不在书内)、
|
|
27
|
+
`SFDIPOT` 而非 `SFDPOT`(补回 Interfaces 透镜)。
|
|
28
|
+
- 新增 CI(`.github/workflows/verify.yml`)与 `CHANGELOG.md`。
|
|
29
|
+
|
|
30
|
+
### 变更 / Changed
|
|
31
|
+
|
|
32
|
+
- **插件改名为 `software-design-test`**(原 `dsh-observed-ui-test`);主技能同名,
|
|
33
|
+
是 `/` 菜单里的直接入口;`cordis.patch.yml` 行 id 与包名同步。
|
|
34
|
+
- 重心从"观察式测试"移到**"如何模拟真实用户做软件测试"**:主技能重写,
|
|
35
|
+
README / 安装说明 / 使用说明 / 框架总览 / locale / package 描述全部改为模拟优先的叙述。
|
|
36
|
+
- `countTableRows` 修正为只统计文件内**第一张**表,避免 `content.md` 的测量表被计入类别数。
|
|
37
|
+
|
|
38
|
+
## [1.1.0] - 2026-10-03
|
|
39
|
+
|
|
40
|
+
### 新增 / Added
|
|
41
|
+
|
|
42
|
+
- `user-sim-bug-hunt`(现 `software-design-test`)技能:十步工作流(P0 立项与权限 → P1 人物 →
|
|
43
|
+
P2 场景 → P3 任务卡 → P4 旅程 → P5 启发式与巡游 → P6 执行 → P7 判定 → P8 报告 → P9 复测)。
|
|
44
|
+
- 人物与场景构建、Nielsen 十项、HICCUPPS(F)、SFDIPOT、Whittaker 巡游、WCAG 2.2 无障碍步骤,
|
|
45
|
+
以及带核验标记的 [SOURCES.md](skills/software-design-test/SOURCES.md)。
|
|
46
|
+
- 会话脚手架新增 `personas.md` / `scenarios.md` / `journey.md` / `heuristics.md`;
|
|
47
|
+
报告新增「用户模拟覆盖」一节。
|
|
48
|
+
|
|
49
|
+
## [1.0.0] - 2026-10-03
|
|
50
|
+
|
|
51
|
+
### 新增 / Added
|
|
52
|
+
|
|
53
|
+
- 首个版本(最初命名 `dsh-observed-ui-test`):观察式界面测试。
|
|
54
|
+
- 两个技能:`observed-ui-test`(五条硬性规则、三级操作模式、十大观察维度、取证协议、报告模板)、
|
|
55
|
+
`observed-test-plan`(权限问卷、范围六项、元素清单、用例矩阵)。
|
|
56
|
+
- 脚本:`session.mjs`(会话、权限闸门、发现落盘)、`capture.mjs`(只读截屏/录屏)、
|
|
57
|
+
`guard.mjs`(只读观察输入注入线索)、`report.mjs`(中英对照报告)、`verify.mjs`(离线自检)。
|
|
58
|
+
- 硬规则:真实鼠标键盘、画面唯一证据、**禁止任何内部指针注入指令**、权限闸门先行。
|
|
59
|
+
- 中英对照的 README、安装说明、使用说明与框架总览。
|
|
60
|
+
|
|
61
|
+
[1.2.0]: https://github.com/Inceptzws/software-design-test/compare/v1.1.0...v1.2.0
|
|
62
|
+
[1.1.0]: https://github.com/Inceptzws/software-design-test/compare/v1.0.0...v1.1.0
|
|
63
|
+
[1.0.0]: https://github.com/Inceptzws/software-design-test/releases/tag/v1.0.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Inceptzws
|
|
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.md
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
# software-design-test · 软件设计测试(模拟真实用户)/ Software Design Testing by Simulating Real Users
|
|
2
|
+
|
|
3
|
+
**一个 DeepSeek Harness 插件(DSH bundle plugin),重心是「怎么模拟真实用户来测软件」:
|
|
4
|
+
建人物与场景 → 拆任务卡 → 用出声思维在三级操作模式下真实操作 → 靠录屏与截屏判断功能元素是否
|
|
5
|
+
完好、工具是否真的可用,系统找出断头路、绕路、误导与状态错误。人不借助任何输入注入。**
|
|
6
|
+
An AI-native DSH bundle plugin whose centerpiece is **how to simulate a real user to test software**:
|
|
7
|
+
personas and scenarios, executable task cards, think-aloud execution in three input modes, and
|
|
8
|
+
screen-evidence judgement of element integrity and tool usability — with zero input injection.
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/software-design-test)
|
|
11
|
+
[](https://github.com/Inceptzws/software-design-test/actions/workflows/verify.yml)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
[](https://github.com/topics/dsh-plugin)
|
|
14
|
+
|
|
15
|
+
[English](#english) | 中文
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 它是什么 / What it is
|
|
20
|
+
|
|
21
|
+
用 DeepSeek Harness 做软件设计(尤其 macOS、Windows、iPhone、iPad 各种交互设备)时,
|
|
22
|
+
把"改完到底好不好用"变成一套可执行、可审计的流程。**核心是模拟真实用户**:
|
|
23
|
+
不是"假装点几下",而是明确**以谁的身份(人物)、想完成什么(任务)、用什么证明(画面)**,
|
|
24
|
+
然后由真人用真实鼠标键盘在他会走的路径上走一遍:
|
|
25
|
+
|
|
26
|
+
- **人是唯一的手**:只用真实鼠标与键盘操作,分三级模式推进。
|
|
27
|
+
- **屏幕是唯一的证据**:从录屏/截屏观察元素是否完好、工具是否可用,代码与日志只是线索。
|
|
28
|
+
- **不允许内在指针指令**:不注入鼠标/触摸/按键事件,不驱动自动化框架,不调用软件内部句柄。
|
|
29
|
+
- **先问权限再动手**:鼠标、键盘、录屏、截屏与系统权限逐项询问用户,未答复不开始。
|
|
30
|
+
- **可以观察注入**:只读守门器盯着"有没有注入工具在跑",命中就落盘、就进报告。
|
|
31
|
+
- **中英对照**:技能内容、问卷、报告模板、文档全部中英对照。
|
|
32
|
+
|
|
33
|
+
> EN: A verifiable process for "is it actually usable yet": the human is the only hand (three
|
|
34
|
+
> escalating input modes), the screen is the only evidence, internal pointer directives are banned,
|
|
35
|
+
> permissions are asked before anything starts, a read-only watchdog records injection clues, and
|
|
36
|
+
> every artifact is bilingual.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 安装 / Install
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 本地目录(推荐;本机工作区里就是) / local checkout (recommended)
|
|
44
|
+
dsh plugin --profile desktop add link:/Users/inception/Documents/deepseek-harness/default-workspace/software-design-test
|
|
45
|
+
|
|
46
|
+
# GitHub(无需克隆)/ from GitHub
|
|
47
|
+
dsh plugin --profile desktop add github:Inceptzws/software-design-test
|
|
48
|
+
|
|
49
|
+
# npm / from npm
|
|
50
|
+
dsh plugin --profile desktop add software-design-test
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
重启 Harness,然后确认:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
grep -n "software-design-test" ~/.dsh/profiles/desktop/package.json
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
(依赖里出现 `link:` 那一行、`dsh.profile.bundles` 里出现同名条目即挂载成功;
|
|
60
|
+
在 `/` 菜单或 `skill` 工具里能看到两个技能是最可靠的确认。)
|
|
61
|
+
|
|
62
|
+
完整安装步骤、界面安装、手动挂载、卸载与排错见 **[docs/INSTALL.zh-en.md](docs/INSTALL.zh-en.md)**
|
|
63
|
+
(安装说明 / Installation,中英对照)。
|
|
64
|
+
> EN: Full install guide — local, GitHub, npm, UI install, manual mount, uninstall, troubleshooting:
|
|
65
|
+
> [docs/INSTALL.zh-en.md](docs/INSTALL.zh-en.md).
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## 使用 / Usage
|
|
70
|
+
|
|
71
|
+
1. **直接说触发词:`模拟真实用户测试`**(英文:`simulate a real user test` / `run a real-user simulation test`)——
|
|
72
|
+
插件会**立即进入真实模拟测试**:一句确认对象 → 发权限问卷 → 建会话开跑,不再跟你讨论方法论。
|
|
73
|
+
也可以说"用 software-design-test 测一下 <应用名>",或从 `/` 菜单选 `software-design-test`。
|
|
74
|
+
2. 回答权限问卷(鼠标、键盘级别、录屏、截屏、麦克风、系统权限、范围、数据边界、合规确认)。
|
|
75
|
+
3. 建会话 → 记录闸门 → 只看画面列元素清单与用例矩阵。
|
|
76
|
+
4. 按 **L1 仅鼠标 → L2 鼠标+键盘禁快捷键 → L3 可快捷键** 执行,逐条落盘。
|
|
77
|
+
5. 生成中英对照报告(含未验证项、权限缺口、跨模式差异、注入观察)。
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd software-design-test
|
|
81
|
+
node scripts/session.mjs init ./ui-test-demo-2026-10-04 --platform macos --app "Demo"
|
|
82
|
+
node scripts/session.mjs gate ./ui-test-demo-2026-10-04 --mouse yes --keyboard L2 \
|
|
83
|
+
--screen-recording yes --screenshot yes --compliance yes
|
|
84
|
+
node scripts/capture.mjs check
|
|
85
|
+
node scripts/guard.mjs scan ./ui-test-demo-2026-10-04
|
|
86
|
+
node scripts/capture.mjs record ./ui-test-demo-2026-10-04 --label L1 --seconds 60
|
|
87
|
+
node scripts/report.mjs build ./ui-test-demo-2026-10-04
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
完整用法、对话模板、FAQ 见 **[docs/USAGE.zh-en.md](docs/USAGE.zh-en.md)**
|
|
91
|
+
(使用说明 / Usage,中英对照);框架的从上到下设计见
|
|
92
|
+
**[docs/FRAMEWORK.zh-en.md](docs/FRAMEWORK.zh-en.md)**。
|
|
93
|
+
> EN: Full usage guide with copy-paste prompts and FAQ: [docs/USAGE.zh-en.md](docs/USAGE.zh-en.md).
|
|
94
|
+
> Top-down framework: [docs/FRAMEWORK.zh-en.md](docs/FRAMEWORK.zh-en.md).
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 三个技能 / Three skills
|
|
99
|
+
|
|
100
|
+
| 技能 Skill | 用途 Purpose |
|
|
101
|
+
| --- | --- |
|
|
102
|
+
| **`software-design-test`**(重心 centerpiece) | **模拟真实用户**:人物 → 场景 → 任务卡 → 旅程 → 启发式/巡游 → 执行 → 判定 → 报告 |
|
|
103
|
+
| `observed-test-plan` | 准备:权限问卷、范围六项、只看画面的元素清单、用例矩阵与优先级 |
|
|
104
|
+
| `observed-ui-test` | 执行规则:五条硬性规则、三级模式、十大观察维度、取证协议、报告模板 |
|
|
105
|
+
|
|
106
|
+
技能名与插件名同名:`software-design-test` 就是本插件的主技能,也是 `/` 菜单里直接可用的入口。
|
|
107
|
+
|
|
108
|
+
三个技能都是模型可调用的,请求匹配时 Agent 会自己选用。
|
|
109
|
+
> EN: All three skills are model-invocable; the agent picks them up when the request matches.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 测什么 / What to test — the content checklist
|
|
114
|
+
|
|
115
|
+
用户真正关心的是**测什么**。完整清单 [TEST-CONTENT.md](skills/software-design-test/TEST-CONTENT.md)
|
|
116
|
+
共 15 类,每类给出"检查项 / 怎么看 / 判据":
|
|
117
|
+
|
|
118
|
+
| 类别 | 先问什么 |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| §1 窗口与界面尺寸 | 这个界面的大小便于使用吗?最小尺寸、分屏、缩放 200% 还能用吗? |
|
|
121
|
+
| §2 鼠标速度与指针 | 鼠标要跑多远?要不要很慢很准?双击速度跟系统一致吗?悬停菜单会不会"路过就弹"? |
|
|
122
|
+
| §3 目标尺寸与间距 | 按钮够大吗?相邻按钮会不会误点?(24 / 44 / 48 阈值) |
|
|
123
|
+
| §4 工具栏与菜单 | 图标不看提示能看懂吗?常用命令一级可达吗?变窄时会不会消失? |
|
|
124
|
+
| §5–§15 | 文字排版 · 布局层级 · 反馈状态 · 效率流程 · 键盘焦点 · 可访问性 · 性能响应 · 错误恢复 · 数据输入 · 跨设备一致性 · 视觉打磨 |
|
|
125
|
+
|
|
126
|
+
阈速查(24×24 / 44×44 / 48dp、对比度 4.5:1、放大 200%、0.1s–1s–10s 响应时限、悬停 300–500ms…)见清单附 A。
|
|
127
|
+
|
|
128
|
+
> The checklist answers *what we actually look at* — window size, pointer travel and speed, toolbar
|
|
129
|
+
> readability, target sizes, text, layout, feedback, efficiency, keyboard, accessibility, performance,
|
|
130
|
+
> errors, data, cross-device consistency and polish — with criteria such as WCAG 2.5.8.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 模拟真实用户:十步工作流 / Simulating a real user: the ten steps
|
|
135
|
+
|
|
136
|
+
完整流程写在 [skills/software-design-test/WORKFLOW.md](skills/software-design-test/WORKFLOW.md):
|
|
137
|
+
|
|
138
|
+
| # | 步骤 Step | 产出 Artifact |
|
|
139
|
+
| --- | --- | --- |
|
|
140
|
+
| P0 | 立项与权限 Charter & gate | `session.json` / `permissions.md` |
|
|
141
|
+
| P1 | 人物 Personas(3–5 个,含依据与"会在哪放弃") | `personas.md` |
|
|
142
|
+
| P2 | 场景 Scenarios(首次成功/例行/出错恢复/中断/破坏性/交接) | `scenarios.md` |
|
|
143
|
+
| P3 | 任务卡 Task cards(意图 + 画面可判定的成功标准) | `matrix.md` |
|
|
144
|
+
| P4 | 旅程 Journey(进入/首次成功/熟练/出错恢复/退出再进入) | `journey.md` |
|
|
145
|
+
| P5 | 启发式与巡游 Sweep(认知走查四问 → 十项启发式 → HICCUPPS/SFDIPOT → 14 条巡游) | `heuristics.md` |
|
|
146
|
+
| P6 | 执行 Sessions(出声思维 × 三级模式 × 录屏截屏) | `findings.jsonl` / `evidence/` |
|
|
147
|
+
| P7 | 判定 Adjudicate(分类、定级、复现与最小化) | 定稿发现 |
|
|
148
|
+
| P8 | 报告 Report(去重 + 用户模拟覆盖) | `report.md` |
|
|
149
|
+
| P9 | 复测 Retest(同一任务卡/人物/级别) | 追加到原条目 |
|
|
150
|
+
|
|
151
|
+
配套清单:[启发式与巡游](skills/software-design-test/HEURISTICS.md)(含 Nielsen 十项、HICCUPPS(F)、
|
|
152
|
+
SFDIPOT、Whittaker 巡游、WCAG 2.2 仅键盘/屏幕阅读器步骤)· [人物与场景](skills/software-design-test/PERSONAS-SCENARIOS.md) ·
|
|
153
|
+
[缺陷与复现](skills/software-design-test/DEFECTS.md) · [出处](skills/software-design-test/SOURCES.md)。
|
|
154
|
+
|
|
155
|
+
> EN: Ten phases from personas to retest, with heuristics, tours and accessibility checklists, all
|
|
156
|
+
> composed with the three input modes and the no-injection rule. See
|
|
157
|
+
> [WORKFLOW.md](skills/software-design-test/WORKFLOW.md).
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 三级操作模式 / The three input modes
|
|
162
|
+
|
|
163
|
+
| 级别 | 允许 | 禁止 | 能抓到 |
|
|
164
|
+
| --- | --- | --- | --- |
|
|
165
|
+
| **L1 仅鼠标** | 移动、悬停、单击、双击、右键、拖拽、滚轮;预置剪贴板 + 菜单粘贴 | 一切键盘输入(含 Tab) | 无鼠标可达路径、命中区过小、必须悬停才可发现 |
|
|
166
|
+
| **L2 鼠标+键盘** | 字符输入、Enter、Tab/Shift+Tab、方向键、退格、空格、Home/End/PageUp/Down;Shift 仅用于大写 | 一切修饰键组合(⌘/Ctrl/⌥/Alt/Win)、F1–F12、把 Esc 当命令键 | 键盘导航断链、焦点环错位/丢失、焦点陷阱、Tab 顺序错乱 |
|
|
167
|
+
| **L3 加快捷键** | 全部放开 | 仍禁止内部指针指令 | 快捷键失效/冲突、鼠标路径与快捷键路径结果不一致 |
|
|
168
|
+
|
|
169
|
+
跨模式差异本身就是结论:只在 L3 能完成 = 缺鼠标路径;只在 L1/L2 能完成 = 快捷键路径坏了。
|
|
170
|
+
> EN: The difference across modes is itself the finding.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 脚本 / Scripts
|
|
175
|
+
|
|
176
|
+
| 脚本 | 作用 | 是否只读 |
|
|
177
|
+
| --- | --- | --- |
|
|
178
|
+
| `scripts/session.mjs` | 会话脚手架、权限闸门、发现落盘、状态统计 | 只写会话目录 |
|
|
179
|
+
| `scripts/capture.mjs` | 截屏/录屏(macOS、Windows、iOS 模拟器、Android) | **只读屏,绝不注入** |
|
|
180
|
+
| `scripts/guard.mjs` | 观察输入注入线索(进程表 + 测试文本) | **只读观察,绝不执行注入** |
|
|
181
|
+
| `scripts/report.mjs` | 生成中英对照报告 | 只读会话目录 |
|
|
182
|
+
| `scripts/verify.mjs` | 离线自检 8 项(挂载、元数据、链接、注入 API、CLI 端到端) | 只读 |
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## 自检 / Verify
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
node scripts/verify.mjs # 8/8 checks passed
|
|
190
|
+
node --test test/*.test.mjs # 25/25 pass
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
自检里有一项专门扫描 `lib/` 与 `scripts/`,确保这个包里**不存在任何可执行的输入注入 API**;
|
|
194
|
+
另有一条测试确保 `capture.mjs` 永远不会长出一个 `input` 子命令。
|
|
195
|
+
> EN: One check scans `lib/` and `scripts/` so the package can never grow an executable
|
|
196
|
+
> input-injection API; another asserts `capture.mjs` never gains an `input` subcommand.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 目录 / Layout
|
|
201
|
+
|
|
202
|
+
```text
|
|
203
|
+
software-design-test/
|
|
204
|
+
├── package.json # dsh.bundle.patch → cordis.patch.yml
|
|
205
|
+
├── cordis.patch.yml # 挂载:id: observed-ui-test
|
|
206
|
+
├── lib/index.js # Cordis 插件:ctx.skills provider(挂载即校验)
|
|
207
|
+
├── lib/self-check.js # 离线校验工具
|
|
208
|
+
├── skills/observed-ui-test/ # SKILL.md · FRAMEWORK · LEVELS · BANNED-INPUTS · EVIDENCE · REPORT-TEMPLATE
|
|
209
|
+
├── skills/observed-test-plan/ # SKILL.md · PERMISSIONS · MATRIX · PLAN-TEMPLATE
|
|
210
|
+
├── skills/software-design-test/ # SKILL.md · WORKFLOW · PERSONAS-SCENARIOS · HEURISTICS · DEFECTS · SOURCES
|
|
211
|
+
├── scripts/ # session · capture · guard · report · verify
|
|
212
|
+
├── test/ # node:test 用例(25 条)
|
|
213
|
+
├── docs/ # INSTALL · USAGE · FRAMEWORK(均中英对照)
|
|
214
|
+
└── locale/{zh,en}.json # Plugins 页面标题与描述
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## 归属与许可 / License
|
|
220
|
+
|
|
221
|
+
MIT,见 [LICENSE](LICENSE)。本插件不打包任何第三方技能内容,技能文本为本项目原创。
|
|
222
|
+
> EN: MIT, see [LICENSE](LICENSE). No third-party skill content is vendored; the skill text is
|
|
223
|
+
> original to this project.
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
<a id="english"></a>
|
|
228
|
+
|
|
229
|
+
## English
|
|
230
|
+
|
|
231
|
+
`software-design-test` is a **DSH bundle plugin** that turns usability verification into an auditable
|
|
232
|
+
process while you build software with DeepSeek Harness — especially on macOS, Windows, iPhone and
|
|
233
|
+
iPad.
|
|
234
|
+
|
|
235
|
+
**Five hard rules**
|
|
236
|
+
|
|
237
|
+
1. **No internal pointer directives.** No injected pointer, touch or key events, no UI automation
|
|
238
|
+
drivers, no calls into the software's internals. Banned per platform with compliant alternatives in
|
|
239
|
+
`skills/observed-ui-test/BANNED-INPUTS.md`.
|
|
240
|
+
2. **Evidence comes from recordings and screenshots only.** Code, DOM, logs and databases are leads,
|
|
241
|
+
never conclusions.
|
|
242
|
+
3. **The permission gate comes first.** Mouse, keyboard mode, screen recording, screenshots,
|
|
243
|
+
microphone, OS capture permission, scope, data boundary and a compliance confirmation are asked
|
|
244
|
+
before anything starts; unanswered means no start. The Q&A is recorded in `session.json`.
|
|
245
|
+
4. **Three input modes, in order.** L1 mouse only → L2 mouse + keyboard without shortcuts →
|
|
246
|
+
L3 with shortcuts. The difference across modes is itself a finding.
|
|
247
|
+
5. **Never mark untested as passed.** `passed / failed / unverified` are three separate states.
|
|
248
|
+
|
|
249
|
+
**Watching injection is not doing it.** A read-only watchdog (`scripts/guard.mjs`) may watch for
|
|
250
|
+
injection tooling — it scans the process table and the session text, writes suspected clues to
|
|
251
|
+
`evidence/compliance.jsonl`, and reports them in section 8 of the report. It has no injection
|
|
252
|
+
capability whatsoever; it produces leads, not proof of absence.
|
|
253
|
+
|
|
254
|
+
**Install**
|
|
255
|
+
|
|
256
|
+
```bash
|
|
257
|
+
dsh plugin --profile desktop add link:/absolute/path/to/software-design-test
|
|
258
|
+
dsh --profile desktop --dump-config | grep -A3 observed-ui-test
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
**Use**
|
|
262
|
+
|
|
263
|
+
Say "run an observed UI test on <app>", answer the permission questionnaire, scaffold the
|
|
264
|
+
session, run L1 → L2 → L3, and build the bilingual report:
|
|
265
|
+
|
|
266
|
+
```bash
|
|
267
|
+
node scripts/session.mjs init ./ui-test-demo --platform macos --app "Demo"
|
|
268
|
+
node scripts/session.mjs gate ./ui-test-demo --mouse yes --keyboard L2 --screen-recording yes \
|
|
269
|
+
--screenshot yes --compliance yes
|
|
270
|
+
node scripts/report.mjs build ./ui-test-demo
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Full guides: [install](docs/INSTALL.zh-en.md) · [usage](docs/USAGE.zh-en.md) ·
|
|
274
|
+
[framework](docs/FRAMEWORK.zh-en.md). Self-check: `node scripts/verify.mjs` (8/8) and
|
|
275
|
+
`node --test test/*.test.mjs` (25/25). MIT licensed.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ============================================================================
|
|
2
|
+
# software-design-test — DSH bundle patch
|
|
3
|
+
# ============================================================================
|
|
4
|
+
# Mount declaration. DSH stacks each plugin bundle's patch onto the profile's
|
|
5
|
+
# configuration tree at boot, so this file inserts the skill-provider row that
|
|
6
|
+
# publishes the observed-UI-testing skills.
|
|
7
|
+
#
|
|
8
|
+
# 挂载声明。DSH 在启动时把每个插件 bundle 的 patch 叠进 profile 的配置树,
|
|
9
|
+
# 这个文件插入一行 skill provider,使观察式界面测试技能在 Harness 里可见。
|
|
10
|
+
#
|
|
11
|
+
# Install / 安装:
|
|
12
|
+
# dsh plugin --profile desktop add link:/absolute/path/to/software-design-test
|
|
13
|
+
# dsh plugin --profile desktop add github:<owner>/software-design-test
|
|
14
|
+
# dsh plugin --profile desktop add software-design-test
|
|
15
|
+
#
|
|
16
|
+
# The package ships no dependencies and no build step, so no pnpm
|
|
17
|
+
# `allowBuilds` approval is needed.
|
|
18
|
+
# 本包无依赖、无构建步骤,不需要 pnpm 的 allowBuilds 批准。
|
|
19
|
+
# ============================================================================
|
|
20
|
+
|
|
21
|
+
- insert:
|
|
22
|
+
- id: software-design-test
|
|
23
|
+
name: software-design-test
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# 框架总览(从上到下)/ Framework Overview (top-down)
|
|
2
|
+
|
|
3
|
+
> 这是给人看的设计说明;Agent 执行时读的是 `skills/observed-ui-test/`、
|
|
4
|
+
> `skills/observed-test-plan/` 与 `skills/software-design-test/`。
|
|
5
|
+
> This is the human-facing design document; the agent executes from the two skill directories.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 总图 / The picture
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
┌──────────────────────────────────────────────┐
|
|
13
|
+
层 0 立场 │ 人 = 唯一的手 屏幕 = 唯一证据 │
|
|
14
|
+
Layer 0 Position │ human = the only hand screen = the only │
|
|
15
|
+
│ evidence │
|
|
16
|
+
└──────────────────────────────────────────────┘
|
|
17
|
+
│
|
|
18
|
+
┌──────────────────────────────────────────────┐
|
|
19
|
+
层 1 权限闸门 │ 鼠标 · 键盘级别 · 录屏/截屏 · 系统权限 │
|
|
20
|
+
Layer 1 Gate │ 未答复 → 不开始 / unanswered → no start │
|
|
21
|
+
└──────────────────────────────────────────────┘
|
|
22
|
+
│
|
|
23
|
+
┌──────────────────────────────────────────────┐
|
|
24
|
+
层 2 范围 │ 应用/版本 · 平台设备 · 输入设备 · 显示环境 │
|
|
25
|
+
Layer 2 Scope │ 数据边界 · 退出条件 │
|
|
26
|
+
└──────────────────────────────────────────────┘
|
|
27
|
+
│
|
|
28
|
+
┌──────────────────────────────────────────────┐
|
|
29
|
+
层 3 元素清单 │ 只看画面列出功能元素与工具 + 全部期望状态 │
|
|
30
|
+
Layer 3 Inventory │ inventory from the screen only │
|
|
31
|
+
└──────────────────────────────────────────────┘
|
|
32
|
+
│
|
|
33
|
+
┌──────────────────────────────────────────────┐
|
|
34
|
+
层 4 用例矩阵 │ 元素 × 平台 × 模式(L1/L2/L3),P0–P3 优先级 │
|
|
35
|
+
Layer 4 Matrix │ case matrix with priorities │
|
|
36
|
+
└──────────────────────────────────────────────┘
|
|
37
|
+
│
|
|
38
|
+
┌──────────────────────────────────────────────┐
|
|
39
|
+
层 4.5 用户模拟 │ 人物 → 场景 → 任务卡 → 旅程 → 启发式/巡游 │
|
|
40
|
+
Layer 4.5 Sim │ personas → scenarios → tasks → journey → │
|
|
41
|
+
│ heuristics & tours(software-design-test) │
|
|
42
|
+
└──────────────────────────────────────────────┘
|
|
43
|
+
│
|
|
44
|
+
┌──────────────────────────────────────────────┐
|
|
45
|
+
层 5 三级执行 │ L1 仅鼠标 → L2 无快捷键 → L3 可快捷键 │
|
|
46
|
+
Layer 5 Execution │ the difference across modes IS the finding │
|
|
47
|
+
└──────────────────────────────────────────────┘
|
|
48
|
+
│
|
|
49
|
+
┌──────────────────────────────────────────────┐
|
|
50
|
+
层 6 取证 │ 录屏 + 截屏 + 注入观察日志(只读) │
|
|
51
|
+
Layer 6 Evidence │ recording + screenshots + read-only watchdog │
|
|
52
|
+
└──────────────────────────────────────────────┘
|
|
53
|
+
│
|
|
54
|
+
┌──────────────────────────────────────────────┐
|
|
55
|
+
层 7 判定 │ 缺陷 / 观察 / 疑点 / 未验证,S1–S4 分级 │
|
|
56
|
+
Layer 7 Verdict │ defect / observation / suspicion / unverified│
|
|
57
|
+
└──────────────────────────────────────────────┘
|
|
58
|
+
│
|
|
59
|
+
┌──────────────────────────────────────────────┐
|
|
60
|
+
层 8 报告 │ 中英对照、带证据、可复现、含权限缺口 │
|
|
61
|
+
Layer 8 Report │ bilingual, evidenced, reproducible, with gaps│
|
|
62
|
+
└──────────────────────────────────────────────┘
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 三条不可交换的原则 / Three non-negotiables
|
|
68
|
+
|
|
69
|
+
1. **真实输入 / Real input** —— 输入只来自人的真实外设。不注入、不模拟、不调用内部句柄。
|
|
70
|
+
> EN: Input comes only from the human's real peripherals. No injection, no simulation, no
|
|
71
|
+
> internal handle invocation.
|
|
72
|
+
2. **画面证据 / Visual evidence** —— 结论必须能在画面上指认出来。
|
|
73
|
+
> EN: Every conclusion must be pointable-to on screen.
|
|
74
|
+
3. **可复现 / Reproducible** —— 另一个操作者照步骤能重放。
|
|
75
|
+
> EN: Another operator can replay the steps.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 测试要求 / Test requirements(用户指定的四条)
|
|
80
|
+
|
|
81
|
+
| 要求 Requirement | 落地方式 How it is enforced |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| 不允许使用内在指针指令 | 禁用清单 + 计划文本扫描 + 进程表只读观察 + 代码级自检(`verify.mjs`) |
|
|
84
|
+
| 从录屏/截屏观察元素是否完好、工具是否可行 | 十大观察维度 + 证据协议 + 一图一结论 |
|
|
85
|
+
| 开始前询问鼠标/键盘/录屏等软硬件权限 | 权限问卷闸门,落盘 `session.json`,未通过不得开始 |
|
|
86
|
+
| 三级操作模式 | L1 仅鼠标 → L2 鼠标+键盘禁快捷键 → L3 可用快捷键,跨模式差异登记 |
|
|
87
|
+
|
|
88
|
+
> EN: No internal pointer directives (deny list, plan scan, process watchdog, code self-check);
|
|
89
|
+
> judge integrity and tool usability from recordings and screenshots (ten dimensions, evidence
|
|
90
|
+
> protocol); ask for mouse/keyboard/capture permissions before starting (gate recorded in
|
|
91
|
+
> `session.json`); three input modes with cross-mode differences logged.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 十大观察维度 / Ten on-screen dimensions
|
|
96
|
+
|
|
97
|
+
存在 · 完好 · 可读 · 可发现 · 命中与状态 · 反馈 · 状态正确 · 层级与布局 · 数据完整 · 跨设备一致。
|
|
98
|
+
> EN: existence · integrity · legibility · discoverability · hit target and states · feedback ·
|
|
99
|
+
> state correctness · layering and layout · data integrity · cross-device consistency.
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 角色分工 / Roles
|
|
104
|
+
|
|
105
|
+
| 角色 | 是谁 | 做什么 |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| 操作者 Operator | 用户 | 唯一的手:真实鼠标键盘操作 |
|
|
108
|
+
| 观察者 Observer | Agent + 用户 | 眼睛:读图判读元素与工具状态 |
|
|
109
|
+
| 记录者 Recorder | Agent | 笔:写用例、记证据、出报告 |
|
|
110
|
+
| 裁决者 Adjudicator | 用户 | 确认严重级与是否算缺陷 |
|
|
111
|
+
|
|
112
|
+
> EN: the human is the only hand; the agent is the eyes and the pen; the human adjudicates severity.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 用户模拟这一层怎么接进来(本插件的重心)/ How the simulation layer plugs in (the centerpiece)
|
|
117
|
+
|
|
118
|
+
`software-design-test` 是本插件的主技能,提供"以谁、走哪条路、找哪类 bug":人物(3–5 个,含依据)、六类场景、
|
|
119
|
+
任务卡、用户旅程(五个阶段)、启发式扫描(认知走查四问 → Nielsen 十项 → HICCUPPS(F) → SFDIPOT →
|
|
120
|
+
14 条巡游)、以及无障碍作为唯一"合法的模拟用户"(WCAG 2.2 仅键盘与屏幕阅读器步骤)。
|
|
121
|
+
它**不改动**本框架的任何硬规则:仍然是真实鼠标键盘、画面证据、禁止内部指针指令。
|
|
122
|
+
|
|
123
|
+
> EN: The simulation skill supplies who is simulated, which path, and which bugs — personas, six
|
|
124
|
+
> scenario families, task cards, a five-stage journey, heuristic sweeps and accessibility lenses —
|
|
125
|
+
> without relaxing a single hard rule of this framework.
|
|
126
|
+
|
|
127
|
+
## 这个框架不做什么 / What it deliberately does not do
|
|
128
|
+
|
|
129
|
+
- 不做自动化点击、不做录制回放、不做 RPA——那不是"真实用户路径"。
|
|
130
|
+
- 不用代码/DOM/日志/数据库来"证明"界面正确——那些只是线索。
|
|
131
|
+
- 不把没测到的写成通过——`未验证` 是一种正式结论。
|
|
132
|
+
|
|
133
|
+
> EN: no scripted clicking, replay or RPA; no code/DOM/log/database "proof" of UI correctness; and
|
|
134
|
+
> never writing untested as passed — `unverified` is a formal outcome.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## 一轮的产出 / Outputs of one round
|
|
139
|
+
|
|
140
|
+
```text
|
|
141
|
+
ui-test-<app>-<date>/
|
|
142
|
+
├── session.json # 闸门、范围、级别、统计
|
|
143
|
+
├── permissions.md # 权限问卷与用户答复
|
|
144
|
+
├── elements.md # 画面元素清单
|
|
145
|
+
├── matrix.md # 用例矩阵与覆盖率
|
|
146
|
+
├── findings.jsonl # 一条发现一行(含跨模式差异)
|
|
147
|
+
├── report.md # 中英对照报告(含未验证项、注入观察、合规声明)
|
|
148
|
+
└── evidence/ # 截图、录屏、取证索引、注入观察日志
|
|
149
|
+
```
|