create-yss-spec 2.1.6 → 2.1.8

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 (266) hide show
  1. package/package.json +1 -1
  2. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  3. package/template/.agents/skills/yss-domain/SKILL.md +2 -2
  4. package/template/.agents/skills/yss-dto/SKILL.md +19 -4
  5. package/template/.agents/skills/yss-dto/agents/openai.yaml +1 -1
  6. package/template/.agents/skills/yss-dto/references/README.md +9 -2
  7. package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  8. package/template/.agents/skills/yss-mybatis/SKILL.md +1 -1
  9. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +18 -6
  10. package/template/.agents/skills/yss-openapi-governance/SKILL.md +11 -1
  11. package/template/.agents/skills/yss-repository/SKILL.md +2 -2
  12. package/template/.agents/skills/yss-router/references/boundaries.md +0 -3
  13. package/template/.agents/skills/yss-source-index/references/source-map-config.md +0 -2
  14. package/template/.agents/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  15. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  16. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  17. package/template/.claude/skills/yss-domain/SKILL.md +2 -2
  18. package/template/.claude/skills/yss-dto/SKILL.md +19 -4
  19. package/template/.claude/skills/yss-dto/agents/openai.yaml +1 -1
  20. package/template/.claude/skills/yss-dto/references/README.md +9 -2
  21. package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  22. package/template/.claude/skills/yss-mybatis/SKILL.md +1 -1
  23. package/template/.claude/skills/yss-openapi-draft-review/SKILL.md +18 -6
  24. package/template/.claude/skills/yss-openapi-governance/SKILL.md +11 -1
  25. package/template/.claude/skills/yss-repository/SKILL.md +2 -2
  26. package/template/.claude/skills/yss-router/references/boundaries.md +0 -3
  27. package/template/.claude/skills/yss-source-index/references/source-map-config.md +0 -2
  28. package/template/.claude/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  29. package/template/.claude/skills/yss-web-controller/SKILL.md +1 -1
  30. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  31. package/template/.codex/skills/yss-domain/SKILL.md +2 -2
  32. package/template/.codex/skills/yss-dto/SKILL.md +19 -4
  33. package/template/.codex/skills/yss-dto/agents/openai.yaml +1 -1
  34. package/template/.codex/skills/yss-dto/references/README.md +9 -2
  35. package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  36. package/template/.codex/skills/yss-mybatis/SKILL.md +1 -1
  37. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +18 -6
  38. package/template/.codex/skills/yss-openapi-governance/SKILL.md +11 -1
  39. package/template/.codex/skills/yss-repository/SKILL.md +2 -2
  40. package/template/.codex/skills/yss-router/references/boundaries.md +0 -3
  41. package/template/.codex/skills/yss-source-index/references/source-map-config.md +0 -2
  42. package/template/.codex/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  43. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  44. package/template/.github/workflows/template-node-tooling.yml +2 -0
  45. package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  46. package/template/.hermes/skills/yss-domain/SKILL.md +2 -2
  47. package/template/.hermes/skills/yss-dto/SKILL.md +19 -4
  48. package/template/.hermes/skills/yss-dto/agents/openai.yaml +1 -1
  49. package/template/.hermes/skills/yss-dto/references/README.md +9 -2
  50. package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  51. package/template/.hermes/skills/yss-mybatis/SKILL.md +1 -1
  52. package/template/.hermes/skills/yss-openapi-draft-review/SKILL.md +18 -6
  53. package/template/.hermes/skills/yss-openapi-governance/SKILL.md +11 -1
  54. package/template/.hermes/skills/yss-repository/SKILL.md +2 -2
  55. package/template/.hermes/skills/yss-router/references/boundaries.md +0 -3
  56. package/template/.hermes/skills/yss-source-index/references/source-map-config.md +0 -2
  57. package/template/.hermes/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  58. package/template/.hermes/skills/yss-web-controller/SKILL.md +1 -1
  59. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  60. package/template/.pi/skills/yss-domain/SKILL.md +2 -2
  61. package/template/.pi/skills/yss-dto/SKILL.md +19 -4
  62. package/template/.pi/skills/yss-dto/agents/openai.yaml +1 -1
  63. package/template/.pi/skills/yss-dto/references/README.md +9 -2
  64. package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  65. package/template/.pi/skills/yss-mybatis/SKILL.md +1 -1
  66. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +18 -6
  67. package/template/.pi/skills/yss-openapi-governance/SKILL.md +11 -1
  68. package/template/.pi/skills/yss-repository/SKILL.md +2 -2
  69. package/template/.pi/skills/yss-router/references/boundaries.md +0 -3
  70. package/template/.pi/skills/yss-source-index/references/source-map-config.md +0 -2
  71. package/template/.pi/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  72. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  73. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  74. package/template/.qoder/skills/yss-domain/SKILL.md +2 -2
  75. package/template/.qoder/skills/yss-dto/SKILL.md +19 -4
  76. package/template/.qoder/skills/yss-dto/agents/openai.yaml +1 -1
  77. package/template/.qoder/skills/yss-dto/references/README.md +9 -2
  78. package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  79. package/template/.qoder/skills/yss-mybatis/SKILL.md +1 -1
  80. package/template/.qoder/skills/yss-openapi-draft-review/SKILL.md +18 -6
  81. package/template/.qoder/skills/yss-openapi-governance/SKILL.md +11 -1
  82. package/template/.qoder/skills/yss-repository/SKILL.md +2 -2
  83. package/template/.qoder/skills/yss-router/references/boundaries.md +0 -3
  84. package/template/.qoder/skills/yss-source-index/references/source-map-config.md +0 -2
  85. package/template/.qoder/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  86. package/template/.qoder/skills/yss-web-controller/SKILL.md +1 -1
  87. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +1 -1
  88. package/template/.trae/skills/yss-domain/SKILL.md +2 -2
  89. package/template/.trae/skills/yss-dto/SKILL.md +19 -4
  90. package/template/.trae/skills/yss-dto/agents/openai.yaml +1 -1
  91. package/template/.trae/skills/yss-dto/references/README.md +9 -2
  92. package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +181 -0
  93. package/template/.trae/skills/yss-mybatis/SKILL.md +1 -1
  94. package/template/.trae/skills/yss-openapi-draft-review/SKILL.md +18 -6
  95. package/template/.trae/skills/yss-openapi-governance/SKILL.md +11 -1
  96. package/template/.trae/skills/yss-repository/SKILL.md +2 -2
  97. package/template/.trae/skills/yss-router/references/boundaries.md +0 -3
  98. package/template/.trae/skills/yss-source-index/references/source-map-config.md +0 -2
  99. package/template/.trae/skills/yss-source-index/scripts/refresh-yss-skill-index.mjs +1 -1
  100. package/template/.trae/skills/yss-web-controller/SKILL.md +1 -1
  101. package/template/CONTEXT.md +4 -0
  102. package/template/docs/api/templates/openapi-draft-review-checklist.md +6 -0
  103. package/template/scripts/lib/scenario-checks.mjs +21 -0
  104. package/template/scripts/lib/skill-supply-chain.mjs +1 -1
  105. package/template/scripts/verify-template +4 -2
  106. package/template/scripts/verify-yss-dto-openapi-profile +109 -0
  107. package/template/scripts/verify-yss-dto-openapi-scenarios +4 -0
  108. package/template/skills-lock.json +10 -55
  109. package/template/wiki/wiki/YSS/345/267/245/347/250/213/346/212/200/350/203/275/344/275/223/347/263/273.md +1 -1
  110. package/template/yss-public-skills.json +1 -7
  111. package/template.manifest.json +3 -1
  112. package/template.snapshot.json +4 -4
  113. package/template/.agents/skills/yss-db2mybatis/SKILL.md +0 -95
  114. package/template/.agents/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  115. package/template/.agents/skills/yss-db2mybatis/assets/$.java +0 -19
  116. package/template/.agents/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  117. package/template/.agents/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  118. package/template/.agents/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  119. package/template/.agents/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  120. package/template/.agents/skills/yss-db2mybatis/assets/po.java.template +0 -18
  121. package/template/.agents/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  122. package/template/.agents/skills/yss-db2mybatis/config/metadata.json +0 -334
  123. package/template/.agents/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  124. package/template/.agents/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  125. package/template/.agents/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  126. package/template/.agents/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  127. package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  128. package/template/.agents/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  129. package/template/.agents/skills/yss-valuation/SKILL.md +0 -40
  130. package/template/.agents/skills/yss-valuation/agents/openai.yaml +0 -4
  131. package/template/.agents/skills/yss-valuation/references/source-index.md +0 -37
  132. package/template/.agents/skills/yss-variable/SKILL.md +0 -47
  133. package/template/.agents/skills/yss-variable/agents/openai.yaml +0 -4
  134. package/template/.agents/skills/yss-variable/references/source-index.md +0 -32
  135. package/template/.claude/skills/yss-db2mybatis/SKILL.md +0 -95
  136. package/template/.claude/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  137. package/template/.claude/skills/yss-db2mybatis/assets/$.java +0 -19
  138. package/template/.claude/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  139. package/template/.claude/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  140. package/template/.claude/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  141. package/template/.claude/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  142. package/template/.claude/skills/yss-db2mybatis/assets/po.java.template +0 -18
  143. package/template/.claude/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  144. package/template/.claude/skills/yss-db2mybatis/config/metadata.json +0 -334
  145. package/template/.claude/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  146. package/template/.claude/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  147. package/template/.claude/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  148. package/template/.claude/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  149. package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  150. package/template/.claude/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  151. package/template/.claude/skills/yss-valuation/SKILL.md +0 -40
  152. package/template/.claude/skills/yss-valuation/agents/openai.yaml +0 -4
  153. package/template/.claude/skills/yss-valuation/references/source-index.md +0 -37
  154. package/template/.claude/skills/yss-variable/SKILL.md +0 -47
  155. package/template/.claude/skills/yss-variable/agents/openai.yaml +0 -4
  156. package/template/.claude/skills/yss-variable/references/source-index.md +0 -32
  157. package/template/.codex/skills/yss-db2mybatis/SKILL.md +0 -95
  158. package/template/.codex/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  159. package/template/.codex/skills/yss-db2mybatis/assets/$.java +0 -19
  160. package/template/.codex/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  161. package/template/.codex/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  162. package/template/.codex/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  163. package/template/.codex/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  164. package/template/.codex/skills/yss-db2mybatis/assets/po.java.template +0 -18
  165. package/template/.codex/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  166. package/template/.codex/skills/yss-db2mybatis/config/metadata.json +0 -334
  167. package/template/.codex/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  168. package/template/.codex/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  169. package/template/.codex/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  170. package/template/.codex/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  171. package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  172. package/template/.codex/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  173. package/template/.codex/skills/yss-valuation/SKILL.md +0 -40
  174. package/template/.codex/skills/yss-valuation/agents/openai.yaml +0 -4
  175. package/template/.codex/skills/yss-valuation/references/source-index.md +0 -37
  176. package/template/.codex/skills/yss-variable/SKILL.md +0 -47
  177. package/template/.codex/skills/yss-variable/agents/openai.yaml +0 -4
  178. package/template/.codex/skills/yss-variable/references/source-index.md +0 -32
  179. package/template/.hermes/skills/yss-db2mybatis/SKILL.md +0 -95
  180. package/template/.hermes/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  181. package/template/.hermes/skills/yss-db2mybatis/assets/$.java +0 -19
  182. package/template/.hermes/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  183. package/template/.hermes/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  184. package/template/.hermes/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  185. package/template/.hermes/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  186. package/template/.hermes/skills/yss-db2mybatis/assets/po.java.template +0 -18
  187. package/template/.hermes/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  188. package/template/.hermes/skills/yss-db2mybatis/config/metadata.json +0 -334
  189. package/template/.hermes/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  190. package/template/.hermes/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  191. package/template/.hermes/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  192. package/template/.hermes/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  193. package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  194. package/template/.hermes/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  195. package/template/.hermes/skills/yss-valuation/SKILL.md +0 -40
  196. package/template/.hermes/skills/yss-valuation/agents/openai.yaml +0 -4
  197. package/template/.hermes/skills/yss-valuation/references/source-index.md +0 -37
  198. package/template/.hermes/skills/yss-variable/SKILL.md +0 -47
  199. package/template/.hermes/skills/yss-variable/agents/openai.yaml +0 -4
  200. package/template/.hermes/skills/yss-variable/references/source-index.md +0 -32
  201. package/template/.pi/skills/yss-db2mybatis/SKILL.md +0 -95
  202. package/template/.pi/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  203. package/template/.pi/skills/yss-db2mybatis/assets/$.java +0 -19
  204. package/template/.pi/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  205. package/template/.pi/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  206. package/template/.pi/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  207. package/template/.pi/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  208. package/template/.pi/skills/yss-db2mybatis/assets/po.java.template +0 -18
  209. package/template/.pi/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  210. package/template/.pi/skills/yss-db2mybatis/config/metadata.json +0 -334
  211. package/template/.pi/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  212. package/template/.pi/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  213. package/template/.pi/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  214. package/template/.pi/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  215. package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  216. package/template/.pi/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  217. package/template/.pi/skills/yss-valuation/SKILL.md +0 -40
  218. package/template/.pi/skills/yss-valuation/agents/openai.yaml +0 -4
  219. package/template/.pi/skills/yss-valuation/references/source-index.md +0 -37
  220. package/template/.pi/skills/yss-variable/SKILL.md +0 -47
  221. package/template/.pi/skills/yss-variable/agents/openai.yaml +0 -4
  222. package/template/.pi/skills/yss-variable/references/source-index.md +0 -32
  223. package/template/.qoder/skills/yss-db2mybatis/SKILL.md +0 -95
  224. package/template/.qoder/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  225. package/template/.qoder/skills/yss-db2mybatis/assets/$.java +0 -19
  226. package/template/.qoder/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  227. package/template/.qoder/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  228. package/template/.qoder/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  229. package/template/.qoder/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  230. package/template/.qoder/skills/yss-db2mybatis/assets/po.java.template +0 -18
  231. package/template/.qoder/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  232. package/template/.qoder/skills/yss-db2mybatis/config/metadata.json +0 -334
  233. package/template/.qoder/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  234. package/template/.qoder/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  235. package/template/.qoder/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  236. package/template/.qoder/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  237. package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  238. package/template/.qoder/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  239. package/template/.qoder/skills/yss-valuation/SKILL.md +0 -40
  240. package/template/.qoder/skills/yss-valuation/agents/openai.yaml +0 -4
  241. package/template/.qoder/skills/yss-valuation/references/source-index.md +0 -37
  242. package/template/.qoder/skills/yss-variable/SKILL.md +0 -47
  243. package/template/.qoder/skills/yss-variable/agents/openai.yaml +0 -4
  244. package/template/.qoder/skills/yss-variable/references/source-index.md +0 -32
  245. package/template/.trae/skills/yss-db2mybatis/SKILL.md +0 -95
  246. package/template/.trae/skills/yss-db2mybatis/agents/openai.yaml +0 -5
  247. package/template/.trae/skills/yss-db2mybatis/assets/$.java +0 -19
  248. package/template/.trae/skills/yss-db2mybatis/assets/convertor.java.template +0 -22
  249. package/template/.trae/skills/yss-db2mybatis/assets/domain_gateway.java.template +0 -45
  250. package/template/.trae/skills/yss-db2mybatis/assets/domain_model.java.template +0 -16
  251. package/template/.trae/skills/yss-db2mybatis/assets/gateway_impl.java.template +0 -62
  252. package/template/.trae/skills/yss-db2mybatis/assets/po.java.template +0 -18
  253. package/template/.trae/skills/yss-db2mybatis/assets/repository.java.template +0 -7
  254. package/template/.trae/skills/yss-db2mybatis/config/metadata.json +0 -334
  255. package/template/.trae/skills/yss-db2mybatis/config/temp_datasource.json +0 -12
  256. package/template/.trae/skills/yss-db2mybatis/references/datasource-config.example.json +0 -46
  257. package/template/.trae/skills/yss-db2mybatis/references/project-convention.example.json +0 -14
  258. package/template/.trae/skills/yss-db2mybatis/references/type-mapping.json +0 -31
  259. package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.mjs +0 -145
  260. package/template/.trae/skills/yss-db2mybatis/scripts/db2mybatis.test.mjs +0 -32
  261. package/template/.trae/skills/yss-valuation/SKILL.md +0 -40
  262. package/template/.trae/skills/yss-valuation/agents/openai.yaml +0 -4
  263. package/template/.trae/skills/yss-valuation/references/source-index.md +0 -37
  264. package/template/.trae/skills/yss-variable/SKILL.md +0 -47
  265. package/template/.trae/skills/yss-variable/agents/openai.yaml +0 -4
  266. package/template/.trae/skills/yss-variable/references/source-index.md +0 -32
