bpmax-cli 0.2.1-beta.4 → 0.2.1-beta.41
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 +13 -5
- package/dist/bin.js +18658 -8166
- package/dist/bin.js.map +1 -1
- package/package.json +7 -4
- package/scripts/run-source-cli.mjs +121 -0
- package/skills/bpmax-ai-taskbook/SKILL.md +1 -0
- 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 +87 -0
- package/skills/bpmax-blueprint-doc-workflow/agents/openai.yaml +4 -0
- package/skills/bpmax-blueprint-doc-workflow/references/blueprint-structure.md +60 -0
- package/skills/bpmax-blueprint-doc-workflow/references/per-flow-required-structure.md +98 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-forbidden-term.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-mermaid-codeblock.xml +12 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-boundary.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-missing-whiteboard.xml +10 -0
- package/skills/bpmax-blueprint-doc-workflow/references/sample-pass.xml +55 -0
- package/skills/bpmax-blueprint-doc-workflow/scripts/lint_blueprint_doc.py +257 -0
- package/skills/bpmax-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-cli/SKILL.md +42 -0
- package/skills/bpmax-config-latest/SKILL.md +4 -0
- package/skills/bpmax-console-template-editor/SKILL.md +112 -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 +127 -594
- package/skills/bpmax-dataset-field-template-editor/references/full-detail-guide.md +570 -0
- 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 +116 -778
- package/skills/bpmax-dataset-template-editor/references/full-detail-guide.md +753 -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 +15 -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 +139 -533
- package/skills/bpmax-e2e-flow-test-operator/agents/openai.yaml +2 -3
- package/skills/bpmax-e2e-flow-test-operator/references/ai-test-suite.md +150 -9
- package/skills/bpmax-e2e-flow-test-operator/references/browser-only-checkpoints.md +6 -5
- package/skills/bpmax-e2e-flow-test-operator/references/full-detail-guide.md +570 -0
- 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-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-detail-template-editor/SKILL.md +43 -0
- package/skills/bpmax-flow-template-editor/SKILL.md +117 -1084
- 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 +1157 -0
- package/skills/bpmax-flow-template-editor/references/local-temp-workflow.md +1 -1
- 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 +8 -2
- package/skills/bpmax-flow-template-editor/references/save-draft-request-shape.md +7 -23
- 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 +130 -1104
- package/skills/bpmax-form-template-editor/agents/openai.yaml +2 -2
- package/skills/bpmax-form-template-editor/references/dynamic-field-state.md +164 -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 +1109 -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/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-list-template-editor/SKILL.md +119 -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 +458 -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/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 +13 -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-plugin-config/SKILL.md +20 -4
- 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 +7 -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 +20 -48
- package/skills/bpmax-user-mock-operator/agents/openai.yaml +2 -2
- package/skills/bpmax-user-model-editor/SKILL.md +24 -0
- package/skills/form-control-library/references/form-template-submit-schema.md +1 -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
package/package.json
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bpmax-cli",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.41",
|
|
4
4
|
"description": "CLI for BPMAX environments with multi-profile config and local login callback flow",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"bpmax-cli": "
|
|
7
|
+
"bpmax-cli": "scripts/run-source-cli.mjs"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"dist",
|
|
11
11
|
"scripts/install-skills.mjs",
|
|
12
|
+
"scripts/run-source-cli.mjs",
|
|
12
13
|
"skills",
|
|
14
|
+
"!skills/**/__pycache__/**",
|
|
15
|
+
"!skills/**/*.py[cod]",
|
|
13
16
|
"README.md"
|
|
14
17
|
],
|
|
15
18
|
"scripts": {
|
|
@@ -17,14 +20,14 @@
|
|
|
17
20
|
"build": "tsup",
|
|
18
21
|
"dev": "tsx src/bin.ts",
|
|
19
22
|
"install:skills": "node scripts/install-skills.mjs",
|
|
20
|
-
"test": "vitest run",
|
|
23
|
+
"test": "vitest run --exclude '.worktrees/**'",
|
|
21
24
|
"typecheck": "tsc --noEmit"
|
|
22
25
|
},
|
|
23
26
|
"engines": {
|
|
24
27
|
"node": ">=18"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@clack/prompts": "
|
|
30
|
+
"@clack/prompts": "1.0.1",
|
|
28
31
|
"axios": "^1.9.0",
|
|
29
32
|
"commander": "^14.0.0",
|
|
30
33
|
"jszip": "^3.10.1",
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'node:child_process';
|
|
4
|
+
import { readdir, readFile, stat } from 'node:fs/promises';
|
|
5
|
+
import { homedir } from 'node:os';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import process from 'node:process';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
|
|
10
|
+
const projectRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
11
|
+
const distEntrypoint = path.join(projectRoot, 'dist', 'bin.js');
|
|
12
|
+
const skillsStamp = path.join(homedir(), '.bpmax', 'skills.stamp');
|
|
13
|
+
|
|
14
|
+
async function mtimeMs(targetPath) {
|
|
15
|
+
try {
|
|
16
|
+
return (await stat(targetPath)).mtimeMs;
|
|
17
|
+
} catch {
|
|
18
|
+
return 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
async function newestMtime(targetPath) {
|
|
23
|
+
let targetStat;
|
|
24
|
+
try {
|
|
25
|
+
targetStat = await stat(targetPath);
|
|
26
|
+
} catch {
|
|
27
|
+
return 0;
|
|
28
|
+
}
|
|
29
|
+
if (!targetStat.isDirectory()) {
|
|
30
|
+
return targetStat.mtimeMs;
|
|
31
|
+
}
|
|
32
|
+
const entries = await readdir(targetPath, { withFileTypes: true });
|
|
33
|
+
const mtimes = await Promise.all(entries.map((entry) => newestMtime(path.join(targetPath, entry.name))));
|
|
34
|
+
return Math.max(targetStat.mtimeMs, ...mtimes);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function run(command, args, options = {}) {
|
|
38
|
+
return new Promise((resolve, reject) => {
|
|
39
|
+
const child = spawn(command, args, {
|
|
40
|
+
cwd: options.cwd,
|
|
41
|
+
env: options.env || process.env,
|
|
42
|
+
stdio: options.stdio || 'inherit',
|
|
43
|
+
});
|
|
44
|
+
child.on('error', reject);
|
|
45
|
+
child.on('close', (code, signal) => resolve({ code: code ?? 1, signal }));
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function ensureBuild() {
|
|
50
|
+
const sourceTreeMtime = await newestMtime(path.join(projectRoot, 'src'));
|
|
51
|
+
if (!sourceTreeMtime) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const distMtime = await mtimeMs(distEntrypoint);
|
|
55
|
+
const sourceMtime = Math.max(
|
|
56
|
+
sourceTreeMtime,
|
|
57
|
+
await mtimeMs(path.join(projectRoot, 'package.json')),
|
|
58
|
+
await mtimeMs(path.join(projectRoot, 'tsup.config.ts')),
|
|
59
|
+
await mtimeMs(path.join(projectRoot, 'tsconfig.json')),
|
|
60
|
+
);
|
|
61
|
+
if (distMtime >= sourceMtime) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const result = await run('npm', ['run', 'build', '--silent'], { cwd: projectRoot });
|
|
65
|
+
if (result.code !== 0) {
|
|
66
|
+
throw new Error(`failed to build source bpmax-cli (exit ${result.code})`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
async function ensureSkills() {
|
|
71
|
+
if (process.env.BPMAX_CLI_SOURCE_SKIP_SKILLS_SYNC) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const packageJson = JSON.parse(await readFile(path.join(projectRoot, 'package.json'), 'utf8'));
|
|
75
|
+
const currentStamp = await readFile(skillsStamp, 'utf8').then((value) => value.trim()).catch(() => '');
|
|
76
|
+
const stampMtime = await mtimeMs(skillsStamp);
|
|
77
|
+
const sourceSkillsMtime = await newestMtime(path.join(projectRoot, 'skills'));
|
|
78
|
+
if (currentStamp === packageJson.version && stampMtime >= sourceSkillsMtime) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
const result = await run(process.execPath, [path.join(projectRoot, 'scripts', 'install-skills.mjs')], {
|
|
82
|
+
cwd: projectRoot,
|
|
83
|
+
stdio: ['ignore', 'ignore', 'inherit'],
|
|
84
|
+
});
|
|
85
|
+
if (result.code !== 0) {
|
|
86
|
+
throw new Error(`failed to sync source bpmax-cli skills (exit ${result.code})`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async function main() {
|
|
91
|
+
await ensureBuild();
|
|
92
|
+
await ensureSkills();
|
|
93
|
+
const child = spawn(process.execPath, [distEntrypoint, ...process.argv.slice(2)], {
|
|
94
|
+
cwd: process.cwd(),
|
|
95
|
+
env: {
|
|
96
|
+
...process.env,
|
|
97
|
+
BPMAX_CLI_HOME: projectRoot,
|
|
98
|
+
BPMAX_CLI_SOURCE_ACTIVE: '1',
|
|
99
|
+
},
|
|
100
|
+
stdio: 'inherit',
|
|
101
|
+
});
|
|
102
|
+
for (const signal of ['SIGINT', 'SIGTERM']) {
|
|
103
|
+
process.on(signal, () => child.kill(signal));
|
|
104
|
+
}
|
|
105
|
+
child.on('error', (error) => {
|
|
106
|
+
console.error(`[bpmax-cli] failed to start source CLI: ${error.message}`);
|
|
107
|
+
process.exitCode = 1;
|
|
108
|
+
});
|
|
109
|
+
child.on('close', (code, signal) => {
|
|
110
|
+
if (signal) {
|
|
111
|
+
process.kill(process.pid, signal);
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
process.exitCode = code ?? 1;
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
main().catch((error) => {
|
|
119
|
+
console.error(`[bpmax-cli] ${error instanceof Error ? error.message : String(error)}`);
|
|
120
|
+
process.exitCode = 1;
|
|
121
|
+
});
|
|
@@ -159,6 +159,7 @@ Every AI task row must include:
|
|
|
159
159
|
- `dependencies`: upstream task IDs required before execution.
|
|
160
160
|
- `evidence`: expected proof such as readback hash, browser screenshot, test report, or lint result.
|
|
161
161
|
- For configuration write tasks, `evidence` or `notes` must include `bpmax-cli config adapters --format json`, the matching typed CLI lint/build/submit/verify/readback commands, and the domain-specific constraints from the relevant skill.
|
|
162
|
+
- Configuration write tasks that change fields, stable keys, value types, permissions, scripts, data sources, or template bindings must also include `bpmax-cli config <domain> impact --raw <raw> --work <work> --format json`. The task must classify discovered references as `checked-and-compatible`, confirmed `required-collateral`, `recommended-next-step`, or `unverified`; single-object lint/verify is not cross-object completion proof.
|
|
162
163
|
- Migration tasks that create or update multiple config objects must specify whether they will use `bpmax-cli config batch submit --manifest ...` and `bpmax-cli config batch readback --manifest ...`; if not, the task must explain why batch evidence is intentionally skipped.
|
|
163
164
|
- Tasks that depend on IDs returned by direct typed create/submit must consume the standard top-level `id` / `key` / `readback_hint` response fields instead of asking subagents to parse domain-specific response bodies.
|
|
164
165
|
- Batch `response_out` files are row envelopes: consume `ok` / `domain` / `id` / `action` at the top level, then read created IDs and hints from `response.id` / `response.key` / `response.readback_hint`; if a row is dry-run, copy `response.required_confirm` into the manifest `confirm` before retrying.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bpmax-api-platform-editor"
|
|
3
|
-
description: "
|
|
3
|
+
description: "用于通过 bpmax-cli typed config 创建或编辑 BPMAX 集成平台、实例配置和 API 代理配置,并完成系统 API 标准调试闭环。只要用户提到“新建集成平台”“编辑集成平台”“编辑实例配置”“编辑接口代理”“调试系统API”“改 link_system 配置”“调试 api-docs/system_api”“构造 api_platform / api_platform_instance / api_proxy 数据”或等价表达,就应使用这个 skill。它以 typed CLI profile、线上接口回读、本地 think_api_platform / think_api_proxy 镜像和调试证据为依据,完成平台、实例、API、实体绑定相关配置的读取、修改、保存回读和验证。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# BPMAX API Platform Editor
|
|
@@ -19,13 +19,13 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
19
19
|
- 不得以历史脏配置、顺手修复、统一风格、编辑器自动补字段、方便调试为理由修改需求外配置。
|
|
20
20
|
|
|
21
21
|
## 何时使用
|
|
22
|
-
-
|
|
22
|
+
- 用户需要通过 bpmax-cli typed config 管理 BPMAX 系统集成平台、实例、API 或代理配置。
|
|
23
23
|
- 用户要新增、编辑或核对集成平台、实例、API 代理、响应映射。
|
|
24
|
-
-
|
|
24
|
+
- 用户需要使用当前 CLI profile、capability 和线上回读结果完成配置闭环。
|
|
25
25
|
- 用户要求把接口配置完后再在系统 API 文档页完成真实调试。
|
|
26
26
|
|
|
27
27
|
## 前置条件
|
|
28
|
-
-
|
|
28
|
+
- 先通过 CLI profile/capability 和目标参数确认以下任一对象:
|
|
29
29
|
- `.../w:<workspace>/link_system`
|
|
30
30
|
- `.../w:<workspace>/link_system/detail?system=<platform_key>`
|
|
31
31
|
- `.../w:<workspace>/link_system/instance/edit?system=<platform_key>&id=<id>`
|
|
@@ -42,7 +42,7 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
42
42
|
|
|
43
43
|
## 脚本化闭环(第二阶段)
|
|
44
44
|
- 当前 skill 已补齐最小脚本化闭环,临时工件统一放在 `.codex/tmp/api-platform-editor/`:
|
|
45
|
-
- `contracts
|
|
45
|
+
- `contracts/`:typed CLI adapter 的 operation plan、capability 和 readback 契约
|
|
46
46
|
- `raw/`、`work/`、`meta/`:导出线上对象、人工编辑工作副本、确认状态
|
|
47
47
|
- `submit/`:最终提交包
|
|
48
48
|
- `result/`:提交响应、回读、verify、doc-debug 验收记录
|
|
@@ -55,9 +55,8 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
55
55
|
5. 先 dry-run:`bpmax-cli config api-platform submit --id <same-id> --payload <submit-file> --profile <profile> --format json`
|
|
56
56
|
6. 用户确认后再执行 `--confirm "submit api-platform <same-id>"`
|
|
57
57
|
7. 如果是实例或 API 变更,再执行文档页真实调试验收
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
- 在系统 API 文档页点击“发送请求”
|
|
58
|
+
- 当前仍必须保留页面参与的环节:
|
|
59
|
+
- 在系统 API 文档页点击“发送请求”做真实调试
|
|
61
60
|
- 最终页面刷新验收
|
|
62
61
|
- `doc-debug` 层只负责导出上下文和记录验收结果,不替代浏览器真实调试。
|
|
63
62
|
|
|
@@ -80,8 +79,8 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
80
79
|
- 如果停在“已改配置但未完成文档页调试”或“调试失败待排查”,结束前写 `session_state`。
|
|
81
80
|
|
|
82
81
|
## 核心原则
|
|
83
|
-
-
|
|
84
|
-
-
|
|
82
|
+
- 优先使用 bpmax-cli typed config 的当前 profile/auth/capability,不得把页面会话凭据作为配置读取或写入凭据。
|
|
83
|
+
- typed CLI 线上回读、实时接口返回和只读页面验收优先于本地 `think_api_platform`、`think_api_proxy` 镜像;本地配置只作为候选和结构参考,不能覆盖线上事实。
|
|
85
84
|
- 平台、实例、API、实体绑定必须分层处理,不要把它们混成一份“总配置”。
|
|
86
85
|
- 已验证的读取接口优先级:
|
|
87
86
|
- 平台:`GET /api/api_platform`、`GET /api/api_platform/by_key/:platform_key`
|
|
@@ -92,7 +91,7 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
92
91
|
- `/w:<workspace>/api-docs/system_api/<apiId>?system=<platform_key>`
|
|
93
92
|
- 不把 API 编辑页里的调试区作为标准验收路径
|
|
94
93
|
- 只要涉及实例脚本、签名、`request_schema`、响应映射或示例变更,就必须在文档调试页复测。
|
|
95
|
-
-
|
|
94
|
+
- 实施保存时,先通过 typed CLI adapter 的 operation plan、capability 和 readback 契约确认写入范围,再 build/submit;不要预先硬编码未验证的写接口形状。
|
|
96
95
|
- 除非用户明确要求,线上验证结果不手动回写本地配置镜像;本地仓库只更新 skill 和文档。
|
|
97
96
|
|
|
98
97
|
## 工作流
|
|
@@ -106,14 +105,11 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
106
105
|
- 如果是 `/api-docs/system_api/<id>?system=...`,按文档调试页处理。
|
|
107
106
|
- 进入配置构造前,先按平台、实例、API 和调试目标检索一次 Mem0。
|
|
108
107
|
|
|
109
|
-
### 2.
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- `sessionStorage`
|
|
115
|
-
- 当前页面最近的同域接口请求头
|
|
116
|
-
- 不得用页面内同域请求直接保存配置,也不得退化成终端 `curl` 手搓写请求。
|
|
108
|
+
### 2. 获取 CLI 上下文
|
|
109
|
+
- 使用当前 `bpmax-cli` profile、capability 和线上 readback 作为授权与事实来源。
|
|
110
|
+
- 浏览器页面只用于只读检查和最终页面验收;真实远端写入必须回到 `bpmax-cli config api-platform submit`。
|
|
111
|
+
- 不读取或复用浏览器 Cookie、浏览器存储、手工请求头或旧脚本环境变量。
|
|
112
|
+
- 不得用页面会话请求直接保存配置,也不得退化成终端手搓写请求。
|
|
117
113
|
|
|
118
114
|
### 3. 检索本地候选
|
|
119
115
|
- 只要需求涉及已有平台或已有 API,先检索本地镜像:
|
|
@@ -155,7 +151,7 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
155
151
|
- API:`api_key`、`name`、`method`、`path`、`request_schema`、`response_schema`、`request_example`、`response_example`
|
|
156
152
|
|
|
157
153
|
### 5. 构造目标 payload
|
|
158
|
-
-
|
|
154
|
+
- 以 typed CLI export/readback 的线上返回体和 build 输出为基准,不要从零伪造全量 schema。
|
|
159
155
|
- 平台层只改用户明确要求的字段:
|
|
160
156
|
- 名称
|
|
161
157
|
- `platform_key`
|
|
@@ -193,18 +189,15 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
193
189
|
- 不要把实例特有逻辑硬塞进单条 API 定义里
|
|
194
190
|
|
|
195
191
|
### 6. 提交方式
|
|
196
|
-
- 平台、实例、API 的最终保存接口与 payload
|
|
197
|
-
- 写契约抓取脚本:
|
|
198
|
-
- `scripts/capture_write_contract.py`
|
|
199
|
-
- 对 `api` 层,如果同时改了 `api_proxy_entity_binding`,必须额外提供 binding 保存请求或 HAR 片段
|
|
200
|
-
- 在没有抓到真实保存请求前:
|
|
201
|
-
- 可以读取
|
|
202
|
-
- 可以分析
|
|
203
|
-
- 可以构造候选改动
|
|
204
|
-
- 但不要在 skill 文档里提前硬编码未验证写链路
|
|
192
|
+
- 平台、实例、API 的最终保存接口与 payload 形状,必须以 typed CLI adapter 的 build 输出、operation plan、capability 和回读结果为准。
|
|
205
193
|
- 标准保存链路必须走 typed CLI:
|
|
206
194
|
- `bpmax-cli config api-platform build/submit/verify`
|
|
207
195
|
- 提交前必须确认 submit payload 的 operation plan 只包含本次范围内的 platform / instance / api / response_binding 操作。
|
|
196
|
+
- 在 typed CLI adapter 不能给出明确写入计划前:
|
|
197
|
+
- 可以读取
|
|
198
|
+
- 可以分析
|
|
199
|
+
- 可以构造候选改动
|
|
200
|
+
- 但不得用页面会话请求、网络抓包或手工接口调用替代 typed CLI 写入链路
|
|
208
201
|
- API 创建且带响应映射时,执行顺序固定为:
|
|
209
202
|
- `api_proxy -> binding -> readback`
|
|
210
203
|
|
|
@@ -234,7 +227,7 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
234
227
|
- 响应映射
|
|
235
228
|
- 文档调试
|
|
236
229
|
- 明确告诉用户本次读到的核心接口。
|
|
237
|
-
-
|
|
230
|
+
- 明确说明本次 typed CLI submit 的 operation plan、确认文本、回读 hash 和 verify 结果。
|
|
238
231
|
- 如果做了文档页调试,要明确说明:
|
|
239
232
|
- 用的是哪条文档页 URL
|
|
240
233
|
- 选择了哪个实例环境
|
|
@@ -246,7 +239,7 @@ description: "用于在 BPMAX 的系统集成页面中创建或编辑集成平
|
|
|
246
239
|
- 在 API 编辑页看到调试区就直接把它当唯一验收页。
|
|
247
240
|
- 跳过文档调试页,不验证实例脚本是否真正参与请求。
|
|
248
241
|
- 只改本地镜像,不核对线上真实对象。
|
|
249
|
-
-
|
|
242
|
+
- 绕过 typed CLI adapter 的 operation plan,就先假设写接口路径和请求体形状。
|
|
250
243
|
- 只提交 `api_proxy`,却不提交或不回读 `api_proxy_entity_binding`。
|
|
251
244
|
- 把实例专属签名、认证、包装逻辑直接写死进 API schema。
|
|
252
245
|
- 只改 `response_schema`,却不核对 `api_proxy_entity_binding`。
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "BPMAX API Platform Editor"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "使用 $bpmax-api-platform-editor
|
|
3
|
+
short_description: "通过 bpmax-cli typed config 创建或编辑 BPMAX 集成平台、实例和 API 配置"
|
|
4
|
+
default_prompt: "使用 $bpmax-api-platform-editor 通过 bpmax-cli typed config 创建或编辑 BPMAX 集成平台、实例配置和 API 代理,并通过线上接口回读完成调试验证。"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
- API 文档页:`/w:store_mgr/api-docs/system_api/18?system=dynamic`
|
|
49
49
|
|
|
50
50
|
## 说明
|
|
51
|
-
-
|
|
52
|
-
-
|
|
51
|
+
- typed CLI 线上回读和只读页面验收优先级高于本地 `think_api_*` 镜像。
|
|
52
|
+
- 写接口未在本参考中硬编码;实际编辑时必须以 typed CLI adapter 的 build 输出、operation plan 和 verify/readback 为准。
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
2. 检索 Mem0 和本地镜像,找已有平台、实例、API 骨架。
|
|
6
6
|
3. 读取线上真实对象。
|
|
7
7
|
4. 明确本次变更落在哪一层。
|
|
8
|
-
5.
|
|
8
|
+
5. 以 typed CLI export/readback 的线上对象和 build 输出构造改动。
|
|
9
9
|
6. 保存后立刻回读线上对象。
|
|
10
10
|
7. 打开文档调试页完成真实调试。
|
|
11
11
|
8. 必要时再查看调用日志页补充证据。
|
|
@@ -27,6 +27,6 @@
|
|
|
27
27
|
- 文档调试页真实请求符合预期
|
|
28
28
|
|
|
29
29
|
## 暂未固化的内容
|
|
30
|
-
- 平台、实例、API
|
|
30
|
+
- 平台、实例、API 的 typed CLI adapter 写入契约、operation plan 和 readback 字段
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
这些内容必须在 typed CLI build/submit/verify 链路中确认,再按事实更新 skill。不得从页面会话请求、网络抓包或手工接口调用中反推写入路径。
|
|
@@ -44,13 +44,44 @@ bpmax-cli taskbook lint --source .codex/tmp/TASKBOOK.md
|
|
|
44
44
|
|
|
45
45
|
2. Matrix app:
|
|
46
46
|
|
|
47
|
+
完整矩阵定义优先使用聚合生命周期命令。矩阵定义必须同时包含表单、`category=matrix` 流程、数据集、带 `ProjectDetailEdit` 修改操作的列表、筛选器和工作区绑定;流程至少保留一个名为“生效中/进行中”或 `status=1` 的维护环节:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
bpmax-cli matrix app create --workspace <workspace> --name "<matrix name>" \
|
|
51
|
+
--form-work <form-work.json> --flow-work <flow-work.json> \
|
|
52
|
+
--dataset-work <dataset-work.json> --list-work <list-work.json> \
|
|
53
|
+
--filter-work <filter-work.json> --format json
|
|
54
|
+
bpmax-cli matrix app create --workspace <workspace> --name "<matrix name>" \
|
|
55
|
+
--form-work <form-work.json> --flow-work <flow-work.json> \
|
|
56
|
+
--dataset-work <dataset-work.json> --list-work <list-work.json> \
|
|
57
|
+
--filter-work <filter-work.json> \
|
|
58
|
+
--confirm "create matrix app <matrix name> in <workspace>" --format json
|
|
59
|
+
bpmax-cli matrix app readback --workspace <workspace> --flow-type <matrix_flow_type> --format json
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
编辑矩阵定义时,用 typed config build 产物组成 batch manifest,再执行聚合更新;更新成功后命令会对完整矩阵对象图做 exact readback:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bpmax-cli matrix app update --workspace <workspace> --flow-type <matrix_flow_type> --manifest <manifest.json> --format json
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
删除默认先 dry-run,确认对象图和删除顺序后才执行:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
bpmax-cli matrix app delete --workspace <workspace> --flow-type <matrix_flow_type> --format json
|
|
72
|
+
bpmax-cli matrix app delete --workspace <workspace> --flow-type <matrix_flow_type> \
|
|
73
|
+
--confirm "delete matrix app <matrix_flow_type> from <workspace>" --format json
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`matrix app create/update/delete/readback` 是完整维护入口。下面的 `config flow-app create` 只保留为通用流程应用底层能力,单独使用时不会创建矩阵数据集、列表或筛选器:
|
|
77
|
+
|
|
47
78
|
```bash
|
|
48
79
|
bpmax-cli config flow-app create --workspace <workspace> --form-work <matrix-form-work> --flow-work <matrix-flow-work> --name "<matrix name>"
|
|
49
80
|
bpmax-cli config flow-app create --workspace <workspace> --form-work <matrix-form-work> --flow-work <matrix-flow-work> --name "<matrix name>" --confirm "create flow-app <matrix name> in <workspace>" --evidence-out .codex/tmp/matrix-target-context.csv --response-out .codex/tmp/matrix-flow-app-create.response.json
|
|
50
81
|
bpmax-cli config flow-app context --workspace <workspace> --flow <matrix_flow_type> --evidence-out .codex/tmp/matrix-target-context.csv --format json
|
|
51
82
|
```
|
|
52
83
|
|
|
53
|
-
`flow-app create
|
|
84
|
+
若使用底层 `flow-app create`,确认执行必须同时保留 `--response-out` 和 `--evidence-out`。`config flow-app context` 的 `target_context.evidence_status` 必须是 `verified`,且 `missing_context` 必须为空,才允许进入规则记录 seed、主流程 `matrix_owner` 接入或导航配置。该 evidence 是矩阵应用的 apply-ready 上下文,必须记录 `flow_type`、`flow_template_id`、`form_template_id`、`form_template_draft_id`、`workspace_key` 和 `workspace_readback_hash`。
|
|
54
85
|
|
|
55
86
|
3. Matrix rule records:
|
|
56
87
|
|
|
@@ -69,6 +100,13 @@ bpmax-cli project create --profile <profile> --flow-type <matrix_flow_type> --js
|
|
|
69
100
|
|
|
70
101
|
5. Verification:
|
|
71
102
|
|
|
103
|
+
Submit 前先做分层 lint/readback:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
bpmax-cli matrix app inspect --flow-type <matrix_flow_type> --workspace <workspace> --profile <profile> --format json
|
|
107
|
+
bpmax-cli matrix consumer lint --flow-type <business_flow_type> --node <node_id> --profile <profile> --format json
|
|
108
|
+
```
|
|
109
|
+
|
|
72
110
|
- Matrix app is visible in the target workspace.
|
|
73
111
|
- Matrix rule project exists online with real approver fields.
|
|
74
112
|
- Business flow create/submit reaches the matrix-owned step.
|
|
@@ -79,7 +117,21 @@ bpmax-cli project create --profile <profile> --flow-type <matrix_flow_type> --js
|
|
|
79
117
|
bpmax-cli matrix owner-resolve --profile <profile> --flow-type <business_flow_type> --node <node_id> --project-id <project_id> --format json
|
|
80
118
|
```
|
|
81
119
|
|
|
82
|
-
|
|
120
|
+
`owner-resolve` 必须调用平台 `/project/predicted_path`,不再只做静态配置解析。它会返回指定节点的 `predicted_owners`,但仍不代替真实多用户页面验收。
|
|
121
|
+
|
|
122
|
+
最终聚合 gate 必须一次对账矩阵应用、表单/列表/筛选模板、workspace 绑定、线上规则记录、审批人有效状态、消费节点和 owner resolver:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
bpmax-cli matrix verify \
|
|
126
|
+
--matrix-flow-type <matrix_flow_type> \
|
|
127
|
+
--consumer-flow-type <business_flow_type> \
|
|
128
|
+
--node <node_id> --project-id <project_id> \
|
|
129
|
+
--approver-field <owner_field> \
|
|
130
|
+
--workspace <workspace> \
|
|
131
|
+
--profile <profile> --format json
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
任一层缺失都不得宣称“审批矩阵已可用”。
|
|
83
135
|
|
|
84
136
|
## Stop Conditions
|
|
85
137
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-blueprint-doc-workflow
|
|
3
|
+
description: 用于生成、更新、审查和 lint BPMAX 蓝图方案飞书文档。只要用户要求“生成 BPMAX 蓝图方案”“创建 BPMAX 蓝图飞书文档”“检查蓝图文档是否完备”“每个流程独立完整”“流程图必须用飞书画板承载”“不要用 Mermaid 代码块”等场景,就使用本 skill 编排 lark-doc、lark-whiteboard、BPMAX 相关只读调研和结构 lint,确保输出是强结构、可实施、可校验的 Feishu Docx 蓝图文档。
|
|
4
|
+
metadata:
|
|
5
|
+
requires:
|
|
6
|
+
bins: ["lark-cli", "python3"]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# BPMAX Blueprint Doc Workflow
|
|
10
|
+
|
|
11
|
+
## Purpose
|
|
12
|
+
|
|
13
|
+
Use this skill to produce BPMAX blueprint方案 documents as Feishu Docx artifacts with strict structure and lint gates. It is narrower than `bpmax-implementation-plan-workflow`: this skill focuses on blueprint document generation and quality gates, not default task plans, Feishu Base, or Gantt views.
|
|
14
|
+
|
|
15
|
+
## Required Companion Skills
|
|
16
|
+
|
|
17
|
+
Use these skills as needed; this skill orchestrates them and does not replace them.
|
|
18
|
+
|
|
19
|
+
- `bpmax-memory-protocol`: read project/domain memory before non-trivial BPMAX blueprint work and store important decisions afterward.
|
|
20
|
+
- `lark-doc`: create, fetch, update, and verify Feishu Docx documents. Always use `--api-version v2`.
|
|
21
|
+
- `lark-whiteboard`: inspect or update existing Feishu whiteboards when a diagram must be edited after creation.
|
|
22
|
+
- BPMAX repo/API skills: inspect existing flows, forms, data sets, lists, details, permissions, navigation, and integrations before writing implementation claims.
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
1. **Ground the inputs**
|
|
27
|
+
- Read all user-provided docs, screenshots, Feishu links, local files, and BPMAX config/API sources.
|
|
28
|
+
- Search Mem0 for prior project terms, naming decisions, flow ownership, and forbidden wording.
|
|
29
|
+
- Extract business scope, target users, main lifecycle, related flows, public support objects, AI/agent boundaries, and acceptance criteria.
|
|
30
|
+
|
|
31
|
+
2. **Draft the blueprint**
|
|
32
|
+
- Use `references/blueprint-structure.md` for the document skeleton.
|
|
33
|
+
- Treat flows as the primary structure. Data sets, forms, lists, details, dashboards, automations, and permissions must attach to an owning flow unless they are genuinely shared support objects.
|
|
34
|
+
- Use `references/per-flow-required-structure.md` for every flow section. Each flow must be independently complete.
|
|
35
|
+
- Put each flow diagram in a Feishu whiteboard block such as `<whiteboard type="mermaid">...</whiteboard>`. Do not use Mermaid code blocks in final docs.
|
|
36
|
+
|
|
37
|
+
3. **Create or update Feishu Docx**
|
|
38
|
+
- For new docs, use `lark-cli docs +create --api-version v2`.
|
|
39
|
+
- For updates, fetch the relevant outline/section first and use precise block operations where possible.
|
|
40
|
+
- Preserve existing resource blocks unless the user explicitly asks to replace them.
|
|
41
|
+
|
|
42
|
+
4. **Lint before claiming completion**
|
|
43
|
+
- Fetch the produced/updated doc:
|
|
44
|
+
```bash
|
|
45
|
+
lark-cli docs +fetch --api-version v2 --doc <DOC> --detail with-ids --format json > /tmp/blueprint-fetch.json
|
|
46
|
+
```
|
|
47
|
+
- Run:
|
|
48
|
+
```bash
|
|
49
|
+
SKILL_DIR="${BPMAX_BLUEPRINT_DOC_WORKFLOW_SKILL_DIR:-$HOME/.codex/skills/bpmax-blueprint-doc-workflow}"
|
|
50
|
+
python3 "$SKILL_DIR/scripts/lint_blueprint_doc.py" \
|
|
51
|
+
--source /tmp/blueprint-fetch.json
|
|
52
|
+
```
|
|
53
|
+
If the skill was installed under another agent root, set `BPMAX_BLUEPRINT_DOC_WORKFLOW_SKILL_DIR` to that skill directory before running the lint.
|
|
54
|
+
- If project-specific wording matters, add `--require-term` and `--forbid-term`.
|
|
55
|
+
- Fix every lint error and rerun until it passes, unless the user explicitly accepts a known exception.
|
|
56
|
+
|
|
57
|
+
5. **Final response**
|
|
58
|
+
- Return the Feishu document title and URL.
|
|
59
|
+
- Summarize the flows covered, whiteboard diagram count, and lint result.
|
|
60
|
+
- State any business assumptions or unresolved confirmation items.
|
|
61
|
+
- Mention Feishu/lark auth or version blockers if they affected delivery.
|
|
62
|
+
|
|
63
|
+
## Hard Rules
|
|
64
|
+
|
|
65
|
+
- Final blueprint deliverables are Feishu Docx documents, not local Markdown, unless the user explicitly asks for local-only output.
|
|
66
|
+
- Every business flow must have its own complete section. Do not make a flow rely on another section for fields, forms, writeback, AI behavior, or implementation boundary.
|
|
67
|
+
- Every flow must have a process diagram, and the diagram must be a Feishu whiteboard/resource block. Mermaid code blocks are draft-only and fail lint.
|
|
68
|
+
- A start node must name the creation action/form.
|
|
69
|
+
- Flow nodes must represent business-meaningful action/state changes that require a human or AI Agent to handle. A valid node should make clear who/what handles it and what business state changes after it.
|
|
70
|
+
- Apply Occam's razor to workflow design: keep diagrams and node tables as simple as possible, avoid redundant steps, and do not make pure system automation, notifications, data sync, field copying, or background script execution a standalone flow node. Put these in the automation/writeback column of the relevant business node instead.
|
|
71
|
+
- Main-flow diagrams must not expand child-flow internals. Represent each child flow as a special-styled node inside the parent flow, such as a `subroutine` node or a node with a distinct class/style, and document the child-flow details only in that child flow's own complete section.
|
|
72
|
+
- Form templates must only contain fields that users or AI Agents need to view, fill, confirm, or edit in that form. Do not put system-written state fields, read-only project references, auto-created child-flow links, or internal relationship fields in business forms; document them in the flow data set, automation, and writeback sections instead.
|
|
73
|
+
- AI/agent content must include trigger, input, output, human confirmation, and fallback. AI must not be described as final approver for key business decisions.
|
|
74
|
+
- Do not park business-specific data sets/forms/lists globally. Shared support sections are for genuinely shared objects only.
|
|
75
|
+
- Default implementation boundary labels are exactly:
|
|
76
|
+
- `BPMAX 配置可实现`
|
|
77
|
+
- `配置 + 脚本/API/现有插件`
|
|
78
|
+
- `需定制插件/外部服务`
|
|
79
|
+
|
|
80
|
+
## References
|
|
81
|
+
|
|
82
|
+
- Read `references/blueprint-structure.md` before drafting a new blueprint or restructuring a document.
|
|
83
|
+
- Read `references/per-flow-required-structure.md` before writing or lint-fixing flow sections.
|
|
84
|
+
|
|
85
|
+
## Lint Script
|
|
86
|
+
|
|
87
|
+
`scripts/lint_blueprint_doc.py` checks a fetched Feishu Docx JSON or XML file for blueprint structure, per-flow completeness, whiteboard diagrams, forbidden Mermaid code blocks, implementation boundary labels, AI confirmation/fallback language, and project-specific required/forbidden terms.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "BPMAX Blueprint Doc Workflow"
|
|
3
|
+
short_description: "Generate linted BPMAX blueprint Feishu docs"
|
|
4
|
+
default_prompt: "Use $bpmax-blueprint-doc-workflow to generate a BPMAX blueprint Feishu document with per-flow whiteboard diagrams and lint checks."
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# BPMAX Blueprint Structure
|
|
2
|
+
|
|
3
|
+
Use this structure for BPMAX blueprint方案 documents unless the user provides a stricter structure.
|
|
4
|
+
|
|
5
|
+
## Document-Level Structure
|
|
6
|
+
|
|
7
|
+
1. **蓝图定位与目标**
|
|
8
|
+
- Background, business objective, one-phase/two-phase scope, audience, success criteria.
|
|
9
|
+
|
|
10
|
+
2. **BPMAX 实施总规则**
|
|
11
|
+
- Flow-first rule.
|
|
12
|
+
- Form/data/list/detail/dashboard ownership.
|
|
13
|
+
- AI/agent confirmation boundary.
|
|
14
|
+
- Diagram rule: process diagrams must be Feishu whiteboards.
|
|
15
|
+
|
|
16
|
+
3. **总体业务架构**
|
|
17
|
+
- Main lifecycle.
|
|
18
|
+
- Related flows.
|
|
19
|
+
- Public support objects.
|
|
20
|
+
- BPMAX configuration object map.
|
|
21
|
+
|
|
22
|
+
4. **公共支撑配置**
|
|
23
|
+
- Only genuinely shared objects belong here.
|
|
24
|
+
- Examples: organization dictionary, BPMAX user model extensions, shared tool library, automation logs, role/navigation rules.
|
|
25
|
+
- Do not make public data sets independent business flows when the data belongs to a process.
|
|
26
|
+
|
|
27
|
+
5. **业务流程章节**
|
|
28
|
+
- Each business flow gets a full independent chapter.
|
|
29
|
+
- Use `per-flow-required-structure.md`.
|
|
30
|
+
- The first flow should be the end-to-end main lifecycle when the business has one.
|
|
31
|
+
|
|
32
|
+
6. **权限、导航、集成与自动化**
|
|
33
|
+
- Cross-flow permission rules, menus, Feishu/OpenClaw/API integration, automation logging, retry/fallback.
|
|
34
|
+
- Flow-specific automation remains in the owning flow section.
|
|
35
|
+
|
|
36
|
+
7. **BPMAX 可配置能力与需定制能力边界**
|
|
37
|
+
- Use the exact three labels:
|
|
38
|
+
- `BPMAX 配置可实现`
|
|
39
|
+
- `配置 + 脚本/API/现有插件`
|
|
40
|
+
- `需定制插件/外部服务`
|
|
41
|
+
|
|
42
|
+
8. **一期验收路径、风险与待确认事项**
|
|
43
|
+
- End-to-end acceptance path.
|
|
44
|
+
- Acceptance metrics.
|
|
45
|
+
- Risks and unresolved business decisions.
|
|
46
|
+
|
|
47
|
+
## Feishu Document Requirements
|
|
48
|
+
|
|
49
|
+
- Use Docx XML through `lark-cli docs ... --api-version v2`.
|
|
50
|
+
- Use tables for field dictionaries, node configuration, writeback rules, and implementation boundaries.
|
|
51
|
+
- Use `<whiteboard type="mermaid">...</whiteboard>` or another Feishu whiteboard resource block for process diagrams.
|
|
52
|
+
- Avoid code blocks for diagrams in final output.
|
|
53
|
+
- When updating existing docs, prefer block-level precise updates and preserve existing resource tokens.
|
|
54
|
+
|
|
55
|
+
## Blueprint Tone
|
|
56
|
+
|
|
57
|
+
- Write for implementers and reviewers.
|
|
58
|
+
- Be specific enough for BPMAX configuration without inventing unconfirmed personal names or private data.
|
|
59
|
+
- Use role names, flow names, field types, triggers, writeback behavior, and validation rules.
|
|
60
|
+
- Label uncertain items as “待业务确认” only in a dedicated “待确认事项” section, not inside required flow structure.
|