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