@routerhub/agent-rules 1.5.10 → 1.5.12
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 +9 -2
- package/README.md +21 -17
- package/package.json +1 -1
package/AGENTS.base.md
CHANGED
|
@@ -14,11 +14,17 @@
|
|
|
14
14
|
|
|
15
15
|
## 安全
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- 用户明确要求上线/部署生产环境时,直接执行,无需二次确认。
|
|
18
|
+
- 执行过程中自行触及生产环境操作(非用户明确要求),必须先向用户二次确认后再执行。
|
|
18
19
|
|
|
19
20
|
## 需求文档
|
|
20
21
|
|
|
21
|
-
- 新需求先在 `docs/`
|
|
22
|
+
- 新需求先在 `docs/` 写文档,含:目标、范围、功能要求、验收标准。
|
|
23
|
+
|
|
24
|
+
## 文档格式
|
|
25
|
+
|
|
26
|
+
- 所有新建文档必须使用 HTML 格式(`.html`),禁止使用 Markdown(`.md`)格式。
|
|
27
|
+
- 已有的 `.md` 文件可保留,但新增文档一律使用 HTML。
|
|
22
28
|
|
|
23
29
|
## 优先级
|
|
24
30
|
|
|
@@ -80,6 +86,7 @@
|
|
|
80
86
|
- 用户明确要求由代理自行执行自动化测试时,允许使用无头浏览器进行测试与验证。
|
|
81
87
|
- 写完业务后执行 `pnpm run test:e2e:ui`,告知开发者对应测试用例名称;通过后打开 UI 供手动验证。
|
|
82
88
|
- 端口被占用时自动切换新端口。
|
|
89
|
+
- 自动化测试中,若 Mock 数据不影响业务逻辑验证,优先使用 Mock 数据代替真实接口调用,减少外部依赖和测试不稳定性。
|
|
83
90
|
|
|
84
91
|
## 错误日志
|
|
85
92
|
|
package/README.md
CHANGED
|
@@ -12,22 +12,26 @@
|
|
|
12
12
|
在你的项目里安装:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
pnpm add -D
|
|
15
|
+
pnpm add -D @routerhub/agent-rules
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
18
|
+
安装完成后会自动:
|
|
19
|
+
|
|
20
|
+
1. 生成 `AGENTS.md` 和 `.github/copilot-instructions.md`
|
|
21
|
+
2. 在后台启动 watch 进程,持续监听 `AGENTS.private.md` 变更并自动同步
|
|
22
|
+
|
|
23
|
+
无需手动执行任何命令,修改 `AGENTS.private.md` 即可自动生效。
|
|
24
|
+
|
|
25
|
+
> **注意:** 后台 watch 进程在重启电脑后会停止。如需每次启动开发时自动恢复监听,可在 `package.json` 中配合 `concurrently` 使用:
|
|
26
|
+
>
|
|
27
|
+
> ```bash
|
|
28
|
+
> pnpm add -D concurrently
|
|
29
|
+
> ```
|
|
30
|
+
>
|
|
31
|
+
> ```json
|
|
32
|
+
> {
|
|
33
|
+
> "scripts": {
|
|
34
|
+
> "dev": "concurrently \"next dev\" \"agent-rules watch\""
|
|
35
|
+
> }
|
|
36
|
+
> }
|
|
37
|
+
> ```
|