ai-engineering-init 1.6.0 → 1.8.0
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/.claude/agents/code-reviewer.md +3 -130
- package/.claude/hooks/skill-forced-eval.js +46 -60
- package/.claude/hooks/stop.js +24 -1
- package/.claude/settings.json +10 -1
- package/.claude/skills/api-development/SKILL.md +179 -130
- package/.claude/skills/architecture-design/SKILL.md +102 -212
- package/.claude/skills/backend-annotations/SKILL.md +166 -220
- package/.claude/skills/bug-detective/SKILL.md +225 -186
- package/.claude/skills/code-patterns/SKILL.md +127 -244
- package/.claude/skills/codex-code-review/SKILL.md +327 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +96 -113
- package/.claude/skills/crud-development/SKILL.md +226 -307
- package/.claude/skills/data-permission/SKILL.md +131 -202
- package/.claude/skills/database-ops/SKILL.md +158 -355
- package/.claude/skills/error-handler/SKILL.md +224 -285
- package/.claude/skills/file-oss-management/SKILL.md +174 -169
- package/.claude/skills/git-workflow/SKILL.md +123 -341
- package/.claude/skills/json-serialization/SKILL.md +121 -137
- package/.claude/skills/leniu-report-customization/SKILL.md +82 -2
- package/.claude/skills/leniu-report-standard-customization/SKILL.md +65 -2
- package/.claude/skills/loki-log-query/SKILL.md +400 -0
- package/.claude/skills/mysql-debug/SKILL.md +58 -22
- package/.claude/skills/performance-doctor/SKILL.md +83 -89
- package/.claude/skills/redis-cache/SKILL.md +134 -185
- package/.claude/skills/scheduled-jobs/SKILL.md +187 -224
- package/.claude/skills/security-guard/SKILL.md +168 -276
- package/.claude/skills/sms-mail/SKILL.md +266 -228
- package/.claude/skills/social-login/SKILL.md +257 -195
- package/.claude/skills/sync-back-merge/SKILL.md +66 -0
- package/.claude/skills/tenant-management/SKILL.md +172 -188
- package/.claude/skills/utils-toolkit/SKILL.md +214 -222
- package/.claude/skills/websocket-sse/SKILL.md +251 -172
- package/.claude/skills/workflow-engine/SKILL.md +178 -250
- package/.claude/skills/yunxiao-task-management/SKILL.md +489 -0
- package/.codex/skills/api-development/SKILL.md +179 -130
- package/.codex/skills/architecture-design/SKILL.md +102 -212
- package/.codex/skills/backend-annotations/SKILL.md +166 -220
- package/.codex/skills/bug-detective/SKILL.md +225 -186
- package/.codex/skills/code-patterns/SKILL.md +127 -244
- package/.codex/skills/collaborating-with-codex/SKILL.md +96 -113
- package/.codex/skills/crud-development/SKILL.md +226 -307
- package/.codex/skills/data-permission/SKILL.md +131 -202
- package/.codex/skills/database-ops/SKILL.md +158 -355
- package/.codex/skills/error-handler/SKILL.md +224 -285
- package/.codex/skills/file-oss-management/SKILL.md +174 -169
- package/.codex/skills/git-workflow/SKILL.md +123 -341
- package/.codex/skills/json-serialization/SKILL.md +121 -137
- package/.codex/skills/leniu-report-customization/SKILL.md +82 -2
- package/.codex/skills/leniu-report-standard-customization/SKILL.md +65 -2
- package/.codex/skills/loki-log-query/SKILL.md +400 -0
- package/.codex/skills/loki-log-query/environments.json +45 -0
- package/.codex/skills/mysql-debug/SKILL.md +58 -22
- package/.codex/skills/performance-doctor/SKILL.md +83 -89
- package/.codex/skills/redis-cache/SKILL.md +134 -185
- package/.codex/skills/scheduled-jobs/SKILL.md +187 -224
- package/.codex/skills/security-guard/SKILL.md +168 -276
- package/.codex/skills/skill-creator/LICENSE.txt +202 -0
- package/.codex/skills/skill-creator/SKILL.md +479 -0
- package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
- package/.codex/skills/skill-creator/agents/comparator.md +202 -0
- package/.codex/skills/skill-creator/agents/grader.md +223 -0
- package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
- package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.codex/skills/skill-creator/references/schemas.md +430 -0
- package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
- package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.codex/skills/skill-creator/scripts/utils.py +47 -0
- package/.codex/skills/sms-mail/SKILL.md +266 -228
- package/.codex/skills/social-login/SKILL.md +257 -195
- package/.codex/skills/sync-back-merge/SKILL.md +66 -0
- package/.codex/skills/tenant-management/SKILL.md +172 -188
- package/.codex/skills/utils-toolkit/SKILL.md +214 -222
- package/.codex/skills/websocket-sse/SKILL.md +251 -172
- package/.codex/skills/workflow-engine/SKILL.md +178 -250
- package/.codex/skills/yunxiao-task-management/SKILL.md +489 -0
- package/.cursor/hooks/cursor-skill-eval.js +66 -6
- package/.cursor/hooks/stop.js +23 -1
- package/.cursor/skills/api-development/SKILL.md +179 -130
- package/.cursor/skills/architecture-design/SKILL.md +102 -212
- package/.cursor/skills/backend-annotations/SKILL.md +166 -220
- package/.cursor/skills/bug-detective/SKILL.md +225 -186
- package/.cursor/skills/code-patterns/SKILL.md +127 -244
- package/.cursor/skills/collaborating-with-codex/SKILL.md +96 -113
- package/.cursor/skills/crud-development/SKILL.md +226 -307
- package/.cursor/skills/data-permission/SKILL.md +131 -202
- package/.cursor/skills/database-ops/SKILL.md +158 -355
- package/.cursor/skills/error-handler/SKILL.md +224 -285
- package/.cursor/skills/file-oss-management/SKILL.md +174 -169
- package/.cursor/skills/git-workflow/SKILL.md +123 -341
- package/.cursor/skills/json-serialization/SKILL.md +121 -137
- package/.cursor/skills/leniu-report-customization/SKILL.md +82 -2
- package/.cursor/skills/leniu-report-standard-customization/SKILL.md +65 -2
- package/.cursor/skills/loki-log-query/SKILL.md +400 -0
- package/.cursor/skills/loki-log-query/environments.json +45 -0
- package/.cursor/skills/mysql-debug/SKILL.md +58 -22
- package/.cursor/skills/performance-doctor/SKILL.md +83 -89
- package/.cursor/skills/redis-cache/SKILL.md +134 -185
- package/.cursor/skills/scheduled-jobs/SKILL.md +187 -224
- package/.cursor/skills/security-guard/SKILL.md +168 -276
- package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/.cursor/skills/skill-creator/SKILL.md +479 -0
- package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/.cursor/skills/sms-mail/SKILL.md +266 -228
- package/.cursor/skills/social-login/SKILL.md +257 -195
- package/.cursor/skills/sync-back-merge/SKILL.md +66 -0
- package/.cursor/skills/tenant-management/SKILL.md +172 -188
- package/.cursor/skills/utils-toolkit/SKILL.md +214 -222
- package/.cursor/skills/websocket-sse/SKILL.md +251 -172
- package/.cursor/skills/workflow-engine/SKILL.md +178 -250
- package/.cursor/skills/yunxiao-task-management/SKILL.md +489 -0
- package/AGENTS.md +49 -540
- package/CLAUDE.md +73 -119
- package/README.md +37 -6
- package/bin/index.js +611 -25
- package/package.json +1 -1
- package/src/platform-map.json +4 -0
- package/src/skills/api-development/SKILL.md +179 -130
- package/src/skills/architecture-design/SKILL.md +102 -212
- package/src/skills/backend-annotations/SKILL.md +166 -220
- package/src/skills/bug-detective/SKILL.md +225 -186
- package/src/skills/code-patterns/SKILL.md +127 -244
- package/src/skills/codex-code-review/SKILL.md +261 -69
- package/src/skills/collaborating-with-codex/SKILL.md +96 -113
- package/src/skills/crud-development/SKILL.md +226 -307
- package/src/skills/data-permission/SKILL.md +131 -202
- package/src/skills/database-ops/SKILL.md +158 -355
- package/src/skills/error-handler/SKILL.md +224 -285
- package/src/skills/file-oss-management/SKILL.md +174 -169
- package/src/skills/git-workflow/SKILL.md +123 -341
- package/src/skills/json-serialization/SKILL.md +121 -137
- package/src/skills/leniu-report-customization/SKILL.md +82 -2
- package/src/skills/leniu-report-standard-customization/SKILL.md +65 -2
- package/src/skills/loki-log-query/SKILL.md +400 -0
- package/src/skills/loki-log-query/environments.json +45 -0
- package/src/skills/mysql-debug/SKILL.md +58 -22
- package/src/skills/performance-doctor/SKILL.md +83 -89
- package/src/skills/redis-cache/SKILL.md +134 -185
- package/src/skills/scheduled-jobs/SKILL.md +187 -224
- package/src/skills/security-guard/SKILL.md +168 -276
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +479 -0
- package/src/skills/skill-creator/agents/analyzer.md +274 -0
- package/src/skills/skill-creator/agents/comparator.md +202 -0
- package/src/skills/skill-creator/agents/grader.md +223 -0
- package/src/skills/skill-creator/assets/eval_review.html +146 -0
- package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/src/skills/skill-creator/references/schemas.md +430 -0
- package/src/skills/skill-creator/scripts/__init__.py +0 -0
- package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/src/skills/skill-creator/scripts/generate_report.py +326 -0
- package/src/skills/skill-creator/scripts/improve_description.py +248 -0
- package/src/skills/skill-creator/scripts/package_skill.py +136 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/src/skills/skill-creator/scripts/run_eval.py +310 -0
- package/src/skills/skill-creator/scripts/run_loop.py +332 -0
- package/src/skills/skill-creator/scripts/utils.py +47 -0
- package/src/skills/sms-mail/SKILL.md +266 -228
- package/src/skills/social-login/SKILL.md +257 -195
- package/src/skills/sync-back-merge/SKILL.md +66 -0
- package/src/skills/tenant-management/SKILL.md +172 -188
- package/src/skills/utils-toolkit/SKILL.md +214 -222
- package/src/skills/websocket-sse/SKILL.md +251 -172
- package/src/skills/workflow-engine/SKILL.md +178 -250
- package/src/skills/yunxiao-task-management/SKILL.md +489 -0
package/AGENTS.md
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
# AGENTS.md -
|
|
1
|
+
# AGENTS.md - [项目名称] 开发规范
|
|
2
|
+
|
|
3
|
+
> ⚠️ **这是示例模板,安装后请替换为你的项目实际规范**
|
|
4
|
+
> 需要修改:项目名称、技术栈描述、架构规范、禁止事项、代码模板
|
|
2
5
|
|
|
3
6
|
## 对话语言设置
|
|
4
7
|
|
|
5
8
|
**重要**: 在此代码库中工作时,必须始终使用**中文**与用户对话。
|
|
6
9
|
|
|
7
|
-
>
|
|
10
|
+
> **项目说明**:[在此填写你的项目简介,例如:本项目是 XXX 后端服务]
|
|
8
11
|
>
|
|
9
|
-
>
|
|
10
|
-
> - 如果存在 `plus-ui/` 目录 → 包含 PC 端前端代码(Vue 3 + Element Plus)
|
|
11
|
-
> - 如果不存在 `plus-ui/` 目录 → 纯后端项目,前端需单独获取
|
|
12
|
+
> **技术栈**:[例如:Spring Boot 3.x + MyBatis-Plus + Redis + Sa-Token]
|
|
12
13
|
>
|
|
13
|
-
>
|
|
14
|
+
> **架构**:[例如:三层架构(Controller → Service → Mapper)]
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -18,11 +19,9 @@
|
|
|
18
19
|
|
|
19
20
|
| 术语 | 含义 | 对应目录 |
|
|
20
21
|
|------|------|---------|
|
|
21
|
-
| **后端** | Java 服务 | `
|
|
22
|
-
| **前端** | PC 管理端 | `
|
|
23
|
-
|
|
|
24
|
-
| **业务模块** | 自定义业务 | `ruoyi-modules/ruoyi-xxx/` |
|
|
25
|
-
| **通用模块** | 公共工具 | `ruoyi-common/` |
|
|
22
|
+
| **后端** | Java 服务 | `[你的模块目录]/` |
|
|
23
|
+
| **前端** | PC 管理端 | `[前端目录]/`(如存在) |
|
|
24
|
+
| **公共模块** | 通用工具 | `[公共模块目录]/` |
|
|
26
25
|
|
|
27
26
|
---
|
|
28
27
|
|
|
@@ -31,7 +30,7 @@
|
|
|
31
30
|
| 触发词 | 工具 | 用途 |
|
|
32
31
|
|-------|------|------|
|
|
33
32
|
| 深度分析、仔细思考、全面评估 | `sequential-thinking` | 链式推理,多步骤分析 |
|
|
34
|
-
| 最佳实践、官方文档、标准写法 | `context7` |
|
|
33
|
+
| 最佳实践、官方文档、标准写法 | `context7` | 框架官方文档查询 |
|
|
35
34
|
| 打开浏览器、截图、检查元素 | `chrome-devtools` | 浏览器调试 |
|
|
36
35
|
|
|
37
36
|
---
|
|
@@ -42,9 +41,8 @@
|
|
|
42
41
|
|
|
43
42
|
### 技能系统工作原理
|
|
44
43
|
|
|
45
|
-
技能文件存储在 `.
|
|
44
|
+
技能文件存储在 `.codex/skills/[skill-name]/SKILL.md` 中。
|
|
46
45
|
|
|
47
|
-
**启动时**:自动加载所有技能的 `name` 和 `description`
|
|
48
46
|
**任务匹配时**:读取匹配技能的完整 SKILL.md 内容
|
|
49
47
|
**需要时**:可进一步读取技能目录下的 `references/`、`scripts/` 等文件
|
|
50
48
|
|
|
@@ -52,102 +50,57 @@
|
|
|
52
50
|
|
|
53
51
|
## 技能清单与触发条件
|
|
54
52
|
|
|
55
|
-
以下是本项目的技能列表,根据 `description` 自动判断何时使用:
|
|
56
|
-
|
|
57
53
|
### 后端开发技能
|
|
58
54
|
|
|
59
55
|
| 技能名称 | 触发条件 |
|
|
60
56
|
|---------|---------|
|
|
61
57
|
| `crud-development` | CRUD 开发、业务模块、Entity/Service/Mapper 创建 |
|
|
62
58
|
| `database-ops` | 数据库操作、SQL、建表、字典、菜单配置 |
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
59
|
+
| `api-development` | API 接口设计、RESTful、接口规范 |
|
|
60
|
+
| `utils-toolkit` | 工具类、StringUtils 等 |
|
|
61
|
+
| `error-handler` | 异常处理、错误处理规范 |
|
|
62
|
+
| `security-guard` | 安全、认证授权、加密 |
|
|
63
|
+
| `data-permission` | 数据权限、行级权限 |
|
|
64
|
+
| `tenant-management` | 多租户、租户隔离 |
|
|
65
|
+
| `workflow-engine` | 工作流、审批流 |
|
|
66
|
+
| `scheduled-jobs` | 定时任务 |
|
|
67
|
+
| `redis-cache` | Redis、缓存、分布式锁 |
|
|
68
|
+
| `json-serialization` | JSON 序列化、反序列化 |
|
|
69
|
+
| `file-oss-management` | 文件上传、OSS、云存储 |
|
|
70
|
+
| `sms-mail` | 短信、邮件发送 |
|
|
71
|
+
| `social-login` | 第三方登录、OAuth |
|
|
75
72
|
| `websocket-sse` | WebSocket、SSE、实时推送 |
|
|
76
|
-
|
|
77
|
-
### leniu-tengyun-core / leniu-yunshitang 项目专用技能
|
|
78
|
-
|
|
79
|
-
| 技能名称 | 触发条件 |
|
|
80
|
-
|---------|---------|
|
|
81
|
-
| `leniu-crud-development` | CRUD、增删改查、新建模块、Business层、Service、Mapper、Controller、分页查询、LeRequest、PageDTO |
|
|
82
|
-
| `leniu-api-development` | API接口、Controller、RESTful、LeResult、LeResponse、LeRequest、接口开发、路由前缀 |
|
|
83
|
-
| `leniu-brainstorm` | 头脑风暴、方案设计、怎么设计、创意探索、功能规划、可行性分析 |
|
|
84
|
-
| `leniu-architecture-design` | 架构设计、双库架构、商户库、系统库、pigx框架、四层架构、模块划分、Business层 |
|
|
85
|
-
| `leniu-database-ops` | 数据库、SQL、建表、双库、商户库、系统库、审计字段、crby、crtime、del_flag |
|
|
86
|
-
| `leniu-utils-toolkit` | 工具类、BeanUtil、StrUtil、CollUtil、ObjectUtil、RedisUtil、JacksonUtil、LeBeanUtil |
|
|
87
|
-
| `leniu-error-handler` | 异常处理、LeException、全局异常、参数校验、错误码、I18n、国际化 |
|
|
88
|
-
| `leniu-backend-annotations` | @RequiresAuthentication、@RequiresGuest、@Validated、@NotNull、@Api、分组校验、InsertGroup |
|
|
89
|
-
| `leniu-security-guard` | 安全认证、SQL注入防护、XSS防护、数据脱敏、SM4加密、接口安全、限流 |
|
|
90
|
-
| `leniu-data-permission` | 多租户、数据权限、@UseSystem、Executors.doInTenant、TenantContextHolder、MERCHANT-ID、双库隔离 |
|
|
91
|
-
| `leniu-redis-cache` | Redis、缓存、RedisUtil、分布式锁、RLock、getLock、setNx、ZSet、限流、缓存击穿 |
|
|
92
|
-
| `leniu-code-patterns` | 代码禁令、代码规范、命名规范、代码风格、Git提交规范、包结构、禁止写法、审计字段规范 |
|
|
93
|
-
| `leniu-java-entity` | Entity实体类、VO视图对象、DTO数据传输、Param参数类、@TableName、@TableField、字段映射 |
|
|
94
|
-
| `leniu-java-logging` | 日志、@Slf4j、log.info、log.error、log.debug、日志级别、logback |
|
|
95
|
-
| `leniu-java-mybatis` | MyBatis、MyBatisPlus、Mapper、LambdaQueryWrapper、XML映射、动态SQL、BaseMapper |
|
|
96
|
-
| `leniu-java-amount-handling` | 金额处理、分转元、元转分、Long金额、money、fen、BigDecimal金额 |
|
|
97
|
-
| `leniu-java-concurrent` | 并发、CompletableFuture、线程池、ThreadPool、并发安全、异步处理 |
|
|
98
|
-
| `leniu-java-export` | 导出、Excel导出、异步导出、分页导出、@ExcelProperty、exportApi |
|
|
99
|
-
| `leniu-java-mq` | 消息队列、MQ、MqUtil、@MqConsumer、延迟消息、消息重试、事务消息 |
|
|
100
|
-
| `leniu-java-task` | 定时任务、XXL-Job、@XxlJob、TenantLoader、任务调度、分布式定时 |
|
|
101
|
-
| `leniu-java-report-query-param` | 报表查询入参、Param类、分页参数、时间范围查询、ReportBaseParam、exportCols |
|
|
102
|
-
| `leniu-java-total-line` | 合计行、totalLine、报表合计、SUM合计、ReportBaseTotalVO、合计查询 |
|
|
103
|
-
| `leniu-mealtime` | 餐次、mealtime、mealtimeType、早餐、午餐、晚餐、下午茶、夜宵、AllocMealtimeTypeEnum |
|
|
104
|
-
| `leniu-marketing-price-rule-customizer` | 营销计费、计价规则、RulePriceHandler、RulePriceEnum、折扣规则、满减规则、限额规则 |
|
|
105
|
-
| `leniu-marketing-recharge-rule-customizer` | 营销充值、充值规则、RuleRechargeHandler、RuleRechargeEnum、满赠规则、充值赠送 |
|
|
106
|
-
| `leniu-report-customization` | 定制报表、汇总报表、report_order_info、report_order_detail、report_account_flow、退款汇总、消费金额统计 |
|
|
107
|
-
| `leniu-report-standard-customization` | 标准版报表、core-report、report_refund、经营分析、营业额分析、用户活跃度、菜品排行、操作员统计、账户日结、商户消费汇总 |
|
|
108
|
-
|
|
109
|
-
### 前端开发技能(需 plus-ui 目录存在)
|
|
110
|
-
|
|
111
|
-
| 技能名称 | 触发条件 |
|
|
112
|
-
|---------|---------|
|
|
113
|
-
| `ui-pc` | PC 端页面、Element Plus、表格、表单、弹窗 |
|
|
114
|
-
| `store-pc` | Pinia 状态管理、Store、useUserStore |
|
|
115
|
-
|
|
116
|
-
> 💡 **提示**:如果 `plus-ui/` 目录不存在,前端技能将不可用。
|
|
73
|
+
| `backend-annotations` | 注解使用规范 |
|
|
117
74
|
|
|
118
75
|
### 通用技能
|
|
119
76
|
|
|
120
77
|
| 技能名称 | 触发条件 |
|
|
121
78
|
|---------|---------|
|
|
122
79
|
| `architecture-design` | 架构设计、模块划分、重构 |
|
|
123
|
-
| `code-patterns` |
|
|
124
|
-
| `project-navigator` | 项目结构、文件定位 |
|
|
80
|
+
| `code-patterns` | 代码规范、命名、禁止事项 |
|
|
125
81
|
| `git-workflow` | Git、提交、commit、分支 |
|
|
126
82
|
| `tech-decision` | 技术选型、方案对比 |
|
|
127
83
|
| `brainstorm` | 头脑风暴、创意、方案设计 |
|
|
128
84
|
| `task-tracker` | 任务跟踪、进度管理 |
|
|
129
|
-
| `test-development` |
|
|
85
|
+
| `test-development` | 测试、单元测试 |
|
|
130
86
|
| `bug-detective` | Bug 排查、报错、异常 |
|
|
131
87
|
| `performance-doctor` | 性能优化、慢查询、缓存 |
|
|
132
88
|
| `add-skill` | 添加技能、创建技能文档 |
|
|
89
|
+
| `collaborating-with-codex` | 与 Codex 协同分析 |
|
|
90
|
+
| `collaborating-with-gemini` | 与 Gemini 协同设计 |
|
|
91
|
+
| `codex-code-review` | 代码审查 |
|
|
133
92
|
|
|
134
93
|
### OpenSpec 规格驱动开发技能(SDD)
|
|
135
94
|
|
|
136
|
-
> 基于 [OpenSpec](https://github.com/Fission-AI/OpenSpec) 的规格驱动开发工作流,需安装 `openspec` CLI。
|
|
137
95
|
> 完整工作流:`/opsx:new` → `/opsx:ff` → `/opsx:apply` → `/opsx:archive`
|
|
138
96
|
|
|
139
97
|
| 技能名称 | 触发条件 |
|
|
140
98
|
|---------|---------|
|
|
141
|
-
| `openspec-
|
|
142
|
-
| `openspec-
|
|
143
|
-
| `openspec-
|
|
144
|
-
| `openspec-
|
|
145
|
-
| `openspec-
|
|
146
|
-
| `openspec-apply-change` | 实现任务、开始编码、/opsx:apply |
|
|
147
|
-
| `openspec-verify-change` | 验证实现、检查规格匹配、/opsx:verify |
|
|
148
|
-
| `openspec-sync-specs` | 同步规格到主 spec、/opsx:sync |
|
|
149
|
-
| `openspec-archive-change` | 归档变更、完成收尾、/opsx:archive |
|
|
150
|
-
| `openspec-bulk-archive-change` | 批量归档多个变更、/opsx:bulk-archive |
|
|
99
|
+
| `openspec-new-change` | 新建变更、/opsx:new |
|
|
100
|
+
| `openspec-ff-change` | 快速推进、/opsx:ff |
|
|
101
|
+
| `openspec-apply-change` | 实现任务、/opsx:apply |
|
|
102
|
+
| `openspec-verify-change` | 验证实现、/opsx:verify |
|
|
103
|
+
| `openspec-archive-change` | 归档变更、/opsx:archive |
|
|
151
104
|
|
|
152
105
|
---
|
|
153
106
|
|
|
@@ -183,461 +136,29 @@
|
|
|
183
136
|
|
|
184
137
|
## 🚫 核心禁止事项
|
|
185
138
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
```java
|
|
189
|
-
// ❌ 禁止1: 错误包名
|
|
190
|
-
package com.ruoyi.xxx; // 禁止!
|
|
191
|
-
package plus.ruoyi.xxx; // 禁止!
|
|
192
|
-
// ✅ 正确: org.dromara.xxx
|
|
193
|
-
|
|
194
|
-
// ❌ 禁止2: 使用 BeanUtils
|
|
195
|
-
BeanUtil.copyProperties(bo, entity); // 禁止!
|
|
196
|
-
// ✅ 正确: MapstructUtils.convert(bo, Xxx.class)
|
|
139
|
+
> ⚠️ **请替换为你的项目实际禁止事项**
|
|
197
140
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
// ✅
|
|
201
|
-
|
|
202
|
-
// ❌ 禁止4: Service 继承基类
|
|
203
|
-
public class XxxServiceImpl extends ServiceImpl<...> // 禁止!
|
|
204
|
-
// ✅ 正确: public class XxxServiceImpl implements IXxxService
|
|
205
|
-
|
|
206
|
-
// ❌ 禁止5: 单目标映射使用 @AutoMappers(复数)
|
|
207
|
-
@AutoMappers({@AutoMapper(...)}) // 单目标时禁止!
|
|
208
|
-
// ✅ 正确: @AutoMapper(target = Xxx.class)
|
|
209
|
-
// 💡 例外: 多目标映射(如 SysOperLogBo)可使用 @AutoMappers
|
|
210
|
-
|
|
211
|
-
// ❌ 禁止6: 使用完整类型引用
|
|
212
|
-
public org.dromara.common.core.domain.R<XxxVo> getXxx() // 禁止!
|
|
213
|
-
// ✅ 正确: 先 import,再使用短类名
|
|
214
|
-
import org.dromara.common.core.domain.R;
|
|
215
|
-
public R<XxxVo> getXxx()
|
|
216
|
-
|
|
217
|
-
// ❌ 禁止7: 使用自增 ID
|
|
218
|
-
id BIGINT(20) AUTO_INCREMENT // 禁止!
|
|
219
|
-
// ✅ 正确: 使用雪花 ID(全局配置)
|
|
220
|
-
|
|
221
|
-
// ❌ 禁止8: 创建 DAO 层
|
|
222
|
-
private final IXxxDao xxxDao; // 禁止!本项目无 DAO 层
|
|
223
|
-
// ✅ 正确: private final XxxMapper baseMapper;
|
|
141
|
+
```
|
|
142
|
+
// ❌ [在此填写你的项目禁止写法]
|
|
143
|
+
// ✅ [在此填写正确写法]
|
|
224
144
|
```
|
|
225
145
|
|
|
226
146
|
---
|
|
227
147
|
|
|
228
|
-
## 🏗️
|
|
148
|
+
## 🏗️ 核心架构
|
|
229
149
|
|
|
230
|
-
|
|
150
|
+
> ⚠️ **请替换为你的项目实际架构**
|
|
231
151
|
|
|
232
152
|
```
|
|
153
|
+
[在此描述你的项目架构,例如:]
|
|
154
|
+
|
|
233
155
|
Controller(接收请求、参数校验)
|
|
234
156
|
↓
|
|
235
|
-
Service
|
|
157
|
+
Service(业务逻辑)
|
|
236
158
|
↓
|
|
237
|
-
Mapper
|
|
159
|
+
Mapper(数据访问)
|
|
238
160
|
```
|
|
239
161
|
|
|
240
|
-
**关键点**:
|
|
241
|
-
- ✅ Service 层直接注入 Mapper(无 DAO 层)
|
|
242
|
-
- ✅ `buildQueryWrapper()` 方法在 **Service 实现类**中
|
|
243
|
-
- ✅ Service 实现类**不继承任何基类**
|
|
244
|
-
- ✅ Mapper 继承 `BaseMapperPlus<Entity, Vo>`
|
|
245
|
-
|
|
246
|
-
### 模块与表前缀对应
|
|
247
|
-
|
|
248
|
-
| 模块 | 表前缀 | 包路径 |
|
|
249
|
-
|------|--------|--------|
|
|
250
|
-
| system | `sys_` | `org.dromara.system` |
|
|
251
|
-
| demo | `test_` | `org.dromara.demo` |
|
|
252
|
-
| workflow | `flow_` | `org.dromara.workflow` |
|
|
253
|
-
| 自定义 | 自定义 | `org.dromara.xxx` |
|
|
254
|
-
|
|
255
|
-
### 核心类继承关系
|
|
256
|
-
|
|
257
|
-
| 类型 | 基类/注解 |
|
|
258
|
-
|------|---------|
|
|
259
|
-
| Entity | `extends TenantEntity` |
|
|
260
|
-
| BO | `@AutoMapper(target = Xxx.class)`(单数) |
|
|
261
|
-
| VO | `@AutoMapper(target = Xxx.class)` |
|
|
262
|
-
| Mapper | `extends BaseMapperPlus<Xxx, XxxVo>` |
|
|
263
|
-
| Service 接口 | `interface IXxxService` |
|
|
264
|
-
| Service 实现 | `implements IXxxService`(不继承基类) |
|
|
265
|
-
| Controller | `extends BaseController` |
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## 📡 API 路径规范
|
|
270
|
-
|
|
271
|
-
| 操作 | HTTP方法 | 路径格式 | 示例 |
|
|
272
|
-
|------|---------|---------|------|
|
|
273
|
-
| 分页查询 | GET | `/list` | `@GetMapping("/list")` |
|
|
274
|
-
| 获取详情 | GET | `/{id}` | `@GetMapping("/{id}")` |
|
|
275
|
-
| 新增 | POST | `/`(空) | `@PostMapping` |
|
|
276
|
-
| 修改 | PUT | `/`(空) | `@PutMapping` |
|
|
277
|
-
| 删除 | DELETE | `/{ids}` | `@DeleteMapping("/{ids}")` |
|
|
278
|
-
| 导出 | POST | `/export` | `@PostMapping("/export")` |
|
|
279
|
-
|
|
280
|
-
---
|
|
281
|
-
|
|
282
|
-
## 📋 标准代码模板
|
|
283
|
-
|
|
284
|
-
### 1. Service 实现类(核心模板)
|
|
285
|
-
|
|
286
|
-
```java
|
|
287
|
-
package org.dromara.demo.service.impl;
|
|
288
|
-
|
|
289
|
-
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
290
|
-
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
291
|
-
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
292
|
-
import lombok.RequiredArgsConstructor;
|
|
293
|
-
import org.springframework.stereotype.Service;
|
|
294
|
-
import org.dromara.common.core.utils.MapstructUtils;
|
|
295
|
-
import org.dromara.common.core.utils.StringUtils;
|
|
296
|
-
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
297
|
-
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
298
|
-
import org.dromara.demo.domain.Xxx;
|
|
299
|
-
import org.dromara.demo.domain.bo.XxxBo;
|
|
300
|
-
import org.dromara.demo.domain.vo.XxxVo;
|
|
301
|
-
import org.dromara.demo.mapper.XxxMapper;
|
|
302
|
-
import org.dromara.demo.service.IXxxService;
|
|
303
|
-
import java.util.Collection;
|
|
304
|
-
import java.util.List;
|
|
305
|
-
import java.util.Map;
|
|
306
|
-
|
|
307
|
-
@Service
|
|
308
|
-
@RequiredArgsConstructor
|
|
309
|
-
public class XxxServiceImpl implements IXxxService { // ✅ 不继承任何基类
|
|
310
|
-
|
|
311
|
-
private final XxxMapper baseMapper; // ✅ 直接注入 Mapper(无 DAO 层)
|
|
312
|
-
|
|
313
|
-
@Override
|
|
314
|
-
public XxxVo queryById(Long id) {
|
|
315
|
-
return baseMapper.selectVoById(id);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
@Override
|
|
319
|
-
public TableDataInfo<XxxVo> queryPageList(XxxBo bo, PageQuery pageQuery) {
|
|
320
|
-
LambdaQueryWrapper<Xxx> lqw = buildQueryWrapper(bo); // ✅ Service 层构建查询
|
|
321
|
-
Page<XxxVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
|
322
|
-
return TableDataInfo.build(result);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
@Override
|
|
326
|
-
public Boolean insertByBo(XxxBo bo) {
|
|
327
|
-
Xxx add = MapstructUtils.convert(bo, Xxx.class); // ✅ MapstructUtils 转换
|
|
328
|
-
return baseMapper.insert(add) > 0;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
@Override
|
|
332
|
-
public Boolean updateByBo(XxxBo bo) {
|
|
333
|
-
Xxx update = MapstructUtils.convert(bo, Xxx.class);
|
|
334
|
-
return baseMapper.updateById(update) > 0;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
@Override
|
|
338
|
-
public Boolean deleteByIds(Collection<Long> ids) {
|
|
339
|
-
return baseMapper.deleteByIds(ids) > 0;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* 构建查询条件
|
|
344
|
-
* ⭐ 在 Service 层构建(不是 DAO 层)
|
|
345
|
-
*/
|
|
346
|
-
private LambdaQueryWrapper<Xxx> buildQueryWrapper(XxxBo bo) {
|
|
347
|
-
Map<String, Object> params = bo.getParams();
|
|
348
|
-
LambdaQueryWrapper<Xxx> lqw = Wrappers.lambdaQuery();
|
|
349
|
-
lqw.eq(bo.getId() != null, Xxx::getId, bo.getId());
|
|
350
|
-
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), Xxx::getStatus, bo.getStatus());
|
|
351
|
-
lqw.like(StringUtils.isNotBlank(bo.getXxxName()), Xxx::getXxxName, bo.getXxxName());
|
|
352
|
-
lqw.orderByDesc(Xxx::getCreateTime);
|
|
353
|
-
return lqw;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
### 2. Entity 实体类
|
|
359
|
-
|
|
360
|
-
```java
|
|
361
|
-
package org.dromara.demo.domain;
|
|
362
|
-
|
|
363
|
-
import org.dromara.common.tenant.core.TenantEntity;
|
|
364
|
-
import com.baomidou.mybatisplus.annotation.*;
|
|
365
|
-
import lombok.Data;
|
|
366
|
-
import lombok.EqualsAndHashCode;
|
|
367
|
-
import java.io.Serial;
|
|
368
|
-
|
|
369
|
-
@Data
|
|
370
|
-
@EqualsAndHashCode(callSuper = true)
|
|
371
|
-
@TableName("test_xxx")
|
|
372
|
-
public class Xxx extends TenantEntity { // ✅ 继承 TenantEntity
|
|
373
|
-
|
|
374
|
-
@Serial
|
|
375
|
-
private static final long serialVersionUID = 1L;
|
|
376
|
-
|
|
377
|
-
@TableId(value = "id")
|
|
378
|
-
private Long id;
|
|
379
|
-
|
|
380
|
-
private String xxxName;
|
|
381
|
-
|
|
382
|
-
private String status;
|
|
383
|
-
}
|
|
384
|
-
```
|
|
385
|
-
|
|
386
|
-
### 3. BO 业务对象
|
|
387
|
-
|
|
388
|
-
```java
|
|
389
|
-
package org.dromara.demo.domain.bo;
|
|
390
|
-
|
|
391
|
-
import io.github.linpeilie.annotations.AutoMapper;
|
|
392
|
-
import org.dromara.demo.domain.Xxx;
|
|
393
|
-
import org.dromara.common.core.validate.AddGroup;
|
|
394
|
-
import org.dromara.common.core.validate.EditGroup;
|
|
395
|
-
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
|
396
|
-
import lombok.Data;
|
|
397
|
-
import lombok.EqualsAndHashCode;
|
|
398
|
-
import jakarta.validation.constraints.*;
|
|
399
|
-
|
|
400
|
-
@Data
|
|
401
|
-
@EqualsAndHashCode(callSuper = true)
|
|
402
|
-
@AutoMapper(target = Xxx.class, reverseConvertGenerate = false) // ✅ 单数!
|
|
403
|
-
public class XxxBo extends BaseEntity {
|
|
404
|
-
|
|
405
|
-
@NotNull(message = "ID不能为空", groups = {EditGroup.class})
|
|
406
|
-
private Long id;
|
|
407
|
-
|
|
408
|
-
@NotBlank(message = "名称不能为空", groups = {AddGroup.class, EditGroup.class})
|
|
409
|
-
private String xxxName;
|
|
410
|
-
|
|
411
|
-
private String status;
|
|
412
|
-
}
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
### 4. VO 视图对象
|
|
416
|
-
|
|
417
|
-
```java
|
|
418
|
-
package org.dromara.demo.domain.vo;
|
|
419
|
-
|
|
420
|
-
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
|
|
421
|
-
import cn.idev.excel.annotation.ExcelProperty;
|
|
422
|
-
import io.github.linpeilie.annotations.AutoMapper;
|
|
423
|
-
import lombok.Data;
|
|
424
|
-
import org.dromara.demo.domain.Xxx;
|
|
425
|
-
import java.io.Serial;
|
|
426
|
-
import java.io.Serializable;
|
|
427
|
-
import java.util.Date;
|
|
428
|
-
|
|
429
|
-
@Data
|
|
430
|
-
@ExcelIgnoreUnannotated
|
|
431
|
-
@AutoMapper(target = Xxx.class)
|
|
432
|
-
public class XxxVo implements Serializable {
|
|
433
|
-
|
|
434
|
-
@Serial
|
|
435
|
-
private static final long serialVersionUID = 1L;
|
|
436
|
-
|
|
437
|
-
@ExcelProperty(value = "ID")
|
|
438
|
-
private Long id;
|
|
439
|
-
|
|
440
|
-
@ExcelProperty(value = "名称")
|
|
441
|
-
private String xxxName;
|
|
442
|
-
|
|
443
|
-
@ExcelProperty(value = "状态")
|
|
444
|
-
private String status;
|
|
445
|
-
|
|
446
|
-
@ExcelProperty(value = "创建时间")
|
|
447
|
-
private Date createTime;
|
|
448
|
-
}
|
|
449
|
-
```
|
|
450
|
-
|
|
451
|
-
### 5. Mapper 接口
|
|
452
|
-
|
|
453
|
-
```java
|
|
454
|
-
package org.dromara.demo.mapper;
|
|
455
|
-
|
|
456
|
-
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
457
|
-
import org.dromara.demo.domain.Xxx;
|
|
458
|
-
import org.dromara.demo.domain.vo.XxxVo;
|
|
459
|
-
|
|
460
|
-
public interface XxxMapper extends BaseMapperPlus<Xxx, XxxVo> {
|
|
461
|
-
// ✅ 继承 BaseMapperPlus,已提供 selectVoById、selectVoPage 等方法
|
|
462
|
-
}
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
### 6. Controller 控制器
|
|
466
|
-
|
|
467
|
-
```java
|
|
468
|
-
package org.dromara.demo.controller;
|
|
469
|
-
|
|
470
|
-
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
471
|
-
import jakarta.servlet.http.HttpServletResponse;
|
|
472
|
-
import jakarta.validation.constraints.*;
|
|
473
|
-
import lombok.RequiredArgsConstructor;
|
|
474
|
-
import org.dromara.common.core.domain.R;
|
|
475
|
-
import org.dromara.common.core.validate.AddGroup;
|
|
476
|
-
import org.dromara.common.core.validate.EditGroup;
|
|
477
|
-
import org.dromara.common.excel.utils.ExcelUtil;
|
|
478
|
-
import org.dromara.common.log.annotation.Log;
|
|
479
|
-
import org.dromara.common.log.enums.BusinessType;
|
|
480
|
-
import org.dromara.common.mybatis.core.page.PageQuery;
|
|
481
|
-
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
482
|
-
import org.dromara.common.web.core.BaseController;
|
|
483
|
-
import org.dromara.demo.domain.bo.XxxBo;
|
|
484
|
-
import org.dromara.demo.domain.vo.XxxVo;
|
|
485
|
-
import org.dromara.demo.service.IXxxService;
|
|
486
|
-
import org.springframework.validation.annotation.Validated;
|
|
487
|
-
import org.springframework.web.bind.annotation.*;
|
|
488
|
-
import java.util.List;
|
|
489
|
-
|
|
490
|
-
@Validated
|
|
491
|
-
@RequiredArgsConstructor
|
|
492
|
-
@RestController
|
|
493
|
-
@RequestMapping("/demo/xxx")
|
|
494
|
-
public class XxxController extends BaseController { // ✅ 继承 BaseController
|
|
495
|
-
|
|
496
|
-
private final IXxxService xxxService;
|
|
497
|
-
|
|
498
|
-
@SaCheckPermission("demo:xxx:list")
|
|
499
|
-
@GetMapping("/list") // ✅ 标准路径
|
|
500
|
-
public TableDataInfo<XxxVo> list(XxxBo bo, PageQuery pageQuery) {
|
|
501
|
-
return xxxService.queryPageList(bo, pageQuery);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
@SaCheckPermission("demo:xxx:query")
|
|
505
|
-
@GetMapping("/{id}") // ✅ 标准路径
|
|
506
|
-
public R<XxxVo> getInfo(@NotNull(message = "ID不能为空") @PathVariable Long id) {
|
|
507
|
-
return R.ok(xxxService.queryById(id));
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
@SaCheckPermission("demo:xxx:add")
|
|
511
|
-
@Log(title = "XXX管理", businessType = BusinessType.INSERT)
|
|
512
|
-
@PostMapping // ✅ 空路径
|
|
513
|
-
public R<Void> add(@Validated(AddGroup.class) @RequestBody XxxBo bo) {
|
|
514
|
-
return toAjax(xxxService.insertByBo(bo));
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
@SaCheckPermission("demo:xxx:edit")
|
|
518
|
-
@Log(title = "XXX管理", businessType = BusinessType.UPDATE)
|
|
519
|
-
@PutMapping // ✅ 空路径
|
|
520
|
-
public R<Void> edit(@Validated(EditGroup.class) @RequestBody XxxBo bo) {
|
|
521
|
-
return toAjax(xxxService.updateByBo(bo));
|
|
522
|
-
}
|
|
523
|
-
|
|
524
|
-
@SaCheckPermission("demo:xxx:remove")
|
|
525
|
-
@Log(title = "XXX管理", businessType = BusinessType.DELETE)
|
|
526
|
-
@DeleteMapping("/{ids}") // ✅ 标准路径
|
|
527
|
-
public R<Void> remove(@NotEmpty(message = "ID不能为空") @PathVariable Long[] ids) {
|
|
528
|
-
return toAjax(xxxService.deleteByIds(List.of(ids)));
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
@SaCheckPermission("demo:xxx:export")
|
|
532
|
-
@Log(title = "XXX管理", businessType = BusinessType.EXPORT)
|
|
533
|
-
@PostMapping("/export")
|
|
534
|
-
public void export(XxxBo bo, HttpServletResponse response) {
|
|
535
|
-
List<XxxVo> list = xxxService.queryList(bo);
|
|
536
|
-
ExcelUtil.exportExcel(list, "XXX数据", XxxVo.class, response);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
---
|
|
542
|
-
|
|
543
|
-
## 🤖 AI 写代码前强制检查清单
|
|
544
|
-
|
|
545
|
-
**在输出代码给用户之前,必须确认:**
|
|
546
|
-
|
|
547
|
-
### 架构设计检查
|
|
548
|
-
|
|
549
|
-
- [ ] **包名是否是 `org.dromara.*`**?(不是 `com.ruoyi.*` 或 `plus.ruoyi.*`)
|
|
550
|
-
- [ ] **Service 是否不继承任何基类**?(只 implements 接口)
|
|
551
|
-
- [ ] **Service 是否直接注入 Mapper**?(无 DAO 层)
|
|
552
|
-
- [ ] **buildQueryWrapper() 是否在 Service 层**?
|
|
553
|
-
- [ ] **Entity 是否继承 `TenantEntity`**?
|
|
554
|
-
- [ ] **BO 是否使用 `@AutoMapper`(单数)**?
|
|
555
|
-
- [ ] **Mapper 是否继承 `BaseMapperPlus<Entity, VO>`**?
|
|
556
|
-
- [ ] **Controller 是否继承 `BaseController`**?
|
|
557
|
-
|
|
558
|
-
### 代码质量检查
|
|
559
|
-
|
|
560
|
-
- [ ] **是否使用了完整包名引用**?(必须先 import)
|
|
561
|
-
- [ ] **是否使用了 `Map<String, Object>` 传递业务数据**?(必须用 VO)
|
|
562
|
-
- [ ] **是否使用了 `MapstructUtils.convert()` 转换对象**?(禁止 BeanUtils)
|
|
563
|
-
- [ ] **API 路径是否使用标准 RESTful 格式**?(/list、/{id})
|
|
564
|
-
- [ ] **主键是否使用雪花 ID**?(无 AUTO_INCREMENT)
|
|
565
|
-
|
|
566
|
-
### 🔴 如果任何一项检查失败,必须修正后再输出!
|
|
567
|
-
|
|
568
|
-
---
|
|
569
|
-
|
|
570
|
-
## 📁 项目结构
|
|
571
|
-
|
|
572
|
-
```
|
|
573
|
-
RuoYi-Vue-Plus/
|
|
574
|
-
├── plus-ui/ # 🖥️ PC 端前端(如存在)
|
|
575
|
-
│ ├── src/
|
|
576
|
-
│ │ ├── api/ # API 接口定义
|
|
577
|
-
│ │ ├── components/ # 公共组件
|
|
578
|
-
│ │ ├── views/ # 页面视图
|
|
579
|
-
│ │ └── store/ # Pinia 状态管理
|
|
580
|
-
│ └── package.json
|
|
581
|
-
│
|
|
582
|
-
├── ruoyi-admin/ # 后端启动入口
|
|
583
|
-
│ └── src/main/resources/
|
|
584
|
-
│ ├── application.yml # 主配置
|
|
585
|
-
│ └── application-dev.yml # 开发环境配置
|
|
586
|
-
│
|
|
587
|
-
├── ruoyi-common/ # 通用工具模块(24个子模块)
|
|
588
|
-
│ ├── ruoyi-common-core/ # 核心工具(MapstructUtils, StringUtils)
|
|
589
|
-
│ ├── ruoyi-common-mybatis/ # MyBatis-Plus 扩展(BaseMapperPlus)
|
|
590
|
-
│ ├── ruoyi-common-tenant/ # 多租户(TenantEntity)
|
|
591
|
-
│ └── ... # 其他模块
|
|
592
|
-
│
|
|
593
|
-
├── ruoyi-modules/ # 业务功能模块
|
|
594
|
-
│ ├── ruoyi-system/ # 系统管理模块(sys_*)
|
|
595
|
-
│ ├── ruoyi-demo/ # 演示模块(test_*)⭐ 参考实现
|
|
596
|
-
│ ├── ruoyi-generator/ # 代码生成器
|
|
597
|
-
│ ├── ruoyi-job/ # 定时任务(SnailJob)
|
|
598
|
-
│ └── ruoyi-workflow/ # 工作流(WarmFlow)
|
|
599
|
-
│
|
|
600
|
-
├── script/sql/ # 数据库脚本
|
|
601
|
-
│ └── ry_vue_5.X.sql # 系统表初始化
|
|
602
|
-
│
|
|
603
|
-
├── .claude/ # Claude AI 配置
|
|
604
|
-
│ ├── skills/ # 技能库
|
|
605
|
-
│ └── docs/ # 开发文档
|
|
606
|
-
│
|
|
607
|
-
└── pom.xml # Maven 项目配置
|
|
608
|
-
```
|
|
609
|
-
|
|
610
|
-
> 💡 **注意**:如果 `plus-ui/` 目录不存在,说明当前是纯后端项目,前端代码需从官方仓库单独获取。
|
|
611
|
-
|
|
612
|
-
---
|
|
613
|
-
|
|
614
|
-
## 📚 参考实现
|
|
615
|
-
|
|
616
|
-
开发新功能时,请参考 `ruoyi-demo` 模块的 TestDemo 实现:
|
|
617
|
-
|
|
618
|
-
| 类型 | 参考文件 |
|
|
619
|
-
|------|---------|
|
|
620
|
-
| Entity | `org.dromara.demo.domain.TestDemo` |
|
|
621
|
-
| BO | `org.dromara.demo.domain.bo.TestDemoBo` |
|
|
622
|
-
| VO | `org.dromara.demo.domain.vo.TestDemoVo` |
|
|
623
|
-
| Service | `org.dromara.demo.service.impl.TestDemoServiceImpl` |
|
|
624
|
-
| Mapper | `org.dromara.demo.mapper.TestDemoMapper` |
|
|
625
|
-
| Controller | `org.dromara.demo.controller.TestDemoController` |
|
|
626
|
-
|
|
627
|
-
---
|
|
628
|
-
|
|
629
|
-
## 📖 深度参考(按需查阅)
|
|
630
|
-
|
|
631
|
-
开发遇到问题时查阅对应指南:
|
|
632
|
-
|
|
633
|
-
| 文档 | 位置 | 用途 |
|
|
634
|
-
|------|------|------|
|
|
635
|
-
| 后端开发指南 | `.claude/docs/后端开发指南.md` | 架构理解、业务开发 |
|
|
636
|
-
| 前端开发指南 | `.claude/docs/前端开发指南.md` | 后端与前端协作规范 |
|
|
637
|
-
| 工作流开发指南 | `.claude/docs/工作流开发指南.md` | WarmFlow 集成 |
|
|
638
|
-
| 工具类使用指南 | `.claude/docs/工具类使用指南.md` | 工具类完整用法 |
|
|
639
|
-
| 数据库设计规范 | `.claude/docs/数据库设计规范.md` | 表设计、索引优化 |
|
|
640
|
-
|
|
641
162
|
---
|
|
642
163
|
|
|
643
164
|
## 快速命令
|
|
@@ -652,20 +173,8 @@ RuoYi-Vue-Plus/
|
|
|
652
173
|
|
|
653
174
|
---
|
|
654
175
|
|
|
655
|
-
##
|
|
656
|
-
|
|
657
|
-
**三层架构**:Controller → Service → Mapper(**无 DAO 层**)
|
|
658
|
-
|
|
659
|
-
**包名规范**:`org.dromara.*`
|
|
176
|
+
## 🤝 维护与贡献 Skills
|
|
660
177
|
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
**BO 注解**:`@AutoMapper`(单数)
|
|
664
|
-
|
|
665
|
-
**主键策略**:雪花 ID
|
|
666
|
-
|
|
667
|
-
**RESTful 路径**:`/list`、`/{id}`、`/`、`/{ids}`
|
|
668
|
-
|
|
669
|
-
---
|
|
178
|
+
> 团队成员可以在本地修改 Skills 并将改动贡献回框架
|
|
670
179
|
|
|
671
|
-
|
|
180
|
+
详见 [CONTRIBUTING.md](./CONTRIBUTING.md)
|