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
@@ -0,0 +1,181 @@
1
+ schema_version: 1
2
+ kind: yss-dto-openapi-wire-profile
3
+
4
+ # This profile is the reusable mapping source consumed by the OpenAPI skills.
5
+ # It describes the public HTTP/JSON shape, not every Java field or getter.
6
+ canonical:
7
+ java_package: com.yss.cloud.dto.result
8
+ type_parameter:
9
+ name: T
10
+ java_bound: java.io.Serializable
11
+ openapi:
12
+ response_meta_schema: YssResultMeta
13
+ concrete_schema_composition: allOf
14
+ response_wrapper_extension: x-yss-response-wrapper
15
+ literal_java_generic_schema: false
16
+
17
+ compatibility_packages:
18
+ - java_package: com.yss.cloud.dto.response
19
+ status: legacy-or-compatibility
20
+ use_for_new_contracts: false
21
+ policy: do-not-introduce-in-new-contracts
22
+
23
+ common_response:
24
+ schema_name: YssResultMeta
25
+ fields:
26
+ success:
27
+ direction: response
28
+ wire_types: [boolean]
29
+ nullable: false
30
+ required: true
31
+ dataType:
32
+ direction: response
33
+ wire_types: [string, "null"]
34
+ nullable: true
35
+ required: true
36
+ code:
37
+ direction: response
38
+ wire_types: [string, integer, "null"]
39
+ nullable: true
40
+ required: true
41
+ policy: do-not-widen-global-wrapper
42
+ message:
43
+ direction: response
44
+ wire_types: [string, "null"]
45
+ nullable: true
46
+ required: true
47
+ tips:
48
+ direction: response
49
+ wire_types: [string, "null"]
50
+ nullable: true
51
+ required: true
52
+
53
+ wrappers:
54
+ SingleResult:
55
+ java_type: com.yss.cloud.dto.result.SingleResult<T>
56
+ response_kind: single
57
+ data:
58
+ direction: response
59
+ wire_shape: endpoint-schema-or-null
60
+ nullable: true
61
+ required: true
62
+ MultiResult:
63
+ java_type: com.yss.cloud.dto.result.MultiResult<T>
64
+ response_kind: non-page-list
65
+ data:
66
+ direction: response
67
+ wire_types: [array]
68
+ items: endpoint-schema
69
+ nullable: false
70
+ required: true
71
+ empty_value: []
72
+ PageResult:
73
+ java_type: com.yss.cloud.dto.result.PageResult<T>
74
+ response_kind: page
75
+ fields:
76
+ totalCount:
77
+ direction: response
78
+ wire_types: [integer]
79
+ format: int64
80
+ minimum: 0
81
+ nullable: false
82
+ required: true
83
+ pageSize:
84
+ direction: response
85
+ wire_types: [integer]
86
+ format: int32
87
+ minimum: 1
88
+ nullable: false
89
+ required: true
90
+ pageIndex:
91
+ direction: response
92
+ wire_types: [integer]
93
+ format: int32
94
+ minimum: 1
95
+ nullable: false
96
+ required: true
97
+ data:
98
+ direction: response
99
+ wire_types: [array]
100
+ items: endpoint-schema
101
+ nullable: false
102
+ required: true
103
+ empty_value: []
104
+ computed_fields:
105
+ totalPages:
106
+ java_getter: getTotalPages
107
+ status: mapper-dependent
108
+ policy: include-only-with-target-wire-evidence
109
+
110
+ page_query:
111
+ java_type: com.yss.cloud.dto.page.PageQuery
112
+ request_direction: query
113
+ fields:
114
+ pageIndex:
115
+ direction: request
116
+ wire_types: [integer]
117
+ format: int32
118
+ minimum: 1
119
+ default: 1
120
+ nullable: false
121
+ required: false
122
+ pageSize:
123
+ direction: request
124
+ wire_types: [integer]
125
+ format: int32
126
+ minimum: 1
127
+ default: 10
128
+ nullable: false
129
+ required: false
130
+ orderBy:
131
+ direction: request
132
+ wire_types: [string, "null"]
133
+ nullable: true
134
+ required: false
135
+ policy: endpoint-whitelist-required
136
+ orderDirection:
137
+ direction: request
138
+ wire_types: [string]
139
+ enum: [ASC, DESC]
140
+ default: DESC
141
+ nullable: false
142
+ required: false
143
+ groupBy:
144
+ direction: request
145
+ wire_types: [string, "null"]
146
+ nullable: true
147
+ required: false
148
+ policy: endpoint-whitelist-required
149
+ forbidden_client_fields:
150
+ - offset
151
+ - needTotalCount
152
+ - tempTotalCount
153
+ computed_fields:
154
+ offset:
155
+ java_getter: getOffset
156
+ status: computed
157
+ policy: exclude-from-client-input
158
+ needTotalCount:
159
+ java_getter: isNeedTotalCount
160
+ status: internal-or-ignored
161
+ policy: exclude-from-client-input
162
+ tempTotalCount:
163
+ java_getter: getTempTotalCount
164
+ status: internal-or-ignored
165
+ policy: exclude-from-client-input
166
+
167
+ request_bases:
168
+ command:
169
+ java_type: com.yss.cloud.dto.CommandDTO
170
+ direction: request
171
+ query:
172
+ java_type: com.yss.cloud.dto.QueryDTO
173
+ direction: request
174
+ extends: command
175
+
176
+ wire_evidence:
177
+ required_before_freeze:
178
+ - target-http-mapper-identity
179
+ - representative-serialization-fixtures
180
+ - contract-test-or-equivalent-http-evidence
181
+ rule: Java fields and computed getters are not public wire facts until target-boundary evidence confirms them.
@@ -61,7 +61,7 @@ description: 用于 YSS MyBatis 与 MyBatis-Plus 持久层规范、配置和排
61
61
 
