create-yss-spec 3.4.1 → 3.4.4

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 (413) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -3
  4. package/template/.agents/skills/archify/SKILL.md +1 -1
  5. package/template/.agents/skills/code-review/SKILL.md +12 -8
  6. package/template/.agents/skills/file-export-download/SKILL.md +1 -1
  7. package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
  8. package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
  9. package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
  10. package/template/.agents/skills/lombok/SKILL.md +10 -336
  11. package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
  12. package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
  13. package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
  14. package/template/.agents/skills/mapstruct/SKILL.md +11 -318
  15. package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
  16. package/template/.agents/skills/page-form-module/SKILL.md +1 -1
  17. package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
  18. package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
  19. package/template/.agents/skills/to-tickets/SKILL.md +1 -1
  20. package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
  21. package/template/.agents/skills/wayfinder/SKILL.md +1 -1
  22. package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
  23. package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
  24. package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
  25. package/template/.agents/skills/yss-cache/SKILL.md +1 -1
  26. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +16 -3
  27. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  28. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  29. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  30. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
  31. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
  32. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  33. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
  34. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  35. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
  36. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
  37. package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
  38. package/template/.agents/skills/yss-dto/SKILL.md +5 -1
  39. package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
  40. package/template/.agents/skills/yss-exception/SKILL.md +5 -1
  41. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
  42. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  43. package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  44. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
  45. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  46. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  47. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
  48. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
  49. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
  50. package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
  51. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
  52. package/template/.agents/skills/yss-openapi-governance/SKILL.md +1 -1
  53. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
  54. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +29 -7
  55. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  56. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -1
  57. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +24 -4
  58. package/template/.agents/skills/yss-prototype-stage/SKILL.md +1 -1
  59. package/template/.agents/skills/yss-repository/SKILL.md +4 -0
  60. package/template/.agents/skills/yss-research/SKILL.md +1 -1
  61. package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
  62. package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
  63. package/template/.agents/skills/yss-stage-decision/SKILL.md +1 -1
  64. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +2 -0
  65. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  66. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +3 -3
  67. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +3 -3
  68. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +33 -0
  69. package/template/.agents/skills/yss-tactical-design/SKILL.md +5 -1
  70. package/template/.agents/skills/yss-technical-design/SKILL.md +5 -1
  71. package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  72. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  73. package/template/.agents/skills/yss-technical-design/tests/run-scenarios.mjs +1 -1
  74. package/template/.agents/skills/yss-ui/SKILL.md +1 -1
  75. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  76. package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
  77. package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
  78. package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
  79. package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
  80. package/template/.agents/skills/yss-validation/SKILL.md +5 -1
  81. package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
  82. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
  83. package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
  84. package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
  85. package/template/.codex/skills/archify/SKILL.md +1 -1
  86. package/template/.codex/skills/code-review/SKILL.md +12 -8
  87. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
  88. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  89. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
  90. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  91. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  92. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
  93. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  94. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
  95. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  96. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  97. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  98. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
  99. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
  100. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
  101. package/template/.codex/skills/file-export-download/SKILL.md +1 -1
  102. package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
  103. package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
  104. package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
  105. package/template/.codex/skills/lombok/SKILL.md +10 -336
  106. package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
  107. package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
  108. package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
  109. package/template/.codex/skills/mapstruct/SKILL.md +11 -318
  110. package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
  111. package/template/.codex/skills/page-form-module/SKILL.md +1 -1
  112. package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
  113. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  114. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  115. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
  116. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
  117. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
  118. package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
  119. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
  120. package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
  121. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  122. package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
  123. package/template/.codex/skills/to-tickets/SKILL.md +1 -1
  124. package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
  125. package/template/.codex/skills/wayfinder/SKILL.md +1 -1
  126. package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
  127. package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
  128. package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
  129. package/template/.codex/skills/yss-cache/SKILL.md +1 -1
  130. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +16 -3
  131. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  132. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  133. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  134. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
  135. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
  136. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  137. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
  138. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  139. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
  140. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
  141. package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
  142. package/template/.codex/skills/yss-dto/SKILL.md +5 -1
  143. package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
  144. package/template/.codex/skills/yss-exception/SKILL.md +5 -1
  145. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
  146. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  147. package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  148. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
  149. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  150. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  151. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
  152. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
  153. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
  154. package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
  155. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
  156. package/template/.codex/skills/yss-openapi-governance/SKILL.md +1 -1
  157. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
  158. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +29 -7
  159. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  160. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -1
  161. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +24 -4
  162. package/template/.codex/skills/yss-prototype-stage/SKILL.md +1 -1
  163. package/template/.codex/skills/yss-repository/SKILL.md +4 -0
  164. package/template/.codex/skills/yss-research/SKILL.md +1 -1
  165. package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
  166. package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
  167. package/template/.codex/skills/yss-stage-decision/SKILL.md +1 -1
  168. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +2 -0
  169. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  170. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +3 -3
  171. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +3 -3
  172. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +33 -0
  173. package/template/.codex/skills/yss-tactical-design/SKILL.md +5 -1
  174. package/template/.codex/skills/yss-technical-design/SKILL.md +5 -1
  175. package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  176. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  177. package/template/.codex/skills/yss-technical-design/tests/run-scenarios.mjs +1 -1
  178. package/template/.codex/skills/yss-ui/SKILL.md +1 -1
  179. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  180. package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
  181. package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
  182. package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
  183. package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
  184. package/template/.codex/skills/yss-validation/SKILL.md +5 -1
  185. package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
  186. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
  187. package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
  188. package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
  189. package/template/.cursor/skills/archify/SKILL.md +1 -1
  190. package/template/.cursor/skills/code-review/SKILL.md +12 -8
  191. package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
  192. package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
  193. package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
  194. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
  195. package/template/.cursor/skills/lombok/SKILL.md +10 -336
  196. package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
  197. package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
  198. package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
  199. package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
  200. package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
  201. package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
  202. package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
  203. package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
  204. package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
  205. package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
  206. package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
  207. package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
  208. package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
  209. package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
  210. package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
  211. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +16 -3
  212. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  213. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  214. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  215. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
  216. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
  217. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  218. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
  219. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  220. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
  221. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
  222. package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
  223. package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
  224. package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
  225. package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
  226. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
  227. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  228. package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  229. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
  230. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  231. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  232. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
  233. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
  234. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
  235. package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
  236. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
  237. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +1 -1
  238. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
  239. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +29 -7
  240. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  241. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -1
  242. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +24 -4
  243. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +1 -1
  244. package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
  245. package/template/.cursor/skills/yss-research/SKILL.md +1 -1
  246. package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
  247. package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
  248. package/template/.cursor/skills/yss-stage-decision/SKILL.md +1 -1
  249. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +2 -0
  250. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  251. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +3 -3
  252. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +3 -3
  253. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +33 -0
  254. package/template/.cursor/skills/yss-tactical-design/SKILL.md +5 -1
  255. package/template/.cursor/skills/yss-technical-design/SKILL.md +5 -1
  256. package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  257. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  258. package/template/.cursor/skills/yss-technical-design/tests/run-scenarios.mjs +1 -1
  259. package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
  260. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  261. package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
  262. package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
  263. package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
  264. package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
  265. package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
  266. package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
  267. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
  268. package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
  269. package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
  270. package/template/.pi/skills/archify/SKILL.md +1 -1
  271. package/template/.pi/skills/code-review/SKILL.md +12 -8
  272. package/template/.pi/skills/file-export-download/SKILL.md +1 -1
  273. package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
  274. package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
  275. package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
  276. package/template/.pi/skills/lombok/SKILL.md +10 -336
  277. package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
  278. package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
  279. package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
  280. package/template/.pi/skills/mapstruct/SKILL.md +11 -318
  281. package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
  282. package/template/.pi/skills/page-form-module/SKILL.md +1 -1
  283. package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
  284. package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
  285. package/template/.pi/skills/to-tickets/SKILL.md +1 -1
  286. package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
  287. package/template/.pi/skills/wayfinder/SKILL.md +1 -1
  288. package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
  289. package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
  290. package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
  291. package/template/.pi/skills/yss-cache/SKILL.md +1 -1
  292. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +16 -3
  293. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  294. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  295. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  296. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +3 -3
  297. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +5 -1
  298. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  299. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +13 -10
  300. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  301. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +35 -3
  302. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +1 -1
  303. package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
  304. package/template/.pi/skills/yss-dto/SKILL.md +5 -1
  305. package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
  306. package/template/.pi/skills/yss-exception/SKILL.md +5 -1
  307. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
  308. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  309. package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  310. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -0
  311. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  312. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  313. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +15 -2
  314. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +28 -19
  315. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +10 -10
  316. package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
  317. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
  318. package/template/.pi/skills/yss-openapi-governance/SKILL.md +1 -1
  319. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
  320. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +29 -7
  321. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  322. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -1
  323. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +24 -4
  324. package/template/.pi/skills/yss-prototype-stage/SKILL.md +1 -1
  325. package/template/.pi/skills/yss-repository/SKILL.md +4 -0
  326. package/template/.pi/skills/yss-research/SKILL.md +1 -1
  327. package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
  328. package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
  329. package/template/.pi/skills/yss-stage-decision/SKILL.md +1 -1
  330. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +2 -0
  331. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +1 -1
  332. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +3 -3
  333. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +3 -3
  334. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +33 -0
  335. package/template/.pi/skills/yss-tactical-design/SKILL.md +5 -1
  336. package/template/.pi/skills/yss-technical-design/SKILL.md +5 -1
  337. package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  338. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  339. package/template/.pi/skills/yss-technical-design/tests/run-scenarios.mjs +1 -1
  340. package/template/.pi/skills/yss-ui/SKILL.md +1 -1
  341. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  342. package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
  343. package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
  344. package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
  345. package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
  346. package/template/.pi/skills/yss-validation/SKILL.md +5 -1
  347. package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
  348. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +5 -2
  349. package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
  350. package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
  351. package/template/AGENTS.md +1 -0
  352. package/template/CONTEXT.md +2 -1
  353. package/template/docs/agents/backend-architecture-profiles.md +1 -1
  354. package/template/docs/agents/digital-human-roles.yaml +29 -1
  355. package/template/docs/agents/issue-tracker.md +2 -0
  356. package/template/docs/architecture/templates/engineering-baseline-review-template.md +6 -6
  357. package/template/docs/engineering/backend-platforms.json +174 -0
  358. package/template/docs/engineering/backend-platforms.md +77 -0
  359. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
  360. package/template/docs/process/existing-ui-baseline.md +1 -1
  361. package/template/docs/process/harness-process-tailoring.md +9 -1
  362. package/template/docs/process/lifecycle-artifact-map.md +6 -5
  363. package/template/docs/process/lifecycle-registry-baseline.json +2 -1
  364. package/template/docs/process/lifecycle-registry.yaml +17 -8
  365. package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
  366. package/template/docs/process/schemas/digital-human-task-package.schema.json +3 -1
  367. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +8 -0
  368. package/template/docs/process/schemas/project-scaffold-contract.schema.json +602 -83
  369. package/template/docs/process/schemas/review-bundle.schema.json +42 -0
  370. package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
  371. package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
  372. package/template/docs/process/strategic-handoff-package.md +5 -11
  373. package/template/docs/templates/approval-record-template.yaml +2 -0
  374. package/template/docs/templates/build-architecture-checklist-template.md +2 -2
  375. package/template/docs/templates/implementation-routing-template.md +4 -4
  376. package/template/docs/templates/review-bundle-template.yaml +26 -0
  377. package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
  378. package/template/scripts/backend-platforms +14 -0
  379. package/template/scripts/lib/approval-record.mjs +52 -7
  380. package/template/scripts/lib/approved-execution-context.mjs +31 -8
  381. package/template/scripts/lib/backend-architecture.mjs +6 -0
  382. package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
  383. package/template/scripts/lib/backend-platform-verification.mjs +210 -0
  384. package/template/scripts/lib/backend-platform.mjs +175 -0
  385. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
  386. package/template/scripts/lib/decision-continuation.mjs +79 -0
  387. package/template/scripts/lib/delivery-preflight.mjs +6 -5
  388. package/template/scripts/lib/digital-human-roles.mjs +10 -0
  389. package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
  390. package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
  391. package/template/scripts/lib/lifecycle-controls.mjs +2 -2
  392. package/template/scripts/lib/lifecycle-transition.mjs +3 -1
  393. package/template/scripts/lib/plan-spec-entry.mjs +3 -3
  394. package/template/scripts/lib/scaffold-local-database.mjs +1 -0
  395. package/template/scripts/lib/slice-applicability.mjs +10 -0
  396. package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
  397. package/template/scripts/lib/slice-contract-views.mjs +52 -0
  398. package/template/scripts/lib/slice-contract.mjs +211 -0
  399. package/template/scripts/lib/slice-repositories.mjs +49 -0
  400. package/template/scripts/lib/slice-task-package.mjs +66 -0
  401. package/template/scripts/lib/strategic-handoff-io.mjs +7 -0
  402. package/template/scripts/lib/strategic-handoff.mjs +33 -8
  403. package/template/scripts/lib/task-package.mjs +6 -2
  404. package/template/scripts/lib/technical-design-boundary.mjs +1 -0
  405. package/template/scripts/lib/user-decision-reuse.mjs +1 -0
  406. package/template/scripts/lib/user-decision.mjs +17 -3
  407. package/template/scripts/preflight-delivery +2 -2
  408. package/template/scripts/slice-contract +30 -0
  409. package/template/scripts/verify-backend-platform-matrix +69 -0
  410. package/template/scripts/verify-scaffold-architecture-decisions +5 -0
  411. package/template/scripts/verify-user-decision +7 -2
  412. package/template/skills-lock.json +62 -57
  413. package/template.snapshot.json +3 -3
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  /** YSS DDD 后端纯工程骨架生成器;只生成工程结构,不生成任何业务行为。 */
3
+ import { platformSourceFingerprint, generatedTreeDigest } from "../../../../scripts/lib/backend-platform-provenance.mjs";
4
+ import { assertContractPlatform, platformTemplateVars, platformSmokeTest } from "../../../../scripts/lib/backend-platform.mjs";
3
5
  import { assertScaffoldUserDecision } from "../../../../scripts/lib/user-decision.mjs";
