bpmax-cli 0.2.1-beta.53 → 0.2.1-beta.55

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 (38) hide show
  1. package/dist/bin.js +6404 -1333
  2. package/dist/bin.js.map +1 -1
  3. package/package.json +1 -1
  4. package/scripts/install-skills.mjs +21 -57
  5. package/skills/bpmax-ai-taskbook/SKILL.md +10 -0
  6. package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +120 -0
  7. package/skills/bpmax-ai-taskbook/references/taskbook-template.md +41 -1
  8. package/skills/bpmax-blueprint-doc-workflow/SKILL.md +15 -2
  9. package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +8 -0
  10. package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
  11. package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -0
  12. package/skills/bpmax-blueprint-doc-workflow/references/sample-paragraph-flow-details.xml +27 -0
  13. package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +45 -28
  14. package/skills/bpmax-blueprint-doc-workflow/references/source-traceability-and-flow-modeling.md +115 -0
  15. package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +386 -5
  16. package/skills/bpmax-dataset-field-template-editor/SKILL.md +6 -2
  17. package/skills/bpmax-dataset-field-template-editor/references/nested-field-patterns.md +8 -8
  18. package/skills/bpmax-dataset-template-editor/SKILL.md +10 -4
  19. package/skills/bpmax-dataset-template-editor/references/dataset-script-runtime-matrix.md +11 -0
  20. package/skills/bpmax-dataset-template-editor/references/runtime-gotchas.md +12 -0
  21. package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +61 -0
  22. package/skills/bpmax-e2e-flow-test-operator-v2/agents/openai.yaml +7 -0
  23. package/skills/bpmax-e2e-flow-test-operator-v2/references/automation-generation-pipeline.md +33 -0
  24. package/skills/bpmax-e2e-flow-test-operator-v2/references/batch-generation-and-execution.md +17 -0
  25. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +19 -0
  26. package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +95 -0
  27. package/skills/bpmax-e2e-flow-test-operator-v2/references/form-script-generation.md +41 -0
  28. package/skills/bpmax-e2e-flow-test-operator-v2/references/identity-and-failure-routing.md +80 -0
  29. package/skills/bpmax-e2e-flow-test-operator-v2/references/multi-request-mutation.md +9 -0
  30. package/skills/bpmax-e2e-flow-test-operator-v2/references/scenario-coverage-generation.md +17 -0
  31. package/skills/bpmax-e2e-flow-test-operator-v2/references/scoped-execution.md +13 -0
  32. package/skills/bpmax-e2e-flow-test-operator-v2/references/step-restartability-and-state.md +23 -0
  33. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-assets-and-evidence.md +9 -0
  34. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-data-and-selector-contract.md +51 -0
  35. package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
  36. package/skills/bpmax-flow-template-editor/SKILL.md +1 -0
  37. package/skills/bpmax-user-mock-operator/SKILL.md +33 -26
  38. package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +202 -86
@@ -5,6 +5,16 @@
5
5
  <p>流程优先,流程图使用飞书画板。</p>
6
6
  <h1>3. 总体业务架构</h1>
7
7
  <p>主流程与联动流程。</p>
8
+ <h2>3.1 源流程逻辑映射与完整性核对</h2>
9
+ <table><tr><th>源节点</th><th>蓝图位置</th><th>状态</th></tr><tr><td>申请</td><td>主流程阶段一</td><td>已覆盖</td></tr></table>
10
+ <h2>3.2 人工调整记录</h2>
11
+ <table><tr><th>调整</th><th>最终决策</th></tr><tr><td>无人工调整</td><td>按源流程建模</td></tr></table>
12
+ <h2>3.3 主流程阶段划分</h2>
13
+ <table><tr><th>阶段</th><th>入口</th><th>出口</th></tr><tr><td>阶段一:申请处理</td><td>提交申请</td><td>处理完成</td></tr></table>
14
+ <h2>3.4 并行场景建模决策</h2>
15
+ <table><tr><th>场景</th><th>建模选择</th><th>原因</th></tr><tr><td>辅助处理</td><td>拆分为不同子流程</td><td>独立生命周期</td></tr></table>
16
+ <h2>3.5 审批/决策矩阵评估</h2>
17
+ <table><tr><th>决策范围</th><th>条件</th><th>处理人/审批人来源</th><th>结果/下一步</th><th>维护责任人</th><th>蓝图规则矩阵</th><th>正式 BPMAX 矩阵</th><th>运行态验收</th></tr><tr><td>处理人路由</td><td>申请类型</td><td>负责人角色</td><td>进入处理环节</td><td>流程管理员</td><td>需要,落实为流程条件</td><td>本期不采用</td><td>真实用户 owner 解析与页面审批</td></tr></table>
8
18
  <h1>4. 公共支撑配置</h1>