62
62
  - 不要同时引入两套分页机制而不说明谁生效。
63
63
  - 不要在已有 Repository 基类体系之外再造一套 Mapper 抽象。
64
- - 若用户只是要生成持久层骨架,优先衔接 `yss-db2mybatis`。
64
+ - 若用户只是要生成持久层骨架,优先衔接 `yss-repository`。
65
65
 
66
66
  ## 按需读取
67
67
 
@@ -12,7 +12,8 @@ Use this skill after OpenAPI Draft creation and before Engineering Baseline / YS
12
12
  - OpenAPI Draft under `docs/.scratch/<feature>/api/<feature>.yaml`,作为唯一权威的单一 OAS 3.1 YAML document;生命周期元数据和 Freeze 决策位于相邻 Markdown 记录。
13
13
  - Calibrated Spec.
14
14
  - Interaction spec / prototype review when UI exists.
15
- - YSS engineering baseline rules, especially `SingleResult<T>`, `MultiResult<T>`, and `PageResult<T>`.
15
+ - YSS engineering baseline rules and `.agents/skills/yss-dto/references/openapi-wire-profile.yaml`;先运行 `scripts/verify-yss-dto-openapi-profile`。
16
+ - 若 Draft 包含 computed getter(例如 `totalPages`),必须提供目标 HTTP mapper identity、代表性序列化 fixture 和 contract-test / 等价 HTTP evidence。
16
17
 
17
18
  ## Review Flow
18
19
 
@@ -20,13 +21,16 @@ Use this skill after OpenAPI Draft creation and before Engineering Baseline / YS
20
21
  2. Build a P0 traceability matrix from Spec functional requirements and interaction actions to OpenAPI paths, schemas, errors, and contract tests. Each UI action must map to a stable `operationId` and `x-yss-action-key` or an equivalent traceability entry.
21
22
  3. Check page action coverage: every action has `actionKey`, endpoint or explicit non-goal, state transition, idempotency/concurrency rule, and error codes. When the Spec explicitly changes authentication or authorization behavior, trace that behavior through the same matrix.
22
23
  4. Check object lifecycle coverage: manage/maintain/configure/create/update/archive/retry/cancel/publish/export/create-draft semantics have endpoints or explicit scope downgrades.
23
- 5. Check YSS API baseline: REST shape, `SingleResult<T>` for single objects, `MultiResult<T>` for non-page lists, `PageResult<T>` for pagination, and stable DTO/schema names.
24
- 6. Check error contracts: field-level errors, model-level errors, disabled reasons, gate failures, and conflict responses. When the Spec explicitly changes authentication or authorization behavior, include its `401` / `403` and resource-filtering semantics here.
25
- 7. Output a persistent review artifact under `docs/.scratch/<feature>/architecture/` or update the existing one.
24
+ 5. Check YSS API baseline: REST shape, `x-yss-response-wrapper` values `SingleResult|MultiResult|PageResult`, `YssResultMeta` plus `allOf` concrete schemas, and stable DTO/schema names. The Java generic notation is a review shorthand only; it must not appear as an OpenAPI type or `$ref`.
25
+ 6. Check DTO wire shape against the profile: `success` is boolean, `dataType` is `string|null`, `code` is only `string|integer|null`, list/page `data` is an array, and single `data` points to the endpoint schema with explicit nullability. Check response/request direction separately.
26
+ 7. Check pagination input: only `pageIndex/pageSize/orderBy/orderDirection/groupBy` are client fields; `orderDirection` is `ASC|DESC`; `orderBy` / `groupBy` use endpoint whitelists; `offset`, `needTotalCount`, and `tempTotalCount` are negative assertions. `totalPages` is mapper-dependent and cannot enter a shared schema without fresh wire evidence.
27
+ 8. Check error contracts: field-level errors, model-level errors, disabled reasons, gate failures, and conflict responses. When the Spec explicitly changes authentication or authorization behavior, include its `401` / `403` and resource-filtering semantics here.
28
+ 9. Output a persistent review artifact under `docs/.scratch/<feature>/architecture/` or update the existing one.
26
29
 
