bpmax-cli 0.1.44-beta.16 → 0.1.44-beta.18
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 +223 -8
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-ai-taskbook/SKILL.md +18 -2
- package/skills/bpmax-e2e-flow-config-orchestrator/SKILL.md +5 -0
- package/skills/bpmax-e2e-flow-config-orchestrator/references/orchestration-matrix.md +4 -1
- package/skills/bpmax-nav-config-editor/SKILL.md +3 -2
- package/skills/bpmax-nav-config-editor/references/api-workflow.md +6 -4
- package/skills/bpmax-nav-config-editor/references/path-mapping-rules.md +5 -0
package/dist/bin.js
CHANGED
|
@@ -449,7 +449,7 @@ function normalizePath2(path11) {
|
|
|
449
449
|
// package.json
|
|
450
450
|
var package_default = {
|
|
451
451
|
name: "bpmax-cli",
|
|
452
|
-
version: "0.1.44-beta.
|
|
452
|
+
version: "0.1.44-beta.18",
|
|
453
453
|
description: "CLI for BPMAX environments with multi-profile config and local login callback flow",
|
|
454
454
|
type: "module",
|
|
455
455
|
bin: {
|
|
@@ -4812,6 +4812,90 @@ function buildNavConfigSubmitPayload(work, raw, options = {}) {
|
|
|
4812
4812
|
all_records: Boolean(options.allRecords)
|
|
4813
4813
|
};
|
|
4814
4814
|
}
|
|
4815
|
+
function lintNavConfigWork(work, errors) {
|
|
4816
|
+
if (work.domain !== void 0 && work.domain !== "nav-config") {
|
|
4817
|
+
errors.push(`nav-config work domain must be nav-config, got ${JSON.stringify(work.domain)}.`);
|
|
4818
|
+
}
|
|
4819
|
+
if (typeof work.workspace !== "string" || !work.workspace.trim()) {
|
|
4820
|
+
errors.push("nav-config work requires workspace.");
|
|
4821
|
+
}
|
|
4822
|
+
if (!isRecord3(work.configs)) {
|
|
4823
|
+
errors.push("nav-config work requires configs object.");
|
|
4824
|
+
return;
|
|
4825
|
+
}
|
|
4826
|
+
for (const type of NAV_CONFIG_TYPES) {
|
|
4827
|
+
const config = work.configs[type];
|
|
4828
|
+
if (!isRecord3(config)) {
|
|
4829
|
+
errors.push(`nav-config work is missing ${type}.`);
|
|
4830
|
+
continue;
|
|
4831
|
+
}
|
|
4832
|
+
try {
|
|
4833
|
+
const payload = navConfigToSubmitRecord(type, config);
|
|
4834
|
+
const content = isRecord3(payload.content) ? payload.content : {};
|
|
4835
|
+
const contentKey = NAV_CONTENT_KEY_BY_TYPE[type];
|
|
4836
|
+
if (!Array.isArray(content[contentKey])) {
|
|
4837
|
+
errors.push(`nav-config ${type} content.${contentKey} must be an array.`);
|
|
4838
|
+
}
|
|
4839
|
+
const name = typeof payload.name === "string" ? payload.name.trim() : "";
|
|
4840
|
+
if (!name) {
|
|
4841
|
+
errors.push(`nav-config ${type} requires name.`);
|
|
4842
|
+
}
|
|
4843
|
+
const items = Array.isArray(content[contentKey]) ? content[contentKey] : [];
|
|
4844
|
+
lintNavConfigNodes(type, items, `${type}.${contentKey}`, errors);
|
|
4845
|
+
} catch (error) {
|
|
4846
|
+
errors.push(error instanceof Error ? error.message : String(error));
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
function lintNavConfigNodes(type, nodes, pathPrefix, errors) {
|
|
4851
|
+
const mobile = type === "navmenu_mobile" || type === "shortcut_mobile";
|
|
4852
|
+
const shortcut = type === "shortcut" || type === "shortcut_mobile";
|
|
4853
|
+
nodes.forEach((node, index) => {
|
|
4854
|
+
const nodePath = `${pathPrefix}[${index}]`;
|
|
4855
|
+
if (!isRecord3(node)) {
|
|
4856
|
+
errors.push(`${nodePath} must be an object.`);
|
|
4857
|
+
return;
|
|
4858
|
+
}
|
|
4859
|
+
const name = typeof node.name === "string" ? node.name.trim() : "";
|
|
4860
|
+
if (!name) {
|
|
4861
|
+
errors.push(`${nodePath}.name must be a non-empty string.`);
|
|
4862
|
+
}
|
|
4863
|
+
if (name.length > 6) {
|
|
4864
|
+
errors.push(`${nodePath}.name exceeds the 6 Hanzi limit.`);
|
|
4865
|
+
}
|
|
4866
|
+
const icon = typeof node.icon === "string" ? node.icon.trim() : "";
|
|
4867
|
+
if (!/^(ri ri_[A-Za-z0-9_-]+|el-icon-[A-Za-z0-9_-]+)$/.test(icon)) {
|
|
4868
|
+
errors.push(`${nodePath}.icon must be a full icon class such as ri ri_home-5-line.`);
|
|
4869
|
+
}
|
|
4870
|
+
const nodePathValue = typeof node.path === "string" ? node.path.trim() : "";
|
|
4871
|
+
if (mobile && (nodePathValue.startsWith("/project") || nodePathValue.startsWith("/myProject"))) {
|
|
4872
|
+
errors.push(`${nodePath}.path must use an H5 path; got PC route instead of H5 route.`);
|
|
4873
|
+
}
|
|
4874
|
+
if (!mobile && nodePathValue.startsWith("/pages/")) {
|
|
4875
|
+
errors.push(`${nodePath}.path must stay on PC routing; got H5 route instead of PC route.`);
|
|
4876
|
+
}
|
|
4877
|
+
const explicitFlowKey = typeof node.flow_key === "string" ? node.flow_key.trim() : typeof node.flowKey === "string" ? node.flowKey.trim() : "";
|
|
4878
|
+
if (explicitFlowKey && /[?&]flow_type=/.test(nodePathValue) && !/[?&]flow_key=/.test(nodePathValue)) {
|
|
4879
|
+
errors.push(`${nodePath}.path must preserve non-empty flow_key for flow navigation.`);
|
|
4880
|
+
}
|
|
4881
|
+
if (/[?&]flow_key=(&|$)/.test(nodePathValue)) {
|
|
4882
|
+
errors.push(`${nodePath}.path has an empty flow_key parameter.`);
|
|
4883
|
+
}
|
|
4884
|
+
const permissionType = typeof node.permissionType === "string" ? node.permissionType : "";
|
|
4885
|
+
if (permissionType && !["PERMISSION_POINT", "VISIBILITY_SCOPE", "PUBLIC"].includes(permissionType)) {
|
|
4886
|
+
errors.push(`${nodePath}.permissionType must be PERMISSION_POINT, VISIBILITY_SCOPE, or PUBLIC.`);
|
|
4887
|
+
}
|
|
4888
|
+
const sub = node.sub;
|
|
4889
|
+
if (!Array.isArray(sub)) {
|
|
4890
|
+
errors.push(`${nodePath}.sub must be an array.`);
|
|
4891
|
+
return;
|
|
4892
|
+
}
|
|
4893
|
+
if (shortcut && sub.length > 0) {
|
|
4894
|
+
errors.push(`${nodePath}.sub must stay empty for shortcut configs.`);
|
|
4895
|
+
}
|
|
4896
|
+
lintNavConfigNodes(type, sub, `${nodePath}.sub`, errors);
|
|
4897
|
+
});
|
|
4898
|
+
}
|
|
4815
4899
|
async function collectNavConfigAggregate(profile, id) {
|
|
4816
4900
|
const definition = CONFIG_DOMAINS["nav-config"];
|
|
4817
4901
|
await ensureConfigCapability(profile, `${definition.capability}.export`);
|
|
@@ -5697,6 +5781,9 @@ async function lintConfigWorkFile(file) {
|
|
|
5697
5781
|
if ((Object.prototype.hasOwnProperty.call(value, "content") || isRecord3(value.basic)) && pageTemplateType(value) === 1) {
|
|
5698
5782
|
validateListTemplateActionGate(value, errors);
|
|
5699
5783
|
}
|
|
5784
|
+
if (value.domain === "nav-config" || Object.prototype.hasOwnProperty.call(value, "configs")) {
|
|
5785
|
+
lintNavConfigWork(value, errors);
|
|
5786
|
+
}
|
|
5700
5787
|
if (isFlowTemplateWork(value)) {
|
|
5701
5788
|
const flowWork = value;
|
|
5702
5789
|
validateFlowTemplateRemoteTemplateRefs(flowWork, errors);
|
|
@@ -6504,6 +6591,8 @@ import { password, text } from "@clack/prompts";
|
|
|
6504
6591
|
import axios5 from "axios";
|
|
6505
6592
|
var execFileAsync = promisify(execFile);
|
|
6506
6593
|
var PLATFORM_SYSCONFIG_BRANCH = "master";
|
|
6594
|
+
var LATEST_EXEC_MAX_BUFFER = 64 * 1024 * 1024;
|
|
6595
|
+
var LATEST_OUTPUT_PREVIEW_CHARS = 4e3;
|
|
6507
6596
|
async function ensureConfigCapability2(profile, capability) {
|
|
6508
6597
|
if (capabilityEnabled(profile.config.capabilities_cache, capability)) {
|
|
6509
6598
|
return;
|
|
@@ -6739,6 +6828,31 @@ function sanitizeConfigRepositoryValue(value) {
|
|
|
6739
6828
|
const redacted = redactAuditValue(value);
|
|
6740
6829
|
return sanitizeGitUrls(redacted);
|
|
6741
6830
|
}
|
|
6831
|
+
function outputText(value) {
|
|
6832
|
+
if (typeof value === "string") {
|
|
6833
|
+
return value;
|
|
6834
|
+
}
|
|
6835
|
+
try {
|
|
6836
|
+
return JSON.stringify(value) ?? String(value);
|
|
6837
|
+
} catch {
|
|
6838
|
+
return String(value);
|
|
6839
|
+
}
|
|
6840
|
+
}
|
|
6841
|
+
function redactLatestOutputText(value) {
|
|
6842
|
+
return value.replace(/\b(https?:\/\/)([^/\s:@]+):([^/\s@]+)@/gi, "$1[REDACTED]@").replace(/authorization\s*:?\s*bearer\s+[^\s,;]+/gi, "Authorization Bearer [REDACTED]").replace(/authorization\s*:?\s*basic\s+[^\s,;]+/gi, "Authorization Basic [REDACTED]").replace(/\b(cookie|set-cookie|x-api-key)\s*[:=]\s*[^\n\r]+/gi, "$1 [REDACTED]").replace(/(sk-|npm_)[A-Za-z0-9_-]{8,}/g, "$1[REDACTED]").replace(/\b1[3-9]\d{9}\b/g, "[REDACTED_PHONE]").replace(/\b(password|passwd|pwd|token|secret|credential|api[-_]?key|x[-_]?api[-_]?key|access[-_]?token|refresh[-_]?token|client[-_]?secret|session[-_]?id)\s*[:= ]\s*[^\s,;]+/gi, "$1 [REDACTED]").replace(/("(?:[^"]*(?:authorization|auth|api[-_]?key|x[-_]?api[-_]?key|access[-_]?token|refresh[-_]?token|token|password|passwd|pwd|secret|credential|cookie|set[-_]?cookie|session|phone|mobile|device[-_]?code|verification[-_]?code|sms[-_]?code|captcha|手机号|验证码)[^"]*)"\s*:\s*")([^"]*)(")/gi, "$1[REDACTED]$3");
|
|
6843
|
+
}
|
|
6844
|
+
function summarizeLatestOutput(value) {
|
|
6845
|
+
const rawText = outputText(value);
|
|
6846
|
+
const textValue = typeof value === "string" ? redactLatestOutputText(rawText) : outputText(sanitizeConfigRepositoryValue(value));
|
|
6847
|
+
const preview = textValue.slice(0, LATEST_OUTPUT_PREVIEW_CHARS);
|
|
6848
|
+
return {
|
|
6849
|
+
ok: true,
|
|
6850
|
+
bytes: Buffer.byteLength(rawText),
|
|
6851
|
+
lines: rawText ? rawText.split(/\r?\n/).length : 0,
|
|
6852
|
+
truncated: textValue.length > LATEST_OUTPUT_PREVIEW_CHARS,
|
|
6853
|
+
preview
|
|
6854
|
+
};
|
|
6855
|
+
}
|
|
6742
6856
|
function sanitizeGitUrls(value) {
|
|
6743
6857
|
if (Array.isArray(value)) {
|
|
6744
6858
|
return value.map((item) => sanitizeGitUrls(item));
|
|
@@ -7042,14 +7156,20 @@ async function pullLatestConfigEnvironment(env, options) {
|
|
|
7042
7156
|
}
|
|
7043
7157
|
const platformEnvironment = await fetchPlatformConfigRepositoryEnvironment(profile, env);
|
|
7044
7158
|
const gitCredentials = platformGitCredentials(platformEnvironment);
|
|
7045
|
-
const before = (await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
7046
|
-
|
|
7159
|
+
const before = (await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
7160
|
+
cwd: repo,
|
|
7161
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER
|
|
7162
|
+
})).stdout.trim();
|
|
7163
|
+
const dirty = (await execFileAsync("git", ["status", "--porcelain"], {
|
|
7164
|
+
cwd: repo,
|
|
7165
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER
|
|
7166
|
+
})).stdout.trim();
|
|
7047
7167
|
if (dirty && !options.allowDirty && hasBlockingDirtyStatus(dirty)) {
|
|
7048
7168
|
throw new Error("Working tree is not clean. Re-run with --allow-dirty only if you accept local changes.");
|
|
7049
7169
|
}
|
|
7050
7170
|
const steps = {};
|
|
7051
7171
|
for (const step of ["pullcommit", "extract", "pushcommit"]) {
|
|
7052
|
-
steps[step] =
|
|
7172
|
+
steps[step] = summarizeLatestOutput(await callPlatformSysconfigStep(platformEnvironment, env, step));
|
|
7053
7173
|
}
|
|
7054
7174
|
const gitRemote = environment.git_remote || "origin";
|
|
7055
7175
|
const gitBranch = environment.git_branch || PLATFORM_SYSCONFIG_BRANCH;
|
|
@@ -7057,12 +7177,22 @@ async function pullLatestConfigEnvironment(env, options) {
|
|
|
7057
7177
|
gitCredentials,
|
|
7058
7178
|
(envVars) => execFileAsync("git", ["pull", "--ff-only", gitRemote, gitBranch], {
|
|
7059
7179
|
cwd: repo,
|
|
7180
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER,
|
|
7060
7181
|
...envVars ? { env: envVars } : {}
|
|
7061
7182
|
})
|
|
7062
7183
|
);
|
|
7063
|
-
const after = (await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
7064
|
-
|
|
7065
|
-
|
|
7184
|
+
const after = (await execFileAsync("git", ["rev-parse", "HEAD"], {
|
|
7185
|
+
cwd: repo,
|
|
7186
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER
|
|
7187
|
+
})).stdout.trim();
|
|
7188
|
+
const changedFiles = before === after ? "" : (await execFileAsync("git", ["diff", "--name-status", before, after], {
|
|
7189
|
+
cwd: repo,
|
|
7190
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER
|
|
7191
|
+
})).stdout;
|
|
7192
|
+
const numstat = before === after ? "" : (await execFileAsync("git", ["diff", "--numstat", before, after], {
|
|
7193
|
+
cwd: repo,
|
|
7194
|
+
maxBuffer: LATEST_EXEC_MAX_BUFFER
|
|
7195
|
+
})).stdout;
|
|
7066
7196
|
return {
|
|
7067
7197
|
profile: profile.name,
|
|
7068
7198
|
env,
|
|
@@ -7071,7 +7201,7 @@ async function pullLatestConfigEnvironment(env, options) {
|
|
|
7071
7201
|
after,
|
|
7072
7202
|
changed: before !== after,
|
|
7073
7203
|
steps,
|
|
7074
|
-
git_pull:
|
|
7204
|
+
git_pull: summarizeLatestOutput(pull.stdout || pull.stderr),
|
|
7075
7205
|
changed_files: changedFiles.trim(),
|
|
7076
7206
|
numstat: numstat.trim(),
|
|
7077
7207
|
graph_refresh: options.withGraph && !options.fast ? "requested_external_step" : "skipped"
|
|
@@ -10637,6 +10767,8 @@ var REQUIRED_TASKBOOK_TERMS = [
|
|
|
10637
10767
|
"\u5BF9\u8C61\u9501\u8868",
|
|
10638
10768
|
"AI \u6700\u5C0F\u4EFB\u52A1\u5355\u5143",
|
|
10639
10769
|
"\u9A8C\u6536\u95E8\u7981",
|
|
10770
|
+
"\u5BFC\u822A\u5165\u53E3\u7B56\u7565",
|
|
10771
|
+
"\u5217\u8868 lint",
|
|
10640
10772
|
"\u505C\u673A\u70B9",
|
|
10641
10773
|
"\u5BF9\u8C61\u9501\u91CD\u590D",
|
|
10642
10774
|
"\u53EA\u8BFB\u4EFB\u52A1",
|
|
@@ -10670,6 +10802,8 @@ var PROMPT_REQUIRED_TERMS = [
|
|
|
10670
10802
|
"\u8F93\u5165\u4F9D\u8D56",
|
|
10671
10803
|
"\u8F93\u51FA\u7269",
|
|
10672
10804
|
"\u9A8C\u6536\u65B9\u5F0F",
|
|
10805
|
+
"\u5BFC\u822A\u5165\u53E3\u7B56\u7565",
|
|
10806
|
+
"\u5217\u8868 lint",
|
|
10673
10807
|
"\u8FDB\u5EA6 CSV"
|
|
10674
10808
|
];
|
|
10675
10809
|
var BPMAX_SKILL_PATTERN = /bpmax-[a-z0-9-]+|form-control-library|bpmax-memory-protocol/;
|
|
@@ -10705,6 +10839,75 @@ function uniqueErrors(errors) {
|
|
|
10705
10839
|
function missingTermErrors(text5, terms, prefix) {
|
|
10706
10840
|
return terms.filter((term) => !text5.includes(term)).map((term) => `${prefix}: ${term}`);
|
|
10707
10841
|
}
|
|
10842
|
+
function findNavigationStrategy(text5) {
|
|
10843
|
+
const matches = [...text5.matchAll(/导航入口策略\s*[::]\s*(nav-config:(?:included|skipped:[^\s|,。]+|deferred:[^\s|,。]+))/gi)];
|
|
10844
|
+
return matches.at(-1)?.[1] || null;
|
|
10845
|
+
}
|
|
10846
|
+
function validateNavigationStrategy(text5, errors, prefix = "") {
|
|
10847
|
+
const strategy = findNavigationStrategy(text5);
|
|
10848
|
+
if (!strategy) {
|
|
10849
|
+
errors.push(`${prefix}missing concrete navigation strategy: use \u5BFC\u822A\u5165\u53E3\u7B56\u7565\uFF1Anav-config:included, nav-config:skipped:<reason>, or nav-config:deferred:<reason>`);
|
|
10850
|
+
return null;
|
|
10851
|
+
}
|
|
10852
|
+
if (/nav-config:(skipped|deferred):$/i.test(strategy)) {
|
|
10853
|
+
errors.push(`${prefix}navigation strategy requires a non-empty reason when skipped or deferred.`);
|
|
10854
|
+
}
|
|
10855
|
+
if (/(待完成范围确认后回填|待确认|TODO|TBD|占位)/i.test(strategy)) {
|
|
10856
|
+
errors.push(`${prefix}navigation strategy is still a placeholder; replace it with included, skipped:<real reason>, or deferred:<real reason>.`);
|
|
10857
|
+
}
|
|
10858
|
+
return strategy;
|
|
10859
|
+
}
|
|
10860
|
+
function promptObjectLockText(text5) {
|
|
10861
|
+
const match = text5.match(/(?:^|\n)\s*对象锁\s*[::]\s*([^\n]+)/);
|
|
10862
|
+
return match?.[1] || "";
|
|
10863
|
+
}
|
|
10864
|
+
function hasStrongListEvidence(value) {
|
|
10865
|
+
return /bpmax-cli config list-template lint/.test(value) && /(真实列表页|浏览器|runtime|E2E|渲染)/i.test(value);
|
|
10866
|
+
}
|
|
10867
|
+
function validateTaskbookNavigationAndListGates(text5, errors) {
|
|
10868
|
+
const strategy = validateNavigationStrategy(text5, errors);
|
|
10869
|
+
const rows = extractTaskRows(text5);
|
|
10870
|
+
const navRows = rows.filter((row) => /bpmax-nav-config-editor/.test(row.required_skills || ""));
|
|
10871
|
+
const listRows = rows.filter((row) => /bpmax-list-template-editor/.test(row.required_skills || ""));
|
|
10872
|
+
if (strategy === "nav-config:included" && navRows.length === 0) {
|
|
10873
|
+
errors.push("navigation strategy is included but AI task table has no bpmax-nav-config-editor task.");
|
|
10874
|
+
}
|
|
10875
|
+
navRows.forEach((row) => {
|
|
10876
|
+
if (!/nav-config:[A-Za-z0-9_-]+/.test(row.object_lock || "")) {
|
|
10877
|
+
errors.push(`navigation task ${row.task_id || "<unknown>"} must use object_lock nav-config:<workspace>.`);
|
|
10878
|
+
}
|
|
10879
|
+
if (!/(入口|导航).*(浏览器|点击|打开|可见|readback|回读)/i.test(row.evidence || "")) {
|
|
10880
|
+
errors.push(`navigation task ${row.task_id || "<unknown>"} evidence must include readback and browser navigation-entry proof.`);
|
|
10881
|
+
}
|
|
10882
|
+
});
|
|
10883
|
+
listRows.forEach((row) => {
|
|
10884
|
+
if (!/list-template:(?:\d+|new-[A-Za-z0-9_-]+)/.test(row.object_lock || "")) {
|
|
10885
|
+
errors.push(`list-template task ${row.task_id || "<unknown>"} must use object_lock list-template:<id> or list-template:new-<name>.`);
|
|
10886
|
+
}
|
|
10887
|
+
if (!hasStrongListEvidence(row.evidence || "")) {
|
|
10888
|
+
errors.push(`list-template task ${row.task_id || "<unknown>"} evidence must include bpmax-cli config list-template lint and real browser list-page verification.`);
|
|
10889
|
+
}
|
|
10890
|
+
});
|
|
10891
|
+
}
|
|
10892
|
+
function validatePromptNavigationAndListGates(text5, errors) {
|
|
10893
|
+
const strategy = validateNavigationStrategy(text5, errors, "prompt ");
|
|
10894
|
+
const hasNavSkill = /bpmax-nav-config-editor/.test(text5);
|
|
10895
|
+
const objectLock = promptObjectLockText(text5);
|
|
10896
|
+
if ((strategy === "nav-config:included" || hasNavSkill) && !/nav-config:[A-Za-z0-9_-]+/.test(objectLock)) {
|
|
10897
|
+
errors.push("prompt navigation work must include object lock nav-config:<workspace>.");
|
|
10898
|
+
}
|
|
10899
|
+
if ((strategy === "nav-config:included" || hasNavSkill) && !/(入口|导航).*(浏览器|点击|打开|可见|readback|回读)/i.test(text5)) {
|
|
10900
|
+
errors.push("prompt navigation work must require readback and browser navigation-entry proof.");
|
|
10901
|
+
}
|
|
10902
|
+
if (/bpmax-list-template-editor/.test(text5)) {
|
|
10903
|
+
if (!/list-template:(?:\d+|new-[A-Za-z0-9_-]+)/.test(objectLock)) {
|
|
10904
|
+
errors.push("prompt list-template work must include object lock list-template:<id> or list-template:new-<name>.");
|
|
10905
|
+
}
|
|
10906
|
+
if (!hasStrongListEvidence(text5)) {
|
|
10907
|
+
errors.push("prompt list-template work must include bpmax-cli config list-template lint and real browser list-page verification.");
|
|
10908
|
+
}
|
|
10909
|
+
}
|
|
10910
|
+
}
|
|
10708
10911
|
async function lintTaskbook(file, options = {}) {
|
|
10709
10912
|
const text5 = await readTaskbookText(file);
|
|
10710
10913
|
const errors = [
|
|
@@ -10721,6 +10924,7 @@ async function lintTaskbook(file, options = {}) {
|
|
|
10721
10924
|
}
|
|
10722
10925
|
errors.push(...uuidErrors(text5, "taskbooks"));
|
|
10723
10926
|
errors.push(...missingTermErrors(text5, SUBAGENT_TERMS, "missing subagent rule term"));
|
|
10927
|
+
validateTaskbookNavigationAndListGates(text5, errors);
|
|
10724
10928
|
for (const match of text5.matchAll(FLOW_LOCK_PATTERN)) {
|
|
10725
10929
|
const value = match[1] || "";
|
|
10726
10930
|
if (value.startsWith("flow") && /^flow\d+$/.test(value)) {
|
|
@@ -10745,6 +10949,7 @@ async function lintTaskPrompt(file, options = {}) {
|
|
|
10745
10949
|
errors.push("prompt missing BPMAX related skill name in required_skills");
|
|
10746
10950
|
}
|
|
10747
10951
|
errors.push(...uuidErrors(text5, "task prompts"));
|
|
10952
|
+
validatePromptNavigationAndListGates(text5, errors);
|
|
10748
10953
|
for (const term of options.forbidTerms || []) {
|
|
10749
10954
|
if (term && text5.includes(term)) {
|
|
10750
10955
|
errors.push(`prompt forbidden term present: ${term}`);
|
|
@@ -10818,9 +11023,19 @@ function taskbookTemplate(title = "BPMAX AI \u5B9E\u65BD\u7F16\u6392\u4EFB\u52A1
|
|
|
10818
11023
|
"## \u9A8C\u6536\u95E8\u7981",
|
|
10819
11024
|
"",
|
|
10820
11025
|
"- \u914D\u7F6E\u5BF9\u8C61\u7EBF\u4E0A\u56DE\u8BFB\u901A\u8FC7\u3002",
|
|
11026
|
+
"- \u5217\u8868\u6A21\u677F\u5FC5\u987B\u901A\u8FC7 `bpmax-cli config list-template lint`\uFF0C\u5E76\u8986\u76D6\u64CD\u4F5C\u5217\u3001\u8BE6\u60C5\u52A8\u4F5C\u3001\u5220\u9664\u52A8\u4F5C\u3001\u5220\u9664\u53EF\u7528\u6027 guard\u3001icon \u5339\u914D\u548C\u67E5\u8BE2\u5B89\u5168\u3002",
|
|
11027
|
+
"- \u5982\u679C\u914D\u7F6E\u6216\u53D8\u66F4\u4E86\u5BFC\u822A\u5165\u53E3\uFF0C\u5FC5\u987B\u901A\u8FC7 `bpmax-cli config nav-config lint/build/submit` \u95ED\u73AF\uFF0C\u5E76\u5728\u6D4F\u89C8\u5668\u786E\u8BA4\u5165\u53E3\u53EF\u89C1\u4E14\u80FD\u8FDB\u5165\u76EE\u6807\u9875\u9762\u3002",
|
|
10821
11028
|
"- \u6D4F\u89C8\u5668 E2E \u9A8C\u8BC1\u901A\u8FC7\u3002",
|
|
10822
11029
|
"- \u6D4B\u8BD5\u62A5\u544A\u548C\u622A\u56FE\u8BC1\u636E\u5B8C\u6574\u3002",
|
|
10823
11030
|
"",
|
|
11031
|
+
"## \u5BFC\u822A\u5165\u53E3\u7B56\u7565\u4E0E\u5217\u8868 lint",
|
|
11032
|
+
"",
|
|
11033
|
+
"\u5BFC\u822A\u5165\u53E3\u7B56\u7565\uFF1Anav-config:deferred:\u5F85\u5B8C\u6210\u8303\u56F4\u786E\u8BA4\u540E\u56DE\u586B\u3002",
|
|
11034
|
+
"",
|
|
11035
|
+
"- \u6BCF\u4E2A\u5B8C\u6574\u6D41\u7A0B\u914D\u7F6E\u4EFB\u52A1\u90FD\u5FC5\u987B\u58F0\u660E\u5BFC\u822A\u5165\u53E3\u7B56\u7565\uFF1A`nav-config:included`\u3001`nav-config:skipped:<reason>` \u6216 `nav-config:deferred:<reason>`\u3002",
|
|
11036
|
+
"- \u82E5\u5305\u542B\u5BFC\u822A\u914D\u7F6E\uFF0C\u4EFB\u52A1\u4E66\u5FC5\u987B\u6709\u72EC\u7ACB\u4EFB\u52A1\u6216\u9A8C\u6536\u9879\uFF0C`required_skills` \u5305\u542B `bpmax-nav-config-editor`\uFF0C\u5BF9\u8C61\u9501\u4F7F\u7528 `nav-config:<workspace>`\u3002",
|
|
11037
|
+
"- \u82E5\u5305\u542B\u5217\u8868\u914D\u7F6E\uFF0C\u4EFB\u52A1\u4E66\u5FC5\u987B\u6709\u72EC\u7ACB lint/\u9A8C\u6536\u9879\uFF0C`required_skills` \u5305\u542B `bpmax-list-template-editor`\uFF0C\u8BC1\u636E\u5305\u542B list-template lint \u7ED3\u679C\u548C\u771F\u5B9E\u5217\u8868\u9875\u9A8C\u6536\u3002",
|
|
11038
|
+
"",
|
|
10824
11039
|
"## \u505C\u673A\u70B9",
|
|
10825
11040
|
"",
|
|
10826
11041
|
"- \u65E0\u6CD5\u786E\u8BA4\u7EBF\u4E0A\u57FA\u7EBF\u3002",
|