bpmax-cli 0.2.1-beta.36 → 0.2.1-beta.37

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmax-cli",
3
- "version": "0.2.1-beta.36",
3
+ "version": "0.2.1-beta.37",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -29,6 +29,8 @@ description: "用于按 BPMAX 完整流程配置需求先调研、再出计划
29
29
 
30
30
  ## 核心原则
31
31
  - 这是编排型 skill,不重复实现各子 skill 的具体执行细节;它负责调研、计划、编排顺序、停机条件和结果闭环。
32
+ - 搭建前必须同时使用 [$bpmax-functional-test-design](../bpmax-functional-test-design/SKILL.md) 和 [$bpmax-ui-ux-audit](../bpmax-ui-ux-audit/SKILL.md) 思考主路径、分支、边界、状态、角色、表单信息架构、动作文案、错误恢复、状态反馈、可访问性和跨页一致性;把结论写入计划、任务书和各配置面的 typed config lint 检查项。
33
+ - 所有确认的体验问题都属于 `BUG`,设计期发现也不得降级为建议。配置 lint 通过不等于 UX/E2E 通过;配置完成后仍必须按双 skill 用例执行真实页面并通过 `bpmax-cli test-suite lint-report`。
32
34
  - 默认先进入计划模式;如果当前环境不能自动切换到计划模式,必须明确要求用户手动切换到计划模式,然后再继续。
33
35
  - 不直接开始执行。先把流程需求讲清楚,再把本次要做的配置面讲清楚,再看是否还缺高影响信息。
34
36
  - typed CLI 线上回读、实时接口返回和只读页面验收优先级高于本地 `think_*` 配置镜像;本地仓库只作为候选检索和结构参考。
@@ -178,6 +180,8 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
178
180
  - 哪些页面必须先在浏览器中打开
179
181
  - 哪些地方以 typed CLI 线上回读和只读页面验收为准
180
182
  - 新建场景使用哪个 typed create 命令、确认文本是什么、失败后停止在哪一步
183
+ - `bpmax-functional-test-design` 生成的主/备/异常/边界/状态/角色覆盖,以及 `bpmax-ui-ux-audit` 生成的界面体验 lint 清单
184
+ - 每个配置面的 typed config lint 如何吸收上述两份清单,最终如何进入双 skill E2E 和 `test-suite lint-report`
181
185
 
182
186
  ### 6. 计划后的执行编排
183
187
  - 用户切出计划模式并要求继续后,由同一个 skill 按计划推进。
@@ -193,6 +197,8 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
193
197
  - 最新配置同步:[$bpmax-config-latest](../bpmax-config-latest/SKILL.md)
194
198
  - AI 任务书:[$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md)
195
199
  - 运行态验收:[$bpmax-e2e-flow-test-operator](../bpmax-e2e-flow-test-operator/SKILL.md)
200
+ - 功能用例设计:[$bpmax-functional-test-design](../bpmax-functional-test-design/SKILL.md)
201
+ - UI/UX 审计:[$bpmax-ui-ux-audit](../bpmax-ui-ux-audit/SKILL.md)
196
202
  - 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
197
203
  - 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
198
204
  - `flow-app create` 完成后,必须再执行工作区视角的只读验证:
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "BPMAX E2E Flow Config Orchestrator"
3
- short_description: "先调研、出计划,再编排执行 BPMAX 完整流程配置"
4
- default_prompt: "使用 $bpmax-e2e-flow-config-orchestrator 先进入计划阶段,把 BPMAX 流程需求和配置范围调研清楚,生成执行计划后再按计划完成整套流程配置。"
3
+ short_description: "用功能与 UX 双门禁编排 BPMAX 完整流程配置"
4
+ default_prompt: "使用 $bpmax-e2e-flow-config-orchestrator 先调研和计划,并用 bpmax-functional-test-design、bpmax-ui-ux-audit 形成设计与 lint 门禁后完成整套流程配置。"
@@ -3,15 +3,17 @@
3
3
  ## 默认编排顺序
4
4
  - 完整流程配置:
5
5
  1. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