27
30
  ## Automation Boundary
28
31
 
29
32
  - Automated checks own YAML single-document syntax, `$ref` resolution, path-parameter consistency, OpenAPI lint, and stable machine-checkable style rules.
33
+ - `scripts/verify-yss-dto-openapi-profile` owns the reusable DTO mapping invariants; the review still checks each endpoint's concrete schema, wrapper extension and evidence.
30
34
  - Human or independent semantic review owns P0 traceability, page-action coverage, error behavior, concurrency/idempotency, scope downgrades, contract-test seams, and any explicitly specified authentication or authorization behavior.
31
35
  - Fresh passing automation evidence may be referenced by the semantic review; copying the same findings into a second checklist is unnecessary.
32
36
  - Re-run structural automation only when the Draft, ruleset, or referenced schema changes.
@@ -38,7 +42,9 @@ Block if any of these are true:
38
42
  - A P0 requirement has no endpoint, schema, error contract, or explicit non-goal.
39
43
  - A UI action has no endpoint/non-goal mapping.
40
44
  - A configurable rule or gate lacks a source, owner, fixed/default decision, or API representation.
41
- - Pagination does not align with YSS `PageResult<T>` or documented exception.
45
+ - Pagination does not align with the `PageResult` profile or documented exception, or exposes `offset` / `needTotalCount` / `tempTotalCount` as client input.
46
+ - A response omits `x-yss-response-wrapper`, uses the compatibility `com.yss.cloud.dto.response` package for a new contract, writes Java generic notation as an OAS schema, or fails `YssResultMeta` + `allOf` + concrete `data` mapping.
47
+ - `code` is modeled as arbitrary object, `dataType` loses explicit nullability, or computed fields such as `totalPages` lack target wire evidence.
42
48
  - Draft has no contract test seam for import, mapping coverage, validation, review, publish, export, and optimistic locking.
43
49
  - YAML contains lifecycle frontmatter / root metadata, or the proposed JSON client input is not explicitly deferred until Freeze and governance export.
44
50
 
@@ -58,9 +64,15 @@ Block if any of these are true:
58
64
  - <P0 requirement -> endpoint/schema/error/test mapping summary>
59
65
 
60
66
  ### YSS Baseline
61
- - <response wrappers, DDD boundary implications, implementation feasibility>
67
+ - <`x-yss-response-wrapper` map and `YssResultMeta` / `allOf` conformance>
68
+ - <profile version, concrete `data` schemas, nullability, request/response direction and computed-field evidence>
69
+ - <DDD boundary implications, implementation feasibility>
62
70
 
63
71
  ### Contract Test Checklist
72
+ - <wrapper meta fields: success/code/message/tips/dataType, including code string/integer/null cases>
73
+ - <single object, non-page list empty array, page empty array and page boundary cases>
74
+ - <PageQuery allowed fields, ASC/DESC and endpoint whitelist; negative assertions for offset/needTotalCount/tempTotalCount>
75
+ - <target HTTP mapper identity and computed-field fixture, if totalPages or another getter is included>
64
76
  - <minimum contract tests before OpenAPI Freeze>
65
77
 
66
78
  ### Next Action
@@ -13,12 +13,15 @@ Spec / 设计输入 → OpenAPI YAML Draft → 审查与 Freeze → JSON 派生
13
13
 
14
14
  `docs/.scratch/<feature>/api/<feature>.yaml` 是唯一权威的 OpenAPI 3.1 契约。JSON 只能由冻结后的 YAML 可复现地产生,用于前端代码生成或分发;不得手写、不得反向覆盖 YAML、不得把运行时代码当成设计契约来源。
15
15
 
16
+ YSS DTO 的可复用 HTTP/JSON 映射由 `.agents/skills/yss-dto/references/openapi-wire-profile.yaml` 单一维护。它描述公开 wire shape,不是 Java 字段或 getter 清单;本 skill 必须消费 profile,不能在治理文档、feature YAML 和 JSON 中各自发明 `SingleResult`、`PageResult` 或 `PageQuery` 字段表。
17
+
16
18
  ## 边界与职责
17
19
 
18
20
  使用 `yss-openapi-governance`:
19
21
 
20
22
  - 基于冻结前的 Spec、产品设计、架构约束创建或更新 `docs/.scratch/<feature>/api/<feature>.yaml`。
21
23
  - 保证 YAML 是单一 YAML document、根节点为 `openapi: 3.1.0`,且不把 `pipeline`、`stage`、`status`、`owner` 等生命周期元数据写入 OpenAPI 根节点。
24
+ - 按 `yss-dto` wire profile 校验 `com.yss.cloud.dto.result` canonical 包、`YssResultMeta` 公共字段、具体 wrapper schema、请求 / 响应方向和分页负向字段。
22
25
  - 运行受项目 lockfile 约束的 lint / bundle,检查 `$ref`、operationId、响应包装、错误、分页、幂等和契约测试 seam;只有 Spec 明确改变认证或授权行为时才检查对应契约。
