@routerhub/agent-rules 1.4.3 → 1.4.4

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.
Files changed (2) hide show
  1. package/AGENTS.base.md +6 -0
  2. package/package.json +1 -1
package/AGENTS.base.md CHANGED
@@ -39,6 +39,12 @@
39
39
  - 时间相关处理统一使用 `dayjs`。
40
40
  - 数据回显优先使用对象展开运算符(`...`)。
41
41
 
42
+ ## 前端 API 生成规范
43
+
44
+ - 前端 API 请求必须严格使用 OpenAPI 生成的 API 方法,禁止手写请求方法或绕过生成层直接调用接口。
45
+ - 新增或变更接口后,必须先更新 OpenAPI 定义并重新生成 API 代码,再进行业务开发与联调。
46
+ - 禁止在业务代码中直接拼接接口路径、手动声明重复请求类型或复制粘贴旧请求实现。
47
+
42
48
  ## 生产环境操作安全规则
43
49
 
44
50
  - **严禁在未明确授权时操作线上/生产服务器**:只有当用户的指令中明确包含"生产环境"、"线上"、"prod"、"production"等关键词时,才允许在生产服务器上执行任何操作(如部署、重启、修改配置、执行脚本等)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routerhub/agent-rules",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "description": "Shared Copilot agent rules and guidelines for RouterHub projects",
5
5
  "main": "AGENTS.base.md",
6
6
  "bin": {