bpmax-cli 0.1.44-beta.15 → 0.1.44-beta.17
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/dist/bin.js +585 -59
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +18 -2
- package/skills/bpmax-approval-matrix/SKILL.md +7 -0
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +3 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +5 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +4 -1
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +7 -0
- package/skills/bpmax-nav-config-editor/SKILL.md +3 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +6 -4
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +5 -0
- package/skills/bpmax-project/SKILL.md +4 -0
package/package.json
CHANGED
|
@@ -62,14 +62,16 @@ The taskbook must include:
|
|
|
62
62
|
- `对象锁表`
|
|
63
63
|
- `AI 最小任务单元`
|
|
64
64
|
- `验收门禁`
|
|
65
|
+
- `导航入口策略`
|
|
66
|
+
- `列表 lint`
|
|
65
67
|
- `停机点`
|
|
66
68
|
- `进度 CSV`
|
|
67
69
|
|
|
68
70
|
Every AI task row must include:
|
|
69
71
|
|
|
70
72
|
- `business_goal`: concrete business outcome, not just a technical object name.
|
|
71
|
-
- `required_skills`: concrete BPMAX skills such as `bpmax-flow-template-editor`, `bpmax-form-template-editor`, `bpmax-list-template-editor`, `bpmax-e2e-flow-test-operator`, or `bpmax-memory-protocol`.
|
|
72
|
-
- `object_lock`: one lock per mutable BPMAX object, for example `flow:<flow_type>`, `form-template:<id>`, `dataset:<id>`, `workspace:<key>`, or `new-flow:<name>`.
|
|
73
|
+
- `required_skills`: concrete BPMAX skills such as `bpmax-flow-template-editor`, `bpmax-form-template-editor`, `bpmax-list-template-editor`, `bpmax-nav-config-editor`, `bpmax-e2e-flow-test-operator`, or `bpmax-memory-protocol`.
|
|
74
|
+
- `object_lock`: one lock per mutable BPMAX object, for example `flow:<flow_type>`, `form-template:<id>`, `dataset:<id>`, `list-template:<id>`, `nav-config:<workspace>`, `workspace:<key>`, or `new-flow:<name>`.
|
|
73
75
|
- `subagent_mode`: one of `none`, `readonly`, `draft-only`, or `exclusive-write`.
|
|
74
76
|
- `dependencies`: upstream task IDs required before execution.
|
|
75
77
|
- `evidence`: expected proof such as readback hash, browser screenshot, test report, or lint result.
|
|
@@ -81,10 +83,22 @@ Every AI task row must include:
|
|
|
81
83
|
- UUID values are forbidden in BPMAX configuration taskbooks and subagent prompts. BPMAX 配置 ID 只能使用平台返回的数字 ID 或 `flow<number>`;新建前只能使用 `new-flow:<name>` 这种逻辑锁。
|
|
82
84
|
- Do not use UUIDs for form-template, dataset, dataset-field, page-template, role, workspace, flow_type, temporary ids, object locks, or examples.
|
|
83
85
|
- Approval matrix work must use separate tasks and object locks for: creating the matrix app, creating matrix rule records, filling real approver users, and connecting business flow `matrix_owner` / `cc_matrix`. Do not mark "matrix created" complete until both app configuration and rule data are verified.
|
|
86
|
+
- Navigation work must use a separate `nav-config:<workspace>` lock when it changes PC/H5 navigation or shortcuts.
|
|
87
|
+
- List-template work must include a lint and runtime evidence item: operation column, view/detail action, guarded delete action, matching icons, query safety, and browser list-page verification.
|
|
84
88
|
- New flows must use `new-flow:<name>` until BPMAX returns a real `flow<number>`.
|
|
85
89
|
- After creation, replace the lock with `flow:<generated flow_type>` before dependent write tasks continue.
|
|
86
90
|
- Publishing, final sync, and cross-object integration must be single-threaded.
|
|
87
91
|
|
|
92
|
+
## Navigation And List Gates
|
|
93
|
+
|
|
94
|
+
- Every full flow-configuration taskbook must explicitly declare one navigation strategy:
|
|
95
|
+
- `nav-config:included` when this work creates or updates the menu/shortcut entry.
|
|
96
|
+
- `nav-config:skipped:<reason>` when no navigation entry is required.
|
|
97
|
+
- `nav-config:deferred:<reason>` when navigation is intentionally left for a later task.
|
|
98
|
+
- If navigation is included, add an AI task or acceptance item using `bpmax-nav-config-editor`, `nav-config:<workspace>`, typed `bpmax-cli config nav-config ...`, readback evidence, and browser proof that the entry opens the target list/create/detail page.
|
|
99
|
+
- If list configuration is included, add an AI task or acceptance item using `bpmax-list-template-editor`, typed `bpmax-cli config list-template lint/build/submit/verify`, lint evidence, and browser proof that the real list page renders data, opens detail, and enforces delete visibility correctly.
|
|
100
|
+
- Do not mark a full process configuration complete when list lint or required navigation verification is missing.
|
|
101
|
+
|
|
88
102
|
## Prompt Gate
|
|
89
103
|
|
|
90
104
|
Before dispatching any subagent prompt, run `lint-prompt`. The prompt must explicitly include:
|
|
@@ -98,6 +112,8 @@ Before dispatching any subagent prompt, run `lint-prompt`. The prompt must expli
|
|
|
98
112
|
- `输入依赖`
|
|
99
113
|
- `输出物`
|
|
100
114
|
- `验收方式`
|
|
115
|
+
- `导航入口策略`
|
|
116
|
+
- `列表 lint`
|
|
101
117
|
- `进度 CSV`
|
|
102
118
|
|
|
103
119
|
If `lint-prompt` fails, revise the prompt. Do not dispatch a vague prompt and rely on the subagent to infer scope.
|
|
@@ -70,6 +70,13 @@ bpmax-cli project create --profile <profile> --flow-type <matrix_flow_type> --js
|
|
|
70
70
|
- Matrix rule project exists online with real approver fields.
|
|
71
71
|
- Business flow create/submit reaches the matrix-owned step.
|
|
72
72
|
- Runtime owner/CC resolves to the expected user.
|
|
73
|
+
- If owner resolution is unclear, run the read-only diagnostic first:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
bpmax-cli matrix owner-resolve --profile <profile> --flow-type <business_flow_type> --node <node_id> --project-id <project_id> --format json
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
The diagnostic only reports node-side `matrix_owner` config paths and project form context. It does not create matrix rule records and does not replace browser/runtime E2E verification.
|
|
73
80
|
|
|
74
81
|
## Stop Conditions
|
|
75
82
|
|
|
@@ -238,6 +238,8 @@ PYTHON_BIN=./venv/bin/python
|
|
|
238
238
|
- `meta/create__<flow_type>__<key>.json`:本地创建状态机
|
|
239
239
|
- `diffs/create__<flow_type>__<key>.work.diff.txt`:种子 vs 工作副本差异摘要
|
|
240
240
|
- `artifact-id` 默认按 `create__<flow_type>__<key>` 生成;如有冲突可以手动传 `--artifact-id` 覆盖。
|
|
241
|
+
- 新建字段的 `meta` 必须明确写入 `domain: "dataset-field"` 与 `mode: "create"`;如果本地脚本或手工 work 缺这两个字段,先补齐再 build,不要让 build 阶段靠猜测进入创建模式。
|
|
242
|
+
- 创建 payload 必须同时保留后端需要的来源字段:`source_table/source_field/source_fk`,并由 CLI 兼容补齐 `sourceTable/sourceField/sourceFk`;任一来源表字段为空时,不得真实 submit。
|
|
241
243
|
|
|
242
244
|
### 3.5 优先检索现有字段模板
|
|
243
245
|
- 只要需求涉及“新建字段”“批量加字段”“从业务含义生成字段”,先在当前已激活配置仓库检索 `think_data_set_field`。
|
|
@@ -327,6 +329,7 @@ PYTHON_BIN=./venv/bin/python
|
|
|
327
329
|
- `source_relation_filter`
|
|
328
330
|
- `relation_flow`
|
|
329
331
|
- `post_script`
|
|
332
|
+
- 创建提交体的 meta 仍必须是 `domain: "dataset-field"` 与 `mode: "create"`;不要把编辑态 meta 复用到创建态,否则 CLI 会走错误的提交语义。
|
|
330
333
|
- 创建模式下若 `flow_key` 为空,依然必须直接省略,不要传空字符串。
|
|
331
334
|
- `advanced` 字段按“显式存在才发”处理:
|
|
332
335
|
- `work.advanced` 不存在:不在提交体里写 `sourceComputed` / `matchRule` / `matchLogic`
|
|
@@ -53,6 +53,8 @@ bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-
|
|
|
53
53
|
- 筛选器
|
|
54
54
|
- 导航
|
|
55
55
|
- 也就是:`流程 -> 表单 -> 数据集字段 -> 数据集 -> 列表 -> 筛选器 -> 导航`
|
|
56
|
+
- 完整流程配置的配置面完成后,必须再调用 `bpmax-e2e-flow-test-operator` 做真实运行态验收;不能只用配置回读或最终 latest pull 宣布完成。
|
|
57
|
+
- 真实运行态验收至少覆盖:导航入口可见并可点击进入目标页、列表真实数据或明确空态原因、操作列进入详情、筛选器可用、创建页能加载并提交到预期环节。
|
|
56
58
|
- 计划第一步固定先进入 `bpmax-config-latest` 并执行当前配置环境的 `bpmax-cli config latest pull <env>`;全部配置和验证结束后,最后一步固定再通过 `bpmax-config-latest` 执行一次同一环境的 latest pull。
|
|
57
59
|
- 若首次同步因本地脏工作区失败,默认下一步尝试追加 `--allow-dirty` 重试;若重试任一步失败,立即停下并向用户说明冲突点,由用户决定是否继续。
|
|
58
60
|
|
|
@@ -71,6 +73,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
71
73
|
```
|
|
72
74
|
|
|
73
75
|
- 任务书里必须声明对象锁、`required_skills`、`subagent_mode`、依赖和验收证据;对象锁冲突、prompt lint 失败、或真实 `flow_type` 未回填时不得分发写任务。
|
|
76
|
+
- 完整流程配置的任务书必须声明 `导航入口策略` 和 `列表 lint`:导航使用 `nav-config:included/skipped/deferred`,列表任务必须保留 `bpmax-cli config list-template lint` 结果和真实列表页验收作为证据。
|
|
74
77
|
- `bpmax-cli taskbook progress init --source .codex/tmp/TASKBOOK.md --out .codex/tmp/taskbook-progress.csv` 生成的进度 CSV 是执行状态来源;不得直接改飞书文档当作进度事实。
|
|
75
78
|
|
|
76
79
|
## Mem0 协议
|
|
@@ -140,6 +143,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
140
143
|
- 第一步:执行 `bpmax-cli config latest pull <env>`
|
|
141
144
|
- 若失败:尝试追加 `--allow-dirty` 重试;若仍失败则停下问用户
|
|
142
145
|
- 中间步骤:按本次配置范围组合子 skill
|
|
146
|
+
- 收口步骤:调用 `bpmax-e2e-flow-test-operator` 完成真实浏览器运行态验收
|
|
143
147
|
- 最后一步:全部配置和验证完成后,再执行一次 `bpmax-cli config latest pull <env>`
|
|
144
148
|
- 计划中要显式说明:
|
|
145
149
|
- 哪些配置面属于本次范围
|
|
@@ -162,6 +166,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
162
166
|
- 控件选型:[$form-control-library](../form-control-library/SKILL.md)
|
|
163
167
|
- 最新配置同步:[$bpmax-config-latest](../bpmax-config-latest/SKILL.md)
|
|
164
168
|
- AI 任务书:[$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md)
|
|
169
|
+
- 运行态验收:[$bpmax-e2e-flow-test-operator](../bpmax-e2e-flow-test-operator/SKILL.md)
|
|
165
170
|
- 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
|
|
166
171
|
- 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
|
|
167
172
|
- `flow-app create` 完成后,必须再执行工作区视角的只读验证:
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
6. `bpmax-list-template-editor`
|
|
11
11
|
7. `bpmax-filter-template-editor`
|
|
12
12
|
8. `bpmax-nav-config-editor`
|
|
13
|
-
9. `bpmax-
|
|
13
|
+
9. `bpmax-e2e-flow-test-operator` -> 真实浏览器运行态验收
|
|
14
|
+
10. `bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
|
|
14
15
|
|
|
15
16
|
## 范围到 skill 的映射
|
|
16
17
|
- 流程模板:`bpmax-flow-template-editor`
|
|
@@ -20,6 +21,7 @@
|
|
|
20
21
|
- 列表模板:`bpmax-list-template-editor`
|
|
21
22
|
- 筛选器模板:`bpmax-filter-template-editor`
|
|
22
23
|
- 导航配置:`bpmax-nav-config-editor`
|
|
24
|
+
- 运行态验收:`bpmax-e2e-flow-test-operator`
|
|
23
25
|
- 控件判断:`form-control-library`
|
|
24
26
|
- 环境同步:`bpmax-config-latest` -> `bpmax-cli config latest pull <env>`
|
|
25
27
|
|
|
@@ -58,3 +60,4 @@
|
|
|
58
60
|
- 详情回读是否正常
|
|
59
61
|
- 软删对象是否已排除在业务列表口径之外
|
|
60
62
|
- 如果上一面仍存在“坏草稿 / 短暂延迟 / 页面与接口不一致”,不要直接推进到下一面。
|
|
63
|
+
- 完整流程配置完成后必须做最终浏览器运行态验收:导航入口可见并点击到目标页、列表真实数据或明确空态原因、操作列进入详情、筛选器可用、创建页能加载并提交到预期环节。
|
|
@@ -30,6 +30,13 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
30
30
|
- 线上完整链路:页面优先,必须走真实运行页真实操作;接口与脚本只做辅助,不替代用户路径
|
|
31
31
|
- 非完整链路或离线摸底:接口优先,可用于列表查询、项目创建、详情回读、步骤审批/驳回、筛选字段发现
|
|
32
32
|
- 页面兜底:导航入口可见性、页面真实文案/按钮、截图取证、首次抓真实请求骨架
|
|
33
|
+
- Chrome DevTools MCP 出现 `Network.enable timed out`、快照长期不可用或页面通道挂住时,允许切换到 AppleScript 作为真实浏览器 E2E 备用通道;备用通道只能做 DOM 文本读取、按钮点击、输入框填写、截图和页面提交,不得改用接口直调替代页面动作。
|
|
34
|
+
- 使用 AppleScript 备用通道时仍必须记录:
|
|
35
|
+
- 触发兜底的 DevTools 错误
|
|
36
|
+
- 当前浏览器 URL
|
|
37
|
+
- 关键 DOM 文案或按钮存在性
|
|
38
|
+
- 点击/填写/提交动作
|
|
39
|
+
- 提交后的页面 URL、项目 ID、step ID 或截图证据
|
|
33
40
|
- 发布后优先用“发布后新建”的项目样本做判断;旧项目可能仍绑定旧 step/runtime 快照,不能直接代表最新 live 行为。
|
|
34
41
|
- 如果本轮先改了 live flow 的草稿,复测前必须确认该修复已经正式发布;不要拿“仅保存草稿”的版本去跑线上结论。默认顺序是:保存草稿 -> 回读确认 -> 正式发布 -> 用新样本复测。
|
|
35
42
|
- 如果本轮修复涉及节点级条件节点,回测必须覆盖所有分支下标路径;不要只验证默认分支或只验证画布显示。
|
|
@@ -118,7 +118,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
118
118
|
- 读取线上真实结构
|
|
119
119
|
- 辅助定位 icon / 权限 / 页面行为
|
|
120
120
|
- 最终刷新回页验收
|
|
121
|
-
-
|
|
121
|
+
- 不得把 `submitData()` 或脚本直提 `/api/configuration` 当作提交路径;它们只用于理解页面结构和验收行为,真实写入必须走 typed CLI。
|
|
122
122
|
|
|
123
123
|
### 3. 读取四类配置
|
|
124
124
|
- 优先从页面运行时拿四类配置,而不是只看 DOM。
|
|
@@ -181,6 +181,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
181
181
|
- H5 流程页:`/pages/index/project?flow_type=...`
|
|
182
182
|
- PC 工作台:`/myProject`
|
|
183
183
|
- H5 工作台:应优先参考当前工作区已有移动端可用路径
|
|
184
|
+
- 如果目标流程有非空 `flow_key`,PC/H5 路径都必须保留 `flow_key` 参数,例如 `/project?flow_type=<flowType>&flow_key=<flowKey>`;不要让导航入口落到默认流程列表。
|
|
184
185
|
- 外链不要自动映射到 H5 内页;先按原路径保留,必要时提示用户。
|
|
185
186
|
- 如果用户提供的是跨工作区路径,默认不擅自改写 workspace 前缀。
|
|
186
187
|
|
|
@@ -277,7 +278,7 @@ description: "用于在 BPMAX 的工作区导航配置页面中创建或编辑 P
|
|
|
277
278
|
- 如果脚本 `verify_nav_config.py` 已通过:
|
|
278
279
|
- `zhCN` 语言默认状态应视为 `runtime_pending`
|
|
279
280
|
- 非 `zhCN` 语言默认状态应视为 `manual_followup_required`
|
|
280
|
-
-
|
|
281
|
+
- 导航变更必须进入工作区首页或移动端首页检查渲染结果;至少确认入口可见、点击后 URL 带有正确 `flow_type` / `flow_key`,并能进入目标列表、创建页或详情页。
|
|
281
282
|
- 验证通过后,把新的路径映射、权限模型和入口组织规则写回 Mem0。
|
|
282
283
|
|
|
283
284
|
## 输出要求
|
|
@@ -62,7 +62,9 @@ GET /api/group/sub_groups?group_ids=<id1,id2>&with_full_info=0
|
|
|
62
62
|
其他三类仅替换 `type` 和 `content` 字段名。
|
|
63
63
|
|
|
64
64
|
## 推荐调用顺序
|
|
65
|
-
1.
|
|
66
|
-
2.
|
|
67
|
-
3.
|
|
68
|
-
4.
|
|
65
|
+
1. 从页面运行时读取四类配置和请求骨架。
|
|
66
|
+
2. 在本地 work 文件中同时更新四类数据。
|
|
67
|
+
3. 执行 `bpmax-cli config nav-config lint/build/submit`,先 dry-run,再用精确 `--confirm` 正式提交。
|
|
68
|
+
4. 提交后回读四类配置,并在浏览器首页点击入口验证。
|
|
69
|
+
|
|
70
|
+
`submitData()`、页面 `$post` 或直接 `POST/PUT /api/configuration` 只可用于理解页面行为,不得作为真实写入路径。
|
|
@@ -7,14 +7,19 @@
|
|
|
7
7
|
|
|
8
8
|
```text
|
|
9
9
|
/project?flow_type=<flowType>
|
|
10
|
+
/project?flow_type=<flowType>&flow_key=<flowKey>
|
|
10
11
|
```
|
|
11
12
|
|
|
12
13
|
- H5:
|
|
13
14
|
|
|
14
15
|
```text
|
|
15
16
|
/pages/index/project?flow_type=<flowType>
|
|
17
|
+
/pages/index/project?flow_type=<flowType>&flow_key=<flowKey>
|
|
16
18
|
```
|
|
17
19
|
|
|
20
|
+
- `flow_key` 为空时省略;非空时必须保留。多变体流程如果丢掉 `flow_key`,导航会进入默认流程列表,属于验收失败。
|
|
21
|
+
- 浏览器验收必须点击入口后确认 URL 中的 `flow_type` 和 `flow_key` 与目标流程一致。
|
|
22
|
+
|
|
18
23
|
### 控制台 / 看板 / 外链
|
|
19
24
|
- 不要机械把所有 PC 路径改成 `/pages/index/...`
|
|
20
25
|
- 如果当前工作区已有同类移动端路径,优先复用现有样例。
|
|
@@ -52,6 +52,7 @@ bpmax-cli project create --flow-id 123 --json '{"form":{"priority":"P1"}}' --for
|
|
|
52
52
|
- 已有结构化字段时仍使用默认 `project create --json ...`,CLI 会把 JSON 作为已填写值继续引导
|
|
53
53
|
- 如果 CLI 报 `Missing required fields`,把缺失字段转成自然语言继续问用户
|
|
54
54
|
- 如果用户明确要求“打开表单填写”“我自己去页面填”“给我创建页链接”,命令必须追加 `--allow-form-handoff`
|
|
55
|
+
- 如果自动化场景只需要稳定拿到 handoff JSON,不希望进入交互确认,使用 `bpmax-cli project create ... --json @payload.json --handoff-only --format json`;不要改走非交互直提硬冲。
|
|
55
56
|
|
|
56
57
|
### Handoff 回复前 gate
|
|
57
58
|
|
|
@@ -65,6 +66,7 @@ CLI 返回 `handoff: true` 时,回复用户前必须全部满足:
|
|
|
65
66
|
- `reason: "form_template_requires_page_handoff"` 说明表单包含页面专属能力,例如流水号、自动初始化或复杂控件;必须把 handoff 链接发给用户,不能回复“项目已创建”
|
|
66
67
|
- 如果链接只有 `flow_type`,或既没有 `prefill_token` 也没有 `init_value`,不得发给用户;重新运行默认 `project create` 或报告无法生成预填链接
|
|
67
68
|
- 如果 CLI 没有返回 URL,不要自己拼 URL
|
|
69
|
+
- 如果需要检查 handoff token 是否还能被平台读取,使用 `bpmax-cli project handoff status --prefill-token <token> --format json`。即使返回 `ok: true`,也只代表 token 可读;`browser_verified: false` 时必须打开真实浏览器页面验证表单预填和提交结果。若返回 `supported: false`,说明当前平台不支持 token 状态查询。
|
|
68
70
|
|
|
69
71
|
### 禁止/例外
|
|
70
72
|
|
|
@@ -84,7 +86,9 @@ bpmax-cli project get --project-id 1001 --format json
|
|
|
84
86
|
bpmax-cli project my-step --format table
|
|
85
87
|
bpmax-cli project my-step --flow-type flow802926525 --format json
|
|
86
88
|
bpmax-cli project my-step --key-of-flow-node 'flow802926525::1776572829122' --format json
|
|
89
|
+
bpmax-cli project my-step --workspace store_mgr --flow-type flow802926525 --format json
|
|
87
90
|
bpmax-cli project approval-context 1001 --step-id 2002 --format json
|
|
91
|
+
bpmax-cli project handoff status --prefill-token <token> --format json
|
|
88
92
|
bpmax-cli project search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
89
93
|
bpmax-cli es project-search --body @project-search-query.json --page 1 --page-size 20 --format json
|
|
90
94
|
bpmax-cli step get 2002 --format json
|