bpmax-cli 0.2.1-beta.1 → 0.2.1-beta.3
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 +26 -1
- package/dist/bin.js +838 -249
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +4 -1
- package/skills/bpmax-approval-matrix/SKILL.md +4 -1
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +6 -3
- package/skills/bpmax-dataset-template-editor/SKILL.md +11 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +25 -1
- package/skills/bpmax-flow-template-editor/SKILL.md +9 -0
package/package.json
CHANGED
|
@@ -54,6 +54,7 @@ Taskbook lint is implemented in the TypeScript CLI core. Do not add or call Pyth
|
|
|
54
54
|
When a requirement touches an end-to-end BPMAX configuration, the taskbook must explicitly include or intentionally skip these surfaces:
|
|
55
55
|
|
|
56
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
|
+
- flow-app migration context: tasks that create or migrate a flow app must include `bpmax-cli config flow-app context --workspace <workspace> --flow <flow> --evidence-out ... --format json`, require `target_context.evidence_status=verified`, and carry `flow_type`、`flow_template_id`、`form_template_id`、`form_template_draft_id`、`workspace_readback_hash` into downstream tasks instead of asking agents to infer them.
|
|
57
58
|
- 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
59
|
- 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
60
|
- filter-template: `bpmax-filter-template-editor`, `filter-template:<id>`, typed `config filter-template lint/build/submit/verify`, plus filter fields and sample hit proof.
|
|
@@ -157,7 +158,9 @@ Every AI task row must include:
|
|
|
157
158
|
- `subagent_mode`: one of `none`, `readonly`, `draft-only`, or `exclusive-write`.
|
|
158
159
|
- `dependencies`: upstream task IDs required before execution.
|
|
159
160
|
- `evidence`: expected proof such as readback hash, browser screenshot, test report, or lint result.
|
|
160
|
-
- For configuration write tasks, `evidence` or `notes` must include `bpmax-cli config adapters --format json`, the matching typed CLI lint/build/submit/verify commands, and the domain-specific constraints from the relevant skill.
|
|
161
|
+
- For configuration write tasks, `evidence` or `notes` must include `bpmax-cli config adapters --format json`, the matching typed CLI lint/build/submit/verify/readback commands, and the domain-specific constraints from the relevant skill.
|
|
162
|
+
- Migration tasks that create or update multiple config objects must specify whether they will use `bpmax-cli config batch submit --manifest ...` and `bpmax-cli config batch readback --manifest ...`; if not, the task must explain why batch evidence is intentionally skipped.
|
|
163
|
+
- Tasks that depend on IDs returned by typed create/submit must consume the standard `id` / `key` / `readback_hint` response fields instead of asking subagents to parse domain-specific response bodies.
|
|
161
164
|
|
|
162
165
|
## Object Lock Rules
|
|
163
166
|
|
|
@@ -46,9 +46,12 @@ bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
bpmax-cli config flow-app create --workspace <workspace> --form-work <matrix-form-work> --flow-work <matrix-flow-work> --name "<matrix name>"
|
|
49
|
-
bpmax-cli config flow-app create --workspace <workspace> --form-work <matrix-form-work> --flow-work <matrix-flow-work> --name "<matrix name>" --confirm "create flow-app <matrix name> in <workspace>"
|
|
49
|
+
bpmax-cli config flow-app create --workspace <workspace> --form-work <matrix-form-work> --flow-work <matrix-flow-work> --name "<matrix name>" --confirm "create flow-app <matrix name> in <workspace>" --evidence-out .codex/tmp/matrix-target-context.csv --response-out .codex/tmp/matrix-flow-app-create.response.json
|
|
50
|
+
bpmax-cli config flow-app context --workspace <workspace> --flow <matrix_flow_type> --evidence-out .codex/tmp/matrix-target-context.csv --format json
|
|
50
51
|
```
|
|
51
52
|
|
|
53
|
+
`flow-app create` 确认执行必须同时保留 `--response-out` 和 `--evidence-out`。`config flow-app context` 的 `target_context.evidence_status` 必须是 `verified`,且 `missing_context` 必须为空,才允许进入规则记录 seed、主流程 `matrix_owner` 接入或导航配置。该 evidence 是矩阵应用的 apply-ready 上下文,必须记录 `flow_type`、`flow_template_id`、`form_template_id`、`form_template_draft_id`、`workspace_key` 和 `workspace_readback_hash`。
|
|
54
|
+
|
|
52
55
|
3. Matrix rule records:
|
|
53
56
|
|
|
54
57
|
```bash
|
|
@@ -404,6 +404,8 @@ return JSON.parse(ctx.value);
|
|
|
404
404
|
|
|
405
405
|
### 7. 提交与回读
|
|
406
406
|
- 当前版本 `dataset-field` adapter 支持编辑、新建和删除单个字段。复制或批量生成字段必须拆分成可审查的单字段 work 文件、lint 结果和 submit payload,再通过 typed CLI 的 create/submit/delete 路径逐项执行;尚未提供批量快捷命令时,不得改用旧脚本直提。
|
|
407
|
+
- 新建字段提交前必须由 CLI 本地 preflight 阻断缺字段,不要把低质量 payload 打到服务端:`payload.flow_type`、`payload.data_set_id`、`payload.source_table`、`payload.source_field`、`payload.source_fk` 都必须非空。若报错出现这些 `payload.*` 路径,先修 work/meta,不要把服务端“流程类型不能为空/来源表不能为空”当成远端问题。
|
|
408
|
+
- 批量 runner 或脚本包装 typed create 时,必须按“逐条独立状态”执行:每个字段单独记录 `field_key`、`work_file`、`submit_file`、`response_file`、`status`、`error`、`created_id`;支持 `--continue-on-error` 或等价策略继续处理后续 ready 字段,最后统一返回失败并保留成功/失败清单。不得因为第一条失败就丢失当前批次上下文。
|
|
407
409
|
|
|
408
410
|
- 旧 `submit_dataset_field.py` 只保留为结构参考,默认会硬失败;不得用它直写线上字段配置。
|
|
409
411
|
- 只有满足以下条件才允许真正执行提交请求:
|
|
@@ -413,8 +415,8 @@ return JSON.parse(ctx.value);
|
|
|
413
415
|
- `submitBuiltAt` 不早于最近一次 `workConfirmedAt`
|
|
414
416
|
- 只要 `work/<id>.json` 或 `submit/<id>.json` 被改动,已有确认默认失效,需要重新确认。
|
|
415
417
|
- 提交接口:
|
|
416
|
-
-
|
|
417
|
-
- 编辑:`
|
|
418
|
+
- 新建:`bpmax-cli config dataset-field create --id create:dataset-field --payload <submit.json> --confirm "submit dataset-field create:dataset-field" --response-out <response.json>`
|
|
419
|
+
- 编辑:`bpmax-cli config dataset-field submit --id <id> --payload <submit.json> --confirm "submit dataset-field <id>" --response-out <response.json>`
|
|
418
420
|
- 新建字段提交成功后,脚本必须先从响应里提取真实字段 `id`,回填到 `meta/<artifact-id>.json`,然后再执行 `GET /bpmax/data-set-field/:id` 做回读验证。
|
|
419
421
|
- 提交脚本会输出:
|
|
420
422
|
- `result/<id>.response.json`:提交响应
|
|
@@ -592,7 +594,8 @@ bpmax-cli config dataset-field export --id <id> --out .codex/tmp/dataset-field-e
|
|
|
592
594
|
bpmax-cli config dataset-field lint --work .codex/tmp/dataset-field-editor/work/<file>.json
|
|
593
595
|
bpmax-cli config dataset-field build --work .codex/tmp/dataset-field-editor/work/<file>.json --meta .codex/tmp/dataset-field-editor/meta/<file>.meta.json --out .codex/tmp/dataset-field-editor/submit/<file>.json
|
|
594
596
|
bpmax-cli config dataset-field submit --id <id> --payload .codex/tmp/dataset-field-editor/submit/<file>.json
|
|
595
|
-
bpmax-cli config dataset-field submit --id <id> --payload .codex/tmp/dataset-field-editor/submit/<file>.json --confirm "submit dataset-field <id>"
|
|
597
|
+
bpmax-cli config dataset-field submit --id <id> --payload .codex/tmp/dataset-field-editor/submit/<file>.json --confirm "submit dataset-field <id>" --response-out .codex/tmp/dataset-field-editor/result/<file>.response.json
|
|
598
|
+
bpmax-cli config dataset-field create --id create:dataset-field --payload .codex/tmp/dataset-field-editor/submit/<create-file>.json --confirm "submit dataset-field create:dataset-field" --response-out .codex/tmp/dataset-field-editor/result/<create-file>.response.json
|
|
596
599
|
bpmax-cli config dataset-field verify --id <id> --expect .codex/tmp/dataset-field-editor/work/<file>.json
|
|
597
600
|
```
|
|
598
601
|
|
|
@@ -7,7 +7,7 @@ description: "用于在 BPMAX 的数据集页面中创建、编辑、发布、
|
|
|
7
7
|
|
|
8
8
|
## 写入路径硬约束
|
|
9
9
|
- 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `dataset`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许进入 build/submit。当前 typed CLI 通过 huanpingtong `/api/data_set*` 代理访问 bpmax-server `/data-set*` 运行态接口;若 adapter 显示 `blocked`,只能导出、编辑 work、lint 和形成变更建议,不得提交。
|
|
10
|
-
- 当前 bpmax-cli typed adapter 支持数据集的 `dataset export/lint/build/submit/verify`,编辑提交路径为 huanpingtong `/api/data_set/relationFields/:id`,新建提交路径为 huanpingtong `/api/data_set`,均代理到 bpmax-server
|
|
10
|
+
- 当前 bpmax-cli typed adapter 支持数据集的 `dataset export/lint/build/submit/verify`,编辑提交路径为 huanpingtong `/api/data_set/relationFields/:id`,新建提交路径为 huanpingtong `/api/data_set`,均代理到 bpmax-server 运行态接口。relationFields 也可以用显式子命令 `bpmax-cli config dataset relation-fields submit/readback`。发布、暂停、取消刷新和索引刷新必须使用 `bpmax-cli config dataset publish|pause|cancel-refresh|refresh|reindex`,不得把旧脚本、raw API、页面 fetch 当作替代提交路径。
|
|
11
11
|
- 旧来源脚本 `scripts/submit*.py` 只保留为结构参考,默认会硬失败;不得用它们直调 BPMAX API。
|
|
12
12
|
- 不得用 `bpmax-cli api POST/PUT/DELETE /data_set*` 或其它 raw API 绕过 typed config submit。
|
|
13
13
|
|
|
@@ -54,7 +54,16 @@ description: "用于在 BPMAX 的数据集页面中创建、编辑、发布、
|
|
|
54
54
|
- 浏览器实时线上页面、实时接口返回、当前页面真实请求体优先级高于本地仓库里的 `think_data_set` / `think_data_set_field` 镜像;本地配置只作为候选、检索和回放参考,不能覆盖线上事实。
|
|
55
55
|
- 优先从真实页面和真实接口返回抽取 payload 骨架,不从零臆造。
|
|
56
56
|
- 优先检索现有数据集,再决定是否新建;优先判断当前流程下是否已有同语义可复用数据集。
|
|
57
|
-
- 当前默认走“线上详情导出到本地临时文件 -> 修改 work 文件 -> lint -> build submit -> 二次确认 -> typed CLI submit -> verify”。只有 `bpmax-cli config adapters` 显示 `dataset` 的 `build_status/submit_status` 为 `supported` 时,才允许进入提交闭环。
|
|
57
|
+
- 当前默认走“线上详情导出到本地临时文件 -> 修改 work 文件 -> lint -> build submit -> 二次确认 -> typed CLI submit -> verify/readback”。只有 `bpmax-cli config adapters` 显示 `dataset` 的 `build_status/submit_status` 为 `supported` 时,才允许进入提交闭环。
|
|
58
|
+
- 数据集 relationFields 编辑优先使用:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bpmax-cli config dataset relation-fields submit --id <dataset_id> --payload <submit.json> --confirm "submit dataset <dataset_id>" --response-out <response.json> --format json
|
|
62
|
+
bpmax-cli config dataset relation-fields readback --id <dataset_id> --format json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- 批量迁移多个数据集或字段时,优先生成 batch manifest 并使用 `bpmax-cli config batch submit/readback`。manifest 每行必须写 `domain`、`id`、`payload`、`confirm`、`response_out`;不要为每个字段临时写 collector 解析不同 response shape。
|
|
66
|
+
- 所有 typed submit/create 响应都要读取标准字段 `id`、`key`、`readback_hint`;如果还需要兼容旧字段,只能作为 fallback,不能把旧 response shape 当主路径。
|
|
58
67
|
- 提交前硬门禁:必须先跑数据集 lint;`basicTableAudit` blocker 或脚本位点里把 ES dataset 查询入口写成 `data_set_id` 时,直接阻断提交。
|
|
59
68
|
- 脚本类查询默认口径:
|
|
60
69
|
- 前端验数或调试样例默认优先 `raw-es-search`
|
|
@@ -38,10 +38,31 @@ description: "用于按 BPMAX 完整流程配置需求先调研、再出计划
|
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name>
|
|
41
|
-
bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name> --confirm "create flow-app <name> in <workspace>"
|
|
41
|
+
bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-file> --flow-work <flow-work-file> --name <name> --confirm "create flow-app <name> in <workspace>" --evidence-out .codex/tmp/target-context.csv --response-out .codex/tmp/flow-app-create.response.json
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
- `flow-app create` 的 dry-run 必须展示完整 operation plan:创建表单、发布表单、创建流程壳、绑定 `data.meta.form_template=<published_id>`、保存/发布流程、绑定工作区、回读验证。缺任何关键步骤都不得确认执行。
|
|
45
|
+
- 确认文本不得猜:dry-run JSON 必须包含 `required_confirm`,真实执行时直接复制该值;若确认文本不匹配,必须视为失败,不得把 dry-run JSON 当成功结果。
|
|
46
|
+
- 确认执行必须同时保留 `--response-out` 和 `--evidence-out`:前者保存完整响应、created IDs 和恢复上下文,后者保存给后续配置面复用的 target context。不得只保留 shell 重定向输出。
|
|
47
|
+
- 新建或迁移流程进入 dataset/list/filter/nav 任一后续阶段前,必须先取得 target context evidence:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bpmax-cli config flow-app context --workspace <workspace> --flow <flow_type_or_key_or_name> --evidence-out .codex/tmp/target-context.csv --format json
|
|
51
|
+
bpmax-cli config readback flow-template --id <flow_type> --format json
|
|
52
|
+
bpmax-cli config readback form-template --id <form_template_id> --format json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- 迁移工具只读回收证据统一使用 `bpmax-cli config readback <domain> --id <id> --format json`,不要生成 `bpmax-cli api GET ...` 或按 domain 手写 export/readback 差异。
|
|
56
|
+
- 批量提交或批量回读必须优先使用 batch manifest:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
bpmax-cli config batch submit --manifest .codex/tmp/config-batch.json --continue-on-error --format json
|
|
60
|
+
bpmax-cli config batch readback --manifest .codex/tmp/config-readback-batch.json --continue-on-error --format json
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
- batch manifest 每行必须保留 `domain`、`id`、`payload`(submit 时)、`confirm` 和 `response_out`;失败项要进入最终 summary,不能因为一条失败丢失前面成功项和剩余待处理项。
|
|
64
|
+
- `target_context.evidence_status` 必须是 `verified`,且 `missing_context` 必须为空;否则停止在 target context 修复阶段,不得继续生成 dataset、列表、导航或 E2E 任务。
|
|
65
|
+
- `target-context.csv/json` 是后续迁移 apply-ready evidence:至少包含 `flow_type`、`flow_template_id`、`form_template_id`、`form_template_draft_id`、`workspace_key`、`workspace_readback_hash`。不得让 subagent 重新猜这些 ID。
|
|
45
66
|
- `flow-app create` 的 flow work 必须预置表单驱动发起默认基线:隐藏 `project.name` / `project.brief` / `project.plan_end_time`,启用 `meta.use_template_project_name = true`,并提供非空 `meta.project_name_template`。这是 typed CLI 写入前 gate,不是可选建议。
|
|
46
67
|
- 工作区绑定必须走 `PUT /workspace/workspace_flow` typed adapter,并在 `/workspace/by_key?key=<workspace>` 回读中确认新 `(flow_type, flow_key)` 存在。回读失败时不能宣布创建成功。
|
|
47
68
|
- 若用户选择“完整流程配置”,默认依次评估:
|
|
@@ -125,6 +146,8 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
125
146
|
- 如果用户要求“没有就新建”,计划中必须显式写出:
|
|
126
147
|
- 是否先检索并复用已有表单/流程
|
|
127
148
|
- 若没有可复用对象,是否使用 `flow-app create`
|
|
149
|
+
- 是否会执行 `bpmax-cli config flow-app context --workspace <workspace> --flow <flow> --evidence-out ...`
|
|
150
|
+
- `evidence_status=verified` 后才允许进入 dataset/list/filter/nav 配置
|
|
128
151
|
- 目标工作区绑定是否属于本次 `requested` 或 `required-collateral`
|
|
129
152
|
- 是否需要导航入口;没有明确要求菜单入口时,不默认写 nav-config
|
|
130
153
|
|
|
@@ -170,6 +193,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
170
193
|
- 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
|
|
171
194
|
- 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
|
|
172
195
|
- `flow-app create` 完成后,必须再执行工作区视角的只读验证:
|
|
196
|
+
- `bpmax-cli config flow-app context --workspace <workspace> --flow <flow_type> --evidence-out .codex/tmp/target-context.csv --format json`
|
|
173
197
|
- `bpmax-cli flow list --workspace <workspace> --format json`
|
|
174
198
|
- 结果中应能看到新建流程
|
|
175
199
|
- 打开目标工作区创建页确认表单加载
|
|
@@ -61,6 +61,15 @@ export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
|
61
61
|
- 没有第二次确认,不得执行 `bpmax-cli config flow-template submit --confirm "submit flow-template <id>"`。
|
|
62
62
|
- 最终配置只能通过 typed CLI submit 提交,不能在对话里手写最终请求体直接发接口;旧 `scripts/submit_flow_template.py` 只作结构参考,默认会硬失败。
|
|
63
63
|
- 主流程 `flow_type` 必须来自平台 `POST /flow/flow_type` 返回值或已有远端对象回读,格式应为 `flow<number>`;不得把业务 key、测试 marker、语义名拼成 `flow_type`。语义标识只能放在 `data.meta.testMarker`、配置备注、测试 profile 或其它 metadata 中。
|
|
64
|
+
- 迁移、新建流程壳或需要把后续表单/数据集/列表绑定到同一目标流程时,必须先生成 target context evidence,不得让后续任务猜 ID:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bpmax-cli config flow-app context --workspace <workspace> --flow <flow_type_or_key_or_name> --evidence-out .codex/tmp/target-context.csv --format json
|
|
68
|
+
bpmax-cli config readback flow-template --id <flow_type> --format json
|
|
69
|
+
bpmax-cli config readback form-template --id <form_template_id> --format json
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
- `target_context.evidence_status` 必须为 `verified`,且 `missing_context` 为空,才允许继续修改节点表单引用、数据集、列表、详情模板或工作区绑定;上下文证据必须保留 `workspace_readback_hash`。若缺 `form_template_draft_id` 或 `workspace_binding`,先修上下文,不得把本地 UUID、发布态 ID 或旧 dry-run payload 带入后续提交。
|
|
64
73
|
- 对 `beforeNextStepScript` / `step_transform` / `cc_user_by_script` / `meta.*` 脚本字段,禁止整段“重写生成”;必须先脚本抽取到独立 `.js` 文件后做局部修改。
|
|
65
74
|
- 脚本抽取、单行化、回填都必须走脚本化步骤;禁止手工在 JSON 里做转义和拼接。
|
|
66
75
|
- 脚本回填前,必须按统一可读模式处理:抽取到 `scripts/<stem>/`,局部修改,再去除换行和多余缩进(保留语义,不做不可读压缩 / 混淆),最后写回 `work/<stem>.json` 对应字段。
|