bpmax-cli 0.2.1-beta.52 → 0.2.1-beta.54
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/dist/bin.js +13319 -4654
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/scripts/install-skills.mjs +25 -59
- package/skills/bpmax-ai-taskbook/SKILL.md +10 -0
- package/skills/bpmax-ai-taskbook/references/blueprint-taskbook-gates.md +120 -0
- package/skills/bpmax-ai-taskbook/references/taskbook-template.md +41 -1
- package/skills/bpmax-blueprint-doc-workflow/SKILL.md +15 -2
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +8 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +13 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-modeling-review.xml +23 -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 +45 -28
- 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 +386 -5
- package/skills/bpmax-e2e-flow-test-operator/SKILL.md +48 -27
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +41 -17
- package/skills/bpmax-e2e-flow-test-operator/references/browser-action-dsl.md +71 -9
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +2 -1
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +25 -12
- package/skills/bpmax-e2e-flow-test-operator/references/minimal-test-loop.md +11 -9
- package/skills/bpmax-e2e-flow-test-operator-v2/SKILL.md +56 -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/batch-generation-and-execution.md +17 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-action-runner.md +15 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/browser-recording-and-replay.md +69 -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 +74 -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 +17 -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 +28 -0
- package/skills/bpmax-e2e-flow-test-operator-v2/references/test-preflight-and-confirmation.md +32 -0
- package/skills/bpmax-user-mock-operator/scripts/chrome_identity_bridge.mjs +79 -12
package/package.json
CHANGED
|
@@ -32,7 +32,7 @@ const agentGuidance = {
|
|
|
32
32
|
};
|
|
33
33
|
const agentGuidanceLines = Object.values(agentGuidance).flat().map((line) => `[bpmax-cli] ${line}`);
|
|
34
34
|
const stampPath = path.join(homedir(), '.bpmax', 'skills.stamp');
|
|
35
|
-
const openClawReminder = 'OpenClaw
|
|
35
|
+
const openClawReminder = 'OpenClaw Skills are installed directly into ~/.openclaw/skills. Do not manually copy skills unless this result reports a failure.';
|
|
36
36
|
const memoryGuidanceMarkers = {
|
|
37
37
|
start: '<!-- bpmax-cli:memory-guidance:start -->',
|
|
38
38
|
end: '<!-- bpmax-cli:memory-guidance:end -->',
|
|
@@ -264,82 +264,44 @@ async function findAilySkillhub() {
|
|
|
264
264
|
return result.stdout.split(/\r?\n/).find((line) => line.trim())?.trim() || 'aily-skillhub';
|
|
265
265
|
}
|
|
266
266
|
|
|
267
|
-
async function
|
|
268
|
-
const command = process.platform === 'win32' ? 'where' : 'which';
|
|
269
|
-
const result = await runCommand(command, ['openclaw']);
|
|
270
|
-
if (result.exitCode !== 0) {
|
|
271
|
-
return null;
|
|
272
|
-
}
|
|
273
|
-
return result.stdout.split(/\r?\n/).find((line) => line.trim())?.trim() || 'openclaw';
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
async function installOpenClawFallback(skillNames) {
|
|
267
|
+
async function installWithOpenClawDirectory(skillNames) {
|
|
277
268
|
const root = path.join(homedir(), '.openclaw', 'skills');
|
|
278
269
|
const openclawHomeExists = await exists(path.dirname(root));
|
|
279
270
|
if (!openclawHomeExists && targetAgent !== 'openclaw') {
|
|
280
|
-
return
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
async function installWithOpenClawCli(skillNames) {
|
|
291
|
-
if (!shouldRunAdapter('openclaw')) {
|
|
292
|
-
return { adapter: 'openclaw', action: 'skipped', installed: [], failed: [], fallbacks: [], next_action: '' };
|
|
271
|
+
return {
|
|
272
|
+
adapter: 'openclaw',
|
|
273
|
+
action: 'skipped',
|
|
274
|
+
installed: [],
|
|
275
|
+
failed: [],
|
|
276
|
+
fallbacks: [],
|
|
277
|
+
next_action: '',
|
|
278
|
+
};
|
|
293
279
|
}
|
|
294
|
-
const executable = await findOpenClawCli();
|
|
295
280
|
const installed = [];
|
|
296
281
|
const failed = [];
|
|
297
|
-
const
|
|
298
|
-
|
|
299
|
-
if (executable) {
|
|
300
|
-
for (const skillName of skillNames) {
|
|
301
|
-
const sourceDir = path.join(sourceSkillsDir, skillName);
|
|
302
|
-
const result = await runCommand(executable, ['skills', 'install', '--file-path', sourceDir]);
|
|
303
|
-
const item = {
|
|
304
|
-
skill: skillName,
|
|
305
|
-
adapter: 'openclaw',
|
|
306
|
-
path: sourceDir,
|
|
307
|
-
stdout: result.stdout.trim(),
|
|
308
|
-
stderr: result.stderr.trim(),
|
|
309
|
-
exitCode: result.exitCode,
|
|
310
|
-
};
|
|
311
|
-
if (result.exitCode === 0) {
|
|
312
|
-
installed.push(item);
|
|
313
|
-
} else {
|
|
314
|
-
failed.push(item);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
if (!executable || failed.length > 0) {
|
|
282
|
+
for (const skillName of skillNames) {
|
|
320
283
|
try {
|
|
321
|
-
|
|
284
|
+
const destination = await installSkillDir(skillName, path.join(sourceSkillsDir, skillName), root);
|
|
285
|
+
installed.push({ skill: skillName, adapter: 'openclaw-directory', path: destination });
|
|
322
286
|
} catch (error) {
|
|
323
287
|
failed.push({
|
|
324
|
-
skill:
|
|
288
|
+
skill: skillName,
|
|
325
289
|
adapter: 'openclaw-directory',
|
|
326
290
|
error: error instanceof Error ? error.message : String(error),
|
|
327
291
|
});
|
|
328
292
|
}
|
|
329
293
|
}
|
|
330
|
-
|
|
331
294
|
return {
|
|
332
295
|
adapter: 'openclaw',
|
|
333
|
-
action: failed.length > 0 && installed.length
|
|
296
|
+
action: failed.length > 0 && installed.length > 0
|
|
334
297
|
? 'partial'
|
|
335
|
-
: installed.length
|
|
298
|
+
: installed.length > 0
|
|
336
299
|
? 'installed'
|
|
337
300
|
: 'skipped',
|
|
338
|
-
executable,
|
|
339
301
|
installed,
|
|
340
302
|
failed,
|
|
341
|
-
fallbacks,
|
|
342
|
-
next_action: installed.length
|
|
303
|
+
fallbacks: [],
|
|
304
|
+
next_action: installed.length > 0 ? '' : 'Create ~/.openclaw or retry the directory installation.',
|
|
343
305
|
};
|
|
344
306
|
}
|
|
345
307
|
|
|
@@ -423,7 +385,9 @@ async function main() {
|
|
|
423
385
|
}
|
|
424
386
|
const adapters = [
|
|
425
387
|
await installWithDirectoryTargets(skillNames),
|
|
426
|
-
|
|
388
|
+
shouldRunAdapter('openclaw')
|
|
389
|
+
? await installWithOpenClawDirectory(skillNames)
|
|
390
|
+
: { adapter: 'openclaw', action: 'skipped', installed: [], failed: [], fallbacks: [], next_action: '' },
|
|
427
391
|
await installWithAilySkillhub(skillNames),
|
|
428
392
|
];
|
|
429
393
|
const globalGuidance = await writeGlobalMemoryGuidance();
|
|
@@ -456,7 +420,7 @@ async function main() {
|
|
|
456
420
|
}
|
|
457
421
|
|
|
458
422
|
const result = {
|
|
459
|
-
ok:
|
|
423
|
+
ok: failedCount === 0,
|
|
460
424
|
action: failedCount > 0 ? 'partial' : 'installed',
|
|
461
425
|
installed: adapters.flatMap((adapter) => adapter.installed),
|
|
462
426
|
fallbacks: adapters.flatMap((adapter) => adapter.fallbacks),
|
|
@@ -469,7 +433,9 @@ async function main() {
|
|
|
469
433
|
next_action: failedCount > 0 ? 'Review failed adapter items and retry.' : '',
|
|
470
434
|
...(targetAgent === 'openclaw' ? { reminder: openClawReminder } : {}),
|
|
471
435
|
};
|
|
472
|
-
|
|
436
|
+
if (result.ok) {
|
|
437
|
+
await writeSkillsStamp();
|
|
438
|
+
}
|
|
473
439
|
if (jsonOutput) {
|
|
474
440
|
console.log(JSON.stringify(result, null, 2));
|
|
475
441
|
} else {
|
|
@@ -49,6 +49,16 @@ For the full implementation taskbook shape, use [references/taskbook-template.md
|
|
|
49
49
|
|
|
50
50
|
Taskbook lint is implemented in the TypeScript CLI core. Do not add or call Python lint scripts for taskbook validation. JSON lint output uses stable English fields such as `code`, `rule_id`, `domain`, and `path`; user-facing `message`, `suggestion`, and normal text output are Chinese.
|
|
51
51
|
|
|
52
|
+
## Blueprint Implementation Gate
|
|
53
|
+
|
|
54
|
+
When the taskbook implements an approved BPMAX blueprint, also read [references/blueprint-taskbook-gates.md](./references/blueprint-taskbook-gates.md).
|
|
55
|
+
|
|
56
|
+
- Freeze the blueprint document/version, lint result, source materials, reviewed flow list, manual adjustments, and unresolved ambiguities before task decomposition.
|
|
57
|
+
- Keep `业务流程阶段映射` separate from `实施阶段总览`.
|
|
58
|
+
- Carry every parallel-flow and matrix adoption decision into object locks, dependencies, merge behavior, and E2E evidence.
|
|
59
|
+
- Every reviewed flow must map source logic to configuration tasks and end as `complete`, `incomplete`, or `blocked`.
|
|
60
|
+
- `bpmax-cli taskbook lint` must reject an incomplete blueprint baseline or traceability chain before dispatch.
|
|
61
|
+
|
|
52
62
|
## Configuration Surface Coverage
|
|
53
63
|
|
|
54
64
|
When a requirement touches an end-to-end BPMAX configuration, the taskbook must explicitly include or intentionally skip these surfaces:
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Blueprint Taskbook Gates
|
|
2
|
+
|
|
3
|
+
Use this reference when an implementation taskbook is derived from an approved BPMAX blueprint.
|
|
4
|
+
|
|
5
|
+
## Activation
|
|
6
|
+
|
|
7
|
+
The blueprint gates apply when the taskbook mentions an approved blueprint, blueprint document, blueprint revision, blueprint implementation, or contains `蓝图输入与决策基线`.
|
|
8
|
+
|
|
9
|
+
They do not apply to a narrow defect-repair taskbook that is not implementing or revising a blueprint.
|
|
10
|
+
|
|
11
|
+
## Required Sections
|
|
12
|
+
|
|
13
|
+
### 蓝图输入与决策基线
|
|
14
|
+
|
|
15
|
+
Use a table with:
|
|
16
|
+
|
|
17
|
+
| 蓝图文档 | 版本/修订 | 蓝图 lint | 源材料 | 已审核流程清单 |
|
|
18
|
+
| --- | --- | --- | --- | --- |
|
|
19
|
+
|
|
20
|
+
- `蓝图文档` must identify the real document or approved local artifact.
|
|
21
|
+
- `版本/修订` must be fixed before dispatch.
|
|
22
|
+
- `蓝图 lint` must state `PASS` / `通过` and the evidence location.
|
|
23
|
+
- `源材料` must identify the source flowchart, spreadsheet, policy, interview record, or existing configuration baseline.
|
|
24
|
+
- `已审核流程清单` must list every main and child flow approved for implementation.
|
|
25
|
+
- Values such as `待填写`, `待确认`, `<...>`, or an empty cell fail lint.
|
|
26
|
+
|
|
27
|
+
### 人工调整与未决歧义
|
|
28
|
+
|
|
29
|
+
Use a table with:
|
|
30
|
+
|
|
31
|
+
| 调整或歧义 | 类型 | 最终决策/当前状态 | 影响流程 | 对应任务或停机点 |
|
|
32
|
+
| --- | --- | --- | --- | --- |
|
|
33
|
+
|
|
34
|
+
`类型` is `人工调整` or `未决歧义`. A manual adjustment must be inherited by downstream tasks. An unresolved ambiguity must map to a blocking task or stop condition. If neither exists, add one row with `无人工调整和未决歧义`.
|
|
35
|
+
|
|
36
|
+
### 业务流程阶段映射
|
|
37
|
+
|
|
38
|
+
Use a table with:
|
|
39
|
+
|
|
40
|
+
| 业务阶段 | 对应流程 | 进入条件 | 完成条件 | 实施任务 |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
|
|
43
|
+
Business stages come from the blueprint lifecycle. Do not write implementation phases such as `阶段 0` through `阶段 6` in this table. Execution sequencing belongs in `实施阶段总览`.
|
|
44
|
+
|
|
45
|
+
### 并行场景实施映射
|
|
46
|
+
|
|
47
|
+
Use a table with:
|
|
48
|
+
|
|
49
|
+
| 并行场景 | 蓝图建模决策 | 流程/对象锁 | 输入依赖 | 汇合条件 | E2E 验收 |
|
|
50
|
+
| --- | --- | --- | --- | --- | --- |
|
|
51
|
+
|
|
52
|
+
Allowed modeling decisions:
|
|
53
|
+
|
|
54
|
+
- `复用同一参数化子流程`
|
|
55
|
+
- `拆分为不同子流程`
|
|
56
|
+
- `保留在主流程`
|
|
57
|
+
- `无并行场景`
|
|
58
|
+
|
|
59
|
+
Implementation rules:
|
|
60
|
+
|
|
61
|
+
- Parameterized reuse uses one child-flow lock plus participant/dimension mapping, multi-instance creation, merge, and E2E coverage.
|
|
62
|
+
- Separate child flows use separate locks and tasks for every flow, with explicit parent dependencies and merge evidence.
|
|
63
|
+
- Parent-flow retention must explain why no independent instance, owner, lifecycle, retry, or completion state is required.
|
|
64
|
+
- Every row must identify a `new-flow:<name>` or `flow:<flow_type>` object lock, a `Txx` input dependency or `无依赖`, a merge condition, and a `Cxxx` / E2E acceptance target.
|
|
65
|
+
|
|
66
|
+
### 审批/决策矩阵实施选择
|
|
67
|
+
|
|
68
|
+
Use a table with:
|
|
69
|
+
|
|
70
|
+
| 决策范围 | 蓝图规则 | 实施选择 | 配置任务 | 运行态验收 |
|
|
71
|
+
| --- | --- | --- | --- | --- |
|
|
72
|
+
|
|
73
|
+
Allowed implementation choices:
|
|
74
|
+
|
|
75
|
+
- `蓝图规则矩阵`: implement through flow conditions, handler/approver sources, child-flow routing, escalation, merge, and writeback tasks.
|
|
76
|
+
- `正式 BPMAX 矩阵`: create separate tasks for matrix application, rule records, real BPMAX approver users, consumer nodes using `matrix_owner` / `cc_matrix`, readback, missing/duplicate rule behavior, and runtime owner resolution.
|
|
77
|
+
- `不需要矩阵`: only when no conditional handler, approval, routing, escalation, merge, or writeback rule exists.
|
|
78
|
+
|
|
79
|
+
Mentioning a matrix in the blueprint does not automatically authorize creation of a formal BPMAX matrix application.
|
|
80
|
+
|
|
81
|
+
### 源逻辑 → 配置任务 → 验收证据追溯表
|
|
82
|
+
|
|
83
|
+
Use a table with:
|
|
84
|
+
|
|
85
|
+
| 源逻辑 | 流程 | 配置任务 | 关联对象 | 验收证据 | 结论 |
|
|
86
|
+
| --- | --- | --- | --- | --- | --- |
|
|
87
|
+
|
|
88
|
+
- Every reviewed flow must have at least one traceability row.
|
|
89
|
+
- `配置任务` must reference real task IDs.
|
|
90
|
+
- `关联对象` must identify the flow lock and the relevant form, data set, list, filter, detail, dashboard, navigation, matrix, or E2E lock.
|
|
91
|
+
- When a flow genuinely has no related object, write `仅流程模板:<原因>` or `关联对象不适用:<原因>` instead of silently omitting the decision.
|
|
92
|
+
- `验收证据` must name the expected typed readback, lint, browser, or E2E evidence.
|
|
93
|
+
- `结论` is exactly `complete`, `incomplete`, or `blocked`.
|
|
94
|
+
- All traceability rows for one flow must use the same final flow conclusion.
|
|
95
|
+
- `complete` requires all required configuration surfaces and runtime evidence for that flow.
|
|
96
|
+
|
|
97
|
+
## Prompt Inheritance
|
|
98
|
+
|
|
99
|
+
Each dispatched task derived from a blueprint must carry:
|
|
100
|
+
|
|
101
|
+
- blueprint document and revision;
|
|
102
|
+
- target flow and business stage;
|
|
103
|
+
- applicable manual adjustments or unresolved ambiguity;
|
|
104
|
+
- parallel modeling decision;
|
|
105
|
+
- matrix implementation choice;
|
|
106
|
+
- source-traceability row and required evidence.
|
|
107
|
+
|
|
108
|
+
An agent may not redesign these decisions inside an implementation task. Changes require updating the blueprint decision record and regenerating/re-linting the taskbook.
|
|
109
|
+
|
|
110
|
+
## Stop Conditions
|
|
111
|
+
|
|
112
|
+
Stop before dispatch when:
|
|
113
|
+
|
|
114
|
+
- the blueprint revision or lint result is unknown;
|
|
115
|
+
- a reviewed flow is absent from the traceability table;
|
|
116
|
+
- a business stage is confused with an implementation phase;
|
|
117
|
+
- a parallel scenario has no allowed modeling decision;
|
|
118
|
+
- matrix implementation choice is missing;
|
|
119
|
+
- an unresolved ambiguity has no blocking task;
|
|
120
|
+
- any flow is marked `complete` without evidence.
|
|
@@ -12,6 +12,46 @@ The taskbook defines the execution plan; runtime progress belongs in a separate
|
|
|
12
12
|
- 线上基线来源:
|
|
13
13
|
- 验收方式:
|
|
14
14
|
|
|
15
|
+
## 蓝图输入与决策基线
|
|
16
|
+
|
|
17
|
+
仅在基于已审核蓝图实施时填写;非蓝图任务书删除本节及后续五个蓝图章节。
|
|
18
|
+
|
|
19
|
+
| 蓝图文档 | 版本/修订 | 蓝图 lint | 源材料 | 已审核流程清单 |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
22
|
+
|
|
23
|
+
## 人工调整与未决歧义
|
|
24
|
+
|
|
25
|
+
| 调整或歧义 | 类型 | 最终决策/当前状态 | 影响流程 | 对应任务或停机点 |
|
|
26
|
+
|---|---|---|---|---|
|
|
27
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
28
|
+
|
|
29
|
+
## 业务流程阶段映射
|
|
30
|
+
|
|
31
|
+
业务阶段来自蓝图;不要在这里填写实施用的阶段 0~6。
|
|
32
|
+
|
|
33
|
+
| 业务阶段 | 对应流程 | 进入条件 | 完成条件 | 实施任务 |
|
|
34
|
+
|---|---|---|---|---|
|
|
35
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
36
|
+
|
|
37
|
+
## 并行场景实施映射
|
|
38
|
+
|
|
39
|
+
| 并行场景 | 蓝图建模决策 | 流程/对象锁 | 输入依赖 | 汇合条件 | E2E 验收 |
|
|
40
|
+
|---|---|---|---|---|---|
|
|
41
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
42
|
+
|
|
43
|
+
## 审批/决策矩阵实施选择
|
|
44
|
+
|
|
45
|
+
| 决策范围 | 蓝图规则 | 实施选择 | 配置任务 | 运行态验收 |
|
|
46
|
+
|---|---|---|---|---|
|
|
47
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
48
|
+
|
|
49
|
+
## 源逻辑 → 配置任务 → 验收证据追溯表
|
|
50
|
+
|
|
51
|
+
| 源逻辑 | 流程 | 配置任务 | 关联对象 | 验收证据 | 结论 |
|
|
52
|
+
|---|---|---|---|---|---|
|
|
53
|
+
| 待填写 | 待填写 | 待填写 | 待填写 | 待填写 | 待填写 |
|
|
54
|
+
|
|
15
55
|
## 配置 Skill / Capability 依据
|
|
16
56
|
|
|
17
57
|
Before writing each task, identify the matching BPMAX configuration skill and typed CLI domain.
|
|
@@ -32,7 +72,7 @@ Write tasks must include `bpmax-cli config adapters --format json` evidence.
|
|
|
32
72
|
| 工作区流程 | `workspace-flow:<workspace>` | `bpmax-workspace-editor` | `config workspace-flow export/lint/build/submit/verify` | 全量替换,提交前重新 export 并 merge |
|
|
33
73
|
| E2E | `e2e:<scenario>` | `bpmax-e2e-flow-test-operator` | `test-suite lint/promote`、浏览器证据 | 真实业务数据、截图、失败更新循环 |
|
|
34
74
|
|
|
35
|
-
##
|
|
75
|
+
## 实施阶段总览
|
|
36
76
|
|
|
37
77
|
| 阶段 | 执行方式 | 目标 |
|
|
38
78
|
|---|---|---|
|
|
@@ -19,6 +19,7 @@ Use these skills as needed; this skill orchestrates them and does not replace th
|
|
|
19
19
|
- `bpmax-memory-protocol`: read project/domain memory before non-trivial BPMAX blueprint work and store important decisions afterward.
|
|
20
20
|
- `lark-doc`: create, fetch, update, and verify Feishu Docx documents. Always use `--api-version v2`.
|
|
21
21
|
- `lark-whiteboard`: inspect or update existing Feishu whiteboards when a diagram must be edited after creation.
|
|
22
|
+
- `bpmax-approval-matrix`: use when approval, handler, CC, escalation, or child-flow routing depends on maintainable multi-dimensional rules; distinguish blueprint decision tables from an implemented BPMAX matrix application.
|
|
22
23
|
- BPMAX repo/API skills: inspect existing flows, forms, data sets, lists, details, permissions, navigation, and integrations before writing implementation claims.
|
|
23
24
|
|
|
24
25
|
## Workflow
|
|
@@ -26,10 +27,12 @@ Use these skills as needed; this skill orchestrates them and does not replace th
|
|
|
26
27
|
1. **Ground the inputs**
|
|
27
28
|
- Read all user-provided docs, screenshots, Feishu links, local files, and BPMAX config/API sources.
|
|
28
29
|
- Search Mem0 for prior project terms, naming decisions, flow ownership, and forbidden wording.
|
|
30
|
+
- Extract every explicit user adjustment separately from source facts. Preserve accepted human modeling decisions; when they conflict with a source artifact, expose the conflict and final decision instead of silently reverting either side.
|
|
29
31
|
- Extract business scope, target users, main lifecycle, related flows, public support objects, AI/agent boundaries, and acceptance criteria.
|
|
30
32
|
|
|
31
33
|
2. **Draft the blueprint**
|
|
32
34
|
- Use `references/blueprint-structure.md` for the document skeleton.
|
|
35
|
+
- Use `references/source-traceability-and-flow-modeling.md` to build the source-logic mapping, manual-adjustment register, main-flow stage map, parallel-scenario modeling decisions, approval/matrix assessment, PC/H5 navigation, and permission design before drafting flow chapters.
|
|
33
36
|
- 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
37
|
- Use `references/per-flow-required-structure.md` for every flow section. Each flow must be independently complete.
|
|
35
38
|
- Put each flow diagram in a Feishu whiteboard block such as `<whiteboard type="mermaid">...</whiteboard>`. Do not use Mermaid code blocks in final docs.
|
|
@@ -52,11 +55,13 @@ Use these skills as needed; this skill orchestrates them and does not replace th
|
|
|
52
55
|
```
|
|
53
56
|
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
57
|
- If project-specific wording matters, add `--require-term` and `--forbid-term`.
|
|
58
|
+
- Export and visually inspect every whiteboard against the source-logic mapping. A non-empty resource block or successful lint does not prove branch, sequence, parallel launch, or merge correctness.
|
|
55
59
|
- Fix every lint error and rerun until it passes, unless the user explicitly accepts a known exception.
|
|
56
60
|
|
|
57
61
|
5. **Final response**
|
|
58
62
|
- Return the Feishu document title and URL.
|
|
59
|
-
-
|
|
63
|
+
- List every flow with a `complete`, `incomplete`, or `blocked` conclusion; summarize whiteboard count, visual inspection, and lint result.
|
|
64
|
+
- Summarize preserved manual adjustments and any conflicts with source artifacts.
|
|
60
65
|
- State any business assumptions or unresolved confirmation items.
|
|
61
66
|
- Mention Feishu/lark auth or version blockers if they affected delivery.
|
|
62
67
|
|
|
@@ -69,7 +74,14 @@ Use these skills as needed; this skill orchestrates them and does not replace th
|
|
|
69
74
|
- 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
75
|
- 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
76
|
- 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.
|
|
77
|
+
- When the source lifecycle spans multiple business phases, the main flow must be divided into named stages with explicit entry, exit, and stage-completion conditions.
|
|
78
|
+
- Every parallel source scenario must have an explicit modeling decision: reuse one parameterized child flow, create separate child-flow types, or keep it in the parent flow. The decision must state participant differences, data/form differences, lifecycle differences, merge conditions, and the reason.
|
|
79
|
+
- Blueprint routing/decision matrices are mandatory when conditions affect approvers, handlers, child-flow creation, escalation, merge, or writeback. A formal BPMAX matrix application is optional and must not be claimed as online without implementation/readback evidence.
|
|
80
|
+
- Every flow must have separate PC and H5 navigation rows. An unsupported terminal still requires an explicit non-applicability row with hidden-entry behavior and acceptance.
|
|
81
|
+
- Permission design must cover create, view, edit, delete, submit, approve, navigation visibility, and field visibility/editability by step and role. Unauthorized behavior must be explicit.
|
|
82
|
+
- Source-node coverage, manual adjustments, stage decomposition, parallel modeling, and matrix assessment must be documented in tables and reviewed before claiming source completeness.
|
|
72
83
|
- 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.
|
|
84
|
+
- Per-flow creation, node, form, data set, view, automation, completion, and implementation-boundary details must be tables, not paragraph-only summaries.
|
|
73
85
|
- 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
86
|
- Do not park business-specific data sets/forms/lists globally. Shared support sections are for genuinely shared objects only.
|
|
75
87
|
- Default implementation boundary labels are exactly:
|
|
@@ -80,8 +92,9 @@ Use these skills as needed; this skill orchestrates them and does not replace th
|
|
|
80
92
|
## References
|
|
81
93
|
|
|
82
94
|
- Read `references/blueprint-structure.md` before drafting a new blueprint or restructuring a document.
|
|
95
|
+
- Read `references/source-traceability-and-flow-modeling.md` before interpreting a source flowchart or applying user modeling adjustments.
|
|
83
96
|
- Read `references/per-flow-required-structure.md` before writing or lint-fixing flow sections.
|
|
84
97
|
|
|
85
98
|
## Lint Script
|
|
86
99
|
|
|
87
|
-
`scripts/lint_blueprint_doc.py` checks a fetched Feishu Docx JSON or XML file for
|
|
100
|
+
`scripts/lint_blueprint_doc.py` checks a fetched Feishu Docx JSON or XML file for source traceability, manual-adjustment records, stage/parallel/matrix semantics, separate PC/H5 navigation, permission and field-access coverage, per-flow detail tables, whiteboard diagrams, forbidden Mermaid code blocks, implementation boundary labels, AI confirmation/fallback language, and project-specific required/forbidden terms.
|
|
@@ -15,6 +15,11 @@ Use this structure for BPMAX blueprint方案 documents unless the user provides
|
|
|
15
15
|
|
|
16
16
|
3. **总体业务架构**
|
|
17
17
|
- Main lifecycle.
|
|
18
|
+
- Source flow logic mapping and completeness review.
|
|
19
|
+
- Manual adjustment register.
|
|
20
|
+
- Main-flow stage map.
|
|
21
|
+
- Parallel-scenario modeling decisions.
|
|
22
|
+
- Approval/decision matrix assessment.
|
|
18
23
|
- Related flows.
|
|
19
24
|
- Public support objects.
|
|
20
25
|
- BPMAX configuration object map.
|
|
@@ -30,6 +35,8 @@ Use this structure for BPMAX blueprint方案 documents unless the user provides
|
|
|
30
35
|
- The first flow should be the end-to-end main lifecycle when the business has one.
|
|
31
36
|
|
|
32
37
|
6. **权限、导航、集成与自动化**
|
|
38
|
+
- A `PC/H5 导航设计` table with separate PC and H5 rows for every flow, including target users, entry/menu, route/page, visibility permission, and acceptance.
|
|
39
|
+
- A `权限设计` table covering flow/project actions, field visibility/editability by step and role, navigation visibility, denied/read-only behavior, and acceptance.
|
|
33
40
|
- Cross-flow permission rules, menus, Feishu/OpenClaw/API integration, automation logging, retry/fallback.
|
|
34
41
|
- Flow-specific automation remains in the owning flow section.
|
|
35
42
|
|
|
@@ -48,6 +55,7 @@ Use this structure for BPMAX blueprint方案 documents unless the user provides
|
|
|
48
55
|
|
|
49
56
|
- Use Docx XML through `lark-cli docs ... --api-version v2`.
|
|
50
57
|
- Use tables for field dictionaries, node configuration, writeback rules, and implementation boundaries.
|
|
58
|
+
- Use tables for source traceability, manual adjustments, main-flow stages, parallel modeling decisions, approval/decision matrix assessment, PC/H5 navigation, permission design, and all per-flow implementation details.
|
|
51
59
|
- Use `<whiteboard type="mermaid">...</whiteboard>` or another Feishu whiteboard resource block for process diagrams.
|
|
52
60
|
- Avoid code blocks for diagrams in final output.
|
|
53
61
|
- When updating existing docs, prefer block-level precise updates and preserve existing resource tokens.
|
|
@@ -22,6 +22,7 @@ Every BPMAX blueprint flow chapter must be independently complete. A reader shou
|
|
|
22
22
|
- Related/external flow links when needed.
|
|
23
23
|
|
|
24
24
|
3. **开始节点与创建表单**
|
|
25
|
+
- Use a table.
|
|
25
26
|
- Start node name.
|
|
26
27
|
- Creation form name.
|
|
27
28
|
- Creator role.
|
|
@@ -40,6 +41,7 @@ Every BPMAX blueprint flow chapter must be independently complete. A reader shou
|
|
|
40
41
|
- Do not include system-only fields in form templates. Examples that belong in data set/writeback notes instead of forms: `当前阶段` with source `系统写入`, `关联选题子流程` project references created automatically, `关联筹备子流程` project references created automatically, read-only child-flow links, internal relationship IDs, and other fields whose editable role is only `系统`.
|
|
41
42
|
|
|
42
43
|
6. **流程数据集**
|
|
44
|
+
- Use a table.
|
|
43
45
|
- Data set purpose.
|
|
44
46
|
- Key fields.
|
|
45
47
|
- Status fields.
|
|
@@ -49,14 +51,22 @@ Every BPMAX blueprint flow chapter must be independently complete. A reader shou
|
|
|
49
51
|
- System-written state fields, child-flow references, parent-flow references, internal relationship IDs, and other read-only linkage fields should be described here, not in the form template section.
|
|
50
52
|
|
|
51
53
|
7. **列表/筛选/详情/看板入口**
|
|
54
|
+
- Use a table.
|
|
55
|
+
- Design PC and H5 separately. If one terminal is not applicable, state the reason and hidden/blocked behavior explicitly.
|
|
52
56
|
- Target users.
|
|
53
57
|
- List columns or cards.
|
|
54
58
|
- Filters.
|
|
55
59
|
- Detail page sections.
|
|
56
60
|
- Dashboard or operational view if applicable.
|
|
57
61
|
- Action buttons.
|
|
62
|
+
- Navigation visibility and the matching row in the document-level `PC/H5 导航设计` table.
|
|
63
|
+
|
|
64
|
+
### Permission Coverage
|
|
65
|
+
|
|
66
|
+
Every flow must also appear in the document-level `权限设计` table. Cover create, view, edit, delete, submit, approve, and navigation permissions; field visibility/editability by flow step and user/role; and the hidden, read-only, or forbidden behavior for unauthorized users.
|
|
58
67
|
|
|
59
68
|
8. **自动化与 AI/agent**
|
|
69
|
+
- Use a table.
|
|
60
70
|
- Trigger point.
|
|
61
71
|
- Input data.
|
|
62
72
|
- Output draft/suggestion/card/writeback.
|
|
@@ -65,12 +75,14 @@ Every BPMAX blueprint flow chapter must be independently complete. A reader shou
|
|
|
65
75
|
- Audit log requirements.
|
|
66
76
|
|
|
67
77
|
9. **办结口径与下游联动**
|
|
78
|
+
- Use a table.
|
|
68
79
|
- Completion criteria.
|
|
69
80
|
- Final status.
|
|
70
81
|
- Written history/status fields.
|
|
71
82
|
- Downstream flows or views affected.
|
|
72
83
|
|
|
73
84
|
10. **BPMAX 实现边界**
|
|
85
|
+
- Use a table.
|
|
74
86
|
- Use exactly these labels:
|
|
75
87
|
- `BPMAX 配置可实现`
|
|
76
88
|
- `配置 + 脚本/API/现有插件`
|
|
@@ -96,3 +108,4 @@ Every BPMAX blueprint flow chapter must be independently complete. A reader shou
|
|
|
96
108
|
- A diagram that uses configuration objects as main business states.
|
|
97
109
|
- A diagram that turns background automation into separate business nodes.
|
|
98
110
|
- A workflow with redundant confirmation, transfer, or waiting nodes that do not change business state or require human/AI Agent handling.
|
|
111
|
+
- Paragraph-only summaries for creation, nodes, forms, data sets, views, automation, completion, or implementation boundaries.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<title>缺少建模审计表示例</title>
|
|
2
|
+
<h1>1. 蓝图定位与目标</h1>
|
|
3
|
+
<h1>2. BPMAX 实施总规则</h1>
|
|
4
|
+
<h1>3. 总体业务架构</h1>
|
|
5
|
+
<h1>4. 公共支撑配置</h1>
|
|
6
|
+
<h1>5. 流程一:主流程</h1>
|
|
7
|
+
<h2>5.1 业务目标与适用场景</h2>
|
|
8
|
+
<h2>5.2 流程模板</h2>
|
|
9
|
+
<whiteboard type="mermaid">flowchart TD
|
|
10
|
+
A[开始:创建申请] --> B[完成]</whiteboard>
|
|
11
|
+
<p>创建表单。</p>
|
|
12
|
+
<h2>5.3 开始节点与创建表单</h2><table><tr><td>创建</td></tr></table>
|
|
13
|
+
<h2>5.4 环节配置</h2><table><tr><td>处理</td></tr></table>
|
|
14
|
+
<h2>5.5 表单模板</h2><table><tr><td>字段</td></tr></table>
|
|
15
|
+
<h2>5.6 流程数据集</h2><table><tr><td>写回</td></tr></table>
|
|
16
|
+
<h2>5.7 列表/筛选/详情/看板入口</h2><table><tr><td>列表</td></tr></table>
|
|
17
|
+
<h2>5.8 自动化与 AI/agent</h2><table><tr><td>触发、输入、输出、人工确认、异常兜底</td></tr></table>
|
|
18
|
+
<h2>5.9 办结口径与下游联动</h2><table><tr><td>办结归档</td></tr></table>
|
|
19
|
+
<h2>5.10 BPMAX 实现边界</h2><table><tr><td>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务</td></tr></table>
|
|
20
|
+
<h1>6. BPMAX 可配置能力与需定制能力边界</h1>
|
|
21
|
+
<p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
|
|
22
|
+
<h1>7. 一期验收路径、风险与待确认事项</h1>
|
|
23
|
+
<p>验收、风险、待确认。</p>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<title>段落化流程细节示例</title>
|
|
2
|
+
<h1>1. 蓝图定位与目标</h1>
|
|
3
|
+
<h1>2. BPMAX 实施总规则</h1>
|
|
4
|
+
<h1>3. 总体业务架构</h1>
|
|
5
|
+
<h2>3.1 源流程逻辑映射与完整性核对</h2><table><tr><td>已覆盖</td></tr></table>
|
|
6
|
+
<h2>3.2 人工调整记录</h2><table><tr><td>无人工调整</td></tr></table>
|
|
7
|
+
<h2>3.3 主流程阶段划分</h2><table><tr><td>阶段一</td></tr></table>
|
|
8
|
+
<h2>3.4 并行场景建模决策</h2><table><tr><td>无并行场景</td></tr></table>
|
|
9
|
+
<h2>3.5 审批/决策矩阵评估</h2><table><tr><td>蓝图规则矩阵;正式 BPMAX 矩阵不采用</td></tr></table>
|
|
10
|
+
<h1>4. 公共支撑配置</h1>
|
|
11
|
+
<h1>5. 流程一:主流程</h1>
|
|
12
|
+
<h2>5.1 业务目标与适用场景</h2>
|
|
13
|
+
<h2>5.2 流程模板</h2>
|
|
14
|
+
<whiteboard type="mermaid">flowchart TD
|
|
15
|
+
A[开始:创建申请] --> B[完成]</whiteboard>
|
|
16
|
+
<h2>5.3 开始节点与创建表单</h2><p>创建表单。</p>
|
|
17
|
+
<h2>5.4 环节配置</h2><p>环节由负责人处理。</p>
|
|
18
|
+
<h2>5.5 表单模板</h2><p>字段为名称。</p>
|
|
19
|
+
<h2>5.6 流程数据集</h2><p>数据集负责写回。</p>
|
|
20
|
+
<h2>5.7 列表/筛选/详情/看板入口</h2><p>提供列表、筛选、详情和看板入口。</p>
|
|
21
|
+
<h2>5.8 自动化与 AI/agent</h2><p>触发、输入、输出、人工确认、异常兜底。</p>
|
|
22
|
+
<h2>5.9 办结口径与下游联动</h2><p>办结后归档。</p>
|
|
23
|
+
<h2>5.10 BPMAX 实现边界</h2><p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
|
|
24
|
+
<h1>6. BPMAX 可配置能力与需定制能力边界</h1>
|
|
25
|
+
<p>BPMAX 配置可实现;配置 + 脚本/API/现有插件;需定制插件/外部服务。</p>
|
|
26
|
+
<h1>7. 一期验收路径、风险与待确认事项</h1>
|
|
27
|
+
<p>验收、风险、待确认。</p>
|