Initial commit: ai4se-harness-suite
Import harness suite (skills, installers, overnight-runner, docs) as a fresh history for InspireChina. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
24
harness-installer/templates/docs/standards/README.md
Normal file
24
harness-installer/templates/docs/standards/README.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# 代码规范(事实)
|
||||
|
||||
本目录是 **代码层面的硬约束**,写明"必须怎么做"。改动规范时要同步改本目录,并通知全队。
|
||||
|
||||
## 规范清单
|
||||
|
||||
| 文件 | 规范内容 |
|
||||
|---|---|
|
||||
| `architecture.md` | 整体架构、模块边界、依赖方向 |
|
||||
| `layers.md` | 分层职责:每层允许做什么、禁止做什么 |
|
||||
| `naming.md` | 命名约定:包、类、方法、字段、REST 路径 |
|
||||
| `api-design.md` | API 设计:路径、版本、请求响应、分页、状态码 |
|
||||
| `db.md` | 数据库规范:建表、命名、索引、迁移脚本 |
|
||||
| `error.md` | 错误处理:错误码、异常类型、统一响应体 |
|
||||
| `security.md` | 安全规范:认证、密码、敏感信息、上传 |
|
||||
| `test.md` | 测试规范:分层、命名、覆盖要求、数据准备 |
|
||||
| `business-rule.md` | 业务规则规范:规则 ID、定义位置、配置方式 |
|
||||
| `data-dictionary.md` | 数据字典规范:枚举定义、注册方式、取值含义 |
|
||||
| `templates/` | 代码模版 / snippet,供新功能开发时复制 |
|
||||
|
||||
## 使用方式
|
||||
|
||||
- 写新代码前先读对应规范文件。
|
||||
- 实现与规范冲突时:要么改代码,要么改规范并说明理由,不允许默默违反。
|
||||
@@ -0,0 +1,20 @@
|
||||
# 代码模版(Snippet)
|
||||
|
||||
存放常见业务代码模版,供新功能开发时 **参考复制**。所有模版都应来自项目真实实现代码。
|
||||
|
||||
## 目录
|
||||
|
||||
| # | 文件 | 层 | 用途 |
|
||||
|---|------|-----|------|
|
||||
| 1 | `01-ddd-controller.md` | Adapter | REST Controller 模版 |
|
||||
| 2 | `02-ddd-appservice.md` | Application | AppService 用例编排模版 |
|
||||
| 3 | `03-ddd-assembler.md` | Application | Domain → DTO 转换器模版 |
|
||||
| 4 | `04-ddd-aggregate.md` | Domain | 聚合根模版(含业务守卫方法) |
|
||||
| 5 | `05-ddd-domain-service.md` | Domain | Domain Service 模版 |
|
||||
| 6 | `06-ddd-repository-interface.md` | Domain | Repository 接口模版 |
|
||||
| 7 | `07-ddd-repository-impl.md` | Infrastructure | Repository 实现模版 |
|
||||
| 8 | `08-ddd-converter.md` | Infrastructure | PO ⟷ Domain 转换器模版 |
|
||||
| 9 | `09-ddd-po-mapper.md` | Infrastructure | PO 与 Mapper 模版 |
|
||||
| 10 | `10-global-exception-handler.md` | Infrastructure | 全局异常处理模版 |
|
||||
|
||||
> 模版里的包名请统一替换成实际项目的包名后再复制使用。
|
||||
Reference in New Issue
Block a user