9
19
  <p>共享组织、用户模型和自动化日志。</p>
10
20
  <h1>5. 流程一:主流程</h1>
@@ -13,43 +23,50 @@
13
23
  <h2>5.2 流程模板</h2>
14
24
  <whiteboard type="mermaid">flowchart TD
15
25
  A[开始节点:创建申请表单] --&gt; B[处理]</whiteboard>
16
- <p>开始节点:创建申请表单。创建表单由申请人填写。</p>
17
- <h2>5.3 环节配置说明</h2>
26
+ <h2>5.3 开始节点与创建表单</h2>
27
+ <table><tr><th>开始节点</th><th>创建表单</th><th>角色</th></tr><tr><td>创建申请</td><td>申请表单</td><td>申请人</td></tr></table>
28
+ <h2>5.4 环节配置说明</h2>
18
29
  <table><tr><th>环节</th><th>角色</th></tr><tr><td>处理</td><td>负责人</td></tr></table>
19
- <h2>5.4 表单模板</h2>
30
+ <h2>5.5 表单模板</h2>
20
31
  <table><tr><th>字段</th><th>类型</th></tr><tr><td>名称</td><td>文本</td></tr></table>
21
- <h2>5.5 流程数据集</h2>
22
- <p>流程数据集包含状态、关联字段和写回规则。</p>
23
- <h2>5.6 列表/筛选/详情/看板入口</h2>
24
- <p>列表、筛选、详情、看板、入口。</p>
25
- <h2>5.7 自动化与 AI/agent</h2>
26
- <p>AI 触发、输入、输出、人工确认、异常兜底。</p>
27
- <h2>5.8 办结口径与下游联动</h2>
28
- <p>办结后归档并下游联动。</p>
29
- <h2>5.9 BPMAX 实现边界</h2>
30
- <p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
32
+ <h2>5.6 流程数据集</h2>
33
+ <table><tr><th>字段组</th><th>写回</th></tr><tr><td>状态</td><td>处理完成</td></tr></table>
34
+ <h2>5.7 列表/筛选/详情/看板入口</h2>
35
+ <table><tr><th>入口</th><th>用户</th></tr><tr><td>申请列表</td><td>申请人</td></tr></table>
36
+ <h2>5.8 自动化与 AI/agent</h2>
37
+ <table><tr><th>触发</th><th>输入</th><th>输出</th><th>人工确认</th><th>异常兜底</th></tr><tr><td>提交后</td><td>申请数据</td><td>建议</td><td>负责人</td><td>转人工</td></tr></table>
38
+ <h2>5.9 办结口径与下游联动</h2>
39
+ <table><tr><th>办结</th><th>下游联动</th></tr><tr><td>处理完成</td><td>归档</td></tr></table>
40
+ <h2>5.10 BPMAX 实现边界</h2>
41
+ <table><tr><th>BPMAX 配置可实现</th><th>配置 + 脚本/API/现有插件</th><th>需定制插件/外部服务</th></tr><tr><td>流程</td><td>自动化</td><td>无</td></tr></table>
31
42
  <h1>6. 流程二:辅助流程</h1>
32
43
  <h2>6.1 业务目标与适用场景</h2>
33
44
  <p>业务目标与适用场景。</p>
34
45
  <h2>6.2 流程模板</h2>
35
46
  <whiteboard type="mermaid">flowchart TD
36
47
  A[开始节点:创建辅助表单] --&gt; B[办结]</whiteboard>