23
26
  - 在 OpenAPI Freeze 后,用锁定的 Redocly CLI 将 YAML bundle 为 JSON,并记录可重现证据。
24
27
  - 维护治理记录、Freeze 记录和 JSON 派生记录。
@@ -59,7 +62,9 @@ pnpm exec redocly bundle \
59
62
  2. **运行结构与治理校验**
60
63
  - 先执行项目锁定的 `pnpm exec redocly lint` 或等价 CI 脚本。
61
64
  - 检查 YAML 可解析、`$ref` 可解析、路径参数完整、operationId 唯一、examples 合法、schema 命名稳定。
62
- - 检查 `/api/v1/` 版本策略(或记录例外)、`SingleResult<T>` / `MultiResult<T>` / `PageResult<T>`、统一错误结构、分页、幂等 / 乐观锁和契约测试 seam。Spec 明确改变认证或授权行为时,把对应 `401` / `403`、资源过滤和错误语义作为普通 API 行为检查。
65
+ - 先运行 `scripts/verify-yss-dto-openapi-profile`,并记录 profile 版本;检查 `/api/v1/` 版本策略(或记录例外)、`x-yss-response-wrapper`、`YssResultMeta` + `allOf` 具体 schema、统一错误结构、分页、幂等 / 乐观锁和契约测试 seam。
66
+ - 每个响应都必须落成具体 endpoint schema:`SingleResult` 的 `data` 是具体对象或显式 nullable schema,`MultiResult` / `PageResult` 的 `data` 是数组;Java 的 `SingleResult<T>` / `PageResult<T>` 只能作为语义说明,不能直接写成 OAS type 或 `$ref`。
67
+ - `code` 按 profile 只允许 `string | integer | null`,`dataType` 按 profile 为 `string | null`;`offset`、`needTotalCount`、`tempTotalCount` 不得进入客户端分页输入;`totalPages` 只有目标 HTTP mapper / fixture 证明后才能进入契约。Spec 明确改变认证或授权行为时,把对应 `401` / `403`、资源过滤和错误语义作为普通 API 行为检查。
63
68
 
64
69
  3. **独立 Draft Review 与 Freeze**
65
70
  - 将 fresh lint 证据交给 `yss-openapi-draft-review`;阻断项未关闭前,YAML 仍是 review-only Draft,不得生成生产客户端。
@@ -85,6 +90,9 @@ pnpm exec redocly bundle \
85
90
  - YAML / `$ref` / lint 不通过,operationId 不稳定或不唯一,或路径参数、schema、examples 无法解析。
86
91
  - P0 操作缺请求、响应、错误、并发 / 幂等规则或可验证 seam;Spec 明确的认证或授权行为没有契约表示。
87
92
  - `$ref` 超出允许范围,或转换器版本、lockfile、命令、输入 YAML 无法识别。
93
+ - `scripts/verify-yss-dto-openapi-profile` 失败、profile 版本未记录,或 Draft 未按 profile 建模 `x-yss-response-wrapper`、`YssResultMeta` / `allOf` 和具体 `data` schema。
94
+ - 新契约引入 `com.yss.cloud.dto.response`、把 Java 泛型文字当成 OAS schema、把全局 `code` 放宽为任意 object,或把 `offset` / `needTotalCount` / `tempTotalCount` 作为客户端字段。
95
+ - `totalPages`、任何 computed getter 或 Lombok / `@JsonIgnore` 推导字段没有目标 mapper identity、代表性序列化 fixture 和 contract-test / 等价 HTTP 证据。
88
96
  - Freeze 记录、YAML SHA-256、JSON SHA-256、JSON 解析 / lint 证据缺失。
89
97
  - JSON 被手工编辑,或生成结果试图反向成为 YAML 的权威来源。
90
98
 
@@ -102,6 +110,8 @@ pnpm exec redocly bundle \
102
110
 
103
111
  ### Validation
104
112
  - Lint command and result: <locked pnpm command / result>
113
+ - YSS DTO wire profile: <`.agents/skills/yss-dto/references/openapi-wire-profile.yaml`, schema_version, verifier result>
114
+ - Wrapper conformance: <`x-yss-response-wrapper`, `YssResultMeta`, `allOf`, concrete data schema, direction and forbidden-field result>
105
115
  - `$ref` policy / approved exceptions: <details>
106
116
  - Blocking findings: <file:line grounded finding>
107
117
 
@@ -23,7 +23,7 @@ description: Use when generating or refactoring YSS persistence models, BaseRepo
23
23
 
24
24
  1. 先确认输入来源:领域模型、metadata、数据库表、DDL。
25
25
  2. 探测持久化 profile:新 DDD 默认 `PO <-> Domain Model`;legacy YSS 常见 `Entity + BaseRepository + GatewayImpl`。沿用现有工程命名,不混用两套模型。
