bpmax-cli 0.1.44-beta.25 → 0.1.44-beta.27

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.25",
3
+ "version": "0.1.44-beta.27",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -45,6 +45,25 @@ Each task that touches a BPMAX configuration object must include all of these in
45
45
 
46
46
  If any task lacks the matching skill/capability basis, `bpmax-cli taskbook lint` / `lint-prompt` must fail and the taskbook must be revised before dispatch.
47
47
 
48
+ For the full implementation taskbook shape, use [references/taskbook-template.md](./references/taskbook-template.md). The template is the canonical skill-side checklist for phases, object locks, typed CLI evidence, and progress CSV setup.
49
+
50
+ Taskbook lint is implemented in the TypeScript CLI core. Do not add or call Python lint scripts for taskbook validation. JSON lint output uses stable English fields such as `code`, `rule_id`, `domain`, and `path`; user-facing `message`, `suggestion`, and normal text output are Chinese.
51
+
52
+ ## Configuration Surface Coverage
53
+
54
+ When a requirement touches an end-to-end BPMAX configuration, the taskbook must explicitly include or intentionally skip these surfaces:
55
+
56
+ - flow-template: `bpmax-flow-template-editor`, `flow:<flow_type>` or `new-flow:<name>`, typed `config flow-template export/lint/build/submit/verify`, plus `project_after_create_path`, code-mode `message_template`, `matrix_owner`, publish/readback behavior.
57
+ - form-template: `bpmax-form-template-editor`, `form-template:<id>`, typed `config form-template export/lint/build/submit/verify`, plus field schema, `raw.value`, `layout`, `sub_form`, and `form-template inspect`.
58
+ - list-template: `bpmax-list-template-editor`, `list-template:<id>`, typed `config list-template lint/build/submit/verify`, plus operation column, view/detail action, guarded delete action, icon, query safety, and browser list-page proof.
59
+ - filter-template: `bpmax-filter-template-editor`, `filter-template:<id>`, typed `config filter-template lint/build/submit/verify`, plus filter fields and sample hit proof.
60
+ - project-detail-template: `bpmax-project-detail-template-editor`, `project-detail-template:<id>`, typed `config project-detail-template lint/build/submit/verify`, plus default detail template resolution and runtime detail-page proof.
61
+ - step-detail-template: `bpmax-flow-template-editor`, `step-detail-template:<id>`, flow node readback plus `flow_page_template.type=6` validation; do not misclassify node processing templates as project-detail-template.
62
+ - console-template: `bpmax-console-template-editor`, `console-template:<id>`, typed `config console-template lint/build/submit/verify`, plus module/data-set-field/runtime dashboard proof.
63
+ - dataset and dataset-field: `bpmax-dataset-template-editor` / `bpmax-dataset-field-template-editor`, with source mapping and publish/readback evidence.
64
+ - nav-config: `bpmax-nav-config-editor`, `nav-config:<workspace>`, typed `config nav-config lint/build/submit/verify`, four record types, and browser proof that PC/H5 entries open the target page.
65
+ - e2e/test-suite: `bpmax-e2e-flow-test-operator`, `e2e:<scenario>` or `test-suite:<scenario>`, test-suite lint/promote evidence, realistic business test data, browser proof, and failure update loop.
66
+
48
67
  ## Compact Fix Taskbook
49
68
 
50
69
  When a test run finds one configuration defect and the user only needs a repair taskbook, use this compact template instead of the full implementation template. It is still linted before execution, but it should stay short:
@@ -0,0 +1,3 @@
1
+ name: bpmax-ai-taskbook
2
+ description: Generate and lint BPMAX AI implementation taskbooks with object locks, typed CLI capability evidence, and execution progress CSV guidance.
3
+ default_prompt: "使用 $bpmax-ai-taskbook 生成或审查 BPMAX AI 实施任务书。必须检查对象锁、配置 skill、typed CLI capability/adapters、验收门禁和进度 CSV。"
@@ -0,0 +1,68 @@
1
+ # BPMAX AI Taskbook Template
2
+
3
+ Use this template when BPMAX configuration work spans multiple objects or agents.
4
+ The taskbook defines the execution plan; runtime progress belongs in a separate CSV.
5
+
6
+ ## 目标与边界
7
+
8
+ - 业务目标:
9
+ - 工作区:
10
+ - 范围内对象:
11
+ - 不得修改:
12
+ - 线上基线来源:
13
+ - 验收方式:
14
+
15
+ ## 配置 Skill / Capability 依据
16
+
17
+ Before writing each task, identify the matching BPMAX configuration skill and typed CLI domain.
18
+ Write tasks must include `bpmax-cli config adapters --format json` evidence.
19
+
20
+ | 配置面 | object_lock | required_skills | typed CLI evidence | 专项约束 |
21
+ |---|---|---|---|---|
22
+ | 流程模板 | `flow:<flow_type>` / `new-flow:<name>` | `bpmax-flow-template-editor` | `config flow-template export/lint/build/submit/verify` | `project_after_create_path`、code-mode `message_template`、`matrix_owner`、发布回读 |
23
+ | 表单模板 | `form-template:<id>` | `bpmax-form-template-editor`、`form-control-library` | `config form-template export/lint/build/submit/verify` | 字段 schema、表单顺序、`raw.value`、`layout`、`sub_form`、`inspect` |
24
+ | 列表模板 | `list-template:<id>` | `bpmax-list-template-editor` | `config list-template lint/build/submit/verify` | 操作列、详情动作、删除 gate、icon、查询安全、真实列表页 |
25
+ | 筛选器 | `filter-template:<id>` | `bpmax-filter-template-editor` | `config filter-template lint/build/submit/verify` | 筛选字段、查询条件、样本命中 |
26
+ | 项目详情模板 | `project-detail-template:<id>` | `bpmax-project-detail-template-editor` | `config project-detail-template lint/build/submit/verify` | 默认详情模板解析、运行页 proof |
27
+ | 环节模板 | `step-detail-template:<id>` | `bpmax-flow-template-editor` | flow 节点回读 + 页面模板回读 | `flow_page_template.type=6`、节点动作适配 |
28
+ | 看板模板 | `console-template:<id>` | `bpmax-console-template-editor` | `config console-template lint/build/submit/verify` | 指标、模块、数据集字段、运行页 proof |
29
+ | 数据集 | `dataset:<id>` | `bpmax-dataset-template-editor` | `config dataset lint/build/submit/verify` | 预处理脚本、字段发布、刷新 |
30
+ | 数据集字段 | `dataset-field:<id>` | `bpmax-dataset-field-template-editor` | `config dataset-field lint/build/submit/verify` | `source_table/source_field/source_fk`、字段映射 |
31
+ | 导航配置 | `nav-config:<workspace>` | `bpmax-nav-config-editor` | `config nav-config lint/build/submit/verify` | PC/H5 导航、快捷入口、浏览器打开 |
32
+ | 工作区流程 | `workspace-flow:<workspace>` | `bpmax-workspace-editor` | `config workspace-flow export/lint/build/submit/verify` | 全量替换,提交前重新 export 并 merge |
33
+ | E2E | `e2e:<scenario>` | `bpmax-e2e-flow-test-operator` | `test-suite lint/promote`、浏览器证据 | 真实业务数据、截图、失败更新循环 |
34
+
35
+ ## 阶段模型
36
+
37
+ | 阶段 | 执行方式 | 目标 |
38
+ |---|---|---|
39
+ | 阶段 0 | 单线 | 线上基线确认、范围 gate、初始对象清单 |
40
+ | 阶段 1 | 多线只读并行 | 流程、表单、数据集、控件、截图、验证样例调研 |
41
+ | 阶段 2 | 单线 | 合并调研结果,建立对象锁表和最终任务队列 |
42
+ | 阶段 3 | 对象独占配置 | 仅对象锁互不重复的写任务可并行 |
43
+ | 阶段 4 | 单线 | 发布、集成、导航挂载、线上读回 |
44
+ | 阶段 5 | 多线只读验证 | 表单、流程、自动化、列表/详情、筛选器、导航入口、数据回读 |
45
+ | 阶段 6 | 单线 | 汇总证据、同步配置、沉淀记忆或 skill |
46
+
47
+ ## AI 最小任务表
48
+
49
+ | task_id | status | phase | parallel_type | subagent_mode | business_goal | required_skills | object_lock | dependencies | owner | evidence | notes |
50
+ |---|---|---|---|---|---|---|---|---|---|---|---|
51
+ | T00 | 未开始 | 0 | 单线 | none | 确认线上基线和范围 | bpmax-e2e-flow-config-orchestrator | global:baseline | | 主线程 | latest/readback proof | 不修改配置 |
52
+
53
+ ## 停机点
54
+
55
+ - 线上基线无法确认。
56
+ - 对象锁冲突。
57
+ - capability / adapter 缺失。
58
+ - typed CLI lint/build/submit/verify 任一失败。
59
+ - 浏览器真实页面验收失败或缺证据。
60
+
61
+ ## 进度 CSV
62
+
63
+ 执行前创建单独 CSV,飞书或 Markdown 任务书不承载运行态进度。
64
+
65
+ ```csv
66
+ task_id,status,evidence,next
67
+ T00,未开始,,
68
+ ```
@@ -143,7 +143,8 @@ bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format jso
143
143
 
