bpmax-cli 0.1.44-beta.13 → 0.1.44-beta.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpmax-cli",
3
- "version": "0.1.44-beta.13",
3
+ "version": "0.1.44-beta.14",
4
4
  "description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: "bpmax-ai-taskbook"
3
+ description: "Use when BPMAX configuration work needs an AI implementation taskbook, AI任务方案, 任务书, 任务拆解, subagent dispatch prompts, progress CSV, or object-lock review before editing flows, templates, datasets, roles, navigation, workspaces, or E2E assets."
4
+ ---
5
+
6
+ # BPMAX AI Taskbook
7
+
8
+ ## Core Rule
9
+
10
+ Use a taskbook before dispatching broad BPMAX implementation work. The taskbook is a local planning and safety gate; it is not a BPMAX configuration write path.
11
+
12
+ ## When To Use
13
+
14
+ - The user asks for an AI task plan, taskbook, implementation task table, subagent split, or progress tracking.
15
+ - 用户要求 AI任务方案、任务书、任务拆解、实施任务表、subagent 分工、进度表或 P0/P1 review。
16
+ - The work spans multiple BPMAX objects such as flow, form, dataset, list, filter, detail, dashboard, role, navigation, workspace, or E2E cases.
17
+ - The work may use subagents or parallel review.
18
+ - A new flow/app/workspace may be created and the real platform-generated ID must be fed back into later tasks.
19
+ - The user asks for P0/P1 review before commit or before continuing configuration.
20
+
21
+ Do not use this for a single narrow read-only query, one-field edit, or pure CLI auth/setup task.
22
+
23
+ ## Commands
24
+
25
+ Create the taskbook:
26
+
27
+ ```bash
28
+ bpmax-cli taskbook init --out .codex/tmp/TASKBOOK.md
29
+ ```
30
+
31
+ Lint the taskbook before execution:
32
+
33
+ ```bash
34
+ bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md
35
+ ```
36
+
37
+ For taskbooks that do not create or edit flows, keep the same content gates but skip the generated `flow_type` rule:
38
+
39
+ ```bash
40
+ bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md --allow-generated-flow-type-missing
41
+ ```
42
+
43
+ Lint each subagent or handoff prompt before dispatch:
44
+
45
+ ```bash
46
+ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
47
+ ```
48
+
49
+ Initialize progress tracking:
50
+
51
+ ```bash
52
+ bpmax-cli taskbook progress init --source .codex/tmp/TASKBOOK.md --out .codex/tmp/taskbook-progress.csv
53
+ ```
54
+
55
+ ## Required Content
56
+
57
+ The taskbook must include:
58
+
59
+ - `目标与边界`
60
+ - `并行拆解硬规则`
61
+ - `阶段总览`
62
+ - `对象锁表`
63
+ - `AI 最小任务单元`
64
+ - `验收门禁`
65
+ - `停机点`
66
+ - `进度 CSV`
67
+
68
+ Every AI task row must include:
69
+
70
+ - `business_goal`: concrete business outcome, not just a technical object name.
71
+ - `required_skills`: concrete BPMAX skills such as `bpmax-flow-template-editor`, `bpmax-form-template-editor`, `bpmax-list-template-editor`, `bpmax-e2e-flow-test-operator`, or `bpmax-memory-protocol`.
72
+ - `object_lock`: one lock per mutable BPMAX object, for example `flow:<flow_type>`, `form-template:<id>`, `dataset:<id>`, `workspace:<key>`, or `new-flow:<name>`.
73
+ - `subagent_mode`: one of `none`, `readonly`, `draft-only`, or `exclusive-write`.
74
+ - `dependencies`: upstream task IDs required before execution.
75
+ - `evidence`: expected proof such as readback hash, browser screenshot, test report, or lint result.
76
+
77
+ ## Object Lock Rules
78
+
79
+ - Duplicate object locks must not be edited in parallel.
80
+ - Read-only tasks may run in parallel, but must not save, publish, or submit payloads.
81
+ - New flows must use `new-flow:<name>` until BPMAX returns a real `flow<number>`.
82
+ - After creation, replace the lock with `flow:<generated flow_type>` before dependent write tasks continue.
83
+ - Publishing, final sync, and cross-object integration must be single-threaded.
84
+
85
+ ## Prompt Gate
86
+
87
+ Before dispatching any subagent prompt, run `lint-prompt`. The prompt must explicitly include:
88
+
89
+ - `业务目标场景`
90
+ - `required_skills`
91
+ - `对象锁`
92
+ - `subagent_mode`
93
+ - `允许操作`
94
+ - `不得修改`
95
+ - `输入依赖`
96
+ - `输出物`
97
+ - `验收方式`
98
+ - `进度 CSV`
99
+
100
+ If `lint-prompt` fails, revise the prompt. Do not dispatch a vague prompt and rely on the subagent to infer scope.
101
+
102
+ ## Execution Gate
103
+
104
+ Only after taskbook lint and prompt lint pass:
105
+
106
+ 1. Run the latest configuration sync required by the target workspace.
107
+ 2. Execute tasks according to object locks and dependencies.
108
+ 3. Use typed `bpmax-cli config ...` commands for all BPMAX writes.
109
+ 4. Update the progress CSV after each task.
110
+ 5. Stop on capability gaps, baseline drift, object-lock conflict, failed lint, or failed browser/runtime verification.
111
+
112
+ 不得把 taskbook 当作 BPMAX 配置写入命令。Taskbook commands are local file gates; they do not write BPMAX configuration and do not replace typed adapters.
113
+
114
+ ## Memory
115
+
116
+ Start non-trivial taskbooks by consulting `bpmax-memory-protocol` or:
117
+
118
+ ```bash
119
+ bpmax-cli memory search --scope all --query "<workspace> <flow_type> taskbook implementation plan" --format json
120
+ ```
121
+
122
+ After verified completion, write only reusable `decision`, `task_learning`, `anti_pattern`, or `session_state` memory. Do not write API keys, passwords, cookies, tokens, verification codes, phone numbers, full payloads, or large raw API responses.
@@ -46,6 +46,7 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
46
46
  - 本地 schema manifest:读 `../bpmax-schema/SKILL.md`