26
- 3. 如果 metadata 不完整,优先转到 `yss-db2mybatis` 提取。
26
+ 3. 如果 metadata 不完整,先补齐 metadata、数据库表结构或 DDL 输入。
27
27
  4. 涉及 POJO 字段、getter/setter、constructor、builder 或日志时,必须加载并遵守 `lombok`。
28
28
  5. 涉及持久化模型与 Domain/VO/CMD 转换时,必须加载并遵守 `mapstruct`。
29
29
  6. 生成代码时严格保持 Domain 与 Infrastructure 分层边界。
@@ -57,7 +57,7 @@ description: Use when generating or refactoring YSS persistence models, BaseRepo
57
57
 
58
58
  ## 协同顺序
59
59
 
60
- - metadata 提取:`yss-db2mybatis`
60
+ - metadata / DDL 输入准备:确认输入完整
61
61
  - 领域建模:`yss-domain`
62
62
  - POJO 样板代码:`lombok`
63
63
  - 对象转换:`mapstruct`
@@ -26,7 +26,6 @@ Default for a new page: first verify the approved product design, state matrix,
26
26
  - `yss-backend-scaffold-application`: Application use cases, transaction boundaries, and cross-aggregate orchestration.
27
27
  - `yss-repository`: Persistence implementation, PO, Repository, Convertor, GatewayImpl.
28
28
  - `yss-web-controller`: REST adapter layer, request/response DTOs, VO, web convertor.
29
- - `yss-db2mybatis`: Generate persistence artifacts from database metadata or DDL.
30
29
  - `yss-mybatis`: Framework behavior for MyBatis/MyBatis-Plus, BaseRepository, pagination, mapper scanning, batch, datasource issues.
31
30
  - `yss-dto`: Result/PageQuery/CommandDTO/QueryDTO and unified API contract objects.
32
31
 
@@ -48,9 +47,7 @@ Default for end-to-end backend CRUD: include Domain, Application, Infrastructure
48
47
  - `yss-validation`: Validation engine and JSR-303 integration.
49
48
  - `yss-security-algorithm`: RSA/AES/SM/JWT/JWK/password-encoding compatibility and production key-management safety gates.
50
49
  - `yss-userinfo`: Current-user info propagation and starter integration.
51
- - `yss-variable`: Variable component APIs and variable resolution.
52
50
  - `yss-exception`: Exception component and unified exception handling.
53
- - `yss-valuation`: Valuation component behavior.
54
51
 
55
52
  Component skills should inspect generated `references/source-index.md` before changing code when the task depends on exact class or config names.
56
53
 
@@ -20,9 +20,7 @@ The refresh script maps component source path hints to skill references. These p
20
20
  | `yss-validation` | `yss-microservice-components/yss-component-validation-engine-parent`, `yss-microservice-components/yss-component-validation-jsr303` |
21
21
  | `yss-security-algorithm` | `yss-microservice-components/yss-component-security-algorithm` |
22
22
  | `yss-userinfo` | `yss-microservice-components/yss-component-userinfo-starter` |
23
- | `yss-variable` | `yss-microservice-components/yss-component-variable` |
24
23
  | `yss-exception` | `yss-microservice-components/yss-component-exception` |
25
- | `yss-valuation` | `yss-microservice-components/yss-component-valuation` |
26
24
 
27
25
  Frontend docs are written to these skills:
28
26
 
@@ -5,7 +5,7 @@ import os from "node:os";
5
5
  import path from "node:path";
6
6
  import { fileURLToPath } from "node:url";
7
7
 
8
- const BACKEND = {"yss-cache":["yss-microservice-components/yss-component-cache-parent"],"yss-mybatis":["yss-microservice-components/yss-component-persistence"],"yss-dto":["yss-microservice-components/yss-component-dto"],"yss-audit-log":["yss-microservice-components/yss-component-audit-log"],"yss-excel-mvc":["yss-microservice-components/yss-component-excel-mvc","yss-microservice-components/yss-component-excel-starter"],"yss-distributed-id":["yss-microservice-components/yss-component-distributed-id","yss-microservice-components/yss-component-leaf"],"yss-jdbc":["yss-microservice-components/yss-component-jdbc"],"yss-dictionary":["yss-microservice-components/yss-component-dictionary-parent"],"yss-log":["yss-microservice-components/yss-component-log-starter"],"yss-resilience4j":["yss-microservice-components/yss-component-resilience4j-starter"],"yss-taskflow":["yss-microservice-components/yss-component-taskflow"],"yss-validation":["yss-microservice-components/yss-component-validation-engine-parent","yss-microservice-components/yss-component-validation-jsr303"],"yss-security-algorithm":["yss-microservice-components/yss-component-security-algorithm"],"yss-userinfo":["yss-microservice-components/yss-component-userinfo-starter"],"yss-variable":["yss-microservice-components/yss-component-variable"],"yss-exception":["yss-microservice-components/yss-component-exception"],"yss-valuation":["yss-microservice-components/yss-component-valuation"]};
8
+ const BACKEND = {"yss-cache":["yss-microservice-components/yss-component-cache-parent"],"yss-mybatis":["yss-microservice-components/yss-component-persistence"],"yss-dto":["yss-microservice-components/yss-component-dto"],"yss-audit-log":["yss-microservice-components/yss-component-audit-log"],"yss-excel-mvc":["yss-microservice-components/yss-component-excel-mvc","yss-microservice-components/yss-component-excel-starter"],"yss-distributed-id":["yss-microservice-components/yss-component-distributed-id","yss-microservice-components/yss-component-leaf"],"yss-jdbc":["yss-microservice-components/yss-component-jdbc"],"yss-dictionary":["yss-microservice-components/yss-component-dictionary-parent"],"yss-log":["yss-microservice-components/yss-component-log-starter"],"yss-resilience4j":["yss-microservice-components/yss-component-resilience4j-starter"],"yss-taskflow":["yss-microservice-components/yss-component-taskflow"],"yss-validation":["yss-microservice-components/yss-component-validation-engine-parent","yss-microservice-components/yss-component-validation-jsr303"],"yss-security-algorithm":["yss-microservice-components/yss-component-security-algorithm"],"yss-userinfo":["yss-microservice-components/yss-component-userinfo-starter"],"yss-exception":["yss-microservice-components/yss-component-exception"]};
9
9
  const FRONTEND={"yss-ui":["components","hooks","skills"],"yss-components":["components"],"yss-hook":["hooks"],"yss-page-module-development":["components","hooks","skills"],"yss-use-table-height":["hooks"],"yss-use-tree-height":["hooks"]};