4
6
  import { createHash } from "node:crypto";
5
7
  import { chmod, cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, stat, writeFile, copyFile } from "node:fs/promises";
@@ -27,8 +29,6 @@ const SUPPORTED_PROFILES = Object.freeze({
27
29
  persistence: "mybatis-plus",
28
30
  verification_database: "h2",
29
31
  production_database: "not-bound",
30
- platform: "spring-boot-2.7-jdk8",
31
- validation_namespace: "javax",
32
32
  dto_placement: "web",
33
33
  repository: "yss-internal"
34
34
  });
@@ -56,14 +56,14 @@ function usage(error) {
56
56
  `用法: node scripts/generate_scaffold.mjs --project-name <kebab-case> --base-package <package> --output-dir <dir> --contract-file <json> [选项]\n\n` +
57
57
  `必填合同元数据: --contract-id --contract-version --approval-ref --compiler-draft-ref --persisted-ref\n` +
58
58
  `Maven 坐标: --group-id --project-version --parent-group-id --parent-artifact-id --parent-version --yss-components-version\n` +
59
- `固定 Profile: target-domain-model / mybatis-plus / spring-boot-2.7-jdk8 / javax / web / yss-internal\n` +
59
+ `固定 Profile: target-domain-model / mybatis-plus / approved Boot/Java platform / derived validation namespace / web / yss-internal\n` +
60
60
  `本生成器严格 initialize-only;--force 和任何已有项目目标均为 unsupported。\n` +
61
61
  `--with-example 已禁用;--without-example 仅保留为无操作参数。`;
62
62
  if (error) process.stderr.write(`错误: ${error}\n\n`);
63
63
  process.stdout.write(`${text}\n`);
64
64
  }
