bpmax-cli 0.1.43 → 0.1.44-beta.0

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.
Files changed (251) hide show
  1. package/README.md +3 -3
  2. package/dist/bin.js +3372 -453
  3. package/dist/bin.js.map +1 -1
  4. package/package.json +1 -1
  5. package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
  6. package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
  7. package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
  8. package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
  9. package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
  10. package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
  11. package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
  12. package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
  13. package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
  14. package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
  15. package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
  16. package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
  17. package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
  18. package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
  19. package/skills/bpmax-auth/SKILL.md +6 -17
  20. package/skills/bpmax-builder-shared/SKILL.md +44 -0
  21. package/skills/bpmax-builder-shared/base_url.py +81 -0
  22. package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
  23. package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
  24. package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
  25. package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
  26. package/skills/bpmax-builder-shared/skill_audit.py +374 -0
  27. package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
  28. package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
  29. package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
  30. package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
  31. package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
  32. package/skills/bpmax-cli/SKILL.md +2 -0
  33. package/skills/bpmax-config-latest/SKILL.md +71 -0
  34. package/skills/bpmax-console-template-editor/SKILL.md +536 -0
  35. package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
  36. package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
  37. package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
  38. package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
  39. package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
  40. package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
  41. package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
  42. package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
  43. package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
  44. package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
  45. package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
  46. package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
  47. package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
  48. package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
  49. package/skills/bpmax-dataset-field-template-editor/SKILL.md +600 -0
  50. package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
  51. package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
  52. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
  53. package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
  54. package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
  55. package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
  56. package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
  57. package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
  58. package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
  59. package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
  60. package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
  61. package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
  62. package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
  63. package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
  64. package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
  65. package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
  66. package/skills/bpmax-dataset-template-editor/SKILL.md +779 -0
  67. package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
  68. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
  69. package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
  70. package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
  71. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
  72. package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
  73. package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
  74. package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
  75. package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
  76. package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
  77. package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
  78. package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
  79. package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
  80. package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
  81. package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
  82. package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
  83. package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
  84. package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
  85. package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
  86. package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +151 -0
  87. package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
  88. package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +60 -0
  89. package/skills/bpmax-e2e-flow-test-operator/SKILL.md +371 -0
  90. package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
  91. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
  92. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
  93. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
  94. package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
  95. package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +33 -0
  96. package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
  97. package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
  98. package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +19 -0
  99. package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
  100. package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +107 -0
  101. package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
  102. package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
  103. package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +58 -0
  104. package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
  105. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
  106. package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
  107. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +95 -0
  108. package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
  109. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
  110. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
  111. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
  112. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
  113. package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
  114. package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
  115. package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
  116. package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
  117. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
  118. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
  119. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
  120. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
  121. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
  122. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
  123. package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
  124. package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
  125. package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
  126. package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
  127. package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
  128. package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
  129. package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
  130. package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
  131. package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
  132. package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
  133. package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
  134. package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
  135. package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
  136. package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
  137. package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
  138. package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
  139. package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
  140. package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
  141. package/skills/bpmax-flow-template-editor/SKILL.md +1043 -0
  142. package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
  143. package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
  144. package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
  145. package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
  146. package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
  147. package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +159 -0
  148. package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
  149. package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
  150. package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
  151. package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +163 -0
  152. package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
  153. package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +54 -0
  154. package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
  155. package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
  156. package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
  157. package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
  158. package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
  159. package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +93 -0
  160. package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
  161. package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
  162. package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
  163. package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
  164. package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
  165. package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
  166. package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
  167. package/skills/bpmax-form-template-editor/SKILL.md +1074 -0
  168. package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
  169. package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +193 -0
  170. package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
  171. package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
  172. package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
  173. package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
  174. package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
  175. package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
  176. package/skills/bpmax-form-template-editor/scripts/export_form_template.py +89 -0
  177. package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1745 -0
  178. package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
  179. package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
  180. package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
  181. package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1303 -0
  182. package/skills/bpmax-list-template-editor/SKILL.md +468 -0
  183. package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
  184. package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
  185. package/skills/bpmax-list-template-editor/references/content-config-shape.md +148 -0
  186. package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
  187. package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +103 -0
  188. package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
  189. package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
  190. package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +140 -0
  191. package/skills/bpmax-list-template-editor/references/special-formats.md +394 -0
  192. package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
  193. package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
  194. package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
  195. package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
  196. package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
  197. package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
  198. package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
  199. package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
  200. package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
  201. package/skills/bpmax-nav-config-editor/SKILL.md +347 -0
  202. package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
  203. package/skills/bpmax-nav-config-editor/references/api-workflow.md +68 -0
  204. package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
  205. package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
  206. package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +46 -0
  207. package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
  208. package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
  209. package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
  210. package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
  211. package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
  212. package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
  213. package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
  214. package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
  215. package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
  216. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
  217. package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
  218. package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
  219. package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
  220. package/skills/bpmax-project/SKILL.md +1 -1
  221. package/skills/bpmax-project-detail-template-editor/SKILL.md +329 -0
  222. package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
  223. package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
  224. package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +47 -0
  225. package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
  226. package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
  227. package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
  228. package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
  229. package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
  230. package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
  231. package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
  232. package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
  233. package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
  234. package/skills/bpmax-role-editor/SKILL.md +251 -0
  235. package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
  236. package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
  237. package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
  238. package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
  239. package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
  240. package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
  241. package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
  242. package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
  243. package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
  244. package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
  245. package/skills/bpmax-shared/SKILL.md +1 -1
  246. package/skills/form-control-library/SKILL.md +82 -0
  247. package/skills/form-control-library/agents/openai.yaml +4 -0
  248. package/skills/form-control-library/references/form-controls.md +199 -0
  249. package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
  250. package/skills/form-control-library/references/group-select-runtime.md +191 -0
  251. package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
