bpmax-cli 0.2.1-beta.4 → 0.2.1-beta.41
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 +13 -5
- package/dist/bin.js +18658 -8166
- package/dist/bin.js.map +1 -1
- package/package.json +7 -4
- package/scripts/run-source-cli.mjs +121 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +1 -0
- package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
- package/skills/bpmax-approval-matrix/SKILL.md +54 -2
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +87 -0
- package/skills/bpmax-blueprint-doc-workflow/agents/openai.yaml +4 -0
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +60 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +98 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-forbidden-term.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-mermaid-codeblock.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-boundary.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-whiteboard.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +55 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +257 -0
- package/skills/bpmax-bug-reporting/SKILL.md +72 -0
- package/skills/bpmax-builder-shared/SKILL.md +1 -0
- package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
- package/skills/bpmax-cli/SKILL.md +42 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +112 -523
- package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +127 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +116 -778
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +15 -4
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +139 -533
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +150 -9
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +6 -5
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +570 -0
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
- package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
- package/skills/bpmax-flow-detail-template-editor/SKILL.md +43 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +117 -1084
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
- package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1157 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +8 -2
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
- package/skills/bpmax-form-template-editor/SKILL.md +130 -1104
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +164 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
- package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1109 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
- package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
- package/skills/bpmax-functional-test-design/SKILL.md +80 -0
- package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
- package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
- package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
- package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
- package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
- package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
- package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
- package/skills/bpmax-group-model-editor/SKILL.md +24 -0
- package/skills/bpmax-list-template-editor/SKILL.md +119 -466
- package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +458 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
- package/skills/bpmax-memory-protocol/SKILL.md +7 -6
- package/skills/bpmax-nav-config-editor/SKILL.md +13 -17
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
- package/skills/bpmax-plugin-config/SKILL.md +20 -4
- package/skills/bpmax-project/SKILL.md +37 -1
- package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-role-editor/SKILL.md +7 -30
- package/skills/bpmax-shared/SKILL.md +19 -9
- package/skills/bpmax-team-editor/SKILL.md +27 -0
- package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
- package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
- package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
- package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
- package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
- package/skills/bpmax-user/SKILL.md +33 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +20 -48
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +1 -1
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
|
@@ -1,478 +1,131 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bpmax-list-template-editor"
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于通过 bpmax-cli typed config 创建或编辑 BPMAX 项目列表模板。只要用户提到“新建列表模板”“编辑项目列表模板”“按需求改 BPMAX 列表列”“确认列表模板配置”“让 Codex 根据需求构造列表模板配置”或等价表达,就应使用这个 skill。它要求 Codex 先通过 typed CLI 和真实线上接口确认数据格式,再把模板导出到本地临时文件,走 work 文件修改、第一次确认、submit 文件构建、强制 lint、第二次确认、typed CLI 提交和接口回读的配置闭环。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BPMAX List Template Editor
|
|
7
7
|
|
|
8
8
|
## 写入路径硬约束
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
- 只有用户明确要求的 `requested
|
|
9
|
+
- 执行前必须运行 `bpmax-cli config adapters --format json` 核对 `list-template`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许 build/submit。
|
|
10
|
+
- 真实远端写入只能走 `bpmax-cli config list-template build/submit/create/delete/verify` typed adapter;不得用旧 `scripts/*.py`、raw API、页面 fetch、组件实例保存、终端 curl 或直接编辑 `think_*` 完成配置修改。
|
|
11
|
+
- `think_*` 本地镜像只允许做候选检索和结构参考;线上事实以 typed CLI export/readback/verify 和真实接口回读为准。
|
|
12
|
+
- 不读取或复用浏览器 Cookie、浏览器存储、手工请求头或旧脚本环境变量;不得打印、保存、提交、写入 issue/memory/log/artifact。
|
|
13
|
+
- `submit` 默认 dry-run 不算完成;真实提交必须使用精确 `--confirm "submit list-template <id>"`,并通过 base_hash/readback/verify。
|
|
14
|
+
|
|
15
|
+
## 范围门禁
|
|
16
|
+
- 所有改动先归类为 `requested`、`required-collateral`、`out-of-scope`。
|
|
17
|
+
- 只有用户明确要求的 `requested`,或闭合需求不可避免的 `required-collateral`,才允许进入 work/submit/payload。
|
|
18
18
|
- `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
|
|
19
|
-
-
|
|
19
|
+
- 不得以历史脏配置、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
20
20
|
|
|
21
21
|
## 何时使用
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- 用户要让 Codex
|
|
26
|
-
|
|
27
|
-
##
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
### 1. 识别当前模式
|
|
122
|
-
- 读取当前页 URL。
|
|
123
|
-
- 如果 URL 以 `/project_detail_table/create` 结尾,按“新建”流程处理。
|
|
124
|
-
- 如果 URL 形如 `/project_detail_table/<id>`,按“编辑”流程处理。
|
|
125
|
-
- 如果 URL 已带 `flow_type`、`flow_key`、`_rad`、`flowKey` 查询参数,默认保留整条 URL 继续工作;不要自行归一化成裸路径。
|
|
126
|
-
- 进入列配置构造前,先按流程、模板和目标列语义检索一次 Mem0。
|
|
127
|
-
|
|
128
|
-
### 2. 获取授权上下文
|
|
129
|
-
- 先在浏览器里确认当前页面登录态,再把终端脚本需要的鉴权信息取出来。
|
|
130
|
-
- 优先提取:
|
|
131
|
-
- `document.cookie`
|
|
132
|
-
- 当前页面最近一次同域接口请求头
|
|
133
|
-
- 必要时补看 `localStorage` / `sessionStorage`
|
|
134
|
-
- 默认把 Cookie 组装成 `BPMAX_COOKIE_HEADER` 供脚本使用:
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
138
|
-
export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
|
|
139
|
-
export BPMAX_WORKSPACE='store_mgr'
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
- `BPMAX_BASE_URL` 固定取当前浏览器页面 origin,或最近一次同域接口请求的 origin;不要把某个测试环境 URL 当成 skill 默认值。
|
|
143
|
-
|
|
144
|
-
- 当前已确认:
|
|
145
|
-
- `GET /api/flow_page_template/:id` 可直接读取详情
|
|
146
|
-
- `/bpmax/data-set` 是真实可用的数据集读取路径
|
|
147
|
-
- `/api/bpmax/data-set` 在当前同域上下文里会返回 403,不能作为默认事实来源
|
|
148
|
-
|
|
149
|
-
### 3. 先用真实线上接口确认详情结构
|
|
150
|
-
- 编辑已有模板时,第一事实来源固定为:
|
|
151
|
-
- `GET /api/flow_page_template/:id`
|
|
152
|
-
- 新建模板时,必须先找到一个可复用模板或已验证样例,再用:
|
|
153
|
-
- `GET /api/flow_page_template/:sampleId`
|
|
154
|
-
- 把它当作 create skeleton 的真实格式样本
|
|
155
|
-
- 当前环境至少要确认这些顶层字段:
|
|
156
|
-
- `name`
|
|
157
|
-
- `desc`
|
|
158
|
-
- `data_set_id`
|
|
159
|
-
- `flow_type`
|
|
160
|
-
- `flow_key`
|
|
161
|
-
- `type`
|
|
162
|
-
- `content`
|
|
163
|
-
- `status`
|
|
164
|
-
- `content` 展开后至少包含:
|
|
165
|
-
- `level`
|
|
166
|
-
- `config`
|
|
167
|
-
- 只要线上接口返回与本地镜像冲突,一律以线上接口为准。
|
|
168
|
-
|
|
169
|
-
### 3.1 检索候选模板
|
|
170
|
-
- 如果当前症状是“项目列表页显示暂无项目”,在新建或编辑模板前先确认该流程是否已有默认列表模板:
|
|
171
|
-
- 流程镜像中看 `flow.data.meta.table_list_template`
|
|
172
|
-
- 线上看 `GET /api/flow_page_template?flow_type=<flow_type>&type=1`
|
|
173
|
-
- 没有默认列表模板时,先把它视为根因候选;不要跳过这一步直接排查数据集
|
|
174
|
-
- 只要需求涉及“新建列表模板”“给流程配一套列表列”“参考已有列表模板改一个版本”,先在当前已激活配置仓库检索 `think_flow_page_template`。
|
|
175
|
-
- 检索方式优先:
|
|
176
|
-
- 模板名称
|
|
177
|
-
- 流程 `flow_type`
|
|
178
|
-
- 数据集相关关键词
|
|
179
|
-
- 列标题关键词
|
|
180
|
-
- 在没有得到用户确认前,不要直接新建一个语义重复的新列表模板。
|
|
181
|
-
|
|
182
|
-
### 3.2 导出到本地临时文件
|
|
183
|
-
- 锁定目标模板后,默认先导出到 `.codex/tmp/list-template-editor/`,不要直接在对话里手拼 payload。
|
|
184
|
-
- 编辑已有模板:
|
|
185
|
-
|
|
186
|
-
```bash
|
|
187
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
188
|
-
PYTHON_BIN=./venv/bin/python
|
|
189
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
|
|
190
|
-
[[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python
|
|
191
|
-
|
|
192
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/export_list_template.py \
|
|
193
|
-
--template-id 954573650 \
|
|
194
|
-
--workspace store_mgr \
|
|
195
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
- 基于线上样例创建 skeleton:
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
202
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/export_list_template.py \
|
|
203
|
-
--create-skeleton \
|
|
204
|
-
--sample-template-id 954573650 \
|
|
205
|
-
--workspace store_mgr \
|
|
206
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
- 如果当前任务涉及数据集字段映射或切换数据集,还必须取实时数据集列表:
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
export BPMAX_BASE_URL='https://<your-bpmax-host>'
|
|
213
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/fetch_data_set.py \
|
|
214
|
-
--stem 954573650 \
|
|
215
|
-
--flow-type flow441098230 \
|
|
216
|
-
--flow-key '' \
|
|
217
|
-
--workspace store_mgr \
|
|
218
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### 3.3 本地 work 文件结构
|
|
222
|
-
- `work/<stem>.json` 是唯一允许人工修改的主文件,结构固定为:
|
|
223
|
-
- `id`
|
|
224
|
-
- `mode`
|
|
225
|
-
- `sampleTemplateId`
|
|
226
|
-
- `basic`
|
|
227
|
-
- `content`
|
|
228
|
-
- `meta`
|
|
229
|
-
- `basic` 保存顶层业务字段:
|
|
230
|
-
- `name`
|
|
231
|
-
- `desc`
|
|
232
|
-
- `data_set_id`
|
|
233
|
-
- `flow_type`
|
|
234
|
-
- `flow_key`
|
|
235
|
-
- `type`
|
|
236
|
-
- `status`
|
|
237
|
-
- `content` 保存对象态的:
|
|
238
|
-
- `level`
|
|
239
|
-
- `config`
|
|
240
|
-
- `meta` 至少保留:
|
|
241
|
-
- `previousDataSetId`
|
|
242
|
-
- `sourceTemplateId`
|
|
243
|
-
- `riskHints`
|
|
244
|
-
- 用户只改对象态结构,不直接手写字符串化 `content`。
|
|
245
|
-
|
|
246
|
-
### 3.4 第一次确认
|
|
247
|
-
- 修改 `work/<stem>.json` 后,先向用户展示 `diffs/<stem>.work.diff.txt` 的关键差异。
|
|
248
|
-
- 明确询问“work 文件是否正确”。
|
|
249
|
-
- 用户确认后,记录 work 确认状态:
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/confirm_list_template.py \
|
|
253
|
-
--stem 954573650 \
|
|
254
|
-
--stage work \
|
|
255
|
-
--actor codex
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
- 没有明确确认前,不得构建 submit 文件。
|
|
259
|
-
|
|
260
|
-
### 4. 构造 submit 文件
|
|
261
|
-
- `submit/<stem>.json` 只能通过脚本从 `work/<stem>.json` 构建,不能手写。
|
|
262
|
-
- 默认命令:
|
|
263
|
-
|
|
264
|
-
```bash
|
|
265
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/build_submit_payload.py \
|
|
266
|
-
--stem 954573650
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
- 构建规则固定为:
|
|
270
|
-
- 顶层只保留真实需要的提交字段:`name/desc/data_set_id/flow_type/flow_key/type/content`
|
|
271
|
-
- `create` 模式额外补 `status`
|
|
272
|
-
- `content` 必须由脚本统一转成 `JSON.stringify({ level, config })`
|
|
273
|
-
- `content.config` 必须仍是数组
|
|
274
|
-
|
|
275
|
-
### 5. 强制 lint 门禁
|
|
276
|
-
- 在第二次确认和正式提交前,必须先跑 lint:
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py \
|
|
280
|
-
--stem 954573650 \
|
|
281
|
-
--workspace store_mgr \
|
|
282
|
-
--cookie-header "$BPMAX_COOKIE_HEADER"
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
- lint 结果分两层,但都属于严格阻断:
|
|
286
|
-
- `errors`
|
|
287
|
-
- `style_errors`
|
|
288
|
-
- 命中以下任一问题就禁止继续:
|
|
289
|
-
- `content` 不是对象态,或 `config` 不是数组
|
|
290
|
-
- 列对象存在未允许字段,或混入表单模板字段
|
|
291
|
-
- `createElement.children.$template` / `eval` 结构非法
|
|
292
|
-
- 操作列在列根配置了 `icon` / `iconColor`
|
|
293
|
-
- 操作列任一按钮未配置按钮级 icon
|
|
294
|
-
- 操作列缺少“详情/查看”或“删除/移除”动作
|
|
295
|
-
- 删除/移除动作没有基于项目状态、当前环节或步骤状态的可用性 guard;默认只允许刚创建、未推进到第一个节点后的项目删除,过了第一个节点就不能删除
|
|
296
|
-
- `icon` 不是完整 `ri ri_*`
|
|
297
|
-
- 普通数据列带 `icon` 的列数少于 1 列或多于 3 列
|
|
298
|
-
- `iconColor` 不符合规范
|
|
299
|
-
- 涉及到人的列未渲染头像
|
|
300
|
-
- 长文本列未配 `showOverflowTooltip`
|
|
301
|
-
- 固定宽度只写了 `width` 或只写了 `minWidth`
|
|
302
|
-
- 日期字段没有按 `YYYY-MM-DD` 规范处理
|
|
303
|
-
- HTML 字符串 badge 未使用已验证组件/结构
|
|
304
|
-
- `data_set_id` 不存在于实时数据集列表
|
|
305
|
-
- 模板里引用了当前数据集不存在的字段 key
|
|
306
|
-
- 切换 `data_set_id` 后保留了失效字段引用
|
|
307
|
-
- 已知限制:
|
|
308
|
-
- 这套 lint 目前按“当前 `data_set_id` 的字段集合”做静态校验。
|
|
309
|
-
- “人的列必须有头像”当前按列标题关键词和渲染结构做启发式识别,例如:`负责人` / `申请人` / `发起人` / `创建人` / `审批人` / `处理人` / `人员`。
|
|
310
|
-
- 如果列表模板实际运行在 `project/sub`、详情页子流程表格、或其他非纯 ES dataset 返回结构上,运行态可能还会额外提供 `metaForm`、`current_step` 等对象;这类引用在页面上可能可用,但 lint 仍可能报“字段不存在”。
|
|
311
|
-
- 遇到这类报错时,不要先假设模板写法错了,先确认当前列表真实数据源到底是 ES 列表还是 `project/sub`。
|
|
312
|
-
|
|
313
|
-
### 6. 第二次确认
|
|
314
|
-
- lint 通过后,向用户展示 `submit/<stem>.json` 摘要和 `diffs/<stem>.submit.diff.txt`,再次明确询问“submit 文件是否正确”。
|
|
315
|
-
- 用户确认后,再记录 submit 确认状态:
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/confirm_list_template.py \
|
|
319
|
-
--stem 954573650 \
|
|
320
|
-
--stage submit \
|
|
321
|
-
--actor codex
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
- 没有 lint 通过或没有第二次明确确认前,不得执行提交脚本。
|
|
325
|
-
|
|
326
|
-
### 7. Typed CLI 提交与接口回读
|
|
327
|
-
- 正式提交统一走:
|
|
328
|
-
|
|
329
|
-
```bash
|
|
330
|
-
bpmax-cli config list-template submit \
|
|
331
|
-
--id 954573650 \
|
|
332
|
-
--payload .codex/tmp/list-template-editor/submit/list-template-954573650.json \
|
|
333
|
-
--confirm "submit list-template 954573650"
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
- 旧 `submit_list_template.py` 只保留为结构参考,默认会硬失败。
|
|
337
|
-
- 不得直接调用 `POST/PUT /api/flow_page_template`。
|
|
338
|
-
- 提交后脚本必须自动生成:
|
|
339
|
-
- `result/<stem>.response.json`
|
|
340
|
-
- `result/<stem>.readback.json`
|
|
341
|
-
- `result/<stem>.readback.diff.txt`
|
|
342
|
-
- `result/<stem>.verify.json`
|
|
343
|
-
- `result/<stem>.acceptance.json`
|
|
344
|
-
- 回读验收至少检查:
|
|
345
|
-
- 顶层字段:`name/desc/data_set_id/flow_type/flow_key/type`
|
|
346
|
-
- `content.level`
|
|
347
|
-
- `content.config[]`
|
|
348
|
-
- 列标题顺序
|
|
349
|
-
- 若 `readback` 不一致,或涉及 `data_set_id` 切换、已知 false positive 场景,必须追加页面运行时复核,不能直接宣布完成。
|
|
350
|
-
- 如果列表模板被别的模板通过 `template_id` 引用,提交后还要回到引用方页面确认引用 ID 是否已经切到这次实际生效的新模板 ID。
|
|
351
|
-
|
|
352
|
-
### 8. 刷新浏览器编辑页验收
|
|
353
|
-
- 提交成功后,必须刷新对应编辑页,让用户做最终确认。
|
|
354
|
-
- 编辑:
|
|
355
|
-
- 刷新当前 `/w:<workspace>/project_detail_table/<id>`
|
|
356
|
-
- 新建:
|
|
357
|
-
- 用返回的新 `id` 打开 `/w:<workspace>/project_detail_table/<newId>`
|
|
358
|
-
- 编辑页验收口径:
|
|
359
|
-
- 新字段或新列标题已出现
|
|
360
|
-
- 目标列顺序符合预期
|
|
361
|
-
- 数据集绑定修改已回填到页面
|
|
362
|
-
- 验收后记录:
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/record_acceptance.py \
|
|
366
|
-
--stem 954573650 \
|
|
367
|
-
--editor-page-accepted
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
### 9. 高风险自动列表页验收
|
|
371
|
-
- 命中高风险条件时,必须继续打开真实列表页:
|
|
372
|
-
- `/w:<workspace>/project?flow_type=<flow_type>&flow_key=<flow_key>`
|
|
373
|
-
- 至少检查:
|
|
374
|
-
- 目标列是否真实出现在列表页
|
|
375
|
-
- 图标、头像、badge、单行溢出、列宽是否符合预期
|
|
376
|
-
- 控制台是否出现模板引入的 `eval fn parsed failed`、`TypeError` 等错误
|
|
377
|
-
- 数据集切换后列表是否仍正常渲染
|
|
378
|
-
- 验收后记录:
|
|
379
|
-
|
|
380
|
-
```bash
|
|
381
|
-
"$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/record_acceptance.py \
|
|
382
|
-
--stem 954573650 \
|
|
383
|
-
--list-page-accepted
|
|
384
|
-
```
|
|
385
|
-
- 高风险验收未通过时,skill 不允许宣告完成。
|
|
386
|
-
|
|
387
|
-
## 列对象与结构约束
|
|
388
|
-
- 每个列对象至少可能包含:
|
|
389
|
-
- `title`
|
|
390
|
-
- `props`
|
|
391
|
-
- `createElement`
|
|
392
|
-
- `icon`
|
|
393
|
-
- `iconColor`
|
|
394
|
-
- `isSort`
|
|
395
|
-
- `sortConf`
|
|
396
|
-
- `preset`
|
|
397
|
-
- 如果需求是“把某个数据集字段加成一列”,优先按前端 `FieldSelector` 的结构生成:
|
|
398
|
-
- `title` 使用字段名
|
|
399
|
-
- `createElement.children.$template` 使用 `ctx.<dataSetFieldKey>`
|
|
400
|
-
- `createElement.children.eval = true`
|
|
401
|
-
- 图标规则:
|
|
402
|
-
- 操作列列根不要配置 `icon` / `iconColor`
|
|
403
|
-
- 操作列的每个操作按钮前面都要带 icon
|
|
404
|
-
- 操作列必须包含详情/查看动作和删除/移除动作
|
|
405
|
-
- 删除/移除动作必须有条件 guard,依据项目状态、当前环节或步骤状态控制是否可用;默认语义是“刚创建/未推进可以删除,过了第一个节点不可删除”
|
|
406
|
-
- 普通数据列至少 1 列带 icon,最多 3 列带 icon
|
|
407
|
-
- 列表列 icon 和操作按钮 icon 都必须写完整 class:`ri ri_*`
|
|
408
|
-
- 默认优先统一浅灰色:`#D6DCE5`
|
|
409
|
-
- 人员列规则:
|
|
410
|
-
- 涉及到人的列必须渲染头像,不允许只显示姓名文本
|
|
411
|
-
- 默认优先使用 `el-avatar + span` 的“头像 + 名称”结构
|
|
412
|
-
- 多人列也必须带头像,至少要有稳定的头像渲染节点,而不是纯 `name.join(',')`
|
|
413
|
-
- 空值兜底:
|
|
414
|
-
- 简单字段列推荐写法:`ctx.xxx || '--'`
|
|
415
|
-
- 日期字段默认只显示 `YYYY-MM-DD`
|
|
416
|
-
- 长文本列优先加 `showOverflowTooltip: true`
|
|
417
|
-
- 列宽规则:
|
|
418
|
-
- 用户明确要求固定宽度时,默认同时写 `props.width` 和 `props.minWidth`
|
|
419
|
-
- 不要把表单模板概念混进列表模板:
|
|
420
|
-
- 不使用 `rule`
|
|
421
|
-
- 不使用 `value`
|
|
422
|
-
- 不使用 `field_type`
|
|
423
|
-
- 不使用 `publish`
|
|
22
|
+
- 用户需要通过 bpmax-cli typed config 创建、编辑、复制、删除或验证 BPMAX 列表模板。
|
|
23
|
+
- 用户要按自然语言需求新增、删除、排序或调整列表列、操作列、图标列、人员列、badge、图片预览列。
|
|
24
|
+
- 用户反馈“项目列表没数据 / 暂无项目 / 列不显示 / 操作列不可用”,需要确认默认列表模板、数据集字段映射和运行态列表页。
|
|
25
|
+
- 用户要让 Codex 完成配置提交,再用接口回读和真实用户身份的只读列表页核对结果。
|
|
26
|
+
|
|
27
|
+
## 标准闭环
|
|
28
|
+
1. 读取 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md):检索 `flow_type`、`flow_key`、模板 id/名称、关键列名、数据集字段、图标、操作列关键词。
|
|
29
|
+
2. 确认 CLI 上下文:`bpmax-cli config adapters --format json`、profile、capability、目标模板 id 或 create/copy/delete 模式。
|
|
30
|
+
3. 导出线上最新:
|
|
31
|
+
```bash
|
|
32
|
+
bpmax-cli config list-template export --id <id> --out .codex/tmp/list-template-editor --profile <profile> --format json
|
|
33
|
+
```
|
|
34
|
+
4. 若涉及字段映射或切换数据集,先导出当前数据集/字段并逐列对齐“列表列 -> 表单字段 -> 数据集字段”。
|
|
35
|
+
5. 只修改 `work/<file>.json`;用户确认 work diff 前不得 build submit。
|
|
36
|
+
6. 运行 typed CLI lint/impact/build:
|
|
37
|
+
```bash
|
|
38
|
+
bpmax-cli config list-template lint --work .codex/tmp/list-template-editor/work/<file>.json --profile <profile> --format json
|
|
39
|
+
bpmax-cli config list-template impact --raw .codex/tmp/list-template-editor/raw/<file>.json --work .codex/tmp/list-template-editor/work/<file>.json --out .codex/tmp/list-template-editor/result/<file>.impact.json --profile <profile> --format json
|
|
40
|
+
bpmax-cli config list-template build --work .codex/tmp/list-template-editor/work/<file>.json --meta .codex/tmp/list-template-editor/meta/<file>.meta.json --out .codex/tmp/list-template-editor/submit/<file>.json --profile <profile> --format json
|
|
41
|
+
```
|
|
42
|
+
列字段、读取 key、`data_set_id`、格式化/操作脚本或模板绑定变化时,必须检查数据集、筛选器、导航和 E2E 引用;未确认的联动项不得 build。
|
|
43
|
+
7. 展示 work diff、submit diff、lint 摘要、字段映射摘要和高风险验收计划;用户二次确认 submit 后才能提交。
|
|
44
|
+
8. typed CLI submit/create/delete:
|
|
45
|
+
```bash
|
|
46
|
+
bpmax-cli config list-template submit --id <id> --payload .codex/tmp/list-template-editor/submit/<file>.json --profile <profile> --confirm "submit list-template <id>" --format json
|
|
47
|
+
bpmax-cli config list-template submit --id create:list-template --payload .codex/tmp/list-template-editor/submit/<create-file>.json --profile <profile> --confirm "submit list-template create:list-template" --format json
|
|
48
|
+
bpmax-cli config list-template delete --id <id> --profile <profile> --confirm "delete list-template <id>" --format json
|
|
49
|
+
```
|
|
50
|
+
9. 提交后必须 `verify/readback`,确认顶层字段、`content.level`、`content.config[]`、列标题顺序、关键 `$template` 和数据集字段引用一致。
|
|
51
|
+
10. 高风险改动必须以真实用户身份打开运行态列表页,只读验证目标列、操作按钮、图标/头像/badge/图片预览、筛选和 console/network 错误;不得把接口提交伪装成页面回归。
|
|
52
|
+
|
|
53
|
+
## 核心配置门禁
|
|
54
|
+
- 列表模板是 `flow_page_template.type = 1`,主体是 `content: JSON.stringify({ level, config })`;不是表单模板,不使用 `rule/value/field_type/publish`。
|
|
55
|
+
- 当项目列表为空时,先查流程 `meta.table_list_template` 和 `GET /api/flow_page_template?flow_type=<flow_type>&type=1`,不要直接归因到 ES 数据为空。
|
|
56
|
+
- 列表模板 `data_set_id` 必须指向当前流程实际发布并可刷新的数据集;切换数据集后必须重新检查所有字段 key。
|
|
57
|
+
- 列表模板验收必须核对“列表列 -> 表单字段 -> 数据集字段”的一致性。
|
|
58
|
+
- 每一列都要记录:列名、读取 key 或脚本来源、对应表单/数据集字段、业务语义、是否需要运行态验收;不能只抽查。
|
|
59
|
+
- 逐列检查是强要求;新增、删除、移动、重命名或改脚本列时,都要说明该列为什么属于 `requested` 或 `required-collateral`。
|
|
60
|
+
- 查询脚本不得把 `data_set_id` 当 ES dataset 查询入口;使用 `raw-es-search` / `ctx.$esQuery(...)` 时必须用 `data_set_key` 或已验证 helper。
|
|
61
|
+
- 默认禁止 `/bpmax/project/list`、用户态 `ESProjectList`、大批 ES 数据前端 `find/filter/some`、逐条循环里查 ES 或 SQL join;确需用户可见项目列表时必须写明 `bpmax-allow-user-scope-project-list: <reason>`。
|
|
62
|
+
|
|
63
|
+
## 本地文件与状态机
|
|
64
|
+
- 所有临时产物固定写到 `.codex/tmp/list-template-editor/`,包括 `raw/`、`work/`、`meta/`、`submit/`、`diffs/`、`result/`。
|
|
65
|
+
- `work/<file>.json` 是唯一允许人工修改的主文件;`submit/<file>.json` 只能由 typed CLI build 生成。
|
|
66
|
+
- `exported`:只允许分析和编辑 work,不允许 build。
|
|
67
|
+
- `work_confirmed`:用户已确认 work diff,允许 build。
|
|
68
|
+
- `submit_built`:submit 已生成,必须先 lint。
|
|
69
|
+
- `lint_passed`:允许展示 submit diff 并请求第二次确认。
|
|
70
|
+
- `submit_confirmed`:允许 typed CLI submit/create/delete。
|
|
71
|
+
- `submitted`:必须继续 verify/readback;命中高风险条件时继续真实列表页验收。
|
|
72
|
+
- 任意 work/submit 变化都会让旧确认、旧 lint、旧验收失效。
|
|
73
|
+
|
|
74
|
+
## Lint 阻断项
|
|
75
|
+
- `content` 不是对象态,或 `content.config` 不是数组。
|
|
76
|
+
- 列对象混入表单模板字段,或 `createElement.children.$template` / `eval` 结构非法。
|
|
77
|
+
- 操作列缺详情/查看动作、缺删除/移除动作、删除动作无权限 guard、按钮缺 icon、列根误配 `icon/iconColor`。
|
|
78
|
+
- 删除 guard 使用 `current_flow_step_id/name` 为空作为前置条件,或 `disabled` 权限极性写反。
|
|
79
|
+
- `icon` 不是完整 `ri ri_*`,普通图标列数量少于 1 或多于 3。
|
|
80
|
+
- 人员列没有头像,长文本固定列没有溢出提示,或所有数据列都写死 `width`、没有至少一个自适应列。
|
|
81
|
+
- 日期字段没有按 `YYYY-MM-DD` 处理,HTML badge 未使用已验证组件/结构。
|
|
82
|
+
- `data_set_id` 不存在于实时数据集列表,或模板引用当前数据集不存在的字段 key。
|
|
83
|
+
- 切换 `data_set_id` 后仍保留旧字段引用。
|
|
84
|
+
- 查询脚本命中 `data_set_id` ES 入口、project/list、N+1、前端大批量过滤或 SQL join 反模式。
|
|
85
|
+
|
|
86
|
+
## 验收分级
|
|
87
|
+
- 低风险改动至少需要 `readbackAccepted` 和 `editorPageAccepted`。
|
|
88
|
+
- 高风险改动至少需要 `readbackAccepted`、`editorPageAccepted`、`listPageAccepted`。
|
|
89
|
+
- 高风险触发条件包括:脚本列、badge/状态标签、icon/头像/颜色/单行溢出/列宽、操作列按钮、图片预览列、`data_set_id` 切换。
|
|
90
|
+
- 编辑页只做只读回显确认:新字段或新列标题已出现、目标列顺序符合预期、数据集绑定已回填。
|
|
91
|
+
- 运行态列表页必须证明目标列真实渲染、操作列可进入详情;有 `project.delete` 权限的管理员或有 `project.delete.my` 且为创建人的用户可见并能真实删除,无权限用户不可删除;筛选条件不引用已删除字段。
|
|
92
|
+
- 如果接口 readback 成功但页面不一致,按页面运行态缺陷继续排查,不能只看 200 或 hash 宣告完成。
|
|
93
|
+
|
|
94
|
+
## 操作列与视觉 lint
|
|
95
|
+
- 操作列必须包含详情/查看动作和删除/移除动作。
|
|
96
|
+
- 删除/移除动作必须有权限 guard,首选 `if: { $template: "{return ctx.$CAN_DELETE}", eval: true }`;`$CAN_DELETE` 已封装 `project.delete`,以及 `project.delete.my + 当前用户是创建人` 的平台权限语义。
|
|
97
|
+
- 必须显式展开等价权限时,列表创建人字段只使用平台实际传入的 `ctx.__owner_id`,并与 `ctx.$USER_INFO.id` 比较;不得改用列表上下文不保证存在的 `project.owner.id` 或 `__project_owner.id`。
|
|
98
|
+
- 若使用 `disabled`,必须反向写成 `return !ctx.$CAN_DELETE`;不得把 `confirm`、`onClick` 或事件脚本当成权限 guard。
|
|
99
|
+
- 项目状态可以作为额外业务限制,但不能替代权限 guard;禁止要求 `current_flow_step_id/name` 为空,创建即进入首节点的流程会使该条件恒为 false。
|
|
100
|
+
- 操作列列根不得配置 `icon` / `iconColor`;每个操作按钮必须带按钮级 icon。
|
|
101
|
+
- icon 必须写完整 class:`ri ri_*`;普通数据列至少 1 列、最多 3 列带 icon。
|
|
102
|
+
- 人员列必须渲染头像,优先 `el-avatar + span`;只显示姓名文本不合格。
|
|
103
|
+
- 至少一个非操作数据列必须自适应:不写 `props.width`,可用 `props.minWidth` 保证最低可读宽度;操作/选择/序号列不计入自适应列。
|
|
104
|
+
- 固定数据列可只写 `width`;需要同时约束下限时再写 `minWidth`,并保证 `minWidth <= width`。标题必须能在列宽内完整展示,禁止 `auto`、百分比、非正数等不可验证宽度。
|
|
105
|
+
- 备注、描述、内容、原因、意见、地址、标题等长文本列使用固定宽度时必须提供完整内容提示;优先 `props.showOverflowTooltip: true`,也接受已验证的 `attribute.title` 或 tooltip/popover;日期默认显示 `YYYY-MM-DD`。
|
|
106
|
+
- HTML badge、复杂脚本列、图标/头像、操作列、图片预览、`data_set_id` 切换都属于高风险,默认进入真实列表页验收。
|
|
107
|
+
|
|
108
|
+
## 必读 Reference 路由
|
|
109
|
+
- 主流程、临时文件状态机和旧经验归档:`references/local-temp-workflow.md`、`references/full-detail-guide.md`。
|
|
110
|
+
- 接口形态和历史请求骨架:`references/list-template-api-workflow.md`,只作契约说明,不是写入路径。
|
|
111
|
+
- `content.config[]` 列对象、操作列、icon/头像/badge 结构:`references/content-config-shape.md`、`references/special-formats.md`。
|
|
112
|
+
- 数据集字段映射和逐列对齐:`references/dataset-field-mapping.md`、`references/payload-checklist.md`。
|
|
113
|
+
- 编辑页/列表页只读验收、运行态诊断:`references/browser-page-contract.md`、`references/runtime-verified-workflow.md`。
|
|
114
|
+
|
|
115
|
+
## 旧脚本边界
|
|
116
|
+
- `scripts/confirm_list_template.py`、`scripts/build_submit_payload.py`、`scripts/lint_list_template_semantics.py` 只作为历史结构/lint 参考。
|
|
117
|
+
- `scripts/submit_list_template.py` 默认硬失败;不得把它描述为可用提交路径。
|
|
118
|
+
- 如果 reference 中出现历史 `POST/PUT /api/flow_page_template`、`vm.$axios`、`fetch` 或页面实例保存写法,只能用于理解契约,不得作为 Agent 执行方案。
|
|
119
|
+
- 新能力和新 lint 必须沉淀到 TypeScript typed CLI 或 tests 中,不新增 Python 写入主路径。
|
|
424
120
|
|
|
425
121
|
## 输出要求
|
|
426
|
-
-
|
|
427
|
-
-
|
|
428
|
-
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
-
|
|
435
|
-
-
|
|
436
|
-
- `work` 是否已确认
|
|
437
|
-
- lint 是否已通过
|
|
438
|
-
- `submit` 是否已确认
|
|
439
|
-
- 接口回读是否通过
|
|
440
|
-
- 浏览器编辑页是否已刷新确认
|
|
441
|
-
- 若命中高风险条件,真实列表页是否已验收
|
|
442
|
-
|
|
443
|
-
## 参考资料
|
|
444
|
-
- 创建/编辑接口与内容结构: [references/list-template-api-workflow.md](./references/list-template-api-workflow.md)
|
|
445
|
-
- `content.config[]` 形态与列对象模型: [references/content-config-shape.md](./references/content-config-shape.md)
|
|
446
|
-
- 提交前的 payload 检查清单: [references/payload-checklist.md](./references/payload-checklist.md)
|
|
447
|
-
- 当前页面与前端实现对应关系: [references/browser-page-contract.md](./references/browser-page-contract.md)
|
|
448
|
-
- 数据集字段映射列的生成规则: [references/dataset-field-mapping.md](./references/dataset-field-mapping.md)
|
|
449
|
-
- 运行时验证过的页面操作方式: [references/runtime-verified-workflow.md](./references/runtime-verified-workflow.md)
|
|
450
|
-
- 当前已确认可用的特殊格式清单: [references/special-formats.md](./references/special-formats.md)
|
|
451
|
-
- 本地临时文件闭环: [references/local-temp-workflow.md](./references/local-temp-workflow.md)
|
|
452
|
-
|
|
453
|
-
## 关键经验
|
|
454
|
-
- 编辑态最终仍要 typed CLI 提交,但对“接口 success、回读不一致”的场景必须提高警惕,不能只看 200。
|
|
455
|
-
- 数据集读取必须走 `/bpmax/data-set`;新增字段列和切换数据集时,实时数据集列表是唯一事实来源。
|
|
456
|
-
- 图标 class 必须完整,不能写成 `ri_file-text-line` 这种半截格式。
|
|
457
|
-
- 操作列列根配置 `icon` / `iconColor` 或任一按钮缺少 icon 都视为 lint 阻断项;普通列按“至少 1 列、最多 3 列”控制 icon 覆盖数量。
|
|
458
|
-
- 涉及到人的列必须带头像,优先复用 `el-avatar + span`;只写姓名文本视为 lint 阻断项。
|
|
459
|
-
- 固定宽度必须同时写 `width` 和 `minWidth`。
|
|
460
|
-
- HTML 字符串 badge、复杂脚本列、图标和操作列都属于高风险改动,默认必须进真实列表页验收。
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
## bpmax-cli 统一执行入口
|
|
464
|
-
|
|
465
|
-
本 npm 分发版必须优先使用 typed CLI 命令,不要让 Agent 直接拼 raw API 或直接运行旧来源脚本提交配置:
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
bpmax-cli config list-template export --id <id> --out .codex/tmp/list-template-editor
|
|
469
|
-
bpmax-cli config list-template lint --work .codex/tmp/list-template-editor/work/<file>.json
|
|
470
|
-
bpmax-cli config list-template build --work .codex/tmp/list-template-editor/work/<file>.json --meta .codex/tmp/list-template-editor/meta/<file>.meta.json --out .codex/tmp/list-template-editor/submit/<file>.json
|
|
471
|
-
bpmax-cli config list-template submit --id <id> --payload .codex/tmp/list-template-editor/submit/<file>.json
|
|
472
|
-
bpmax-cli config list-template submit --id <id> --payload .codex/tmp/list-template-editor/submit/<file>.json --confirm "submit list-template <id>"
|
|
473
|
-
bpmax-cli config list-template verify --id <id> --expect .codex/tmp/list-template-editor/work/<file>.json
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
授权前置:当前 profile 必须通过校对码授权,并在授权页开启“配置能力”。如果 CLI 返回 capability 缺失,停止并让用户使用有管理权限的账号重新授权。
|
|
477
|
-
|
|
478
|
-
旧来源中的 `scripts/` 和 `references/` 只作为字段结构、lint 规则和验收规则参考;真实远端写操作必须走 `bpmax-cli config list-template submit`,保留 dry-run、二次确认、审计和回读验证。
|
|
122
|
+
- 明确本次是 `edit` / `create` / `copy` / `delete` / `preview-only`。
|
|
123
|
+
- 列出 `requested`、`required-collateral`、`out-of-scope` 和目标模板、`data_set_id`、`flow_type`、`flow_key`。
|
|
124
|
+
- 汇报本次用到的 typed CLI 命令:export、lint、impact、build、submit、verify。
|
|
125
|
+
- 汇报 impact 报告中的已检查引用、`required-collateral`、未验证面和下一步建议;统一规则见 `../bpmax-builder-shared/configuration-impact-review.md`。
|
|
126
|
+
- 汇报逐列映射表:列名、模板读取、表单/数据集来源、业务语义、风险级别。
|
|
127
|
+
- 明确 `work` 是否确认、lint 是否通过、`submit` 是否确认、接口回读是否通过、真实列表页是否验收。
|
|
128
|
+
- 如发现 bpmax-cli 自身 lint/submit/readback 行为异常,可按 [$bpmax-cli](../bpmax-cli/SKILL.md) 的 issue 规则记录 CLI 缺陷;不要把客户配置缺陷误报为 CLI issue。
|
|
129
|
+
- 若未提交,只能输出待确认 work/submit 与下一步命令;不得暗示线上配置已经生效。
|
|
130
|
+
- 若用户明确要求重新验收,必须重新打开当前运行态列表页取新证据,不得复用旧截图或旧报告。
|
|
131
|
+
- 若没有完成真实提交或真实页面验收,必须说明当前停在哪个 gate,不能宣告配置完成。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "BPMAX List Template Editor"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $bpmax-list-template-editor
|
|
3
|
+
short_description: "通过 bpmax-cli typed config 创建或编辑 BPMAX 项目列表模板"
|
|
4
|
+
default_prompt: "使用 $bpmax-list-template-editor 通过 bpmax-cli typed config 创建或编辑 BPMAX 项目列表模板,并用回读验证确认结果。"
|