37
- <p>开始节点:创建辅助表单。创建表单由管理员填写。</p>
38
- <h2>6.3 环节配置说明</h2>
48
+ <h2>6.3 开始节点与创建表单</h2>
49
+ <table><tr><th>开始节点</th><th>创建表单</th><th>角色</th></tr><tr><td>创建辅助任务</td><td>辅助表单</td><td>管理员</td></tr></table>
50
+ <h2>6.4 环节配置说明</h2>
39
51
  <table><tr><th>环节</th><th>角色</th></tr><tr><td>办结</td><td>管理员</td></tr></table>
40
- <h2>6.4 表单模板</h2>
52
+ <h2>6.5 表单模板</h2>
41
53
  <table><tr><th>字段</th><th>类型</th></tr><tr><td>名称</td><td>文本</td></tr></table>
42
- <h2>6.5 流程数据集</h2>
43
- <p>流程数据集包含状态和写回规则。</p>
44
- <h2>6.6 列表/筛选/详情/看板入口</h2>
45
- <p>列表、筛选、详情、看板、入口。</p>
46
- <h2>6.7 自动化与 AI/agent</h2>
47
- <p>AI 触发、输入、输出、人工确认、异常兜底。</p>
48
- <h2>6.8 办结口径与下游联动</h2>
49
- <p>办结口径和下游联动。</p>
50
- <h2>6.9 BPMAX 实现边界</h2>
51
- <p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
52
- <h1>7. BPMAX 可配置能力与需定制能力边界</h1>
54
+ <h2>6.6 流程数据集</h2>
55
+ <table><tr><th>字段组</th><th>写回</th></tr><tr><td>状态</td><td>辅助流程完成</td></tr></table>
56
+ <h2>6.7 列表/筛选/详情/看板入口</h2>
57
+ <table><tr><th>入口</th><th>用户</th></tr><tr><td>辅助列表</td><td>管理员</td></tr></table>
58
+ <h2>6.8 自动化与 AI/agent</h2>
59
+ <table><tr><th>触发</th><th>输入</th><th>输出</th><th>人工确认</th><th>异常兜底</th></tr><tr><td>创建后</td><td>辅助数据</td><td>建议</td><td>管理员</td><td>转人工</td></tr></table>
60
+ <h2>6.9 办结口径与下游联动</h2>
61
+ <table><tr><th>办结</th><th>下游联动</th></tr><tr><td>辅助任务完成</td><td>回写主流程</td></tr></table>
62
+ <h2>6.10 BPMAX 实现边界</h2>
63
+ <table><tr><th>BPMAX 配置可实现</th><th>配置 + 脚本/API/现有插件</th><th>需定制插件/外部服务</th></tr><tr><td>子流程</td><td>回写</td><td>无</td></tr></table>
64
+ <h1>7. 权限与导航设计</h1>
65
+ <h2>7.1 PC/H5 导航设计</h2>
66
+ <table><tr><th>流程</th><th>终端</th><th>目标用户</th><th>入口/菜单</th><th>路由/页面</th><th>可见权限</th><th>验收</th></tr><tr><td>主流程</td><td>PC</td><td>申请人、负责人</td><td>工作台/申请列表</td><td>/project?flow_type=main</td><td>具备流程查看权限时显示</td><td>有权限用户可进入,无权限用户隐藏</td></tr><tr><td>主流程</td><td>H5</td><td>申请人、负责人</td><td>移动工作台/申请列表</td><td>/h5/project?flow_type=main</td><td>具备流程查看权限时显示</td><td>移动端可进入并完成查看</td></tr><tr><td>辅助流程</td><td>PC</td><td>管理员</td><td>工作台/辅助列表</td><td>/project?flow_type=aux</td><td>管理员角色可见</td><td>管理员可进入,其他用户隐藏</td></tr><tr><td>辅助流程</td><td>H5</td><td>不适用:仅后台管理员处理</td><td>不提供 H5 入口</td><td>不适用:仅 PC 后台页面</td><td>H5 隐藏</td><td>移动端无入口且不能访问</td></tr></table>
67
+ <h2>7.2 权限设计</h2>
68
+ <table><tr><th>流程</th><th>对象/字段</th><th>环节</th><th>用户/角色</th><th>可见</th><th>可编辑</th><th>操作权限</th><th>验收</th></tr><tr><td>主流程</td><td>流程项目与导航</td><td>全流程</td><td>申请人、负责人、管理员</td><td>按角色和项目关系可见</td><td>按当前环节只读或可编辑</td><td>创建、查看、编辑、删除、提交、审批、导航均按角色授权;无权限禁止</td><td>分别使用有权限与无权限用户验证</td></tr><tr><td>主流程</td><td>申请表字段</td><td>创建、处理</td><td>申请人、负责人</td><td>字段按环节可见</td><td>申请人创建时可编辑,负责人处理时部分字段只读</td><td>字段查看与编辑受控;无权限字段隐藏</td><td>逐环节验证字段可见和可编辑状态</td></tr><tr><td>辅助流程</td><td>流程项目与导航</td><td>全流程</td><td>管理员</td><td>仅管理员可见</td><td>处理环节可编辑</td><td>创建、查看、编辑、删除、提交、审批、导航均仅管理员可用;其他用户禁止</td><td>管理员成功、普通用户无权限</td></tr><tr><td>辅助流程</td><td>辅助表字段</td><td>创建、办结</td><td>管理员</td><td>字段仅管理员可见</td><td>创建时可编辑,办结后只读</td><td>字段查看与编辑受控;其他用户字段隐藏</td><td>验证办结前后字段权限变化</td></tr></table>
69
+ <h1>8. BPMAX 可配置能力与需定制能力边界</h1>
53
70
  <p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
