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
@@ -0,0 +1,510 @@
1
+ ---
2
+ name: leniu-java-code-style
3
+ description: |
4
+ leniu-tengyun-core 项目代码风格和命名规范。当编写或生成 Java 代码时使用此 skill,适用于所有 Java 类的命名和风格规范。
5
+
6
+ 触发场景:
7
+ - 编写 Java 类时的命名规范(类名、方法名、变量名)
8
+ - 代码风格检查(注解使用、依赖注入方式)
9
+ - 包结构规范设计
10
+ - Controller/Service/Entity/VO/DTO 等各类型 Java 类规范
11
+
12
+ 触发词:代码风格、命名规范、类命名、方法命名、包结构、注解使用、依赖注入、驼峰命名、代码规范
13
+ ---
14
+
15
+ # leniu-tengyun-core 代码风格规范
16
+
17
+ ## 项目特征
18
+
19
+ | 特征 | 说明 |
20
+ |------|------|
21
+ | **包名前缀** | `net.xnzn.core.*` |
22
+ | **JDK 版本** | 21 |
23
+ | **Validation** | `jakarta.validation.*` |
24
+ | **工具库** | Hutool (CollUtil, ObjectUtil, BeanUtil) |
25
+ | **异常类** | `LeException` |
26
+ | **国际化** | `I18n` |
27
+ | **租户上下文** | `TenantContextHolder` |
28
+ | **分页组件** | PageHelper (PageMethod) |
29
+
30
+ ## 包结构规范
31
+
32
+ ```
33
+ net.xnzn.core
34
+ ├── [module]/
35
+ │ ├── controller/ # 控制器层
36
+ │ ├── service/ # 服务层
37
+ │ │ └── impl/ # 服务实现
38
+ │ ├── mapper/ # 数据访问层(含 XML)
39
+ │ ├── model/ # 数据模型
40
+ │ │ ├── entity/ # 实体类
41
+ │ │ └── po/ # 持久化对象
42
+ │ ├── vo/ # 视图对象(返回前端)
43
+ │ ├── dto/ # 数据传输对象(服务间/MQ)
44
+ │ ├── param/ # 请求参数对象
45
+ │ ├── constants/ # 常量
46
+ │ ├── enums/ # 枚举
47
+ │ ├── api/ # 对外 API 接口
48
+ │ ├── config/ # 配置类
49
+ │ ├── mq/ # 消息队列监听器
50
+ │ ├── task/ # 定时任务
51
+ │ ├── handle/ # 业务处理器(策略模式)
52
+ │ └── util/ # 工具类
53
+ ```
54
+
55
+ ## 类命名规范
56
+
57
+ | 类型 | 命名格式 | 示例 |
58
+ |------|----------|------|
59
+ | Controller | `XxxController` | `OrderController` |
60
+ | Service 接口 | `XxxService` | `OrderService` |
61
+ | Service 实现 | `XxxServiceImpl` | `OrderServiceImpl` |
62
+ | Mapper | `XxxMapper` | `OrderMapper` |
63
+ | Entity | `Xxx` 或 `XxxEntity` | `Order` |
64
+ | PO | `XxxPO` | `OrderPO` |
65
+ | VO | `XxxVO` | `OrderVO` |
66
+ | DTO | `XxxDTO` | `OrderDTO` |
67
+ | Param | `XxxParam` / `XxxQueryParam` | `OrderQueryParam` |
68
+ | Enum | `XxxEnum` | `OrderStatusEnum` |
69
+ | Converter | `XxxConverter` | `OrderConverter` |
70
+ | Handler | `XxxHandler` | `OrderHandler` |
71
+ | Api | `XxxApi` | `OrderApi` |
72
+
73
+ ## 方法命名规范
74
+
75
+ | 操作 | Service 方法 | Mapper 方法 | Controller URL |
76
+ |------|-------------|-------------|---------------|
77
+ | 分页查询 | `pageXxx` | `pageXxx` | `GET /list` |
78
+ | 查询列表 | `listXxx` | `listXxx` | - |
79
+ | 查询单个 | `getXxx` | `selectById` | `GET /{id}` |
80
+ | 新增 | `save` / `add` / `create` | `insert` | `POST /` |
81
+ | 更新 | `update` / `modify` | `updateById` | `PUT /` |
82
+ | 删除 | `delete` / `remove` | `deleteById` | `DELETE /{ids}` |
83
+ | 统计 | `count` / `summary` | `selectCount` | - |
84
+ | 导出 | `export` | - | `POST /export` |
85
+ | 同步 | `sync` | - | - |
86
+
87
+ ## Controller 层模板
88
+
89
+ ```java
90
+ import io.swagger.annotations.Api;
91
+ import io.swagger.annotations.ApiOperation;
92
+ import lombok.extern.slf4j.Slf4j;
93
+ import net.xnzn.core.common.exception.LeException;
94
+ import net.xnzn.core.common.response.LeResponse;
95
+ import net.xnzn.core.order.param.OrderQueryParam;
96
+ import net.xnzn.core.order.service.OrderService;
97
+ import net.xnzn.core.order.vo.OrderVO;
98
+ import org.springframework.beans.factory.annotation.Autowired;
99
+ import org.springframework.web.bind.annotation.*;
100
+
101
+ import jakarta.validation.Valid;
102
+
103
+ @Slf4j
104
+ @RequiresAuthentication
105
+ @RestController
106
+ @RequestMapping("/api/order")
107
+ @Api(value = "订单管理", tags = "订单管理")
108
+ public class OrderController {
109
+
110
+ @Autowired
111
+ private OrderService orderService;
112
+
113
+ @ApiOperation(value = "分页查询订单")
114
+ @PostMapping("/list")
115
+ public LeResponse<Page<OrderVO>> list(@Valid @RequestBody OrderQueryParam param) {
116
+ return LeResponse.success(orderService.pageList(param));
117
+ }
118
+
119
+ @ApiOperation(value = "获取订单详情")
120
+ @GetMapping("/{id}")
121
+ public LeResponse<OrderVO> getById(@PathVariable Long id) {
122
+ return LeResponse.success(orderService.getById(id));
123
+ }
124
+
125
+ @ApiOperation(value = "创建订单")
126
+ @PostMapping("/")
127
+ public LeResponse<Long> create(@Valid @RequestBody OrderParam param) {
128
+ return LeResponse.success(orderService.create(param));
129
+ }
130
+
131
+ @ApiOperation(value = "更新订单")
132
+ @PutMapping("/")
133
+ public LeResponse<Boolean> update(@Valid @RequestBody OrderParam param) {
134
+ return LeResponse.success(orderService.update(param));
135
+ }
136
+
137
+ @ApiOperation(value = "删除订单")
138
+ @DeleteMapping("/{ids}")
139
+ public LeResponse<Boolean> delete(@PathVariable String ids) {
140
+ return LeResponse.success(orderService.delete(ids));
141
+ }
142
+ }
143
+ ```
144
+
145
+ **要点**:
146
+ - 统一使用 `@PostMapping`(部分查询也可以用 `@GetMapping`)
147
+ - 需要 `@RequiresAuthentication` 认证注解
148
+ - 使用 `LeResponse<T>` 封装返回结果
149
+ - 参数校验使用 `@Valid` 触发
150
+
151
+ ## Service 层模板
152
+
153
+ ```java
154
+ import cn.hutool.core.util.ObjectUtil;
155
+ import cn.hutool.core.bean.BeanUtil;
156
+ import lombok.extern.slf4j.Slf4j;
157
+ import net.xnzn.core.common.exception.LeException;
158
+ import net.xnzn.core.order.mapper.OrderMapper;
159
+ import net.xnzn.core.order.model.Order;
160
+ import net.xnzn.core.order.param.OrderParam;
161
+ import net.xnzn.core.order.vo.OrderVO;
162
+ import org.springframework.beans.factory.annotation.Autowired;
163
+ import org.springframework.stereotype.Service;
164
+ import org.springframework.transaction.annotation.Transactional;
165
+
166
+ import java.util.List;
167
+
168
+ @Slf4j
169
+ @Service
170
+ public class OrderServiceImpl implements OrderService {
171
+
172
+ @Autowired
173
+ private OrderMapper orderMapper;
174
+
175
+ @Autowired
176
+ @Lazy
177
+ private ProductService productService;
178
+
179
+ @Transactional(rollbackFor = Exception.class)
180
+ public Long create(OrderParam param) {
181
+ // 业务逻辑
182
+ Order order = BeanUtil.copyProperties(param, Order.class);
183
+ orderMapper.insert(order);
184
+ return order.getId();
185
+ }
186
+
187
+ public OrderVO getById(Long id) {
188
+ Order order = orderMapper.selectById(id);
189
+ if (ObjectUtil.isNull(order)) {
190
+ throw new LeException("订单不存在");
191
+ }
192
+ return BeanUtil.copyProperties(order, OrderVO.class);
193
+ }
194
+
195
+ public List<OrderVO> list(OrderQueryParam param) {
196
+ List<Order> orders = orderMapper.selectList(buildWrapper(param));
197
+ return BeanUtil.copyToList(orders, OrderVO.class);
198
+ }
199
+ }
200
+ ```
201
+
202
+ **要点**:
203
+ - 使用 `@Slf4j` 日志注解
204
+ - 循环依赖使用 `@Lazy`
205
+ - 事务使用 `@Transactional(rollbackFor = Exception.class)`
206
+ - 使用 Hutool 工具类:`BeanUtil`、`ObjectUtil`
207
+
208
+ ## Entity 实体类模板
209
+
210
+ ```java
211
+ import com.baomidou.mybatisplus.annotation.*;
212
+ import io.swagger.annotations.ApiModel;
213
+ import io.swagger.annotations.ApiModelProperty;
214
+ import lombok.Data;
215
+
216
+ import java.time.LocalDateTime;
217
+
218
+ @Data
219
+ @TableName(value = "order_table", autoResultMap = true)
220
+ public class Order {
221
+
222
+ @TableId
223
+ @ApiModelProperty(value = "订单ID")
224
+ private Long id;
225
+
226
+ @ApiModelProperty(value = "用户ID")
227
+ private Long userId;
228
+
229
+ @ApiModelProperty(value = "订单金额(分)")
230
+ private Long amount;
231
+
232
+ @ApiModelProperty(value = "删除标识(1-删除,2-正常)")
233
+ private Integer delFlag;
234
+
235
+ @TableField(fill = FieldFill.INSERT)
236
+ @ApiModelProperty(value = "创建人")
237
+ private String crby;
238
+
239
+ @TableField(fill = FieldFill.INSERT)
240
+ @ApiModelProperty(value = "创建时间")
241
+ private LocalDateTime crtime;
242
+
243
+ @TableField(fill = FieldFill.INSERT_UPDATE)
244
+ @ApiModelProperty(value = "更新人")
245
+ private String upby;
246
+
247
+ @TableField(fill = FieldFill.INSERT_UPDATE)
248
+ @ApiModelProperty(value = "更新时间")
249
+ private LocalDateTime uptime;
250
+ }
251
+ ```
252
+
253
+ **要点**:
254
+ - 使用 `@TableName` 指定表名
255
+ - 主键使用 `@TableId`
256
+ - 字段使用 `@TableField` 映射
257
+ - 审计字段:`delFlag`(1=删除,2=正常)、`crby`、`crtime`、`upby`、`uptime`
258
+
259
+ ## VO/DTO 类模板
260
+
261
+ ```java
262
+ import io.swagger.annotations.ApiModel;
263
+ import io.swagger.annotations.ApiModelProperty;
264
+ import jakarta.validation.constraints.*;
265
+ import lombok.Data;
266
+ import lombok.experimental.Accessors;
267
+
268
+ @Data
269
+ @ApiModel("订单信息")
270
+ @Accessors(chain = true)
271
+ public class OrderVO {
272
+
273
+ @ApiModelProperty("订单ID")
274
+ private Long id;
275
+
276
+ @ApiModelProperty("用户ID")
277
+ @NotNull(message = "用户ID不能为空")
278
+ private Long userId;
279
+
280
+ @ApiModelProperty("订单金额(元)")
281
+ @NotNull(message = "订单金额不能为空")
282
+ @DecimalMin(value = "0.01", message = "金额必须大于0.01")
283
+ private BigDecimal amount;
284
+
285
+ @ApiModelProperty("订单状态")
286
+ private Integer status;
287
+ }
288
+ ```
289
+
290
+ **要点**:
291
+ - 使用 `@ApiModel` 类注解
292
+ - 使用 `@ApiModelProperty` 字段注解
293
+ - 参数校验使用 `jakarta.validation.constraints.*` 注解
294
+ - 使用 `@Accessors(chain = true)` 支持链式调用
295
+
296
+ ## 枚举类模板
297
+
298
+ ```java
299
+ import lombok.AllArgsConstructor;
300
+ import lombok.Getter;
301
+
302
+ @Getter
303
+ @AllArgsConstructor
304
+ public enum OrderStatusEnum {
305
+
306
+ CREATED(1, "已创建"),
307
+ PAID(2, "已支付"),
308
+ COMPLETED(3, "已完成"),
309
+ CANCELLED(4, "已取消");
310
+
311
+ private final Integer key;
312
+ private final String desc;
313
+
314
+ public static OrderStatusEnum getByKey(Integer key) {
315
+ if (key == null) {
316
+ return null;
317
+ }
318
+ for (OrderStatusEnum status : values()) {
319
+ if (status.getKey().equals(key)) {
320
+ return status;
321
+ }
322
+ }
323
+ return null;
324
+ }
325
+
326
+ public static boolean isExistKey(Integer key) {
327
+ return getByKey(key) != null;
328
+ }
329
+ }
330
+ ```
331
+
332
+ **要点**:
333
+ - 使用 `@Getter` 和 `@AllArgsConstructor`
334
+ - 提供 `getByKey` 静态方法
335
+ - 提供 `isExistKey` 校验方法
336
+
337
+ ## 依赖注入规范
338
+
339
+ ```java
340
+ // 推荐:字段注入
341
+ @Autowired
342
+ private OrderService orderService;
343
+
344
+ // 解决循环依赖
345
+ @Resource
346
+ @Lazy
347
+ private ProductService productService;
348
+ ```
349
+
350
+ ## 异常处理
351
+
352
+ ```java
353
+ import net.xnzn.core.common.exception.LeException;
354
+ import net.xnzn.core.common.i18n.I18n;
355
+
356
+ // 简单异常
357
+ throw new LeException("订单不存在");
358
+
359
+ // 国际化异常
360
+ throw new LeException(I18n.getMessage("order.not.exists"));
361
+
362
+ // 带参数的国际化
363
+ throw new LeException(I18n.getMessage("order.status.invalid", status));
364
+ ```
365
+
366
+ ## Hutool 工具类速查
367
+
368
+ ```java
369
+ import cn.hutool.core.collection.CollUtil;
370
+ import cn.hutool.core.util.ObjectUtil;
371
+ import cn.hutool.core.util.StrUtil;
372
+ import cn.hutool.core.bean.BeanUtil;
373
+
374
+ // 集合操作
375
+ if (CollUtil.isEmpty(list)) {
376
+ throw new LeException("列表不能为空");
377
+ }
378
+ if (CollUtil.isNotEmpty(list)) {
379
+ // 处理列表
380
+ }
381
+
382
+ // 对象判空
383
+ if (ObjectUtil.isNull(user)) {
384
+ throw new LeException("用户不存在");
385
+ }
386
+ if (ObjectUtil.isNotNull(user)) {
387
+ // 处理用户
388
+ }
389
+
390
+ // 字符串操作
391
+ if (StrUtil.isBlank(name)) {
392
+ throw new LeException("名称不能为空");
393
+ }
394
+ String trimmed = StrUtil.trim(name);
395
+ String joined = StrUtil.join(",", list);
396
+
397
+ // 对象拷贝
398
+ TargetDTO target = BeanUtil.copyProperties(source, TargetDTO.class);
399
+ List<TargetDTO> targets = BeanUtil.copyToList(sources, TargetDTO.class);
400
+ ```
401
+
402
+ ## 常用注解
403
+
404
+ ### Jakarta Validation
405
+
406
+ **重要**:项目使用 JDK 21,必须使用 `jakarta.validation.constraints.*` 包
407
+
408
+ ```java
409
+ import jakarta.validation.Valid;
410
+ import jakarta.validation.constraints.*;
411
+ ```
412
+
413
+ - `@NotNull` - 不能为 null
414
+ - `@NotBlank` - 字符串不能为空
415
+ - `@NotEmpty` - 集合不能为空
416
+ - `@Valid` - 触发参数校验
417
+
418
+ ### Lombok
419
+
420
+ - `@Data` - 生成 getter/setter
421
+ - `@Slf4j` - 日志
422
+ - `@Builder` - 建造者模式
423
+ - `@AllArgsConstructor` - 全参构造
424
+ - `@Accessors(chain = true)` - 链式调用
425
+
426
+ ### MyBatis-Plus
427
+
428
+ - `@TableName` - 表名映射
429
+ - `@TableId` - 主键
430
+ - `@TableField` - 字段映射
431
+ - `@TableField(fill = FieldFill.INSERT)` - 插入时自动填充
432
+ - `@TableField(fill = FieldFill.INSERT_UPDATE)` - 更新时自动填充
433
+
434
+ ## 类注释规范
435
+
436
+ 推荐使用 JavaDoc 标准格式:
437
+
438
+ ```java
439
+ /**
440
+ * 类功能描述
441
+ *
442
+ * @author xujiajun
443
+ * @date 2026-02-20
444
+ */
445
+ public class OrderService {
446
+ // ...
447
+ }
448
+ ```
449
+
450
+ **说明**:
451
+ - `@author` 使用实际作者名称
452
+ - `@date` 使用代码创建日期(格式:`YYYY-MM-DD`)
453
+
454
+ ## 常见错误
455
+
456
+ ### 错误1:使用 RuoYi 的包名
457
+
458
+ ```java
459
+ // ❌ 错误:使用 RuoYi 的包名
460
+ package org.dromara.system.service;
461
+
462
+ // ✅ 正确:使用 leniu 的包名
463
+ package net.xnzn.core.order.service;
464
+ ```
465
+
466
+ ### 错误2:使用 javax.validation
467
+
468
+ ```java
469
+ // ❌ 错误:使用 javax.validation(JDK 21 应该用 jakarta)
470
+ import javax.validation.constraints.NotNull;
471
+
472
+ // ✅ 正确:使用 jakarta.validation
473
+ import jakarta.validation.constraints.NotNull;
474
+ ```
475
+
476
+ ### 错误3:使用 MapstructUtils
477
+
478
+ ```java
479
+ // ❌ 错误:使用 RuoYi 的工具类
480
+ import org.dromara.common.core.utils.MapstructUtils;
481
+ Target target = MapstructUtils.convert(source, Target.class);
482
+
483
+ // ✅ 正确:leniu 使用 Hutool
484
+ import cn.hutool.core.bean.BeanUtil;
485
+ Target target = BeanUtil.copyProperties(source, Target.class);
486
+ ```
487
+
488
+ ### 错误4:使用 LeException 不使用 I18n
489
+
490
+ ```java
491
+ // ❌ 不推荐:直接硬编码中文
492
+ throw new LeException("订单不存在");
493
+
494
+ // ✅ 推荐:使用国际化
495
+ throw new LeException(I18n.getMessage("order.not.exists"));
496
+ ```
497
+
498
+ ### 错误5:使用 RuoYi 的 ServiceException
499
+
500
+ ```java
501
+ // ❌ 错误:使用 RuoYi 的异常
502
+ import org.dromara.common.core.exception.ServiceException;
503
+
504
+ // ✅ 正确:使用 leniu 的异常
505
+ import net.xnzn.core.common.exception.LeException;
506
+ ```
507
+
508
+ ## 参考文档
509
+
510
+ 详见:[leniu-tengyun-core 源码](/Users/xujiajun/Developer/gongsi_proj/core/leniu-tengyun-core)