47
47
  - 服务端能力白名单:先用 `capabilities status/refresh` 查看当前 profile 已授权 capability,不要绕过白名单手写 raw API
48
48
  - BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
49
+ - AI 任务方案、任务书、任务拆解、subagent 分工、实施任务表、进度 CSV:读 `../bpmax-ai-taskbook/SKILL.md`
49
50
 
50
51
  ## 规则
51
52
 
@@ -12,6 +12,7 @@ description: "用于按 BPMAX 完整流程配置需求先调研、再出计划
12
12
  - `required-collateral` 必须逐项解释“不改会坏/会失真/会不闭合”的原因并取得确认;`out-of-scope` 一律不得提交或顺手混入。
13
13
  - 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
14
14
  - 所有远端写入必须走 `bpmax-cli config ...` typed adapter。没有相关流程且用户要求创建时,优先评估 `config flow-app create`;如果当前 profile 缺 `config.flow_app.create`、`config.form_template.create`、`config.flow_template.create` 或 `config.workspace_flow.submit`,必须停止并要求补授权/升级 CLI,不得改用 raw API、页面 fetch 或旧 submit 脚本。
15
+ - 大型、多对象、需要 subagent 或需要 P0/P1 review 的配置任务,必须先进入 [$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md),生成并 lint AI 任务书,再开始分发执行;不得直接口头拆任务后写配置。
15
16
 
16
17
  ## 何时使用
17
18
  - 用户要做一整套 BPMAX 流程相关配置,而不是单改某一个模板。
