bpmax-cli 0.2.1-beta.23 → 0.2.1-beta.24
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 +691 -56
- package/dist/bin.js.map +1 -1
- package/package.json +1 -1
- package/skills/bpmax-bug-reporting/SKILL.md +72 -0
- package/skills/bpmax-cli/SKILL.md +3 -1
- package/skills/bpmax-list-template-editor/SKILL.md +7 -3
- package/skills/bpmax-list-template-editor/references/content-config-shape.md +5 -2
- package/skills/bpmax-list-template-editor/references/full-detail-guide.md +5 -2
- package/skills/bpmax-list-template-editor/references/special-formats.md +5 -2
package/package.json
CHANGED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmax-bug-reporting
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
description: Use when a stable bpmax-cli bug, regression, unsafe default, misleading diagnostic, missing lint, or skill/CLI mismatch should be proactively reported to the bpmax-cli GitLab issue tracker.
|
|
5
|
+
metadata:
|
|
6
|
+
requires:
|
|
7
|
+
bins: ["bpmax-cli"]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# BPMAX Bug Reporting
|
|
11
|
+
|
|
12
|
+
Use this skill to proactively report bpmax-cli defects that are stable, reproducible, and actionable. The default target is the `bpmax/bpmax-cli` GitLab project through `bpmax-cli issue report`.
|
|
13
|
+
|
|
14
|
+
## Trigger
|
|
15
|
+
|
|
16
|
+
Report proactively when current work exposes one of these bpmax-cli-owned problems:
|
|
17
|
+
|
|
18
|
+
- A reproducible CLI crash, regression, wrong exit status, or misleading JSON/error output.
|
|
19
|
+
- A missing or bypassable lint rule that allowed unsafe config, test, skill, or credential behavior.
|
|
20
|
+
- A typed capability, skill instruction, or generated command that disagrees with the implemented CLI surface.
|
|
21
|
+
- A dangerous default that can leak credentials, submit unintended writes, or hide failed verification.
|
|
22
|
+
- A repeated agent workflow failure where the root cause belongs in bpmax-cli or bundled skills, not in customer config.
|
|
23
|
+
|
|
24
|
+
Do not report proactively for customer business configuration issues, temporary environment instability, missing user authorization, one-off dirty-worktree effects, or unverified guesses.
|
|
25
|
+
|
|
26
|
+
## Draft
|
|
27
|
+
|
|
28
|
+
Write a short Markdown draft first. It must include these sections:
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
## 现象
|
|
32
|
+
## 复现
|
|
33
|
+
## 期望行为
|
|
34
|
+
## 实际行为
|
|
35
|
+
## 影响范围
|
|
36
|
+
## 已验证排除项
|
|
37
|
+
## 建议修复方向
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Keep the draft actionable. Summarize logs and payloads; do not paste large raw responses. Never include API Key, Authorization, token, password, cookie, verification code, SMS code, phone number, or full raw payloads.
|
|
41
|
+
|
|
42
|
+
## Lint Gate
|
|
43
|
+
|
|
44
|
+
Run the built-in lint before dry-run or submission:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
bpmax-cli issue lint --title "<标题>" --description-file <draft.md> --format json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
The lint must return `ok: true`. If it fails, fix the draft instead of creating a low-quality issue.
|
|
51
|
+
|
|
52
|
+
## Dry Run Gate
|
|
53
|
+
|
|
54
|
+
After lint passes, inspect the payload with dry-run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
bpmax-cli issue report --title "<标题>" --description-file <draft.md> --label bug --dry-run --format json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Check that the title, description, labels, project, assignee, and confidentiality flag are correct. Confirm that the dry-run output contains no sensitive material.
|
|
61
|
+
|
|
62
|
+
## Submit
|
|
63
|
+
|
|
64
|
+
Submit only after lint and dry-run are clean:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
bpmax-cli issue report --title "<标题>" --description-file <draft.md> --label bug --format json
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The GitLab token must come from `GITLAB_TOKEN`, `GL_TOKEN`, `PRIVATE_TOKEN`, or a variable named by `--token-env`; never put token text in a command, skill, memory, issue body, test fixture, or source code.
|
|
71
|
+
|
|
72
|
+
After creation, return the GitLab issue URL from `issue.web_url` and mention the lint/dry-run evidence used.
|
|
@@ -37,6 +37,8 @@ bpmax-cli init --agent <agent> --channel feishu --url "<BPMAX_URL>" --name local
|
|
|
37
37
|
|
|
38
38
|
用户要求“提 issue”、“创建 GitLab issue”、“报 bug 到 bpmax-cli”或需要把当前问题沉淀到 bpmax-cli 仓库时,使用 `bpmax-cli issue create` 或语义别名 `bpmax-cli issue report`。
|
|
39
39
|
|
|
40
|
+
更完整的主动上报流程、质量门禁和 lint 要求见 `../bpmax-bug-reporting/SKILL.md`。发现稳定可复现的 bpmax-cli 自身问题时,先进入该 skill。
|
|
41
|
+
|
|
40
42
|
如果工作中发现 bpmax-cli 自身的稳定问题,也可以自动创建 issue,不需要等用户再次下达“提 issue”:
|
|
41
43
|
|
|
42
44
|
- 适用:可复现的 bpmax-cli 缺陷、回归、缺失 typed capability、错误/误导性诊断、lint 漏检、危险默认行为、skill 与 CLI 能力不一致。
|
|
@@ -78,7 +80,7 @@ bpmax-cli issue create --title "<标题>" --description-file <file.md> --label b
|
|
|
78
80
|
- BPMAX Business Skills 查询、同步、安装、更新、卸载:读 `../bpmax-business-skill/SKILL.md`
|
|
79
81
|
- AI 任务方案、任务书、任务拆解、subagent 分工、实施任务表、进度 CSV:读 `../bpmax-ai-taskbook/SKILL.md`
|
|
80
82
|
- 审批矩阵、角色矩阵、矩阵规则记录、`matrix_owner`、`cc_matrix`、规则 seed、审批人映射:读 `../bpmax-approval-matrix/SKILL.md`
|
|
81
|
-
- bpmax-cli 自身问题提报、GitLab issue
|
|
83
|
+
- bpmax-cli 自身问题提报、GitLab issue 创建、主动 bug 上报:读 `../bpmax-bug-reporting/SKILL.md`
|
|
82
84
|
|
|
83
85
|
## 规则
|
|
84
86
|
|
|
@@ -72,7 +72,8 @@ description: "用于通过 bpmax-cli typed config 创建或编辑 BPMAX 项目
|
|
|
72
72
|
## Lint 阻断项
|
|
73
73
|
- `content` 不是对象态,或 `content.config` 不是数组。
|
|
74
74
|
- 列对象混入表单模板字段,或 `createElement.children.$template` / `eval` 结构非法。
|
|
75
|
-
-
|
|
75
|
+
- 操作列缺详情/查看动作、缺删除/移除动作、删除动作无权限 guard、按钮缺 icon、列根误配 `icon/iconColor`。
|
|
76
|
+
- 删除 guard 使用 `current_flow_step_id/name` 为空作为前置条件,或 `disabled` 权限极性写反。
|
|
76
77
|
- `icon` 不是完整 `ri ri_*`,普通图标列数量少于 1 或多于 3。
|
|
77
78
|
- 人员列没有头像,长文本列没有 `showOverflowTooltip`,固定宽度没有同时写 `width/minWidth`。
|
|
78
79
|
- 日期字段没有按 `YYYY-MM-DD` 处理,HTML badge 未使用已验证组件/结构。
|
|
@@ -85,12 +86,15 @@ description: "用于通过 bpmax-cli typed config 创建或编辑 BPMAX 项目
|
|
|
85
86
|
- 高风险改动至少需要 `readbackAccepted`、`editorPageAccepted`、`listPageAccepted`。
|
|
86
87
|
- 高风险触发条件包括:脚本列、badge/状态标签、icon/头像/颜色/单行溢出/列宽、操作列按钮、图片预览列、`data_set_id` 切换。
|
|
87
88
|
- 编辑页只做只读回显确认:新字段或新列标题已出现、目标列顺序符合预期、数据集绑定已回填。
|
|
88
|
-
-
|
|
89
|
+
- 运行态列表页必须证明目标列真实渲染、操作列可进入详情;有 `project.delete` 权限的管理员或有 `project.delete.my` 且为创建人的用户可见并能真实删除,无权限用户不可删除;筛选条件不引用已删除字段。
|
|
89
90
|
- 如果接口 readback 成功但页面不一致,按页面运行态缺陷继续排查,不能只看 200 或 hash 宣告完成。
|
|
90
91
|
|
|
91
92
|
## 操作列与视觉 lint
|
|
92
93
|
- 操作列必须包含详情/查看动作和删除/移除动作。
|
|
93
|
-
-
|
|
94
|
+
- 删除/移除动作必须有权限 guard,首选 `if: { $template: "{return ctx.$CAN_DELETE}", eval: true }`;`$CAN_DELETE` 已封装 `project.delete`,以及 `project.delete.my + 当前用户是创建人` 的平台权限语义。
|
|
95
|
+
- 必须显式展开等价权限时,列表创建人字段只使用平台实际传入的 `ctx.__owner_id`,并与 `ctx.$USER_INFO.id` 比较;不得改用列表上下文不保证存在的 `project.owner.id` 或 `__project_owner.id`。
|
|
96
|
+
- 若使用 `disabled`,必须反向写成 `return !ctx.$CAN_DELETE`;不得把 `confirm`、`onClick` 或事件脚本当成权限 guard。
|
|
97
|
+
- 项目状态可以作为额外业务限制,但不能替代权限 guard;禁止要求 `current_flow_step_id/name` 为空,创建即进入首节点的流程会使该条件恒为 false。
|
|
94
98
|
- 操作列列根不得配置 `icon` / `iconColor`;每个操作按钮必须带按钮级 icon。
|
|
95
99
|
- icon 必须写完整 class:`ri ri_*`;普通数据列至少 1 列、最多 3 列带 icon。
|
|
96
100
|
- 人员列必须渲染头像,优先 `el-avatar + span`;只显示姓名文本不合格。
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
{
|
|
115
115
|
"is": "el-button",
|
|
116
116
|
"if": {
|
|
117
|
-
"$template": "{return ctx
|
|
117
|
+
"$template": "{return ctx.$CAN_DELETE}",
|
|
118
118
|
"eval": true
|
|
119
119
|
},
|
|
120
120
|
"attribute": {
|
|
@@ -136,7 +136,10 @@
|
|
|
136
136
|
- 操作列的 `icon` / `iconColor` 不放在列根,默认留空或不写。
|
|
137
137
|
- icon 放到每个操作按钮自身,优先用 `attribute.props.icon`,或显式渲染 `i.ri ri_*` 在按钮文本前。
|
|
138
138
|
- 操作列必须包含详情/查看和删除/移除动作。
|
|
139
|
-
-
|
|
139
|
+
- 删除/移除动作必须带权限 guard,首选 `ctx.$CAN_DELETE`。它已包含全局删除权限,以及“仅删除本人项目”权限与创建人匹配逻辑。
|
|
140
|
+
- 若必须显式展开 `project.delete.my`,创建人比较必须使用 `ctx.__owner_id === ctx.$USER_INFO.id`;`project.owner.id` / `__project_owner.id` 不是列表行稳定契约。
|
|
141
|
+
- 不得用 `!ctx.current_flow_step_id` / `!ctx.current_flow_step_name` 控制删除按钮;创建后立即进入首节点的流程会让该条件永远无法命中。
|
|
142
|
+
- 如需附加业务状态限制,应写成 `ctx.$CAN_DELETE && <业务状态条件>`,不能用状态条件替代权限判断。
|
|
140
143
|
|
|
141
144
|
## 图标列
|
|
142
145
|
- 渲染层会把 `icon` / `iconColor` 作为列外层配置传入
|
|
@@ -268,7 +268,8 @@ bpmax-cli config list-template lint --work .codex/tmp/list-template-editor/work/
|
|
|
268
268
|
- 操作列在列根配置了 `icon` / `iconColor`
|
|
269
269
|
- 操作列任一按钮未配置按钮级 icon
|
|
270
270
|
- 操作列缺少“详情/查看”或“删除/移除”动作
|
|
271
|
-
-
|
|
271
|
+
- 删除/移除动作没有基于 `ctx.$CAN_DELETE` 或平台等价权限表达式的权限 guard
|
|
272
|
+
- 删除 guard 要求 `current_flow_step_id/name` 为空,或 `disabled` 直接使用正向权限表达式导致极性写反
|
|
272
273
|
- `icon` 不是完整 `ri ri_*`
|
|
273
274
|
- 普通数据列带 `icon` 的列数少于 1 列或多于 3 列
|
|
274
275
|
- `iconColor` 不符合规范
|
|
@@ -378,7 +379,9 @@ bpmax-cli config list-template submit \
|
|
|
378
379
|
- 操作列列根不要配置 `icon` / `iconColor`
|
|
379
380
|
- 操作列的每个操作按钮前面都要带 icon
|
|
380
381
|
- 操作列必须包含详情/查看动作和删除/移除动作
|
|
381
|
-
-
|
|
382
|
+
- 删除/移除动作必须有权限 guard,首选 `ctx.$CAN_DELETE`;若使用 `disabled`,写成 `!ctx.$CAN_DELETE`
|
|
383
|
+
- `$CAN_DELETE` 已覆盖全局删除权限,以及“仅删除本人项目”权限与创建人匹配;不得再用当前环节为空推导删除权限
|
|
384
|
+
- 业务状态可以追加到权限表达式,但不能替代权限 guard
|
|
382
385
|
- 普通数据列至少 1 列带 icon,最多 3 列带 icon
|
|
383
386
|
- 列表列 icon 和操作按钮 icon 都必须写完整 class:`ri ri_*`
|
|
384
387
|
- 默认优先统一浅灰色:`#D6DCE5`
|
|
@@ -228,7 +228,7 @@
|
|
|
228
228
|
{
|
|
229
229
|
"is": "el-button",
|
|
230
230
|
"if": {
|
|
231
|
-
"$template": "{return ctx
|
|
231
|
+
"$template": "{return ctx.$CAN_DELETE}",
|
|
232
232
|
"eval": true
|
|
233
233
|
},
|
|
234
234
|
"attribute": {
|
|
@@ -250,7 +250,10 @@
|
|
|
250
250
|
- 操作列不要在列根写 `icon` / `iconColor`。
|
|
251
251
|
- 每个操作按钮都要自己带 icon,推荐直接写在 `attribute.props.icon`。
|
|
252
252
|
- 操作列必须保留“详情/查看”和“删除/移除”动作;缺删除动作时 CLI gate 会阻断。
|
|
253
|
-
-
|
|
253
|
+
- 删除/移除动作必须带权限 guard。可见性写法使用 `if: ctx.$CAN_DELETE`;禁用写法使用 `disabled: !ctx.$CAN_DELETE`。
|
|
254
|
+
- `$CAN_DELETE` 对齐平台 `project.delete`,以及 `project.delete.my + 当前用户是创建人` 的权限判断。项目状态只能作为额外限制,不能替代权限 guard。
|
|
255
|
+
- 显式展开本人项目权限时,只使用 `ctx.__owner_id === ctx.$USER_INFO.id`;不要使用列表上下文不保证存在的 `project.owner.id` 或 `__project_owner.id`。
|
|
256
|
+
- 禁止要求 `current_flow_step_id/name` 为空;对于创建即生效的流程,该条件会让删除按钮永久隐藏。
|
|
254
257
|
|
|
255
258
|
## 5. 条件显示
|
|
256
259
|
|