bpmax-cli 0.1.44-beta.21 → 0.1.44-beta.23

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.1.44-beta.21",
3
+ "version": "0.1.44-beta.23",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -67,6 +67,65 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
67
67
  - 默认样板:`profiles/negative_sale.json`
68
68
  - 通用脚本优先读 `--profile <name>`;若场景还未收进目录,改用 `--profile-file <path>`
69
69
 
70
+ ## 重复操作加速模式
71
+ - E2E 加速分两层:`bpmax-cli e2e` 提供稳定、可复用、可审计的执行能力;本 skill 负责把这些能力编排成标准打法。不要每次靠 Agent 临场拼 shell、临场写浏览器点击步骤。
72
+ - 首次运行一条流程或一个复杂 step 时,就必须按可复用方式沉淀 `scenario plan`、`data profile` 或 reusable step template;不要等重复多次后才整理。
73
+ - 哪怕本轮只跑一次,也要把 handoff、step-run、浏览器截图、DOM/URL、console/network、submit/readback 证据落到稳定目录,便于下一次直接复用或从失败点恢复。
74
+ - `bpmax-cli test-suite lint` 会强制检查每条非 deprecated E2E 用例是否已有首次运行沉淀方式;缺少 `bpmax-cli e2e create-page-submit`、`bpmax-cli e2e step-run`、`bpmax-cli e2e record-from-evidence`、`data profile`、`scenario plan` 或 reusable step template 时,不要直接判业务失败,而是读取输出中的 `e2e_acceleration.bootstrap_required=true` 和 `missing_cases`。
75
+ - 发现 `bootstrap_required=true` 时,执行编排必须先跑一次真实页面或安全 step-run,把截图、DOM/URL、console/network、submit/readback 证据保存到稳定目录,然后运行 `bpmax-cli e2e record-from-evidence` 生成 reusable step template;完成沉淀后再进入批量复跑或结论判断。
76
+ - 成功通过一次的复杂 step,必须沉淀模板:
77
+
78
+ ```bash
79
+ bpmax-cli e2e record-from-evidence \
80
+ --project-id <project_id> \
81
+ --step-id <step_id> \
82
+ --evidence-dir .codex/tmp/e2e/<run> \
83
+ --out .codex/e2e-templates/<scenario-step>.json \
84
+ --format json
85
+ ```
86
+
87
+ - 推进审批/处理节点时优先使用批量安全链路,而不是反复手跑 `step context/actions/requirements/submit`:
88
+
89
+ ```bash
90
+ bpmax-cli e2e step-run \
91
+ --project-id <project_id> \
92
+ --data-profile @.codex/e2e-templates/<scenario-step>.json \
93
+ --evidence-dir .codex/tmp/e2e/<run> \
94
+ --format json
95
+ ```
96
+
97
+ - 页面提交类操作仍然必须走真实浏览器。优先使用:
98
+
99
+ ```bash
100
+ bpmax-cli project create --flow-id <flow_id> --json @payload.json --handoff-only --format json
101
+ bpmax-cli e2e create-page-submit \
102
+ --handoff-json @handoff.json \
103
+ --assert-fields "字段A,字段B" \
104
+ --evidence-dir .codex/tmp/e2e/<run>/browser \
105
+ --format json
106
+ ```
107
+
108
+ - `e2e create-page-submit` / `e2e browser-template create-form` 生成的是页面自动化模板,不是 raw API 创建。必须执行生成的 Playwright 脚本或等价真实浏览器操作,并保存截图、URL、DOM 摘要、console/network 错误和 `project_id` 解析结果,才能写“页面回归通过”。
109
+ - 批量场景优先声明 `.codex/e2e-plans/<scenario>.json`,再运行:
110
+
111
+ ```bash
112
+ bpmax-cli e2e scenario run \
113
+ --plan .codex/e2e-plans/<scenario>.json \
114
+ --resume \
115
+ --evidence-dir .codex/tmp/e2e/<scenario> \
116
+ --format json
117
+ ```
118
+
119
+ - 批量 runner 产出的 status matrix 只能证明计划和恢复点清晰;没有真实浏览器截图和运行态项目证据时,不得把它当成完整链路通过。
120
+ - 对表单 schema、字段 options、step requirements 反复探测时,先使用 runtime cache:
121
+
122
+ ```bash
123
+ bpmax-cli e2e cache inspect --flow-id <flow_id> --profile <profile> --format json
124
+ bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format json
125
+ ```
126
+
127
+ - 所有加速命令仍必须遵守本 skill 的页面证据门禁:创建页、选择器、自动回填、详情页展示、列表可见性等用户路径结论必须来自真实浏览器,不得把接口提交伪装成页面回归。
128
+
70
129
  ## `.ai_test` 用例资产管理
71
130
  - 可复用测试用例统一放在项目目录 `.ai_test/`,运行状态仍放在 `.codex/tmp/e2e_states/`;不要把二者混用。
72
131
  - 生成、检查、更新用例资产前,必须先运行当前仓库对应的 `latest-*` 并显式使用 `ALLOW_DIRTY=1`,再把证明写入 `.codex/tmp/ai_test_suite/latest-<repo>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。