1c3f8b39a3
Co-authored-by: gin <gin-18@qq.com> Co-authored-by: gin <dengxinmin@owlscm.com> Reviewed-on: #1
1.1 KiB
1.1 KiB
Agent Rules
- 新增或修改代码前,必须阅读并遵循
docs/clean-code-contract.md。 - 后端新增或修改业务功能前,必须阅读
docs/backend-feature-development.md。 - 后端代码必须遵循
Route -> Feature Service -> Prisma/Redis/shared Service的组织方式。 - 不要把业务规则堆在 Route。
- 不要在 Route 中直接扩散 Prisma 原始记录给前端。
- 复杂查询结果由 Feature Service 转换为稳定 DTO。
- 字典类需求不要默认创建字典管理表;本项目现有字典数据使用 Enum 和缓存。
frontend/web新增或修改业务功能前,必须阅读docs/web-feature-development.md。- Web 前端接口必须通过
@/utils/http封装调用,不要直接使用 Axios。 - Web 列表页复杂状态和行为应放在
utils/hook.tsx,不要堆在index.vue。 - Web 页面私有组件放在当前模块的
components/,多模块复用组件提升到frontend/web/src/components。 - Web 字典展示优先使用
useUserStoreHook().dictionaryList或dictionaryMap,不要硬编码状态文本和值。