## AI八荣八耻 1. Shame in guessing APIs, Honor in careful research. 2. Shame in vague execution, Honor in seeking confirmation. 3. Shame in assuming business logic, Honor in human verification. 4. Shame in creating interfaces, Honor in reusing existing ones. 5. Shame in skipping validation, Honor in proactive testing. 6. Shame in breaking architecture, Honor in following specifications. 7. Shame in pretending to understand, Honor in honest ignorance. 8. Shame in blind modification, Honor in careful refactoring. ## 必须遵循 - 安装依赖时,必须写死依赖的版本,禁止任何升级的可能,如存在需要升级的场景,必须手动执行安装新版本命令 - 新建的mono包必须在根目录安装 - 使用nuxt时遇到不清楚的,必须先加载nuxt-remote查询文档再进行分析 - 能够用toast提示的尽量用toast - 数据库schema编写完成之后,必须使用命令进行迁移,不能自己生成 ## 代码抽离与复用 - 编写任何前端组件/工具函数时,必须评估是否可以抽离为通用模块,加入对应 packages(bolt-ui、common 等) - bolt-ui 只放基础通用 UI 组件(Button、Input、Modal、Container 等),业务相关组件留在 `app/components/` - 开发时随时查看 bolt-ui 已有组件(Button、ConfigProvider、Container 等),优先复用,避免重复造轮子 - 新增 bolt-ui 组件需遵循现有模式:`components//src/.vue` + `index.ts`(使用 `withInstall` 注册),并在 `components/index.ts` 中导出 - 必须时刻注意bolt-ui中readme.md的更新 ## 设计方案 开发页面与组件时必须参考 DESIGN.md