@routerhub/agent-rules 1.5.124 → 1.5.125
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 +39 -0
- package/merge.js +6 -0
- package/package.json +1 -1
- package/rules/review-boundary.md +42 -0
package/AGENTS.base.md
CHANGED
|
@@ -324,3 +324,42 @@
|
|
|
324
324
|
- ⚠️ **部署到测试环境唯一入口:`/deploy-test` skill。** 不论用户怎么表述(「部署测试」「帮我部署」「推到test」「发布测试环境」等),必须通过 `Skill` 工具调用 `deploy-test`,禁止凭记忆手动执行 git 命令。
|
|
325
325
|
- ⚠️ **必须先合并再部署**:流程必须是 `当前功能分支 → merge 到 test → push test → 触发部署 → 切回原分支`。严禁跳过 merge 步骤直接部署功能分支。
|
|
326
326
|
- ⚠️ **部署完成后必须切回原分支**,不得停留在 test 分支。
|
|
327
|
+
|
|
328
|
+
<!-- @domain: review-boundary -->
|
|
329
|
+
|
|
330
|
+
## 审稿边界(Review Boundary)
|
|
331
|
+
|
|
332
|
+
⚠️ 本条是写给 **code review 审稿方**(AI review bot / Copilot code review / 人工 reviewer)的约束,**不是**给写代码方的新增要求。目标是让 review 收敛:只报「会导致 bug 的真问题」,不报「口味 / 风格 / 防御性」建议——后者正是循环 review 停不下来的元凶。写代码方遵守作者规则(AGENTS.base.md 其余章节)后,剩下的 review 意见大多是审稿人按自己的通用标准挖出来的口味问题,修完一轮又冒一轮,十几轮就是这么滚出来的。
|
|
333
|
+
|
|
334
|
+
### 必须报(真问题)
|
|
335
|
+
|
|
336
|
+
- 🔴 **会导致实际 bug / 数据丢失 / 数据错误 / 安全漏洞**:有明确触发路径(真实输入、真实调用链能复现),读 diff 能确认后果。
|
|
337
|
+
- 🟡 **真实风险**:有明确触发条件,且触发后后果严重(如并发竞态、错误被静默吞掉、未处理空值导致崩溃)。
|
|
338
|
+
- **违反本项目已固化规则**:AGENTS.base.md / AGENTS.private.md 里的 ⚠️ 铁律(DELETE 铁律、部署自包含、数据链路核对、环境配置禁止推断、测试环境验证前置等),diff 中明确违反 → 必须报。
|
|
339
|
+
|
|
340
|
+
### 禁止报(不是问题,报了只会拉长循环)
|
|
341
|
+
|
|
342
|
+
- 🔵 **口味 / 风格偏好**:换个命名更好、建议用某设计模式、提取公共函数、重构建议——作者规则已规范,审稿人不要另立标准。
|
|
343
|
+
- 🛡️ **纯防御性建议**:以「如果未来 / 万一 / 边界情况下」开头、当前代码没有实际触发路径的「潜在风险」(如「序号 99999 溢出」「未来可能有人改这里」),一律不报。
|
|
344
|
+
- ❓ **无法确认真假的问题**:读 diff 不能确认会导致 bug 的,默认按「不是问题」处理,禁止报「建议确认一下」这类空泛意见。
|
|
345
|
+
- 🔁 **重复已处理的问题**:已在评论 / 历史中标记 Won't fix 或「已修复于 <hash>」的问题,不再重提。
|
|
346
|
+
|
|
347
|
+
### 判断标准
|
|
348
|
+
|
|
349
|
+
- **一句话:「这条不修,功能会不会错 / 数据会不会坏?」** 会 → 报;不会 → 不报。
|
|
350
|
+
- 每条意见必须引用 diff 中的具体代码行作为证据,禁止臆测。
|
|
351
|
+
- 无法确认 → 不报。宁可漏报一条真问题,也不用十条口味问题刷屏。
|
|
352
|
+
- 每轮 review 的问题数量应当 ≤ 上一轮:修完真问题后没有新的真问题,就直接说「无值得修的新问题」,不要换个角度再挖。
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
When performing a code review, ONLY report issues that would cause an actual bug, data loss, or security vulnerability with a concrete, reproducible trigger path visible in the diff.
|
|
357
|
+
|
|
358
|
+
Do NOT report:
|
|
359
|
+
- Style, naming, or personal-preference opinions.
|
|
360
|
+
- Refactoring, "extract a function", or design-pattern suggestions.
|
|
361
|
+
- Defensive suggestions with no current trigger path (e.g. "in the future...", "what if...", "an edge case that cannot happen today").
|
|
362
|
+
- Issues you cannot confirm from the diff. If unsure, do not report it.
|
|
363
|
+
- Already-handled issues (previously Won't fix or marked "fixed in <hash>").
|
|
364
|
+
|
|
365
|
+
Every comment MUST cite the specific diff lines as evidence. When in doubt, stay silent. One real bug beats ten style suggestions. If no real problems remain, say so explicitly and stop.
|
package/merge.js
CHANGED
|
@@ -199,6 +199,12 @@ const DOMAIN_META = {
|
|
|
199
199
|
outputName: "devops",
|
|
200
200
|
fileName: "devops.md",
|
|
201
201
|
},
|
|
202
|
+
"review-boundary": {
|
|
203
|
+
name: "审稿边界",
|
|
204
|
+
applyTo: ["**/*"],
|
|
205
|
+
outputName: "review-boundary",
|
|
206
|
+
fileName: "review-boundary.md",
|
|
207
|
+
},
|
|
202
208
|
};
|
|
203
209
|
|
|
204
210
|
/**
|
package/package.json
CHANGED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "审稿边界"
|
|
3
|
+
applyTo: ["**/*"]
|
|
4
|
+
outputName: "review-boundary"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 审稿边界(Review Boundary)
|
|
8
|
+
|
|
9
|
+
⚠️ 本条是写给 **code review 审稿方**(AI review bot / Copilot code review / 人工 reviewer)的约束,**不是**给写代码方的新增要求。目标是让 review 收敛:只报「会导致 bug 的真问题」,不报「口味 / 风格 / 防御性」建议——后者正是循环 review 停不下来的元凶。写代码方遵守作者规则(AGENTS.base.md 其余章节)后,剩下的 review 意见大多是审稿人按自己的通用标准挖出来的口味问题,修完一轮又冒一轮,十几轮就是这么滚出来的。
|
|
10
|
+
|
|
11
|
+
### 必须报(真问题)
|
|
12
|
+
|
|
13
|
+
- 🔴 **会导致实际 bug / 数据丢失 / 数据错误 / 安全漏洞**:有明确触发路径(真实输入、真实调用链能复现),读 diff 能确认后果。
|
|
14
|
+
- 🟡 **真实风险**:有明确触发条件,且触发后后果严重(如并发竞态、错误被静默吞掉、未处理空值导致崩溃)。
|
|
15
|
+
- **违反本项目已固化规则**:AGENTS.base.md / AGENTS.private.md 里的 ⚠️ 铁律(DELETE 铁律、部署自包含、数据链路核对、环境配置禁止推断、测试环境验证前置等),diff 中明确违反 → 必须报。
|
|
16
|
+
|
|
17
|
+
### 禁止报(不是问题,报了只会拉长循环)
|
|
18
|
+
|
|
19
|
+
- 🔵 **口味 / 风格偏好**:换个命名更好、建议用某设计模式、提取公共函数、重构建议——作者规则已规范,审稿人不要另立标准。
|
|
20
|
+
- 🛡️ **纯防御性建议**:以「如果未来 / 万一 / 边界情况下」开头、当前代码没有实际触发路径的「潜在风险」(如「序号 99999 溢出」「未来可能有人改这里」),一律不报。
|
|
21
|
+
- ❓ **无法确认真假的问题**:读 diff 不能确认会导致 bug 的,默认按「不是问题」处理,禁止报「建议确认一下」这类空泛意见。
|
|
22
|
+
- 🔁 **重复已处理的问题**:已在评论 / 历史中标记 Won't fix 或「已修复于 <hash>」的问题,不再重提。
|
|
23
|
+
|
|
24
|
+
### 判断标准
|
|
25
|
+
|
|
26
|
+
- **一句话:「这条不修,功能会不会错 / 数据会不会坏?」** 会 → 报;不会 → 不报。
|
|
27
|
+
- 每条意见必须引用 diff 中的具体代码行作为证据,禁止臆测。
|
|
28
|
+
- 无法确认 → 不报。宁可漏报一条真问题,也不用十条口味问题刷屏。
|
|
29
|
+
- 每轮 review 的问题数量应当 ≤ 上一轮:修完真问题后没有新的真问题,就直接说「无值得修的新问题」,不要换个角度再挖。
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
When performing a code review, ONLY report issues that would cause an actual bug, data loss, or security vulnerability with a concrete, reproducible trigger path visible in the diff.
|
|
34
|
+
|
|
35
|
+
Do NOT report:
|
|
36
|
+
- Style, naming, or personal-preference opinions.
|
|
37
|
+
- Refactoring, "extract a function", or design-pattern suggestions.
|
|
38
|
+
- Defensive suggestions with no current trigger path (e.g. "in the future...", "what if...", "an edge case that cannot happen today").
|
|
39
|
+
- Issues you cannot confirm from the diff. If unsure, do not report it.
|
|
40
|
+
- Already-handled issues (previously Won't fix or marked "fixed in <hash>").
|
|
41
|
+
|
|
42
|
+
Every comment MUST cite the specific diff lines as evidence. When in doubt, stay silent. One real bug beats ten style suggestions. If no real problems remain, say so explicitly and stop.
|