65
65
 
66
- function parseArgs(argv) {
66
+ export function parseArgs(argv) {
67
67
  const options = { force: false, withExample: false };
68
68
  const mapping = new Map([
69
69
  ["--project-name", "projectName"], ["--base-package", "basePackage"], ["--output-dir", "outputDir"],
@@ -130,8 +130,9 @@ async function treeDigest(root) {
130
130
  return hash.digest("hex");
131
131
  }
132
132
 
133
- class ScaffoldGenerator {
134
- constructor(options) {
133
+ export class ScaffoldGenerator {
134
+ constructor(options, platformOptions = {}) {
135
+ this.platformOptions = platformOptions;
135
136
  this.options = options;
136
137
  this.projectName = options.projectName;
137
138
  this.basePackage = options.basePackage;
@@ -258,6 +259,7 @@ class ScaffoldGenerator {
258
259
  if (!decision.user_confirmation || Object.values(decision.user_confirmation).some((value) => !isPresent(value))) fail("架构决策缺少完整用户确认记录");
259
260
  assertScaffoldUserDecision(decision);
260
261
  this.designPrerequisites = await validateBackendScaffoldPrerequisites(contract, { contractFile: this.contractFile });
262
+ this.platform = assertContractPlatform(contract, decision, { ...this.platformOptions, requireVerified: this.platformOptions.candidate !== true }).profile;
261
263
  const generationPolicy = contract.generation_policy;
262
264
  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");
263
265
  this.contractDigest = sha256(contractText);
@@ -306,7 +308,7 @@ class ScaffoldGenerator {
306
308
 
307
309
  templateVars() {
308
310
  const coordinates = this.mavenCoordinates;
309
- 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, db_dependency: "" };
311
+ return { ...platformTemplateVars(this.platform), 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, db_dependency: "" };
310
312
  }
311
313
  render(text) { let output = text; for (const [key, value] of Object.entries(this.templateVars())) output = output.replaceAll(`{{${key}}}`, String(value)); return output; }
312
314
  async renderTemplate(template, output) { if (!await isFile(template)) fail(`模板文件不存在: ${template}`); await writeText(output, this.render(await readFile(template, "utf8"))); }
@@ -333,6 +335,7 @@ class ScaffoldGenerator {
333
335
  const source = path.join(this.javaTemplateDir, "bootstrap-application.java.template");
334
336
  const target = path.join(this.projectRoot, this.bootstrapMainSource);
335
337
  await this.renderTemplate(source, target);
338
+ await writeText(path.join(this.projectRoot, `${this.projectName}-bootstrap/src/test/java/${this.basePackage.replaceAll(".", "/")}/PlatformIntegrationTest.java`), platformSmokeTest(this.basePackage, this.platform));
336
339
  console.log(`\n☕ 生成机械启动入口...\n ✓ ${this.applicationClassName}.java`);
337
340
  }
338
341
  async generateArchitectureRules() {
@@ -351,7 +354,7 @@ class ScaffoldGenerator {
351
354
  generateDatabaseScripts() { console.log("\n🗃️ 保留数据库目录布局...\n ✓ db/(业务 schema 和初始化数据由批准切片合同生成)"); }
352
355
  async generateDocumentation() {
353
356
  console.log("\n📚 生成项目文档...");
354
- await writeText(path.join(this.projectRoot, "README.md"), this.render("# {{project_name}}\n\n## 模块说明\n\n- {{project_name}}-domain\n- {{project_name}}-application\n- {{project_name}}-infrastructure\n- {{project_name}}-adapter\n- {{project_name}}-bootstrap\n\n业务 API、领域模型、数据结构和权限行为必须在冻结的 Slice Implementation Contract 下,由对应 YSS skill 逐切片实现。\n\n## 快速开始\n\n```bash\ncd {{project_name}}\n./mvnw clean compile\n./mvnw -Pscaffold-local spring-boot:run -pl {{project_name}}-bootstrap -Dspring-boot.run.profiles=scaffold-local\n```\n"));
357
+ await writeText(path.join(this.projectRoot, "README.md"), this.render("# {{project_name}}\n\n平台:Spring Boot {{boot_version}} / Java {{java_version}}。\n\n## 模块说明\n\n- {{project_name}}-domain\n- {{project_name}}-application\n- {{project_name}}-infrastructure\n- {{project_name}}-adapter\n- {{project_name}}-bootstrap\n\n业务 API、领域模型、数据结构和权限行为必须在冻结的 Slice Implementation Contract 下,由对应 YSS skill 逐切片实现。\n\n## 快速开始\n\n```bash\ncd {{project_name}}\n./mvnw clean compile\n./mvnw -Pscaffold-local spring-boot:run -pl {{project_name}}-bootstrap -Dspring-boot.run.profiles=scaffold-local\n```\n"));
355
358
  console.log(" ✓ README.md");
356
359
  }
357
360
  async writeGenerationManifest() {
@@ -368,7 +371,7 @@ class ScaffoldGenerator {
368
371
  }
369
372
  const scaffoldParent = path.join(SKILL_ROOT, "references", "yss-backend-scaffold-parent", "SKILL.md");
370
373
  const compilerContract = path.join(REPOSITORY_ROOT, ".agents", "skills", "yss-implementation-contract-compiler", "references", "compiler-contract.yaml");
371
- const manifest = { schema_version: 4, kind: "backend-scaffold", architecture_profile: contract.architecture_profile, architecture_identity: scaffoldArchitectureIdentity(contract, this.contractDigest), contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, architecture_family: contract.architecture_family, generator_skill: contract.generator_skill, decision_id: contract.decision_id, decision_digest: contract.decision_digest, module_profile: contract.module_profile, design_prerequisites: this.designPrerequisites, approval_ref: this.options.approvalRef, compiler_draft_ref: this.options.compilerDraftRef, 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, 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)), compiler_contract: sha256(await readFile(compilerContract)) }, 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() };
374
+ const manifest = { source_fingerprint: platformSourceFingerprint(contract.architecture_family), generated_tree_digest: generatedTreeDigest(this.projectRoot, { ownership: { generated_files: generatedFiles } }), platform_verification: this.platformOptions.candidate === true ? "candidate" : "verified", platform_configuration: contract.platform_configuration, schema_version: 4, kind: "backend-scaffold", architecture_profile: contract.architecture_profile, architecture_identity: scaffoldArchitectureIdentity(contract, this.contractDigest), contract_id: this.options.contractId, contract_version: this.options.contractVersion, scaffold_request_id: contract.scaffold_request_id, architecture_family: contract.architecture_family, generator_skill: contract.generator_skill, decision_id: contract.decision_id, decision_digest: contract.decision_digest, module_profile: contract.module_profile, design_prerequisites: this.designPrerequisites, approval_ref: this.options.approvalRef, compiler_draft_ref: this.options.compilerDraftRef, 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, 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)), compiler_contract: sha256(await readFile(compilerContract)) }, 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() };
372
375
  await writeText(path.join(this.projectRoot, ".yss", "scaffold-generation.json"), `${JSON.stringify(manifest, null, 2)}\n`); console.log(" ✓ .yss/scaffold-generation.json");
373
376
  }
374
377
  async copyWrapperFiles() {
@@ -387,4 +390,4 @@ class ScaffoldGenerator {
387
390
  }
388
391
 
389
392
  async function main() { let options; try { options = parseArgs(process.argv.slice(2)); if (options.help) { usage(); return 0; } await new ScaffoldGenerator(options).generate(); return 0; } catch (error) { process.stderr.write(`\n❌ 生成失败: ${error.message}\n`); return 1; } }
390
- process.exitCode = await main();
393
+ if (process.argv[1] === fileURLToPath(import.meta.url)) process.exitCode = await main();
@@ -126,6 +126,7 @@ export async function runFirstSliceVerification(projectRoot, evidenceDir, sliceC
126
126
  if (!await isFile(sliceContractFile)) throw new Error(`missing Slice Implementation Contract: ${sliceContractFile}`);
127
127
  const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
128
128
  const contract = JSON.parse(await readFile(sliceContractFile, "utf8"));
129
+ if (manifest.platform_verification === "candidate") throw new Error("backend-platform: candidate scaffold cannot become first-slice-verified");
129
130
  const adapter = manifest.architecture_family === "layered-mvc" ? mvcFirstSliceProfile(manifest.architecture_identity ?? {}) : { skills: REQUIRED_SKILLS, layers: REQUIRED_LAYERS, artifacts: ARTIFACT_CHECKS };
130
131
  const contractFailures = invalidContractReasons(contract, adapter.skills, adapter.layers);
131
132
  try {
@@ -145,7 +146,7 @@ export async function runFirstSliceVerification(projectRoot, evidenceDir, sliceC
145
146
  }
146
147
 
147
148
  const mavenEvidence = path.join(evidenceDir, "maven");
148
- const wrapper = await runScaffoldVerification(projectRoot, mavenEvidence, environment);
149
+ const wrapper = await runScaffoldVerification(projectRoot, mavenEvidence, environment, { firstSlice: true });
149
150
  const passed = wrapper.status === "passed";
150
151
  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 };
151
152
  await writeJsonAtomic(reportPath, report);
@@ -1,5 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  /** 在生成项目根目录实际执行 YSS 脚手架的固定验证命令并留证。 */
3
+ import { assertSourceFingerprint, generatedTreeDigest } from "../../../../scripts/lib/backend-platform-provenance.mjs";
4
+ import { assertContractPlatform, assertPlatformAgreement, platformDigest } from "../../../../scripts/lib/backend-platform.mjs";
5
+ import { verifyPlatformDependencies, verifyPlatformStartup, verifyPlatformTests, platformEvidenceArtifacts } from "../../../../scripts/lib/backend-platform-verification.mjs";
3
6
  import { mkdir, readFile, stat, writeFile } from "node:fs/promises";
4
7
  import path from "node:path";
5
8
  import process from "node:process";
@@ -59,12 +62,30 @@ function validateManifest(manifest) {
59
62
  if (manifest.schema_version === 4 ? manifest.current_version !== true : manifest.current_version !== manifest.contract_version) throw new Error("脚手架生成元数据清单不是当前合同版本");
60
63
  if (JSON.stringify(manifest.verification_commands) !== JSON.stringify(COMMANDS)) throw new Error("脚手架生成元数据清单验证命令不符合固定合同");
61
64
  }
62
- export async function run(projectRoot, evidenceDir, environment = process.env, { timeoutMs = 0, signal } = {}) {
65
+ export async function run(projectRoot, evidenceDir, environment = process.env, { timeoutMs = 0, signal, platformOptions = {}, firstSlice = false } = {}) {
63
66
  const wrapper = path.join(projectRoot, "mvnw"), manifestPath = path.join(projectRoot, ".yss", "scaffold-generation.json");
64
67
  if (!await isFile(wrapper)) throw new Error(`项目根目录缺少 Maven wrapper: ${wrapper}`);
65
68
  if (!await isFile(manifestPath)) throw new Error(`项目根目录缺少脚手架生成元数据清单: ${manifestPath}`);
66
69
  let manifest; try { manifest = JSON.parse(await readFile(manifestPath, "utf8")); } catch { throw new Error(`脚手架生成元数据清单无法读取或不是合法 JSON: ${manifestPath}`); }
67
70
  validateManifest(manifest);
71
+ let selectedPlatform, selectedEntry;
72
+ if (manifest.platform_verification && !manifest.platform_configuration) throw new Error("backend-platform: Manifest missing platform_configuration");
73
+ if (manifest.platform_configuration) {
74
+ if (manifest.platform_verification === "candidate" && platformOptions.candidate !== true) throw new Error("backend-platform: candidate scaffold cannot enter production verification");
75
+ const contractBytes = await readFile(manifest.contract_file_ref);
76
+ if (platformDigest(contractBytes).replace(/^sha256:/, "") !== manifest.contract_digest.replace(/^sha256:/, "")) throw new Error("backend-platform: contract digest drift");
77
+ const contract = JSON.parse(contractBytes);
78
+ assertPlatformAgreement(manifest.platform_configuration, contract.platform_configuration);
79
+ if (firstSlice) {
80
+ if (manifest.platform_verification !== "verified" || manifest.completion_level !== "empty-scaffold-verified") throw new Error("backend-platform: first slice requires a verified empty scaffold");
81
+ } else {
82
+ const relativeEvidence = path.relative(path.resolve(projectRoot), path.resolve(evidenceDir));
83
+ if (!relativeEvidence || (!relativeEvidence.startsWith(`..${path.sep}`) && relativeEvidence !== ".." && !path.isAbsolute(relativeEvidence))) throw new Error("backend-platform: empty scaffold evidence must be outside the generated project");
84
+ assertSourceFingerprint(manifest.source_fingerprint, manifest.architecture_family);
85
+ if (generatedTreeDigest(projectRoot, manifest) !== manifest.generated_tree_digest) throw new Error("backend-platform: generated tree drift");
86
+ }
87
+ ({ profile: selectedPlatform, entry: selectedEntry } = assertContractPlatform(contract, null, { ...platformOptions, requireVerified: platformOptions.candidate !== true }));
88
+ }
68
89
  await mkdir(evidenceDir, { recursive: true });
69
90
  const mavenConfig = await readTextIfPresent(path.join(projectRoot, ".mvn", "maven.config"));
70
91
  const preflight = {
@@ -86,6 +107,7 @@ export async function run(projectRoot, evidenceDir, environment = process.env, {
86
107
  if (!preflight.maven_repository_url_configured) failed.push("repository-url-not-configured");
87
108
  if (!preflight.maven_repository_credentials_configured) failed.push("repository-credentials-not-configured");
88
109
  if (failed.length) return { verification_mode: "controlled-generation", project_root: projectRoot, scaffold_manifest_ref: manifestPath, generated_at: isoNow(), status: "failed", failure_category: "verification-preflight", completion_level: "generated", preflight: { ...preflight, failures: failed }, commands: [] };
110
+ const verificationStartedAt = Date.now();
89
111
  const commands = [];
90
112
  for (const phase of PHASES) {
91
113
  const stdoutPath = path.join(evidenceDir, `mvnw-${phase}.stdout.log`);
@@ -109,15 +131,25 @@ export async function run(projectRoot, evidenceDir, environment = process.env, {
109
131
  stderr_ref: stderrPath
110
132
  });
111
133
  }
112
- const failureCategory = commands.find((item) => item.failure_category)?.failure_category ?? null;
134
+ let failureCategory = commands.find((item) => item.failure_category)?.failure_category ?? null;
135
+ const platformDependencies = selectedPlatform && failureCategory === null ? await verifyPlatformDependencies(projectRoot, evidenceDir, selectedPlatform, environment, { timeoutMs, signal, manifest, components: selectedEntry.components }) : null;
136
+ if (platformDependencies?.status === "failed") failureCategory = "platform-dependencies";
137
+ const integrationTests = selectedPlatform && failureCategory === null ? await verifyPlatformTests(projectRoot, evidenceDir, manifest, verificationStartedAt) : null;
138
+ if (integrationTests?.status === "failed") failureCategory = "platform-integration-tests";
139
+ const startup = selectedPlatform && failureCategory === null ? await verifyPlatformStartup(projectRoot, evidenceDir, manifest, environment, { timeoutMs, signal, runtimeArtifacts: platformDependencies.runtime_artifacts, providedLombokVersion: selectedPlatform.versions.lombok }) : null;
140
+ if (startup?.status === "failed") failureCategory = "platform-startup";
141
+ if (selectedPlatform && !firstSlice && generatedTreeDigest(projectRoot, manifest) !== manifest.generated_tree_digest) throw new Error("backend-platform: Maven modified generated source bytes");
113
142
  return {
143
+ verification_scope: firstSlice ? "first-slice" : "empty-scaffold",
144
+ ...(selectedPlatform && !firstSlice ? { recipe_digest: manifest.platform_configuration.compatibility_digest, source_fingerprint: manifest.source_fingerprint, generated_tree_digest: manifest.generated_tree_digest, evidence_artifacts: await platformEvidenceArtifacts(evidenceDir), verified_capabilities: manifest.module_profile?.requested_capabilities ?? [], integration_tests: integrationTests } : {}),
145
+ ...(selectedPlatform ? { spring_boot_version: selectedPlatform.spring_boot_version, java_version: selectedPlatform.java_version, parent: manifest.platform_configuration.parent, bom: manifest.platform_configuration.bom, architecture_family: manifest.architecture_family, platform_dependencies: platformDependencies, dependency_check: platformDependencies?.status ?? "not-executed", startup, startup_check: startup?.status ?? "not-executed", platform_verification: manifest.platform_verification } : {}),
114
146
  verification_mode: "controlled-generation",
115
147
  project_root: projectRoot,
116
148
  scaffold_manifest_ref: manifestPath,
117
149
  generated_at: isoNow(),
118
150
  status: failureCategory === null ? "passed" : "failed",
119
151
  failure_category: failureCategory,
120
- completion_level: failureCategory === null ? "empty-scaffold-verified" : "generated",
152
+ completion_level: firstSlice ? manifest.completion_level : failureCategory === null && manifest.platform_verification !== "candidate" ? "empty-scaffold-verified" : "generated",
121
153
  preflight,
122
154
  commands
123
155
  };
@@ -16,7 +16,7 @@ import { attachDesignPrerequisites } from "../../../../scripts/fixtures/backend-
16
16
  const scripts = path.dirname(fileURLToPath(import.meta.url));
17
17
  const generator = path.join(scripts, "generate_scaffold.mjs");
18
18
  const workflow = path.join(scripts, "generate_and_verify_scaffold.mjs");
19
- const command = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [generator, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
19
+ const command = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [path.resolve(scripts, "../../../../scripts/fixtures/backend-scaffold/generate-candidate.mjs"), generator, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
20
20
  const workflowCommand = (args, options = {}) => new Promise((resolve) => execFile(process.execPath, [workflow, ...args], { encoding: "utf8", ...options }, (error, stdout, stderr) => resolve({ code: error?.code ?? 0, stdout, stderr })));
21
21
  async function treeDigest(root) {
22
22
  const hash = createHash("sha256");
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-distributed-id
3
- description: Use when 用于 YSS 分布式 ID 组件的接入与排障。当用户提到 Leaf、CosId、号段模式、雪花算法、AutoIdInterceptor、MyBatis 自动注入 ID 或主键生成策略时调用。
3
+ description: "接入或排查 YSS 分布式 ID:Leaf、CosId、号段、雪花算法或 MyBatis 主键注入。"
4
4
  ---
5
5
 
6
6
  # yss-distributed-id
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-dto
3
- description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`, `PageQuery`, `CommandDTO`, `QueryDTO`, pagination, or response-wrapper boundaries are involved.
3
+ description: "实现或核验 YSS Result、PageResult、PageQuery、CommandDTO、QueryDTO 及 wire 边界。"
4
4
  ---
5
5
 
6
6
  # yss-dto
@@ -91,3 +91,7 @@ description: Use when YSS `Result`, `SingleResult`, `MultiResult`, `PageResult`,
91
91
  - DTO/VO 必须消费冻结 OpenAPI/no-impact record 和批准合同,写入合同允许路径。
92
92
  - POJO 样板可 `controlled-generation`;校验、权限输入、错误结构和序列化行为必须由对应 `behavior-tdd` 工作单元覆盖。
93
93
  - 必须加载合同要求的 `lombok`、`mapstruct` 和 `alibaba-java-code-style`,并按统一 `YSS Skill Execution Result` 返回文件、契约测试和偏离。
94
+
95
+ ## 新脚手架平台约束
96
+
97
+ 消费批准切片架构身份中的 `platform_configuration`,与工程 Manifest 核对后使用对应 YSS 组件。Boot 2.7 使用 `javax` Web/Validation API;Boot 3.5/4.1 使用 `jakarta`。Boot 4 按 Jackson 3、对应自动配置和 starter 适配;不替换 `javax.sql` 等 Java SE 包。平台不一致、兼容条目缺失或候选未验证时回合同编译器阻断,不在业务实现中升级或替换组件。详见 仓库共享合同 `docs/engineering/backend-platforms.md`。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-excel-mvc
3
- description: Use when 用于 Spring MVC 下的 Excel 导入导出实现。当用户提到 RequestExcel、ResponseExcel、Excel 导入解析、Excel 下载、动态列导出或导入导出接口异常时调用。
3
+ description: "实现或排查 YSS Spring MVC Excel 导入导出、RequestExcel、ResponseExcel 和动态列。"
4
4
  ---
5
5
 
6
6
  # yss-excel-mvc
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-exception
3
- description: Use when 用于 YSS exception 组件、统一异常模型、异常处理、错误码和异常 starter 接入排障。
3
+ description: "接入或排查 YSS 统一异常、错误码、异常处理器与 exception starter。"
4
4
  ---
5
5
 
6
6
  # yss-exception
@@ -56,3 +56,7 @@ Read `references/source-index.md` as a path-hint index whenever the task depends
56
56
  - Do not invent class names or configuration keys without checking the source index.
57
57
  - Do not replace component extension points with business-local framework code.
58
58
  - Do not broaden the task into unrelated YSS components unless the user asks.
59
+
60
+ ## 新脚手架平台约束
61
+
62
+ 消费批准切片架构身份中的 `platform_configuration`,与工程 Manifest 核对后使用对应 YSS 组件。Boot 2.7 使用 `javax` Web/Validation API;Boot 3.5/4.1 使用 `jakarta`。Boot 4 按 Jackson 3、对应自动配置和 starter 适配;不替换 `javax.sql` 等 Java SE 包。平台不一致、兼容条目缺失或候选未验证时回合同编译器阻断,不在业务实现中升级或替换组件。详见 仓库共享合同 `docs/engineering/backend-platforms.md`。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yss-formily-schema-generator
3
- description: Use when the user wants YssFormily JSON Schema or rendered form code from natural-language requirements, screenshots, local images, mockups, or Figma designs.
3
+ description: "从需求或设计图生成 YFormily JSON Schema 与表单代码;仅用于生产表单实现。"
4
4
  ---
5
5
 
6
6
  # YssFormily Schema Generator
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: yss-implementation-contract-compiler
3
- description: Use when a YSS vertical slice is entering implementation, spans multiple frontend/backend/API areas, needs implementation readiness checked, or requires a minimal YSS skill set, Slice Implementation Contract, TDD mode, evidence plan, or reroute decision.
3
+ description: "编译或重验 YSS Slice Implementation Contract、最小 Skill 集与证据计划;判定偏离及重新路由。"
4
4
  ---
5
5
 
6
6
  # YSS Implementation Contract Compiler
7
7
 
8
- 阶段 7 的实现合同编译器。它把已批准的生命周期资产、垂直切片、capability 和窄 Recipe 编译为 `Slice Implementation Contract` v2 草案;不批准合同、不写业务代码、不设置 `ready-for-agent`。
8
+ 阶段 7 的实现合同编译器。它把已批准的生命周期资产、垂直切片、capability 和窄 Recipe 编译为 `Slice Implementation Contract` v3 草案;不批准合同、不写业务代码、不设置 `ready-for-agent`。
9
9
 
10
10
  文档输出时按 `lifecycle-document-output` 条件调用 `i-have-adhd`,读取 `docs/process/document-writing.md`;作用域仅限当前产物,派发时传递条件及引用。
11
11
 
@@ -15,7 +15,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
15
15
 
16
16
  ## 输入
17
17
 
18
- 先读取 Spec、切片 Ticket、需求冻结、适用的原型确认、OpenAPI Freeze/no-impact、系统/数据架构、Design Review、Build Architecture Checklist、实现仓库和验证命令。输入缺失、未批准或 `stale` 时输出 `blocked`,交回 `yss-product-lifecycle`。
18
+ 先读取 Spec、切片 Ticket、需求冻结、适用的原型确认、OpenAPI Freeze/no-impact、适用的系统/数据架构和 Design Review、Build Architecture Checklist、实现仓库和验证命令。输入缺失、未批准或 `stale` 时输出 `blocked`,交回 `yss-product-lifecycle`。
19
19
 
20
20
  ## 编译循环
21
21
 
@@ -28,6 +28,8 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
28
28
  7. 选择 `behavior-tdd` 或 `controlled-generation`。
29
29
  8. 输出 `draft`、`blocked` 或 `ready-for-lifecycle-review`,交生命周期编排器核验和持久化。
30
30
 
31
+ 完整草案使用 `scripts/slice-contract prepare` 或 `prepareSliceImplementationContract` 从已有 Ticket / checkpoint 和必要细化组装;执行前读取唯一 YAML,视图和检查报告不授予权限。
32
+
31
33
  合同结构见 [slice-implementation-contract.md](references/slice-implementation-contract.md),专项返回协议见 [yss-skill-execution-result.md](references/yss-skill-execution-result.md)。前端、后端和测试子任务必须由生命周期主控从批准的 Slice Contract 编译任务包;任务包 schema 为 `docs/process/schemas/subagent-task-package.schema.json`,技能列表必须来自 `taskPackageDefaults`,不能由编译器或执行 Agent 另行手写。
32
34
 
33
35
  ## 硬规则
@@ -35,7 +37,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
35
37
  采用专职前端 profile 或显式 `frontend_delivery` 绑定时,先按 `docs/process/frontend-backend-delivery.md` 实际核验战略与后端联合交付。缺任一输入只能诊断和回交;输入通过后准备计划/合同,正式实现、生成和恢复仍须当前批准的 Slice Contract 冻结接收摘要。接口或部署版本漂移时重新接收,不复用旧成功输出。
36
38
 
37
39
  - 编译器不得输出 `approved`、`ready-for-agent` 或 `completed`。
38
- - Registry、Slice Contract 或编译器合同 schema v1 一律拒绝并给出迁移到 v2 的提示;不自动升级,不提供旧技能名兼容。
40
+ - Registry 和编译规则保持 schema v2;新 Slice 使用 v3,v2 按原规则读取和显式迁移。schema v1 一律拒绝,不自动升级,不提供旧技能名兼容。
39
41
  - `required_capabilities` 与 `required_skills` 必须同时冻结;Registry 或编译器摘要变化后合同立即 `stale`,重新编译后仍须交生命周期重新批准。
40
42
  - UI 影响按来源分支核验:新设计保持正式原型确认与 Visual Baseline;无 UI 改动才允许 `existing-ui-baseline` v1,并须当前真实基线确认及 `case_id`。任一来源缺少当前批准或摘要绑定时,不得路由页面实现。模型必须先读 manifest 与语义引用,再查看对应 PNG;禁止目录 glob 和图片独立猜义。
41
43
  - Repository/数据模型影响缺少数据架构时,不得路由持久化实现。
@@ -45,7 +47,7 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
45
47
  - Harness 内实现路径必须落在 `apps/backend/<project>/` 或 `apps/frontend/<project>/` 的具体项目目录;`apps/backend/`、`apps/frontend/` 只能作为容器,`app/backend/`、`app/frontend/` 及其子路径一律阻断。外部实现仓库使用其登记的真实项目根路径。`git-submodule` 使用 `implementation_path_policy: git-submodule-harness-apps`,空 gitlink、detached HEAD 或 `--force` 覆盖挂载点不得脚手架;`inspectWorkingTreeScope.writable` 必须为显式布尔值。
46
48
  - 当前用户、缓存、审计、Excel、分布式 ID、请求校验、错误映射、加解密或网关韧性命中时,必须按 `compiler-contract.yaml` 的 `impact_to_capabilities` 补齐入口 capability;不能只在 `boundaries.md` 中提及。仅复用已经验证的平台认证 / 授权能力不算 component impact,不自动增加权限专项 skill。
47
49
  - 业务行为使用 `behavior-tdd`;只有机械脚手架/生成物可用 `controlled-generation`,并记录例外和验证。
48
- - 阶段 5 若命中交付面且无已有工程,按 Project Scaffold Contract schema v4 编译 `controlled-generation` 合同 draft。后端先读取已确认的架构决定,并以原始字节 digest 绑定批准且当前的 Technical Design、Data Architecture Decision v1、API Contract Decision v1 及 `gate.engineering-contract-approved` 真实批准记录;API `required` 时工程批准还必须直接绑定冻结 OpenAPI YAML 的版本与摘要,`not-applicable` 时必须有影响评估、明确原因和证据。前端绑定标准模板精确 commit、应用标识、路由、OpenAPI 影响、目标路径和 `init_git` 决定。合同经生命周期批准并持久化后才能运行生成器。历史后端 schema v3 只允许 Manifest 只读恢复审计,并须补齐 API 对账,不得新生成;前端只接受 v4。生成与验证完成、仓库登记并通过 `check.implementation-repositories-ready` 后,才编译 Ticket 与业务 Slice Contract。
50
+ - 阶段 5 若命中交付面且无已有工程,按 Project Scaffold Contract schema v4 编译 `controlled-generation` 合同 draft。后端先读取已通过 `gate.backend-architecture-platform-approved` 的架构与精确 Spring Boot 版本决定,并以原始字节 digest 绑定批准且当前的 Technical Design、Data Architecture Decision v1、API Contract Decision v1 及 `gate.engineering-contract-approved` 真实批准记录;编译器不得自行默认、提问或批准。既有工程核验并复用当前登记架构及固定工程基线/POM 中的实际版本,不重新询问或生成。API `required` 时工程批准还必须直接绑定冻结 OpenAPI YAML 的版本与摘要,`not-applicable` 时必须有影响评估、明确原因和证据。前端绑定标准模板精确 commit、应用标识、路由、OpenAPI 影响、目标路径和 `init_git` 决定。合同经生命周期批准并持久化后才能运行生成器。历史后端 schema v3 只允许 Manifest 只读恢复审计,并须补齐 API 对账,不得新生成;前端只接受 v4。生成与验证完成、仓库登记并通过 `check.implementation-repositories-ready` 后,才编译 Ticket 与业务 Slice Contract。
49
51
  - 脚手架合同在编译阶段只能是 `draft` / `ready-for-lifecycle-review` / `blocked`;只有生命周期编排器可以把已持久化脚手架合同标记为 `approved`。脚手架合同只覆盖业务代码前的工程骨架工作单元;生成、基线校验和合同重编译完成后,它不能替代脚手架后的 Slice Implementation Contract。
50
52
  - 脚手架输出消费批准的脚手架合同;脚手架后的所有生成后端代码都必须绑定当前批准且版本当前的 Slice Implementation Contract、主 YSS skill、依赖闭包、允许写路径、预期证据和 YSS Skill Execution Result。打印命令、`./mvnw validate` 单项通过或脚手架成功不能替代合同批准;生成范围从机械内容变成业务行为时触发完整重路由。
51
53
  - 专项结果中的越界路径、缺失证据、`drift`、`violation` 或 `new_impacts` 必须阻断或重路由。
@@ -60,10 +62,16 @@ description: Use when a YSS vertical slice is entering implementation, spans mul
60
62
 
61
63
  ## 输出
62
64
 
63
- 输出合同草案、capability/Recipe 解析记录、技能依赖闭包、不适用理由、阻塞项、TDD 模式、工作单元、预期证据、验证命令、人工审查点、完整重路由触发器,以及建议的 `suggested_owner_role_id`(UI 影响 → `role.frontend-engineer`,后端影响 → `role.backend-engineer`,测试/审查 → `role.test-engineer`)。自然语言说明不能替代结构化合同字段。编译器不得自行批准合同、设置 `ready-for-agent` 或关闭会签门禁;owner 建议只供主控派活。
65
+ 输出唯一 YAML 合同草案及派生报告;报告包含 capability/Recipe 解析记录、技能依赖闭包、不适用理由、阻塞项、TDD 模式、工作单元、预期证据、验证命令、人工审查点、完整重路由触发器,以及建议的 `suggested_owner_role_id`(UI 影响 → `role.frontend-engineer`,后端影响 → `role.backend-engineer`,测试/审查 → `role.test-engineer`)。自然语言说明不能替代结构化合同字段。编译器不得自行批准合同、设置 `ready-for-agent` 或关闭会签门禁;owner 建议只供主控派活。
64
66
 
65
67
  ## 战略交接快照包
66
68
 
67
69
  跨仓交接使用 `scripts/strategic-handoff export / verify / import`。正式导出前补齐源战略的稳定规则 ID、关键场景和当前批准绑定;源资产原字节冻结、包内路径通过清单解析。目标导入只产生快照和对账/承接草案,正式 reconciliation 通过后才能进入战术设计。流程与字段见 `docs/process/strategic-handoff-package.md`。
68
70
 
69
71
  来自战略交接包的技术设计合同(DDD / MVC)必须绑定 `strategic_handoff` 导入收据、包摘要、正式目标对账及逐条承接 rows。来自导入包时禁止仅填 `upstream_current: true`。批准前执行 `scripts/verify-strategic-handoff-consumption --root <target> <tactical>`;存在受控延期时按切片执行 `--slice <slice-id>`,实际核验通过且合同批准后才可继续相关切片。最新源规则、关键场景或资产变化使依赖项 stale;未知依赖扩大阻断,业务冲突回交战略方。结果绑定当前包与战术摘要,不能复用旧输出宣布 ready-for-agent。
72
+
73
+ Slice v3 的任务进度、缺口和实时就绪结果不回写合同。源事实集中在 basis,Skill 闭包只在 resolution 保存,工作单元继承共同约束;独立工程审查与已有用户确认共同交生命周期批准。详见合同引用。
74
+
75
+ ## 后端脚手架平台承接
76
+
77
+ 消费生命周期已确认的架构与 `platform_configuration` v2;不得自行选择、批准或静默升级 Boot/Java。平台清单执行 `scripts/backend-platforms` 查询;只允许已验证 YSS 组合,新生成缺少配置或证据即阻断。决定、合同、Manifest 与下游架构身份须绑定同一平台及兼容摘要。详见 仓库共享合同 `docs/engineering/backend-platforms.md`。
@@ -1,4 +1,4 @@
1
1
  interface:
2
2
  display_name: "YSS Implementation Contract Compiler"
3
3
  short_description: "Compile capabilities into a minimal implementation contract"
4
- default_prompt: "Use yss-implementation-contract-compiler to compile the approved slice capabilities, deterministic skill closure, evidence plan, and v2 contract draft."
4
+ default_prompt: "Use yss-implementation-contract-compiler to compile the approved slice capabilities, deterministic skill closure, evidence plan, and v3 contract draft."
@@ -1,4 +1,10 @@
1
1
  schema_version: 2
2
+ slice_contract_versions:
3
+ default: 3
4
+ accepted: [2, 3]
5
+ v3_schema: docs/process/schemas/slice-implementation-contract-v3.schema.json
6
+ normalization: scripts/lib/slice-contract.mjs
7
+ v2_migration: explicit-new-draft-no-inherited-approval
2
8
  backend_architecture:
3
9
  registry_source: docs/agents/yss-skill-registry.yaml
4
10
  identity_schema: docs/process/schemas/backend-architecture-identity.schema.json
@@ -85,6 +91,7 @@ impact_flags_required: [ui_impact, api_impact, no_api_impact, data_impact, backe
85
91
  exclusive_flags:
86
92
  - [api_impact, no_api_impact]
87
93
 
94
+ # 以下 required 表仅供历史 Slice v2;v3 由 v3_schema 校验。
88
95
  slice_contract_required:
89
96
  root: [schema_version, contract_id, contract_version, slice_id, status, lifecycle_refs, readiness, resolution, common, frontend, backend, contract, cross_repo, work_units]
90
97
  lifecycle_refs: [spec, ticket, requirement_freeze, low_fidelity_review, prototype_review, prototype_profile_decision, prototype_deliverable, prototype_deliverable_verification, visual_baseline, prototype_confirmation, openapi_freeze_or_no_impact, architecture_review, data_architecture, technical_design, tactical_design, engineering_baseline, build_architecture_checklist, implementation_repository, frontend_repository, backend_repository, maven_wrapper]
@@ -416,3 +423,12 @@ strategic_handoff_consumption:
416
423
  stale_policy: latest-imported-source-digest-and-dependent-slices
417
424
  unknown_dependency: block-all
418
425
  compiler_must_not_approve: true
426
+
427
+ backend_platform_contract:
428
+ schema_version: 2
429
+ catalog_ref: docs/engineering/backend-platforms.json
430
+ configuration_field: platform_configuration
431
+ selection_owner: yss-product-lifecycle
432
+ new_generation_requires: [exact-boot-java, confirmed-decision, matching-yss-coordinates, verified-compatibility-entry]
433
+ candidate_generation: maintenance-only
434
+ candidate_downstream: blocked
@@ -0,0 +1,214 @@
1
+ # Slice v2 历史读取与显式迁移
2
+
3
+ 本页仅描述旧格式。新合同使用 [Slice v3](slice-implementation-contract.md);v2 保留原验证和过期判定,修改时显式生成新版本,不继承批准。
4
+
5
+ # Slice Implementation Contract
6
+
7
+ 后端合同还必须绑定 `architecture_identity`(schema 见 `docs/process/schemas/backend-architecture-identity.schema.json`),并与工程基线、登记和 Manifest 一致。将同一身份复制到 `resolution`、backend 工作单元和执行结果;Profile 的成熟度/Recipe 来源是技能注册表,draft 不得 ready-for-agent。旧 backend.domain-behavior/persistence-mybatis/http-api Recipe 只读退役,重新编译时显式选择 backend.ddd-* 或 backend.mvc-*。
8
+
9
+ `yss-implementation-contract-compiler` 生成草案;`yss-product-lifecycle` 核验、批准并持久化。合同缺少必填字段时状态为 `blocked`。schema v1 已停止支持,必须重新编译为 v2,不提供自动升级。
10
+
11
+ 采用专职前端 profile 时,`frontend.delivery` 绑定 `{acceptance_ref, digest}`,来自 `scripts/verify-frontend-delivery` 的当前结果;也可由 `resolution.frontend_delivery` 承载,两处并存时必须一致。正式执行从持久化合同读取并重验输入。细则见 `docs/process/frontend-backend-delivery.md`。
12
+
13
+ ```yaml
14
+ slice_contract:
15
+ schema_version: 2
16
+ contract_id:
17
+ contract_version: 1
18
+ slice_id:
19
+ status: draft
20
+ suggested_owner_role_id: # role.frontend-engineer | role.backend-engineer | role.test-engineer;编译器只建议,生命周期编排器派活并批准
21
+ lifecycle_refs:
22
+ spec:
23
+ ticket:
24
+ requirement_freeze:
25
+ low_fidelity_review:
26
+ prototype_review:
27
+ prototype_profile_decision:
28
+ prototype_deliverable:
29
+ prototype_deliverable_verification:
30
+ prototype_confirmation:
31
+ openapi_freeze_or_no_impact:
32
+ architecture_review:
33
+ data_architecture:
34
+ engineering_baseline:
35
+ technical_design: # 阅读引用;与 resolution.technical_design.ref 指向同一文件
36
+ tactical_design: # 旧 DDD 引用兼容
37
+ build_architecture_checklist:
38
+ implementation_repository:
39
+ frontend_repository:
40
+ backend_repository:
41
+ maven_wrapper:
42
+ readiness:
43
+ blockers: []
44
+ stale_inputs: []
45
+ not_applicable:
46
+ - item:
47
+ reason:
48
+ resolution:
49
+ technical_design: # 有技术设计影响时由编译器绑定,DDD / MVC 共用
50
+ ref:
51
+ version:
52
+ digest: # 已持久化合同原始字节摘要
53
+ required_capabilities: []
54
+ required_skills: []
55
+ recipe_ids: []
56
+ conditions: []
57
+ reason_chains: {}
58
+ registry_digest: # sha256 of normalized docs/agents/yss-skill-registry.yaml
59
+ compiler_contract_digest: # sha256 of normalized compiler-contract.yaml
60
+ compiled_at:
61
+ freshness: current # digest 变化后为 stale
62
+ common:
63
+ impacted_areas: []
64
+ implementation_path_policy: harness-apps-multi-project # or external-repository-native | git-submodule-harness-apps
65
+ project_roots: []
66
+ required_capabilities: []
67
+ required_skills: []
68
+ optional_skills: []
69
+ unavailable_skills:
70
+ - skill:
71
+ provider:
72
+ fallback: blocked | approved-equivalent
73
+ resolution:
74
+ allowed_write_paths: []
75
+ forbidden_patterns: []
76
+ expected_evidence_files: []
77
+ verification_commands: []
78
+ human_review_points: []
79
+ full_reroute_triggers: []
80
+ quality_baseline_ref:
81
+ context_plan:
82
+ required_context_refs: []
83
+ on_demand_context_refs: []
84
+ context_stop_rule: minimal-sufficient-evidence
85
+ missing_context_action: blocked # or reroute
86
+ doubt_driven_review:
87
+ status: not-applicable # or required / completed / blocked
88
+ trigger_impacts: []
89
+ claim:
90
+ counterclaim:
91
+ evidence_refs: []
92
+ residual_risks: []
93
+ reviewer_ref:
94
+ frontend:
95
+ status: not-applicable
96
+ required_skills: []
97
+ approved_prototype_ref:
98
+ state_matrix_ref:
99
+ visual_baseline_ref:
100
+ visual_baseline_case_ids: []
101
+ generated_api_client_ref:
102
+ allowed_write_paths: []
103
+ component_test_seams: []
104
+ e2e_paths: []
105
+ backend:
106
+ status: not-applicable
107
+ affected_layers: []
108
+ component_impacts: []
109
+ required_skills: []
110
+ application_boundary:
111
+ transaction_boundary:
112
+ persistence_strategy:
113
+ tactical_design_ref:
114
+ tactical_design_version:
115
+ aggregate_refs: []
116
+ invariant_refs: []
117
+ state_behavior_refs: []
118
+ gateway_boundary_ref:
119
+ domain_test_seams: []
120
+ application_test_seams: []
121
+ tactical_ddd:
122
+ status: not-applicable
123
+ tactical_design_ref:
124
+ tactical_design_version:
125
+ aggregate_refs: []
126
+ invariant_refs: []
127
+ state_behavior_refs: []
128
+ gateway_boundary_ref:
129
+ domain_test_seams: []
130
+ application_test_seams: []
131
+ allowed_write_paths: []
132
+ forbidden_patterns: []
133
+ expected_evidence_files: []
134
+ seam_deferred: []
135
+ verification_commands: []
136
+ contract:
137
+ api_impact: false
138
+ freeze_ref:
139
+ no_api_impact_ref:
140
+ generated_clients: []
141
+ contract_tests: []
142
+ regeneration_commands: []
143
+ cross_repo:
144
+ repositories: []
145
+ delivery_order: []
146
+ integration_verification: []
147
+ rollback_order: []
148
+ work_units:
149
+ - id: slice-frontend
150
+ role_id: role.frontend-engineer
151
+ runtime_id: runtime.skill-projection
152
+ execution_state: Worker
153
+ workflow_status: not-started
154
+ task_package_ref:
155
+ contract_id: # must equal slice_contract.contract_id
156
+ contract_version: # must equal slice_contract.contract_version
157
+ downstream_consumers: []
158
+ convergence_ref:
159
+ work_unit:
160
+ behavior:
161
+ primary_skill:
162
+ supporting_skills: []
163
+ tdd_mode: behavior-tdd
164
+ allowed_write_paths: []
165
+ expected_evidence: []
166
+ verification_commands: []
167
+ - id: slice-backend
168
+ role_id: role.backend-engineer
169
+ runtime_id: runtime.skill-projection
170
+ execution_state: Worker
171
+ workflow_status: not-started
172
+ task_package_ref:
173
+ contract_id:
174
+ contract_version:
175
+ downstream_consumers: []
176
+ convergence_ref:
177
+ work_unit:
178
+ behavior:
179
+ primary_skill:
180
+ supporting_skills: []
181
+ tdd_mode: behavior-tdd
182
+ allowed_write_paths: []
183
+ expected_evidence: []
184
+ verification_commands: []
185
+ ```
186
+
187
+ 工作单元:
188
+
189
+ ```yaml
190
+ work_unit:
191
+ id:
192
+ behavior:
193
+ primary_skill:
194
+ supporting_skills: []
195
+ tdd_mode: behavior-tdd
196
+ allowed_write_paths: []
197
+ expected_evidence: []
198
+ verification_commands: []
199
+ controlled_generation:
200
+ exception_reason:
201
+ generator:
202
+ generator_inputs: []
203
+ expected_files: []
204
+ verification_commands: []
205
+ behavior_tests_after_generation: []
206
+ ```
207
+
208
+ `controlled_generation` 仅在 `tdd_mode: controlled-generation` 时必填;其他模式标记 `not-applicable`。明确写入需求的权限业务行为仍使用 `behavior-tdd`;API schema 与 database schema 分别触发契约或数据架构回退,不得用一个含糊的 schema 类型决定路线。
209
+
210
+ `work_units` 中的前端、后端和测试任务是切片级子任务,不是新的生命周期阶段。每个子任务必须引用独立任务包;任务包只能消费同一份已批准且版本当前的 Slice Contract。`workflow_status` 追踪执行过程,不能替代生命周期状态;`contract_id`、`contract_version` 或 resolution digest 不一致时必须阻断并回到实现合同编译器。
211
+
212
+ 一个切片可以组合多个窄 Recipe,但只计算一次闭包。Recipe 只能引用 capability;合同同时冻结 `required_capabilities`、`required_skills`、完整原因链和 Registry/Compiler digest。任一 digest 或 Visual Baseline 版本 / digest 改变时,当前合同标记 `stale`,重新编译后仍须由 `yss-product-lifecycle` 再批准。UI 切片只消费 `visual_baseline_case_ids` 指定的图片,并先读取 manifest 与语义引用,禁止按目录 glob 猜测图片含义。
213
+
214
+ 技术设计编译绑定使用 `technical_design: {ref, version, digest}` 与 `slice_id`,校验器规则见 `yss-technical-design/references/technical-design-contract.md`。`backend.tactical_ddd` 仅适用于 `domain-driven`;MVC 消费共同技术设计绑定与 `design` 的用例、规则、事务和测试 seam,不填聚合或 Gateway 字段。