bpmax-cli 0.2.1-beta.9 → 0.2.1-beta.90
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 +30 -7
- package/dist/bin.js +45185 -12834
- package/dist/bin.js.map +1 -1
- package/package.json +12 -5
- package/scripts/install-skills.mjs +27 -60
- package/scripts/run-source-cli.mjs +145 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +17 -1
- package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +141 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +43 -3
- package/skills/bpmax-api-platform-editor/SKILL.md +24 -31
- package/skills/bpmax-api-platform-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-api-platform-editor/references/platform-api-map.md +2 -2
- package/skills/bpmax-api-platform-editor/references/runtime-workflow.md +3 -3
- package/skills/bpmax-approval-matrix/SKILL.md +54 -2
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +38 -5
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +24 -8
- package/skills/bpmax-blueprint-doc-workflow/references/business-language.md +74 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
- package/skills/bpmax-blueprint-doc-workflow/references/review-and-confirmation-dialogue.md +70 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-review-record.xml +72 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +59 -35
- package/skills/bpmax-blueprint-doc-workflow/references/sample-system-identifier.xml +79 -0
- package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +586 -5
- package/skills/bpmax-bug-reporting/SKILL.md +72 -0
- package/skills/bpmax-builder-shared/SKILL.md +1 -0
- package/skills/bpmax-builder-shared/configuration-impact-review.md +76 -0
- package/skills/bpmax-builder-shared/template_script_hard_rules.py +3 -1
- package/skills/bpmax-builder-shared/tests/test_template_script_hard_rules.py +16 -0
- package/skills/bpmax-business-skill/SKILL.md +3 -1
- package/skills/bpmax-cli/SKILL.md +46 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +113 -523
- package/skills/bpmax-console-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-console-template-editor/references/full-detail-guide.md +45 -0
- package/skills/bpmax-console-template-editor/references/local-temp-workflow.md +13 -12
- package/skills/bpmax-console-template-editor/scripts/console_template_editor_common.py +299 -78
- package/skills/bpmax-console-template-editor/tests/test_console_template_editor.py +344 -30
- package/skills/bpmax-dataset-field-template-editor/SKILL.md +131 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
- package/skills/bpmax-dataset-field-template-editor/references/runtime-verified-field-page-shape.md +1 -1
- package/skills/bpmax-dataset-field-template-editor/scripts/dataset_field_editor_common.py +11 -77
- package/skills/bpmax-dataset-field-template-editor/scripts/export_dataset_field.py +4 -57
- package/skills/bpmax-dataset-field-template-editor/scripts/init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-field-template-editor/scripts/inspect_dataset_field_runtime.py +4 -78
- package/skills/bpmax-dataset-field-template-editor/scripts/submit_dataset_field.py +3 -89
- package/skills/bpmax-dataset-field-template-editor/tests/test_dataset_field_editor.py +14 -0
- package/skills/bpmax-dataset-field-template-editor/tests/test_init_create_dataset_field.py +2 -0
- package/skills/bpmax-dataset-template-editor/SKILL.md +123 -778
- package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -0
- package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
- package/skills/bpmax-dataset-template-editor/references/ui-to-backend-field-map.md +1 -0
- package/skills/bpmax-dataset-template-editor/references/work-file-to-submit-mapping.md +2 -2
- package/skills/bpmax-dataset-template-editor/scripts/basic_table_audit.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/dataset_editor_common.py +9 -90
- package/skills/bpmax-dataset-template-editor/scripts/export_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/resolve_dataset.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/submit_dataset.py +1 -2
- package/skills/bpmax-dataset-template-editor/scripts/verify_dataset_list.py +8 -1
- package/skills/bpmax-dataset-template-editor/scripts/verify_publish_health.py +8 -1
- package/skills/bpmax-dataset-template-editor/tests/test_dataset_editor.py +6 -40
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +18 -4
- package/skills/bpmax-e2e-flow-config-orchestrator/agents/openai.yaml +2 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +13 -9
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +174 -546
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +181 -15
- package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +169 -0
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +15 -7
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +589 -0
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +12 -8
- package/skills/bpmax-e2e-flow-test-operator/references/negative-sale-api-matrix.md +4 -4
- package/skills/bpmax-e2e-flow-test-operator/references/profile-schema.md +1 -1
- package/skills/bpmax-e2e-flow-test-operator/references/state-schema.md +3 -1
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_doc.py +7 -5
- package/skills/bpmax-e2e-flow-test-operator/scripts/e2e_state.py +2 -2
- package/skills/bpmax-e2e-flow-test-operator/scripts/flow_runner.py +5 -1
- package/skills/bpmax-e2e-flow-test-operator/tests/test_negative_sale_api_tools.py +71 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +64 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/autonomous-execution.md +40 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +92 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
- package/skills/bpmax-filter-template-editor/SKILL.md +114 -551
- package/skills/bpmax-filter-template-editor/references/experience-coverage-matrix.md +18 -18
- package/skills/bpmax-filter-template-editor/references/filter-content-schema.md +21 -0
- package/skills/bpmax-filter-template-editor/references/filter-request-shape.md +29 -26
- package/skills/bpmax-filter-template-editor/references/filter-runtime-patterns.md +19 -2
- package/skills/bpmax-filter-template-editor/references/full-detail-guide.md +56 -0
- package/skills/bpmax-filter-template-editor/references/runtime-verified-filter-page-shape.md +10 -9
- package/skills/bpmax-filter-template-editor/scripts/filter_template_editor_common.py +7 -57
- package/skills/bpmax-filter-template-editor/tests/test_filter_template_editor.py +4 -48
- package/skills/bpmax-flow/SKILL.md +2 -0
- package/skills/bpmax-flow-detail-template-editor/SKILL.md +53 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +132 -1137
- package/skills/bpmax-flow-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-flow-template-editor/references/diff-strategy.md +3 -3
- package/skills/bpmax-flow-template-editor/references/editor-runtime-vs-draft.md +9 -9
- package/skills/bpmax-flow-template-editor/references/flow-template-api-workflow.md +2 -1
- package/skills/bpmax-flow-template-editor/references/full-detail-guide.md +1162 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-flow-template-editor/references/message-card-professional-standard.md +234 -0
- package/skills/bpmax-flow-template-editor/references/payload-checklist.md +2 -0
- package/skills/bpmax-flow-template-editor/references/project-create-runtime-gotchas.md +17 -0
- package/skills/bpmax-flow-template-editor/references/requirement-to-node-mapping.md +8 -3
- package/skills/bpmax-flow-template-editor/references/runtime-verified-flow-detail-shape.md +7 -7
- package/skills/bpmax-flow-template-editor/references/runtime-verified-meta-fields.md +2 -2
- package/skills/bpmax-flow-template-editor/references/runtime-verified-node-fields.md +12 -2
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
- package/skills/bpmax-flow-template-editor/references/script-review-hard-rules.md +17 -0
- package/skills/bpmax-flow-template-editor/references/work-file-to-submit-mapping.md +1 -1
- package/skills/bpmax-flow-template-editor/tests/test_flow_template_editor.py +19 -75
- package/skills/bpmax-form-template-editor/SKILL.md +138 -1151
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +167 -0
- package/skills/bpmax-form-template-editor/references/form-template-api-workflow.md +51 -51
- package/skills/bpmax-form-template-editor/references/full-detail-guide.md +1115 -0
- package/skills/bpmax-form-template-editor/references/local-temp-workflow.md +4 -4
- package/skills/bpmax-form-template-editor/references/payload-checklist.md +3 -1
- package/skills/bpmax-form-template-editor/references/sub-form-patterns.md +6 -0
- package/skills/bpmax-form-template-editor/scripts/form_template_editor_common.py +8 -0
- package/skills/bpmax-form-template-editor/tests/test_form_template_editor.py +42 -19
- package/skills/bpmax-functional-test-design/LICENSE.upstream +24 -0
- package/skills/bpmax-functional-test-design/SKILL.md +80 -0
- package/skills/bpmax-functional-test-design/agents/openai.yaml +4 -0
- package/skills/bpmax-functional-test-design/references/bpmax-test-suite-output.md +95 -0
- package/skills/bpmax-functional-test-design/references/decision-table-testing.md +50 -0
- package/skills/bpmax-functional-test-design/references/domain-testing.md +43 -0
- package/skills/bpmax-functional-test-design/references/state-transition-testing.md +47 -0
- package/skills/bpmax-functional-test-design/references/technique-selection.md +38 -0
- package/skills/bpmax-functional-test-design/references/use-case-testing.md +55 -0
- package/skills/bpmax-group-model-editor/SKILL.md +24 -0
- package/skills/bpmax-home-portal-editor/SKILL.md +81 -0
- package/skills/bpmax-icon-catalog/SKILL.md +18 -0
- package/skills/bpmax-icon-catalog/agents/openai.yaml +4 -0
- package/skills/bpmax-icon-catalog/assets/ri-icons.json +3140 -0
- package/skills/bpmax-icon-catalog/references/source-contract.md +3 -0
- package/skills/bpmax-list-template-editor/SKILL.md +133 -466
- package/skills/bpmax-list-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +16 -4
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +461 -0
- package/skills/bpmax-list-template-editor/references/list-template-api-workflow.md +6 -9
- package/skills/bpmax-list-template-editor/references/local-temp-workflow.md +1 -1
- package/skills/bpmax-list-template-editor/references/runtime-verified-workflow.md +50 -2
- package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
- package/skills/bpmax-list-template-editor/scripts/list_template_editor_common.py +9 -78
- package/skills/bpmax-memory-protocol/SKILL.md +7 -6
- package/skills/bpmax-nav-config-editor/SKILL.md +14 -17
- package/skills/bpmax-nav-config-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +2 -2
- package/skills/bpmax-nav-config-editor/references/runtime-probing.md +11 -12
- package/skills/bpmax-page-composition-template-editor/SKILL.md +398 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/catalog.json +41 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/full-capability-workbench.json +294 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-detail-step-panel.json +184 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-list-quick-process.json +177 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-dashboard.json +400 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/project-operations-visual-light.json +214 -0
- package/skills/bpmax-page-composition-template-editor/examples/presets/step-related-projects.json +184 -0
- package/skills/bpmax-page-composition-template-editor/references/resource-api.md +9 -0
- package/skills/bpmax-plugin-config/SKILL.md +55 -5
- package/skills/bpmax-project/SKILL.md +37 -1
- package/skills/bpmax-project-detail-template-editor/SKILL.md +13 -39
- package/skills/bpmax-project-detail-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-role-editor/SKILL.md +11 -30
- package/skills/bpmax-shared/SKILL.md +19 -9
- package/skills/bpmax-team-editor/SKILL.md +27 -0
- package/skills/bpmax-ui-ux-audit/LICENSE.upstream +23 -0
- package/skills/bpmax-ui-ux-audit/SKILL.md +42 -0
- package/skills/bpmax-ui-ux-audit/agents/openai.yaml +4 -0
- package/skills/bpmax-ui-ux-audit/references/audit-framework.md +39 -0
- package/skills/bpmax-ui-ux-audit/references/bpmax-ux-findings.md +56 -0
- package/skills/bpmax-user/SKILL.md +33 -1
- package/skills/bpmax-user-mock-operator/SKILL.md +58 -56
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +1766 -0
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/bpmax-workspace-editor/SKILL.md +1 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +3 -1
- package/skills/bpmax-user-mock-operator/scripts/switch_user_identity.py +0 -37
- package/skills/bpmax-user-mock-operator/scripts/user_mock_operator_common.py +0 -136
- package/skills/bpmax-user-mock-operator/tests/test_user_mock_operator.py +0 -138
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-bug-reporting
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Use when a stable bpmax-cli bug, regression, unsafe default, misleading diagnostic, missing lint, or skill/CLI mismatch should be proactively reported to the bpmax-cli GitLab issue tracker.
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["bpmax-cli"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BPMAX Bug Reporting
|
|
11
|
+
|
|
12
|
+
Use this skill to proactively report bpmax-cli defects that are stable, reproducible, and actionable. The default target is the `bpmax/bpmax-cli` GitLab project through `bpmax-cli issue report`.
|
|
13
|
+
|
|
14
|
+
## Trigger
|
|
15
|
+
|
|
16
|
+
Report proactively when current work exposes one of these bpmax-cli-owned problems:
|
|
17
|
+
|
|
18
|
+
- A reproducible CLI crash, regression, wrong exit status, or misleading JSON/error output.
|
|
19
|
+
- A missing or bypassable lint rule that allowed unsafe config, test, skill, or credential behavior.
|
|
20
|
+
- A typed capability, skill instruction, or generated command that disagrees with the implemented CLI surface.
|
|
21
|
+
- A dangerous default that can leak credentials, submit unintended writes, or hide failed verification.
|
|
22
|
+
- A repeated agent workflow failure where the root cause belongs in bpmax-cli or bundled skills, not in customer config.
|
|
23
|
+
|
|
24
|
+
Do not report proactively for customer business configuration issues, temporary environment instability, missing user authorization, one-off dirty-worktree effects, or unverified guesses.
|
|
25
|
+
|
|
26
|
+
## Draft
|
|
27
|
+
|
|
28
|
+
Write a short Markdown draft first. It must include these sections:
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## 现象
|
|
32
|
+
## 复现
|
|
33
|
+
## 期望行为
|
|
34
|
+
## 实际行为
|
|
35
|
+
## 影响范围
|
|
36
|
+
## 已验证排除项
|
|
37
|
+
## 建议修复方向
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Keep the draft actionable. Summarize logs and payloads; do not paste large raw responses. Never include API Key, Authorization, token, password, cookie, verification code, SMS code, phone number, or full raw payloads.
|
|
41
|
+
|
|
42
|
+
## Lint Gate
|
|
43
|
+
|
|
44
|
+
Run the built-in lint before dry-run or submission:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bpmax-cli issue lint --title "<标题>" --description-file <draft.md> --format json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The lint must return `ok: true`. If it fails, fix the draft instead of creating a low-quality issue.
|
|
51
|
+
|
|
52
|
+
## Dry Run Gate
|
|
53
|
+
|
|
54
|
+
After lint passes, inspect the payload with dry-run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bpmax-cli issue report --title "<标题>" --description-file <draft.md> --label bug --dry-run --format json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check that the title, description, labels, project, assignee, and confidentiality flag are correct. Confirm that the dry-run output contains no sensitive material.
|
|
61
|
+
|
|
62
|
+
## Submit
|
|
63
|
+
|
|
64
|
+
Submit only after lint and dry-run are clean:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bpmax-cli issue report --title "<标题>" --description-file <draft.md> --label bug --format json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The CLI must not reject the command merely because `GITLAB_TOKEN` is absent. It submits first without a token header; if an unauthenticated private project is hidden as HTTP 404, or GitLab returns 401/403, it should then prompt for `GITLAB_TOKEN`, `GL_TOKEN`, `PRIVATE_TOKEN`, or a variable named by `--token-env`. When a token was sent, a 403 is a permission failure rather than a missing-token prompt. Never open a browser as an authentication fallback, and never put token text in a command, skill, memory, issue body, test fixture, or source code.
|
|
71
|
+
|
|
72
|
+
After creation, return the GitLab issue URL from `issue.web_url` and mention the lint/dry-run evidence used.
|
|
@@ -32,6 +32,7 @@ description: "BPMAX 配置类 skill 的共享规则和脚本库。用于复用
|
|
|
32
32
|
- `skill_audit.py`:配置类 skill 静态审计。
|
|
33
33
|
- `runtime-script-site-matrix.md`:运行时脚本站点矩阵说明。
|
|
34
34
|
- `runtime-script-template-catalog.md`:模板脚本分类参考。
|
|
35
|
+
- `configuration-impact-review.md`:字段、稳定 key、类型、权限、脚本、来源或模板绑定变化后的跨配置影响审查和下一步建议。
|
|
35
36
|
|
|
36
37
|
## 验证
|
|
37
38
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# 配置变更影响审查
|
|
2
|
+
|
|
3
|
+
配置对象自己的 lint、build、submit、verify 通过,只能证明该对象配置合法且写入一致,不能证明所有下游引用仍然兼容。字段、模板绑定、数据来源、脚本值形态或页面入口发生变化时,必须补做影响审查。
|
|
4
|
+
|
|
5
|
+
## 标准命令
|
|
6
|
+
|
|
7
|
+
使用导出时保存的 raw 基线和修改后的 work 文件运行:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
bpmax-cli config <domain> impact \
|
|
11
|
+
--raw <raw-file> \
|
|
12
|
+
--work <work-file> \
|
|
13
|
+
--out <impact-report.json> \
|
|
14
|
+
--profile <profile> \
|
|
15
|
+
--format json
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
新建配置没有 raw 基线时省略 `--raw`,CLI 会按空基线分析新增标识和潜在引用。
|
|
19
|
+
|
|
20
|
+
CLI 会从当前 BPMAX 配置目录向下扫描 `think_*` 配置,输出:
|
|
21
|
+
|
|
22
|
+
- `changed_identifiers`:新增、删除、改名、类型变化、可见性/可编辑性等行为变化的稳定标识。
|
|
23
|
+
- `references_found`:本地配置镜像中命中的数据集字段、数据集、流程、页面模板、配置脚本等引用。
|
|
24
|
+
- `required_collateral_candidates`:高风险变化命中现有引用时,需要逐项确认的联动修改候选。
|
|
25
|
+
- `recommended_next_steps`:建议继续检查或修改的配置面。
|
|
26
|
+
- `unverified_surfaces`:本地扫描不能证明的线上脚本、插件运行态、真实页面或 E2E 面。
|
|
27
|
+
|
|
28
|
+
`references_found` 只证明“发现引用”,不证明引用一定需要修改;`unverified_surfaces` 也不等于缺陷。Agent 必须结合字段值形态、业务语义和运行态判断,不能机械批量改写。
|
|
29
|
+
|
|
30
|
+
## 必须执行的变化
|
|
31
|
+
|
|
32
|
+
以下变化必须在 build 前运行 impact,并把报告纳入 work diff 确认:
|
|
33
|
+
|
|
34
|
+
- 字段或业务 key 新增、删除、改名。
|
|
35
|
+
- 字段类型、值结构、选项值、默认值变化。
|
|
36
|
+
- 隐藏、只读、必填、字段权限、动态条件变化。
|
|
37
|
+
- lambda、校验、联动、查询、格式化或提交脚本变化。
|
|
38
|
+
- 数据集字段来源、关联字段、mapping、`custom_key` 变化。
|
|
39
|
+
- 表单、列表、筛选、详情、看板、导航或环节模板绑定变化。
|
|
40
|
+
- 流程节点、条件路由、owner、抄送、模板引用变化。
|
|
41
|
+
|
|
42
|
+
纯文案、间距、布局、列宽等确认不改变稳定标识和值语义的展示修改,可以产生 `impact_status=no_identifier_changes`,但仍要保留报告作为“未发生标识变化”的证据。
|
|
43
|
+
|
|
44
|
+
## 范围与确认
|
|
45
|
+
|
|
46
|
+
影响报告必须转换为以下交付分类:
|
|
47
|
+
|
|
48
|
+
- `checked-and-compatible`:已检查且无需修改,说明判断依据。
|
|
49
|
+
- `required-collateral`:不修改会导致读取错误、值形态不兼容、页面缺列、条件失效或运行时报错;逐项解释并等待用户确认。
|
|
50
|
+
- `recommended-next-step`:不阻断当前对象提交,但建议后续优化或重新验证。
|
|
51
|
+
- `unverified`:本地配置无法证明,必须依靠线上 readback、真实页面、插件状态或 E2E 验证。
|
|
52
|
+
|
|
53
|
+
不得因为报告发现引用就擅自修改其它对象,也不得在存在未确认的 `required-collateral` 时继续 build/submit。
|
|
54
|
+
|
|
55
|
+
## 常见关联面
|
|
56
|
+
|
|
57
|
+
表单字段变化至少检查:
|
|
58
|
+
|
|
59
|
+
- 数据集字段的 `source_field`、字段类型和返回值形态。
|
|
60
|
+
- 数据集字段关联、处理脚本和 ES mapping。
|
|
61
|
+
- 列表列、筛选器、项目详情、环节详情和看板模块。
|
|
62
|
+
- 流程条件、节点脚本、消息脚本和表单运行时脚本。
|
|
63
|
+
- 正式测试用例、测试数据和真实页面回归。
|
|
64
|
+
|
|
65
|
+
数据集或数据集字段变化至少检查页面模板、查询脚本、发布/刷新状态和样本数据。流程或模板绑定变化至少检查导航入口、创建页、列表/详情页、节点页面和完整 E2E 链路。
|
|
66
|
+
|
|
67
|
+
## 最终输出
|
|
68
|
+
|
|
69
|
+
配置任务结束时必须说明:
|
|
70
|
+
|
|
71
|
+
1. 改了哪些稳定标识或行为。
|
|
72
|
+
2. 扫描了哪些配置目录和对象。
|
|
73
|
+
3. 哪些引用已确认兼容。
|
|
74
|
+
4. 哪些联动修改已完成或等待确认。
|
|
75
|
+
5. 哪些面仍未验证。
|
|
76
|
+
6. 建议用户下一步继续修改或测试什么。
|
|
@@ -49,7 +49,9 @@ INVENTORY_AGG_BLOCK_MESSAGE = (
|
|
|
49
49
|
SQL_JOIN_PATTERN = re.compile(r"\bselect\b[\s\S]{0,800}\bjoin\b", re.IGNORECASE)
|
|
50
50
|
ES_QUERY_PATTERN = re.compile(r"raw-es-search|ctx\.\$esQuery", re.IGNORECASE)
|
|
51
51
|
PROJECT_LIST_PATTERN = re.compile(r"/bpmax/project/list|ESProjectList|esProjectList")
|
|
52
|
-
USER_SCOPE_PROJECT_LIST_ALLOW_PATTERN = re.compile(
|
|
52
|
+
USER_SCOPE_PROJECT_LIST_ALLOW_PATTERN = re.compile(
|
|
53
|
+
r"bpmax-allow-user-scope-project-list[ \t]*:[ \t]*[^\s\r\n][^\r\n]{2,}"
|
|
54
|
+
)
|
|
53
55
|
ES_SIZE_PATTERN = re.compile(r"\bsize\s*:\s*(\d{3,})\b")
|
|
54
56
|
SCRIPT_MATCH_PATTERN = re.compile(r"\.(?:find|filter|some)\s*\(|\.includes\s*\(")
|
|
55
57
|
FRONTEND_COUNTING_PATTERN = re.compile(r"\b(?:inventoryQty|currentInventory|currentStock|total_count|count)\s*(?:\+\+|\+=\s*1)")
|
|
@@ -112,6 +112,22 @@ class TemplateScriptHardRulesTests(unittest.TestCase):
|
|
|
112
112
|
self.assertTrue(report["ok"])
|
|
113
113
|
self.assertEqual(report["findings"], [])
|
|
114
114
|
|
|
115
|
+
def test_rejects_empty_user_scope_project_list_waiver(self) -> None:
|
|
116
|
+
report = scan_named_script_surfaces(
|
|
117
|
+
[
|
|
118
|
+
{
|
|
119
|
+
"path": "fields.selector.lambda",
|
|
120
|
+
"script": (
|
|
121
|
+
"// bpmax-allow-user-scope-project-list:\n"
|
|
122
|
+
"return ctx.$axios.post('/bpmax/project/list?page=1', { flow_type: 'flow716' });"
|
|
123
|
+
),
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
self.assertFalse(report["ok"])
|
|
129
|
+
self.assertTrue(any(item["rule"] == "project_list_forbidden" for item in report["findings"]))
|
|
130
|
+
|
|
115
131
|
def test_blocks_root_user_es_project_list_helper(self) -> None:
|
|
116
132
|
report = scan_named_script_surfaces(
|
|
117
133
|
[
|
|
@@ -31,9 +31,11 @@ bpmax-cli --config-dir <config_dir> bbs uninstall <skill-key> --agent openclaw -
|
|
|
31
31
|
- `bbs sync` 只安装 `bpmax-business-skill-catalog`,不安装所有业务 skill。
|
|
32
32
|
- 使用业务 skill 前先运行 `bbs ensure <skill-key>`。
|
|
33
33
|
- `bbs ensure` 会自动检测远端最新版本;本地缺失或版本落后时直接安装/更新。
|
|
34
|
+
- 对 Codex 等目录型 agent,`bbs sync/ensure/install/update` 将 Skill 安装到当前工作目录下的 agent Skill 目录,例如 `./.codex/skills`,不会写入用户主目录下的全局 Skill 目录。
|
|
35
|
+
- OpenClaw 通过 `openclaw agents list --json` 解析目标 Agent,并安装到该 Agent 的 `<workspace>/skills`。存在多个 Agent 时必须传 `--openclaw-agent-id` 或由可信运行时提供 `OPENCLAW_AGENT_ID`,否则停止安装。
|
|
34
36
|
- 执行业务 BBS 的状态变更前,先按 `bbs.json.gates.preflight` 调用 `bbs gate ... --stage preflight`;失败时停止,不要继续执行。
|
|
35
37
|
- 状态变更完成后,按 `bbs.json.gates.verify` 调用 `bbs gate ... --stage verify`;失败时不要声称业务处理成功。
|
|
36
|
-
- OpenClaw 场景不要提示用户手动复制 skill
|
|
38
|
+
- OpenClaw 场景不要提示用户手动复制 skill,也不要安装到 `~/.openclaw/skills` 或当前目录的 `./.openclaw/skills`;BBS 必须归属到选定 Agent 的 workspace。
|
|
37
39
|
|
|
38
40
|
## 发布 BBS
|
|
39
41
|
|
|
@@ -15,6 +15,8 @@ metadata:
|
|
|
15
15
|
## Agent 基础行为
|
|
16
16
|
|
|
17
17
|
- 先应用 `../bpmax-shared/SKILL.md` 的命令发现、profile/auth 检查、全局参数、JSON 输出、URL 生成和原始 API 降级规则。
|
|
18
|
+
- 每次读取 CLI JSON 对象时都必须检查 `_notice`。出现 `_notice.update` 或 `_notice.skills` 时,先向用户简要说明当前版本、目标版本和更新渠道,再逐字执行其中的 `next_command`;更新失败则停止后续 BPMAX 配置或正式 E2E,不得继续混用旧 CLI 与旧 Skills。JSON 数组、NDJSON、table 和错误输出中的通知会写到 stderr,也必须读取。
|
|
19
|
+
- beta 版本只跟踪 npm `beta` 渠道,稳定版本只跟踪 `latest` 渠道。不要把 beta 与 stable 的比较结果混在一起,也不要自行改写通知返回的更新命令。
|
|
18
20
|
- 未初始化时,不要直接编造 profile、config-dir 或 API Key;先要求用户提供 BPMAX workspace 页面 URL。Agent 多用户环境必须从可信 runtime metadata 读取稳定用户/会话 scope,优先使用 channel + peer/user,至少使用 user id,再运行:
|
|
19
21
|
|
|
20
22
|
```bash
|
|
@@ -24,7 +26,12 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
24
26
|
- `init` 返回后,Agent 必须展示 `message_card.authorization_url` 和 `message_card.user_code` 给用户;用户确认短码后,逐字执行 `message_card.next_command`,不要从 `message_card.next_action` 自然语言里猜命令。
|
|
25
27
|
- `profile`、`config_dir` 的最终值只以 `init` JSON 返回为准;不要自行拼接或复用 `local`/共享 `~/.bpmax`。后续检查优先复制 `next_commands.profile_list/auth_status/bbs_list`,不要裸跑 `config profile list`、`auth status` 或 `bbs list`。
|
|
26
28
|
- 授权完成后,CLI 会基于当前 API Key 从 `huanpingtong-server` 探查可用 capability。不要假设所有命令可用;如果命令提示缺少 capability,先运行 `bpmax-cli --config-dir <config_dir> capabilities refresh --profile <profile> --format json`,仍缺失则停止并向用户说明当前账号无该 CLI 能力。
|
|
29
|
+
- 不得因为 API Key 未开启配置能力而停止流程枚举。浏览候选流程使用 `bpmax-cli flow list`(以及按需使用 `flow options/get`),由独立的 `flow.list` / `flow.options` / `flow.get` capability 和当前用户的流程读取权限决定;`configuration.manage` 仅作为流程模板配置写操作的门禁。
|
|
27
30
|
- 如果授权完成输出 `next_commands.config_workspace_init`,需要配置工作区时必须复制该命令并补齐 `<env>` 与 `--workspace-dir <dir>`。该命令会从 BPMAX 平台配置库读取 Git 地址和 sysconfigdiff 凭据,clone 或绑定本地 workspace,并生成 `AGENTS.md`;不要用 `config-env add` 手写配置库账号密码。
|
|
31
|
+
- 授权初始化与本地配置目录初始化是两个阶段。执行配置任务前必须先完成 `config workspace init`,再进入生成的 sysconfig 目录或其子目录;这里的“配置目录”不是 BPMAX 的 `w:xxx` 业务工作区。
|
|
32
|
+
- 配置类命令由 CLI 自动校验当前目录:向上查找同时包含 `AGENTS.md`、`think_configuration/`、`think_flow/`、`think_form_template/` 的最近目录,并核对它是否绑定到当前 profile。用户不需要额外说“请检查当前目录”,Agent 也不得绕过或通过切换 profile 猜测环境。
|
|
33
|
+
- CLI 返回 `config_workspace_required`、`config_workspace_profile_mismatch` 或 `config_workspace_environment_unbound` 时,停止读取 work、生成 payload 和远端配置请求;按提示重新执行 `config workspace init` 修复后,进入该目录重试。
|
|
34
|
+
- 配置对象发生字段、稳定 key、类型、权限、脚本、数据来源或模板绑定变化时,单对象 lint/verify 不代表关联面兼容。进入对应编辑 Skill 后必须运行 `bpmax-cli config <domain> impact --raw <raw> --work <work> --format json`,向用户说明已检查引用、必须联动项、未验证面和下一步建议;不得自动批量修改命中的其它配置。
|
|
28
35
|
|
|
29
36
|
## 业务需求优先 BBS
|
|
30
37
|
|
|
@@ -33,11 +40,46 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
33
40
|
- 找到匹配业务 skill 后,先复制 `next_commands.bbs_list` 里的 `--config-dir` 前缀运行 `bpmax-cli --config-dir <config_dir> bbs ensure <skill-key> --agent <agent> --profile <profile> --format json`,再按该业务 skill 的规则执行。
|
|
34
41
|
- 只有没有匹配 BBS,或 BBS 不覆盖当前需求时,才回落到通用 `bpmax-flow`、`bpmax-project` 或 `bpmax-api` 路径。
|
|
35
42
|
|
|
43
|
+
## Issue 提报
|
|
44
|
+
|
|
45
|
+
用户要求“提 issue”、“创建 GitLab issue”、“报 bug 到 bpmax-cli”或需要把当前问题沉淀到 bpmax-cli 仓库时,使用 `bpmax-cli issue create` 或语义别名 `bpmax-cli issue report`。
|
|
46
|
+
|
|
47
|
+
更完整的主动上报流程、质量门禁和 lint 要求见 `../bpmax-bug-reporting/SKILL.md`。发现稳定可复现的 bpmax-cli 自身问题时,先进入该 skill。
|
|
48
|
+
|
|
49
|
+
如果工作中发现 bpmax-cli 自身的稳定问题,也可以自动创建 issue,不需要等用户再次下达“提 issue”:
|
|
50
|
+
|
|
51
|
+
- 适用:可复现的 bpmax-cli 缺陷、回归、缺失 typed capability、错误/误导性诊断、lint 漏检、危险默认行为、skill 与 CLI 能力不一致。
|
|
52
|
+
- 不适用:客户业务配置缺陷、环境临时波动、权限未授权、证据不足的猜测、只在本地脏工作区出现的问题。这些先写入本轮报告或任务书,除非用户明确要求提到 bpmax-cli。
|
|
53
|
+
- 自动提报前必须先写一份精简 issue 描述文件,包含:现象、复现命令或最小步骤、期望行为、实际行为、影响范围、已验证的排除项、建议修复方向。
|
|
54
|
+
- 正式创建前必须先执行 `bpmax-cli issue create ... --dry-run --format json`,检查标题、正文、标签、项目、assignee 和保密标记;dry-run 中不得包含 token、API Key、cookie、手机号、完整 raw payload、客户敏感数据或大段日志。
|
|
55
|
+
- dry-run 检查通过且问题稳定可复现时,再去掉 `--dry-run` 创建;创建成功后最终回复必须给出 `issue.web_url`。
|
|
56
|
+
- 如果证据还不完整,先保留本地 notes/report,不要为了“自动提报”制造低质量 issue。
|
|
57
|
+
|
|
58
|
+
推荐流程:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bpmax-cli issue create --title "<标题>" --description-file <file.md> --label bug --dry-run --format json
|
|
62
|
+
bpmax-cli issue create --title "<标题>" --description-file <file.md> --label bug --format json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
规则:
|
|
66
|
+
|
|
67
|
+
- 默认 GitLab 地址是 `https://gitlab.yitaiyitai.com`,默认项目是 `bpmax/bpmax-cli`;跨项目时显式加 `--project <group/project>`。
|
|
68
|
+
- 复杂描述先写到临时 markdown 文件,再用 `--description-file <file>`,不要把长日志或多行正文塞进命令行参数。
|
|
69
|
+
- 涉及 assignee 时用 `--assignee-id <id>`,可重复或传逗号分隔;涉及保密问题时加 `--confidential`。
|
|
70
|
+
- 默认先跑 `--dry-run --format json` 核对标题、正文、标签、项目和 assignee;确认后再去掉 `--dry-run` 实际提交。
|
|
71
|
+
- 需要指定凭据来源时用 `--token-env <ENV_NAME>`;不要在命令行、skill、memory、issue 正文或日志里写入 token 原文。
|
|
72
|
+
- `issue create/report` 不得在请求前检查 `GITLAB_TOKEN` 是否存在;先直接提交。未携带 token 时,GitLab 返回 401/403,或私有项目以 404 隐藏资源后,才提示配置 `GITLAB_TOKEN`、`GL_TOKEN`、`PRIVATE_TOKEN` 或 `--token-env`。已携带 token 时,401 表示 token 被拒绝,403 必须保留为权限错误,不得误报为缺少 token;不得打开浏览器作为鉴权兜底。
|
|
73
|
+
- 创建成功后,最终回复必须包含 CLI 返回的 issue URL;`pretty` 输出会直接打印 URL,`json` 输出读取 `issue.web_url`。
|
|
74
|
+
|
|
36
75
|
## 路由规则
|
|
37
76
|
|
|
38
77
|
- 环境配置、全局参数、命令发现、原始 API 降级:先读 `../bpmax-shared/SKILL.md`
|
|
39
78
|
- 浏览器登录、API Key、认证状态:读 `../bpmax-auth/SKILL.md`
|
|
40
79
|
- 当前用户:读 `../bpmax-user/SKILL.md`
|
|
80
|
+
- 团队、部门层级和团队管理员配置:读 `../bpmax-team-editor/SKILL.md`
|
|
81
|
+
- 用户模型配置:读 `../bpmax-user-model-editor/SKILL.md`
|
|
82
|
+
- 团队模型配置:读 `../bpmax-group-model-editor/SKILL.md`
|
|
41
83
|
- 刷新配置库、同步最新配置、latest pull:读 `../bpmax-config-latest/SKILL.md`
|
|
42
84
|
- 流程列表、流程选项、流程详情:读 `../bpmax-flow/SKILL.md`
|
|
43
85
|
- 项目列表、项目详情、我的待办、最小创建:读 `../bpmax-project/SKILL.md`
|
|
@@ -46,9 +88,13 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
46
88
|
- 系统内页面 URL 生成:先读 `../bpmax-shared/SKILL.md` 的“系统内 URL 生成”
|
|
47
89
|
- 本地 schema manifest:读 `../bpmax-schema/SKILL.md`
|
|
48
90
|
- 服务端能力白名单:先用 `capabilities status/refresh` 查看当前 profile 已授权 capability,不要绕过白名单手写 raw API
|
|
91
|
+
- 插件安装、组织/工作区激活、插件提供的配置 Skill:先进入 `../bpmax-plugin-config/SKILL.md`。先用 typed activation overview 证明插件在目标工作区生效,再按远端 sha256 发现或更新 Skill;依赖过期或冲突 Skill 的配置 lint/build/submit 不得继续。
|
|
92
|
+
- 流程门户、工作流门户、门户入口配置:读 `../bpmax-home-portal-editor/SKILL.md`
|
|
93
|
+
- 独立跨页面组合模板、Vue/Less、模板专属静态资源上传与引用:读 `../bpmax-page-composition-template-editor/SKILL.md`。
|
|
49
94
|
- BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
|
|
50
95
|
- AI 任务方案、任务书、任务拆解、subagent 分工、实施任务表、进度 CSV:读 `../bpmax-ai-taskbook/SKILL.md`
|
|
51
96
|
- 审批矩阵、角色矩阵、矩阵规则记录、`matrix_owner`、`cc_matrix`、规则 seed、审批人映射:读 `../bpmax-approval-matrix/SKILL.md`
|
|
97
|
+
- bpmax-cli 自身问题提报、GitLab issue 创建、主动 bug 上报:读 `../bpmax-bug-reporting/SKILL.md`
|
|
52
98
|
|
|
53
99
|
## 规则
|
|
54
100
|
|
|
@@ -26,6 +26,7 @@ bpmax-cli config workspace init <env> --profile <profile> --workspace-dir <dir>
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
`config workspace init` 会从 BPMAX 平台配置库读取 Git 地址和 sysconfigdiff 地址,clone 或绑定本地 sysconfig 仓库,并更新 `AGENTS.md`。不要让用户手写配置库密码。
|
|
29
|
+
5. 进入该 env 对应的 sysconfig 根目录或其子目录后再执行 latest。CLI 会根据目录结构和 profile 绑定自动检查,不接受在其它环境目录中对目标 env 执行 pull/diff。
|
|
29
30
|
|
|
30
31
|
## 标准命令
|
|
31
32
|
|
|
@@ -50,6 +51,7 @@ bpmax-cli --config-dir <config_dir> config latest pull <env> --profile <profile>
|
|
|
50
51
|
## 执行规则
|
|
51
52
|
|
|
52
53
|
- latest pull 必须由 CLI 读取平台配置库中的 Git 地址、账号、密码和 PULL/EXTRACT/PUSH URL。
|
|
54
|
+
- `config latest pull/diff <env>` 必须从该 `<env>` 已绑定的本地配置目录或其子目录执行。不要在普通代码仓库、其它 profile 的 sysconfig 目录或另一个 env 的目录中运行,也不要自动切换 profile 绕过门禁。
|
|
53
55
|
- 不要让用户手写或在对话中暴露配置库密码、API Key、Authorization、token、验证码、手机号等敏感信息。
|
|
54
56
|
- 不要直接运行旧的配置库脚本、curl、raw API 或页面 fetch 来替代 `bpmax-cli config latest pull`。
|
|
55
57
|
- 如果本地 sysconfig 仓库有未提交变更,先向用户说明变更风险;只有用户确认或任务计划明确允许时,才追加 `--allow-dirty` 重试。
|
|
@@ -67,5 +69,7 @@ bpmax-cli --config-dir <config_dir> config latest pull <env> --profile <profile>
|
|
|
67
69
|
- `missing config.latest.pull capability`:当前账号或 API Key 未开启配置能力,重新授权并在授权页勾选配置能力。
|
|
68
70
|
- `config repository environment not found`:平台配置库没有该环境,先在平台配置库页面补齐环境。
|
|
69
71
|
- `sysconfig repo path is missing`:先执行 `config workspace init <env>` 绑定本地 workspace。
|
|
72
|
+
- `config_workspace_required`:当前路径缺少有效配置目录结构;运行 `config workspace init` 修复目录后进入该目录重试。
|
|
73
|
+
- `config_workspace_profile_mismatch` / `config_workspace_environment_unbound`:当前目录与所选 profile/env 的初始化绑定不一致;修复绑定,不要切换 profile 猜测目标。
|
|
70
74
|
- `dirty worktree`:先向用户说明本地未提交变更;确认后才允许 `--allow-dirty`。
|
|
71
75
|
- `remote mismatch`:本地目录不是当前环境的配置库;除非用户明确确认,否则不要使用 `--force` 重新绑定。
|