@@ -1,32 +0,0 @@
1
- import assert from 'node:assert/strict';
2
- import fs from 'node:fs';
3
- import os from 'node:os';
4
- import path from 'node:path';
5
- import { spawnSync } from 'node:child_process';
6
- import test from 'node:test';
7
-
8
- const skillRoot = path.resolve(import.meta.dirname, '..');
9
- const script = path.join(skillRoot, 'scripts', 'db2mybatis.mjs');
10
- const run = (args, cwd = process.cwd()) => spawnSync(process.execPath, [script, ...args], { cwd, encoding: 'utf8' });
11
- const temp = () => fs.mkdtempSync(path.join(os.tmpdir(), 'yss-db2mybatis-node-'));
12
- const scaffoldArgs = (root, metadata, extra = []) => ['scaffold', '--skill-root', skillRoot, '--metadata-file', metadata, '--base-package', 'com.yss.demo', '--domain-segment', 'example', '--domain-java-root', path.join(root, 'domain'), '--infra-java-root', path.join(root, 'infra'), ...extra];
13
-
14
- test('DDL 转 metadata,并保留主键、类型与注释', () => {
15
- const root = temp(); const metadata = path.join(root, 'metadata.json');
16
- const result = run(['ddl2metadata', '--ddl-sql', "CREATE TABLE t_order (id bigint NOT NULL COMMENT '主键', amount decimal(10,2), PRIMARY KEY (id)) COMMENT='订单';", '--db-type', 'mysql', '--database', 'demo', '--output', metadata]);
17
- assert.equal(result.status, 0, result.stderr); const parsed = JSON.parse(fs.readFileSync(metadata, 'utf8'));
18
- assert.equal(parsed.tables[0].table_name, 't_order'); assert.deepEqual(parsed.tables[0].primary_keys, ['id']); assert.equal(parsed.tables[0].columns[1].sql_type, 'decimal(10,2)');
19
- });
20
-
21
- test('scaffold dry-run 不写文件,正常生成拒绝既有目标', () => {
22
- const root = temp(); const metadata = path.join(root, 'metadata.json');
23
- fs.writeFileSync(metadata, JSON.stringify({ tables: [{ table_name: 't_order', table_comment: '订单', primary_keys: ['id'], columns: [{ name: 'id', sql_type: 'bigint', primary: true, nullable: false, auto_increment: false }], indexes: [], foreign_keys: [] }] }));
24
- const dryRun = run(scaffoldArgs(root, metadata, ['--dry-run'])); assert.equal(dryRun.status, 0, dryRun.stderr); assert.match(dryRun.stdout, /planned:/); assert.equal(fs.existsSync(path.join(root, 'domain')), false);
25
- const generated = run(scaffoldArgs(root, metadata)); assert.equal(generated.status, 0, generated.stderr); const again = run(scaffoldArgs(root, metadata)); assert.equal(again.status, 2); assert.match(again.stderr, /文件已存在/);
26
- });
27
-
28
- test('非法参数和缺失数据库驱动均以退出码 2 失败', () => {
29
- const invalid = run(['ddl2metadata', '--output', path.join(temp(), 'out.json')]); assert.equal(invalid.status, 2); assert.match(invalid.stderr, /请提供 --ddl-file 或 --ddl-sql/);
30
- const unknown = run(['ddl2metadata', '--ddl-sql', 'CREATE TABLE t_x (id bigint)', '--output', path.join(temp(), 'out.json'), '--unexpected', 'x']); assert.equal(unknown.status, 2); assert.match(unknown.stderr, /未知参数/);
31
- const missing = run(['extract', '--db-type', 'mysql', '--host', '127.0.0.1', '--port', '3306', '--user', 'u', '--password', 'p', '--database', 'd', '--output', path.join(temp(), 'out.json')], temp()); assert.equal(missing.status, 2); assert.match(missing.stderr, /YSS_DB2MYBATIS_DRIVER_ROOT/);
32
- });
@@ -1,40 +0,0 @@
1
- ---
2
- name: yss-valuation
3
- description: Use when 用于 YSS valuation 组件、Excel/Csv 文件读取、Excel2SqlDDL、ImportFileJob、估值文件导入和区域条件解析排障。
4
- ---
5
-
6
- # yss-valuation
7
-
8
- Use this skill for YSS 估值导入组件. Keep implementation grounded in the local project and resolvable YSS backend component source.
9
-
10
- 中文说明:本技能用于 YSS 估值导入组件。执行时优先读取源码索引,避免凭记忆猜类名、配置项或接入方式。
11
-
12
- ## Source Index First
13
-
14
- - Backend source location is environment-specific; resolve it with `yss-source-index/references/source-location.md`.
15
- - Generated index: `references/source-index.md`
16
- - Component path hints: `yss-microservice-components/yss-component-valuation`
17
-
18
- Read `references/source-index.md` as a path-hint index whenever the task depends on exact modules, annotations, auto configuration, properties, controllers, clients, repositories, DTOs, handlers, or troubleshooting.
19
-
20
- ## Workflow
21
-
22
- 1. Identify whether the task is valuation file import, Excel/CSV reading, Excel-to-DDL generation, table relationship extraction, or import job troubleshooting.
23
- 2. Read `references/source-index.md`, then inspect `Excel2SqlDDL`, `Excel2TableRelationship`, `ImportFileJob`, `FileReader`, `ExcelFileReader`, and `CsvFileReader`.
24
- 3. Use this component for valuation/data-middle file import and DDL derivation; resolve generic file storage or parser infrastructure through the consuming project's source and the available source index.
25
- 4. Validate file format, sheet/column mapping, encoding, and generated DDL before applying changes to a database.
26
- 5. Keep import jobs idempotent or clearly restartable when possible.
27
-
28
- ## Checklist
29
-
30
- - Required dependency or starter module is present.
31
- - Excel/CSV reader matches the actual file type.
32
- - Generated DDL uses the expected table/column naming rules.
33
- - Table relationship extraction is verified with sample files.
34
- - Import job failure handling records enough context for rerun.
35
-
36
- ## Do Not
37
-
38
- - Do not invent class names or configuration keys without checking the source index.
39
- - Do not replace component extension points with business-local framework code.
40
- - Do not broaden the task into unrelated YSS components unless the user asks.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "yss-valuation"
3
- short_description: "YSS component skill for yss-valuation"
4
- default_prompt: "Use yss-valuation for this YSS backend component task."
@@ -1,37 +0,0 @@
1
- # yss-valuation Source Index
2
-
3
- Generated: 2026-08-17T12:03:37.436Z
4
- Source commit: `38b556a5081e6c66c0c538cbc1ef839b19996ed3`
5
- Source worktree: `dirty`
6
- Indexed source root: resolved at refresh time; set `YSS_SOURCE_ROOT` to reproduce or refresh.
7
-
8
- This file is generated by `yss-source-index/scripts/refresh-yss-skill-index.mjs`. Do not hand-edit generated sections.
9
-
10
- Paths below are source path hints captured at refresh time. If they do not exist in the current workspace, locate sources using `YSS_SOURCE_ROOT`, CodeGraph, package/class names, Maven artifact names, or repository search before assuming the source is unavailable.
11
-
12
- ## Component Path Hints
13
-
14
- - `yss-microservice-components/yss-component-valuation` (existed when indexed)
15
-
16
- ## Documentation Files
17
-
18
- - No component documentation files found.
19
-
20
- ## Maven Modules
21
-
22
- - `yss-microservice-components/yss-component-valuation`
23
-
24
- ## Key Java Entry Points
25
-
26
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/ddl/Excel2SqlDDL.java`
27
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/ddl/Excel2TableRelationship.java`
28
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/job/ImportFileJob.java`
29
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/FileReader.java`
30
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/impl/CsvFileReader.java`
31
- - `yss-microservice-components/yss-component-valuation/src/main/java/com/yss/datamiddle/reader/impl/ExcelFileReader.java`
32
-
33
- ## Recommended Next Reads
34
-
35
- - Start with the documentation files above when learning component usage.
36
- - Search the key Java entry points for annotations, auto configuration, properties, aspects, interceptors, handlers, and result objects before changing application code.
37
- - Prefer existing component extension points over rewriting framework logic in business modules.
@@ -1,47 +0,0 @@
1
- ---
2
- name: yss-variable
3
- description: Use when 用于 YSS variable 组件、变量命名空间、VariableController、VarNameSpaceController、变量解析、占位符替换和变量导入导出排障。
4
- ---
5
-
6
- # yss-variable
7
-
8
- Use this skill for YSS 变量组件. Keep implementation grounded in the local project and resolvable YSS backend component source.
9
-
10
- 中文说明:本技能用于 YSS 变量组件。执行时优先读取源码索引,避免凭记忆猜类名、配置项或接入方式。
11
-
12
- ## Source Index First
13
-
14
- - Backend source location is environment-specific; resolve it with `yss-source-index/references/source-location.md`.
15
- - Generated index: `references/source-index.md`
16
- - Component path hints: `yss-microservice-components/yss-component-variable`
17
-
18
- Read `references/source-index.md` as a path-hint index whenever the task depends on exact modules, annotations, auto configuration, properties, controllers, clients, repositories, DTOs, handlers, or troubleshooting.
19
-
20
- ## Workflow
21
-
22
- 1. Identify whether the task is variable CRUD, namespace management, variable copy/move, import/export, wildcard search, author write handling, or async task status.
23
- 2. Read `references/source-index.md`, then inspect `VariableController`, `VarNameSpaceController`, `VariableService`, mappers, DTOs, and enums.
24
- 3. Keep namespace operations separate from variable definition operations.
25
- 4. Use `VarTypeEnum` and `UserFlagEnum` semantics instead of stringly typed business flags.
26
- 5. For import/copy/move tasks, inspect request/response DTOs and task response/status models.
27
-
28
- ## Capability Split
29
-
30
- - Controllers: namespace and variable APIs.
31
- - Service/mapper/entity: variable persistence and operations.
32
- - DTOs: namespace page query, variable definition/copy/move/import/list responses.
33
- - Common utilities: author write handler, SQL wildcard transform, result wrappers.
34
-
35
- ## Checklist
36
-
37
- - Required dependency or starter module is present.
38
- - Namespace and variable IDs/paths are handled consistently.
39
- - Variable type and user flag values use enums.
40
- - Import errors are returned through existing error response DTOs.
41
- - Wildcard search escapes SQL-sensitive characters through existing utility behavior.
42
-
43
- ## Do Not
44
-
45
- - Do not invent class names or configuration keys without checking the source index.
46
- - Do not replace component extension points with business-local framework code.
47
- - Do not broaden the task into unrelated YSS components unless the user asks.
@@ -1,4 +0,0 @@
1
- interface:
2
- display_name: "yss-variable"
3
- short_description: "YSS component skill for yss-variable"
4
- default_prompt: "Use yss-variable for this YSS backend component task."
@@ -1,32 +0,0 @@
1
- # yss-variable Source Index
2
-
3
- Generated: 2026-08-17T12:03:37.436Z
4
- Source commit: `38b556a5081e6c66c0c538cbc1ef839b19996ed3`
5
- Source worktree: `dirty`
6
- Indexed source root: resolved at refresh time; set `YSS_SOURCE_ROOT` to reproduce or refresh.
7
-
8
- This file is generated by `yss-source-index/scripts/refresh-yss-skill-index.mjs`. Do not hand-edit generated sections.
9
-
10
- Paths below are source path hints captured at refresh time. If they do not exist in the current workspace, locate sources using `YSS_SOURCE_ROOT`, CodeGraph, package/class names, Maven artifact names, or repository search before assuming the source is unavailable.
11
-
12
- ## Component Path Hints
13
-
14
- - `yss-microservice-components/yss-component-variable` (missing when indexed)
15
-
16
- ## Documentation Files
17
-
18
- - No component documentation files found.
19
-
20
- ## Maven Modules
21
-
22
- - No Maven modules found.
23
-
24
- ## Key Java Entry Points
25
-
26
- - No key Java entry points matched the configured name patterns.
27
-
28
- ## Recommended Next Reads
29
-
30
- - Start with the documentation files above when learning component usage.
31
- - Search the key Java entry points for annotations, auto configuration, properties, aspects, interceptors, handlers, and result objects before changing application code.
32
- - Prefer existing component extension points over rewriting framework logic in business modules.
@@ -1,95 +0,0 @@
1
- ---
2
- name: yss-db2mybatis
3
- description: Use when 用于从数据库元数据或 DDL 生成 YSS 风格的 Domain Gateway、PO、Repository、Convertor 和 GatewayImpl。当用户要求按表结构、DDL、metadata 或数据库连接批量生成持久层代码时调用。
4
- ---
5
-
6
- # yss-db2mybatis
7
-
8
- 这是一个生成器型 skill。优先复用脚本 `scripts/db2mybatis.mjs`,不要在对话里手写大段样板代码替代脚本。
9
-
10
- ## 何时使用
11
-
12
- - 用户给出数据库表、DDL、metadata,要求生成 YSS 持久层代码。
13
- - 用户要求批量生成 `PO / Repository / Convertor / GatewayImpl / Domain Gateway`。
14
- - 用户要从 MySQL、PostgreSQL、Oracle、OpenGauss、OceanBase 提取元数据。
15
- - 用户要先从 DDL 离线生成 metadata,再生成代码。
16
-
17
- ## 不适用
18
-
19
- - 复杂 SQL 优化、手写 XML Mapper。
20
- - 联合主键需要特殊建模且用户未确认策略。
21
- - 用户只想补某个领域行为,而不是批量落持久层。
22
-
23
- ## 优先流程
24
-
25
- 1. 识别输入来源:`metadata.json`、数据库连接、DDL 文件、DDL 文本。
26
- 2. 先执行 `validate` 或 `extract` / `ddl2metadata`,不要直接盲生成。
27
- 3. 生成前优先用 `--dry-run` 预览。
28
- 4. 生成后检查输出路径、命名、主键策略和类型映射。
29
- 5. 如用户要继续补 Domain 或 Web,再衔接 `yss-domain`、`yss-web-controller`。
30
-
31
- ## 推荐命令
32
-
33
- ### 从数据库提取 metadata
34
-
35
- ```bash
36
- node scripts/db2mybatis.mjs extract \
37
- --datasource-config references/datasource-config.example.json \
38
- --datasource-name your-datasource \
39
- --tables t_example \
40
- --output /tmp/metadata.json
41
- ```
42
-
43
- ### 从 DDL 生成 metadata
44
-
45
- ```bash
46
- node scripts/db2mybatis.mjs ddl2metadata \
47
- --ddl-file /path/schema.sql \
48
- --db-type mysql \
49
- --database demo \
50
- --output /tmp/metadata.json
51
- ```
52
-
53
- ### 生成代码
54
-
55
- ```bash
56
- node scripts/db2mybatis.mjs scaffold \
57
- --skill-root /path/to/.agents/skills/yss-db2mybatis \
58
- --metadata-file /tmp/metadata.json \
59
- --base-package com.yss.demo \
60
- --domain-segment example \
61
- --domain-java-root /path/project-domain/src/main/java \
62
- --infra-java-root /path/project-infra/src/main/java \
63
- --dry-run
64
- ```
65
-
66
- ## 关键参数
67
-
68
- - 表过滤:`--tables`、`--include-tables-regex`、`--exclude-tables-regex`
69
- - 安全控制:`--dry-run`、`--overwrite`
70
- - 输入来源:`--metadata-file`、`--ddl-file`、`--ddl-sql`
71
- - 主键策略:`--pk-strategy error|first`
72
- - 项目约定:`--convention-file`
73
- - 实时驱动根目录:`YSS_DB2MYBATIS_DRIVER_ROOT`(未设置时使用当前工作目录;不自动安装依赖)。MySQL / OceanBase 使用 `mysql2`,PostgreSQL / OpenGauss 使用 `pg`,Oracle 使用 `oracledb`;DDL、metadata、scaffold 和 validate 不依赖第三方包。
74
-
75
- ## 输出预期
76
-
77
- - `domain/{segment}/gateway/*Gateway.java`
78
- - `repository/entity/*PO.java`
79
- - `repository/*Repository.java`
80
- - `repository/convertor/*Convertor.java`
81
- - `repository/gateway/impl/*GatewayImpl.java`
82
-
83
- ## 质量要求
84
-
85
- - 遇到无法推断的类型时,给出明确告警,不要静默猜测。
86
- - 联合主键默认报错,除非用户明确接受 `first` 策略。
87
- - 默认先生成可编译骨架,再由调用方补复杂查询。
88
- - 输出前检查生成路径是否真的对齐当前工程。
89
-
90
- ## 按需读取
91
-
92
- - 主脚本:`scripts/db2mybatis.mjs`(Node `>=22 <27`)
93
- - 类型映射:`references/type-mapping.json`
94
- - 数据源示例:`references/datasource-config.example.json`
95
- - 项目约定示例:`references/project-convention.example.json`
@@ -1,5 +0,0 @@
1
- version: 1
2
- interface:
3
- display_name: "YSS DB2MyBatis"
4
- short_description: "数据库元数据生成 YSS 持久层与代码脚手架落地规范"
5
- default_prompt: "Use $yss-db2mybatis to generate YSS domain gateway, repository, convertor, and gateway implementation code from database metadata."
@@ -1,19 +0,0 @@
1
- package ${base_package}.repository.entity;
2
-
3
- import com.baomidou.mybatisplus.annotation.IdType;
4
- import com.baomidou.mybatisplus.annotation.TableField;
5
- import com.baomidou.mybatisplus.annotation.TableId;
6
- import com.baomidou.mybatisplus.annotation.TableName;
7
- import lombok.Data;
8
- import lombok.EqualsAndHashCode;${extra_imports}
9
-
10
- /**
11
- * ${table_comment}
12
- */
13
- @Data
14
- @EqualsAndHashCode
15
- @TableName("${table_name}")
16
- public class ${domain_name}PO {
17
-
18
- ${fields_block}
19
- }
@@ -1,22 +0,0 @@
1
- package ${base_package}.repository.convertor;
2
-
3
- import ${model_pkg}.${domain_name};
4
- import ${base_package}.repository.entity.${domain_name}PO;
5
- import org.mapstruct.Mapper;
6
- import org.mapstruct.NullValueCheckStrategy;
7
- import org.mapstruct.NullValuePropertyMappingStrategy;
8
- import org.mapstruct.factory.Mappers;
9
-
10
- import java.util.List;
11
-
12
- @Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
13
- public interface ${domain_name}Convertor {
14
-
15
- ${domain_name}Convertor INSTANCE = Mappers.getMapper(${domain_name}Convertor.class);
16
-
17
- ${domain_name}PO toPO(${domain_name} source);
18
-
19
- ${domain_name} toDomain(${domain_name}PO source);
20
-
21
- List<${domain_name}> toDomainList(List<${domain_name}PO> source);
22
- }
@@ -1,45 +0,0 @@
1
- package ${gateway_pkg};
2
-
3
- import com.yss.cloud.dto.page.PageQuery;
4
- import com.yss.cloud.dto.result.PageResult;
5
- import ${model_pkg}.${domain_name};
6
-
7
- import java.util.Optional;
8
-
9
- public interface ${domain_name}Gateway{
10
- /**
11
- * Add ${domain_name}
12
- *
13
- * @param entity entity
14
- * @return id
15
- */
16
- ${pk_java_type} ${method_add}(${domain_name} entity);
17
- /**
18
- * Update ${domain_name}
19
- *
20
- * @param entity entity
21
- * @return boolean
22
- */
23
- boolean ${method_update}(${domain_name} entity);
24
- /**
25
- * Delete ${domain_name}
26
- *
27
- * @param ${pk_field_name} id
28
- * @return boolean
29
- */
30
- boolean ${method_delete}(${pk_java_type} ${pk_field_name});
31
- /**
32
- * Get ${domain_name} by id
33
- *
34
- * @param ${pk_field_name} id
35
- * @return optional
36
- */
37
- Optional<${domain_name}> ${method_get}(${pk_java_type} ${pk_field_name});
38
- /**
39
- * Page ${domain_name}
40
- *
41
- * @param query query
42
- * @return page result
43
- */
44
- PageResult<${domain_name}> ${method_page}(PageQuery query);
45
- }
@@ -1,16 +0,0 @@
1
- package ${model_pkg};
2
-
3
- import lombok.Data;
4
- import java.io.Serializable;
5
- ${extra_imports}
6
-
7
- /**
8
- * ${table_comment}
9
- */
10
- @Data
11
- public class ${domain_name} implements Serializable {
12
-
13
- private static final long serialVersionUID = 1L;
14
-
15
- ${fields_block}
16
- }
@@ -1,62 +0,0 @@
1
- package ${base_package}.repository.gateway.impl;
2
-
3
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
- import com.baomidou.mybatisplus.core.metadata.IPage;
5
- import com.baomidou.mybatisplus.core.toolkit.Wrappers;
6
- import com.yss.cloud.dto.page.PageQuery;
7
- import com.yss.cloud.dto.result.PageResult;
8
- import ${gateway_pkg}.${domain_name}Gateway;
9
- import ${model_pkg}.${domain_name};
10
- import ${base_package}.repository.${domain_name}Repository;
11
- import ${base_package}.repository.convertor.${domain_name}Convertor;
12
- import ${base_package}.repository.entity.${domain_name}PO;
13
- import ${base_package}.repository.util.PageUtil;
14
- import lombok.RequiredArgsConstructor;
15
- import org.springframework.stereotype.Repository;
16
-
17
- import java.util.List;
18
- import java.util.Optional;
19
- import java.util.stream.Collectors;
20
-
21
- @Repository
22
- @RequiredArgsConstructor
23
- public class ${domain_name}GatewayImpl implements ${domain_name}Gateway {
24
-
25
- private final ${domain_name}Repository ${repository_field_name};
26
-
27
- @Override
28
- public ${pk_java_type} ${method_add}(${domain_name} entity) {
29
- ${domain_name}PO po = ${domain_name}Convertor.INSTANCE.toPO(entity);
30
- ${repository_field_name}.insert(po);
31
- //fixme 补充返回数据唯一id
32
- return null;
33
- }
34
-
35
- @Override
36
- public boolean ${method_update}(${domain_name} entity) {
37
- return ${repository_field_name}.updateById(${domain_name}Convertor.INSTANCE.toPO(entity)) > 0;
38
- }
39
-
40
- @Override
41
- public boolean ${method_delete}(${pk_java_type} ${pk_field_name}) {
42
- return ${repository_field_name}.deleteById(${pk_field_name}) > 0;
43
- }
44
-
45
- @Override
46
- public Optional<${domain_name}> ${method_get}(${pk_java_type} ${pk_field_name}) {
47
- return Optional.ofNullable(${repository_field_name}.selectById(${pk_field_name})).map(this::toDomain);
48
- }
49
-
50
- @Override
51
- public PageResult<${domain_name}> ${method_page}(PageQuery query) {
52
- LambdaQueryWrapper<${domain_name}PO> wrapper = Wrappers.lambdaQuery(${domain_name}PO.class);
53
- ${logic_delete_condition}
54
- IPage<${domain_name}PO> result = ${repository_field_name}.selectPage(PageUtil.page(query), wrapper);
55
- List<${domain_name}> records = result.getRecords().stream().map(this::toDomain).collect(Collectors.toList());
56
- return PageResult.of(records, result.getTotal(), result.getSize(), result.getCurrent());
57
- }
58
-
59
- private ${domain_name} toDomain(${domain_name}PO source) {
60
- return ${domain_name}Convertor.INSTANCE.toDomain(source);
61
- }
62
- }
@@ -1,18 +0,0 @@
1
- package ${base_package}.repository.entity;
2
-
3
- import com.baomidou.mybatisplus.annotation.IdType;
4
- import com.baomidou.mybatisplus.annotation.TableField;
5
- import com.baomidou.mybatisplus.annotation.TableId;
6
- import com.baomidou.mybatisplus.annotation.TableName;
7
- import lombok.Data;
8
- import lombok.EqualsAndHashCode;${extra_imports}
9
-
10
- /**
11
- * ${table_comment}
12
- */
13
- @Data
14
- @EqualsAndHashCode
15
- @TableName("${table_name}")
16
- public class ${domain_name}PO {
17
- ${fields_block}
18
- }
@@ -1,7 +0,0 @@
1
- package ${base_package}.repository;
2
-
3
- import com.yss.cloud.mybatis.support.BasePlusRepository;
4
- import ${base_package}.repository.entity.${domain_name}PO;
5
-
6
- public interface ${domain_name}Repository extends BasePlusRepository<${domain_name}PO> {
7
- }