create-yss-spec 2.2.9 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (763) hide show
  1. package/README.md +1 -1
  2. package/package.json +1 -1
  3. package/template/.agents/mcp_config.json +8 -0
  4. package/template/.agents/rules/yss-ai-skills.md +3 -1
  5. package/template/.agents/skills/.yss-skills-manifest.json +51 -25
  6. package/template/.agents/skills/ask-matt/SKILL.md +1 -1
  7. package/template/.agents/skills/code-review/references/yss-review-standards.md +3 -3
  8. package/template/.agents/skills/component-selection-imports/SKILL.md +2 -2
  9. package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
  10. package/template/.agents/skills/wayfinder/SKILL.md +2 -2
  11. package/template/.agents/skills/yss-api-integration/SKILL.md +85 -339
  12. package/template/.agents/skills/yss-application/SKILL.md +7 -5
  13. package/template/.agents/skills/yss-application/references/application-layer-guide.md +60 -105
  14. package/template/.agents/skills/yss-components/SKILL.md +1 -1
  15. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  16. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  17. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  18. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  19. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  20. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  21. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  22. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  23. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  24. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  25. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  26. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  27. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  28. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  29. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  30. package/template/.agents/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  31. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  32. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  33. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  34. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  35. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  36. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  37. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  38. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  39. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  40. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  41. package/template/.agents/skills/yss-design-system/SKILL.md +2 -2
  42. package/template/.agents/skills/yss-design-system/references/design-system.md +2 -2
  43. package/template/.agents/skills/yss-domain/SKILL.md +5 -4
  44. package/template/.agents/skills/yss-domain/agents/openai.yaml +2 -2
  45. package/template/.agents/skills/yss-domain/references/domain-layer-guide.md +62 -235
  46. package/template/.agents/skills/yss-dto/SKILL.md +11 -5
  47. package/template/.agents/skills/yss-dto/references/README.md +2 -2
  48. package/template/.agents/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  49. package/template/.agents/skills/yss-exception/SKILL.md +2 -0
  50. package/template/.agents/skills/yss-formily/SKILL.md +1 -1
  51. package/template/.agents/skills/yss-mybatis/SKILL.md +2 -2
  52. package/template/.agents/skills/yss-page-module-development/SKILL.md +2 -0
  53. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +1 -1
  54. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  55. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  56. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  57. package/template/.agents/skills/yss-repository/SKILL.md +19 -15
  58. package/template/.agents/skills/yss-repository/agents/openai.yaml +2 -2
  59. package/template/.agents/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  60. package/template/.agents/skills/yss-research/SKILL.md +73 -0
  61. package/template/.agents/skills/yss-research/agents/openai.yaml +3 -0
  62. package/template/.agents/skills/yss-research/assets/evidence-template.yaml +68 -0
  63. package/template/.agents/skills/yss-research/assets/research-brief-template.md +36 -0
  64. package/template/.agents/skills/yss-research/references/evidence-contract.md +42 -0
  65. package/template/.agents/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  66. package/template/.agents/skills/yss-research/tests/run-scenarios.mjs +81 -0
  67. package/template/.agents/skills/yss-router/references/router-contract.yaml +48 -10
  68. package/template/.agents/skills/yss-stage-decision/SKILL.md +2 -1
  69. package/template/.agents/skills/yss-ui/SKILL.md +6 -5
  70. package/template/.agents/skills/yss-ui/references/component-routing.md +1 -1
  71. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  72. package/template/.agents/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  73. package/template/.agents/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  74. package/template/.agents/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  75. package/template/.agents/skills/yss-use-table-height/SKILL.md +78 -297
  76. package/template/.agents/skills/yss-use-tree-height/SKILL.md +51 -393
  77. package/template/.agents/skills/yss-web-controller/SKILL.md +26 -19
  78. package/template/.agents/skills/yss-web-controller/agents/openai.yaml +2 -2
  79. package/template/.agents/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  80. package/template/.agents/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  81. package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  82. package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  83. package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  84. package/template/.agents/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  85. package/template/.agents/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  86. package/template/.agents/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  87. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  88. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  89. package/template/.claude/skills/ask-matt/SKILL.md +1 -1
  90. package/template/.claude/skills/code-review/references/yss-review-standards.md +3 -3
  91. package/template/.claude/skills/component-selection-imports/SKILL.md +2 -2
  92. package/template/.claude/skills/frontend-commit/SKILL.md +1 -1
  93. package/template/.claude/skills/wayfinder/SKILL.md +2 -2
  94. package/template/.claude/skills/yss-api-integration/SKILL.md +85 -339
  95. package/template/.claude/skills/yss-application/SKILL.md +7 -5
  96. package/template/.claude/skills/yss-application/references/application-layer-guide.md +60 -105
  97. package/template/.claude/skills/yss-components/SKILL.md +1 -1
  98. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  99. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  100. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  101. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  102. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  103. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  104. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  105. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  106. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  107. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  108. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  109. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  110. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  111. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  112. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  113. package/template/.claude/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  114. package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  115. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  116. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  117. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  118. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  119. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  120. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  121. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  122. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  123. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  124. package/template/.claude/skills/yss-design-system/SKILL.md +2 -2
  125. package/template/.claude/skills/yss-design-system/references/design-system.md +2 -2
  126. package/template/.claude/skills/yss-domain/SKILL.md +5 -4
  127. package/template/.claude/skills/yss-domain/agents/openai.yaml +2 -2
  128. package/template/.claude/skills/yss-domain/references/domain-layer-guide.md +62 -235
  129. package/template/.claude/skills/yss-dto/SKILL.md +11 -5
  130. package/template/.claude/skills/yss-dto/references/README.md +2 -2
  131. package/template/.claude/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  132. package/template/.claude/skills/yss-exception/SKILL.md +2 -0
  133. package/template/.claude/skills/yss-formily/SKILL.md +1 -1
  134. package/template/.claude/skills/yss-mybatis/SKILL.md +2 -2
  135. package/template/.claude/skills/yss-page-module-development/SKILL.md +2 -0
  136. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +1 -1
  137. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  138. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  139. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  140. package/template/.claude/skills/yss-repository/SKILL.md +19 -15
  141. package/template/.claude/skills/yss-repository/agents/openai.yaml +2 -2
  142. package/template/.claude/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  143. package/template/.claude/skills/yss-research/SKILL.md +73 -0
  144. package/template/.claude/skills/yss-research/agents/openai.yaml +3 -0
  145. package/template/.claude/skills/yss-research/assets/evidence-template.yaml +68 -0
  146. package/template/.claude/skills/yss-research/assets/research-brief-template.md +36 -0
  147. package/template/.claude/skills/yss-research/references/evidence-contract.md +42 -0
  148. package/template/.claude/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  149. package/template/.claude/skills/yss-research/tests/run-scenarios.mjs +81 -0
  150. package/template/.claude/skills/yss-router/references/router-contract.yaml +48 -10
  151. package/template/.claude/skills/yss-stage-decision/SKILL.md +2 -1
  152. package/template/.claude/skills/yss-ui/SKILL.md +6 -5
  153. package/template/.claude/skills/yss-ui/references/component-routing.md +1 -1
  154. package/template/.claude/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  155. package/template/.claude/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  156. package/template/.claude/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  157. package/template/.claude/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  158. package/template/.claude/skills/yss-use-table-height/SKILL.md +78 -297
  159. package/template/.claude/skills/yss-use-tree-height/SKILL.md +51 -393
  160. package/template/.claude/skills/yss-web-controller/SKILL.md +26 -19
  161. package/template/.claude/skills/yss-web-controller/agents/openai.yaml +2 -2
  162. package/template/.claude/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  163. package/template/.claude/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  164. package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  165. package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  166. package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  167. package/template/.claude/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  168. package/template/.claude/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  169. package/template/.claude/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  170. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  171. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  172. package/template/.codex/skills/ask-matt/SKILL.md +1 -1
  173. package/template/.codex/skills/code-review/references/yss-review-standards.md +3 -3
  174. package/template/.codex/skills/component-selection-imports/SKILL.md +2 -2
  175. package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
  176. package/template/.codex/skills/product-design/package.json +4 -2
  177. package/template/.codex/skills/product-design/skills/research/SKILL.md +22 -0
  178. package/template/.codex/skills/product-design/skills/research/assets/evidence-template.yaml +65 -0
  179. package/template/.codex/skills/product-design/skills/research/assets/research-brief-template.md +33 -0
  180. package/template/.codex/skills/product-design/skills/research/references/evidence-audited.md +80 -0
  181. package/template/.codex/skills/product-design/skills/research/scripts/validate-research-package.mjs +149 -0
  182. package/template/.codex/skills/product-design/skills/research/tests/run-scenarios.mjs +72 -0
  183. package/template/.codex/skills/wayfinder/SKILL.md +2 -2
  184. package/template/.codex/skills/yss-api-integration/SKILL.md +85 -339
  185. package/template/.codex/skills/yss-application/SKILL.md +7 -5
  186. package/template/.codex/skills/yss-application/references/application-layer-guide.md +60 -105
  187. package/template/.codex/skills/yss-components/SKILL.md +1 -1
  188. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  189. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  190. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  191. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  192. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  193. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  194. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  195. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  196. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  197. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  198. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  199. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  200. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  201. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  202. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  203. package/template/.codex/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  204. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  205. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  206. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  207. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  208. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  209. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  210. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  211. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  212. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  213. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  214. package/template/.codex/skills/yss-design-system/SKILL.md +2 -2
  215. package/template/.codex/skills/yss-design-system/references/design-system.md +2 -2
  216. package/template/.codex/skills/yss-domain/SKILL.md +5 -4
  217. package/template/.codex/skills/yss-domain/agents/openai.yaml +2 -2
  218. package/template/.codex/skills/yss-domain/references/domain-layer-guide.md +62 -235
  219. package/template/.codex/skills/yss-dto/SKILL.md +11 -5
  220. package/template/.codex/skills/yss-dto/references/README.md +2 -2
  221. package/template/.codex/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  222. package/template/.codex/skills/yss-exception/SKILL.md +2 -0
  223. package/template/.codex/skills/yss-formily/SKILL.md +1 -1
  224. package/template/.codex/skills/yss-mybatis/SKILL.md +2 -2
  225. package/template/.codex/skills/yss-page-module-development/SKILL.md +2 -0
  226. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +1 -1
  227. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  228. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  229. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  230. package/template/.codex/skills/yss-repository/SKILL.md +19 -15
  231. package/template/.codex/skills/yss-repository/agents/openai.yaml +2 -2
  232. package/template/.codex/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  233. package/template/.codex/skills/yss-research/SKILL.md +73 -0
  234. package/template/.codex/skills/yss-research/agents/openai.yaml +3 -0
  235. package/template/.codex/skills/yss-research/assets/evidence-template.yaml +68 -0
  236. package/template/.codex/skills/yss-research/assets/research-brief-template.md +36 -0
  237. package/template/.codex/skills/yss-research/references/evidence-contract.md +42 -0
  238. package/template/.codex/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  239. package/template/.codex/skills/yss-research/tests/run-scenarios.mjs +81 -0
  240. package/template/.codex/skills/yss-router/references/router-contract.yaml +48 -10
  241. package/template/.codex/skills/yss-stage-decision/SKILL.md +2 -1
  242. package/template/.codex/skills/yss-ui/SKILL.md +6 -5
  243. package/template/.codex/skills/yss-ui/references/component-routing.md +1 -1
  244. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  245. package/template/.codex/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  246. package/template/.codex/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  247. package/template/.codex/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  248. package/template/.codex/skills/yss-use-table-height/SKILL.md +78 -297
  249. package/template/.codex/skills/yss-use-tree-height/SKILL.md +51 -393
  250. package/template/.codex/skills/yss-web-controller/SKILL.md +26 -19
  251. package/template/.codex/skills/yss-web-controller/agents/openai.yaml +2 -2
  252. package/template/.codex/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  253. package/template/.codex/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  254. package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  255. package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  256. package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  257. package/template/.codex/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  258. package/template/.codex/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  259. package/template/.codex/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  260. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  261. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  262. package/template/.cursor/mcp.json +8 -0
  263. package/template/.cursor/skills/ask-matt/SKILL.md +1 -1
  264. package/template/.cursor/skills/code-review/references/yss-review-standards.md +3 -3
  265. package/template/.cursor/skills/component-selection-imports/SKILL.md +2 -2
  266. package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
  267. package/template/.cursor/skills/wayfinder/SKILL.md +2 -2
  268. package/template/.cursor/skills/yss-api-integration/SKILL.md +85 -339
  269. package/template/.cursor/skills/yss-application/SKILL.md +7 -5
  270. package/template/.cursor/skills/yss-application/references/application-layer-guide.md +60 -105
  271. package/template/.cursor/skills/yss-components/SKILL.md +1 -1
  272. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  273. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  274. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  275. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  276. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  277. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  278. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  279. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  280. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  281. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  282. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  283. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  284. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  285. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  286. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  287. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  288. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  289. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  290. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  291. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  292. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  293. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  294. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  295. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  296. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  297. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  298. package/template/.cursor/skills/yss-design-system/SKILL.md +2 -2
  299. package/template/.cursor/skills/yss-design-system/references/design-system.md +2 -2
  300. package/template/.cursor/skills/yss-domain/SKILL.md +5 -4
  301. package/template/.cursor/skills/yss-domain/agents/openai.yaml +2 -2
  302. package/template/.cursor/skills/yss-domain/references/domain-layer-guide.md +62 -235
  303. package/template/.cursor/skills/yss-dto/SKILL.md +11 -5
  304. package/template/.cursor/skills/yss-dto/references/README.md +2 -2
  305. package/template/.cursor/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  306. package/template/.cursor/skills/yss-exception/SKILL.md +2 -0
  307. package/template/.cursor/skills/yss-formily/SKILL.md +1 -1
  308. package/template/.cursor/skills/yss-mybatis/SKILL.md +2 -2
  309. package/template/.cursor/skills/yss-page-module-development/SKILL.md +2 -0
  310. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +1 -1
  311. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  312. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  313. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  314. package/template/.cursor/skills/yss-repository/SKILL.md +19 -15
  315. package/template/.cursor/skills/yss-repository/agents/openai.yaml +2 -2
  316. package/template/.cursor/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  317. package/template/.cursor/skills/yss-research/SKILL.md +73 -0
  318. package/template/.cursor/skills/yss-research/agents/openai.yaml +3 -0
  319. package/template/.cursor/skills/yss-research/assets/evidence-template.yaml +68 -0
  320. package/template/.cursor/skills/yss-research/assets/research-brief-template.md +36 -0
  321. package/template/.cursor/skills/yss-research/references/evidence-contract.md +42 -0
  322. package/template/.cursor/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  323. package/template/.cursor/skills/yss-research/tests/run-scenarios.mjs +81 -0
  324. package/template/.cursor/skills/yss-router/references/router-contract.yaml +48 -10
  325. package/template/.cursor/skills/yss-stage-decision/SKILL.md +2 -1
  326. package/template/.cursor/skills/yss-ui/SKILL.md +6 -5
  327. package/template/.cursor/skills/yss-ui/references/component-routing.md +1 -1
  328. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  329. package/template/.cursor/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  330. package/template/.cursor/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  331. package/template/.cursor/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  332. package/template/.cursor/skills/yss-use-table-height/SKILL.md +78 -297
  333. package/template/.cursor/skills/yss-use-tree-height/SKILL.md +51 -393
  334. package/template/.cursor/skills/yss-web-controller/SKILL.md +26 -19
  335. package/template/.cursor/skills/yss-web-controller/agents/openai.yaml +2 -2
  336. package/template/.cursor/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  337. package/template/.cursor/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  338. package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  339. package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  340. package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  341. package/template/.cursor/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  342. package/template/.cursor/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  343. package/template/.cursor/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  344. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  345. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  346. package/template/.cursorrules +9 -5
  347. package/template/.gemini/settings.json +8 -0
  348. package/template/.hermes/skills/ask-matt/SKILL.md +1 -1
  349. package/template/.hermes/skills/code-review/references/yss-review-standards.md +3 -3
  350. package/template/.hermes/skills/component-selection-imports/SKILL.md +2 -2
  351. package/template/.hermes/skills/frontend-commit/SKILL.md +1 -1
  352. package/template/.hermes/skills/wayfinder/SKILL.md +2 -2
  353. package/template/.hermes/skills/yss-api-integration/SKILL.md +85 -339
  354. package/template/.hermes/skills/yss-application/SKILL.md +7 -5
  355. package/template/.hermes/skills/yss-application/references/application-layer-guide.md +60 -105
  356. package/template/.hermes/skills/yss-components/SKILL.md +1 -1
  357. package/template/.hermes/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  358. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  359. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  360. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  361. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  362. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  363. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  364. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  365. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  366. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  367. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  368. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  369. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  370. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  371. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  372. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  373. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  374. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  375. package/template/.hermes/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  376. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  377. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  378. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  379. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  380. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  381. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  382. package/template/.hermes/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  383. package/template/.hermes/skills/yss-design-system/SKILL.md +2 -2
  384. package/template/.hermes/skills/yss-design-system/references/design-system.md +2 -2
  385. package/template/.hermes/skills/yss-domain/SKILL.md +5 -4
  386. package/template/.hermes/skills/yss-domain/agents/openai.yaml +2 -2
  387. package/template/.hermes/skills/yss-domain/references/domain-layer-guide.md +62 -235
  388. package/template/.hermes/skills/yss-dto/SKILL.md +11 -5
  389. package/template/.hermes/skills/yss-dto/references/README.md +2 -2
  390. package/template/.hermes/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  391. package/template/.hermes/skills/yss-exception/SKILL.md +2 -0
  392. package/template/.hermes/skills/yss-formily/SKILL.md +1 -1
  393. package/template/.hermes/skills/yss-mybatis/SKILL.md +2 -2
  394. package/template/.hermes/skills/yss-page-module-development/SKILL.md +2 -0
  395. package/template/.hermes/skills/yss-product-lifecycle/SKILL.md +1 -1
  396. package/template/.hermes/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  397. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  398. package/template/.hermes/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  399. package/template/.hermes/skills/yss-repository/SKILL.md +19 -15
  400. package/template/.hermes/skills/yss-repository/agents/openai.yaml +2 -2
  401. package/template/.hermes/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  402. package/template/.hermes/skills/yss-research/SKILL.md +73 -0
  403. package/template/.hermes/skills/yss-research/agents/openai.yaml +3 -0
  404. package/template/.hermes/skills/yss-research/assets/evidence-template.yaml +68 -0
  405. package/template/.hermes/skills/yss-research/assets/research-brief-template.md +36 -0
  406. package/template/.hermes/skills/yss-research/references/evidence-contract.md +42 -0
  407. package/template/.hermes/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  408. package/template/.hermes/skills/yss-research/tests/run-scenarios.mjs +81 -0
  409. package/template/.hermes/skills/yss-router/references/router-contract.yaml +48 -10
  410. package/template/.hermes/skills/yss-stage-decision/SKILL.md +2 -1
  411. package/template/.hermes/skills/yss-ui/SKILL.md +6 -5
  412. package/template/.hermes/skills/yss-ui/references/component-routing.md +1 -1
  413. package/template/.hermes/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  414. package/template/.hermes/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  415. package/template/.hermes/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  416. package/template/.hermes/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  417. package/template/.hermes/skills/yss-use-table-height/SKILL.md +78 -297
  418. package/template/.hermes/skills/yss-use-tree-height/SKILL.md +51 -393
  419. package/template/.hermes/skills/yss-web-controller/SKILL.md +26 -19
  420. package/template/.hermes/skills/yss-web-controller/agents/openai.yaml +2 -2
  421. package/template/.hermes/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  422. package/template/.hermes/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  423. package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  424. package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  425. package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  426. package/template/.hermes/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  427. package/template/.hermes/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  428. package/template/.hermes/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  429. package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  430. package/template/.hermes/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  431. package/template/.kiro/settings/mcp.json +8 -0
  432. package/template/.mcp.json +8 -0
  433. package/template/.pi/skills/ask-matt/SKILL.md +1 -1
  434. package/template/.pi/skills/code-review/references/yss-review-standards.md +3 -3
  435. package/template/.pi/skills/component-selection-imports/SKILL.md +2 -2
  436. package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
  437. package/template/.pi/skills/wayfinder/SKILL.md +2 -2
  438. package/template/.pi/skills/yss-api-integration/SKILL.md +85 -339
  439. package/template/.pi/skills/yss-application/SKILL.md +7 -5
  440. package/template/.pi/skills/yss-application/references/application-layer-guide.md +60 -105
  441. package/template/.pi/skills/yss-components/SKILL.md +1 -1
  442. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  443. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  444. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  445. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  446. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  447. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  448. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  449. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  450. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  451. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  452. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  453. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  454. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  455. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  456. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  457. package/template/.pi/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  458. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  459. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  460. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  461. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  462. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  463. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  464. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  465. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  466. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  467. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  468. package/template/.pi/skills/yss-design-system/SKILL.md +2 -2
  469. package/template/.pi/skills/yss-design-system/references/design-system.md +2 -2
  470. package/template/.pi/skills/yss-domain/SKILL.md +5 -4
  471. package/template/.pi/skills/yss-domain/agents/openai.yaml +2 -2
  472. package/template/.pi/skills/yss-domain/references/domain-layer-guide.md +62 -235
  473. package/template/.pi/skills/yss-dto/SKILL.md +11 -5
  474. package/template/.pi/skills/yss-dto/references/README.md +2 -2
  475. package/template/.pi/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  476. package/template/.pi/skills/yss-exception/SKILL.md +2 -0
  477. package/template/.pi/skills/yss-formily/SKILL.md +1 -1
  478. package/template/.pi/skills/yss-mybatis/SKILL.md +2 -2
  479. package/template/.pi/skills/yss-page-module-development/SKILL.md +2 -0
  480. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +1 -1
  481. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  482. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  483. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  484. package/template/.pi/skills/yss-repository/SKILL.md +19 -15
  485. package/template/.pi/skills/yss-repository/agents/openai.yaml +2 -2
  486. package/template/.pi/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  487. package/template/.pi/skills/yss-research/SKILL.md +73 -0
  488. package/template/.pi/skills/yss-research/agents/openai.yaml +3 -0
  489. package/template/.pi/skills/yss-research/assets/evidence-template.yaml +68 -0
  490. package/template/.pi/skills/yss-research/assets/research-brief-template.md +36 -0
  491. package/template/.pi/skills/yss-research/references/evidence-contract.md +42 -0
  492. package/template/.pi/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  493. package/template/.pi/skills/yss-research/tests/run-scenarios.mjs +81 -0
  494. package/template/.pi/skills/yss-router/references/router-contract.yaml +48 -10
  495. package/template/.pi/skills/yss-stage-decision/SKILL.md +2 -1
  496. package/template/.pi/skills/yss-ui/SKILL.md +6 -5
  497. package/template/.pi/skills/yss-ui/references/component-routing.md +1 -1
  498. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  499. package/template/.pi/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  500. package/template/.pi/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  501. package/template/.pi/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  502. package/template/.pi/skills/yss-use-table-height/SKILL.md +78 -297
  503. package/template/.pi/skills/yss-use-tree-height/SKILL.md +51 -393
  504. package/template/.pi/skills/yss-web-controller/SKILL.md +26 -19
  505. package/template/.pi/skills/yss-web-controller/agents/openai.yaml +2 -2
  506. package/template/.pi/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  507. package/template/.pi/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  508. package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  509. package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  510. package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  511. package/template/.pi/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  512. package/template/.pi/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  513. package/template/.pi/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  514. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  515. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  516. package/template/.qoder/skills/ask-matt/SKILL.md +1 -1
  517. package/template/.qoder/skills/code-review/references/yss-review-standards.md +3 -3
  518. package/template/.qoder/skills/component-selection-imports/SKILL.md +2 -2
  519. package/template/.qoder/skills/frontend-commit/SKILL.md +1 -1
  520. package/template/.qoder/skills/wayfinder/SKILL.md +2 -2
  521. package/template/.qoder/skills/yss-api-integration/SKILL.md +85 -339
  522. package/template/.qoder/skills/yss-application/SKILL.md +7 -5
  523. package/template/.qoder/skills/yss-application/references/application-layer-guide.md +60 -105
  524. package/template/.qoder/skills/yss-components/SKILL.md +1 -1
  525. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  526. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  527. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  528. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  529. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  530. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  531. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  532. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  533. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  534. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  535. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  536. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  537. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  538. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  539. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  540. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  541. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  542. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  543. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  544. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  545. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  546. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  547. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  548. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  549. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  550. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  551. package/template/.qoder/skills/yss-design-system/SKILL.md +2 -2
  552. package/template/.qoder/skills/yss-design-system/references/design-system.md +2 -2
  553. package/template/.qoder/skills/yss-domain/SKILL.md +5 -4
  554. package/template/.qoder/skills/yss-domain/agents/openai.yaml +2 -2
  555. package/template/.qoder/skills/yss-domain/references/domain-layer-guide.md +62 -235
  556. package/template/.qoder/skills/yss-dto/SKILL.md +11 -5
  557. package/template/.qoder/skills/yss-dto/references/README.md +2 -2
  558. package/template/.qoder/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  559. package/template/.qoder/skills/yss-exception/SKILL.md +2 -0
  560. package/template/.qoder/skills/yss-formily/SKILL.md +1 -1
  561. package/template/.qoder/skills/yss-mybatis/SKILL.md +2 -2
  562. package/template/.qoder/skills/yss-page-module-development/SKILL.md +2 -0
  563. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +1 -1
  564. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  565. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  566. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  567. package/template/.qoder/skills/yss-repository/SKILL.md +19 -15
  568. package/template/.qoder/skills/yss-repository/agents/openai.yaml +2 -2
  569. package/template/.qoder/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  570. package/template/.qoder/skills/yss-research/SKILL.md +73 -0
  571. package/template/.qoder/skills/yss-research/agents/openai.yaml +3 -0
  572. package/template/.qoder/skills/yss-research/assets/evidence-template.yaml +68 -0
  573. package/template/.qoder/skills/yss-research/assets/research-brief-template.md +36 -0
  574. package/template/.qoder/skills/yss-research/references/evidence-contract.md +42 -0
  575. package/template/.qoder/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  576. package/template/.qoder/skills/yss-research/tests/run-scenarios.mjs +81 -0
  577. package/template/.qoder/skills/yss-router/references/router-contract.yaml +48 -10
  578. package/template/.qoder/skills/yss-stage-decision/SKILL.md +2 -1
  579. package/template/.qoder/skills/yss-ui/SKILL.md +6 -5
  580. package/template/.qoder/skills/yss-ui/references/component-routing.md +1 -1
  581. package/template/.qoder/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  582. package/template/.qoder/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  583. package/template/.qoder/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  584. package/template/.qoder/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  585. package/template/.qoder/skills/yss-use-table-height/SKILL.md +78 -297
  586. package/template/.qoder/skills/yss-use-tree-height/SKILL.md +51 -393
  587. package/template/.qoder/skills/yss-web-controller/SKILL.md +26 -19
  588. package/template/.qoder/skills/yss-web-controller/agents/openai.yaml +2 -2
  589. package/template/.qoder/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  590. package/template/.qoder/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  591. package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  592. package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  593. package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  594. package/template/.qoder/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  595. package/template/.qoder/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  596. package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  597. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  598. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  599. package/template/.trae/skills/ask-matt/SKILL.md +1 -1
  600. package/template/.trae/skills/code-review/references/yss-review-standards.md +3 -3
  601. package/template/.trae/skills/component-selection-imports/SKILL.md +2 -2
  602. package/template/.trae/skills/frontend-commit/SKILL.md +1 -1
  603. package/template/.trae/skills/wayfinder/SKILL.md +2 -2
  604. package/template/.trae/skills/yss-api-integration/SKILL.md +85 -339
  605. package/template/.trae/skills/yss-application/SKILL.md +7 -5
  606. package/template/.trae/skills/yss-application/references/application-layer-guide.md +60 -105
  607. package/template/.trae/skills/yss-components/SKILL.md +1 -1
  608. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +39 -14
  609. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application-local.yml.template +8 -0
  610. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +2 -3
  611. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/java/architecture-rules-test.java.template +36 -0
  612. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/java/bootstrap-application.java.template +15 -0
  613. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/adapter-pom.xml.template +3 -3
  614. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +13 -4
  615. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +24 -4
  616. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/domain-pom.xml.template +6 -20
  617. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/infrastructure-pom.xml.template +26 -6
  618. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +70 -10
  619. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +24 -10
  620. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/maven.config +2 -3
  621. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/settings.xml +18 -105
  622. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/wrapper/.mvn/wrapper/maven-wrapper.properties +4 -2
  623. package/template/.trae/skills/yss-ddd-scaffold-generator/references/ARCHITECTURE.md +78 -156
  624. package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +90 -385
  625. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +20 -188
  626. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +42 -122
  627. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +225 -0
  628. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +164 -0
  629. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +126 -0
  630. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +153 -42
  631. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +172 -0
  632. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +87 -7
  633. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +335 -12
  634. package/template/.trae/skills/yss-design-system/SKILL.md +2 -2
  635. package/template/.trae/skills/yss-design-system/references/design-system.md +2 -2
  636. package/template/.trae/skills/yss-domain/SKILL.md +5 -4
  637. package/template/.trae/skills/yss-domain/agents/openai.yaml +2 -2
  638. package/template/.trae/skills/yss-domain/references/domain-layer-guide.md +62 -235
  639. package/template/.trae/skills/yss-dto/SKILL.md +11 -5
  640. package/template/.trae/skills/yss-dto/references/README.md +2 -2
  641. package/template/.trae/skills/yss-dto/references/openapi-wire-profile.yaml +9 -3
  642. package/template/.trae/skills/yss-exception/SKILL.md +2 -0
  643. package/template/.trae/skills/yss-formily/SKILL.md +1 -1
  644. package/template/.trae/skills/yss-mybatis/SKILL.md +2 -2
  645. package/template/.trae/skills/yss-page-module-development/SKILL.md +2 -0
  646. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +1 -1
  647. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +2 -2
  648. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +54 -21
  649. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  650. package/template/.trae/skills/yss-repository/SKILL.md +19 -15
  651. package/template/.trae/skills/yss-repository/agents/openai.yaml +2 -2
  652. package/template/.trae/skills/yss-repository/references/infrastructure-layer-guide.md +70 -155
  653. package/template/.trae/skills/yss-research/SKILL.md +73 -0
  654. package/template/.trae/skills/yss-research/agents/openai.yaml +3 -0
  655. package/template/.trae/skills/yss-research/assets/evidence-template.yaml +68 -0
  656. package/template/.trae/skills/yss-research/assets/research-brief-template.md +36 -0
  657. package/template/.trae/skills/yss-research/references/evidence-contract.md +42 -0
  658. package/template/.trae/skills/yss-research/scripts/validate-research-package.mjs +128 -0
  659. package/template/.trae/skills/yss-research/tests/run-scenarios.mjs +81 -0
  660. package/template/.trae/skills/yss-router/references/router-contract.yaml +48 -10
  661. package/template/.trae/skills/yss-stage-decision/SKILL.md +2 -1
  662. package/template/.trae/skills/yss-ui/SKILL.md +6 -5
  663. package/template/.trae/skills/yss-ui/references/component-routing.md +1 -1
  664. package/template/.trae/skills/yss-ui-business-page-generation/SKILL.md +159 -0
  665. package/template/.trae/skills/yss-ui-business-page-generation/references/component-map.md +39 -0
  666. package/template/.trae/skills/yss-ui-business-page-generation/references/hooks-map.md +70 -0
  667. package/template/.trae/skills/yss-ui-business-page-generation/references/utils-map.md +51 -0
  668. package/template/.trae/skills/yss-use-table-height/SKILL.md +78 -297
  669. package/template/.trae/skills/yss-use-tree-height/SKILL.md +51 -393
  670. package/template/.trae/skills/yss-web-controller/SKILL.md +26 -19
  671. package/template/.trae/skills/yss-web-controller/agents/openai.yaml +2 -2
  672. package/template/.trae/skills/yss-web-controller/assets/templates/Controller.java.template +21 -22
  673. package/template/.trae/skills/yss-web-controller/assets/templates/WebConvertor.java.template +19 -12
  674. package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/CreateRequest.java.template +19 -0
  675. package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/PageRequest.java.template +21 -0
  676. package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/Response.java.template +18 -0
  677. package/template/.trae/skills/yss-web-controller/assets/templates/web/dto/UpdateRequest.java.template +19 -0
  678. package/template/.trae/skills/yss-web-controller/references/web-adapter-layer-guide.md +63 -145
  679. package/template/.trae/skills/yss-web-controller/references/web-generation-contract.schema.json +97 -0
  680. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +168 -19
  681. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +144 -7
  682. package/template/.vscode/mcp.json +8 -0
  683. package/template/AGENTS.md +2 -2
  684. package/template/CONTEXT.md +1 -1
  685. package/template/README.md +3 -0
  686. package/template/docs/agents/digital-human-roles.yaml +3 -3
  687. package/template/docs/agents/skills-maintenance.md +7 -4
  688. package/template/docs/agents/yss-skill-registry.yaml +25 -4
  689. package/template/docs/agents/yss-ui-skills-integration.md +24 -0
  690. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
  691. package/template/docs/process/template-verification-profiles.yaml +11 -0
  692. package/template/docs/templates/implementation-routing-template.md +5 -3
  693. package/template/docs/templates/review-report-template.md +2 -2
  694. package/template/docs/user-guide/yss-ui-mcp.md +43 -0
  695. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
  696. package/template/scripts/lib/scenario-checks.mjs +11 -7
  697. package/template/scripts/lib/skill-governance.mjs +36 -2
  698. package/template/scripts/lib/skill-registry.mjs +51 -6
  699. package/template/scripts/lib/skill-supply-chain.mjs +75 -3
  700. package/template/scripts/verify-scaffold-generator-scenarios +150 -44
  701. package/template/scripts/verify-skill-governance +1 -1
  702. package/template/scripts/verify-upstream-skill-source +38 -3
  703. package/template/scripts/verify-yss-dto-openapi-profile +12 -2
  704. package/template/skills-lock.json +182 -107
  705. package/template/yss-public-skills.json +2 -0
  706. package/template.manifest.json +4 -0
  707. package/template.snapshot.json +5 -5
  708. package/template/.agents/skills/research/SKILL.md +0 -12
  709. package/template/.agents/skills/research/agents/openai.yaml +0 -3
  710. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  711. package/template/.agents/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  712. package/template/.agents/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  713. package/template/.agents/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  714. package/template/.agents/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  715. package/template/.claude/skills/research/SKILL.md +0 -12
  716. package/template/.claude/skills/research/agents/openai.yaml +0 -3
  717. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  718. package/template/.claude/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  719. package/template/.claude/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  720. package/template/.claude/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  721. package/template/.claude/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  722. package/template/.codex/skills/research/SKILL.md +0 -12
  723. package/template/.codex/skills/research/agents/openai.yaml +0 -3
  724. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  725. package/template/.codex/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  726. package/template/.codex/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  727. package/template/.codex/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  728. package/template/.codex/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  729. package/template/.cursor/skills/research/SKILL.md +0 -12
  730. package/template/.cursor/skills/research/agents/openai.yaml +0 -3
  731. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  732. package/template/.cursor/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  733. package/template/.cursor/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  734. package/template/.cursor/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  735. package/template/.cursor/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  736. package/template/.hermes/skills/research/SKILL.md +0 -12
  737. package/template/.hermes/skills/research/agents/openai.yaml +0 -3
  738. package/template/.hermes/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  739. package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  740. package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  741. package/template/.hermes/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  742. package/template/.hermes/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  743. package/template/.pi/skills/research/SKILL.md +0 -12
  744. package/template/.pi/skills/research/agents/openai.yaml +0 -3
  745. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  746. package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  747. package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  748. package/template/.pi/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  749. package/template/.pi/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  750. package/template/.qoder/skills/research/SKILL.md +0 -12
  751. package/template/.qoder/skills/research/agents/openai.yaml +0 -3
  752. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  753. package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  754. package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  755. package/template/.qoder/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  756. package/template/.qoder/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
  757. package/template/.trae/skills/research/SKILL.md +0 -12
  758. package/template/.trae/skills/research/agents/openai.yaml +0 -3
  759. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/parent-pom.xml.template +0 -84
  760. package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/cmd/AddCmd.java.template +0 -23
  761. package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/cmd/UpdateCmd.java.template +0 -23
  762. package/template/.trae/skills/yss-web-controller/assets/templates/domain/dto/query/PageQuery.java.template +0 -21
  763. package/template/.trae/skills/yss-web-controller/assets/templates/domain/vo/VO.java.template +0 -20
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /** YSS DDD 后端纯工程骨架生成器;只生成工程结构,不生成任何业务行为。 */
3
+ import { createHash } from "node:crypto";
3
4
  import { chmod, cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile, copyFile } from "node:fs/promises";