10
10
  const URLS={components:"http://192.168.164.27:3200/components",hooks:"http://192.168.164.27:3200/hooks",skills:"http://192.168.164.27:3200/skills"};
11
11
  const KEYS=["Audit","Cache","Clear","Command","Configuration","Controller","DTO","Data","Enable","Excel","Handler","Interceptor","Jdbc","Mapper","Mybatis","Page","Properties","Query","Repository","Request","Response","Result","Update","Aspect","Leaf","Id","Dir","Dic","Dictionary","File","Upload","Log","Message","Mail","Liquibase","Circuit","Breaker","Sql","Tpl","Tag","Task","Flow","Report","Validation","Validator","Security","Crypto","User","Variable","Quality","Search","Similarity","Scheduler","Runner","Duck","Dynamic","Factory","Client","Feign","Gateway","Convertor","Adapter","Advice","Bridge","Route","Uploader","Sftp","Minio","Parser","Express","Rule","Template","Generator","Importer","Engine","Event","Submitter","Executor","Context","Status","Type","State"];
@@ -16,7 +16,7 @@ description: Use when generating or refactoring YSS Web Adapter Controllers, req
16
16
  ## 不适用
17
17
 
18
18
  - 用户只是要新增一个手写复杂接口,不一定要用脚本。
19
- - 用户还没有稳定的领域模型或 metadata,先补 `yss-domain` 或 `yss-db2mybatis`。
19
+ - 用户还没有稳定的领域模型或 metadata,先补 `yss-domain` 并准备完整的 metadata 输入。
20
20
 
21
21
  ## 优先流程
22
22
 
@@ -15,6 +15,8 @@ jobs:
15
15
  node: [22, 24]
16
16
  steps:
17
17
  - uses: actions/checkout@v4
18
+ with:
19
+ fetch-depth: 0
18
20
  - uses: pnpm/action-setup@v4
19
21
  with:
20
22
  version: 10.15.0
@@ -18,7 +18,7 @@ description: 用于生成完整的 YSS DDD 多模块后端脚手架。当用户
18
18
  ## 不适用
19
19
 
20
20
  - 只补单个领域模型时,优先 `yss-domain`。
21
- - 只补持久层时,优先 `yss-db2mybatis` 或 `yss-repository`。
21
+ - 只补持久层时,优先 `yss-repository`。
22
22
  - 只补 Web 层时,优先 `yss-web-controller`。
23
23
 
24
24
  ## 优先流程
@@ -17,7 +17,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
17
17
 
18
18
  ## 不适用
19
19
 
20
- - 只生成持久层时,优先 `yss-repository` 或 `yss-db2mybatis`。
20
+ - 只生成持久层时,优先 `yss-repository`。
21
21
  - 只生成 Controller 时,优先 `yss-web-controller`。
22
22
  - 只初始化项目骨架时,优先 `yss-ddd-scaffold-generator`。
23
23
 
@@ -51,7 +51,7 @@ description: 用于构建或重构 YSS 领域层代码。当用户要求设计
51
51
 
52
52
  ## 协同顺序
53
53
 
54
- - 需要持久层时,再接 `yss-repository` 或 `yss-db2mybatis`
54
+ - 需要持久层时,再接 `yss-repository`
55
55
  - 需要 Web 层时,再接 `yss-web-controller`
56
56
  - 需要完整工程时,先 `yss-ddd-scaffold-generator`
57
57
 
@@ -7,6 +7,8 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
7
7
 
