bpmax-cli 0.1.44-beta.19 → 0.1.44-beta.20
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/README.md +20 -1
- package/dist/bin.js +481 -48
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +37 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +22 -0
- package/skills/bpmax-project-detail-template-editor/SKILL.md +20 -0
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +73 -0
package/package.json
CHANGED
|
@@ -20,6 +20,43 @@ Use a taskbook before dispatching broad BPMAX implementation work. The taskbook
|
|
|
20
20
|
|
|
21
21
|
Do not use this for a single narrow read-only query, one-field edit, or pure CLI auth/setup task.
|
|
22
22
|
|
|
23
|
+
## Compact Fix Taskbook
|
|
24
|
+
|
|
25
|
+
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:
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
# BPMAX 配置缺陷修复任务书
|
|
29
|
+
|
|
30
|
+
## 目标与边界
|
|
31
|
+
- defect: <one-sentence defect>
|
|
32
|
+
- workspace: <workspace>
|
|
33
|
+
- flow_type: <flow_type or none>
|
|
34
|
+
- requested_fix: <exact requested fix>
|
|
35
|
+
- out_of_scope: <what must not be touched>
|
|
36
|
+
|
|
37
|
+
## 对象锁表
|
|
38
|
+
| lock | mode | reason |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| <domain>:<numeric_id_or_flow_type> | exclusive-write | <why this object must change> |
|
|
41
|
+
|
|
42
|
+
## 停机点
|
|
43
|
+
- capability 缺失即停止。
|
|
44
|
+
- latest/readback 基线漂移即停止。
|
|
45
|
+
- lint 或浏览器回归失败即停止。
|
|
46
|
+
|
|
47
|
+
## 验收门禁
|
|
48
|
+
- typed CLI lint/build/submit/verify 通过。
|
|
49
|
+
- 浏览器真实页面回归通过,或明确标记未执行原因。
|
|
50
|
+
- 若涉及列表,必须检查操作列、查看/详情、删除可见性、icon、查询安全。
|
|
51
|
+
- 若涉及导航,必须检查入口可见并能打开目标页面。
|
|
52
|
+
|
|
53
|
+
## 进度 CSV
|
|
54
|
+
task_id,status,evidence,next
|
|
55
|
+
T01,未开始,,
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Use compact taskbooks for “测试发现一个配置缺陷,需要形成修复任务书”, “只修一个列表/详情/表单 lint 问题”, or “P1 小修复需要对象锁和验收门禁”. Use the full template when work spans multiple objects, new flow/app/workspace creation, approval matrix lifecycle, or subagent parallel execution.
|
|
59
|
+
|
|
23
60
|
## Commands
|
|
24
61
|
|
|
25
62
|
Create the taskbook:
|
|
@@ -75,6 +75,15 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
75
75
|
- 待确认草稿:`.ai_test/suite_draft/<scenario_id>/`
|
|
76
76
|
- 执行报告:`.ai_test/report/<YYYYMMDD-NNN>/`
|
|
77
77
|
- 每个场景目录必须包含 `README.md` 和 `cases.csv`;promote 前还必须包含合格 `review.json`,证明已完成多视角 review 且未解决 P0/P1 为 0。
|
|
78
|
+
- `review.json` 不要凭记忆手写结构。优先运行:
|
|
79
|
+
- `bpmax-cli test-suite review explain --format json` 查看完整 schema。
|
|
80
|
+
- `bpmax-cli test-suite review init --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof <proof.json> --format json` 生成最小合法草稿。
|
|
81
|
+
- `bpmax-cli test-suite review repair --scenario <scenario_id> --draft-root .ai_test/suite_draft --latest-proof <proof.json> --format json` 修补已有 review 缺失字段。
|
|
82
|
+
- `review.json` 最小结构必须包含:
|
|
83
|
+
- 顶层:`scenario_id`、`reviewed_at`、`status`、`latest_proof`、`perspectives`、`unresolved`、`fixes`。
|
|
84
|
+
- `perspectives` 必须有 `structure_lint`、`business_coverage`、`execution_operability`、`config_consistency`。
|
|
85
|
+
- `config_consistency` 必须有 `case_judgments` 和 `missing_case_review`;每条 judgment 必须含 `case_id`、`status`、`config_basis_checked`、`evidence`。
|
|
86
|
+
- `unresolved.P0` 和 `unresolved.P1` 必须都是 `0`。
|
|
78
87
|
- `cases.csv` 字段必须固定为:`case_id,priority,type,title,preconditions,config_basis,prep_data,steps,expected_result,test_data,roles,evidence_required,tags,status,updated_at`。
|
|
79
88
|
- `config_basis` 必须指向真实存在的配置或能力依据,并说明覆盖原因。配置仓库使用 `think_*`、`.ai_test/`、`.codex/skills/`;`bpmax-cli` 包内能力可引用 `skills/`。
|
|
80
89
|
- `test_data` 不是占位字段,必须说明客户真实业务场景和业务逻辑,且必须写成结构化 `key=value`:
|
|
@@ -83,12 +92,17 @@ description: "用于在 BPMAX 中做全链路流程测试、场景回归、前
|
|
|
83
92
|
- `样本数据=`:说明可复测样本的真实业务属性,不得写 `sample`、`test`、`mock`、`xxx`、`占位`、`待补`。
|
|
84
93
|
- `合理性=`:说明这组样本为什么符合客户业务规则、权限边界、主数据关系或上下游约束。
|
|
85
94
|
- `bpmax-cli test-suite lint` 会硬检查 `test_data` 是否包含 `业务场景=`、`业务逻辑=`、`样本数据=`、`合理性=`,且 `样本数据=` 不得是泛化占位值,不得包含 token、cookie、手机号、密码、Authorization 或完整 payload。
|
|
95
|
+
- 如果 `test_data` 语义对齐失败,先运行 `bpmax-cli test-suite lint --explain ...`,再按 CLI 输出的 title/preconditions/steps/expected 关键词重写 `业务场景=`。不要为了过 lint 把无关业务词塞进 `test_data`。
|
|
86
96
|
- 生成或更新用例必须先落到 `.ai_test/suite_draft/`,执行 lint 并向用户概要说明后,得到用户确认才允许 promote 到 `.ai_test/suite/`。
|
|
87
97
|
- 从正式用例复制到草稿,或从草稿 promote 到正式用例时,如果目标场景目录已经存在,第一次 `--replace` 只生成 copy diff preview,不覆盖目标;必须审阅 diff 后第二次显式追加 `--diff-reviewed`。
|
|
98
|
+
- `draft-update` / `promote` 输出 `copy_diff_summary` 时,必须检查新增/删除/修改 case 数、`changed_case_ids`、`README.md` 和 `review.json` 是否变化;不能只看命令成功。
|
|
88
99
|
- 优先使用 `bpmax-cli test-suite` 原生命令:
|
|
89
100
|
|
|
90
101
|
```bash
|
|
91
102
|
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
|
|
103
|
+
bpmax-cli test-suite lint --root .ai_test/suite_draft --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json --explain
|
|
104
|
+
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
|
|
105
|
+
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
|
|
92
106
|
bpmax-cli test-suite index --root .ai_test/suite --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
|
|
93
107
|
bpmax-cli test-suite draft-update --scenario customer-exchange-main-flow --replace --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
|
|
94
108
|
bpmax-cli test-suite promote --scenario customer-exchange-main-flow --replace --latest-proof .codex/tmp/ai_test_suite/latest-yaditest-proof.json
|
|
@@ -96,6 +110,14 @@ bpmax-cli test-suite next-report-dir --root .ai_test/report --create
|
|
|
96
110
|
bpmax-cli test-suite lint-report --root .ai_test/report
|
|
97
111
|
```
|
|
98
112
|
|
|
113
|
+
### 测试资产与真实页面回归边界
|
|
114
|
+
- 更新 `.ai_test/suite_draft`、通过 lint、完成 review、promote 到 `.ai_test/suite`,只能证明“测试资产已更新”,不等于已经完成真实页面回归。
|
|
115
|
+
- 真实页面回归必须另行记录:浏览器 URL、当前用户/模拟用户、关键操作、截图、项目 ID/step ID、接口或数据回读证据。
|
|
116
|
+
- 最终输出必须显式区分:
|
|
117
|
+
- `已更新测试资产`
|
|
118
|
+
- `已执行浏览器回归`
|
|
119
|
+
- `发现需配置修复但尚未执行`
|
|
120
|
+
|
|
99
121
|
## 负卖配置样板流程
|
|
100
122
|
- 工作区:`store_mgr`
|
|
101
123
|
- `flow_type`:`flow288204142`
|
|
@@ -78,6 +78,10 @@ description: "用于在 BPMAX 的项目详情模板页面中创建、编辑、
|
|
|
78
78
|
- 模块顺序就是页面展示顺序。
|
|
79
79
|
- `main_col` / `side_col` 的模块允许范围默认以 `moduleRegistry.js` 为准;源码存在但 registry 未收录的模块,允许作为高级 JSON 模式候选,不默认承诺可视化面板可直接支持。
|
|
80
80
|
- flow 绑定默认以当前页面 query 的 `flow_type/flow_key` 为准,不假设从 `flow.data.meta` 直接读取到详情模板绑定。
|
|
81
|
+
- `/project_detail/0/<project_id>` 里的 `0` 是运行态默认入口占位,不等于可以直接编辑的 flow_page_template 数字 ID。不要把 `bpmax-cli config project-detail-template export --id 0` 当成目标流程默认详情模板;它只代表全局默认模板。
|
|
82
|
+
- 编辑运行态默认详情模板前,必须先解析真实数字 ID:
|
|
83
|
+
- 优先运行 `bpmax-cli config project-detail-template resolve-default --flow-type <flow_type> --flow-key "<flow_key>" --profile <profile> --format json`。
|
|
84
|
+
- 若只拿到本地 sysconfig UUID,先运行 `bpmax-cli config resolve-id --domain project-detail-template --uuid <uuid> --repo <sysconfig_repo> --profile <profile> --format json`。本地镜像可能只有 UUID 没有数字 ID;只有 `resolved_id` 是平台数字 ID 时才允许 export/submit。
|
|
81
85
|
- 当详情模板被绑定到流程节点 `node.step_detail_id` 时,必须按节点业务动作选型:
|
|
82
86
|
- 需要填写当前环节表单的节点,详情模板应包含“项目详情 + 当前环节表单填写模块”。
|
|
83
87
|
- 审批/审核/确认/验收类节点,详情模板应以“项目详情”为主,不默认暴露当前环节表单填写模块。
|
|
@@ -144,6 +148,20 @@ export BPMAX_WORKSPACE='store_mgr'
|
|
|
144
148
|
- 至少检查 3 件事:模块是否出现在详情页、是否真的渲染出表格/卡片主体、页面是否发出了符合预期的列表请求或已经出现目标行数据。
|
|
145
149
|
- 只要模块目标是列表数据,模板回读成功不等于页面真实生效。
|
|
146
150
|
|
|
151
|
+
### 3.0 默认详情模板解析
|
|
152
|
+
- 如果用户给的是运行态 URL `/project_detail/0/<project_id>`,先通过项目详情、列表入口或用户提供信息确认 `flow_type/flow_key`,然后解析真实模板 ID:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
bpmax-cli config project-detail-template resolve-default \
|
|
156
|
+
--flow-type <flow_type> \
|
|
157
|
+
--flow-key "<flow_key>" \
|
|
158
|
+
--profile <profile> \
|
|
159
|
+
--format json
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
- `resolved_id` 为空时,不得继续用 `--id 0` 猜测编辑;必须回到浏览器列表页或配置列表接口确认目标模板。
|
|
163
|
+
- `bpmax-cli config project-detail-template export --id 0` 只能用于查看全局默认结构,不能作为某个流程的默认详情模板修改目标。
|
|
164
|
+
|
|
147
165
|
### 3.1 优先检索现有模板
|
|
148
166
|
- 只要需求涉及“新建项目详情模板”或“参考已有模板改一个版本”,先在当前已激活配置仓库检索 `think_flow_page_template` 里的 `type = 2` 候选模板。
|
|
149
167
|
- 输出至少包含:
|
|
@@ -323,6 +341,8 @@ bpmax-cli config project-detail-template submit \
|
|
|
323
341
|
|
|
324
342
|
```bash
|
|
325
343
|
bpmax-cli config project-detail-template export --id <id> --out .codex/tmp/project-detail-template-editor
|
|
344
|
+
bpmax-cli config project-detail-template resolve-default --flow-type <flow_type> --flow-key "<flow_key>" --profile <profile> --format json
|
|
345
|
+
bpmax-cli config resolve-id --domain project-detail-template --uuid <uuid> --repo <sysconfig_repo> --profile <profile> --format json
|
|
326
346
|
bpmax-cli config project-detail-template lint --work .codex/tmp/project-detail-template-editor/work/<file>.json
|
|
327
347
|
bpmax-cli config project-detail-template build --work .codex/tmp/project-detail-template-editor/work/<file>.json --meta .codex/tmp/project-detail-template-editor/meta/<file>.meta.json --out .codex/tmp/project-detail-template-editor/submit/<file>.json
|
|
328
348
|
bpmax-cli config project-detail-template submit --id <id> --payload .codex/tmp/project-detail-template-editor/submit/<file>.json
|
package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md
CHANGED
|
@@ -45,3 +45,76 @@
|
|
|
45
45
|
- 必须显式配置 `flow_step_id`
|
|
46
46
|
- 模块顺序:
|
|
47
47
|
- 数组顺序就是页面渲染顺序
|
|
48
|
+
|
|
49
|
+
## 可复用最小 JSON 示例
|
|
50
|
+
|
|
51
|
+
### meta-form:展示当前项目表单字段/子表
|
|
52
|
+
|
|
53
|
+
用于展示主项目表单的基础信息、字段和子表。适合主区。
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"type": "meta-form",
|
|
58
|
+
"title": "项目表单",
|
|
59
|
+
"config": {
|
|
60
|
+
"showTitle": true,
|
|
61
|
+
"fields": [],
|
|
62
|
+
"subForms": []
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
说明:
|
|
68
|
+
- `fields: []` 表示按表单默认字段展示;需要控制字段时再显式列 key。
|
|
69
|
+
- 子表展示依赖表单模板本身存在 sub_form 控件;详情模板只负责展示,不负责创建表单结构。
|
|
70
|
+
|
|
71
|
+
### project-list:展示关联子流程/子项目
|
|
72
|
+
|
|
73
|
+
用于在当前项目详情页展示关联的下游流程、子流程或子项目列表。优先使用已验证的父子关联表格模式。
|
|
74
|
+
|
|
75
|
+
```json
|
|
76
|
+
{
|
|
77
|
+
"type": "project-list",
|
|
78
|
+
"title": "关联项目",
|
|
79
|
+
"config": {
|
|
80
|
+
"mode": "",
|
|
81
|
+
"format": "table",
|
|
82
|
+
"template_id": 954573597,
|
|
83
|
+
"flow_type": "flow123456789",
|
|
84
|
+
"flow_key": ""
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
说明:
|
|
90
|
+
- `template_id` 必须是列表模板数字 ID,不得使用 UUID。
|
|
91
|
+
- 只有运行态确认 ES 列表模式可稳定加载时,才使用 `mode: "project"`。
|
|
92
|
+
|
|
93
|
+
### project-info:展示项目基础信息
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"type": "project-info",
|
|
98
|
+
"title": "项目信息",
|
|
99
|
+
"config": {
|
|
100
|
+
"showCreator": true,
|
|
101
|
+
"showCreateTime": true,
|
|
102
|
+
"showStatus": true
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### step-log:展示流程流转记录
|
|
108
|
+
|
|
109
|
+
适合侧栏,用于验收审批/退回/转交痕迹。
|
|
110
|
+
|
|
111
|
+
```json
|
|
112
|
+
{
|
|
113
|
+
"type": "step-log",
|
|
114
|
+
"title": "流转记录",
|
|
115
|
+
"config": {
|
|
116
|
+
"showComment": true,
|
|
117
|
+
"showTime": true
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|