4
5
  import path from "node:path";
5
6
  import process from "node:process";
@@ -15,17 +16,41 @@ const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
15
16
  const SKILL_ROOT = path.resolve(SCRIPT_DIR, "..");
16
17
  const REPOSITORY_ROOT = path.resolve(SCRIPT_DIR, "../../../..");
17
18
  const COMMANDS = ["./mvnw validate", "./mvnw test", "./mvnw package"];
18
-
19
+ const SUPPORTED_PROFILES = Object.freeze({
20
+ architecture: "target-domain-model",
21
+ persistence: "mybatis-plus",
22
+ database: "mysql",
23
+ platform: "spring-boot-2.7-jdk8",
24
+ validation_namespace: "javax",
25
+ dto_placement: "web",
26
+ repository: "yss-internal"
27
+ });
28
+ const DOWNSTREAM_SKILLS = [
29
+ "yss-domain",
30
+ "yss-application",
31
+ "yss-repository",
32
+ "yss-mybatis",
33
+ "yss-web-controller",
34
+ "yss-dto",
35
+ "yss-exception",
36
+ "yss-validation",
37
+ "mapstruct",
38
+ "lombok",
39
+ "alibaba-java-code-style"
40
+ ];
19
41
  function fail(message) { throw new Error(message); }
20
42
  function isoNow() { return new Date().toISOString(); }
