@routerhub/agent-rules 1.5.134 → 1.5.135
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/AGENTS.base.md
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
- ⚠️ **截图必须直接内嵌在 PR Description 中,让 reviewer 打开 PR 就能看到效果图(`` 方式渲染为可见图片),禁止只在文字里描述"改动了什么"而不放图,也禁止把截图只作为文件附件/提交到分支目录而不在 PR 正文中引用。** 原因:reviewer 看 PR 的第一眼就是看描述,如果看不到图、只能读文字,完全无法直观感知改动效果;截图不内嵌 = 等于没附。
|
|
115
115
|
- ⚠️ **截图必须通过 PR Description 编辑区直接上传(拖拽/粘贴/文件选择按钮),禁止走评论区 `input[type=file]` 上传后再搬运 CDN URL。** 原因:PR Description 编辑区本身支持图片拖拽上传、自动转为 `` 内嵌,一步到位;走评论区上传需要多一步「提交评论 → 复制 URL → 粘贴到 Description」,产生的临时图片评论会留在 PR 对话里干扰 reviewer 阅读,且多了一步手动搬运、容易出错。
|
|
116
116
|
- ⚠️ 创建 PR 使用 `/create-pr` skill(自动生成中文内容 + 效果截图 + CDN 上传)。
|
|
117
|
+
- ⚠️ **PR 创建即进入可评审状态**:直接创建正式 PR(非 Draft),创建完成、冲突检查与静态编译通过后即可直接交付 review,禁止先开 Draft PR、后续再手动标记 Ready for review。
|
|
117
118
|
- ⚠️ **每次修改 PR 后(含创建 PR、push 新提交、响应 review 意见重新推送等所有改动 PR 的动作之后),都必须检查与主分支(默认分支)是否有冲突**:用 `gh pr view <PR> --json mergeable -q .mergeable` 检查(`MERGEABLE`=无冲突可合并,`CONFLICTING`=存在冲突,`UNKNOWN`=GitHub 尚未判定,稍后复查)。若存在冲突,必须先解决冲突再交付 review——`git merge origin/main`(或 `git rebase origin/main`)→ 解决冲突文件 → 测试通过 → 推送,确保 PR 处于可合并状态,禁止把带冲突的 PR 抛给 reviewer。主分支随时可能前进,一个创建时无冲突的 PR 可能在后续 push 后悄悄变冲突,因此每次改动 PR 后都必须重新检查,禁止只在创建时查一次就以为高枕无忧。
|
|
118
119
|
- ⚠️ **每次修改 PR 后,除冲突检查外还必须检查 GitHub 静态编译是否通过,通过后发新版本**,三步收尾缺一不可:
|
|
119
120
|
1. **与主分支冲突检查**:按上一条规则执行(`gh pr view <PR> --json mergeable -q .mergeable`),有冲突必须先解决。
|
package/package.json
CHANGED
package/rules/global.md
CHANGED
|
@@ -114,6 +114,7 @@ name: "通用规则"
|
|
|
114
114
|
- ⚠️ **截图必须直接内嵌在 PR Description 中,让 reviewer 打开 PR 就能看到效果图(`` 方式渲染为可见图片),禁止只在文字里描述"改动了什么"而不放图,也禁止把截图只作为文件附件/提交到分支目录而不在 PR 正文中引用。** 原因:reviewer 看 PR 的第一眼就是看描述,如果看不到图、只能读文字,完全无法直观感知改动效果;截图不内嵌 = 等于没附。
|
|
115
115
|
- ⚠️ **截图必须通过 PR Description 编辑区直接上传(拖拽/粘贴/文件选择按钮),禁止走评论区 `input[type=file]` 上传后再搬运 CDN URL。** 原因:PR Description 编辑区本身支持图片拖拽上传、自动转为 `` 内嵌,一步到位;走评论区上传需要多一步「提交评论 → 复制 URL → 粘贴到 Description」,产生的临时图片评论会留在 PR 对话里干扰 reviewer 阅读,且多了一步手动搬运、容易出错。
|
|
116
116
|
- ⚠️ 创建 PR 使用 `/create-pr` skill(自动生成中文内容 + 效果截图 + CDN 上传)。
|
|
117
|
+
- ⚠️ **PR 创建即进入可评审状态**:直接创建正式 PR(非 Draft),创建完成、冲突检查与静态编译通过后即可直接交付 review,禁止先开 Draft PR、后续再手动标记 Ready for review。
|
|
117
118
|
- ⚠️ **每次修改 PR 后(含创建 PR、push 新提交、响应 review 意见重新推送等所有改动 PR 的动作之后),都必须检查与主分支(默认分支)是否有冲突**:用 `gh pr view <PR> --json mergeable -q .mergeable` 检查(`MERGEABLE`=无冲突可合并,`CONFLICTING`=存在冲突,`UNKNOWN`=GitHub 尚未判定,稍后复查)。若存在冲突,必须先解决冲突再交付 review——`git merge origin/main`(或 `git rebase origin/main`)→ 解决冲突文件 → 测试通过 → 推送,确保 PR 处于可合并状态,禁止把带冲突的 PR 抛给 reviewer。主分支随时可能前进,一个创建时无冲突的 PR 可能在后续 push 后悄悄变冲突,因此每次改动 PR 后都必须重新检查,禁止只在创建时查一次就以为高枕无忧。
|
|
118
119
|
- ⚠️ **每次修改 PR 后,除冲突检查外还必须检查 GitHub 静态编译是否通过,通过后发新版本**,三步收尾缺一不可:
|
|
119
120
|
1. **与主分支冲突检查**:按上一条规则执行(`gh pr view <PR> --json mergeable -q .mergeable`),有冲突必须先解决。
|
|
@@ -124,5 +124,5 @@ gh pr checks <PR>
|
|
|
124
124
|
- ⚠️ 截图禁止提交到 Git 仓库
|
|
125
125
|
- ⚠️ PR 截图直接内嵌在 Description 正文中(Markdown 图片语法)
|
|
126
126
|
- ⚠️ 每次修改 PR 后(含创建、push 新提交、响应 review 意见)都必须做三步收尾:冲突检查 → 静态编译检查 → PR 合并后发新版本(见步骤 7)
|
|
127
|
-
-
|
|
127
|
+
- ⚠️ **直接创建正式 PR(非 Draft)**:PR 创建完成即进入可评审状态,可直接交付 review,禁止先开 Draft PR、后续再手动标记 Ready for review
|
|
128
128
|
- 作者不能 Approve 自己的 PR
|
|
@@ -166,7 +166,7 @@ gh pr comment $PR --body "Fixed in $COMMIT. Addresses outside-diff comment on fi
|
|
|
166
166
|
|
|
167
167
|
### 6. Run tests and push
|
|
168
168
|
|
|
169
|
-
Run the project test suite. All tests must pass before pushing. Push all fixes together to
|
|
169
|
+
Run the project test suite. All tests must pass before pushing. Push all fixes together to reduce intermediate-state noise; each push is still reviewed normally.
|
|
170
170
|
|
|
171
171
|
### 7. Submit review (optional)
|
|
172
172
|
|
|
@@ -197,13 +197,11 @@ gh pr edit $PR --milestone "[milestone-title]"
|
|
|
197
197
|
|
|
198
198
|
Do **not** assign automatically. This is a reminder only.
|
|
199
199
|
|
|
200
|
-
##
|
|
200
|
+
## Reviewing after every push
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
Bots (Gemini, Codex, etc.) review every push. **Each push should go through review** - never try to avoid or suppress reviews:
|
|
203
203
|
|
|
204
|
-
1. **Batch fixes**: accumulate all fixes, push once
|
|
205
|
-
2. **Draft PR**: convert to draft during fixes
|
|
206
|
-
3. **Commit keywords**: some bots respect `[skip ci]` or `[skip review]`
|
|
204
|
+
1. **Batch fixes**: accumulate all fixes, push once to reduce intermediate-state noise (each push is still reviewed normally)
|
|
207
205
|
|
|
208
206
|
## Important rules
|
|
209
207
|
|