8
8
  用于处理 `yss-component-dto` 的使用规范和代码接入。
9
9
 
10
+ 本 skill 同时负责把中台 DTO 映射到公开 HTTP/JSON 边界。`references/openapi-wire-profile.yaml` 是可复用的机器可读映射源;OpenAPI 治理和 Draft Review 必须消费它,不得各自复制一份 wrapper 或分页字段表。
11
+
10
12
  ## 何时使用
11
13
 
12
14
  - 用户要定义新的分页查询对象。
@@ -18,13 +20,15 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
18
20
 
19
21
  1. 优先沿用项目现有 DTO 体系,不重复造返回包装类。
20
22
  2. 涉及真实类名、返回结构、分页字段或排障时,先读 `references/source-index.md`,再定位源码或文档。
21
- 3. 先确认当前项目用的是哪一套结果封装,再给出改法。
22
- 4. 只围绕当前 DTO 结构回答,不泛化到整个微服务理论。
23
+ 3. 先确认当前项目用的是哪一套结果封装和实际 import;新契约的 canonical 包是 `com.yss.cloud.dto.result`,`com.yss.cloud.dto.response` 只能作为 legacy / compatibility 线索,不能在新契约中引入。
24
+ 4. 需要设计或审查 API 时,先校验 `references/openapi-wire-profile.yaml`,再把 endpoint 的具体 DTO/VO schema 组合到 wrapper;Java 泛型不是 OpenAPI schema。
25
+ 5. 只围绕当前 DTO 结构回答,不泛化到整个微服务理论。
23
26
 
24
27
  ## 源码索引
25
28
 
26
29
  - 源码位置不要假设固定目录;先按 `yss-source-index/references/source-location.md` 定位。
27
30
  - 当前技能索引:`references/source-index.md`
31
+ - OpenAPI wire profile:`references/openapi-wire-profile.yaml`
28
32
  - 重点源码入口通常包括 `CommandDTO`、`QueryDTO`、`PageQuery`、`PageRequestFactory`、`Result`、`SingleResult`、`MultiResult`、`PageResult`。
29
33
 
30
34
  当组件源码变化后,用 `yss-source-index` 刷新索引;刷新或读取前先按源码定位策略确认真实位置。
@@ -37,8 +41,13 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
37
41
  - Controller 返回优先使用项目既有的 `Result` 或派生结果对象。
38
42
  - 单对象返回优先 `SingleResult`,列表返回优先 `MultiResult`,分页返回优先 `PageResult`,前提是当前项目已采用这套体系。
39
43
  - 三种泛型结果要求 `T extends Serializable`;生成的 VO/响应类型必须满足该编译约束。
40
- - `buildSuccess(...)` 各重载设置 code 的行为并不一致;冻结契约必须测试 `success/code/message/tips/dataType`,不能只测试 data。
41
- - `needTotalCount` / `tempTotalCount` 是内部分页协作字段;当前源码中前者标注暂未实现,二者都不是客户端输入。
44
+ - OpenAPI 响应以 `YssResultMeta` 表达公共字段,并用 `allOf` 叠加 endpoint-specific `data` / page 字段;每个响应声明 `x-yss-response-wrapper: SingleResult|MultiResult|PageResult`,不得把 `SingleResult<T>` 文字写成 schema。
45
+ - wire shape 不是 Java 字段清单:`success` 为 boolean,`dataType` 为 `string|null`,`code` 只允许 `string|integer|null`;不得把全局 `code` 放宽为任意 object。
46
+ - `MultiResult.data` 和 `PageResult.data` 对外是数组,空值按 `[]` 建模;`SingleResult.data` 按 endpoint schema 建模并显式处理 nullability。
47
+ - `PageResult` 当前稳定公共字段为 `totalCount/pageSize/pageIndex/data[]`;`totalPages` 是计算 getter,只有目标 HTTP mapper / contract fixture 证明后才能进入具体契约。
48
+ - `PageQuery` 客户端输入只允许 `pageIndex/pageSize/orderBy/orderDirection/groupBy`(后四项按 profile 的 optional / whitelist 规则);`orderDirection` 只能是 `ASC|DESC`。`offset`、`needTotalCount`、`tempTotalCount` 是计算或内部协作字段,禁止成为客户端输入。
49
+ - `buildSuccess(...)` 各重载设置 code 的行为并不一致;冻结契约必须测试 `success/code/message/tips/dataType`、nullability 和三种 data shape,不能只测试 data。
50
+ - Java getter、Lombok、`@JsonIgnore` 或默认 Jackson 结果都不是目标 HTTP wire fact;冻结前必须记录 mapper identity、代表性序列化 fixture 和 contract-test / 等价 HTTP 证据。
42
51
  - DTO 只表达接口契约,不承载 Repository PO 或领域对象的持久化细节。
43
52
 
44
53
  ## 检查清单
@@ -48,6 +57,9 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
48
57
  - Service / Repository 是否真的接收到了 `PageQuery`。