144
144
  ## `.ai_test` 用例资产管理
145
145
  - 可复用测试用例统一放在项目目录 `.ai_test/`,运行状态仍放在 `.codex/tmp/e2e_states/`;不要把二者混用。
146
- - 生成、检查、更新用例资产前,必须先运行当前仓库对应的 `latest-*` 并显式使用 `ALLOW_DIRTY=1`,再把证明写入 `.codex/tmp/ai_test_suite/latest-<repo>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。
146
+ - 生成、检查、更新用例资产前,必须先运行当前仓库对应的 latest sync,并显式使用允许脏工作区的安全参数,再把证明写入 `.codex/tmp/ai_test_suite/latest-<env>-proof.json`。缺少 `--latest-proof` 时,CLI 必须拒绝 lint/index/draft-update/promote。
147
+ - `.ai_test` suite 的 lint、review init/repair/explain、draft-update、promote 都使用 `bpmax-cli test-suite` 的 TypeScript 实现;不要新增或调用旧 Python suite 脚本作为主路径。
147
148
  - 固定目录:
148
149
  - 正式用例:`.ai_test/suite/<scenario_id>/`
149
150
  - 待确认草稿:`.ai_test/suite_draft/<scenario_id>/`
@@ -173,17 +174,19 @@ bpmax-cli e2e cache refresh --flow-id <flow_id> --profile <profile> --format jso
173
174
  - 优先使用 `bpmax-cli test-suite` 原生命令:
174
175
 
175
176
  ```bash
176
- bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
177
- bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json --explain
178
- bpmax-cli test-suite review init --scenario customer-exchange-main-flow --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
179
- bpmax-cli test-suite review repair --scenario customer-exchange-main-flow --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
180
- bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
181
- bpmax-cli test-suite draft-update --scenario customer-exchange-main-flow --replace --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
182
- bpmax-cli test-suite promote --scenario customer-exchange-main-flow --replace --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
177
+ bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
178
+ bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json --explain
179
+ bpmax-cli test-suite review init --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
180
+ bpmax-cli test-suite review repair --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
181
+ bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
182
+ bpmax-cli test-suite draft-update --scenario <scenario_id> --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
183
+ bpmax-cli test-suite promote --scenario <scenario_id> --replace --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
183
184
  bpmax-cli test-suite next-report-dir --root .ai_test/report --create
