bpmax-cli 0.2.1-beta.1 → 0.2.1-beta.2
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 +559 -216
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +1 -0
- package/skills/bpmax-approval-matrix/SKILL.md +4 -1
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +6 -3
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +15 -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.
|
|
@@ -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
|
|
|
@@ -38,10 +38,21 @@ 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
|
+
- 确认执行必须同时保留 `--response-out` 和 `--evidence-out`:前者保存完整响应、created IDs 和恢复上下文,后者保存给后续配置面复用的 target context。不得只保留 shell 重定向输出。
|
|
46
|
+
- 新建或迁移流程进入 dataset/list/filter/nav 任一后续阶段前,必须先取得 target context evidence:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bpmax-cli config flow-app context --workspace <workspace> --flow <flow_type_or_key_or_name> --evidence-out .codex/tmp/target-context.csv --format json
|
|
50
|
+
bpmax-cli config readback flow-template --id <flow_type> --format json
|
|
51
|
+
bpmax-cli config readback form-template --id <form_template_id> --format json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- `target_context.evidence_status` 必须是 `verified`,且 `missing_context` 必须为空;否则停止在 target context 修复阶段,不得继续生成 dataset、列表、导航或 E2E 任务。
|
|
55
|
+
- `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
56
|
- `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
57
|
- 工作区绑定必须走 `PUT /workspace/workspace_flow` typed adapter,并在 `/workspace/by_key?key=<workspace>` 回读中确认新 `(flow_type, flow_key)` 存在。回读失败时不能宣布创建成功。
|
|
47
58
|
- 若用户选择“完整流程配置”,默认依次评估:
|
|
@@ -125,6 +136,8 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
125
136
|
- 如果用户要求“没有就新建”,计划中必须显式写出:
|
|
126
137
|
- 是否先检索并复用已有表单/流程
|
|
127
138
|
- 若没有可复用对象,是否使用 `flow-app create`
|
|
139
|
+
- 是否会执行 `bpmax-cli config flow-app context --workspace <workspace> --flow <flow> --evidence-out ...`
|
|
140
|
+
- `evidence_status=verified` 后才允许进入 dataset/list/filter/nav 配置
|
|
128
141
|
- 目标工作区绑定是否属于本次 `requested` 或 `required-collateral`
|
|
129
142
|
- 是否需要导航入口;没有明确要求菜单入口时,不默认写 nav-config
|
|
130
143
|
|
|
@@ -170,6 +183,7 @@ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
|
|
|
170
183
|
- 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
|
|
171
184
|
- 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
|
|
172
185
|
- `flow-app create` 完成后,必须再执行工作区视角的只读验证:
|
|
186
|
+
- `bpmax-cli config flow-app context --workspace <workspace> --flow <flow_type> --evidence-out .codex/tmp/target-context.csv --format json`
|
|
173
187
|
- `bpmax-cli flow list --workspace <workspace> --format json`
|
|
174
188
|
- 结果中应能看到新建流程
|
|
175
189
|
- 打开目标工作区创建页确认表单加载
|
|
@@ -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` 对应字段。
|