@@ -55,6 +56,23 @@ bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-
55
56
  - 计划第一步固定先进入 `bpmax-config-latest` 并执行当前配置环境的 `bpmax-cli config latest pull <env>`;全部配置和验证结束后,最后一步固定再通过 `bpmax-config-latest` 执行一次同一环境的 latest pull。
56
57
  - 若首次同步因本地脏工作区失败,默认下一步尝试追加 `--allow-dirty` 重试;若重试任一步失败,立即停下并向用户说明冲突点,由用户决定是否继续。
57
58
 
59
+ ## AI 任务书门禁
60
+ - 当本次配置跨 2 个以上配置面、会创建新流程/工作区、需要 subagent 并行、或用户明确要求 review P0/P1 时,先调用 [$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md)。
61
+ - 任务书必须先通过:
62
+
63
+ ```bash
64
+ bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md
65
+ ```
66
+
67
+ - 每个 subagent prompt 必须先通过:
68
+
69
+ ```bash
70
+ bpmax-cli taskbook lint-prompt --prompt-source .codex/tmp/TASK_PROMPT.md
71
+ ```
72
+
73
+ - 任务书里必须声明对象锁、`required_skills`、`subagent_mode`、依赖和验收证据;对象锁冲突、prompt lint 失败、或真实 `flow_type` 未回填时不得分发写任务。
74
+ - `bpmax-cli taskbook progress init --source .codex/tmp/TASKBOOK.md --out .codex/tmp/taskbook-progress.csv` 生成的进度 CSV 是执行状态来源;不得直接改飞书文档当作进度事实。
75
+
58
76
  ## Mem0 协议
59
77
  - 编排开始前先调用 [$bpmax-memory-protocol](../bpmax-memory-protocol/SKILL.md),检索词至少包含:
60
78
  - 业务名 / 流程名
@@ -98,6 +116,7 @@ bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-
98
116
  - 列表模板
99
117
  - 筛选器模板
100
118
  - 导航配置
119
+ - 如果配置面超过 2 个,或存在新建/发布/多角色验收,计划中必须加入 `bpmax-ai-taskbook` 前置任务书步骤。
101
120
  - 如果用户说“全部都做”,按完整流程配置处理。
102
121
  - 如果用户只做一部分,只编排对应子 skill,不强行扩展到其他无关面。
103
122
  - 如果用户要求“没有就新建”,计划中必须显式写出:
@@ -125,6 +144,7 @@ bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-
125
144
  - 计划中要显式说明:
126
145
  - 哪些配置面属于本次范围
127
146
  - 哪些子 skill 会被调用
147
+ - 是否需要 `bpmax-ai-taskbook`,以及任务书 lint、prompt lint、进度 CSV 的路径
128
148
  - 哪些页面必须先在浏览器中打开
129
149
  - 哪些地方以浏览器实时配置为准
130
150
  - 新建场景使用哪个 typed create 命令、确认文本是什么、失败后停止在哪一步
@@ -141,6 +161,7 @@ bpmax-cli config flow-app create --workspace <workspace> --form-work <form-work-
141
161
  - 导航:[$bpmax-nav-config-editor](../bpmax-nav-config-editor/SKILL.md)
142
162
  - 控件选型:[$form-control-library](../form-control-library/SKILL.md)
143
163
  - 最新配置同步:[$bpmax-config-latest](../bpmax-config-latest/SKILL.md)
164
+ - AI 任务书:[$bpmax-ai-taskbook](../bpmax-ai-taskbook/SKILL.md)
144
165
  - 若流程或表单需求依赖控件能力判断,先用 [$form-control-library](../form-control-library/SKILL.md)。
145
166
  - 若某一步要求浏览器已打开特定页面,而当前页面不对,必须先让用户打开到正确页面,不要盲目继续。
146
167
  - `flow-app create` 完成后,必须再执行工作区视角的只读验证: