bpmax-cli 0.2.1-beta.85 → 0.2.1-beta.86

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.85",
3
+ "version": "0.2.1-beta.86",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,6 +49,10 @@ For the full implementation taskbook shape, use [references/taskbook-template.md
49
49
 
50
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
51
 
52
+ Lint reports two independent verdicts: `format_ok` (sections, terms, lock and evidence notation) and `executable_ok` (the task table can actually run). Only `ok: true`, both green, means the taskbook is ready to dispatch; a green `format_ok` alone must never be read as "the plan is executable".
53
+
54
+ `bpmax-cli taskbook lint` also rejects planning defects that used to pass silently — parallel write tasks sharing a lock, dependency inversion, readonly locks inside `exclusive-write` tasks, one task spanning three or more config domains, and `:new-*` tasks whose evidence lacks `create` plus an exact `--confirm`. Blueprint taskbooks additionally need both traceability chains, because the adjustment list and the target-flow node table have different granularity: checking off every adjustment still misses parallel branches such as `P1` that only exist in the node table. See [references/blueprint-taskbook-gates.md](./references/blueprint-taskbook-gates.md) for both tables and the exact rule list.
55
+
52
56
  ## Blueprint Implementation Gate
53
57
 
54
58
  When the taskbook implements an approved BPMAX blueprint, also read [references/blueprint-taskbook-gates.md](./references/blueprint-taskbook-gates.md).
@@ -95,6 +95,26 @@ Use a table with:
95
95
  - `complete` requires all required configuration surfaces and runtime evidence for that flow.
96
96
  - List-template runtime evidence is field-level: each critical column records nonempty/allowed-empty policy, dataset source, list/detail consistency, index/runtime evidence, and the confirmed icon name/color token. A row screenshot or successful static lint alone cannot make the flow `complete`.
97
97
 
98
+ ## Two Traceability Chains
99
+
100
+ The adjustment list and the target-flow node table are different inputs at different granularity. Tracing only one of them silently drops whole parallel branches.
101
+
102
+ ### 调整项 → 任务追溯表
103
+
104
+ Declare the adjustment-list source and version, list every adjustment id in `编号清单`, then trace each id to a task:
105
+
106
+ | 调整项编号 | 调整内容 | 任务 | 验收证据 |
107
+ | --- | --- | --- | --- |
108
+
109
+ ### 蓝图节点 → 任务追溯表
110
+
111
+ Declare the node-table source and version, list every node id in `编号清单` — including parallel branches such as `P1` / `P2` that carry no main sequence number — then trace each node:
112
+
113
+ | 节点编号 | 节点名称 | 任务 | 表单 | 责任角色 | 验收证据 |
114
+ | --- | --- | --- | --- | --- | --- |
115
+
116
+ A node that appears only in the node table (for example a 「准备并确认评分标准」parallel branch) cannot be caught by adjustment-level tracing alone. `bpmax-cli taskbook lint` reports any declared id that appears in no task row, and any traceability row that names a task absent from the task table.
117
+
98
118
  ## Prompt Inheritance
99
119
 
100
120
  Each dispatched task derived from a blueprint must carry:
@@ -88,7 +88,7 @@ Write tasks must include `bpmax-cli config adapters --format json` evidence.
88
88
 
89
89
  | task_id | status | phase | parallel_type | subagent_mode | business_goal | required_skills | object_lock | dependencies | owner | evidence | notes |
90
90
  |---|---|---|---|---|---|---|---|---|---|---|---|
91
- | T00 | 未开始 | 0 | 单线 | none | 确认线上基线和范围 | bpmax-e2e-flow-config-orchestrator | global:baseline | | 主线程 | latest/readback proof | 不修改配置 |
91
+ | T00 | 未开始 | 0 | 单线 | readonly | 确认线上基线和范围 | bpmax-e2e-flow-config-orchestrator | readonly:baseline | | 主线程 | latest/readback proof | 仅确认基线,不修改配置 |
92
92
 
93
93
  ## 停机点
94
94
 
@@ -115,7 +115,7 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
115
115
  - evidence 必须声明 `runtime_environment: profile|local-browser`。`profile` 模式下 `runtime_url` origin 必须等于 manifest 的 `profile_origin`;源码本地联调必须显式使用 `local-browser`,且 URL 只能是 localhost/127.0.0.1/::1,不能把远端 profile 名伪装成本地页面身份。
116
116
  - execution manifest 由 CLI 单写者管理,禁止 agent 手工覆盖、恢复或编辑 JSON,也禁止删除或重建相邻的 `.state.json`、`.journal.jsonl`、`.transaction.json` 及 report root 下 `.bpmax-run-integrity/` 高水位文件。journal 必须从 revision 0 连续保留;只留下最新 revision或把 manifest/state/journal 一起恢复到旧前缀都属于回滚。record/read/事务恢复共用 manifest writer lock;execute/resolve/repair 额外共用 `<execution-manifest>.operation.lock`,锁身份不依赖 checkpoint 路径。并发写会触发 `test_suite.run.concurrent_write`,并发流程操作会触发 `e2e.scenario.concurrent_execution`,缺失历史、截断 journal 或回滚旧 manifest 会触发 `test_suite.run.manifest_rollback`。正式 run 还会固定当前 E2E Skill 完整 bundle 的内容哈希,包括 `SKILL.md`、references、scripts、profiles 和其他分发文件;bundle 内禁止符号链接。运行中任何 bundle 内容变化都必须新建 run,部分 Skill 安装失败不得更新 `skills.stamp`。
117
117
  - execution manifest 生成本轮 `evidence_nonce`。正式证据必须由 CLI/runner 在生成时写入匹配的 `run_id`、`evidence_nonce`、`case_id` 和 `case_step_id`;登记阶段不得给历史文件补写本轮标识。复制旧证据、只修改 mtime 或手工拼 nonce 均不能形成本轮通过证据。
118
- - 每一步必须重新截图;同一 run 内不同 browser 步骤的截图内容完全相同会被视为截图复用并阻断。无视觉变化的检查应改成有明确 source evidence 的 `observe` 步骤。
118
+ - 每一步必须重新截图;同一 run 内 browser/identity 步骤必须写入自己的截图文件,**复用前一步的截图文件**(指向同一 artifact、或同一文件被重新登记)会被视为截图复用并阻断。判定依据是文件来源而不是像素内容:只读空结果页这类静态页面每次渲染像素完全一致,字节相同但由本轮新写出的截图是合法证据。无视觉变化的检查仍应优先改成有明确 source evidence 的 `observe` 步骤。
119
119
  - identity unmock 恢复原管理员后,画面可能与更早的 status 截图完全相同;此时允许像素一致,但仍必须是本轮新文件、新时间戳,并同时有 `readback_confirmed=true` 和 `identity-lease.json state=released`,不能复用旧文件。
120
120
  - `checkpoint` / `evidence_only` 只能给局部或对照结论。每个 `executed_cases` 中的通过用例,都必须在结果表、截图 alt/path、项目 ID、step ID 或本轮证据路径中能定位到当前 case。
121
121
  - `test-suite lint-report` 默认只检查当前/最新 run,避免历史失败污染本轮结论;只有明确做全仓历史治理时才使用 `--all-runs`。
@@ -202,7 +202,7 @@ evidence 必须声明 `kind=bpmax_e2e_precondition_evidence`、当前 `run_id/ev
202
202
 
203
203
  `source_case_step_id` 必须与 `case_steps.csv` 当前 observe 步骤 `input_data` 中的声明一致;`source_evidence` 必须指向同一 run 内、已由该前序 PASS 步骤登记的 evidence 文件。缺少 kind、错误 status、缺少 observed、断言失败、来源绑定不一致、来源缺失或未登记会分别返回稳定 rule id。
204
204
 
205
- 证据必须位于本轮 report 目录。仅写 `browser_verified: true`、引用历史截图、复用前一步相同截图、断言为空/失败,或在要求 DOM 时缺少 `dom_snapshot`,都不能记录为 pass。
205
+ 证据必须位于本轮 report 目录。仅写 `browser_verified: true`、引用历史截图、把前一步的截图文件登记成本步截图(同一 artifact 或同一文件重复登记;判定看文件来源,不看像素是否相同——静态空结果页的正常新截图字节可以完全一致)、断言为空/失败,或在要求 DOM 时缺少 `dom_snapshot`,都不能记录为 pass。
206
206
 
207
207
  `runtime_scope` 规则:`page` 证明首页、列表、搜索等页面,不要求项目 ID;`project` 必须提供数字 `project_id`;`step` 必须同时提供数字 `project_id` 和业务 `step_id`。禁止用 `case_steps.csv.step_no` 填业务 `step_id`。
208
208
 
@@ -82,6 +82,8 @@ H5 步骤必须显式声明运行面与经过审查的 viewport:
82
82
  - 主表单:`form.set_value`、`form.set_date_range`、`form.select_option`、`cascader.search_select`、`form.assert_value`。
83
83
  - 流程日志顺序:`page.assert_text_sequence`,使用唯一 `target.test_id` 或 `target.css`、`values` 数组和可选 `match: "exact" | "contains"`,在同一可见容器内按 DOM 文本顺序断言。
84
84
 
85
+ `form.select_option` 的 target 只能是外层控件的语义定位,`option` 写选项的可见文本。runner 先点开控件,再只在「该控件自己的弹层」里按文本精确匹配唯一选项:优先使用控件 `aria-controls`/`aria-owns` 声明的弹层,其次使用同一表单项内的弹层,最后才回退到页面中可见的 `.el-select-dropdown` / `.el-autocomplete-suggestion` / `[role="listbox"]`;`is-disabled` 或 `aria-disabled="true"` 的选项不计入候选。选择后必须回读外层控件的值或标签文本,未回读到目标文本即 hard fail。**不允许退化为整页文本点击**:列表行、表格单元格、流程日志里出现相同枚举文本时,那不是选项,点击它既不会提交选择也会让下拉保持展开。
86
+
85
87
  `cascader.search_select` 专用于 Element UI Cascader。target 只能是外层控件的语义定位(`field`、`label` 等),不能提供组件内部 CSS。value 固定为 `{"search":"叶子名称","path":["完整","层级","叶子名称"]}`:runner 打开唯一外层控件,并要求其 `aria-controls`/`aria-owns` 精确绑定唯一可见 Cascader 弹层;在该弹层内填充内部搜索框,只接受其 `title` 或 `aria-label` 与完整有序 path 精确一致的唯一候选,hover 后点击,并读取外层已选值/标签确认叶子。候选或路径不唯一、弹层绑定/搜索框缺失、完整路径无法验证,均 hard fail;不能降级为宽泛文本点击。
86
88
  - 明细表:`detail.add_row`、`detail.set_value`、`detail.assert_rows`。
87
89
  - 命令动作:`button.click`、`dialog.confirm`。
@@ -29,6 +29,8 @@ Chrome 插件只能用于发现用户当前可见的会话状态,不能证明
29
29
 
30
30
  scenario 进程被终止、崩溃或失去控制后,checkpoint 可能仍保留 `running`。新的进程取得 operation lock 时必须把它视为孤儿运行,普通 `--resume` 只返回 `orphaned_execution_recovery_required`,不得打开浏览器。只有确认旧 Node/Chrome 已退出且 `mutation_state=not_attempted` 后,才允许显式增加 `--recover-orphaned-run` 从当前步骤边界恢复;写入状态不明时仍走 mutation resolve,禁止使用该参数跳过回读。
31
31
 
32
+ run 一旦被终态化(例如 `suite_stale` 把 manifest 置为 `blocked`、`current_step_id=null`、`replacement_required=fresh_run`),它的 identity lease 可能仍是 `active/recovery_required`,持久化浏览器会话也仍处于 mock。此时用原 manifest 执行 `e2e scenario execute --cleanup-identity`:CLI 校验 lease 的 manifest/profile 绑定,并从 lease 自带的 `case_id`/`case_step_id` 找到该 case 已审核的 unmock 步骤,只执行 unmock、身份回读与 lease 释放。终态 run 没有 current step 不影响恢复,`current_step` 返回 `null`、`terminal_run=true`,run 自身的 `blocked` 结论保持原样、业务步骤不重放也不推进。lease 绑定到其他 case 或该 case 缺少已审核 unmock 时仍 hard fail,不得删除 lease 或把失败 run 改回 `running` 来绕过。
33
+
32
34
  Cookie 格式无效、已过期或探测后仍进入登录页时,保持 `blocked`,明确要求用户重新登录目标环境并复制最新 Cookie。手机号、密码和验证码仍不得写入聊天、报告或证据;不得要求用户提供这些信息。
33
35
 
34
36
  Cookie 交接时必须输出一条用户可直接继续的提示词,并替换其中的环境、工作区和测试范围:
@@ -88,7 +88,7 @@ description: "用于通过 bpmax-cli typed config 能力创建和编辑 BPMAX
88
88
  - 只想改 `meta`(例如只调创建页文案)也要保留既有阶段和节点;`periods: []` + `nodes: []` 的流程壳不能提交,只能先在 work 里补出至少一个阶段和一个环节。
89
89
  - `verify` 只回读不写,因此对历史流程把同样问题作为 `[flow_template_stage_step_coverage]` warning 报告,便于发现存量缺口而不阻断只读验收;修复仍必须回到 work 并重新走 lint/build/submit。
90
90
  - 线上模板引用硬门禁:`meta_form_id`、`data.meta.form_template`、`data.meta.table_list_template`、`data.meta.table_filter_template`、`data.meta.step_detail_id`、`data.nodes[].form_template`、`data.nodes[].step_detail_id` 只允许当前环境远端数字 `id`。
91
- - 流程分类引用硬门禁:`flow-template lint/build/create/submit/verify` 会按当前 profile 回读有效 flow category,并校验顶层 `category`。只能从回读得到的 key 中选择;未知、已删除或禁用 key 会在 `$.category` hard fail,CLI 不得根据英文业务语义猜测分类 key。
91
+ - 流程分类引用硬门禁:`flow-template lint/build/create/submit/verify` 会按当前 profile 回读有效 flow category,并校验顶层 `category`。普通分类只能从回读得到的 key 中选择;未知、已删除或禁用 key 会在 `$.category` hard fail,CLI 不得根据英文业务语义猜测分类 key。平台自身直接写入的内置分类 `matrix` 是例外:矩阵流程编辑器不经分类表直接提交 `category: "matrix"`,`matrix` typed 域也强制该值,因此分类表未预置 `matrix` 的环境(如 shitoutest)返回 `status: platform_builtin` 并通过校验;该类不受预置数据缺失影响。
92
92
  - 环节模板硬门禁:环节详情模板引用在 `flow-template lint/build/create/submit/verify` 中会按当前 profile 回读每个有效 `step_detail_id`,确认远端存在且 `type=6`,并检查节点表单语义;输出中包含 `节点名 -> effective step_detail_id -> 模板名/类型/关键模块 -> 适配结论`。无效 ID、错类型、`enable_relate_project_form=true` 但缺少“关联项目表单”模块均为 hard error。
93
93
  - 环节详情模板必须使用独立 typed domain `bpmax-cli config step-detail-template ...` 导出、lint、build、submit 和 verify;该 domain 固定校验 `flow_page_template.type=6`,不得借用 `project-detail-template`、`list-template` 或浏览器配置路径。
94
94
  - `step-detail-template lint/build/submit/verify` 会检查 `content.layout` 非空、模块名称、`x=0/1`、非负整数 `y`、位置冲突、`config` 和 `detailFormConfig` 结构,并要求至少一个主栏模块。平台插件提供的自定义模块必须在本地 work 的 `bpmax_lint.step_detail_custom_modules` 中显式声明;该 lint-only 字段不会进入提交 payload。声明只能证明配置者有意使用该模块,不能证明插件前端已注册;CLI 会持续输出 `runtime_proof_required=true`,必须用真实环节页面证据闭环。