bpmax-cli 0.1.44 → 0.2.1-beta.10
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 +79 -5
- package/dist/bin.js +14430 -2672
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +98 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +230 -0
- package/skills/bpmax-ai-taskbook/agents/openai.yaml +3 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +68 -0
- package/skills/bpmax-api-platform-editor/SKILL.md +321 -0
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-api-platform-editor/references/api-doc-debug-workflow.md +34 -0
- package/skills/bpmax-api-platform-editor/references/api-proxy-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/instance-config-shape.md +41 -0
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +52 -0
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +32 -0
- package/skills/bpmax-api-platform-editor/scripts/api_platform_editor_common.py +1276 -0
- package/skills/bpmax-api-platform-editor/scripts/build_submit_payload.py +64 -0
- package/skills/bpmax-api-platform-editor/scripts/capture_write_contract.py +40 -0
- package/skills/bpmax-api-platform-editor/scripts/export_layer_bundle.py +212 -0
- package/skills/bpmax-api-platform-editor/scripts/record_doc_debug_acceptance.py +62 -0
- package/skills/bpmax-api-platform-editor/scripts/submit_and_verify_layer.py +75 -0
- package/skills/bpmax-api-platform-editor/tests/test_api_platform_editor.py +287 -0
- package/skills/bpmax-approval-matrix/SKILL.md +90 -0
- package/skills/bpmax-auth/SKILL.md +6 -17
- 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-builder-shared/SKILL.md +44 -0
- package/skills/bpmax-builder-shared/base_url.py +81 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.json +71 -0
- package/skills/bpmax-builder-shared/runtime-script-site-matrix.md +34 -0
- package/skills/bpmax-builder-shared/runtime-script-template-catalog.md +123 -0
- package/skills/bpmax-builder-shared/runtime_script_rules.py +272 -0
- package/skills/bpmax-builder-shared/skill_audit.py +374 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +280 -0
- package/skills/bpmax-builder-shared/tests/test_base_url.py +80 -0
- package/skills/bpmax-builder-shared/tests/test_runtime_script_rules.py +115 -0
- package/skills/bpmax-builder-shared/tests/test_skill_audit.py +231 -0
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +281 -0
- package/skills/bpmax-cli/SKILL.md +5 -0
- package/skills/bpmax-config-latest/SKILL.md +71 -0
- package/skills/bpmax-console-template-editor/SKILL.md +536 -0
- package/skills/bpmax-console-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-console-template-editor/references/filter-integration.md +60 -0
- package/skills/bpmax-console-template-editor/references/lessons-from-resume-dashboard.md +114 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +69 -0
- package/skills/bpmax-console-template-editor/references/module-catalog.md +100 -0
- package/skills/bpmax-console-template-editor/references/runtime-page-shape.md +91 -0
- package/skills/bpmax-console-template-editor/references/template-shape.md +149 -0
- package/skills/bpmax-console-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-console-template-editor/scripts/confirm_console_template.py +33 -0
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +964 -0
- package/skills/bpmax-console-template-editor/scripts/export_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/scripts/lint_console_template.py +46 -0
- package/skills/bpmax-console-template-editor/scripts/submit_console_template.py +99 -0
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +383 -0
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +606 -0
- package/skills/bpmax-dataset-field-template-editor/references/create-request-gotchas.md +25 -0
- package/skills/bpmax-dataset-field-template-editor/references/field-classify-mapping.md +35 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +24 -0
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +61 -0
- package/skills/bpmax-dataset-field-template-editor/references/virtual-field-patterns.md +27 -0
- package/skills/bpmax-dataset-field-template-editor/references/work-file-to-submit-mapping.md +127 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/build_submit_payload.py +67 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/confirm_dataset_field.py +37 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +784 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +62 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +104 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +83 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/lint_dataset_field_semantics.py +35 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +95 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +709 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +59 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +789 -0
- package/skills/bpmax-dataset-template-editor/references/custom-key-usage-patterns.md +18 -0
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +73 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-authoring-guide.md +186 -0
- package/skills/bpmax-dataset-template-editor/references/pre-process-script-example-catalog.md +106 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +28 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-verified-dataset-page-shape.md +47 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +23 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +97 -0
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +65 -0
- package/skills/bpmax-dataset-template-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +650 -0
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +155 -0
- package/skills/bpmax-dataset-template-editor/scripts/lint_dataset_template.py +42 -0
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +43 -0
- package/skills/bpmax-dataset-template-editor/scripts/scan_custom_key_references.py +27 -0
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +115 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +52 -0
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +39 -0
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +373 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +227 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +4 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +63 -0
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +564 -0
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +5 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale.json +97 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_final_v2.json +105 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_main.json +36 -0
- package/skills/bpmax-e2e-flow-test-operator/profiles/negative_sale_region.json +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +355 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator/references/failure-update-loop.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator/references/filter-field-discovery.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +24 -0
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +75 -0
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +109 -0
- package/skills/bpmax-e2e-flow-test-operator/references/skill-experience-coverage-matrix.md +29 -0
- package/skills/bpmax-e2e-flow-test-operator/references/stale-runtime-and-clean-sample-rules.md +54 -0
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +83 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/bpmax_session.py +287 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_plan.json +59 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/dealer_sample_on_shelf_runner.py +687 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +121 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +288 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_api_matrix.py +161 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_filter_fields.py +138 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_form_runtime.py +396 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +341 -0
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_test_profile.py +185 -0
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +138 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/SKILL.md +69 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-checklist.md +42 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-recipes.md +38 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/config-shape.md +86 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/gate-lint.md +68 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/hoocoo-patterns.md +39 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/runtime-behavior.md +41 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/references/script-authoring.md +110 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/scripts/lint_feishu_chat_plugin.py +278 -0
- package/skills/bpmax-feishu-chat-flow-plugin-editor/tests/test_lint_feishu_chat_plugin.py +203 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +564 -0
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +38 -0
- package/skills/bpmax-filter-template-editor/references/filter-and-flow-binding.md +57 -0
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +141 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +287 -0
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +115 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +94 -0
- package/skills/bpmax-filter-template-editor/scripts/build_submit_payload.py +25 -0
- package/skills/bpmax-filter-template-editor/scripts/confirm_filter_template.py +22 -0
- package/skills/bpmax-filter-template-editor/scripts/export_filter_template.py +57 -0
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +348 -0
- package/skills/bpmax-filter-template-editor/scripts/init_create_filter_template.py +8 -0
- package/skills/bpmax-filter-template-editor/scripts/lint_filter_template_semantics.py +26 -0
- package/skills/bpmax-filter-template-editor/scripts/submit_filter_template.py +62 -0
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +231 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +1148 -0
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-flow-template-editor/references/before-next-step-script-runtime-gotchas.md +62 -0
- package/skills/bpmax-flow-template-editor/references/config-surfaces-and-placeholders.md +270 -0
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +67 -0
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +25 -0
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +174 -0
- package/skills/bpmax-flow-template-editor/references/intent-model.md +117 -0
- package/skills/bpmax-flow-template-editor/references/lessons-from-price-plan-flow.md +147 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +97 -0
- package/skills/bpmax-flow-template-editor/references/matrix-flow-form-nav-collaboration.md +168 -0
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +133 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +106 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +149 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +41 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +155 -0
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +179 -0
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +91 -0
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +96 -0
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +57 -0
- package/skills/bpmax-flow-template-editor/scripts/build_submit_payload.py +69 -0
- package/skills/bpmax-flow-template-editor/scripts/confirm_flow_template.py +52 -0
- package/skills/bpmax-flow-template-editor/scripts/export_flow_template.py +114 -0
- package/skills/bpmax-flow-template-editor/scripts/flow_template_editor_common.py +1084 -0
- package/skills/bpmax-flow-template-editor/scripts/submit_flow_template.py +159 -0
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +636 -0
- package/skills/bpmax-form-template-editor/SKILL.md +1160 -0
- package/skills/bpmax-form-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +203 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +125 -0
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +77 -0
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +49 -0
- package/skills/bpmax-form-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-form-template-editor/scripts/check_form_template_consistency.py +145 -0
- package/skills/bpmax-form-template-editor/scripts/confirm_form_template.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/export_form_template.py +91 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +1762 -0
- package/skills/bpmax-form-template-editor/scripts/lint_form_template_semantics.py +30 -0
- package/skills/bpmax-form-template-editor/scripts/record_runtime_acceptance.py +67 -0
- package/skills/bpmax-form-template-editor/scripts/submit_form_template.py +163 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +1292 -0
- package/skills/bpmax-list-template-editor/SKILL.md +478 -0
- package/skills/bpmax-list-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-list-template-editor/references/browser-page-contract.md +81 -0
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +165 -0
- package/skills/bpmax-list-template-editor/references/dataset-field-mapping.md +60 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +108 -0
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +102 -0
- package/skills/bpmax-list-template-editor/references/payload-checklist.md +47 -0
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +147 -0
- package/skills/bpmax-list-template-editor/references/special-formats.md +411 -0
- package/skills/bpmax-list-template-editor/scripts/build_submit_payload.py +37 -0
- package/skills/bpmax-list-template-editor/scripts/confirm_list_template.py +33 -0
- package/skills/bpmax-list-template-editor/scripts/export_list_template.py +89 -0
- package/skills/bpmax-list-template-editor/scripts/fetch_data_set.py +34 -0
- package/skills/bpmax-list-template-editor/scripts/lint_list_template_semantics.py +54 -0
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +955 -0
- package/skills/bpmax-list-template-editor/scripts/record_acceptance.py +55 -0
- package/skills/bpmax-list-template-editor/scripts/submit_list_template.py +117 -0
- package/skills/bpmax-list-template-editor/tests/test_list_template_editor_common.py +441 -0
- package/skills/bpmax-memory-protocol/SKILL.md +72 -0
- package/skills/bpmax-nav-config-editor/SKILL.md +350 -0
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +70 -0
- package/skills/bpmax-nav-config-editor/references/config-shape.md +78 -0
- package/skills/bpmax-nav-config-editor/references/icon-selection.md +83 -0
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +51 -0
- package/skills/bpmax-nav-config-editor/references/payload-checklist.md +41 -0
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +47 -0
- package/skills/bpmax-nav-config-editor/scripts/build_submit_payload.py +34 -0
- package/skills/bpmax-nav-config-editor/scripts/confirm_nav_config.py +32 -0
- package/skills/bpmax-nav-config-editor/scripts/export_nav_config.py +56 -0
- package/skills/bpmax-nav-config-editor/scripts/lint_nav_config_semantics.py +33 -0
- package/skills/bpmax-nav-config-editor/scripts/nav_config_editor_common.py +812 -0
- package/skills/bpmax-nav-config-editor/scripts/submit_nav_config.py +44 -0
- package/skills/bpmax-nav-config-editor/scripts/verify_nav_config.py +33 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor.py +358 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_editor_common.py +138 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_lint.py +58 -0
- package/skills/bpmax-nav-config-editor/tests/test_nav_config_submit_verify.py +51 -0
- package/skills/bpmax-plugin-config/SKILL.md +42 -0
- package/skills/bpmax-project/SKILL.md +17 -3
- package/skills/bpmax-project-detail-template-editor/SKILL.md +355 -0
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +4 -0
- package/skills/bpmax-project-detail-template-editor/references/local-temp-workflow.md +59 -0
- package/skills/bpmax-project-detail-template-editor/references/module-catalog-and-config-notes.md +120 -0
- package/skills/bpmax-project-detail-template-editor/references/payload-checklist.md +33 -0
- package/skills/bpmax-project-detail-template-editor/references/project-detail-template-api-workflow.md +44 -0
- package/skills/bpmax-project-detail-template-editor/scripts/build_submit_payload.py +30 -0
- package/skills/bpmax-project-detail-template-editor/scripts/confirm_project_detail_template.py +33 -0
- package/skills/bpmax-project-detail-template-editor/scripts/export_project_detail_template.py +87 -0
- package/skills/bpmax-project-detail-template-editor/scripts/lint_project_detail_template_semantics.py +37 -0
- package/skills/bpmax-project-detail-template-editor/scripts/project_detail_template_editor_common.py +507 -0
- package/skills/bpmax-project-detail-template-editor/scripts/submit_project_detail_template.py +120 -0
- package/skills/bpmax-project-detail-template-editor/tests/test_project_detail_template_editor.py +369 -0
- package/skills/bpmax-role-editor/SKILL.md +251 -0
- package/skills/bpmax-role-editor/references/api-workflow.md +30 -0
- package/skills/bpmax-role-editor/references/runtime-page-shape.md +18 -0
- package/skills/bpmax-role-editor/references/work-file-mapping.md +32 -0
- package/skills/bpmax-role-editor/scripts/build_submit_payload.py +38 -0
- package/skills/bpmax-role-editor/scripts/confirm_role.py +33 -0
- package/skills/bpmax-role-editor/scripts/export_role.py +163 -0
- package/skills/bpmax-role-editor/scripts/lint_role_semantics.py +38 -0
- package/skills/bpmax-role-editor/scripts/role_editor_common.py +1231 -0
- package/skills/bpmax-role-editor/scripts/submit_role.py +144 -0
- package/skills/bpmax-role-editor/tests/test_role_editor.py +343 -0
- package/skills/bpmax-shared/SKILL.md +1 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +106 -0
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +4 -0
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +37 -0
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +136 -0
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +138 -0
- package/skills/bpmax-workspace-editor/SKILL.md +78 -0
- package/skills/bpmax-workspace-editor/agents/openai.yaml +4 -0
- package/skills/form-control-library/SKILL.md +82 -0
- package/skills/form-control-library/agents/openai.yaml +4 -0
- package/skills/form-control-library/references/form-controls.md +199 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +180 -0
- package/skills/form-control-library/references/group-select-runtime.md +191 -0
- package/skills/form-control-library/scripts/rebuild_form_control_library.py +55 -0
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import sys
|
|
3
|
+
import tempfile
|
|
4
|
+
import unittest
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from unittest import mock
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
SCRIPT_DIR = Path(__file__).resolve().parents[1] / "scripts"
|
|
10
|
+
if str(SCRIPT_DIR) not in sys.path:
|
|
11
|
+
sys.path.insert(0, str(SCRIPT_DIR))
|
|
12
|
+
|
|
13
|
+
import api_platform_editor_common as common
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ApiPlatformEditorCommonTests(unittest.TestCase):
|
|
17
|
+
def test_resolve_editor_base_url_prefers_browser_origin_before_agents_default(self) -> None:
|
|
18
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
19
|
+
agents_path = Path(tmpdir) / "AGENTS.md"
|
|
20
|
+
agents_path.write_text("BPMAX_DEFAULT_ORIGIN: https://repo.example.com\n", encoding="utf-8")
|
|
21
|
+
with mock.patch.dict(os.environ, {}, clear=True):
|
|
22
|
+
resolved = common.resolve_editor_base_url(
|
|
23
|
+
None,
|
|
24
|
+
browser_origin="https://browser.example.com/w:store_mgr/link_system",
|
|
25
|
+
env={},
|
|
26
|
+
agents_path=agents_path,
|
|
27
|
+
)
|
|
28
|
+
self.assertEqual(resolved, "https://browser.example.com")
|
|
29
|
+
|
|
30
|
+
def test_resolve_editor_base_url_uses_agents_default_when_other_inputs_missing(self) -> None:
|
|
31
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
32
|
+
agents_path = Path(tmpdir) / "AGENTS.md"
|
|
33
|
+
agents_path.write_text("DEFAULT_BPMAX_APP_ORIGIN=https://repo.example.com/\n", encoding="utf-8")
|
|
34
|
+
resolved = common.resolve_editor_base_url(None, env={}, agents_path=agents_path)
|
|
35
|
+
self.assertEqual(resolved, "https://repo.example.com")
|
|
36
|
+
|
|
37
|
+
def test_normalize_fetch_capture_extracts_primary_contract(self) -> None:
|
|
38
|
+
fetch_text = r'''
|
|
39
|
+
fetch("https://bpmax.example.com/api/api_proxy/18?$workspace=store_mgr", {
|
|
40
|
+
"headers": {
|
|
41
|
+
"accept": "application/json",
|
|
42
|
+
"content-type": "application/json",
|
|
43
|
+
"cookie": "ignored=yes"
|
|
44
|
+
},
|
|
45
|
+
"body": "{\"data\":{\"name\":\"D365接口\",\"path\":\"/crm/account\"}}",
|
|
46
|
+
"method": "PUT"
|
|
47
|
+
});
|
|
48
|
+
'''.strip()
|
|
49
|
+
|
|
50
|
+
contract = common.normalize_request_capture(fetch_text, layer="api")
|
|
51
|
+
|
|
52
|
+
self.assertEqual(contract["method"], "PUT")
|
|
53
|
+
self.assertEqual(contract["path"], "/api/api_proxy/18")
|
|
54
|
+
self.assertEqual(contract["query"]["$workspace"], "store_mgr")
|
|
55
|
+
self.assertEqual(contract["payloadPath"], ["data"])
|
|
56
|
+
self.assertEqual(contract["headers"], {"accept": "application/json", "content-type": "application/json"})
|
|
57
|
+
|
|
58
|
+
def test_normalize_har_capture_uses_preferred_binding_path(self) -> None:
|
|
59
|
+
har = {
|
|
60
|
+
"log": {
|
|
61
|
+
"entries": [
|
|
62
|
+
{
|
|
63
|
+
"request": {
|
|
64
|
+
"url": "https://bpmax.example.com/api/api_proxy/18",
|
|
65
|
+
"method": "POST",
|
|
66
|
+
"headers": [],
|
|
67
|
+
"postData": {"text": '{"name":"api"}'},
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"request": {
|
|
72
|
+
"url": (
|
|
73
|
+
"https://bpmax.example.com/api/api_proxy_entity_binding"
|
|
74
|
+
"?q_proxy_guid=proxy-guid&q_direction=response"
|
|
75
|
+
),
|
|
76
|
+
"method": "POST",
|
|
77
|
+
"headers": [{"name": "content-type", "value": "application/json"}],
|
|
78
|
+
"postData": {"text": '{"entity_id":17,"direction":"response"}'},
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
contract = common.normalize_request_capture(
|
|
86
|
+
common.json.dumps(har, ensure_ascii=False),
|
|
87
|
+
layer="api",
|
|
88
|
+
preferred_substring="/api/api_proxy_entity_binding",
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
self.assertEqual(contract["path"], "/api/api_proxy_entity_binding")
|
|
92
|
+
self.assertEqual(contract["query"]["q_proxy_guid"], "proxy-guid")
|
|
93
|
+
self.assertEqual(contract["bodyTemplate"]["entity_id"], 17)
|
|
94
|
+
|
|
95
|
+
def test_instance_export_and_build_round_trip(self) -> None:
|
|
96
|
+
detail = {
|
|
97
|
+
"id": 9,
|
|
98
|
+
"guid": "instance-guid",
|
|
99
|
+
"name": "D365测试环境",
|
|
100
|
+
"instance_key": "d365_test",
|
|
101
|
+
"env_type": "test",
|
|
102
|
+
"auth_type": "script",
|
|
103
|
+
"description": "测试环境",
|
|
104
|
+
"status": 1,
|
|
105
|
+
"api_platform_guid": "platform-guid",
|
|
106
|
+
"config_schema": {"baseUrl": "https://upstream.example.com", "timeout": 30},
|
|
107
|
+
"on_setup_script": "// setup",
|
|
108
|
+
"on_request_script": "return ctx;",
|
|
109
|
+
"on_response_script": "return res;",
|
|
110
|
+
"on_error_script": "throw err;",
|
|
111
|
+
}
|
|
112
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
113
|
+
tmp_root = Path(tmpdir)
|
|
114
|
+
with mock.patch.object(common, "TMP_ROOT", tmp_root):
|
|
115
|
+
work = common.instance_detail_to_work(detail, mode="update", stem="instance-9")
|
|
116
|
+
bundle = common.build_submit_bundle(work)
|
|
117
|
+
|
|
118
|
+
self.assertEqual(bundle["payload"]["name"], "D365测试环境")
|
|
119
|
+
self.assertEqual(bundle["payload"]["config_schema"]["baseUrl"], "https://upstream.example.com")
|
|
120
|
+
self.assertEqual(bundle["payload"]["on_request_script"], "return ctx;")
|
|
121
|
+
self.assertEqual(bundle["executionPlan"], ["instance", "readback"])
|
|
122
|
+
|
|
123
|
+
def test_api_build_requires_binding_contract_when_binding_sidecar_exists(self) -> None:
|
|
124
|
+
api_detail = {
|
|
125
|
+
"id": 18,
|
|
126
|
+
"guid": "proxy-guid",
|
|
127
|
+
"name": "D365经销商查询接口",
|
|
128
|
+
"api_key": "dealerQuery",
|
|
129
|
+
"status": 1,
|
|
130
|
+
"version": 1,
|
|
131
|
+
"method": "POST",
|
|
132
|
+
"path": "/crm/account",
|
|
133
|
+
"description": "查询经销商",
|
|
134
|
+
"api_platform_guid": "platform-guid",
|
|
135
|
+
"request_schema": {"body_params": []},
|
|
136
|
+
"response_schema": {"type": "object"},
|
|
137
|
+
"request_example": {"pageSize": 10},
|
|
138
|
+
"response_example": {"isSuccess": True},
|
|
139
|
+
}
|
|
140
|
+
binding = {"entity_id": 19, "direction": "response"}
|
|
141
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
142
|
+
tmp_root = Path(tmpdir)
|
|
143
|
+
with mock.patch.object(common, "TMP_ROOT", tmp_root):
|
|
144
|
+
work = common.api_detail_to_work(api_detail, binding=binding, mode="create", stem="create-api-18")
|
|
145
|
+
with self.assertRaises(SystemExit) as ctx:
|
|
146
|
+
common.build_submit_bundle(work, contract={"requests": {"primary": {}}})
|
|
147
|
+
self.assertIn("binding write contract", str(ctx.exception))
|
|
148
|
+
bundle = common.build_submit_bundle(work, contract={"requests": {"primary": {}, "binding": {}}})
|
|
149
|
+
|
|
150
|
+
self.assertEqual(bundle["executionPlan"], ["api_proxy", "binding", "readback"])
|
|
151
|
+
self.assertEqual(bundle["response_binding"]["entity_id"], 19)
|
|
152
|
+
|
|
153
|
+
def test_submit_api_create_executes_proxy_then_binding_then_readback(self) -> None:
|
|
154
|
+
submit_bundle = {
|
|
155
|
+
"layer": "api",
|
|
156
|
+
"mode": "create",
|
|
157
|
+
"payload": {
|
|
158
|
+
"name": "D365经销商查询接口",
|
|
159
|
+
"api_key": "dealerQuery",
|
|
160
|
+
"status": 1,
|
|
161
|
+
"version": 1,
|
|
162
|
+
"method": "POST",
|
|
163
|
+
"path": "/crm/account",
|
|
164
|
+
"description": "查询经销商",
|
|
165
|
+
"api_platform_guid": "platform-guid",
|
|
166
|
+
"request_schema": {"body_params": []},
|
|
167
|
+
"response_schema": {"type": "object"},
|
|
168
|
+
"request_example": {"pageSize": 10},
|
|
169
|
+
"response_example": {"isSuccess": True},
|
|
170
|
+
},
|
|
171
|
+
"response_binding": {"entity_id": 19, "direction": "response"},
|
|
172
|
+
"executionPlan": ["api_proxy", "binding", "readback"],
|
|
173
|
+
}
|
|
174
|
+
contract = {
|
|
175
|
+
"requests": {
|
|
176
|
+
"primary": {
|
|
177
|
+
"method": "POST",
|
|
178
|
+
"path": "/api/api_proxy",
|
|
179
|
+
"query": {},
|
|
180
|
+
"headers": {},
|
|
181
|
+
"bodyTemplate": {},
|
|
182
|
+
"bodyKind": "json",
|
|
183
|
+
"payloadPath": [],
|
|
184
|
+
},
|
|
185
|
+
"binding": {
|
|
186
|
+
"method": "POST",
|
|
187
|
+
"path": "/api/api_proxy_entity_binding",
|
|
188
|
+
"query": {},
|
|
189
|
+
"headers": {},
|
|
190
|
+
"bodyTemplate": {},
|
|
191
|
+
"bodyKind": "json",
|
|
192
|
+
"payloadPath": [],
|
|
193
|
+
},
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
class FakeClient:
|
|
198
|
+
def __init__(self) -> None:
|
|
199
|
+
self.events: list[str] = []
|
|
200
|
+
|
|
201
|
+
def call_contract(self, request_contract: dict, submit_payload: object) -> dict:
|
|
202
|
+
self.events.append(request_contract["path"])
|
|
203
|
+
if request_contract["path"] == "/api/api_proxy":
|
|
204
|
+
return {"data": {"id": 18, "guid": "proxy-guid"}}
|
|
205
|
+
return {"data": {"id": 401, "q_proxy_guid": "proxy-guid"}}
|
|
206
|
+
|
|
207
|
+
def get_api(self, api_id: object) -> dict:
|
|
208
|
+
self.events.append("GET:/api/api_proxy/18")
|
|
209
|
+
return {
|
|
210
|
+
"data": {
|
|
211
|
+
**submit_bundle["payload"],
|
|
212
|
+
"id": 18,
|
|
213
|
+
"guid": "proxy-guid",
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
def get_binding(self, proxy_guid: str, *, direction: str = "response") -> dict:
|
|
218
|
+
self.events.append("GET:/api/api_proxy_entity_binding")
|
|
219
|
+
return {"data": [{"entity_id": 19, "direction": "response", "q_proxy_guid": proxy_guid}]}
|
|
220
|
+
|
|
221
|
+
fake_client = FakeClient()
|
|
222
|
+
result = common.submit_layer(
|
|
223
|
+
fake_client, meta={"layer": "api", "remoteId": None}, contract=contract, submit_bundle=submit_bundle
|
|
224
|
+
)
|
|
225
|
+
|
|
226
|
+
self.assertEqual(
|
|
227
|
+
fake_client.events,
|
|
228
|
+
["/api/api_proxy", "/api/api_proxy_entity_binding", "GET:/api/api_proxy/18", "GET:/api/api_proxy_entity_binding"],
|
|
229
|
+
)
|
|
230
|
+
self.assertEqual(result["executionOrder"], ["api_proxy", "binding", "readback"])
|
|
231
|
+
self.assertEqual(result["status"], "runtime_pending")
|
|
232
|
+
|
|
233
|
+
def test_doc_debug_acceptance_requires_response_summary(self) -> None:
|
|
234
|
+
work = {
|
|
235
|
+
"doc_url": "https://bpmax.example.com/w:store_mgr/api-docs/system_api/18?system=dynamic",
|
|
236
|
+
"platform_key": "dynamic",
|
|
237
|
+
"api_id": 18,
|
|
238
|
+
"api_key": "dealerQuery",
|
|
239
|
+
}
|
|
240
|
+
with self.assertRaises(SystemExit) as ctx:
|
|
241
|
+
common.build_doc_debug_acceptance(
|
|
242
|
+
work=work,
|
|
243
|
+
instance_key="d365_test",
|
|
244
|
+
api_args={"pageSize": 10},
|
|
245
|
+
response_summary="",
|
|
246
|
+
matched_expected=True,
|
|
247
|
+
)
|
|
248
|
+
self.assertIn("response summary", str(ctx.exception))
|
|
249
|
+
|
|
250
|
+
def test_doc_debug_acceptance_updates_target_meta(self) -> None:
|
|
251
|
+
with tempfile.TemporaryDirectory() as tmpdir:
|
|
252
|
+
tmp_root = Path(tmpdir)
|
|
253
|
+
with mock.patch.object(common, "TMP_ROOT", tmp_root):
|
|
254
|
+
doc_paths = common.paths_for("doc-debug-dynamic-18")
|
|
255
|
+
target_paths = common.paths_for("api-18")
|
|
256
|
+
common.dump_json(
|
|
257
|
+
doc_paths["meta"],
|
|
258
|
+
common.ensure_meta_shape({}, stem="doc-debug-dynamic-18", layer="doc-debug", mode="update"),
|
|
259
|
+
)
|
|
260
|
+
common.dump_json(
|
|
261
|
+
target_paths["meta"],
|
|
262
|
+
common.ensure_meta_shape({}, stem="api-18", layer="api", mode="update"),
|
|
263
|
+
)
|
|
264
|
+
work = {
|
|
265
|
+
"doc_url": "https://bpmax.example.com/w:store_mgr/api-docs/system_api/18?system=dynamic",
|
|
266
|
+
"platform_key": "dynamic",
|
|
267
|
+
"api_id": 18,
|
|
268
|
+
"api_key": "dealerQuery",
|
|
269
|
+
}
|
|
270
|
+
acceptance = common.build_doc_debug_acceptance(
|
|
271
|
+
work=work,
|
|
272
|
+
instance_key="d365_test",
|
|
273
|
+
api_args={"pageSize": 10},
|
|
274
|
+
response_summary="200 + 业务成功",
|
|
275
|
+
matched_expected=True,
|
|
276
|
+
)
|
|
277
|
+
common.dump_json(doc_paths["acceptance"], acceptance)
|
|
278
|
+
common.persist_doc_debug_result(doc_paths["meta"], accepted=True, acceptance_path=doc_paths["acceptance"])
|
|
279
|
+
common.persist_doc_debug_result(target_paths["meta"], accepted=True, acceptance_path=doc_paths["acceptance"])
|
|
280
|
+
target_meta = common.load_meta(target_paths["meta"])
|
|
281
|
+
|
|
282
|
+
self.assertEqual(target_meta["status"], "completed")
|
|
283
|
+
self.assertEqual(target_meta["runtimeAcceptance"]["result"], "passed")
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
if __name__ == "__main__":
|
|
287
|
+
unittest.main()
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "bpmax-approval-matrix"
|
|
3
|
+
description: "Use when BPMAX work involves approval matrix, role matrix, department matrix, matrix_owner, cc_matrix, matrix rule records, approver mapping, seed rules, or connecting a business flow to matrix-based owners or CC users."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMAX Approval Matrix
|
|
7
|
+
|
|
8
|
+
## Core Boundary
|
|
9
|
+
|
|
10
|
+
审批矩阵不是一个单一配置项。必须把生命周期拆成四段:
|
|
11
|
+
|
|
12
|
+
1. 创建矩阵应用:矩阵流程、表单、列表、筛选器、工作区绑定和导航入口。
|
|
13
|
+
2. 创建矩阵规则记录:在线上矩阵流程中创建项目记录。
|
|
14
|
+
3. 填充真实审批人:规则记录里的用户字段必须是真实用户对象或用户 ID,不得是示例文本、空值或本地占位。
|
|
15
|
+
4. 主流程接入矩阵:业务流程节点配置 `matrix_owner` 或 `cc_matrix`,并验证命中规则后能返回审批人。
|
|
16
|
+
|
|
17
|
+
只有第 1 段完成时,不能宣称“审批矩阵已可用”。
|
|
18
|
+
|
|
19
|
+
## Required Skills
|
|
20
|
+
|
|
21
|
+
- 先用 `bpmax-ai-taskbook` 拆任务和对象锁。
|
|
22
|
+
- 矩阵应用配置用 `bpmax-e2e-flow-config-orchestrator`、`bpmax-flow-template-editor`、`bpmax-form-template-editor`、`bpmax-list-template-editor`、`bpmax-filter-template-editor`。
|
|
23
|
+
- 规则记录创建用 `bpmax-project`,默认走 `bpmax-cli project create --json ...` 的安全引导或 handoff。
|
|
24
|
+
- 浏览器验证用 `bpmax-e2e-flow-test-operator`。
|
|
25
|
+
|
|
26
|
+
## Hard Rules
|
|
27
|
+
|
|
28
|
+
- UUID 禁止用于任何矩阵配置 ID、规则记录 ID、表单模板 ID、数据集 ID、页面模板 ID 或临时 object lock。
|
|
29
|
+
- 矩阵流程必须是 `category = "matrix"`。
|
|
30
|
+
- 矩阵录入表单挂在 `flow.data.meta.form_template`,不是普通节点 `node.form_template`。
|
|
31
|
+
- `flow-app create` 只创建矩阵应用配置,不会创建矩阵规则记录。
|
|
32
|
+
- `seed-rules.json` 只是本地规则种子,不代表线上已有规则数据。
|
|
33
|
+
- seed 缺少真实审批人用户值时,不允许进入主流程接入验收。
|
|
34
|
+
- `workspace-flow` 是全量替换接口;提交前必须重新 export 当前绑定并 merge,不能复用旧 dry-run payload。
|
|
35
|
+
|
|
36
|
+
## Minimal Workflow
|
|
37
|
+
|
|
38
|
+
1. Baseline:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
bpmax-cli config latest pull <env> --profile <profile> --format json
|
|
42
|
+
bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
2. Matrix app:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
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>" --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
|
|
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
|
+
|
|
55
|
+
3. Matrix rule records:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bpmax-cli matrix seed <matrix_flow_type> --profile <profile> --rules @seed-rules.json --approver-field <owner_field> --format json
|
|
59
|
+
bpmax-cli project create --profile <profile> --flow-type <matrix_flow_type> --json '{"form":{...}}' --format json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`matrix seed` 只做本地校验和输出 `project create` checklist,不写线上项目记录。If CLI returns `handoff: true`, use the returned page link. Do not force `--no-interactive` unless the form is proven safe for direct create.
|
|
63
|
+
|
|
64
|
+
4. Business flow consumption:
|
|
65
|
+
|
|
66
|
+
- Owner: set `node.auto_range_type = "matrix"` and configure `node.matrix_owner.flow` plus `node.matrix_owner.script`.
|
|
67
|
+
- CC: set `node.cc_type = "matrix"` and configure `node.cc_matrix.flow` plus `node.cc_matrix.script`.
|
|
68
|
+
- Scripts must return user objects, user IDs, or arrays of them.
|
|
69
|
+
|
|
70
|
+
5. Verification:
|
|
71
|
+
|
|
72
|
+
- Matrix app is visible in the target workspace.
|
|
73
|
+
- Matrix rule project exists online with real approver fields.
|
|
74
|
+
- Business flow create/submit reaches the matrix-owned step.
|
|
75
|
+
- Runtime owner/CC resolves to the expected user.
|
|
76
|
+
- If owner resolution is unclear, run the read-only diagnostic first:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
bpmax-cli matrix owner-resolve --profile <profile> --flow-type <business_flow_type> --node <node_id> --project-id <project_id> --format json
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
The diagnostic only reports node-side `matrix_owner` config paths and project form context. It does not create matrix rule records and does not replace browser/runtime E2E verification.
|
|
83
|
+
|
|
84
|
+
## Stop Conditions
|
|
85
|
+
|
|
86
|
+
- Any required ID is UUID-shaped.
|
|
87
|
+
- Matrix app exists but no rule records exist.
|
|
88
|
+
- Rule records exist but approver fields are empty or not real BPMAX users.
|
|
89
|
+
- `project create --no-interactive` returns 500; switch to CLI handoff diagnostics instead of raw API.
|
|
90
|
+
- Business flow `matrix_owner.flow` points to a flow that is not `category = "matrix"`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: bpmax-auth
|
|
3
3
|
version: 1.0.0
|
|
4
|
-
description: Use when the user needs BPMAX device authorization,
|
|
4
|
+
description: Use when the user needs BPMAX device-code authorization, API key setup, auth status checks, logout, or diagnosis around bpmax-cli authentication.
|
|
5
5
|
metadata:
|
|
6
6
|
requires:
|
|
7
7
|
bins: ["bpmax-cli"]
|
|
@@ -11,7 +11,7 @@ metadata:
|
|
|
11
11
|
# auth
|
|
12
12
|
|
|
13
13
|
> **前置条件:** 先阅读 `../bpmax-shared/SKILL.md`。
|
|
14
|
-
> **登录约束:**
|
|
14
|
+
> **登录约束:** 只使用 device-code 校对码授权;不要使用浏览器 callback flow。
|
|
15
15
|
|
|
16
16
|
## 何时使用
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ metadata:
|
|
|
19
19
|
- 用户要登录 BPMAX
|
|
20
20
|
- 用户要检查当前 API Key 是否有效
|
|
21
21
|
- 用户要清空当前环境的登录状态
|
|
22
|
-
-
|
|
22
|
+
- 用户遇到授权页、权限不足、校对码过期或 API Key 落盘问题
|
|
23
23
|
|
|
24
24
|
## 命令
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ metadata:
|
|
|
27
27
|
bpmax-cli init --agent openclaw --channel feishu --url <BPMAX_URL> --name local --profile-scope <TRUSTED_RUNTIME_SCOPE> --format json
|
|
28
28
|
bpmax-cli --config-dir <config_dir_from_init> auth device complete --profile <profile_from_init> --session <device_code> --format json
|
|
29
29
|
bpmax-cli auth login --mode device --profile local
|
|
30
|
-
bpmax-cli auth login
|
|
30
|
+
bpmax-cli auth login --mode device
|
|
31
31
|
bpmax-cli auth status
|
|
32
32
|
bpmax-cli auth logout
|
|
33
33
|
```
|
|
@@ -39,7 +39,7 @@ bpmax-cli auth logout
|
|
|
39
39
|
- 只需要发起无浏览器授权:用 `auth device start`,把返回的 `message_card.authorization_url` 和 `message_card.user_code` 发给用户
|
|
40
40
|
- 用户确认短码后:优先执行返回的 `message_card.next_command`;不要从 `next_action` 自然语言里猜命令
|
|
41
41
|
- 后续授权状态只复制 `init` 返回的 `next_commands.auth_status`;不要自行把 profile 写成 `local`,也不要漏掉 `--config-dir`
|
|
42
|
-
-
|
|
42
|
+
- 本地终端也使用 `auth login --mode device`
|
|
43
43
|
- 只想确认当前身份和连通性:`auth status`
|
|
44
44
|
- 只清空当前 profile 的本地 API Key:`auth logout`
|
|
45
45
|
|
|
@@ -61,20 +61,9 @@ bpmax-cli auth logout
|
|
|
61
61
|
- `authorization_pending` 代表用户还没确认,可稍后重试 `complete`
|
|
62
62
|
- `expired_token` 代表短码过期,应重新 `start`
|
|
63
63
|
|
|
64
|
-
## 浏览器 Callback 登录流程理解
|
|
65
|
-
|
|
66
|
-
`auth login` 的固定链路:
|
|
67
|
-
|
|
68
|
-
1. CLI 读取目标 profile 的 `origin`
|
|
69
|
-
2. CLI 启动本地一次性 `localhost` 回调服务
|
|
70
|
-
3. CLI 打开 `hpt-frontend` 的 CLI 登录桥接页
|
|
71
|
-
4. 页面复用 `huanpingtong-server` 现有 `/api/user_api_key` 机制获取或创建 `bpmax-cli` API Key
|
|
72
|
-
5. 页面通过 `POST /callback` 把 API Key 回传本地 CLI
|
|
73
|
-
6. CLI 校验 `state` 后落盘
|
|
74
|
-
|
|
75
64
|
## 常见问题
|
|
76
65
|
|
|
77
66
|
- 401/403:先检查 `origin`、`api_key`、当前 profile 是否正确
|
|
78
67
|
- 页面提示无权限:优先怀疑缺少 `user.api_key.manage`
|
|
79
|
-
-
|
|
68
|
+
- `authorization_pending`:用户还没有在授权页确认校对码,稍后重试 `auth device complete`
|
|
80
69
|
- 需要切环境登录:显式传 `--profile <name>`
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-blueprint-doc-workflow
|
|
3
|
+
description: 用于生成、更新、审查和 lint BPMAX 蓝图方案飞书文档。只要用户要求“生成 BPMAX 蓝图方案”“创建 BPMAX 蓝图飞书文档”“检查蓝图文档是否完备”“每个流程独立完整”“流程图必须用飞书画板承载”“不要用 Mermaid 代码块”等场景,就使用本 skill 编排 lark-doc、lark-whiteboard、BPMAX 相关只读调研和结构 lint,确保输出是强结构、可实施、可校验的 Feishu Docx 蓝图文档。
|
|
4
|
+
metadata:
|
|
5
|
+
requires:
|
|
6
|
+
bins: ["lark-cli", "python3"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# BPMAX Blueprint Doc Workflow
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Use this skill to produce BPMAX blueprint方案 documents as Feishu Docx artifacts with strict structure and lint gates. It is narrower than `bpmax-implementation-plan-workflow`: this skill focuses on blueprint document generation and quality gates, not default task plans, Feishu Base, or Gantt views.
|
|
14
|
+
|
|
15
|
+
## Required Companion Skills
|
|
16
|
+
|
|
17
|
+
Use these skills as needed; this skill orchestrates them and does not replace them.
|
|
18
|
+
|
|
19
|
+
- `bpmax-memory-protocol`: read project/domain memory before non-trivial BPMAX blueprint work and store important decisions afterward.
|
|
20
|
+
- `lark-doc`: create, fetch, update, and verify Feishu Docx documents. Always use `--api-version v2`.
|
|
21
|
+
- `lark-whiteboard`: inspect or update existing Feishu whiteboards when a diagram must be edited after creation.
|
|
22
|
+
- BPMAX repo/API skills: inspect existing flows, forms, data sets, lists, details, permissions, navigation, and integrations before writing implementation claims.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
1. **Ground the inputs**
|
|
27
|
+
- Read all user-provided docs, screenshots, Feishu links, local files, and BPMAX config/API sources.
|
|
28
|
+
- Search Mem0 for prior project terms, naming decisions, flow ownership, and forbidden wording.
|
|
29
|
+
- Extract business scope, target users, main lifecycle, related flows, public support objects, AI/agent boundaries, and acceptance criteria.
|
|
30
|
+
|
|
31
|
+
2. **Draft the blueprint**
|
|
32
|
+
- Use `references/blueprint-structure.md` for the document skeleton.
|
|
33
|
+
- Treat flows as the primary structure. Data sets, forms, lists, details, dashboards, automations, and permissions must attach to an owning flow unless they are genuinely shared support objects.
|
|
34
|
+
- Use `references/per-flow-required-structure.md` for every flow section. Each flow must be independently complete.
|
|
35
|
+
- Put each flow diagram in a Feishu whiteboard block such as `<whiteboard type="mermaid">...</whiteboard>`. Do not use Mermaid code blocks in final docs.
|
|
36
|
+
|
|
37
|
+
3. **Create or update Feishu Docx**
|
|
38
|
+
- For new docs, use `lark-cli docs +create --api-version v2`.
|
|
39
|
+
- For updates, fetch the relevant outline/section first and use precise block operations where possible.
|
|
40
|
+
- Preserve existing resource blocks unless the user explicitly asks to replace them.
|
|
41
|
+
|
|
42
|
+
4. **Lint before claiming completion**
|
|
43
|
+
- Fetch the produced/updated doc:
|
|
44
|
+
```bash
|
|
45
|
+
lark-cli docs +fetch --api-version v2 --doc <DOC> --detail with-ids --format json > /tmp/blueprint-fetch.json
|
|
46
|
+
```
|
|
47
|
+
- Run:
|
|
48
|
+
```bash
|
|
49
|
+
SKILL_DIR="${BPMAX_BLUEPRINT_DOC_WORKFLOW_SKILL_DIR:-$HOME/.codex/skills/bpmax-blueprint-doc-workflow}"
|
|
50
|
+
python3 "$SKILL_DIR/scripts/lint_blueprint_doc.py" \
|
|
51
|
+
--source /tmp/blueprint-fetch.json
|
|
52
|
+
```
|
|
53
|
+
If the skill was installed under another agent root, set `BPMAX_BLUEPRINT_DOC_WORKFLOW_SKILL_DIR` to that skill directory before running the lint.
|
|
54
|
+
- If project-specific wording matters, add `--require-term` and `--forbid-term`.
|
|
55
|
+
- Fix every lint error and rerun until it passes, unless the user explicitly accepts a known exception.
|
|
56
|
+
|
|
57
|
+
5. **Final response**
|
|
58
|
+
- Return the Feishu document title and URL.
|
|
59
|
+
- Summarize the flows covered, whiteboard diagram count, and lint result.
|
|
60
|
+
- State any business assumptions or unresolved confirmation items.
|
|
61
|
+
- Mention Feishu/lark auth or version blockers if they affected delivery.
|
|
62
|
+
|
|
63
|
+
## Hard Rules
|
|
64
|
+
|
|
65
|
+
- Final blueprint deliverables are Feishu Docx documents, not local Markdown, unless the user explicitly asks for local-only output.
|
|
66
|
+
- Every business flow must have its own complete section. Do not make a flow rely on another section for fields, forms, writeback, AI behavior, or implementation boundary.
|
|
67
|
+
- Every flow must have a process diagram, and the diagram must be a Feishu whiteboard/resource block. Mermaid code blocks are draft-only and fail lint.
|
|
68
|
+
- A start node must name the creation action/form.
|
|
69
|
+
- Flow nodes must represent business-meaningful action/state changes that require a human or AI Agent to handle. A valid node should make clear who/what handles it and what business state changes after it.
|
|
70
|
+
- Apply Occam's razor to workflow design: keep diagrams and node tables as simple as possible, avoid redundant steps, and do not make pure system automation, notifications, data sync, field copying, or background script execution a standalone flow node. Put these in the automation/writeback column of the relevant business node instead.
|
|
71
|
+
- Main-flow diagrams must not expand child-flow internals. Represent each child flow as a special-styled node inside the parent flow, such as a `subroutine` node or a node with a distinct class/style, and document the child-flow details only in that child flow's own complete section.
|
|
72
|
+
- Form templates must only contain fields that users or AI Agents need to view, fill, confirm, or edit in that form. Do not put system-written state fields, read-only project references, auto-created child-flow links, or internal relationship fields in business forms; document them in the flow data set, automation, and writeback sections instead.
|
|
73
|
+
- AI/agent content must include trigger, input, output, human confirmation, and fallback. AI must not be described as final approver for key business decisions.
|
|
74
|
+
- Do not park business-specific data sets/forms/lists globally. Shared support sections are for genuinely shared objects only.
|
|
75
|
+
- Default implementation boundary labels are exactly:
|
|
76
|
+
- `BPMAX 配置可实现`
|
|
77
|
+
- `配置 + 脚本/API/现有插件`
|
|
78
|
+
- `需定制插件/外部服务`
|
|
79
|
+
|
|
80
|
+
## References
|
|
81
|
+
|
|
82
|
+
- Read `references/blueprint-structure.md` before drafting a new blueprint or restructuring a document.
|
|
83
|
+
- Read `references/per-flow-required-structure.md` before writing or lint-fixing flow sections.
|
|
84
|
+
|
|
85
|
+
## Lint Script
|
|
86
|
+
|
|
87
|
+
`scripts/lint_blueprint_doc.py` checks a fetched Feishu Docx JSON or XML file for blueprint structure, per-flow completeness, whiteboard diagrams, forbidden Mermaid code blocks, implementation boundary labels, AI confirmation/fallback language, and project-specific required/forbidden terms.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "BPMAX Blueprint Doc Workflow"
|
|
3
|
+
short_description: "Generate linted BPMAX blueprint Feishu docs"
|
|
4
|
+
default_prompt: "Use $bpmax-blueprint-doc-workflow to generate a BPMAX blueprint Feishu document with per-flow whiteboard diagrams and lint checks."
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# BPMAX Blueprint Structure
|
|
2
|
+
|
|
3
|
+
Use this structure for BPMAX blueprint方案 documents unless the user provides a stricter structure.
|
|
4
|
+
|
|
5
|
+
## Document-Level Structure
|
|
6
|
+
|
|
7
|
+
1. **蓝图定位与目标**
|
|
8
|
+
- Background, business objective, one-phase/two-phase scope, audience, success criteria.
|
|
9
|
+
|
|
10
|
+
2. **BPMAX 实施总规则**
|
|
11
|
+
- Flow-first rule.
|
|
12
|
+
- Form/data/list/detail/dashboard ownership.
|
|
13
|
+
- AI/agent confirmation boundary.
|
|
14
|
+
- Diagram rule: process diagrams must be Feishu whiteboards.
|
|
15
|
+
|
|
16
|
+
3. **总体业务架构**
|
|
17
|
+
- Main lifecycle.
|
|
18
|
+
- Related flows.
|
|
19
|
+
- Public support objects.
|
|
20
|
+
- BPMAX configuration object map.
|
|
21
|
+
|
|
22
|
+
4. **公共支撑配置**
|
|
23
|
+
- Only genuinely shared objects belong here.
|
|
24
|
+
- Examples: organization dictionary, BPMAX user model extensions, shared tool library, automation logs, role/navigation rules.
|
|
25
|
+
- Do not make public data sets independent business flows when the data belongs to a process.
|
|
26
|
+
|
|
27
|
+
5. **业务流程章节**
|
|
28
|
+
- Each business flow gets a full independent chapter.
|
|
29
|
+
- Use `per-flow-required-structure.md`.
|
|
30
|
+
- The first flow should be the end-to-end main lifecycle when the business has one.
|
|
31
|
+
|
|
32
|
+
6. **权限、导航、集成与自动化**
|
|
33
|
+
- Cross-flow permission rules, menus, Feishu/OpenClaw/API integration, automation logging, retry/fallback.
|
|
34
|
+
- Flow-specific automation remains in the owning flow section.
|
|
35
|
+
|
|
36
|
+
7. **BPMAX 可配置能力与需定制能力边界**
|
|
37
|
+
- Use the exact three labels:
|
|
38
|
+
- `BPMAX 配置可实现`
|
|
39
|
+
- `配置 + 脚本/API/现有插件`
|
|
40
|
+
- `需定制插件/外部服务`
|
|
41
|
+
|
|
42
|
+
8. **一期验收路径、风险与待确认事项**
|
|
43
|
+
- End-to-end acceptance path.
|
|
44
|
+
- Acceptance metrics.
|
|
45
|
+
- Risks and unresolved business decisions.
|
|
46
|
+
|
|
47
|
+
## Feishu Document Requirements
|
|
48
|
+
|
|
49
|
+
- Use Docx XML through `lark-cli docs ... --api-version v2`.
|
|
50
|
+
- Use tables for field dictionaries, node configuration, writeback rules, and implementation boundaries.
|
|
51
|
+
- Use `<whiteboard type="mermaid">...</whiteboard>` or another Feishu whiteboard resource block for process diagrams.
|
|
52
|
+
- Avoid code blocks for diagrams in final output.
|
|
53
|
+
- When updating existing docs, prefer block-level precise updates and preserve existing resource tokens.
|
|
54
|
+
|
|
55
|
+
## Blueprint Tone
|
|
56
|
+
|
|
57
|
+
- Write for implementers and reviewers.
|
|
58
|
+
- Be specific enough for BPMAX configuration without inventing unconfirmed personal names or private data.
|
|
59
|
+
- Use role names, flow names, field types, triggers, writeback behavior, and validation rules.
|
|
60
|
+
- Label uncertain items as “待业务确认” only in a dedicated “待确认事项” section, not inside required flow structure.
|