6
- 2. `bpmax-flow-template-editor`
7
- 3. `bpmax-form-template-editor`
8
- 4. `bpmax-dataset-field-template-editor`
9
- 5. `bpmax-dataset-template-editor`
10
- 6. `bpmax-list-template-editor`
11
- 7. `bpmax-filter-template-editor`
12
- 8. `bpmax-nav-config-editor`
13
- 9. `bpmax-e2e-flow-test-operator` -> 真实浏览器运行态验收
14
- 10. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
6
+ 2. 设计期双 skill gate:`bpmax-functional-test-design` + `bpmax-ui-ux-audit`,形成测试覆盖和界面体验 lint 清单
7
+ 3. `bpmax-flow-template-editor`
8
+ 4. `bpmax-form-template-editor`
9
+ 5. `bpmax-dataset-field-template-editor`
10
+ 6. `bpmax-dataset-template-editor`
11
+ 7. `bpmax-list-template-editor`
12
+ 8. `bpmax-filter-template-editor`
13
+ 9. `bpmax-nav-config-editor`
14
+ 10. `bpmax-e2e-flow-test-operator` -> 按双 skill 做真实浏览器运行态验收
15
+ 11. 交付期 lint-report gate:`bpmax-cli test-suite lint-report --root .ai_test/report/<run> --format json`
16
+ 12. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
15
17
 
16
18
  ## 范围到 skill 的映射
17
19
  - 流程模板:`bpmax-flow-template-editor`
@@ -22,6 +24,8 @@
22
24
  - 筛选器模板:`bpmax-filter-template-editor`
23
25
  - 导航配置:`bpmax-nav-config-editor`
24
26
  - 运行态验收:`bpmax-e2e-flow-test-operator`
27
+ - 功能测试设计:`bpmax-functional-test-design`
28
+ - UI/UX BUG 审计:`bpmax-ui-ux-audit`
25
29
  - 控件判断:`form-control-library`
