bpmax-cli 0.1.44-beta.24 → 0.1.44-beta.26
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 +312 -70
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +19 -0
- package/skills/bpmax-ai-taskbook/agents/openai.yaml +3 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +68 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +11 -8
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +10 -10
- package/skills/bpmax-flow-template-editor/SKILL.md +7 -5
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +2 -2
- package/skills/bpmax-nav-config-editor/SKILL.md +3 -1
package/package.json
CHANGED
|
@@ -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
|
-
- 生成、检查、更新用例资产前,必须先运行当前仓库对应的
|
|
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
|
|
177
|
-
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest
|
|
178
|
-
bpmax-cli test-suite review init --scenario
|
|
179
|
-
bpmax-cli test-suite review repair --scenario
|
|
180
|
-
bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest
|
|
181
|
-
bpmax-cli test-suite draft-update --scenario
|
|
182
|
-
bpmax-cli test-suite promote --scenario
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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` 后才算正式发布完成。
|
|
@@ -177,11 +177,13 @@ export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
|
177
177
|
- 对挂了脚本的节点,发布后必须直接回读 live `/api/flow`,确认脚本文本和启用开关都还在;不要只看编辑器画布
|
|
178
178
|
- `meta.project_create_validator` 通过 `parseEvalFunction()` 执行,脚本文本会被包进函数体;如果脚本本身写成裸 `async () => { ... }()` 且没有显式 `return`,最终返回值会被吞掉,等价于校验未生效。创建期脚本默认优先写成:
|
|
179
179
|
- `return (async () => { ... })();`
|
|
180
|
-
- `message_config_mode
|
|
181
|
-
- `message_template` / `cc_message_template`
|
|
182
|
-
-
|
|
183
|
-
- `
|
|
184
|
-
-
|
|
180
|
+
- 消息模板分两种配置模式,由 `message_config_mode`(节点)/ `cc_message_config_mode`(抄送)决定执行分支,两种模式返回值形态完全不同,不可混用:
|
|
181
|
+
- `code` 模式(`message_template` / `cc_message_template` 是整段 JS 函数体脚本):脚本必须 `return` 一个完整消息对象,结构为 `{ title, content, actions: [{ type: "link", btnType, text, url, m_url }], messageType: "step", currentStep, project }`;后端 `parseScriptMessageTemplate` 直接把返回值当 `messageContent` 投递。返回裸字符串(如 `return "请处理【环节】。";`)是错的:非空字符串会被当 truthy 继续进入 `sendMessage`,却无法渲染成卡片、也发不出有效平台消息。
|
|
182
|
+
- `standard` 模式(`message_template_simple` / `*_message_template_simple` 是对象):后端 `parseSimpleMessageTemplate` 对 title / 每个 content[].body / 每个 actions[].url 逐字段执行 `parseTemplateString`,每个字段各自 `return` 一个字符串;例如 `title` 写 `return \`待处理:环节名\`;`,`actions[].url` 写 `return '/projectContinue?id=' + step.project_id + '&step_id=' + step.id;`。
|
|
183
|
+
- 只有需要禁止该环节外发消息时,才在 `code` 模式下写 `return "";`:返回空串会让 `buildStepMessage` 判空后直接 return 停止发送。绝不能把 `message_template` 留空,空值会触发后端默认消息。
|
|
184
|
+
- code 模式返回对象可选附加飞书卡片字段:`elements`(数组,支持 `div/lark_md`、`markdown`、`column_set/column`、`img`、`note`、`person_list`)、`unshiftElements`(插到正文最前)、`color`(卡片标题色,默认 `wathet`),让消息以结构化卡片呈现。
|
|
185
|
+
- semantic lint 已将“code 模式返回非对象、standard 模式字段返回非脚本串、空模板、字面量 URL”设为 hard error,不得用 `--allow-preexisting-lint-errors` 豁免。
|
|
186
|
+
- 源码依据:`getMessageContent` 在 `message_config_mode==='standard' && message_template_simple` 时走 `parseSimpleMessageTemplate`,否则走 `parseScriptMessageTemplate`;两者返回值形态不可互换。飞书卡片由 `feishu.messageAdaptor` 消费 `data.title/content/elements/unshiftElements/actions/color`。
|
|
185
187
|
- 创建链路中 `meta.project_create_validator` 在单号/流水号生成之后执行。它可以拒绝缺失或不一致的数据,不能在不消耗流水号的前提下修复已经生成的单号;涉及 `sn_number.field_reference` 的问题,应优先在表单侧通过 `ctx.$setValueByKeyToValue(...)` 触发前端订阅刷新,流程级创建校验只做后端兜底拒绝。
|
|
186
188
|
- 后端单号生成使用提交 payload 中字段规则里的 `result` / `options[].result`,不会重新按当前表单值计算 `field_reference`。校验脚本如需判断“单号是否包含门店编码”,应同时检查提交值、`projectForm.value` / `key_to_value` 和单号字符串本身,避免只看隐藏字段存在就放行。
|
|
187
189
|
- 对“新增节点后立刻验证流转”的场景,回归样本优先用新建项目,不要优先复用已经跑过旧配置的历史项目;历史 `step` 记录不会自动套用新节点骨架,容易把旧 step 状态、旧 target_step 和缓存误判成新配置问题。
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
- 新流程名称已经改了,但项目名称模板或校验脚本仍沿用旧业务语义
|
|
39
39
|
- 已把“填写订单信息”下沉到开始节点 `meta.form_template`,脚本却还在按旧节点 id 或旧节点表单取值
|
|
40
40
|
- 表单字段前端查重把“查询”写成未确认后端已实现的 `POST /api/.../search`,结果命中 `BaseRest.postAction` 直接新增资源
|
|
41
|
-
- `message_config_mode = code` / `cc_message_config_mode = code`
|
|
42
|
-
- code-mode `message_template` 留空以为能阻止外发;实际会触发后端默认消息,必须显式写 `return ""
|
|
41
|
+
- `message_config_mode = code` / `cc_message_config_mode = code` 时,把普通中文文案或裸字符串写进 `message_template` / `cc_message_template`;code 模式必须 `return` 一个完整消息对象 `{ title, content, actions, messageType }`,裸字符串(如 `return "请处理";`)会被当 truthy 进入 `sendMessage` 但无法渲染成卡片
|
|
42
|
+
- code-mode `message_template` 留空以为能阻止外发;实际会触发后端默认消息,必须显式写 `return "";`(空串是唯一合法的裸字符串返回值)
|
|
43
43
|
- code-mode 消息卡片按钮 URL 写成 `/projectContinue?id=${step?.project_id}&step_id=${step?.id}`,而不是 `return '/projectContinue?id=' + step.project_id + '&step_id=' + step.id;`
|
|
44
44
|
|
|
45
45
|
## 前端失焦查重专项核查
|
|
@@ -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
|
-
-
|
|
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`,并能进入目标列表、创建页或详情页。
|