54
- <h1>8. 一期验收路径、风险与待确认事项</h1>
71
+ <h1>9. 一期验收路径、风险与待确认事项</h1>
55
72
  <p>验收、风险、待确认。</p>
@@ -0,0 +1,115 @@
1
+ # Source Traceability And Flow Modeling
2
+
3
+ Read this reference before converting a source flowchart, spreadsheet, policy, interview record, or existing system into a BPMAX blueprint.
4
+
5
+ ## Evidence Priority
6
+
7
+ Keep these inputs distinct:
8
+
9
+ 1. Source facts: nodes, conditions, handlers, destinations, timeouts, returns, merge rules, and data requirements explicitly present in source material.
10
+ 2. Explicit user adjustments: accepted changes to stage boundaries, child-flow design, naming, matrix use, forms, fields, or presentation.
11
+ 3. Implementation inference: BPMAX modeling choices needed to make the design executable.
12
+ 4. Unresolved ambiguity: missing, duplicated, contradictory, or unclear source logic.
13
+
14
+ An explicit user adjustment is a first-class design decision. Do not silently overwrite it with an earlier source interpretation. If it conflicts with the source, record both, state which decision the blueprint follows, identify affected flows, and retain the conflict in the acceptance/confirmation section.
15
+
16
+ ## Required Modeling Tables
17
+
18
+ Every blueprint must include these tables. A table may state that no item exists, but it must not be omitted.
19
+
20
+ ### Source Flow Logic Mapping And Completeness Review
21
+
22
+ Use a table headed `源流程逻辑映射与完整性核对`.
23
+
24
+ | Source location | Source node/condition | Source destination | Blueprint flow/stage/node | Modeling result | Status | Ambiguity |
25
+ | --- | --- | --- | --- | --- | --- | --- |
26
+
27
+ Map every business node, branch condition, return, parallel launch, merge, timeout, escalation, and terminal state. Do not treat keyword coverage as proof. Completeness requires all source transitions to have a documented destination or an explicit unresolved status.
28
+
29
+ ### Manual Adjustment Register
30
+
31
+ Use a table headed `人工调整记录`.
32
+
33
+ | Adjustment | Original source/model | Final decision | Affected flows/objects | Validation impact |
34
+ | --- | --- | --- | --- | --- |
35
+
36
+ If there was no manual adjustment, include one row stating `无人工调整`.
37
+
38
+ ### Main Flow Stage Map
39
+
40
+ Use a table headed `主流程阶段划分`.
41
+
42
+ | Stage | Entry condition | Business actions/states | Child flows launched | Exit/merge condition | Writeback |
43
+ | --- | --- | --- | --- | --- | --- |
44
+
45
+ Split a long lifecycle into named stages when responsibilities, business state, or completion criteria change. Stage boundaries must be business boundaries, not arbitrary groups of source rows.
46
+
47
+ ### Parallel Scenario Modeling Decisions
48
+
49
+ Use a table headed `并行场景建模决策`.
50
+
51
+ | Parallel scenario | Participants/dimension | Data/form differences | Lifecycle differences | Modeling choice | Merge condition | Reason |
52
+ | --- | --- | --- | --- | --- | --- | --- |
53
+
54
+ Choose among:
55
+
56
+ - `复用同一参数化子流程`: use when lifecycle, forms, completion, and writeback are the same; select different departments/users or create multiple instances through parameters.
57
+ - `拆分为不同子流程`: use when lifecycle, forms, permissions, completion, escalation, or writeback differs materially.
58
+ - `保留在主流程`: use only when the work is not independently executable and does not need its own instance, owner, evidence, retry, or completion state.
59
+
60
+ Do not split solely because participant names differ. Do not reuse one child flow when business semantics differ.
61
+
62
+ ### Approval And Decision Matrix Assessment
63
+
64
+ Use a table headed `审批/决策矩阵评估`.
65
+
66
+ | Decision scope | Conditions | Handler/approver source | Result/next step | Maintenance owner | Blueprint rule matrix | 正式 BPMAX 矩阵 | Runtime acceptance |
67
+ | --- | --- | --- | --- | --- | --- | --- | --- |
68
+
69
+ Rules:
70
+
71
+ - A blueprint rule matrix is mandatory when conditions determine handlers, approvals, child-flow creation, escalation, merge, or writeback.
72
+ - A `正式 BPMAX 矩阵应用` is optional. Use it when mappings must be maintained as business data or vary by product, factory, department, amount, type, or other dimensions.
73
+ - If a formal matrix is selected, document matrix application, rule records, real BPMAX users, consuming flow nodes, missing/duplicate rule behavior, readback, and runtime owner resolution.
74
+ - Do not describe a formal matrix as created, published, or effective without implementation evidence.
75
+
76
+ ### PC And H5 Navigation Design
77
+
78
+ Use a table headed `PC/H5 导航设计`. Every flow must have separate `PC` and `H5` rows. When one terminal is intentionally unsupported, keep its row and state the reason, hidden-entry behavior, and acceptance result.
79
+
80
+ | Flow | Terminal | Target users | Entry/menu | Route/page | Visibility permission | Acceptance |
81
+ | --- | --- | --- | --- | --- | --- | --- |
82
+
83
+ Do not combine `PC/H5` in one row. The design must make clear how users create, list, open, process, and verify the flow on each applicable terminal.
84
+
85
+ ### Permission Design
86
+
87
+ Use a table headed `权限设计`.
88
+
89
+ | Flow | Object/field | Step | User/role | Visible | Editable | Action permissions | Acceptance |
90
+ | --- | --- | --- | --- | --- | --- | --- | --- |
91
+
92
+ For every flow, explicitly cover create, view, edit, delete, submit, approve, and navigation permissions. Mark a genuinely unsupported action as not applicable with a reason. Include field visibility/editability by step and role, plus the hidden, read-only, or forbidden behavior for unauthorized users.
93
+
94
+ ## Review Sequence
95
+
96
+ 1. Freeze the source logic mapping.
97
+ 2. Apply and record explicit user adjustments.
98
+ 3. Define main-flow stages.
99
+ 4. Decide every parallel scenario.
100
+ 5. Assess blueprint matrices and optional formal BPMAX matrices.
101
+ 6. Design PC and H5 navigation separately for every flow.
102
+ 7. Define flow, action, field, step, role, and denied-state permissions.
103
+ 8. Draft each independently complete flow chapter.
104
+ 9. Compare every source transition against the final diagrams and node tables.
105
+ 10. Export and visually inspect every whiteboard. A non-empty resource block is not sufficient evidence of correct links or merge order.
106
+ 11. Report each flow as complete, incomplete, or blocked with source ambiguities listed separately.
107
+
108
+ ## Anti-Patterns
109
+
110
+ - Claiming completeness because required terms or chapter titles exist.
111
+ - Converting every parallel participant into a separate child-flow type without checking semantic reuse.
112
+ - Combining materially different business lifecycles into one generic child flow only to reduce flow count.
113
+ - Expanding child-flow internals inside the main-flow diagram.
114
+ - Treating a blueprint routing table as proof that a formal BPMAX matrix is online.
115
+ - Reverting a user-confirmed modeling adjustment during later source review without disclosure.