26
30
  - 环境同步:`bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
27
31
 
@@ -17,6 +17,12 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
17
17
  - 不要把草稿接口、画布显示、配置回读和运行态行为混为一谈;E2E 结论以运行态行为为准。
18
18
  - 不要把 token、API Key、cookie、手机号、密码、Authorization、完整 raw payload、大段日志写入 memory、issue、报告或测试资产。
19
19
 
20
+ ## 双 skill 与 UX BUG 门禁
21
+ - 正式 E2E 在生成/更新用例前必须使用 [$bpmax-functional-test-design](../bpmax-functional-test-design/SKILL.md),在页面执行和报告收口时必须使用 [$bpmax-ui-ux-audit](../bpmax-ui-ux-audit/SKILL.md)。两者缺一,UX 审计未完成,只能给 `partial` 或 `blocked`。
22
+ - 所有确认的体验问题都属于 `BUG`,不得改写成建议、观察或美化项规避门禁。未解决 P0/P1 UX BUG 要求总结果 `fail`;只有未解决 P2/P3 时使用 `pass-with-warnings`;无未解决 UX BUG 且其他门禁通过才允许 `pass`。`verified` 必须有晚于原始证据的本轮复测证据。
23
+ - 每轮必须在报告目录写 `ux-findings.json`,并在场景报告写双 skill 元数据、UX 审计状态和 P0-P3 数量。
24
+ - 任何完整结论前必须运行 `bpmax-cli test-suite lint-report --root .ai_test/report/<run> --format json`,保留返回的功能设计、UX 审计和 BUG 数量汇总。
25
+
20
26
  ## 真实页面原则
21
27
  - 线上完整链路必须在真实运行页完成发起、填单、选择、提交、审批、驳回、回退等关键用户动作;不得用脚本、控制台、手改 request body 或接口直调绕过界面。
22
28
  - 脚本和接口可用于摸底、状态记录、接口回读、证据补充、首次抓请求骨架;即使用户明确接受“非页面路径”,也只能输出降级/诊断结论,不得写完整 E2E 通过。
@@ -81,13 +87,15 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
81
87
 
82
88
  ## 标准执行流
83
89
  1. 查 memory:搜索业务名、`flow_type`、模板、数据集、上次状态和已知坑点;不要把完整 JSON 贴给用户。CLI 出现 skills out-of-sync notice 时,源码验证必须显式读取当前仓库 skill,正式分发前必须 update/install skills 消除版本差异。
84
- 2. 强制从用例启动:运行 `bpmax-cli test-suite run start --scenario <id> --case-id <id> ...` 生成本轮 execution manifest。不得先临场打开浏览器或直接运行正式 `bpmax-cli e2e`。源码联调必须额外传 `--source-skill <repo>/skills/bpmax-e2e-flow-test-operator/SKILL.md`;分发版默认硬检查安装 skill stamp 与 CLI 版本一致。
90
+ 2. 用 `bpmax-functional-test-design` 从需求、状态、规则、边界和角色旅程生成可追踪用例;设计完成不等于执行通过。
91
+ 3. 强制从用例启动:运行 `bpmax-cli test-suite run start --scenario <id> --case-id <id> ...` 生成本轮 execution manifest。不得先临场打开浏览器或直接运行正式 `bpmax-cli e2e`。源码联调必须额外传 `--source-skill <repo>/skills/bpmax-e2e-flow-test-operator/SKILL.md`;分发版默认硬检查安装 skill stamp 与 CLI 版本一致。
85
92
  `run start` 会同时生成 `<scenario_id>.md` 报告草稿;执行过程中必须持续更新该文件,不要另找历史报告套用。
86
- 3. 执行当前步骤:只执行 `test-suite run next` 返回的当前 `case_id/case_step_id`;正式 `e2e` 命令必须带 `--execution-manifest --case-id --case-step-id`。
87
- 4. 准备真实业务样本:确认业务对象、主数据关系、边界值、审批人、权限、页面入口和预期业务后果。
88
- 5. 逐步记录:每完成一个步骤立即运行 `test-suite run record`,写入本轮证据后才能获取下一步;不得跳步或补写旧证据。record 会按 manifest 自动同步场景报告;若返回 `report_sync.ok=false`,必须执行返回的 `test-suite run report-sync` 修复命令,不得手工提前写 pass。
89
- 6. 失败闭环:记录 `fail` / `blocked` 后停止后续步骤,先分清配置、环境、旧样本、权限、缓存或测试资产问题;修配置回到对应 skill。
90
- 7. 输出报告:报告必须引用本轮 `execution-manifest.json`,逐条对账 planned/executed case 和 step,并显式区分测试资产、浏览器回归与未完成修复。
93
+ 4. 执行当前步骤:只执行 `test-suite run next` 返回的当前 `case_id/case_step_id`;正式 `e2e` 命令必须带 `--execution-manifest --case-id --case-step-id`。
94
+ 5. 准备真实业务样本:确认业务对象、主数据关系、边界值、审批人、权限、页面入口和预期业务后果。
95
+ 6. 逐步记录:每完成一个步骤立即运行 `test-suite run record`,写入本轮证据后才能获取下一步;不得跳步或补写旧证据。record 会按 manifest 自动同步场景报告;若返回 `report_sync.ok=false`,必须执行返回的 `test-suite run report-sync` 修复命令,不得手工提前写 pass。
96
+ 7. 用 `bpmax-ui-ux-audit` 审计本轮实际到达的全部界面,写 `ux-findings.json`;未到达界面不得编造结论。
97
+ 8. 失败闭环:记录 `fail` / `blocked` 后停止后续步骤,先分清配置、环境、旧样本、权限、缓存或测试资产问题;修配置回到对应 skill。
98
+ 9. 输出报告并运行 `lint-report`:报告引用本轮 manifest,逐条对账 case/step、UX BUG 和证据;lint 未通过不得给完整结论。
91
99
 
92
100
  排障只能显式使用 `--diagnostic`。该模式可以不带 manifest,但输出不能进入正式 pass evidence,也不能用来绕过用例链路。
93
101
 
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "BPMAX E2E Flow Test Operator"
3
- short_description: "在 BPMAX 中做全链路流程测试和回归"
4
- default_prompt: "使用 $bpmax-e2e-flow-test-operator 对当前 BPMAX 流程做全链路测试,先查记忆,再准备前置数据,运行场景并沉淀测试文档。"
3
+ short_description: "用功能设计与 UX BUG 审计完成 BPMAX E2E 回归"
4
+ default_prompt: "使用 $bpmax-e2e-flow-test-operator 对当前 BPMAX 流程做全链路测试,强制结合 bpmax-functional-test-design 和 bpmax-ui-ux-audit,并以 lint-report 收口。"
@@ -25,11 +25,24 @@
25
25
  <YYYYMMDD-NNN>/
26
26
  summary.md
27
27
  <scenario_id>.md
28
+ ux-findings.json
28
29
  screenshots/
29
30
  ```