@@ -0,0 +1,468 @@
1
+ ---
2
+ name: "bpmax-list-template-editor"
3
+ description: "用于在 BPMAX 的项目列表模板页面中创建或编辑列表模板。只要用户提到“新建列表模板”“编辑项目列表模板”“按需求改 BPMAX 列表列”“从浏览器当前列表模板页确认配置”“让 Codex 根据需求构造列表模板配置”或等价表达,就应使用这个 skill。它要求用户先在浏览器打开一个空白列表模板或已有列表模板页面;随后 Codex 先通过真实线上接口确认数据格式,再把模板导出到本地临时文件,走 work 文件修改、第一次确认、submit 文件构建、强制 lint、第二次确认、typed CLI 提交、接口回读、浏览器刷新和高风险列表页验收的闭环。"
4
+ ---
5
+
6
+ # BPMAX List Template Editor
7
+
8
+ ## 写入路径硬约束
9
+ - 执行前必须先运行 `bpmax-cli config adapters --format json` 核对 `list-template`;只有 `build_status` 和 `submit_status` 都是 `supported` 时才允许进入 build/submit。当前若显示 `blocked`,只能导出、编辑 work、lint 和形成变更建议,不得提交。
10
+ - 在 bpmax-cli npm 分发包中,真实远端写操作只能走 `bpmax-cli config list-template submit`。
11
+ - 旧来源脚本 `scripts/submit*.py` 只保留为结构参考,默认会硬失败;不得用它们直调 BPMAX API。
12
+ - 不得用 `bpmax-cli api POST/PUT/DELETE /flow_page_template*` 或其它 raw API 绕过 typed config submit。
13
+
14
+ ## 全局范围门禁
15
+ - 范围 gate 对本 skill 是强要求。任何会修改 BPMAX 配置、线上状态、本地提交体或最终结果的动作,都必须先归类为 `requested`、`required-collateral` 或 `out-of-scope`。
16
+ - 范围 gate 必须基于线上最新配置:分析或编辑配置前,先通过对应 workflow/API 拉取或读取远端最新状态;提交前再次确认本地 work/submit/payload 仍基于该最新远端基线,若线上配置已变化必须停止并重新对照。
17
+ - 只有用户明确要求的 `requested`,或为闭合需求不可避免的 `required-collateral`,才允许进入 work / submit / 线上 payload / 状态变更。
18
+ - `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
19
+ - 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
20
+
21
+ ## 何时使用
22
+ - 用户已经在浏览器打开了 BPMAX 列表模板新建页或编辑页。
23
+ - 用户要按自然语言需求新增、删除、调整列表列。
24
+ - 用户希望直接复用当前登录态,不手动找 API Key。
25
+ - 用户要让 Codex 通过真实后端接口完成提交,再回到编辑页或列表页核对结果。
26
+
27
+ ## 前置条件
28
+ - 用户必须先在浏览器打开以下任一页面:
29
+ - `.../w:<workspace>/project_detail_table/create`
30
+ - `.../w:<workspace>/project_detail_table/<id>`
31
+ - 编辑现有模板时,优先使用页面当前已经打开的完整编辑页 URL,不要擅自裁掉查询参数。
32
+ - 当前验证过的编辑页完整地址规则是:
33
+ - `/w:<workspace>/project_detail_table/<id>?flow_type=<flow_type>&flow_key=<flow_key>&_rad=1&flowKey=flow:<flow_type>:<flow_key>`
34
+ - 当 `flow_key` 为空字符串时,`flowKey` 仍然保留尾部冒号,例如:`flow:flow876464415:`
35
+ - 如果手动从项目列表页跳转到编辑页,必须按上面的完整规则进入,不要只拼裸路径 `/w:<workspace>/project_detail_table/<id>`,否则可能进入字段未完整回填的空壳编辑页。
36
+ - 如果是编辑现有模板,开始前必须确认页面里已经真实显示当前列标题,而不是只凭接口猜测。
37
+ - 用户需要在请求里明确说明这次要做什么改动。
38
+
39
+ ## Mem0 协议
40
+ - 开始前先调用 [$mem0-memory-protocol](../mem0-memory-protocol/SKILL.md),检索词至少包含:
41
+ - `flow_type`
42
+ - `flow_key`
43
+ - 列表模板 `id` / 模板名
44
+ - 关键列名 / 数据集字段 / 图标 / 标签 / 操作列关键词
45
+ - 优先查这些历史信息:
46
+ - 同流程已有列表模板和列对象骨架
47
+ - 某个字段做成图标列、状态列、图片列的已验证写法
48
+ - 编辑页保存链路或列表页渲染的已知坑点
49
+ - 完成接口回读、编辑页刷新确认,以及高风险场景下的列表页验收后,再写回真正可复用的结论:
50
+ - `decision`:列对象选型、lint 规则、验收口径
51
+ - `task_learning`:某类 `$template`、图标、图片预览、badge 或操作列的稳定写法
52
+ - `anti_pattern`:接口 success 但回读不一致、错误 URL 进入空壳编辑页、脚本列在列表页报错
53
+ - 不要把普通列顺序调整、颜色微调、整段列 JSON 原样写进 Mem0。
54
+ - 如果停在“submit 已构建但未二次确认”“lint 未通过”“接口回读未通过”“编辑页或列表页未验收”等状态,结束前写 `session_state`。
55
+
56
+ ## 核心原则
57
+ - 开发前必须先通过真实线上接口确认当前环境的列表模板详情结构,而不是只看本地镜像或旧请求样例。
58
+ - 只要用户反馈“项目列表没数据 / 暂无项目”,第一优先级先确认目标流程是否已经配置默认列表模板,而不是先把根因归到数据集、数据集字段或 ES 数据为空:
59
+ - 优先检查流程详情里的 `table_list_template`
60
+ - 或直接查 `GET /api/flow_page_template?flow_type=<flow_type>&type=1`
61
+ - 若默认列表模板未配置,页面可能直接显示空态,甚至不会自动发起 `POST /bpmax/project/list`;这是列表页运行时行为观察,不是脚本生成模板的默认方案
62
+ - 最终落库必须通过 `bpmax-cli config list-template submit` 完成,不回退成 `vm.save()`、旧脚本或 raw API 主路径。
63
+ - 编辑态若出现“脚本 PUT success 但 readback 不一致”或涉及 `data_set_id` 切换等已知 false positive 风险,必须追加页面运行时复核,不能直接宣告成功。
64
+ - 查询改写硬门禁:`config[]`、`customQuery`、`beforeSearch`、`tabFilters` 等查询位点里,不得把 `data_set_id` 当 ES dataset 查询入口;lint 命中后直接阻断提交。
65
+ - 查询改写默认口径:
66
+ - 前端脚本默认优先 `raw-es-search`
67
+ - 后端 helper 默认优先 `ctx.$esQuery(...)` 或已验证的 `rootUser` helper
68
+ - 脚本中禁止使用 `/bpmax/project/list` / 用户态 `ESProjectList`;涉及项目 ES 数据时必须使用 `raw-es-search` + `data_set_key`、后端 `ctx.$esQuery(...)` 或不依赖 project/list 的 helper
69
+ - 只有明确需要“当前登录人可见项目列表”语义时,才允许例外使用 `/bpmax/project/list` / 用户态 `ESProjectList`,且脚本里必须写 `bpmax-allow-user-scope-project-list: <reason>`;否则 lint 阻断
70
+ - 禁止把 `/bpmax/project/list` 返回的 `count` / `total` 当真实总数;该接口可能被 10000 上限截断,真实总数必须用 `raw-es-search` + `track_total_hits=true`
71
+ - 禁止把复杂 SQL join 作为数据集联动默认方案;能按数据集字段查询时,必须把条件下推到 `raw-es-search` / `ctx.$esQuery(...)`
72
+ - 禁止先拉取大批 ES 数据再在脚本里 `find` / `filter` / `some` 匹配;必须直接查询需要的数据并控制 `size`
73
+ - 禁止把 `raw-es-search`、`ctx.$esQuery(...)`、`/bpmax/project/list` 放进逐条 SN / 项目 / 团队循环里形成 N+1;必须批量 terms、aggregation 或预计算
74
+ - 默认主流程不是“在对话里手改 payload”,而是:
75
+ - 线上详情导出到本地临时文件
76
+ - 修改 `work`
77
+ - 第一次确认
78
+ - 构建 `submit`
79
+ - 强制 lint
80
+ - 第二次确认
81
+ - typed CLI submit
82
+ - 接口回读
83
+ - 浏览器刷新编辑页
84
+ - 高风险改动自动进入真实列表页验收
85
+ - 浏览器实时线上页面、真实接口返回、当前页已登录授权上下文优先级高于本地 `think_*` 镜像;本地配置只用于检索候选和参考样例,不能覆盖线上事实。
86
+ - 新建与编辑要严格区分:
87
+ - 新建:`POST /api/flow_page_template`
88
+ - 编辑:`PUT /api/flow_page_template/:id`
89
+ - 如果任务是“继续修正刚创建的新模板”,不要再次沿用旧 sample 走 create 流程。
90
+ - create 成功后要把新模板 `id` 视为后续唯一目标,后续迭代优先切到该 `id` 的编辑模式。
91
+ - 否则很容易再次 `POST` 出第二个新模板,导致引用方仍指向旧 `template_id`,形成模板 ID 漂移。
92
+ - 列表模板不是表单模板:
93
+ - 不使用 `rule/value`
94
+ - 不使用 `publish`
95
+ - 主体是 `content: JSON.stringify({ level, config })`
96
+
97
+ ## 完成标准
98
+ - 低风险改动:
99
+ - `readbackAccepted`
100
+ - `editorPageAccepted`
101
+ - 高风险改动:
102
+ - `readbackAccepted`
103
+ - `editorPageAccepted`
104
+ - `listPageAccepted`
105
+ - 高风险场景自动触发条件:
106
+ - 脚本列
107
+ - badge / 状态标签 / `ColorBackgroundText`
108
+ - icon / 头像 / 颜色 / 单行溢出 / 列宽调整
109
+ - 操作列按钮
110
+ - 图片预览列
111
+ - `data_set_id` 切换
112
+
113
+ ## 工作流
114
+
115
+ ### 1. 识别当前模式
116
+ - 读取当前页 URL。
117
+ - 如果 URL 以 `/project_detail_table/create` 结尾,按“新建”流程处理。
118
+ - 如果 URL 形如 `/project_detail_table/<id>`,按“编辑”流程处理。
119
+ - 如果 URL 已带 `flow_type`、`flow_key`、`_rad`、`flowKey` 查询参数,默认保留整条 URL 继续工作;不要自行归一化成裸路径。
120
+ - 进入列配置构造前,先按流程、模板和目标列语义检索一次 Mem0。
121
+
122
+ ### 2. 获取授权上下文
123
+ - 先在浏览器里确认当前页面登录态,再把终端脚本需要的鉴权信息取出来。
124
+ - 优先提取:
125
+ - `document.cookie`
126
+ - 当前页面最近一次同域接口请求头
127
+ - 必要时补看 `localStorage` / `sessionStorage`
128
+ - 默认把 Cookie 组装成 `BPMAX_COOKIE_HEADER` 供脚本使用:
129
+
130
+ ```bash
131
+ export BPMAX_BASE_URL='https://<your-bpmax-host>'
132
+ export BPMAX_COOKIE_HEADER='foo=bar; baz=qux'
133
+ export BPMAX_WORKSPACE='store_mgr'
134
+ ```
135
+
136
+ - `BPMAX_BASE_URL` 固定取当前浏览器页面 origin,或最近一次同域接口请求的 origin;不要把某个测试环境 URL 当成 skill 默认值。
137
+
138
+ - 当前已确认:
139
+ - `GET /api/flow_page_template/:id` 可直接读取详情
140
+ - `/bpmax/data-set` 是真实可用的数据集读取路径
141
+ - `/api/bpmax/data-set` 在当前同域上下文里会返回 403,不能作为默认事实来源
142
+
143
+ ### 3. 先用真实线上接口确认详情结构
144
+ - 编辑已有模板时,第一事实来源固定为:
145
+ - `GET /api/flow_page_template/:id`
146
+ - 新建模板时,必须先找到一个可复用模板或已验证样例,再用:
147
+ - `GET /api/flow_page_template/:sampleId`
148
+ - 把它当作 create skeleton 的真实格式样本
149
+ - 当前环境至少要确认这些顶层字段:
150
+ - `name`
151
+ - `desc`
152
+ - `data_set_id`
153
+ - `flow_type`
154
+ - `flow_key`
155
+ - `type`
156
+ - `content`
157
+ - `status`
158
+ - `content` 展开后至少包含:
159
+ - `level`
160
+ - `config`
161
+ - 只要线上接口返回与本地镜像冲突,一律以线上接口为准。
162
+
163
+ ### 3.1 检索候选模板
164
+ - 如果当前症状是“项目列表页显示暂无项目”,在新建或编辑模板前先确认该流程是否已有默认列表模板:
165
+ - 流程镜像中看 `flow.data.meta.table_list_template`
166
+ - 线上看 `GET /api/flow_page_template?flow_type=<flow_type>&type=1`
167
+ - 没有默认列表模板时,先把它视为根因候选;不要跳过这一步直接排查数据集
168
+ - 只要需求涉及“新建列表模板”“给流程配一套列表列”“参考已有列表模板改一个版本”,先在当前已激活配置仓库检索 `think_flow_page_template`。
169
+ - 检索方式优先:
170
+ - 模板名称
171
+ - 流程 `flow_type`
172
+ - 数据集相关关键词
173
+ - 列标题关键词
174
+ - 在没有得到用户确认前,不要直接新建一个语义重复的新列表模板。
175
+
176
+ ### 3.2 导出到本地临时文件
177
+ - 锁定目标模板后,默认先导出到 `.codex/tmp/list-template-editor/`,不要直接在对话里手拼 payload。
178
+ - 编辑已有模板:
179
+
180
+ ```bash
181
+ export BPMAX_BASE_URL='https://<your-bpmax-host>'
182
+ PYTHON_BIN=./venv/bin/python
183
+ [[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=./.venv/bin/python
184
+ [[ -x "$PYTHON_BIN" ]] || PYTHON_BIN=python
185
+
186
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/export_list_template.py \
187
+ --template-id 954573650 \
188
+ --workspace store_mgr \
189
+ --cookie-header "$BPMAX_COOKIE_HEADER"
190
+ ```
191
+
192
+ - 基于线上样例创建 skeleton:
193
+
194
+ ```bash
195
+ export BPMAX_BASE_URL='https://<your-bpmax-host>'
196
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/export_list_template.py \
197
+ --create-skeleton \
198
+ --sample-template-id 954573650 \
199
+ --workspace store_mgr \
200
+ --cookie-header "$BPMAX_COOKIE_HEADER"
201
+ ```
202
+
203
+ - 如果当前任务涉及数据集字段映射或切换数据集,还必须取实时数据集列表:
204
+
205
+ ```bash
206
+ export BPMAX_BASE_URL='https://<your-bpmax-host>'
207
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/fetch_data_set.py \
208
+ --stem 954573650 \
209
+ --flow-type flow441098230 \
210
+ --flow-key '' \
211
+ --workspace store_mgr \
212
+ --cookie-header "$BPMAX_COOKIE_HEADER"
213
+ ```
214
+
215
+ ### 3.3 本地 work 文件结构
216
+ - `work/<stem>.json` 是唯一允许人工修改的主文件,结构固定为:
217
+ - `id`
218
+ - `mode`
219
+ - `sampleTemplateId`
220
+ - `basic`
221
+ - `content`
222
+ - `meta`
223
+ - `basic` 保存顶层业务字段:
224
+ - `name`
225
+ - `desc`
226
+ - `data_set_id`
227
+ - `flow_type`
228
+ - `flow_key`
229
+ - `type`
230
+ - `status`
231
+ - `content` 保存对象态的:
232
+ - `level`
233
+ - `config`
234
+ - `meta` 至少保留:
235
+ - `previousDataSetId`
236
+ - `sourceTemplateId`
237
+ - `riskHints`
238
+ - 用户只改对象态结构,不直接手写字符串化 `content`。
239
+
240
+ ### 3.4 第一次确认
241
+ - 修改 `work/<stem>.json` 后,先向用户展示 `diffs/<stem>.work.diff.txt` 的关键差异。
242
+ - 明确询问“work 文件是否正确”。
243
+ - 用户确认后,记录 work 确认状态:
244
+
245
+ ```bash
246
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/confirm_list_template.py \
247
+ --stem 954573650 \
248
+ --stage work \
249
+ --actor codex
250
+ ```
251
+
252
+ - 没有明确确认前,不得构建 submit 文件。
253
+
254
+ ### 4. 构造 submit 文件
255
+ - `submit/<stem>.json` 只能通过脚本从 `work/<stem>.json` 构建,不能手写。
256
+ - 默认命令:
257
+
258
+ ```bash
259
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/build_submit_payload.py \
260
+ --stem 954573650
261
+ ```
262
+
263
+ - 构建规则固定为:
264
+ - 顶层只保留真实需要的提交字段:`name/desc/data_set_id/flow_type/flow_key/type/content`
265
+ - `create` 模式额外补 `status`
266
+ - `content` 必须由脚本统一转成 `JSON.stringify({ level, config })`
267
+ - `content.config` 必须仍是数组
268
+
269
+ ### 5. 强制 lint 门禁
270
+ - 在第二次确认和正式提交前,必须先跑 lint:
271
+
272
+ ```bash
273
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py \
274
+ --stem 954573650 \
275
+ --workspace store_mgr \
276
+ --cookie-header "$BPMAX_COOKIE_HEADER"
277
+ ```
278
+
279
+ - lint 结果分两层,但都属于严格阻断:
280
+ - `errors`
281
+ - `style_errors`
282
+ - 命中以下任一问题就禁止继续:
283
+ - `content` 不是对象态,或 `config` 不是数组
284
+ - 列对象存在未允许字段,或混入表单模板字段
285
+ - `createElement.children.$template` / `eval` 结构非法
286
+ - 操作列在列根配置了 `icon` / `iconColor`
287
+ - 操作列任一按钮未配置按钮级 icon
288
+ - `icon` 不是完整 `ri ri_*`
289
+ - 普通数据列带 `icon` 的列数少于 1 列或多于 3 列
290
+ - `iconColor` 不符合规范
291
+ - 涉及到人的列未渲染头像
292
+ - 长文本列未配 `showOverflowTooltip`
293
+ - 固定宽度只写了 `width` 或只写了 `minWidth`
294
+ - 日期字段没有按 `YYYY-MM-DD` 规范处理
295
+ - HTML 字符串 badge 未使用已验证组件/结构
296
+ - `data_set_id` 不存在于实时数据集列表
297
+ - 模板里引用了当前数据集不存在的字段 key
298
+ - 切换 `data_set_id` 后保留了失效字段引用
299
+ - 已知限制:
300
+ - 这套 lint 目前按“当前 `data_set_id` 的字段集合”做静态校验。
301
+ - “人的列必须有头像”当前按列标题关键词和渲染结构做启发式识别,例如:`负责人` / `申请人` / `发起人` / `创建人` / `审批人` / `处理人` / `人员`。
302
+ - 如果列表模板实际运行在 `project/sub`、详情页子流程表格、或其他非纯 ES dataset 返回结构上,运行态可能还会额外提供 `metaForm`、`current_step` 等对象;这类引用在页面上可能可用,但 lint 仍可能报“字段不存在”。
303
+ - 遇到这类报错时,不要先假设模板写法错了,先确认当前列表真实数据源到底是 ES 列表还是 `project/sub`。
304
+
305
+ ### 6. 第二次确认
306
+ - lint 通过后,向用户展示 `submit/<stem>.json` 摘要和 `diffs/<stem>.submit.diff.txt`,再次明确询问“submit 文件是否正确”。
307
+ - 用户确认后,再记录 submit 确认状态:
308
+
309
+ ```bash
310
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/confirm_list_template.py \
311
+ --stem 954573650 \
312
+ --stage submit \
313
+ --actor codex
314
+ ```
315
+
316
+ - 没有 lint 通过或没有第二次明确确认前,不得执行提交脚本。
317
+
318
+ ### 7. Typed CLI 提交与接口回读
319
+ - 正式提交统一走:
320
+
321
+ ```bash
322
+ bpmax-cli config list-template submit \
323
+ --id 954573650 \
324
+ --payload .codex/tmp/list-template-editor/submit/list-template-954573650.json \
325
+ --confirm "submit list-template 954573650"
326
+ ```
327
+
328
+ - 旧 `submit_list_template.py` 只保留为结构参考,默认会硬失败。
329
+ - 不得直接调用 `POST/PUT /api/flow_page_template`。
330
+ - 提交后脚本必须自动生成:
331
+ - `result/<stem>.response.json`
332
+ - `result/<stem>.readback.json`
333
+ - `result/<stem>.readback.diff.txt`
334
+ - `result/<stem>.verify.json`
335
+ - `result/<stem>.acceptance.json`
336
+ - 回读验收至少检查:
337
+ - 顶层字段:`name/desc/data_set_id/flow_type/flow_key/type`
338
+ - `content.level`
339
+ - `content.config[]`
340
+ - 列标题顺序
341
+ - 若 `readback` 不一致,或涉及 `data_set_id` 切换、已知 false positive 场景,必须追加页面运行时复核,不能直接宣布完成。
342
+ - 如果列表模板被别的模板通过 `template_id` 引用,提交后还要回到引用方页面确认引用 ID 是否已经切到这次实际生效的新模板 ID。
343
+
344
+ ### 8. 刷新浏览器编辑页验收
345
+ - 提交成功后,必须刷新对应编辑页,让用户做最终确认。
346
+ - 编辑:
347
+ - 刷新当前 `/w:<workspace>/project_detail_table/<id>`
348
+ - 新建:
349
+ - 用返回的新 `id` 打开 `/w:<workspace>/project_detail_table/<newId>`
350
+ - 编辑页验收口径:
351
+ - 新字段或新列标题已出现
352
+ - 目标列顺序符合预期
353
+ - 数据集绑定修改已回填到页面
354
+ - 验收后记录:
355
+
356
+ ```bash
357
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/record_acceptance.py \
358
+ --stem 954573650 \
359
+ --editor-page-accepted
360
+ ```
361
+
362
+ ### 9. 高风险自动列表页验收
363
+ - 命中高风险条件时,必须继续打开真实列表页:
364
+ - `/w:<workspace>/project?flow_type=<flow_type>&flow_key=<flow_key>`
365
+ - 至少检查:
366
+ - 目标列是否真实出现在列表页
367
+ - 图标、头像、badge、单行溢出、列宽是否符合预期
368
+ - 控制台是否出现模板引入的 `eval fn parsed failed`、`TypeError` 等错误
369
+ - 数据集切换后列表是否仍正常渲染
370
+ - 验收后记录:
371
+
372
+ ```bash
373
+ "$PYTHON_BIN" .codex/skills/bpmax-list-template-editor/scripts/record_acceptance.py \
374
+ --stem 954573650 \
375
+ --list-page-accepted
376
+ ```
377
+ - 高风险验收未通过时,skill 不允许宣告完成。
378
+
379
+ ## 列对象与结构约束
380
+ - 每个列对象至少可能包含:
381
+ - `title`
382
+ - `props`
383
+ - `createElement`
384
+ - `icon`
385
+ - `iconColor`
386
+ - `isSort`
387
+ - `sortConf`
388
+ - `preset`
389
+ - 如果需求是“把某个数据集字段加成一列”,优先按前端 `FieldSelector` 的结构生成:
390
+ - `title` 使用字段名
391
+ - `createElement.children.$template` 使用 `ctx.<dataSetFieldKey>`
392
+ - `createElement.children.eval = true`
393
+ - 图标规则:
394
+ - 操作列列根不要配置 `icon` / `iconColor`
395
+ - 操作列的每个操作按钮前面都要带 icon
396
+ - 普通数据列至少 1 列带 icon,最多 3 列带 icon
397
+ - 列表列 icon 和操作按钮 icon 都必须写完整 class:`ri ri_*`
398
+ - 默认优先统一浅灰色:`#D6DCE5`
399
+ - 人员列规则:
400
+ - 涉及到人的列必须渲染头像,不允许只显示姓名文本
401
+ - 默认优先使用 `el-avatar + span` 的“头像 + 名称”结构
402
+ - 多人列也必须带头像,至少要有稳定的头像渲染节点,而不是纯 `name.join(',')`
403
+ - 空值兜底:
404
+ - 简单字段列推荐写法:`ctx.xxx || '--'`
405
+ - 日期字段默认只显示 `YYYY-MM-DD`
406
+ - 长文本列优先加 `showOverflowTooltip: true`
407
+ - 列宽规则:
408
+ - 用户明确要求固定宽度时,默认同时写 `props.width` 和 `props.minWidth`
409
+ - 不要把表单模板概念混进列表模板:
410
+ - 不使用 `rule`
411
+ - 不使用 `value`
412
+ - 不使用 `field_type`
413
+ - 不使用 `publish`
414
+
415
+ ## 输出要求
416
+ - 明确告诉用户这次是“新建”还是“编辑”。
417
+ - 如果做过现有模板检索,要先汇报候选模板并说明是否已得到用户确认。
418
+ - 明确告诉用户本次用到的核心 typed CLI 命令:
419
+ - `bpmax-cli config list-template export`
420
+ - `bpmax-cli config list-template lint`
421
+ - `bpmax-cli config list-template build`
422
+ - `bpmax-cli config list-template submit`
423
+ - `bpmax-cli config list-template verify`
424
+ - 如果引用了旧来源脚本,只能说明它们用于结构参考或本地 lint,不得把旧 `submit_list_template.py` 描述为提交路径。
425
+ - 必须说明:
426
+ - `work` 是否已确认
427
+ - lint 是否已通过
428
+ - `submit` 是否已确认
429
+ - 接口回读是否通过
430
+ - 浏览器编辑页是否已刷新确认
431
+ - 若命中高风险条件,真实列表页是否已验收
432
+
433
+ ## 参考资料
434
+ - 创建/编辑接口与内容结构: [references/list-template-api-workflow.md](./references/list-template-api-workflow.md)
435
+ - `content.config[]` 形态与列对象模型: [references/content-config-shape.md](./references/content-config-shape.md)
436
+ - 提交前的 payload 检查清单: [references/payload-checklist.md](./references/payload-checklist.md)
437
+ - 当前页面与前端实现对应关系: [references/browser-page-contract.md](./references/browser-page-contract.md)
438
+ - 数据集字段映射列的生成规则: [references/dataset-field-mapping.md](./references/dataset-field-mapping.md)
439
+ - 运行时验证过的页面操作方式: [references/runtime-verified-workflow.md](./references/runtime-verified-workflow.md)
440
+ - 当前已确认可用的特殊格式清单: [references/special-formats.md](./references/special-formats.md)
441
+ - 本地临时文件闭环: [references/local-temp-workflow.md](./references/local-temp-workflow.md)
442
+
443
+ ## 关键经验
444
+ - 编辑态最终仍要 typed CLI 提交,但对“接口 success、回读不一致”的场景必须提高警惕,不能只看 200。
445
+ - 数据集读取必须走 `/bpmax/data-set`;新增字段列和切换数据集时,实时数据集列表是唯一事实来源。
446
+ - 图标 class 必须完整,不能写成 `ri_file-text-line` 这种半截格式。
447
+ - 操作列列根配置 `icon` / `iconColor` 或任一按钮缺少 icon 都视为 lint 阻断项;普通列按“至少 1 列、最多 3 列”控制 icon 覆盖数量。
448
+ - 涉及到人的列必须带头像,优先复用 `el-avatar + span`;只写姓名文本视为 lint 阻断项。
449
+ - 固定宽度必须同时写 `width` 和 `minWidth`。
450
+ - HTML 字符串 badge、复杂脚本列、图标和操作列都属于高风险改动,默认必须进真实列表页验收。
451
+
452
+
453
+ ## bpmax-cli 统一执行入口
454
+
455
+ 本 npm 分发版必须优先使用 typed CLI 命令,不要让 Agent 直接拼 raw API 或直接运行旧来源脚本提交配置:
456
+
457
+ ```bash
458
+ bpmax-cli config list-template export --id <id> --out .codex/tmp/list-template-editor
459
+ bpmax-cli config list-template lint --work .codex/tmp/list-template-editor/work/<file>.json
460
+ 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
461
+ bpmax-cli config list-template submit --id <id> --payload .codex/tmp/list-template-editor/submit/<file>.json
462
+ bpmax-cli config list-template submit --id <id> --payload .codex/tmp/list-template-editor/submit/<file>.json --confirm "submit list-template <id>"
463
+ bpmax-cli config list-template verify --id <id> --expect .codex/tmp/list-template-editor/work/<file>.json
464
+ ```
465
+
466
+ 授权前置:当前 profile 必须通过校对码授权,并在授权页开启“配置能力”。如果 CLI 返回 capability 缺失,停止并让用户使用有管理权限的账号重新授权。
467
+
468
+ 旧来源中的 `scripts/` 和 `references/` 只作为字段结构、lint 规则和验收规则参考;真实远端写操作必须走 `bpmax-cli config list-template submit`,保留 dry-run、二次确认、审计和回读验证。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "BPMAX List Template Editor"
3
+ short_description: "在浏览器里创建或编辑 BPMAX 项目列表模板"
4
+ default_prompt: "使用 $bpmax-list-template-editor 根据当前浏览器页和需求创建或编辑 BPMAX 项目列表模板。"
@@ -0,0 +1,81 @@
1
+ # 当前页面与前端实现对应关系
2
+
3
+ ## 页面文件
4
+ - 编辑页实现: [pages/project_detail_table/_id.vue](/Users/yanghanwen/Development/Cicada/bpmax-core/hpt-frontend/pages/project_detail_table/_id.vue)
5
+ - 列编辑弹窗: [components/ProjectDetailTable/FieldSelector.vue](/Users/yanghanwen/Development/Cicada/bpmax-core/hpt-frontend/components/ProjectDetailTable/FieldSelector.vue)
6
+ - 默认模板骨架: [components/ProjectTable/helper.js](/Users/yanghanwen/Development/Cicada/bpmax-core/hpt-frontend/components/ProjectTable/helper.js)
7
+ - 列渲染组件: [components/ProjectTable/ProjectTable.vue](/Users/yanghanwen/Development/Cicada/bpmax-core/hpt-frontend/components/ProjectTable/ProjectTable.vue)
8
+
9
+ ## 页面行为
10
+ - 顶部表单维护:
11
+ - `name`
12
+ - `desc`
13
+ - `level`
14
+ - `data_set_id`
15
+ - 主内容区有两种模式:
16
+ - 预览模式
17
+ - 源代码模式
18
+ - 新建页默认会生成一套初始 `content`
19
+ - 保存时由页面统一组装 payload
20
+
21
+ ## 页面已确认逻辑
22
+
23
+ ### 新建页
24
+ - `isCreate = true`
25
+ - 会调用 `setDefaultHeader()`
26
+ - 默认内容来自 `getDefaultTableListConfig()`
27
+
28
+ ### 编辑页
29
+ - 会调用 `GET /flow_page_template/:id`
30
+ - 然后执行:
31
+
32
+ ```js
33
+ this.content = JSON.parse(content) || {};
34
+ this.form = { name, desc, data_set_id, level: this.content.level || 0 };
35
+ ```
36
+
37
+ ### 保存
38
+ - 保存前会执行:
39
+
40
+ ```js
41
+ this.content.level = this.form.level;
42
+ ```
43
+
44
+ - 提交时核心结构:
45
+
46
+ ```js
47
+ const formData = {
48
+ ...this.form,
49
+ flow_key,
50
+ flow_type,
51
+ content: JSON.stringify(this.content),
52
+ type: this.type,
53
+ };
54
+ ```
55
+
56
+ ## 列编辑弹窗已确认能力
57
+ - 可选前置顺序
58
+ - 可选数据集字段
59
+ - 可选图标和颜色
60
+ - 可直接编辑整列 JSON
61
+
62
+ 默认新列骨架至少会带:
63
+ - `title`
64
+ - `icon`
65
+ - `iconColor`
66
+ - `isSort`
67
+ - `sortConf`
68
+ - `props`
69
+ - `createElement.children.$template`
70
+
71
+ ## 渲染侧已确认能力
72
+ - 单元格渲染使用 `DynamicComponent`
73
+ - 外层支持前后插件槽:
74
+ - `ProjectTable.list.column.prefix`
75
+ - `ProjectTable.list.column.suffix`
76
+ - 列对象上的 `icon` / `iconColor` 会直接进入渲染链路
77
+
78
+ ## skill 使用建议
79
+ - 如果用户在可视模式操作意图不复杂,优先直接改 `content.config[]`
80
+ - 如果用户需求本质是“整段重写列 JSON”,优先切到源码模式读取当前内容后再替换
81
+ - 如果只是新增普通字段列,优先沿用 `FieldSelector` 的数据集映射列结构