21
43
  function localDate() { return new Date().toISOString().slice(0, 10); }
22
- function backupStamp() { return new Date().toISOString().replace(/[-:TZ.]/g, ""); }
44
+ function toUpperCamel(value) { return value.split("-").map((part) => `${part[0].toUpperCase()}${part.slice(1)}`).join(""); }
45
+ function sha256(content) { return createHash("sha256").update(content).digest("hex"); }
23
46
  function usage(error) {
24
47
  const text = `YSS DDD 脚手架生成器\n\n` +
25
48
  `用法: node scripts/generate_scaffold.mjs --project-name <kebab-case> --base-package <package> --output-dir <dir> --contract-file <json> [选项]\n\n` +
26
49
  `必填合同元数据: --contract-id --contract-version --approval-ref --router-draft-ref --persisted-ref\n` +
27
- `选项: --database mysql, --force, --overwrite-scope <scope>, --rollback-ref <ref>\n` +
28
- `--with-example 已禁用;--without-example 是兼容的无操作参数。`;
50
+ `Maven 坐标: --group-id --project-version --parent-group-id --parent-artifact-id --parent-version --yss-components-version\n` +
51
+ `固定 Profile: target-domain-model / mybatis-plus / spring-boot-2.7-jdk8 / javax / web / yss-internal\n` +
52
+ `本生成器严格 initialize-only;--force 和任何已有项目目标均为 unsupported。\n` +
53
+ `--with-example 已禁用;--without-example 仅保留为无操作参数。`;
29
54
  if (error) process.stderr.write(`错误: ${error}\n\n`);
30
55
  process.stdout.write(`${text}\n`);
31
56
  }