30
31
 
31
32
  `suite` 是正式用例库,`suite_draft` 是 AI 生成或更新后的待确认草稿,`report` 是每次运行的证据目录。
32
33
 
34
+ 正式用例设计必须使用 `bpmax-functional-test-design`;本轮页面体验审计必须使用 `bpmax-ui-ux-audit`。场景报告必须包含:
35
+
36
+ ```text
37
+ test_design_skill: bpmax-functional-test-design
38
+ ux_audit_skill: bpmax-ui-ux-audit
39
+ ux_audit_status: completed|blocked
40
+ ux_findings: ux-findings.json
41
+ ux_bug_counts: P0=<n>,P1=<n>,P2=<n>,P3=<n>
42
+ ```
43
+
44
+ 所有确认的体验问题都是 `classification: "BUG"`。`ux-findings.json` 的 run/scenario 必须匹配当前报告,每个 BUG 必须有严重度、影响、复现步骤、启发式引用、本轮证据、整改建议和 `open|fixed|verified` 状态。证据必须由当前 execution manifest 登记或引用;`verified` 还必须提供不同且更晚的 `retest_evidence`。`ux_bug_counts` 只统计未解决的 `open|fixed` BUG:P0/P1 要求 `fail`;仅 P2/P3 时为 `pass-with-warnings`;无未解决 BUG 才允许 `pass`;审计 blocked 时只能 `partial|blocked`。
45
+
33
46
  `.copy_diff/` 是覆盖同名场景目录时自动生成的覆盖审计证据,只在 `draft-update --replace` 或 `promote --replace` 的目标目录已存在时出现。
34
47
 
35
48
  ## README 模板
@@ -157,6 +170,8 @@ bpmax-cli test-suite run report-sync --manifest .ai_test/report/<run_id>/executi
157
170
 
158
171
  `execution_plan_generated`、`browser_execution_pending`、`bootstrap_required` 表示尚未形成正式执行证据;只有真实提交或正式记录后才能出现 `execution_evidence_recorded`。不得依据 plan/template/dry-run 状态推进用例结论。
159
172
 
173
+ 报告同步只更新执行状态,不会替代理解页面并完成 UX 审计。必须人工/agent 基于本轮证据更新 `ux-findings.json` 和场景报告,然后运行 `bpmax-cli test-suite lint-report`。
174
+
160
175
  旧版聚合示例已废弃;以下是用例级示例:
161
176
 