49
58
  - 新增 DTO 是否与现有序列化和校验方式兼容。
50
59
  - 返回结构是否和前端或上游调用方契约一致。
60
+ - 是否通过 `scripts/verify-yss-dto-openapi-profile`,并引用 profile 版本。
61
+ - wrapper extension、`YssResultMeta`、`allOf`、具体 data schema 和方向性是否逐 endpoint 对齐。
62
+ - 是否有针对 `offset` / `needTotalCount` / `tempTotalCount` 的负向断言,以及对 `totalPages` 的目标 mapper 证据。
51
63
  - Controller、Application Service、Domain、Repository 之间是否存在 DTO/VO/DO/PO 混穿。
52
64
  - 前端 Orval 或调用方是否依赖当前返回包装结构。
53
65
 
@@ -55,6 +67,8 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
55
67
 
56
68
  - 不要在一个项目里混用多套返回包装类。
57
69
  - 不要新建与 `PageQuery` 含义重叠的分页基类。
70
+ - 不要把 `com.yss.cloud.dto.response` 作为新 API 的 canonical 包,也不要从 Java getter 机械生成 wire schema。
71
+ - 不要把 `offset`、`needTotalCount`、`tempTotalCount` 作为客户端分页输入;不要无证据把 `totalPages` 写入所有分页响应。
58
72
  - 若项目已有 `SingleResult`、`PageResult`、`MultiResult` 体系,优先保持一致。
59
73
 
60
74
  ## 按需读取
@@ -63,6 +77,7 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
63
77
  - DTO 基类示例:`assets/CommandDTO.java`、`assets/QueryDTO.java`
64
78
  - 分页基类:`assets/PageQuery.java`
65
79
  - 返回结构:`assets/Result.java`
80
+ - HTTP/JSON 映射:`references/openapi-wire-profile.yaml`
66
81
 
67
82
  ## 阶段 7 合同
68
83
 
@@ -2,4 +2,4 @@ version: 1
2
2
  interface:
3
3
  display_name: "YSS DTO"
4
4
  short_description: "统一响应、分页查询、Command 与 DTO 设计规范"
5
- default_prompt: "Use $yss-dto to define YSS-style DTOs, page queries, commands, and unified response models."
5
+ default_prompt: "Use $yss-dto to define YSS-style DTOs, page queries, commands, unified response models, and their OpenAPI HTTP/JSON wire shapes."
@@ -1,6 +1,6 @@
1
1
  # 参考资料
2
2
 
3
- 本文档详细介绍了 `yss-component-dto` 组件的核心数据传输对象(DTO)。这些 DTO 类被广泛应用于各个服务项目,用于规范数据交互格式。
3
+ 本文档详细介绍了 `yss-component-dto` 组件的核心数据传输对象(DTO)。这些 DTO 类被广泛应用于各个服务项目,用于规范数据交互格式。公开 HTTP/JSON 的可复用映射以 `openapi-wire-profile.yaml` 为准;本文不把 Java 字段或 getter 自动等同于 wire shape。
4
4
 
5
5
  ## 核心类 (Core Classes)
6
6
 
@@ -13,7 +13,7 @@
13
13
  **核心字段**:
14
14
 
15
15
  - `success`: 操作是否成功 (boolean)
16
- - `code`: 状态码 (Object, 默认 "DM-A0001")
16
+ - `code`: Java 内部类型为 `Object`;公开 wire contract 仅允许 `string | integer | null`
17
17
  - `message`: 消息描述 (String, 默认 "数据返回正常")
18
18
  - `dataType`: 返回数据格式
19
19
  - `tips`: 提示消息
@@ -44,6 +44,13 @@
44
44
  - 提供了链式调用的 Setter 方法 (`setPageIndex`, `setPageSize` 等)。
45
45
  - 自动计算偏移量 `getOffset()`。
46
46
 
47
+ ## HTTP/JSON 映射边界
48
+
49
+ - 新契约使用 `com.yss.cloud.dto.result`;`com.yss.cloud.dto.response` 只作为 legacy / compatibility 线索。
50
+ - 公共响应 schema 使用 `YssResultMeta`,具体 endpoint schema 使用 `allOf` 组合,并声明 `x-yss-response-wrapper`。
51
+ - `MultiResult.data` 和 `PageResult.data` 为数组;`SingleResult.data` 绑定具体 endpoint schema。不要把 `SingleResult<T>`、`MultiResult<T>` 或 `PageResult<T>` 的 Java 泛型文字直接写成 OpenAPI schema。
52
+ - `PageQuery` 的客户端字段是 `pageIndex/pageSize/orderBy/orderDirection/groupBy`;`offset`、`needTotalCount`、`tempTotalCount` 不属于客户端输入。`totalPages` 只有目标 mapper / contract evidence 证明后才进入响应契约。
53
+
47
54
  ### 3. CommandDTO.java & QueryDTO.java
48
55
 
49
56
  **位置**: `../assets/CommandDTO.java`, `../assets/QueryDTO.java`