@@ -36,7 +61,10 @@ function parseArgs(argv) {
36
61
  ["--project-name", "projectName"], ["--base-package", "basePackage"], ["--output-dir", "outputDir"],
37
62
  ["--database", "database"], ["--contract-id", "contractId"], ["--contract-version", "contractVersion"],
38
63
  ["--approval-ref", "approvalRef"], ["--router-draft-ref", "routerDraftRef"], ["--persisted-ref", "persistedRef"],
39
- ["--contract-file", "contractFile"], ["--overwrite-scope", "overwriteScope"], ["--rollback-ref", "rollbackRef"],
64
+ ["--contract-file", "contractFile"],
65
+ ["--group-id", "groupId"], ["--project-version", "projectVersion"], ["--parent-group-id", "parentGroupId"],
66
+ ["--parent-artifact-id", "parentArtifactId"], ["--parent-version", "parentVersion"],
67
+ ["--yss-components-version", "yssComponentsVersion"],
40
68
  ]);
41
69
  for (let index = 0; index < argv.length; index += 1) {
42
70
  let token = argv[index];
@@ -54,7 +82,7 @@ function parseArgs(argv) {
54
82
  }
55
83
  if (options.help) return options;
56
84
  for (const [flag, key] of mapping) {
57
- if (["database", "overwriteScope", "rollbackRef", "contractId", "contractVersion", "approvalRef", "routerDraftRef", "persistedRef"].includes(key)) continue;
85
+ if (["database", "overwriteScope", "rollbackRef", "contractId", "contractVersion", "approvalRef", "routerDraftRef", "persistedRef", "groupId", "projectVersion", "parentGroupId", "parentArtifactId", "parentVersion", "yssComponentsVersion"].includes(key)) continue;
58
86
  if (!options[key]) fail(`缺少必填参数: ${flag}`);
59
87
  }
60
88
  if (options.database !== "mysql") fail("参数 --database 只支持 mysql");
@@ -63,15 +91,37 @@ function parseArgs(argv) {
63
91
  if (options.contractVersion !== undefined && (!/^\d+$/.test(options.contractVersion) || Number(options.contractVersion) < 1)) fail("--contract-version(必须为正整数)");
64
92
  if (options.contractVersion !== undefined) options.contractVersion = Number(options.contractVersion);
65
93
  if (options.withExample) fail("--with-example 已禁用;业务代码必须由批准的 YSS Slice skill 逐切片生成");
94
+ if (options.force) fail("unsupported: initialize-only 脚手架禁止 --force,也不承担旧项目迁移或模板升级");
66
95
  return options;
67
96
  }
68
97
 
69
98
  async function exists(target) { try { await lstat(target); return true; } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
70
99
  async function isFile(target) { try { return (await stat(target)).isFile(); } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
71
- async function nonEmpty(target) { const info = await lstat(target); return !info.isDirectory() || (await readdir(target)).length > 0; }
72
100
  async function readJson(target, message) { try { return JSON.parse(await readFile(target, "utf8")); } catch (error) { fail(`${message}: ${target}`); } }
73
101
  async function writeText(target, content) { await mkdir(path.dirname(target), { recursive: true }); await writeFile(target, content, "utf8"); }
74
102
  function isPresent(value) { return value !== undefined && value !== null && value !== "" && (!Array.isArray(value) || value.length > 0); }
103
+ function isWithin(parent, target) { const relative = path.relative(parent, target); return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative)); }
104
+ async function fileEntries(root, { exclude = new Set() } = {}) {
105
+ const output = [];
106
+ const visit = async (directory) => {
107
+ for (const entry of (await readdir(directory, { withFileTypes: true })).sort((left, right) => left.name.localeCompare(right.name))) {
108
+ const absolute = path.join(directory, entry.name);
109
+ const relative = path.relative(root, absolute).split(path.sep).join("/");
110
+ if (exclude.has(relative)) continue;
111
+ if (entry.isDirectory()) await visit(absolute);
112
+ else if (entry.isFile()) output.push({ absolute, relative });
113
+ }
114
+ };
115
+ await visit(root);
116
+ return output;
117
+ }
118
+ async function treeDigest(root) {
119
+ const hash = createHash("sha256");
120
+ for (const entry of await fileEntries(root)) {
121
+ hash.update(entry.relative).update("\0").update(await readFile(entry.absolute)).update("\0");
122
+ }
123
+ return hash.digest("hex");
124
+ }
75
125
 
76
126
  class ScaffoldGenerator {
77
127
  constructor(options) {
@@ -84,13 +134,19 @@ class ScaffoldGenerator {
84
134
  this.projectRoot = this.finalProjectRoot;
85
135
  this.templateRoot = path.join(SKILL_ROOT, "assets", "templates");
86
136
  this.configTemplateDir = path.join(this.templateRoot, "config");
137
+ this.javaTemplateDir = path.join(this.templateRoot, "java");
87
138
  this.pomTemplateDir = path.join(this.templateRoot, "pom");
88
139
  this.packagePath = this.basePackage.replaceAll(".", path.sep);
89
140
  this.author = process.env.USER || "yss-team";
90
141
  this.date = localDate();
91
- this.groupId = this.basePackage.split(".").slice(0, 2).join(".");
92
142
  this.dbName = this.projectName.replaceAll("-", "_");
143
+ this.applicationClassName = `${toUpperCamel(this.projectName)}Application`;
144
+ this.bootstrapMainSource = `${this.projectName}-bootstrap/src/main/java/${this.basePackage.replaceAll(".", "/")}/${this.applicationClassName}.java`;
93
145
  this.scaffoldContract = undefined;
146
+ this.mavenCoordinates = undefined;
147
+ this.mavenCoordinatesSource = "approved-contract";
148
+ this.contractDigest = undefined;
149
+ this.profiles = structuredClone(SUPPORTED_PROFILES);
94
150
  }
95
151
 
96
152
  gitRootForOutput() {
@@ -108,30 +164,22 @@ class ScaffoldGenerator {
108
164
  const gitlinkViolation = gitSubmoduleScaffoldViolation(gitRoot, this.outputDir, this.projectName, { force: this.options.force });
109
165
  if (gitlinkViolation) fail(gitlinkViolation);
110
166
  this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
167
+ await this.validateContractMetadata();
111
168
  const targetExists = await exists(this.finalProjectRoot);
112
169
  if (targetExists) {
113
170
  this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
114
- if (!this.options.force) fail(`输出目录已存在: ${this.finalProjectRoot};如确认覆盖,请显式传入 --force`);
171
+ fail(`unsupported: initialize-only 脚手架只创建全新项目,拒绝已存在目标: ${this.finalProjectRoot}`);
115
172
  }
116
- await this.validateContractMetadata();
117
- if (targetExists && await nonEmpty(this.finalProjectRoot) && this.options.force) this.validateForceMetadata();
118
173
  await mkdir(this.outputDir, { recursive: true });
119
174
  const stagingRoot = await mkdtemp(path.join(this.outputDir, `.${this.projectName}.staging-`));
120
175
  this.projectRoot = path.join(stagingRoot, this.projectName);
121
176
  try {
122
177
  console.log(`🚀 开始生成项目: ${this.projectName}\n📦 基础包名: ${this.basePackage}\n📁 输出目录: ${this.outputDir}\n`);
123
- await this.createProjectStructure(); await this.generatePomFiles(); await this.generateConfigFiles();
124
- this.generateDatabaseScripts(); await this.generateDocumentation(); await this.writeGenerationManifest();
125
- await this.copyWrapperFiles(); await this.validateGeneratedArtifacts();
126
- let backupPath;
127
- if (await exists(this.finalProjectRoot)) {
128
- this.refuseGitlinkAsRegularDirectory(gitRoot, this.finalProjectRoot);
129
- backupPath = path.join(this.outputDir, `.${this.projectName}.backup-${backupStamp()}`);
130
- await rename(this.finalProjectRoot, backupPath);
131
- }
178
+ await this.createProjectStructure(); await this.generatePomFiles(); await this.generateBootstrapSource(); await this.generateArchitectureRules(); await this.generateConfigFiles();
179
+ this.generateDatabaseScripts(); await this.generateDocumentation(); await this.copyWrapperFiles();
180
+ await this.writeGenerationManifest(); await this.validateGeneratedArtifacts();
132
181
  await rename(this.projectRoot, this.finalProjectRoot); this.projectRoot = this.finalProjectRoot;
133
- console.log(`\n✅ 项目生成完成!\n📂 项目位置: ${this.projectRoot}`);
134
- if (backupPath) console.log(`♻️ 原项目备份: ${backupPath}`);
182
+ console.log(`\n✅ 工程文件生成完成,等待受控 Maven 验证\n📂 项目位置: ${this.projectRoot}`);
135
183
  console.log(`\n🎯 下一步:\n cd ${this.projectRoot}\n ./mvnw validate\n ./mvnw test\n ./mvnw package\n ./mvnw spring-boot:run -pl ${this.projectName}-bootstrap`);
136
184
  } catch (error) { await rm(stagingRoot, { recursive: true, force: true }); throw error; }
137
185
  }
@@ -148,15 +196,17 @@ class ScaffoldGenerator {
148
196
 
149
197
  async validateContractMetadata() {
150
198
  if (!await isFile(this.contractFile)) fail("必须提供已持久化的结构化脚手架合同 JSON 文件: --contract-file");
151
- const contract = await readJson(this.contractFile, "脚手架合同文件无法读取或不是合法 JSON");
199
+ const contractText = await readFile(this.contractFile, "utf8");
200
+ let contract; try { contract = JSON.parse(contractText); } catch { fail(`脚手架合同文件无法读取或不是合法 JSON: ${this.contractFile}`); }
152
201
  if (!contract || Array.isArray(contract) || typeof contract !== "object") fail("脚手架合同必须是 JSON 对象");
202
+ if (contract.schema_version !== 2) fail(`unsupported: scaffold contract schema_version=${contract.schema_version};只接受 Target Profile schema v2,不提供自动升级`);
153
203
  const requiredMetadata = [["--contract-id", this.options.contractId], ["--contract-version", this.options.contractVersion], ["--approval-ref", this.options.approvalRef], ["--router-draft-ref", this.options.routerDraftRef], ["--persisted-ref", this.options.persistedRef]];
154
204
  const missing = requiredMetadata.filter(([, value]) => !isPresent(value)).map(([flag]) => flag);
155
205
  if (missing.length) fail(`生成项目必须提供当前已批准脚手架合同的完整元数据: ${missing.join(", ")}`);
156
- const required = ["schema_version", "contract_id", "contract_version", "slice_id", "status", "router_draft_ref", "lifecycle_approval_ref", "persisted_ref", "current_version", "implementation_repository", "backend_repository", "scaffold_status", "target_git_url_or_output_dir", "allowed_write_paths", "expected_evidence_files", "verification_commands", "approval", "work_unit", "overwrite_policy"];
206
+ const required = ["schema_version", "contract_id", "contract_version", "scaffold_request_id", "status", "router_draft_ref", "lifecycle_approval_ref", "persisted_ref", "current_version", "implementation_repository", "backend_repository", "scaffold_status", "project_name", "target_output_dir", "base_package", "maven_coordinates", "profiles", "allowed_write_paths", "expected_evidence_files", "verification_commands", "approval", "work_unit", "generation_policy"];
157
207
  const missingFields = required.filter((field) => !isPresent(contract[field]));
158
208
  if (missingFields.length) fail(`脚手架合同缺少结构化字段: ${missingFields.join(", ")}`);
159
- if (contract.schema_version !== 1 || contract.status !== "approved") fail("脚手架合同必须是 schema_version=1 且已由生命周期批准");
209
+ if (contract.status !== "approved") fail("脚手架合同必须已由生命周期批准");
160
210
  if (contract.contract_id !== this.options.contractId) fail("--contract-id 与脚手架合同不一致");
161
211
  if (contract.contract_version !== this.options.contractVersion) fail("--contract-version 与脚手架合同不一致");
162
212
  if (contract.current_version !== contract.contract_version) fail("脚手架合同版本不是当前版本");
@@ -164,10 +214,13 @@ class ScaffoldGenerator {
164
214
  if (contract.persisted_ref !== this.options.persistedRef) fail("--persisted-ref 与脚手架合同不一致");
165
215
  if (contract.lifecycle_approval_ref !== this.options.approvalRef) fail("--approval-ref 与脚手架合同不一致");
166
216
  if (contract.scaffold_status !== "required") fail("脚手架生成器只接受 scaffold_status=required");
217
+ if (contract.project_name !== this.projectName) fail("--project-name 与脚手架合同不一致");
218
+ if (contract.base_package !== this.basePackage) fail("--base-package 与脚手架合同不一致");
167
219
  if (!["allowed_write_paths", "expected_evidence_files", "verification_commands"].every((field) => Array.isArray(contract[field]) && contract[field].length)) fail("脚手架合同的 allowed_write_paths、expected_evidence_files、verification_commands 必须非空");
168
220
  if (!contract.expected_evidence_files.map(String).join(" ").includes(".yss/scaffold-generation.json")) fail("脚手架合同 expected_evidence_files 必须包含 .yss/scaffold-generation.json");
169
- const targetRef = String(contract.target_git_url_or_output_dir);
170
- if (!targetRef.includes("://") && !targetRef.startsWith("git@") && path.resolve(targetRef) !== this.outputDir) fail("脚手架合同目标目录与 --output-dir 不一致");
221
+ if (path.resolve(String(contract.target_output_dir)) !== this.outputDir) fail("脚手架合同 target_output_dir 与 --output-dir 不一致");
222
+ const allowedRoots = contract.allowed_write_paths.map((item) => path.resolve(this.outputDir, String(item)));
223
+ if (!allowedRoots.some((root) => isWithin(root, this.finalProjectRoot))) fail("实际项目根不在脚手架合同 allowed_write_paths 内");
171
224
  if (JSON.stringify(contract.verification_commands) !== JSON.stringify(COMMANDS)) fail("脚手架合同验证命令必须固定为三条项目根目录 ./mvnw 命令");
172
225
  const approval = contract.approval;
173
226
  if (!approval || typeof approval !== "object" || ["approval_ref", "approver", "persisted_ref", "current_version"].some((field) => !isPresent(approval[field]))) fail("脚手架合同 approval 记录不完整");
@@ -178,23 +231,57 @@ class ScaffoldGenerator {
178
231
  if (!workUnit || typeof workUnit !== "object" || workFields.some((field) => !isPresent(workUnit[field]))) fail("脚手架合同 work_unit 结构不完整");
179
232
  if (workUnit.primary_skill !== "yss-ddd-scaffold-generator" || workUnit.tdd_mode !== "controlled-generation" || workUnit.controlled_generation !== true) fail("脚手架合同 work_unit 必须绑定本 skill 和 controlled-generation");
180
233
  if (JSON.stringify(workUnit.verification_commands) !== JSON.stringify(contract.verification_commands) || JSON.stringify(workUnit.allowed_write_paths) !== JSON.stringify(contract.allowed_write_paths)) fail("脚手架合同 work_unit 与根级验证/写路径约束不一致");
181
- const overwrite = contract.overwrite_policy;
182
- if (!overwrite || typeof overwrite !== "object" || ["force_allowed", "overwrite_scope", "rollback_ref"].some((field) => !(field in overwrite))) fail("脚手架合同 overwrite_policy 结构不完整");
234
+ this.validateMavenCoordinates(contract);
235
+ this.validateProfiles(contract.profiles);
236
+ const generationPolicy = contract.generation_policy;
237
+ if (!generationPolicy || generationPolicy.mode !== "initialize-only" || generationPolicy.existing_target !== "unsupported" || generationPolicy.old_project_migration !== "unsupported" || generationPolicy.template_upgrade !== "unsupported") fail("脚手架合同 generation_policy 必须声明 initialize-only,且 existing_target、old_project_migration、template_upgrade 均为 unsupported");
238
+ this.contractDigest = sha256(contractText);
183
239
  this.scaffoldContract = contract;
184
240
  }
185
241
 
186
- validateForceMetadata() {
187
- if (!isPresent(this.options.overwriteScope) || !isPresent(this.options.rollbackRef)) fail("覆盖非空目录必须提供当前批准合同的覆盖范围和回滚引用: --overwrite-scope, --rollback-ref");
188
- const policy = this.scaffoldContract.overwrite_policy;
189
- if (policy.force_allowed !== true) fail("脚手架合同未批准非空目录覆盖");
190
- if (policy.overwrite_scope !== this.options.overwriteScope) fail("--overwrite-scope 与脚手架合同不一致");
191
- if (policy.rollback_ref !== this.options.rollbackRef) fail("--rollback-ref 与脚手架合同不一致");
242
+ validateProfiles(profiles) {
243
+ if (!profiles || typeof profiles !== "object") fail("脚手架合同 profiles 结构不完整");
244
+ for (const [name, expected] of Object.entries(SUPPORTED_PROFILES)) {
245
+ if (!isPresent(profiles[name])) fail(`脚手架合同 profiles 缺少 ${name}`);
246
+ if (profiles[name] !== expected) {
247
+ if (name === "persistence") fail(`unsupported persistence profile: ${profiles[name]};只支持 ${expected}`);
248
+ fail(`unsupported ${name} profile: ${profiles[name]};只支持 ${expected}`);
249
+ }
250
+ }
251
+ this.profiles = structuredClone(profiles);
252
+ if (this.options.database !== profiles.database) fail("--database 与脚手架合同 profiles.database 不一致");
253
+ }
254
+
255
+ validateMavenCoordinates(contract) {
256
+ const optionValues = [
257
+ this.options.groupId,
258
+ this.options.projectVersion,
259
+ this.options.parentGroupId,
260
+ this.options.parentArtifactId,
261
+ this.options.parentVersion,
262
+ this.options.yssComponentsVersion
263
+ ];
264
+ const providedCount = optionValues.filter(isPresent).length;
265
+ if (providedCount !== 0 && providedCount !== optionValues.length) {
266
+ fail("显式 Maven 坐标必须完整提供 groupId、项目版本、父 POM 坐标和 YSS Components 版本");
267
+ }
268
+ const coordinates = contract.maven_coordinates;
269
+ const parent = coordinates.parent;
270
+ const values = [coordinates.group_id, coordinates.project_version, parent?.group_id, parent?.artifact_id, parent?.version, coordinates.yss_components_version];
271
+ if (values.some((value) => !isPresent(value))) fail("脚手架合同 maven_coordinates 必须包含项目 groupId/version、父 POM GAV 和 YSS Components 版本");
272
+ if (providedCount !== optionValues.length) fail("合同包含 maven_coordinates 时必须传入完整 Maven 坐标参数");
273
+ if (JSON.stringify(values) !== JSON.stringify(optionValues)) fail("命令行 Maven 坐标与已批准脚手架合同不一致");
274
+ const coordinatePattern = /^[A-Za-z0-9_.-]+$/;
275
+ if (values.some((value) => !coordinatePattern.test(String(value)))) fail("Maven 坐标只能包含字母、数字、点、下划线和连字符");
276
+ this.mavenCoordinates = structuredClone(coordinates);
277
+ this.mavenCoordinatesSource = "approved-contract";
192
278
  }
193
279
 
194
280
  templateVars() {
195
281
  const database = this.options.database;
196
282
  const dependency = database === "mysql" ? `<dependency>\n <groupId>com.mysql</groupId>\n <artifactId>mysql-connector-j</artifactId>\n <version>8.4.0</version>\n <scope>compile</scope>\n</dependency>` : "";
197
- return { project_name: this.projectName, base_package: this.basePackage, group_id: this.groupId, project_description: `${this.projectName} service`, author: this.author, date: this.date, database, driver_class: "com.mysql.cj.jdbc.Driver", db_name: this.dbName, jdbc_url: `jdbc:mysql://localhost:3306/${this.dbName}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai`, db_dependency: dependency };
283
+ const coordinates = this.mavenCoordinates;
284
+ return { project_name: this.projectName, application_class_name: this.applicationClassName, base_package: this.basePackage, group_id: coordinates.group_id, project_version: coordinates.project_version, parent_group_id: coordinates.parent.group_id, parent_artifact_id: coordinates.parent.artifact_id, parent_version: coordinates.parent.version, yss_components_version: coordinates.yss_components_version, project_description: `${this.projectName} service`, author: this.author, date: this.date, database, driver_class: "com.mysql.cj.jdbc.Driver", db_name: this.dbName, jdbc_url: `jdbc:mysql://localhost:3306/${this.dbName}?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai`, db_dependency: dependency };
198
285
  }
199
286
  render(text) { let output = text; for (const [key, value] of Object.entries(this.templateVars())) output = output.replaceAll(`{{${key}}}`, String(value)); return output; }
200
287
  async renderTemplate(template, output) { if (!await isFile(template)) fail(`模板文件不存在: ${template}`); await writeText(output, this.render(await readFile(template, "utf8"))); }
@@ -217,10 +304,22 @@ class ScaffoldGenerator {
217
304
  await Promise.all([[pom("parent-pom.xml.template"), path.join(this.projectRoot, "pom.xml")], [pom("domain-pom.xml.template"), target(`${this.projectName}-domain`)], [pom("application-pom.xml.template"), target(`${this.projectName}-application`)], [pom("infrastructure-pom.xml.template"), target(`${this.projectName}-infrastructure`)], [pom("adapter-pom.xml.template"), target(`${this.projectName}-adapter`)], [pom("web-pom.xml.template"), target(path.join(`${this.projectName}-adapter`, `${this.projectName}-web`))], [pom("bootstrap-pom.xml.template"), target(`${this.projectName}-bootstrap`)]].map(([from, to]) => this.renderTemplate(from, to)));
218
305
  console.log(" ✓ 父级 pom.xml\n ✓ domain pom.xml\n ✓ application pom.xml\n ✓ infrastructure pom.xml\n ✓ adapter pom.xml\n ✓ web pom.xml\n ✓ bootstrap pom.xml");
219
306
  }
307
+ async generateBootstrapSource() {
308
+ const source = path.join(this.javaTemplateDir, "bootstrap-application.java.template");
309
+ const target = path.join(this.projectRoot, this.bootstrapMainSource);
310
+ await this.renderTemplate(source, target);
311
+ console.log(`\n☕ 生成机械启动入口...\n ✓ ${this.applicationClassName}.java`);
312
+ }
313
+ async generateArchitectureRules() {
314
+ const source = path.join(this.javaTemplateDir, "architecture-rules-test.java.template");
315
+ const target = path.join(this.projectRoot, `${this.projectName}-bootstrap`, "src", "test", "java", this.packagePath, "ArchitectureRulesTest.java");
316
+ await this.renderTemplate(source, target);
317
+ console.log(" ✓ ArchitectureRulesTest.java");
318
+ }
220
319
  async generateConfigFiles() {
221
320
  console.log("\n⚙️ 生成配置文件..."); const base = path.join(this.projectRoot, `${this.projectName}-bootstrap`, "src/main/resources");
222
- await Promise.all([["application.yml.template", "application.yml"], ["logback-spring.xml.template", "logback-spring.xml"]].map(([from, to]) => this.renderTemplate(path.join(this.configTemplateDir, from), path.join(base, to))));
223
- console.log(" ✓ application.yml\n ✓ logback-spring.xml");
321
+ await Promise.all([["application.yml.template", "application.yml"], ["application-local.yml.template", "application-local.yml"], ["logback-spring.xml.template", "logback-spring.xml"]].map(([from, to]) => this.renderTemplate(path.join(this.configTemplateDir, from), path.join(base, to))));
322
+ console.log(" ✓ application.yml\n ✓ application-local.yml\n ✓ logback-spring.xml");
224
323
  }
225
324
  generateDatabaseScripts() { console.log("\n🗃️ 保留数据库目录布局...\n ✓ db/(业务 schema 和初始化数据由批准切片合同生成)"); }
226
325
  async generateDocumentation() {
@@ -230,7 +329,19 @@ class ScaffoldGenerator {
230
329
  }
231
330
  async writeGenerationManifest() {
232
331
  const contract = this.scaffoldContract;
233
- const manifest = { schema_version: 1, contract_id: this.options.contractId, contract_version: this.options.contractVersion, approval_ref: this.options.approvalRef, router_draft_ref: this.options.routerDraftRef, persisted_ref: this.options.persistedRef, contract_file_ref: this.contractFile, slice_id: contract.slice_id, lifecycle_approval_ref: contract.lifecycle_approval_ref, current_version: contract.current_version, approver: contract.approval.approver, allowed_write_paths: contract.allowed_write_paths, expected_evidence_files: contract.expected_evidence_files, project_name: this.projectName, base_package: this.basePackage, database: this.options.database, generation_mode: "controlled-generation", force: this.options.force, overwrite_scope: this.options.overwriteScope, rollback_ref: this.options.rollbackRef, verification_commands: COMMANDS, generated_at: isoNow() };
332
+ const manifestRelative = ".yss/scaffold-generation.json";
333
+ const generatedFiles = [];
334
+ for (const entry of await fileEntries(this.projectRoot, { exclude: new Set([manifestRelative]) })) {
335
+ generatedFiles.push({ path: entry.relative, owner: "generator", sha256: sha256(await readFile(entry.absolute)) });
336
+ }
337
+ const downstream = {};
338
+ for (const skill of DOWNSTREAM_SKILLS) {
339
+ const skillRoot = path.join(REPOSITORY_ROOT, ".agents", "skills", skill);
340
+ downstream[skill] = await isFile(path.join(skillRoot, "SKILL.md")) ? await treeDigest(skillRoot) : "unavailable";
341
+ }
342
+ const scaffoldParent = path.join(SKILL_ROOT, "references", "yss-backend-scaffold-parent", "SKILL.md");
343
+ const routerContract = path.join(REPOSITORY_ROOT, ".agents", "skills", "yss-router", "references", "router-contract.yaml");
344
+ const manifest = { schema_version: 2, contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, approval_ref: this.options.approvalRef, router_draft_ref: this.options.routerDraftRef, persisted_ref: this.options.persistedRef, contract_file_ref: this.contractFile, contract_digest: this.contractDigest, lifecycle_approval_ref: contract.lifecycle_approval_ref, current_version: contract.current_version, approver: contract.approval.approver, allowed_write_paths: contract.allowed_write_paths, expected_evidence_files: contract.expected_evidence_files, project_name: this.projectName, base_package: this.basePackage, bootstrap_main_class: `${this.basePackage}.${this.applicationClassName}`, bootstrap_main_source: this.bootstrapMainSource, maven_coordinates: this.mavenCoordinates, maven_coordinates_source: this.mavenCoordinatesSource, profiles: this.profiles, database: this.options.database, generation_mode: "controlled-generation", completion_level: "generated", generator: { id: "yss-ddd-scaffold-generator", template_digest: await treeDigest(path.join(SKILL_ROOT, "assets")) }, ownership: { generated_files: generatedFiles, user_owned_globs: ["**/src/main/java/**", "**/src/test/java/**", "db/**"] }, readiness: { downstream_skills: downstream, contracts: { scaffold_parent: sha256(await readFile(scaffoldParent)), router_contract: sha256(await readFile(routerContract)) }, architecture_ruleset: sha256(await readFile(path.join(this.javaTemplateDir, "architecture-rules-test.java.template"))) }, generation_policy: { mode: "initialize-only", existing_target: "unsupported", old_project_migration: "unsupported", template_upgrade: "unsupported" }, verification_commands: COMMANDS, generated_at: isoNow() };
234
345
  await writeText(path.join(this.projectRoot, ".yss", "scaffold-generation.json"), `${JSON.stringify(manifest, null, 2)}\n`); console.log(" ✓ .yss/scaffold-generation.json");
235
346
  }
236
347
  async copyWrapperFiles() {
@@ -239,10 +350,10 @@ class ScaffoldGenerator {
239
350
  if (await exists(path.join(wrapper, ".mvn"))) await cp(path.join(wrapper, ".mvn"), path.join(this.projectRoot, ".mvn"), { recursive: true, force: true });
240
351
  }
241
352
  async validateGeneratedArtifacts() {
242
- const required = [path.join(this.projectRoot, "pom.xml"), path.join(this.projectRoot, `${this.projectName}-bootstrap`, "pom.xml"), path.join(this.projectRoot, "mvnw"), path.join(this.projectRoot, ".yss", "scaffold-generation.json")];
353
+ const required = [path.join(this.projectRoot, "pom.xml"), path.join(this.projectRoot, `${this.projectName}-bootstrap`, "pom.xml"), path.join(this.projectRoot, this.bootstrapMainSource), path.join(this.projectRoot, "mvnw"), path.join(this.projectRoot, ".yss", "scaffold-generation.json")];
243
354
  const missing = []; for (const target of required) if (!await isFile(target)) missing.push(target); if (missing.length) fail(`生成产物缺失: ${missing.join(", ")}`);
244
- const manifest = await readJson(required[3], "脚手架生成元数据清单无法读取");
245
- if (manifest.contract_id !== this.options.contractId || manifest.contract_version !== this.options.contractVersion || manifest.current_version !== this.options.contractVersion || manifest.generation_mode !== "controlled-generation" || JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) fail("脚手架生成元数据清单与当前批准合同或固定验证命令不一致");
355
+ const manifest = await readJson(required[4], "脚手架生成元数据清单无法读取");
356
+ if (manifest.schema_version !== 2 || manifest.contract_id !== this.options.contractId || manifest.contract_version !== this.options.contractVersion || manifest.current_version !== this.options.contractVersion || manifest.generation_mode !== "controlled-generation" || manifest.bootstrap_main_class !== `${this.basePackage}.${this.applicationClassName}` || manifest.bootstrap_main_source !== this.bootstrapMainSource || manifest.profiles.architecture !== SUPPORTED_PROFILES.architecture || manifest.generation_policy.mode !== "initialize-only" || manifest.generation_policy.existing_target !== "unsupported" || JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) fail("脚手架生成元数据清单与当前批准合同、Target Profile、initialize-only 边界、机械启动入口或固定验证命令不一致");
246
357
  const stack = [this.projectRoot], binary = new Set([".class", ".db", ".jar", ".png", ".jpg", ".jpeg", ".gif"]);
247
358
  while (stack.length) { const dir = stack.pop(); for (const entry of await readdir(dir, { withFileTypes: true })) { const target = path.join(dir, entry.name); if (entry.isDirectory()) { stack.push(target); continue; } if (!entry.isFile() || binary.has(path.extname(entry.name))) continue; const content = await readFile(target, "utf8"); if (content.includes("{{") || content.includes("root/root")) fail(`生成文件包含未替换占位符或明文凭据: ${target}`); } }
248
359
  }
@@ -0,0 +1,172 @@
1
+ #!/usr/bin/env node
2
+ /** Promote a generated backend only after a complete, approved first vertical slice passes real Wrapper verification. */
3
+ import { createHash } from "node:crypto";
4
+ import { mkdir, readFile, readdir, rename, stat, writeFile } from "node:fs/promises";
5
+ import path from "node:path";
6
+ import process from "node:process";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ import { run as runScaffoldVerification } from "./run_scaffold_verification.mjs";
10
+
11
+ const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
12
+ const REPOSITORY_ROOT = path.resolve(SCRIPT_DIR, "../../../..");
13
+ const REQUIRED_SKILLS = ["yss-domain", "yss-application", "yss-repository", "yss-mybatis", "yss-web-controller", "yss-dto", "yss-exception", "yss-validation", "mapstruct", "lombok", "alibaba-java-code-style"];
14
+ const REQUIRED_LAYERS = ["domain", "application", "infrastructure", "web"];
15
+ const ARTIFACT_CHECKS = [
16
+ ["domain-model", /-domain\/src\/main\/java\/.+\/domain\/.+\/model\/.+\.java$/],
17
+ ["domain-gateway", /-domain\/src\/main\/java\/.+\/domain\/.+\/gateway\/.+Gateway\.java$/],
18
+ ["domain-behavior-test", /-domain\/src\/test\/java\/.+(?:Test|Tests)\.java$/],
19
+ ["application-command-or-query", /-application\/src\/main\/java\/.+\/application\/(?:command|query)\/.+\.java$/],
20
+ ["application-result", /-application\/src\/main\/java\/.+\/application\/result\/.+Result\.java$/],
21
+ ["application-service", /-application\/src\/main\/java\/.+\/application\/service\/.+Service\.java$/],
22
+ ["application-service-implementation", /-application\/src\/main\/java\/.+\/application\/service\/impl\/.+ServiceImpl\.java$/],
23
+ ["application-behavior-test", /-application\/src\/test\/java\/.+(?:Test|Tests)\.java$/],
24
+ ["infrastructure-po", /-infrastructure\/src\/main\/java\/.+\/infrastructure\/persistence\/po\/.+PO\.java$/],
25
+ ["infrastructure-repository", /-infrastructure\/src\/main\/java\/.+\/infrastructure\/persistence\/repository\/.+Repository\.java$/],
26
+ ["infrastructure-convertor", /-infrastructure\/src\/main\/java\/.+\/infrastructure\/persistence\/convertor\/.+Convertor\.java$/],
27
+ ["infrastructure-gateway-implementation", /-infrastructure\/src\/main\/java\/.+\/infrastructure\/persistence\/gateway\/.+GatewayImpl\.java$/],
28
+ ["infrastructure-query-adapter", /-infrastructure\/src\/main\/java\/.+\/infrastructure\/query\/adapter\/.+QueryAdapter\.java$/],
29
+ ["infrastructure-integration-test", /-infrastructure\/src\/test\/java\/.+(?:Test|Tests)\.java$/],
30
+ ["web-controller", /-adapter\/.+-web\/src\/main\/java\/.+\/rest\/.+Controller\.java$/],
31
+ ["web-convertor", /-adapter\/.+-web\/src\/main\/java\/.+\/rest\/convertor\/.+WebConvertor\.java$/],
32
+ ["web-request", /-adapter\/.+-web\/src\/main\/java\/.+\/rest\/dto\/request\/.+Request\.java$/],
33
+ ["web-response", /-adapter\/.+-web\/src\/main\/java\/.+\/rest\/dto\/response\/.+Response\.java$/],
34
+ ["web-contract-test", /-adapter\/.+-web\/src\/test\/java\/.+(?:Test|Tests)\.java$/]
35
+ ];
36
+
37
+ const isoNow = () => new Date().toISOString();
38
+ const sha256 = (content) => createHash("sha256").update(content).digest("hex");
39
+ async function isFile(target) { try { return (await stat(target)).isFile(); } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
40
+ async function files(root) {
41
+ const output = [];
42
+ async function visit(directory) {
43
+ for (const entry of await readdir(directory, { withFileTypes: true })) {
44
+ const absolute = path.join(directory, entry.name);
45
+ if (entry.isDirectory()) await visit(absolute);
46
+ else if (entry.isFile()) output.push(path.relative(root, absolute).split(path.sep).join("/"));
47
+ }
48
+ }
49
+ await visit(root);
50
+ return output.sort();
51
+ }
52
+ async function treeDigest(root) {
53
+ const hash = createHash("sha256");
54
+ for (const relative of await files(root)) hash.update(relative).update("\0").update(await readFile(path.join(root, relative))).update("\0");
55
+ return hash.digest("hex");
56
+ }
57
+ async function writeJsonAtomic(target, value) {
58
+ await mkdir(path.dirname(target), { recursive: true });
59
+ const temporary = `${target}.${process.pid}.tmp`;
60
+ await writeFile(temporary, `${JSON.stringify(value, null, 2)}\n`, "utf8");
61
+ await rename(temporary, target);
62
+ }
63
+ function invalidContractReasons(contract) {
64
+ const reasons = [];
65
+ if (contract.schema_version !== 1) reasons.push("slice-contract-schema");
66
+ if (contract.status !== "approved") reasons.push("slice-contract-not-approved");
67
+ for (const field of ["contract_id", "contract_version", "slice_id"]) if (contract[field] === undefined || contract[field] === null || contract[field] === "") reasons.push(`slice-contract-${field}-missing`);
68
+ if (contract.readiness?.blockers?.length) reasons.push("slice-contract-has-blockers");
69
+ if (contract.readiness?.stale_inputs?.length) reasons.push("slice-contract-has-stale-inputs");
70
+ const actualSkills = new Set([...(contract.common?.required_skills ?? []), ...(contract.backend?.required_skills ?? [])]);
71
+ for (const skill of REQUIRED_SKILLS) if (!actualSkills.has(skill)) reasons.push(`required-skill-missing:${skill}`);
72
+ const actualLayers = new Set(contract.backend?.affected_layers ?? []);
73
+ for (const layer of REQUIRED_LAYERS) if (!actualLayers.has(layer)) reasons.push(`required-layer-missing:${layer}`);
74
+ if (!Array.isArray(contract.work_units) || !contract.work_units.length) reasons.push("slice-contract-work-units-missing");
75
+ else for (const [index, unit] of contract.work_units.entries()) {
76
+ const id = unit.id || `index-${index}`;
77
+ if (unit.contract_id !== contract.contract_id) reasons.push(`work-unit-contract-id-mismatch:${id}`);
78
+ if (unit.contract_version !== contract.contract_version) reasons.push(`work-unit-contract-version-mismatch:${id}`);
79
+ if (!unit.work_unit?.primary_skill) reasons.push(`work-unit-primary-skill-missing:${id}`);
80
+ }
81
+ return reasons;
82
+ }
83
+ async function downstreamDrift(manifest) {
84
+ const drift = [];
85
+ const recordedSkills = manifest.readiness?.downstream_skills ?? {};
86
+ for (const skill of REQUIRED_SKILLS) {
87
+ const expected = recordedSkills[skill];
88
+ if (typeof expected !== "string" || !/^[a-f0-9]{64}$/.test(expected)) {
89
+ drift.push(`${skill}:digest-missing`);
90
+ continue;
91
+ }
92
+ const root = path.join(REPOSITORY_ROOT, ".agents", "skills", skill);
93
+ if (!await isFile(path.join(root, "SKILL.md"))) drift.push(`${skill}:unavailable`);
94
+ else if (await treeDigest(root) !== expected) drift.push(`${skill}:digest-mismatch`);
95
+ }
96
+ const contracts = manifest.readiness?.contracts ?? {};
97
+ const contractFiles = {
98
+ scaffold_parent: path.join(REPOSITORY_ROOT, ".agents", "skills", "yss-ddd-scaffold-generator", "references", "yss-backend-scaffold-parent", "SKILL.md"),
99
+ router_contract: path.join(REPOSITORY_ROOT, ".agents", "skills", "yss-router", "references", "router-contract.yaml")
100
+ };
101
+ for (const [name, target] of Object.entries(contractFiles)) {
102
+ const expected = contracts[name];
103
+ if (typeof expected !== "string" || !/^[a-f0-9]{64}$/.test(expected)) {
104
+ drift.push(`${name}:digest-missing`);
105
+ continue;
106
+ }
107
+ if (!await isFile(target)) drift.push(`${name}:unavailable`);
108
+ else if (sha256(await readFile(target)) !== expected) drift.push(`${name}:digest-mismatch`);
109
+ }
110
+ return drift;
111
+ }
112
+
113
+ export async function runFirstSliceVerification(projectRoot, evidenceDir, sliceContractFile, environment = process.env) {
114
+ projectRoot = path.resolve(projectRoot);
115
+ evidenceDir = path.resolve(evidenceDir);
116
+ sliceContractFile = path.resolve(sliceContractFile);
117
+ const manifestPath = path.join(projectRoot, ".yss", "scaffold-generation.json");
118
+ const reportPath = path.join(evidenceDir, "first-slice-verification.json");
119
+ if (!await isFile(manifestPath)) throw new Error(`missing scaffold manifest: ${manifestPath}`);
120
+ if (!await isFile(sliceContractFile)) throw new Error(`missing Slice Implementation Contract: ${sliceContractFile}`);
121
+ const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
122
+ const contract = JSON.parse(await readFile(sliceContractFile, "utf8"));
123
+ const contractFailures = invalidContractReasons(contract);
124
+ if (manifest.schema_version !== 2 || manifest.completion_level !== "empty-scaffold-verified") contractFailures.push("scaffold-not-empty-scaffold-verified");
125
+ const projectFiles = await files(projectRoot);
126
+ const missingArtifacts = ARTIFACT_CHECKS.filter(([, pattern]) => !projectFiles.some((file) => pattern.test(file))).map(([name]) => name);
127
+ const skillDrift = await downstreamDrift(manifest);
128
+ if (contractFailures.length || missingArtifacts.length || skillDrift.length) {
129
+ const report = { verification_mode: "first-slice", project_root: projectRoot, slice_contract_ref: sliceContractFile, scaffold_manifest_ref: manifestPath, generated_at: isoNow(), status: "failed", completion_level: manifest.completion_level, contract_failures: contractFailures, missing_artifacts: missingArtifacts, downstream_skill_drift: skillDrift, commands: [] };
130
+ await writeJsonAtomic(reportPath, report);
131
+ return report;
132
+ }
133
+
134
+ const mavenEvidence = path.join(evidenceDir, "maven");
135
+ const wrapper = await runScaffoldVerification(projectRoot, mavenEvidence, environment);
136
+ const passed = wrapper.status === "passed";
137
+ const report = { verification_mode: "first-slice", project_root: projectRoot, slice_contract_ref: sliceContractFile, scaffold_manifest_ref: manifestPath, generated_at: isoNow(), status: passed ? "passed" : "failed", failure_category: wrapper.failure_category, completion_level: passed ? "first-slice-verified" : manifest.completion_level, contract_failures: [], missing_artifacts: [], downstream_skill_drift: [], commands: wrapper.commands };
138
+ await writeJsonAtomic(reportPath, report);
139
+ if (passed) {
140
+ manifest.completion_level = "first-slice-verified";
141
+ manifest.first_slice_verification_ref = reportPath;
142
+ manifest.first_slice_verified_at = isoNow();
143
+ manifest.first_slice_contract = { contract_id: contract.contract_id, contract_version: contract.contract_version, slice_id: contract.slice_id, sha256: sha256(await readFile(sliceContractFile)) };
144
+ await writeJsonAtomic(manifestPath, manifest);
145
+ }
146
+ return report;
147
+ }
148
+
149
+ function parseArgs(argv) {
150
+ const result = {};
151
+ for (let index = 0; index < argv.length; index += 2) {
152
+ const flag = argv[index], value = argv[index + 1];
153
+ if (!["--project-root", "--evidence-dir", "--slice-contract-file"].includes(flag) || !value) throw new Error("usage: run_first_slice_verification.mjs --project-root DIR --evidence-dir DIR --slice-contract-file FILE");
154
+ result[flag.slice(2).replaceAll(/-([a-z])/g, (_, letter) => letter.toUpperCase())] = value;
155
+ }
156
+ if (!result.projectRoot || !result.evidenceDir || !result.sliceContractFile) throw new Error("project root, evidence dir, and slice contract file are required");
157
+ return result;
158
+ }
159
+
160
+ async function main() {
161
+ try {
162
+ const args = parseArgs(process.argv.slice(2));
163
+ const report = await runFirstSliceVerification(args.projectRoot, args.evidenceDir, args.sliceContractFile);
164
+ process.stdout.write(`${report.status}: ${path.join(path.resolve(args.evidenceDir), "first-slice-verification.json")}\n`);
165
+ return report.status === "passed" ? 0 : 1;
166
+ } catch (error) {
167
+ process.stderr.write(`first-slice verification failed: ${error.message}\n`);
168
+ return 1;
169
+ }
170
+ }
171
+
172
+ if (process.argv[1] && import.meta.url === new URL(`file://${process.argv[1]}`).href) process.exitCode = await main();