162
177
  ```csv
@@ -194,6 +194,8 @@ bpmax-cli test-suite lint-report --root .ai_test/report
194
194
 
195
195
  ### 报告完整性门禁
196
196
  - 单次执行报告必须位于 `.ai_test/report/<YYYYMMDD-NNN>/`,截图必须位于同一 run 的 `screenshots/` 下;`.codex/docs/` 只放复盘、长周期总结或交付版文档,并引用 `run_id` 和原始报告路径。
197
+ - 用 `bpmax-functional-test-design` 固化功能覆盖,用 `bpmax-ui-ux-audit` 审计本轮页面;报告必须引用同目录 `ux-findings.json`。UX 审计未完成时只能写 `partial` 或 `blocked`。
198
+ - 所有确认体验问题都按 BUG 管理:未解决 P0/P1 强制 `fail`;只有未解决 P2/P3 时用 `pass-with-warnings`;无未解决 UX BUG 且功能与证据门禁都通过才允许 `pass`。`verified` 必须保留原始证据和晚于原始证据的本轮 `retest_evidence`。
197
199
  - 场景报告必须写 `planned_cases:`、`executed_cases:`、`planned_steps:`、`executed_steps:`、`execution_manifest:`、`precondition_check:`、`state_file:`、`report_run:`、`browser_tool:`、`rerun_policy:`。case 与 step 都必须逐条对账;有未执行步骤时只能写阶段/局部结论。
198
200
  - 报告出现 `not run`、`未执行`、`跳过` 时,`result:` 必须降级为 `partial`、`stage`、`blocked` 或明确“阶段/局部/不完整”。没有用户确认缩小范围时,不得把跳过用例合并进完整结论。
199
201
  - 没有合规浏览器工具或页面证据时,必须使用浏览器阻塞模板:`browser_status: blocked`,并写“页面结论停止”;不得用 API/readback 证据冒充页面验证。
@@ -418,7 +420,7 @@ PYTHON_BIN=./venv/bin/python
418
420
  - 再导入飞书文档
419
421
  - 最后按用户指定手机号或邮箱授权
420
422
 
421
- 旧 `scripts/e2e_doc.py` 只允许生成接口/脚本诊断草稿,不能作为重新运行报告或完整 E2E 通过报告。正式报告必须创建 `.ai_test/report/<YYYYMMDD-NNN>/`,补齐 `run_id`、`rerun_policy`、case/step planned-executed 对账、`execution_manifest`、`started_at`、`finished_at`、本轮 `screenshots/`,并运行 `bpmax-cli test-suite lint-report`。
423
+ 旧 `scripts/e2e_doc.py` 只允许生成接口/脚本诊断草稿,不能作为重新运行报告或完整 E2E 通过报告。正式报告必须创建 `.ai_test/report/<YYYYMMDD-NNN>/`,补齐 `run_id`、`rerun_policy`、case/step planned-executed 对账、`execution_manifest`、`started_at`、`finished_at`、本轮 `screenshots/`、双 skill 元数据和 `ux-findings.json`,并运行 `bpmax-cli test-suite lint-report`。
422
424
 
423
425
  ## 强制约束
424
426
  - 不要一开始就同时打开太多配置面;按“流程/表单/数据集/列表/筛选器/导航/测试”最小闭环推进。
@@ -0,0 +1,23 @@
1
+ Adapted from https://github.com/EliaAlberti/ux-audit-skill at commit 76eb1ab73560c90275823395fda52c3ca4ea8b2b.
2
+
3
+ MIT License
4
+
5
+ Copyright (c) 2026 Elia Alberti
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in all
15
+ copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
+ SOFTWARE.
@@ -0,0 +1,42 @@
1
+ ---
2
+ name: bpmax-ui-ux-audit
3
+ description: Use when auditing BPMAX forms, lists, details, approval pages, responsive pages, or end-to-end journeys for usability, accessibility, error recovery, visual hierarchy, interaction clarity, or cross-page consistency; also use during BPMAX flow design and before reporting E2E completion.
4
+ ---
5
+
6
+ # BPMAX UI/UX Audit
7
+
8
+ Audit the user journey with current-run(本轮)page or screenshot evidence. Every confirmed experience issue is a product `classification: BUG`, not optional polish.
9
+
10
+ ## Hard gates
11
+
12
+ - Use `bpmax-functional-test-design` first to establish user goals, actors, paths, states, boundaries, and expected outcomes. UX review supplements functional coverage; it does not replace it.
13
+ - Inspect every in-scope surface actually reached in this run. Record unvisited or unavailable surfaces as not evaluated.
14
+ - Base each finding on a named current-run page, screenshot, DOM snapshot, or interaction observation. 不得编造 DOM、键盘、焦点、读屏、动画、延迟或响应式事实。
15
+ - Keep evidence under `.ai_test/report/<run>/`. Historical evidence may inform investigation but cannot prove the current result.
16
+ - Classify every confirmed issue as `BUG` with `P0|P1|P2|P3`, user impact, reproduction steps, evidence, heuristic references, recommendation, and `open|fixed|verified` status.
17
+ - Do not automatically install Python or image packages. Use available image/view capabilities for annotations; if unavailable, keep the textual finding and state that annotation was not produced.
18
+ - Run `bpmax-cli test-suite lint-report --root .ai_test/report/<run> --format json` before any complete E2E conclusion.
19
+
20
+ ## Audit workflow
21
+
22
+ 1. Define the journey goal, actors, platform, current run, and evaluated surfaces from the functional cases.
23
+ 2. Review each surface in four passes: goal completion, framework heuristics, recurring checks, and journey-level consistency.
24
+ 3. Separate visible facts from unavailable interaction properties. Capture a new screenshot or structured browser evidence when a claim needs proof.
25
+ 4. Merge duplicate symptoms into one BUG when they share a cause and recommendation; list every affected surface.
26
+ 5. Write `ux-findings.json` using `references/bpmax-ux-findings.md`.
27
+ 6. Update the scenario report metadata and findings section. Re-test fixed BUGs and change status to `verified` only with new current-run evidence.
28
+ 7. Apply the result gate and run `lint-report`.
29
+
30
+ ## Result gate
31
+
32
+ - Unresolved P0/P1 BUG present: `result: fail`.
33
+ - Only unresolved P2/P3 BUGs present: `result: pass-with-warnings`.
34
+ - No unresolved UX BUG and all other E2E gates pass: `result: pass`.
35
+ - Audit incomplete or blocked: only `partial` or `blocked`.
36
+
37
+ Never downgrade a BUG to “suggestion”, “observation”, or “polish” to obtain a passing result.
38
+
39
+ ## References
40
+
41
+ - Read `references/audit-framework.md` for the review passes, named heuristics, and recurring checks.
42
+ - Read `references/bpmax-ux-findings.md` for the JSON contract, evidence rules, severity mapping, and report metadata.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "BPMAX UI/UX Audit"
3
+ short_description: "Audit BPMAX interfaces and record UX BUGs"
4
+ default_prompt: "Use $bpmax-ui-ux-audit to audit this BPMAX journey with current-run evidence and structured UX BUG findings."
@@ -0,0 +1,39 @@
1
+ # BPMAX UX audit framework
2
+
3
+ ## Four review passes
4
+
5
+ 1. **Goal walk:** follow the functional case as the stated actor. Identify friction, ambiguity, dead ends, lost work, and unclear completion.
6
+ 2. **Framework sweep:** cite the smallest relevant named rule. Prefer Nielsen, Norman, WCAG, content design, and established behavioral laws over generic taste.
7
+ 3. **Recurring checks:** use stable labels so repeated defects are classified consistently.
8
+ 4. **Journey review:** compare pages for terminology, action placement, status visibility, progress, memory load, and recovery continuity.
9
+
10
+ ## Core heuristics
11
+
12
+ - **Nielsen:** system status, real-world language, user control, consistency, error prevention, recognition over recall, efficiency, minimalism, error recovery(错误恢复), and contextual help.
13
+ - **Norman:** discoverability, signifiers, mapping, feedback, constraints, affordances, and a coherent conceptual model.
14
+ - **WCAG:** color is not the only signal; text and controls have sufficient contrast; headings and labels are descriptive; targets are usable; errors are identified with corrective guidance; navigation/components stay consistent.
15
+ - **Behavioral laws:** apply Hick's Law to ungrouped choices, Fitts's Law to target size and distance, Miller's Law to memory load, Jakob's Law to convention drift, and Peak-End to the worst moment and final confirmation.
16
+ - **Content design:** use plain language, one term per concept, verb-first actions, honest expectations, scannable structure, and errors that say what happened and how to recover.
17
+
18
+ ## Recurring checks
19
+
20
+ | ID | Check |
21
+ |---|---|
22
+ | CTA-AMBIGUITY | The next action or its consequence is unclear. |
23
+ | DEAD-END | An empty, error, or terminal state has no recovery or exit. |
24
+ | ERROR-VAGUE | The error does not explain cause and recovery. |
25
+ | FORM-FRICTION | Labels, formats, defaults, validation, or field order add avoidable effort. |
26
+ | STATUS-BLIND | Current state, progress, save state, or completion is not visible. |
27
+ | PATTERN-DRIFT | The same concept or action changes wording, position, or behavior across pages. |
28
+ | ACCESS-FOCUS | 键盘焦点不可见、顺序异常或操作无法通过键盘完成;只有本轮交互证据才能确认。 |
29
+ | TARGET-SIZE | A control is too small or crowded for reliable activation. |
30
+ | HIERARCHY-FLAT | Primary, secondary, and dangerous actions lack visual priority. |
31
+ | RECALL-TAX | Users must remember data from an earlier surface to continue. |
32
+
33
+ ## Evidence calibration
34
+
35
+ - Static screenshots can prove visible text, hierarchy, spacing, grouping, color-only signaling, and visible states.
36
+ - Live interaction evidence is required for keyboard focus, focus order, latency, loading behavior, preserved input, error recovery, and action consequences.
37
+ - Borderline contrast requires a measurement note; do not invent a ratio.
38
+ - Illegible text is evidence of illegibility, not permission to guess the wording.
39
+ - A positive observation may be documented separately, but it is not a finding and does not offset a BUG.
@@ -0,0 +1,56 @@
1
+ # BPMAX UX finding contract
2
+
3
+ Write one `ux-findings.json` in the current `.ai_test/report/<run>/` directory:
4
+
5
+ ```json
6
+ {
7
+ "version": 1,
8
+ "run_id": "20260723-001",
9
+ "scenario_id": "expense-approval",
10
+ "audit_status": "completed",
11
+ "evaluated_surfaces": ["create form", "approval detail"],
12
+ "findings": [
13
+ {
14
+ "bug_id": "UX-BUG-001",
15
+ "classification": "BUG",
16
+ "severity": "P2",
17
+ "title": "错误提示没有恢复方法",
18
+ "surface": "create form",
19
+ "user_impact": "用户无法判断如何完成提交",
20
+ "reproduction_steps": ["打开创建页", "输入非法金额并提交"],
21
+ "heuristic_refs": ["Nielsen #9", "WCAG 3.3.3"],
22
+ "evidence": ["screenshots/C001-S002.png"],
23
+ "recommendation": "说明有效范围,并把焦点保留在错误字段",
24
+ "status": "open"
25
+ }
26
+ ]
27
+ }
28
+ ```
29
+
30
+ ## Required rules
31
+
32
+ - `version` is `1`; `audit_status` is `completed|blocked`.
33
+ - A completed audit has at least one `evaluated_surfaces` entry. An audit can complete with an empty `findings` array.
34
+ - Every finding has `classification: "BUG"`, severity `P0|P1|P2|P3`, non-empty reproduction steps, heuristic references, evidence, recommendation, and status `open|fixed|verified`.
35
+ - Evidence paths are relative to the current run, point to ordinary PNG/JSON/HTML/TXT/Markdown files, and must be registered or referenced by the current execution manifest. Directories, `ux-findings.json` self-references, stale files, and unregistered copied artifacts are invalid.
36
+ - `verified` requires a non-empty `retest_evidence` array whose registered current-run files are different from and newer than the original `evidence`. `fixed` without retest remains unresolved.
37
+ - `ux_bug_counts` counts unresolved `open|fixed` BUGs by severity. A correctly verified BUG remains in `findings` for traceability but is excluded from the active counts and outcome gate.
38
+
39
+ ## Scenario report metadata
40
+
41
+ ```text
42
+ test_design_skill: bpmax-functional-test-design
43
+ ux_audit_skill: bpmax-ui-ux-audit
44
+ ux_audit_status: completed
45
+ ux_findings: ux-findings.json
46
+ ux_bug_counts: P0=0,P1=0,P2=1,P3=0
47
+ ```
48
+
49
+ ## Severity and outcome
50
+
51
+ - Unresolved P0/P1: blocks release or materially prevents/corrupts the journey; final result is `fail`.
52
+ - Unresolved P2/P3 only: result is `pass-with-warnings`; retain evidence, remediation, and retest status.
53
+ - Zero unresolved BUGs: result may be `pass` when functional and browser gates also pass.
54
+ - Audit unavailable or incomplete: result is `partial` or `blocked`.
55
+
56
+ Run `bpmax-cli test-suite lint-report` after updating both files. The lint result must agree with `ux-findings.json`; manually written prose is not a substitute.