@routerhub/agent-rules 1.4.13 → 1.4.15
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 +2 -0
- package/package.json +1 -1
package/AGENTS.base.md
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
## Go 语言规则
|
|
47
47
|
|
|
48
48
|
- 优先值传递与局部变量生命周期控制,避免内存逃逸;无必要不返回局部变量指针。
|
|
49
|
+
- 所有删除操作必须使用软删除机制;`DeletedAt` 字段类型必须用 `gorm.DeletedAt`,禁止用 `*time.Time`(后者不实现 `DeleteClausesInterface`,会导致硬删除)。
|
|
49
50
|
|
|
50
51
|
## Git 规范
|
|
51
52
|
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
|
|
66
67
|
- 默认本地 `docker build`,构建后 `docker push` 到 `ghcr.io`,推送前确保正确 tag。
|
|
67
68
|
- 部署通过 Portainer 管理界面操作,禁止 SSH 手动执行 docker 命令;地址和账号配置在 `AGENTS.private.md` 或环境变量中,禁止硬编码。
|
|
69
|
+
- 始终通过 Portainer API 更新 Stack 环境变量触发重新部署,不要 SSH 手动操作 Portainer 管理的容器。
|
|
68
70
|
|
|
69
71
|
## 测试
|
|
70
72
|
|