msdevflow 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/skill/msd/README.md
CHANGED
|
@@ -420,5 +420,6 @@ typed CLI command
|
|
|
420
420
|
- [references/ci-and-review.md](references/ci-and-review.md):CI 和作者 discussion 深层规则。
|
|
421
421
|
- [scripts/openlibing_ci.py](scripts/openlibing_ci.py):openLiBing 只读诊断与交互 OAuth 客户端。
|
|
422
422
|
- [scripts/gitcode_review.py](scripts/gitcode_review.py):`code-review` 固定 snapshot/context/finding/lgtm/cleanup 适配器。
|
|
423
|
-
- [scripts/
|
|
424
|
-
|
|
423
|
+
- [scripts/gitcode_verify.py](scripts/gitcode_verify.py):`pr`/`ci` 的 PR 回读、评论回读、CI 轮询和监控 helper。
|
|
424
|
+
|
|
425
|
+
测试文件(`scripts/test_openlibing_ci.py`、`scripts/test_gitcode_review.py`)只存在于 [源仓库](https://gitcode.com/msbuilder/msdevflow),不随 npm 包或 skill 安装产物分发;安装目录中没有这两个文件是预期行为。
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
只读确认:
|
|
10
10
|
|
|
11
|
-
- Issue 已核验,canonical 默认分支没有闭环实现或重复 PR
|
|
11
|
+
- Issue 已核验,canonical 默认分支没有闭环实现或重复 PR;用户明确说明本次是不关联 Issue 的独立文档/维护修复时,按下方“独立 PR”执行,不要求 Issue 核验;
|
|
12
12
|
- 当前分支不是默认分支,且基于已确认的 canonical 基线;
|
|
13
13
|
- 任务实现与已确认范围一致;
|
|
14
14
|
- 适用本地门禁有实际通过证据;
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
|
|
18
18
|
前置条件缺失时返回 `blocked` 和建议的上游 `action=issue` 或 `action=develop`,不得自动补跑。为防止过期证据,提交前复验受影响的最小本地门禁属于 `pr` action。
|
|
19
19
|
|
|
20
|
+
### 独立 PR(无 Issue)
|
|
21
|
+
|
|
22
|
+
用户明确说明本次是不关联 Issue 的独立修复(文档文件名/typo/注释、模板或 CI 配置微调等)时,跳过 Issue 接取和核验,不返回 `blocked: issue-required`。要求:
|
|
23
|
+
|
|
24
|
+
- change_type 记录为 `standalone-docs` 或 `standalone-maintenance`,issue/milestone 均为 `none`;
|
|
25
|
+
- 用户没有明确说明独立修复、改动又明显超出文档/维护范围时,不得自行归类,返回 `blocked` 并建议 `action=issue`;
|
|
26
|
+
- PR 正文关联 Issue 写 `N/A`,不虚构 Issue 编号;仓库模板要求 Issue 关联字段时按模板结构保留 `N/A`;
|
|
27
|
+
- PR milestone 必须为 `none`,不继承、不选择其他里程碑;
|
|
28
|
+
- 仍执行完整 commit 规范、本地门禁、push、PR 创建、回读验证和后续 CI 触发监控;禁止把独立 PR 当理由跳过任何门禁。
|
|
29
|
+
|
|
20
30
|
### Commit
|
|
21
31
|
|
|
22
32
|
只暂存本任务文件,检查凭证和大文件。遵循仓库 commit 规范;无规范时使用 Conventional Commits。贡献规范要求时 sign-off:
|
|
@@ -38,6 +48,15 @@ git push -u <source-remote> HEAD:<branch>
|
|
|
38
48
|
|
|
39
49
|
默认不 force push。
|
|
40
50
|
|
|
51
|
+
push 被服务器以 `Git LFS upload failed: missing objects`、`missing or corrupt local objects` 等 LFS 错误拒绝时:
|
|
52
|
+
|
|
53
|
+
1. 先确认本次待推送 diff 是否包含 LFS tracked 文件(`git lfs ls-files` 对照 `git diff --name-only <remote>/<default>..HEAD`);
|
|
54
|
+
2. 本次 diff 不含 LFS 文件、缺失对象属于历史数据时,在 guided 模式展示原因并取得用户确认后,使用一次性配置完成本次 push,不写入全局或仓库永久配置:
|
|
55
|
+
```bash
|
|
56
|
+
git -c lfs.allowincompletepush=true push -u <source-remote> HEAD:<branch>
|
|
57
|
+
```
|
|
58
|
+
3. 本次 diff 包含 LFS tracked 文件时,不得使用该 bypass;先执行 `git lfs fetch --all` 和 `git lfs fsck` 补齐对象,无法补齐时返回 `blocked` 并报告缺失对象清单。
|
|
59
|
+
|
|
41
60
|
### 普通 PR
|
|
42
61
|
|
|
43
62
|
使用仓库画像从 canonical repository 最新默认分支确认的 PR 模板,保留其标题、章节、检查项和说明,不从 Fork、工作分支或本地未提交文件重新取模板。正文按模板填写背景与 Issue、变更、验证、风险/回滚和未覆盖项;模板缺少必要信息时补入最合适的现有章节,不随意删除模板要求。若仓库没有模板,使用:
|
|
@@ -72,6 +72,12 @@ pr_number(如已有)
|
|
|
72
72
|
|
|
73
73
|
从 URL、Git remotes、remote HEAD 和 PR base 交叉验证。canonical 身份不等于写授权。
|
|
74
74
|
|
|
75
|
+
source repository 按以下优先级确定:
|
|
76
|
+
1. 用户本轮显式提供的 `source` 优先,不得被本地 remote 自动识别结果覆盖。
|
|
77
|
+
2. 本地 remote 精确匹配该 source 且指向同一仓库时直接复用。
|
|
78
|
+
3. 本地没有匹配 remote 时,允许创建 `fork` remote;若已有同名 remote 但指向不同仓库,生成唯一 remote 名或请求用户确认。
|
|
79
|
+
4. 后续 push 和 PR create 必须使用用户指定的 source,不得因后续 remote 探测结果而静默更换。
|
|
80
|
+
|
|
75
81
|
### 仓库画像
|
|
76
82
|
|
|
77
83
|
读取适用范围的 `AGENTS.md`、`CLAUDE.md`、`CONTRIBUTING*`、README、Issue/PR 模板、OWNERS/CODEOWNERS、CI、pre-commit 和测试配置。PR 模板必须来自 canonical repository 最新默认分支,不得从个人 Fork、当前工作分支或本地未提交文件读取。先检查贡献指南或仓库配置明确指定的路径,再依次检查:
|
|
@@ -97,6 +97,19 @@ Agent 创建或修改的 Issue/PR 正文,以及发布的 Issue 评论、PR 普
|
|
|
97
97
|
- `code-review` 完整检视通过时只发送正文恰好为 `/lgtm` 的评论,不发布检视摘要、前置说明或其他伴随评论;发送前后都回读并确认 `review_head_sha` 未变化,再逐字回读 `/lgtm`。
|
|
98
98
|
- 尾签只标识文本由 msdevflow 发布,不代表 reviewer/approver 身份,也不替代独立审批或仓库门禁。
|
|
99
99
|
|
|
100
|
+
### 机器人命令分级
|
|
101
|
+
|
|
102
|
+
所有必须精确匹配的机器人/机器协议命令按风险分级执行,行为不再依赖临场判断:
|
|
103
|
+
|
|
104
|
+
| 命令 | 风险级别 | 行为 |
|
|
105
|
+
|---|---|---|
|
|
106
|
+
| `/check-cla`、`/check-sign` 等只读状态重检 | 低风险 | 用户明确要求该命令后,可直接发送精确 payload 并回读,无需前置说明评论 |
|
|
107
|
+
| `compile`、`retry`、`stop` 等 CI 触发命令 | 中风险 | 必须先发布带唯一尾签的独立说明评论并逐字回读,再单独发送精确 payload |
|
|
108
|
+
| `/lgtm` | reviewer 门禁 | 仅 `code-review` 完整检视通过且用户针对当前 PR/head 明确确认后发送精确 payload |
|
|
109
|
+
| `/merge`、`/approve` | 最终合入/审批入口 | 仅 `merge` 阶段、门禁满足且用户确认后发送;作者不得发送 `/approve` |
|
|
110
|
+
|
|
111
|
+
低风险命令的判定标准:命令只触发只读重检或状态刷新,不启动构建、不改变 PR/Issue 状态、不产生审批语义。不确定分类时按中风险处理(前置说明评论 + 精确 payload),不猜测。仓库机器人协议与该分级冲突时以仓库文档为准并记录适配器证据。
|
|
112
|
+
|
|
100
113
|
## 授权范围
|
|
101
114
|
|
|
102
115
|
`autonomous` 授权至少包含 canonical、Issue、source、branch 和目标。授权只适用于该运行,不能扩展到其他 Issue、PR 或仓库。
|