184
185
  bpmax-cli test-suite lint-report --root .ai_test/report
185
186
  ```
186
187
 
188
+ `test-suite` 的 JSON 错误输出应使用稳定英文 `code/rule_id/path`,用户可见 `message/suggestion` 使用中文;普通文本输出也应可直接给实施人员阅读。
189
+
187
190
  ### 测试资产与真实页面回归边界
188
191
  - 更新 `.ai_test/suite_draft`、通过 lint、完成 review、promote 到 `.ai_test/suite`,只能证明“测试资产已更新”,不等于已经完成真实页面回归。
189
192
  - 真实页面回归必须另行记录:浏览器 URL、当前用户/模拟用户、关键操作、截图、项目 ID/step ID、接口或数据回读证据。
@@ -95,7 +95,7 @@ C001,P0,positive,正常客户换货主链路,有可用旧机SN和新机库存,"t
95
95
  ## latest gate
96
96
 
97
97
  - 生成、检查、更新 `.ai_test` 用例前,都必须先调用当前仓库对应的 `latest-*` 更新方法,并带 `ALLOW_DIRTY=1`。
98
- - yaditest 仓库优先使用 `/latest-yaditest`;脚本等价命令必须显式设置 `ALLOW_DIRTY=1`。
98
+ - 使用当前环境对应的 latest sync 能力;脚本等价命令必须显式设置 `ALLOW_DIRTY=1` 或对应的安全允许脏工作区参数。
99
99
  - latest 后记录:命令、`ALLOW_DIRTY=1`、更新前后 `git rev-parse HEAD`、`git status --short` 摘要。
100
100
  - latest 后必须写 `.codex/tmp/ai_test_suite/latest-<repo>-proof.json`,至少包含 `method`、`allow_dirty`、`before`、`after`、`head`、`status_short`。
101
101
  - `bpmax-cli test-suite lint/index/draft-update/promote` 必须传 `--latest-proof <path>`;缺失或 proof 不合格时命令拒绝执行。
@@ -154,7 +154,7 @@ C001,P0,positive,正常客户换货主链路,有可用旧机SN和新机库存,"t
154
154
  "reviewed_at": "2026-06-18",
155
155
  "status": "fixed",
156
156
  "latest_proof": {
157
- "method": "latest-yaditest",
157
+ "method": "latest-<env>",
158
158
  "allow_dirty": true,
159
159
  "before": "73a8dbb6a06f1c804ae8f7c911e608e392d0c035",
160
160
  "after": "73a8dbb6a06f1c804ae8f7c911e608e392d0c035",
@@ -229,7 +229,7 @@ CLI 行为:
229
229
  ```bash
230
230
  bpmax-cli test-suite lint \
231
231
  --root .ai_test/suite_draft \
232
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
232
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
233
233
  ```
234
234
 
235
235
  用户明确确认后,先完成多 subagent review gate,写入合格 `review.json`,再把 `README.md` 的 `status` 调整为 `active` 或 `deprecated`,最后运行 promote:
@@ -238,13 +238,13 @@ bpmax-cli test-suite lint \
238
238
  bpmax-cli test-suite promote \
239
239
  --scenario customer-exchange-main-flow \
240
240
  --replace \
241
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
241
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
242
242
  # 若目标已存在,先审阅 preview diff,再二次执行:
243
243
  bpmax-cli test-suite promote \
244
244
  --scenario customer-exchange-main-flow \
245
245
  --replace \
246
246
  --diff-reviewed \
247
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
247
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
248
248
  ```
249
249
 
250
250
  不要把 lint 和 promote 连续执行成一个无确认命令块。
@@ -255,18 +255,18 @@ bpmax-cli test-suite promote \
255
255
  bpmax-cli test-suite draft-update \
256
256
  --scenario customer-exchange-main-flow \
257
257
  --replace \
258
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
258
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
259
259
 
260
260
  # 若目标草稿已存在,先审阅 preview diff,再二次执行:
261
261
  bpmax-cli test-suite draft-update \
262
262
  --scenario customer-exchange-main-flow \
263
263
  --replace \
264
264
  --diff-reviewed \
265
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
265
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
266
266
 
267
267
  bpmax-cli test-suite lint \
268
268
  --root .ai_test/suite_draft \
269
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
269
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
270
270
  ```
271
271
 
272
272
  如果 draft-update 输出 `copy diff preview: .../.copy_diff/last.diff`,概要中必须说明 diff 摘要和是否符合预期;未加 `--diff-reviewed` 前不会覆盖目标草稿。
@@ -277,14 +277,14 @@ bpmax-cli test-suite lint \
277
277
  bpmax-cli test-suite promote \
278
278
  --scenario customer-exchange-main-flow \
279
279
  --replace \
280
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
280
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
281
281
 
282
282
  # 若目标正式库已存在,先审阅 preview diff,再二次执行:
283
283
  bpmax-cli test-suite promote \
284
284
  --scenario customer-exchange-main-flow \
285
285
  --replace \
286
286
  --diff-reviewed \
287
- --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
287
+ --latest-proof .codex/tmp/ai_test_suite/latest-<env>-proof.json
288
288
  ```
289
289
 
290
290
  promote 前必须让用户确认概要,包括场景名、核心/一般、用例数量、优先级分布、类型分布、关键前置数据、copy diff 摘要和缺失依据。promote 输出 `copy diff preview: .../.copy_diff/last.diff` 时,必须确认 diff 符合预期并二次带 `--diff-reviewed` 后才算正式发布完成。
@@ -8,6 +8,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
8
8
  ## 写入路径硬约束
9
9
  - 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `nav-config`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许进入 build/submit。
10
10
  - 当前 bpmax-cli typed adapter 支持按 workspace 聚合导出 `navmenu`、`shortcut`、`navmenu_mobile`、`shortcut_mobile` 四类配置,并通过 operation plan dry-run / 确认提交 / 回读 hash。
11
+ - `lint/build/submit/verify` 的可执行门禁在 TypeScript CLI 核心中实现;不要新增或调用旧 Python verify 脚本作为主路径。
11
12
  - 旧来源脚本 `scripts/submit*.py` 只保留为结构参考;不得用它们直调 BPMAX API。
12
13
  - 不得用 `bpmax-cli api POST/PUT/DELETE /configuration*` 或其它 raw API 绕过 typed config submit。
13
14
 
@@ -68,6 +69,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
68
69
  - `shortcut`
69
70
  - `navmenu_mobile`
70
71
  - `shortcut_mobile`
72
+ - TypeScript build 阶段会执行防清空门禁:如果远端某类配置已有入口,而本次 work/submit 会把对应数组写成空数组,必须停止并重新 export 当前远端配置后合并修改。不得用旧 dry-run payload 或单 tab 保存思维覆盖其他配置。
71
73
  - 导航权限只解决“入口可见性”,不解决“列表数据可见性”:
72
74
  - `permission` / `visibility` / `visibility_scope` 只控制入口能否出现
73
75
  - 业务字段归属、身份映射、跨数据集联动导致的数据范围收口,默认应落数据集 `pre_process_script`
@@ -275,7 +277,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
275
277
  - 顺序正确
276
278
  - 权限模式正确
277
279
  - 四类配置没有互相覆盖坏
278
- - 如果脚本 `verify_nav_config.py` 已通过:
280
+ - 如果 `bpmax-cli config nav-config verify` 已通过:
279
281
  - `zhCN` 语言默认状态应视为 `runtime_pending`
280
282
  - 非 `zhCN` 语言默认状态应视为 `manual_followup_required`
281
283
  - 导航变更必须进入工作区首页或移动端首页检查渲染结果;至少确认入口可见、点击后 URL 带有正确 `flow_type` / `flow_key`,并能进入目标列表、创建页或详情页。