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
@@ -6,7 +6,7 @@
6
6
 
7
7
  1. 源仓必须为 `project-instance`。新交付使用 Domain Strategy v3 与 Stage Decision Package v3;规则、场景、决定、假设、约束、成功标准、测试 seam 与 downstream mapping 使用稳定 ID 和证据。v2 仅用于历史 Handoff v3 的只读验证;修改或重发须显式迁移、重新批准。不得用行号、文字 hash 或导出顺序生成业务身份。
8
8
  2. 每个场景明确 `critical`、`rule_refs`、`success_results` 和既有 `failure_results`;兼容字段 `rules` 必须与引用规则正文一致。不变量使用 `rule_ref`,并通过 `scenario_refs` 指向确实覆盖该规则的场景。缺身份或关联先回战略方确认、更新并重新批准,导出器不猜测。
9
- 3. 新原型与既有 UI 交接都使用 Handoff v5,分别选择 `prototype` 或 `existing-ui-baseline`。历史 Handoff v3/v4 与既有裸 v5 包继续按冻结 schema 执行 `verify/import`,但 v3/v4 不再创建新 export;修改或重新交付必须迁移到 v5 并重新批准。校验器先读取 `schema_version` 再选择固定 schema,未知版本输出支持列表并 fail closed。`package_export` 的 `approvals` 按 `source` 字段及 `handoff` 绑定批准记录,声明 `record_ref`、`gate_id`、`digest_kind`。沿用源角色表的现有门禁;当前综合模板的战略、阶段决策及交接资产统一绑定 `gate.plan-approved`,Spec 对应 Spec 基线批准,原型和视觉基线对应 `gate.product-design-approved`;历史包及其他源 profile 仍按包内明确登记的源批准规则验证,不自动迁移当前门禁状态。
9
+ 3. 新原型与既有 UI 交接都使用 Handoff v5,分别选择 `prototype` 或 `existing-ui-baseline`。历史 Handoff v3/v4 与既有裸 v5 包继续按冻结 schema 执行 `verify/import`,但 v3/v4 不再创建新 export;修改或重新交付必须迁移到 v5 并重新批准。校验器先读取 `schema_version` 再选择固定 schema,未知版本输出支持列表并 fail closed。`package_export` 的 `approvals` 按 `source` 字段及 `handoff` 绑定批准记录,声明 `record_ref`、`gate_id`、`digest_kind`。当前战略 profile 的领域战略、阶段决策和业务 Ticket 绑定 `gate.plan-approved`,Spec 绑定 `gate.spec-baseline-approved`,原型、视觉或既有 UI 基线绑定 `gate.product-design-approved`,交接自身绑定 `gate.strategic-design-handoff-approved`。历史包仍按包内明确登记的源批准规则验证,但旧门禁只能作为历史证据,不能作为当前输入继续流转。
10
10
  4. 批准记录除既有会签字段,还要在 `artifact_bindings` 中逐项绑定 `{id, version, digest}`。战略/阶段建议 `canonical-json`;普通文件使用 `sha256-bytes`;视觉基线使用 `visual-baseline`。正文中的 `approved` 和可读取批准路径不能替代当前字节的批准绑定。源角色表要求用户决定记录时,接收端必须支持并核验该策略;旧工具缺少该能力时阻断并要求升级,不能按旧规则放行。
11
11
  5. `additional_files` 明确补充依赖;`reference_map` 将 `evidence.*` 稳定证据引用解析为仓内路径。源资产、批准记录、证据引用、Markdown 本地链接和显式目录共同形成依赖闭包。HTTP 引用保留为引用,不在导出时下载网页。
12
12
  6. 原型分支的 `prototype` 指定 `profile`、`preview_root`、`entry_ref`、`verification_ref`、`verification_digest`(验证记录的字节摘要);H2 另须 `source_root`、`lock_ref` 和 `source_digest`(源码目录树摘要,算法同下述预览树)。源码交付目录不含 node_modules / .git;锁文件与源码一同保存。预览目录须资源闭合,可通过本地静态服务离线浏览。源码、锁文件或验证记录变化须更新交接摘要并重新批准。
@@ -99,16 +99,10 @@ scripts/strategic-feedback verify-adjudication --root <消费者项目根> <adju
99
99
 
100
100
  共享脚本和包 schema 以主模板为维护源,通过 `scripts/sync-strategic-handoff-tools` 同步到设计/研发模板;源战略 schema 的离线验证副本由该脚本从 canonical `yss-stage-decision/references` 派生。各仓技能仍只编辑 `.agents/skills`,再生成各 runtime 投影与锁。CLI 快照使用各自同步工具,工作树快照用于集成验证,不代表已发布 commit。共享同步仅从主技能注册表投影 `existing_project_profiles` 验证元数据,保留接收模板自己的 Recipe、capability 与创作技能;源注册表及目标有效字节写入工具锁。后端接收模板使用独立视觉 wire runtime,不安装原型创作技能。超出本 profile 职责的技术设计/编译资产在预检中明确标记不支持,战略交接路线不依赖这些后端资产。
101
101
 
102
- ## 当前用户决定与交接复用
102
+ ## 当前用户决定与交接复核
103
103
 
104
- 源角色策略以 `required_capabilities: [strategic-decision-reuse-v1]` 声明本节语义;不支持该能力的接收器必须拒绝。历史包仍按包内源策略校验,不升级旧批准。
104
+ 当前用户决定只覆盖 Plan、Spec 和适用的产品设计。各批准记录使用 `subject_ref`、`approval_scope`、`user_decision_ref` 绑定最终可审阅资产与原始回复;Plan 审阅包聚合领域战略和阶段决策的内部检查结论,产品设计门禁聚合原型审查与浏览器验证结论。输入摘要、范围、风险或授权条件变化时,对应决定失效并重新确认。
105
105
 
106
- 当前会签绑定 `subject_ref`、`approval_scope`、`user_decision_ref`。只有最终战略交接允许用 `decision_reuse_ref` 引用复用证明;原回复的 boundary、资产和范围保持不变。checkpoint 的 `human_review.decision_reuse` 保存 `{target_gate, ref}`,会签必须引用同一证明。数字人审查仍独立完成。
106
+ `gate.strategic-design-handoff-approved` 不要求新的用户回复,也不把旧决定改写为交接决定。产品经理形成完整交接包后,由需求经理独立复核来源批准新鲜度、完整包摘要、风险与范围,并以 Fresh Verification 关闭交接门禁。缺少独立复核、来源批准过期、摘要漂移或验证失败均阻断 finalize。
107
107
 
108
- 复用证明采用 schema v1,`kind: strategic-decision-reuse-v1`,包含 `target_gate`、`scope_ref`、`scope`、`requirements`。每个 requirement 保留原 `boundary`、`subject_ref`、`scope`、`user_decision_ref`。校验当前原始回复、负责人、撤销、资产摘要和范围,不接受自填布尔值作为覆盖证据。
109
-
110
- 独立交付范围清单采用 schema v1,`kind: strategic-delivery-scope`,包含 `delivery_ref`、`assets`、`risks`、`conditions`。每项资产包含 `ref`、`version`、原始字节 `digest`、`boundary` 和 `scope`;原决定的 subject 或 basis 必须覆盖该资产,专业边界须一致。风险必须已出现在原决定的 risks 中,授权条件必须已出现在 next_actions 中;无法证明的部分补充确认。
111
-
112
- `delivery_ref` 是交接正文去除 `package_export`、`status` 后的独立 JSON/YAML 快照;也必须列入 assets 并由既有真实决定明确覆盖;不强制新增交接回复。所有实际 source 资产及视觉或既有 UI 基线 manifest 均须逐项覆盖。业务 Ticket 已被 Spec 的当前行为与验收范围明确覆盖时,可引用该 Spec 决定;数字人交接会签仍使用交接门禁,不改写原回复的专业边界。先固定该快照与业务资产,再确认和会签,最后组装包,避免摘要循环。仅重新组装传输包且业务依据和范围不变时复用有效确认。
113
-
114
- 导出将范围清单、复用证明、原决定及其来源依赖一起收集。离线 verify 重新检查实际交付与批准覆盖;缺文件、摘要变化、范围遗漏、未知能力均阻断,不回写旧包。
108
+ 历史包中的 `strategic-decision-reuse-v1`、`decision_reuse_ref` 和旧门禁批准保持可读,供离线 `verify/import` 复核当时证据。它们不能关闭当前聚合门禁;任何修改、重发或继续流转都必须先完成战略门禁迁移并重新批准。
@@ -16,6 +16,8 @@ notes: 会签必须可读取;起草者不得出现在 countersigner_role_ids
16
16
  subject_ref: null
17
17
  approval_scope: []
18
18
  user_decision_ref: null
19
+ # 已有交付范围授权时可引用独立当前审查支持的延续证明;不能仅填写 approved。
20
+ continuation_ref: null
19
21
  # 聚合门禁 / 内部专业审查绑定的当前主体字节 SHA-256(64 位十六进制)。
20
22
  subject_digest: null
21
23
  # 专业检查必须与起草者为不同执行实例;不仅仅比较职称。
@@ -19,7 +19,7 @@ owner: ai
19
19
  | 系统 / 数据架构设计 | | |
20
20
  | 风险 / 回滚约束 | `AGENTS.md` | |
21
21
  | Slice Implementation Contract | | 填写 contract_id / contract_version / 生命周期批准状态 |
22
- | 后端脚手架策略 | `orchestration-contract.yaml` / DDD 或 Layered MVC 生成器 | | backend `scaffold_status=required` 时填写 architecture decision、schema v3 合同身份、批准/持久化引用、生成器输入、Manifest v3、实际 `./mvnw` 结果和后置实现合同编译器重编译 |
22
+ | 后端脚手架策略 | `orchestration-contract.yaml` / DDD 或 Layered MVC 生成器 | | backend `scaffold_status=required` 时填写架构与平台用户门禁、architecture decision、精确 Spring Boot 版本、schema v4 合同身份、批准/持久化引用、生成器输入、Manifest v4、实际 `./mvnw` 结果和后置实现合同编译器重编译;既有工程填写登记值复用证据 |
23
23
  | 工程项目路径策略 | `docs/process/implementation-repo-integration.md` / 实现合同编译器 Contract | | Harness 内必须是 `apps/backend/<project>/` 或 `apps/frontend/<project>/`;`apps/backend/`、`apps/frontend/` 仅为容器,`app/backend/`、`app/frontend/` 及其子路径阻断 |
24
24
  | 垂直切片工作单元 | | |
25
25
  | YSS Skill Execution Result | | 每个 skill / work_unit 的结果文件引用 |
@@ -32,7 +32,7 @@ owner: ai
32
32
  | 后端切片必须回勾 `Backend Slice Implementation Contract`:required skills、允许写范围、禁止模式、证据文件、延期 seam 和验证命令完整 | implementation routing / 垂直切片 Ticket / `AGENTS.md` | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 缺合同或合同不完整时暂停并记录替代方案 |
33
33
  | 统一合同版本:实现消费的 contract_id / contract_version 与生命周期批准并持久化的版本一致,实现合同编译器 未自行批准合同或推进 `ready-for-agent` | Slice Implementation Contract / 生命周期证据 | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 版本不一致时将工作单元标记 `stale` 并暂停 build |
34
34
  | 合同子项闭环:Common、Frontend、Backend、Contract、Cross-repo 子合同按影响面填写,不适用项有原因 | Slice Implementation Contract | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 缺失适用子合同时回到 实现合同编译器 |
35
- | 后端脚手架顺序:工程基线与 Agent 推荐 → 用户确认并持久化 architecture decision → schema v3 合同 draft / 生命周期批准 → DDD 或 Layered MVC 生成器 → 对应基线与 Manifest v3 校验 → 实现合同编译器重编译;生成器无交互且不得生成业务行为 | `yss-product-lifecycle` / `yss-ddd-scaffold-generator` / `yss-layered-mvc-scaffold-generator` | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 选择缺失、digest 漂移、顺序缺失、生成器混入业务行为或缺 Execution Result 时阻断 |
35
+ | 新建后端顺序:工程基线与 Agent 推荐 → `gate.backend-architecture-platform-approved` 同时确认 DDD / MVC 与精确 Spring Boot 版本 → 持久化 architecture decision → DDD / MVC 分支设计 → schema v4 合同 draft / 生命周期批准 → 对应生成器 → 基线与 Manifest v4 校验 → 实现合同编译器重编译;既有工程核验复用登记值;生成器无交互且不得生成业务行为 | `yss-product-lifecycle` / `yss-ddd-scaffold-generator` / `yss-layered-mvc-scaffold-generator` | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 门禁或选择缺失、digest 漂移、顺序缺失、生成器混入业务行为或缺 Execution Result 时阻断 |
36
36
  | 写路径与证据:Execution Result 的 changed_files 均位于 allowed_write_paths,expected_evidence_files 已实际生成 | Slice Implementation Contract / YSS Skill Execution Result | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 路径越界或证据缺失标记 `violation` 并阻断 build |
37
37
  | TDD 模式:每个工作单元唯一选择 `behavior-tdd` 或 `controlled-generation`;生成器未承载状态、权限、业务过滤、事务、错误映射或用户可见交互 | Slice Implementation Contract / 垂直切片 Ticket / Execution Result | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 模式不匹配时拆分工作单元并完整重路由 |
38
38
  | 所有后续生成代码:必须消费当前批准合同、主 YSS skill、依赖闭包、允许写路径、预期证据和 YSS Skill Execution Result;业务行为使用 `behavior-tdd` | `post_scaffold_generated_code_policy` | | `implemented` / `seam-deferred` / `drift` / `violation` / `not-applicable` | | 缺任一条件或以时间压力豁免时阻断 build |
@@ -226,7 +226,7 @@ owner: ai
226
226
 
227
227
  | 受影响端 | 是否已有可用工程 | scaffold_status | 目标是否确认 | 处理结论 | 使用 skill | 输出位置 / 仓库 | 备注 |
228
228
  |---|---|---|---|---|---|---|---|
229
- | backend | 是 / 否 / 不适用 | existing / required / initialized / not-applicable | 是 / 否 / 不适用 | 复用现有 / 初始化 / 阻塞 | `yss-ddd-scaffold-generator` / `yss-layered-mvc-scaffold-generator` / none | | 填写 architecture_family、decision_id 与 digest |
229
+ | backend | 是 / 否 / 不适用 | existing / required / initialized / not-applicable | 是 / 否 / 不适用 | 复用现有 / 初始化 / 阻塞 | `yss-ddd-scaffold-generator` / `yss-layered-mvc-scaffold-generator` / none | | 新建填写 gate、architecture_family、精确 Spring Boot 版本、decision_id 与 digest;既有工程填写登记值复用证据 |
230
230
  | frontend | 是 / 否 / 不适用 | existing / required / initialized / not-applicable | 是 / 否 / 不适用 | 复用现有 / 初始化 / 阻塞 | `yss-frontend-scaffold-generator` / none | | |
231
231
 
232
232
  脚手架输出位置必须回指具体项目根:后端为 `apps/backend/<project>/`,前端为 `apps/frontend/<project>/`;不得把 `apps/backend/`、`apps/frontend/` 容器根或任何 `app/backend/`、`app/frontend/` 路径作为生成目标。
@@ -240,18 +240,18 @@ owner: ai
240
240
 
241
241
  ### 4.3 后端脚手架工作单元
242
242
 
243
- 当 backend `scaffold_status=required` 时,生命周期先按领域复杂度推荐 DDD/MVC,并以批量决策表反问用户确认本体默认与子项目覆盖。选择写入 `scaffold-architecture-decisions.yaml`;缺失、未确认或 stale 时阻断。随后登记一个 `controlled-generation` 工作单元:`domain-driven` 使用 `primary_skill=yss-ddd-scaffold-generator`,`layered-mvc` 使用 `primary_skill=yss-layered-mvc-scaffold-generator`。生成后执行对应基线校验和 `yss-implementation-contract-compiler` 合同重编译。`existing` / `initialized` 不重复生成,架构转换另立迁移工作单元。
243
+ 当 backend `scaffold_status=required` 时,生命周期先按领域复杂度推荐 DDD/MVC,并展示平台清单中的精确 Spring Boot / Java 版本,以批量决策表取得同一次用户确认并通过 `gate.backend-architecture-platform-approved`。选择写入 `scaffold-architecture-decisions.yaml`;缺失、未确认或 stale 时阻断。门禁通过后才进入对应的 DDD 战术设计或 MVC 技术设计,再登记 `controlled-generation` 工作单元。`domain-driven` 使用 `primary_skill=yss-ddd-scaffold-generator`,`layered-mvc` 使用 `primary_skill=yss-layered-mvc-scaffold-generator`。生成后执行对应基线校验和 `yss-implementation-contract-compiler` 合同重编译。`existing` / `initialized` 核验并复用当前登记架构与平台,不重复询问或生成;架构转换、平台升级另立迁移工作单元。
244
244
 
245
245
  | 项 | 内容 |
246
246
  |---|---|
247
- | 前置 | `prototype_confirmation`、工程基线、实现仓库和脚手架目标已确认;`scaffold-architecture-decisions.yaml` 已由用户确认且 digest 当前;实现合同编译器 schema v3 脚手架合同 draft 已经生命周期批准并持久化为结构化 JSON,生成器通过 `--contract-file` 消费 |
247
+ | 前置 | `prototype_confirmation`、工程基线、实现仓库和脚手架目标已确认;`gate.backend-architecture-platform-approved` 已同时确认 DDD / MVC 与精确 Spring Boot 版本,`scaffold-architecture-decisions.yaml` digest 当前;实现合同编译器 schema v4 脚手架合同 draft 已经生命周期批准并持久化为结构化 JSON,生成器通过 `--contract-file` 消费 |
248
248
  | 生成器 | `domain-driven` → `yss-ddd-scaffold-generator`;`layered-mvc` → `yss-layered-mvc-scaffold-generator` |
249
249
  | 模式 | `controlled-generation` |
250
250
  | Java / Maven 身份 | `base_package` 与 Maven `group_id` 分开登记;项目版本、父 POM GAV、`yss-components.version` 进入批准合同并原样传给 CLI |
251
251
  | 允许生成 | DDD 的 Domain / Application / Infrastructure / Adapter / Bootstrap,或 MVC 的 server / service / repository 与能力解析出的 adapter / client / feign-client;以及 POM、配置、Wrapper 和非业务机械模板 |
252
252
  | 禁止生成 | 业务规则、状态机、权限、事务、复杂查询、错误映射、业务字段和用户可见行为 |
253
253
  | 生成选项 | 关闭 `--with-example`;生成器严格 initialize-only,非空目录、`--force`、旧项目迁移和当前模板升级均为 `unsupported` |
254
- | Profile | DDD:`target-domain-model` + MySQL;MVC:`layered-mvc` + MySQL/Oracle/OceanBase Oracle;共同固定 Spring Boot 2.7 / Java 8 / `javax` / MyBatis-Plus,其他组合须先通过独立 fixture |
254
+ | Profile | DDD:`target-domain-model`;MVC:`layered-mvc-service`;Spring Boot / Java 使用用户确认且兼容清单验证通过的精确组合,不使用版本范围或 `latest` |
255
255
  | 验证 | 使用一键生成验证入口,实际执行项目根目录 `./mvnw validate`、`./mvnw test`、`./mvnw package`;通过后仅为 `empty-scaffold-verified`,golden first slice 通过后才是 `first-slice-verified` |
256
256
  | 后置 | `yss-backend-scaffold-parent`、`yss-implementation-contract-compiler` 业务合同重编译、YSS Skill Execution Result |
257
257
 
@@ -0,0 +1,26 @@
1
+ schema_version: 1
2
+ kind: review-bundle
3
+ bundle_id: review-bundle.plan
4
+ task_id: replace-with-plan-review-task-id
5
+ work_unit_id: work-unit.plan-requirements
6
+ review_session_id: replace-with-stable-review-session-id
7
+ role_id: role.product-manager
8
+ runtime_id: runtime.generic
9
+ principal_ref: replace-with-reviewer-instance
10
+ reviews:
11
+ - schema_version: 1
12
+ gate_id: check.domain-strategy-approved
13
+ decision: approved
14
+ actor_kind: digital-human
15
+ role_id: role.product-manager
16
+ runtime_id: runtime.generic
17
+ principal_ref: replace-with-reviewer-instance
18
+ drafter_role_id: role.requirements-manager
19
+ drafter_principal_ref: replace-with-drafter-instance
20
+ subject_ref: docs/.scratch/<feature>/domain/domain-strategy-v1.yaml
21
+ subject_digest: replace-with-64-char-sha256
22
+ approval_scope:
23
+ - replace-with-feature-id
24
+ evidence_refs:
25
+ - replace-with-current-review-evidence
26
+ notes: 本模板只用于起草。只保留实际命中的 check;同一 bundle 的所有结论必须来自同一复核任务、会话和实例。
@@ -1,10 +1,11 @@
1
1
  ---
2
2
  status: ready-for-human
3
+ requirement_version: v1
3
4
  ---
4
5
 
5
6
  # 垂直切片 Ticket:<标题>
6
7
 
7
- 填写前读取[中文写作规范](../process/document-writing.md)和 [Ticket 对照](examples/lifecycle-writing-examples.md#3-ticket把交付行为与实现就绪区分清楚)。状态只在 frontmatter 维护,正文记录依据。
8
+ 填写前读取[中文写作规范](../process/document-writing.md)和 [Ticket 对照](examples/lifecycle-writing-examples.md#3-ticket把交付行为与实现就绪区分清楚)。冻结前在 frontmatter 记录状态。新 Slice 绑定本文件的需求版本与原始字节;冻结后 frontmatter 仅代表冻结时状态,当前执行状态由项目已配置的主 tracker 维护,平台不可用时使用现有任务包和待发布记录。不得回写本文件的状态、验收勾选或执行结果。需求变化另存新版本并重新编译、审查与批准,旧文件和批准不自动迁移。
8
9
 
9
10
  ## 父级
10
11
 
@@ -33,11 +34,11 @@ status: ready-for-human
33
34
 
34
35
  ## 验收标准
35
36
 
36
- 每项写条件、操作和可观察结果,关联上游规则;保留必要例外。测试未执行前保持未勾选。
37
+ 每项写条件、操作和可观察结果,关联上游规则;保留必要例外。需求基线不记录执行结果;实际验收结论写入 tracker / 任务包。
37
38
 
38
- - [ ] 标准 1
39
- - [ ] 标准 2
40
- - [ ] 标准 3
39
+ - AC-1:标准 1
40
+ - AC-2:标准 2
41
+ - AC-3:标准 3
41
42
 
42
43
  ## 测试 Seam
43
44
 
@@ -55,33 +56,19 @@ status: ready-for-human
55
56
  | contract_id | |
56
57
  | contract_version | |
57
58
  | contract_ref | |
58
- | 实现合同编译器 状态 | draft / blocked / ready-for-lifecycle-review |
59
- | 生命周期批准状态 | pending / approved / rejected |
59
+ | 编译与批准记录 | 在现有 checkpoint / 任务包中维护,不回写冻结 Ticket |
60
60
  | suggested_owner_role_id | `role.frontend-engineer` / `role.backend-engineer` / `role.test-engineer`(实现合同编译器 建议,编排器派活) |
61
61
  | Build Architecture Checklist | |
62
62
 
63
- > 实现合同编译器 不得自行将合同批准或将本 Ticket 推进为 `ready-for-agent`。只有生命周期编排器核验并持久化当前版本合同、清除阻塞边后,才能推进状态。
63
+ > 实现合同编译器 不得自行将合同批准或将本 Ticket 推进为 `ready-for-agent`。只有生命周期编排器核验并持久化当前版本合同、清除阻塞边后,才能在主 tracker 推进执行状态。
64
64
 
65
- ### 工作单元
65
+ ### 工作单元与工程约束
66
66
 
67
- | work_unit_id | 验收行为 / 目标 | primary_skill | supporting_skills | tdd_mode | allowed_write_paths | expected_evidence | verification_commands | Execution Result 引用 | 状态 |
68
- |---|---|---|---|---|---|---|---|---|---|
69
- | | | | | behavior-tdd / controlled-generation | | | | | pending / running / blocked / completed / stale |
67
+ 新切片使用 Slice v3。Ticket 保留行为、验收、测试 seam 与合同引用;工作单元、Skill、写范围、验证命令在权威 YAML 中保存一次,不再在此复制表格。
70
68
 
71
- `controlled-generation` 仅允许机械脚手架、样板、冻结客户端或配置,并记录 exception reason、生成器输入和生成后行为测试;业务规则、状态机、事务、权限、错误映射、复杂查询和用户可见交互必须使用 `behavior-tdd`。只有需求明确包含权限业务行为时才把它写入工作单元,不另设安全 / 权限姿态。
69
+ Agent 使用 `scripts/slice-contract view <合同.yaml>` 展示审阅说明,使用 `--unit <id>` 展示任务和完整工程约束。本切片新增细化、例外或缺口由 Agent 整理,独立专业审查核验;已有用户确认覆盖且无实质变化时复用。任务进度和 Execution Result 引用进入现有 tracker / 任务包。
72
70
 
73
- ## YSS 技能与后端实现合同
74
-
75
- > 涉及后端时必须填写;不涉及时写明 `not-applicable`。不得只写“符合 YSS”。
76
-
77
- | 影响面 | 必需 skill | 需要 / 不需要的理由 | 预期证据 |
78
- |---|---|---|---|
79
- | Domain / 领域行为 | `yss-domain` | | |
80
- | Application / 用例编排 | `yss-application` | | |
81
- | Infrastructure / Repository | `yss-repository` / `yss-mybatis` | | |
82
- | Web Adapter / DTO | `yss-web-controller` / `yss-dto` | | |
83
- | POJO / 对象转换 | `lombok` / `mapstruct` | | |
84
- | Java 规范 | `alibaba-java-code-style` | | |
71
+ 涉及后端时,适用设计从已批准 Technical Design 绑定取得。`controlled-generation` 只适用于机械生成,并保留例外与验证;业务行为使用 `behavior-tdd`。
85
72
 
86
73
  ### 后端阻断规则
87
74
 
@@ -98,7 +85,7 @@ status: ready-for-human
98
85
 
99
86
  列出实际依赖、未决项、责任人和解除条件;尚未核验时写“待核验”。只有确认没有阻塞时才写“无”,无依赖不等于已通过实现就绪核验。
100
87
 
101
- ## 重路由状态
88
+ ## 重路由记录位置
102
89
 
103
90
  | 字段 | 内容 |
104
91
  |---|---|
@@ -110,19 +97,21 @@ status: ready-for-human
110
97
  | return_stage | 实现合同编译器 / Architecture Re-check / 产品设计 / OpenAPI Draft-Review-Freeze / 系统或数据架构 / other |
111
98
  | recovery_conditions | |
112
99
 
113
- 出现 `drift`、`violation` 或非空 `new_impacts` 时暂停受影响工作单元,不得先完成代码再补合同;更新合同版本并通过生命周期审查后才能恢复。
100
+ 本表作为 tracker / 任务包的记录字段说明,冻结后不在本文件填写。出现 `drift`、`violation` 或非空 `new_impacts` 时暂停受影响工作单元,不得先完成代码再补合同;更新合同版本并通过生命周期审查后才能恢复。
114
101
 
115
102
  ## 会签
116
103
 
104
+ 冻结后会签结果保存在现有批准记录与 checkpoint,不修改以下冻结时引用。
105
+
117
106
  | 门禁 | 记录路径 | 会签角色 | 状态 |
118
107
  |---|---|---|---|
119
108
  | | `docs/.scratch/<feature>/gates/<gate-id>-approval.yaml` | 见 `docs/agents/digital-human-roles.yaml` | pending / approved / blocked / not-applicable |
120
109
 
121
110
  ## 状态
122
111
 
123
- 状态依据:<当前版本合同、批准和就绪核验记录引用,以及尚未关闭的阻塞>。
112
+ 冻结时状态依据:<当时的合同、批准和就绪核验记录引用,以及尚未关闭的阻塞>。当前状态从主 tracker / 任务包读取。
124
113
 
125
- > 默认 frontmatter 为 `ready-for-human`。仅在生命周期确认合同已批准且当前、阻塞已清除、全部适用门禁及就绪条件通过后更新为 `ready-for-agent`;本节不另维护第二个状态值。
114
+ > 默认 frontmatter 为 `ready-for-human`。仅在生命周期确认合同已批准且当前、阻塞已清除、全部适用门禁及就绪条件通过后在主 tracker 更新为 `ready-for-agent`;冻结文件不更新。
126
115
 
127
116
  ## AI / 人工审查点
128
117
 
@@ -132,12 +121,14 @@ status: ready-for-human
132
121
 
133
122
  ## 完成定义
134
123
 
124
+ 以下为完成判据;检查结果和勾选进入 tracker / 任务包,不回写本文件。
125
+
135
126
  - [ ] 如有需要,已基于冻结 OpenAPI Spec 拆分切片
136
127
  - [ ] 实现完成
137
128
  - [ ] 已新增测试且测试通过
138
129
  - [ ] 已移除调试 / 原型代码
139
- - [ ] 已回勾 `Backend Slice Implementation Contract` 和 `Build Architecture Checklist`
140
- - [ ] 已回勾当前 `contract_id` / `contract_version`、全部工作单元和对应 `YSS Skill Execution Result`
130
+ - [ ] 已在任务包核验 `Backend Slice Implementation Contract` 和 `Build Architecture Checklist`
131
+ - [ ] 已在任务包核验当前 `contract_id` / `contract_version`、全部工作单元和对应 `YSS Skill Execution Result`
141
132
  - [ ] 实际 changed files 均在合同允许路径内,预期证据齐全,验证结果包含执行时间
142
133
  - [ ] `new_impacts`、`drift`、`violation` 和重路由状态均有明确结论,合同未处于 `stale`
143
134
  - [ ] 如领域或架构决策变化,已更新 `CONTEXT.md` / ADR;新增业务术语含 PascalCase `英文标识`,代码与契约字段能追溯到该词干
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { loadBackendPlatforms, platformBinding, resolveBackendPlatform } from "./lib/backend-platform.mjs";
3
+ try {
4
+ const catalog = loadBackendPlatforms();
5
+ const rows = catalog.profiles.map(profile => {
6
+ const combinations = catalog.compatibility.filter(entry => entry.profile_id === profile.id && entry.spring_boot_version === profile.spring_boot_version).map(entry => {
7
+ try { resolveBackendPlatform(platformBinding(profile, entry)); return { id: entry.id, status: "verified", parent: entry.parent, bom: entry.bom, architectures: entry.evidence.map(item => item.architecture_family), capabilities: entry.capabilities ?? [] }; }
8
+ catch (error) { return { id: entry.id, status: "blocked", reason: error.message }; }
9
+ });
10
+ return { profile_id: profile.id, spring_boot_version: profile.spring_boot_version, java_version: profile.java_version, recommended_java: profile.java_version === 8 || profile.java_version === 17, selectable: combinations.some(entry => entry.status === "verified"), combinations, blockers: combinations.some(entry => entry.status === "verified") ? [] : profile.candidate_blockers };
11
+ });
12
+ process.stdout.write(`${JSON.stringify({ schema_version: 1, profiles: rows }, null, 2)}\n`);
13
+ if (process.argv.includes("--require-verified") && rows.some(row => !row.selectable)) process.exitCode = 1;
14
+ } catch (error) { process.stderr.write(`${error.message}\n`); process.exitCode = 1; }
@@ -10,7 +10,7 @@ import {
10
10
  } from "./digital-human-roles.mjs";
11
11
  import { assertGateChecks } from "./lifecycle-controls.mjs";
12
12
  import { ROOT, loadRegistry } from "./lifecycle-registry.mjs";
13
- import { assertUserDecisionRequirement, assertWorkUnitUserDecision, assertImplementationDecision } from "./user-decision.mjs";
13
+ import { assertUserDecisionRequirement, assertWorkUnitUserDecision, assertImplementationDecision, decisionIO, decisionDigest } from "./user-decision.mjs";
14
14
 
15
15
  const DECISIONS = new Set(["approved", "rejected", "vetoed"]);
16
16
  const ACTOR_KINDS = new Set(["digital-human", "biological-human", "orchestrator"]);
@@ -38,8 +38,36 @@ function yamlFromFile(filePath, label) {
38
38
  return value;
39
39
  }
40
40
 
41
- export function loadApprovalRecord(filePath) {
42
- return yamlFromFile(filePath, "会签记录");
41
+ export function loadApprovalRecord(filePath, gateId) {
42
+ return selectApprovalRecord(yamlFromFile(filePath, "会签记录"), gateId);
43
+ }
44
+
45
+ function reviewBundleRows(bundle) {
46
+ if (bundle?.schema_version !== 1 || bundle.kind !== "review-bundle") fail("组合审查身份无效");
47
+ for (const field of ["bundle_id", "task_id", "work_unit_id", "review_session_id", "role_id", "runtime_id", "principal_ref"]) requireString(bundle[field], field);
48
+ if (!/^review-bundle\.[a-z0-9][a-z0-9-]*$/.test(bundle.bundle_id)) fail("组合审查 bundle_id 格式非法");
49
+ if (!/^work-unit\.[a-z0-9][a-z0-9-]*$/.test(bundle.work_unit_id)) fail("组合审查 work_unit_id 格式非法");
50
+ if (!Array.isArray(bundle.reviews) || !bundle.reviews.length) fail("组合审查不能为空");
51
+ if (new Set(bundle.reviews.map(row => row?.gate_id)).size !== bundle.reviews.length) fail("组合审查 gate_id 重复");
52
+ for (const row of bundle.reviews) {
53
+ if (!row || typeof row !== "object" || Array.isArray(row)) fail("组合审查结论必须是对象");
54
+ if (row.role_id !== bundle.role_id || row.runtime_id !== bundle.runtime_id || row.principal_ref !== bundle.principal_ref) fail("组合审查必须来自同一复核角色、运行时和实例");
55
+ if (row.review_session_id != null && row.review_session_id !== bundle.review_session_id) fail("组合审查 review_session_id 不一致");
56
+ }
57
+ return bundle.reviews;
58
+ }
59
+
60
+ export function selectApprovalRecord(record, gateId) {
61
+ if (record.kind !== 'review-bundle') return record;
62
+ const selected = reviewBundleRows(record).filter(x => x.gate_id === gateId);
63
+ if (selected.length !== 1) fail('组合审查缺少当前检查的明确结论');
64
+ return {
65
+ ...selected[0],
66
+ review_bundle_id: record.bundle_id,
67
+ review_task_id: record.task_id,
68
+ review_work_unit_id: record.work_unit_id,
69
+ review_session_id: record.review_session_id
70
+ };
43
71
  }
44
72
 
45
73
  export function resolveApprovalRef(approvalRef, fromFile = ROOT) {
@@ -68,7 +96,12 @@ export function validateApprovalRecord(record, { rolesDoc, requireApproved = fal
68
96
  if (record.actor_kind === "orchestrator") fail("编排器门禁不使用会签记录关闭");
69
97
 
70
98
  if (!requireApproved && loadRegistry().id_policy.deprecated_ids.includes(record.gate_id)) return { bucket: "historical", gate: record.gate_id };
71
- const rule = countersignRuleForGate(registry.gate_policy, record.gate_id);
99
+ let rule = countersignRuleForGate(registry.gate_policy, record.gate_id);
100
+ const continuationReviewers = registry.gate_policy.continuation_reviews?.[record.gate_id];
101
+ if (record.continuation_ref && record.actor_kind === 'digital-human' && continuationReviewers) {
102
+ rule = { bucket: 'digital_human_review', gate: record.gate_id, countersigners: continuationReviewers };
103
+ if (!record.drafter_principal_ref || record.drafter_principal_ref === record.principal_ref) fail('延续批准必须由独立审查者核验');
104
+ }
72
105
  if (!rule) fail(`${record.gate_id} 不是会签门禁;evidence_only / orchestrator 门禁不写 approval-record`);
73
106
 
74
107
  if (requireApproved && record.decision !== "approved") {
@@ -101,13 +134,25 @@ export function validateApprovalRecord(record, { rolesDoc, requireApproved = fal
101
134
  }
102
135
 
103
136
  function assertRecordUserDecision(record, registry, options) {
104
- if (!registry.user_decision_policy.gates.includes(record.gate_id) && countersignRuleForGate(registry.gate_policy, record.gate_id)?.bucket !== "biological_human") return;
137
+ if (!registry.user_decision_policy.gates.includes(record.gate_id)) return;
105
138
  const result = assertApprovalUserDecision(record, registry, options);
106
139
  if (record.actor_kind === "biological-human" && result.validated.some((item) => item.principal_ref !== record.principal_ref)) fail("user-decision-responder-mismatch: 生物人会签者与原始回复者不一致");
107
140
  }
108
141
 
109
142
  export function validateApprovalRecordFile(filePath, options = {}) {
110
- return validateApprovalRecord(loadApprovalRecord(filePath), options);
143
+ const record = yamlFromFile(filePath, "会签记录");
144
+ if (record.kind === 'review-bundle') {
145
+ return reviewBundleRows(record).map(item => {
146
+ const row = loadApprovalRecord(filePath, item.gate_id);
147
+ if (options.requireApproved) {
148
+ if (!row.drafter_principal_ref || row.drafter_principal_ref === row.principal_ref) fail('组合审查必须保留独立身份');
149
+ const io = decisionIO(options);
150
+ if (!row.subject_ref || decisionDigest(io.bytes(row.subject_ref)) !== `sha256:${row.subject_digest}`) fail('组合审查主体缺失或已过期');
151
+ }
152
+ return validateApprovalRecord(row, options);
153
+ });
154
+ }
155
+ return validateApprovalRecord(record, options);
111
156
  }
112
157
 
113
158
  export function assertApprovedGateHasValidApproval(gateId, gateState, { checkpointPath } = {}) {
@@ -121,7 +166,7 @@ export function assertApprovedGateHasValidApproval(gateId, gateState, { checkpoi
121
166
  }
122
167
  const resolved = resolveApprovalRef(gateState.approval_ref, checkpointPath || ROOT);
123
168
  if (!existsSync(resolved)) fail(`${gateId} 的 approval_ref 不可读: ${gateState.approval_ref}`);
124
- const record = loadApprovalRecord(resolved);
169
+ const record = loadApprovalRecord(resolved, gateId);
125
170
  if (record.gate_id !== gateId) fail(`${gateId} 的会签记录 gate_id 不匹配`);
126
171
  if (!gateState.subject_ref || gateState.subject_ref !== record.subject_ref || !gateState.approval_scope?.length || JSON.stringify([...gateState.approval_scope].sort()) !== JSON.stringify([...(record.approval_scope || [])].sort())) {
127
172
  fail(`${gateId} user-decision-subject-mismatch: 当前门禁资产与会签范围不匹配`);
@@ -1,3 +1,4 @@
1
+ import { selectSliceWorkUnit, normalizeSliceContract, sourceSliceContract, parseSliceYaml } from './slice-contract.mjs';
1
2
  import path from 'node:path';
2
3
  import { readFileSync } from 'node:fs';
3
4
  import { ROOT, read, parse, safe, hash, digest, schema } from './strategic-handoff-io.mjs';
@@ -29,11 +30,11 @@ export function verifySliceContractApproval(binding,{root=process.cwd(),contract
29
30
  check(binding?.ref&&binding?.digest&&binding?.approval_ref,'EXECUTION_APPROVAL_REQUIRED','需要当前持久化 Slice 的 ref/digest/approval_ref');
30
31
  const bytes=readFileSync(safe(root,binding.ref));
31
32
  check(hash(bytes)===binding.digest,'EXECUTION_CONTRACT_STALE','Slice 原始字节与绑定不一致');
32
- const document=parse(bytes),contract=document.slice_contract||document;
33
- check(contract.schema_version===2&&contract.status==='approved'&&typeof contract.contract_id==='string'&&contract.contract_id&&typeof contract.contract_version==='string'&&contract.contract_version&&typeof contract.slice_id==='string'&&contract.slice_id,'EXECUTION_CONTRACT_INVALID','需要已批准且有身份的持久化 Slice v2');
33
+ const document=parseSliceYaml(bytes),contract=normalizeSliceContract(document,{root});
34
+ check([2,3].includes(contract.schema_version)&&contract.status==='approved'&&typeof contract.contract_id==='string'&&contract.contract_id&&typeof contract.contract_version==='string'&&contract.contract_version&&typeof contract.slice_id==='string'&&contract.slice_id,'EXECUTION_CONTRACT_INVALID','需要已批准且有身份的持久化 Slice v2/v3');
34
35
  assertExistingSliceStructure(contract);
35
36
  check((!binding.id||binding.id===contract.contract_id)&&(!binding.version||binding.version===contract.contract_version),'EXECUTION_CONTRACT_CONFLICT','当前合同身份或版本不匹配');
36
- if(expected)check(same(expected.slice_contract||expected,contract),'EXECUTION_CONTRACT_CONFLICT','调用方合同与持久化原字节不一致');
37
+ if(expected)check(same(sourceSliceContract(expected),sourceSliceContract(contract)),'EXECUTION_CONTRACT_CONFLICT','调用方合同与持久化原字节不一致');
37
38
  const roles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
38
39
  const approval=read(safe(root,binding.approval_ref));
39
40
  if(!countersignRuleForGate(roles.gate_policy,gateId)&&roles.gate_policy.orchestrator?.includes(gateId)) {
@@ -51,13 +52,14 @@ export function verifySliceContractApproval(binding,{root=process.cwd(),contract
51
52
  validateApprovalRecord(approval,{...ioFor(root),rolesDoc:roles,requireApproved:true});
52
53
  check(approval.gate_id===gateId&&approval.artifact_bindings?.some(item=>item.id===contract.contract_id&&item.version===contract.contract_version&&item.digest===binding.digest),'EXECUTION_APPROVAL_SCOPE','源会签未绑定当前 Slice 的身份、版本和字节');
53
54
  }
55
+ if(contract.schema_version===3) verifySliceProfessionalReview(approval,{...binding,id:contract.contract_id,version:contract.contract_version},roles,root);
54
56
  return {contract,binding:structuredClone(binding),root};
55
57
  }
56
58
 
57
59
  function executionBasis(verified,{allowCompilerDrift=false}={}) {
58
60
  const {contract}=verified,resolution=contract.resolution||{};
59
61
  const compiler=read(safe(ROOT,'.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml'));
60
- if(!allowCompilerDrift)for(const [section,fields] of Object.entries(compiler.slice_contract_required))for(const field of fields)check(Object.hasOwn(section==='root'?contract:contract[section]||{},field),'EXECUTION_CONTRACT_INVALID',`合同缺少 ${section}.${field}`);
62
+ if(!allowCompilerDrift&&contract.schema_version===2)for(const [section,fields] of Object.entries(compiler.slice_contract_required))for(const field of fields)check(Object.hasOwn(section==='root'?contract:contract[section]||{},field),'EXECUTION_CONTRACT_INVALID',`合同缺少 ${section}.${field}`);
61
63
  check(Array.isArray(contract.common?.allowed_write_paths)&&contract.common.allowed_write_paths.length>0&&contract.common.allowed_write_paths.every(value=>typeof value==='string'&&value.trim()),'EXECUTION_SCOPE_MISSING','合同缺少已批准写范围');
62
64
  check(Array.isArray(contract.readiness?.blockers)&&!contract.readiness.blockers.length&&Array.isArray(contract.readiness?.stale_inputs)&&!contract.readiness.stale_inputs.length,'EXECUTION_CONTRACT_STALE','合同就绪条件仍有阻断或过期输入');
63
65
  if(!allowCompilerDrift)check(resolution.registry_digest===digest(loadSkillRegistry()).slice(7)&&resolution.compiler_contract_digest===digest(compiler).slice(7),'EXECUTION_CONTRACT_STALE','编译依据已改变,应重新编译批准');
@@ -68,16 +70,18 @@ function executionBasis(verified,{allowCompilerDrift=false}={}) {
68
70
 
69
71
  export function createApprovedExecutionContext(binding,options={}) {
70
72
  const verified=executionBasis(verifySliceContractApproval(binding,options));
73
+ selectSliceWorkUnit(verified.contract,options.work_unit_id);
71
74
  const context=Object.freeze({kind:'approved-slice-execution-context'});
72
- contexts.set(context,{binding:verified.binding,root:verified.root,allowCompilerDrift:false});
75
+ contexts.set(context,{binding:verified.binding,root:verified.root,work_unit_id:options.work_unit_id,allowCompilerDrift:false});
73
76
  return context;
74
77
  }
75
78
 
76
79
  /** A prior approved scope may authenticate bounded output while current compiler facts are recomputed. */
77
80
  export function createApprovedRecompilationContext(binding,options={}) {
78
81
  const verified=executionBasis(verifySliceContractApproval(binding,options),{allowCompilerDrift:true});
82
+ selectSliceWorkUnit(verified.contract,options.work_unit_id);
79
83
  const context=Object.freeze({kind:'approved-slice-recompilation-context'});
80
- contexts.set(context,{binding:verified.binding,root:verified.root,allowCompilerDrift:true});
84
+ contexts.set(context,{binding:verified.binding,root:verified.root,work_unit_id:options.work_unit_id,allowCompilerDrift:true});
81
85
  return context;
82
86
  }
83
87
 
@@ -86,7 +90,7 @@ export function assertApprovedExecutionContext(context,{root=process.cwd(),contr
86
90
  const saved=contexts.get(context);
87
91
  check(saved&&saved.root===path.resolve(root),'EXECUTION_CONTEXT_UNTRUSTED','只允许从当前原始 Slice 与本地批准生成的执行上下文');
88
92
  const verified=executionBasis(verifySliceContractApproval(saved.binding,{root,contract}),{allowCompilerDrift:saved.allowCompilerDrift});
89
- const current=verified.contract,resolution=current.resolution;
93
+ const current=selectSliceWorkUnit(verified.contract,saved.work_unit_id),resolution=current.resolution;
90
94
  if(sliceId)check(current.slice_id===sliceId,'EXECUTION_SCOPE_CONFLICT','执行上下文属于另一切片');
91
95
  if(architectureIdentity)check(same(resolution.architecture_identity,architectureIdentity),'EXECUTION_INPUT_REPLACED','执行上下文不允许替换架构身份或固定源码输入');
92
96
  if(architectureEvidence)check(same(resolution.architecture_evidence,architectureEvidence),'EXECUTION_INPUT_REPLACED','执行上下文不允许替换原始架构证据');
@@ -102,5 +106,24 @@ export function assertApprovedExecutionContext(context,{root=process.cwd(),contr
102
106
  export function approvedExecutionBinding(context) {
103
107
  const saved=contexts.get(context);
104
108
  check(saved,'EXECUTION_CONTEXT_UNTRUSTED','不能序列化未验证的执行上下文');
105
- return structuredClone(saved.binding);
109
+ return {...structuredClone(saved.binding),...(saved.work_unit_id?{work_unit_id:saved.work_unit_id}:{})};
110
+ }
111
+
112
+ function verifySliceProfessionalReview(approval,binding,roles,root) {
113
+ const refs=approval.gates?.[gateId]?.evidence_refs || approval.evidence_refs || [];
114
+ let found=false;
115
+ for(const ref of refs) {
116
+ if(!/\.(yaml|yml|json)$/.test(ref))continue;
117
+ const record=read(safe(root,ref));
118
+ const rows=record.kind==='review-bundle'?record.reviews:[record];
119
+ for(const row of rows || []) {
120
+ if(row.gate_id!=='check.design-reviewed'||row.subject_ref!==binding.ref)continue;
121
+ validateApprovalRecord(row,{...ioFor(root),rolesDoc:roles,requireApproved:true});
122
+ check(row.drafter_principal_ref&&row.principal_ref!==row.drafter_principal_ref,'EXECUTION_REVIEW_NOT_INDEPENDENT','Slice 工程审查必须独立于起草者');
123
+ check(row.subject_digest===binding.digest.slice(7)&&row.artifact_bindings?.some(x=>x.id===binding.id&&x.version===binding.version&&x.digest===binding.digest),'EXECUTION_REVIEW_STALE','Slice 工程审查未绑定当前合同');
124
+ check(Array.isArray(row.findings)&&row.findings.every(x=>x.kind==='suggestion'?!!x.follow_up:['requirement-violation','missing-evidence','important-risk'].includes(x.kind)&&x.status==='resolved'),'EXECUTION_REVIEW_BLOCKED','Slice 工程审查有未关闭问题');
125
+ found=true;
126
+ }
127
+ }
128
+ check(found,'EXECUTION_REVIEW_REQUIRED','Slice v3 缺少当前合同的独立工程审查');
106
129
  }
@@ -1,3 +1,4 @@
1
+ import { platformProfile, resolveBackendPlatform } from "./backend-platform.mjs";
1
2
  import { createHash } from "node:crypto";
2
3
  import { loadSkillRegistry } from "./skill-registry.mjs";
3
4
  import { validateExistingArchitecture, verifyExistingArchitecture } from "./existing-backend-architecture.mjs";
@@ -12,6 +13,10 @@ export function validateArchitectureIdentity(identity, registry = loadSkillRegis
12
13
  if (!identity || typeof identity !== "object") throw new TypeError("缺少 architecture_identity;请从工程基线重新编译");
13
14
  if (identity.schema_version === 2) return validateExistingArchitecture(identity, registry);
14
15
  if (identity.schema_version !== undefined || identity.source_kind !== undefined) throw new TypeError("不支持的 architecture_identity 来源或版本");
16
+ if (identity.platform_configuration) {
17
+ const selected = platformProfile(identity.platform_configuration.profile_id, undefined, identity.platform_configuration.spring_boot_version);
18
+ if (selected.spring_boot_version !== identity.platform_configuration.spring_boot_version || selected.java_version !== identity.platform_configuration.java_version) throw new TypeError("backend-platform: invalid architecture platform binding");
19
+ }
15
20
  const profile = registry.architecture_profiles?.[identity.architecture_profile];
16
21
  if (!profile || identity.architecture_family !== profile.architecture_family || identity.generator_skill !== profile.generator_skill) {
17
22
  throw new TypeError("architecture_identity 的架构族、Profile 或生成器不匹配");
@@ -51,5 +56,6 @@ export function assertArchitectureAgreement(identity, evidence, registry) {
51
56
 
52
57
  export function architectureReady(identity, registry = loadSkillRegistry()) {
53
58
  const profile = validateArchitectureIdentity(identity, registry);
59
+ if (identity.platform_configuration) { try { resolveBackendPlatform(identity.platform_configuration); } catch { return false; } }
54
60
  return profile.maturity === "supported";
55
61
  }
@@ -0,0 +1,67 @@
1
+ /** Version qualification binds executable sources and generated bytes, not Skill prose. */
2
+ import { createHash } from 'node:crypto';
3
+ import { readFileSync, readdirSync, lstatSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+ const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
7
+ const digest = bytes => `sha256:${createHash('sha256').update(bytes).digest('hex')}`;
8
+ const fail = message => { throw new TypeError(`platform-provenance: ${message}`); };
9
+ function fileMap(root, refs) {
10
+ const files = {};
11
+ const visit = ref => {
12
+ const full = path.join(root, ref), info = lstatSync(full);
13
+ if (info.isSymbolicLink()) fail(`source symlink: ${ref}`);
14
+ if (info.isDirectory()) for (const name of readdirSync(full).sort()) visit(`${ref}/${name}`);
15
+ else files[ref] = { digest: digest(readFileSync(full)), executable: Boolean(info.mode & 0o111) };
16
+ };
17
+ refs.forEach(visit);
18
+ return Object.fromEntries(Object.entries(files).sort(([a], [b]) => a.localeCompare(b)));
19
+ }
20
+ export function platformSourceFingerprint(family, root = ROOT) {
21
+ const skill = family === 'domain-driven' ? 'yss-ddd-scaffold-generator' : family === 'layered-mvc' ? 'yss-layered-mvc-scaffold-generator' : null;
22
+ if (!skill) fail('unknown architecture');
23
+ const base = `.agents/skills/${skill}`;
24
+ const generator = fileMap(root, [`${base}/scripts/generate_scaffold.mjs`, ...(family === 'domain-driven' ? [`${base}/assets`] : ['.agents/skills/yss-ddd-scaffold-generator/assets/wrapper']), 'scripts/lib/backend-platform.mjs', 'scripts/lib/scaffold-local-database.mjs']);
25
+ const verifier = fileMap(root, ['scripts/lib/backend-platform-provenance.mjs', 'scripts/lib/backend-platform-verification.mjs', 'scripts/lib/command-runner.mjs', 'scripts/vendor/xml.mjs', '.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs']);
26
+ return { schema_version: 1, generator_digest: digest(JSON.stringify(generator)), verifier_digest: digest(JSON.stringify(verifier)) };
27
+ }
28
+ export function assertSourceFingerprint(value, family, root = ROOT) {
29
+ if (JSON.stringify(value) !== JSON.stringify(platformSourceFingerprint(family, root))) fail('generator/verifier source drift; requalify candidate');
30
+ }
31
+ export function generatedTreeDigest(projectRoot, manifest) {
32
+ const expected = manifest.ownership?.generated_files;
33
+ if (!Array.isArray(expected) || !expected.length) fail('missing generated file inventory');
34
+ const names = new Set();
35
+ const actual = {};
36
+ for (const file of expected) {
37
+ if (!file.path || path.isAbsolute(file.path) || file.path.split(/[\\/]/).some(p => p === '..' || p === '') || names.has(file.path)) fail('invalid generated file inventory');
38
+ names.add(file.path);
39
+ const full = path.join(projectRoot, file.path);
40
+ // Check every path component: file lstat alone does not detect a linked parent directory.
41
+ let current = projectRoot;
42
+ for (const part of file.path.split('/')) { current = path.join(current, part); if (lstatSync(current).isSymbolicLink()) fail(`generated symlink: ${file.path}`); }
43
+ const info = lstatSync(full);
44
+ if (!info.isFile()) fail(`generated file absent: ${file.path}`);
45
+ const hash = digest(readFileSync(full));
46
+ if (hash.replace('sha256:', '') !== file.sha256.replace('sha256:', '')) fail(`generated file drift: ${file.path}`);
47
+ actual[file.path] = { digest: hash, executable: Boolean(info.mode & 0o111) };
48
+ }
49
+ const visit = (directory, relative = '') => {
50
+ for (const item of readdirSync(directory, { withFileTypes: true })) {
51
+ const ref = relative ? `${relative}/${item.name}` : item.name;
52
+ if (item.isSymbolicLink()) fail(`unexpected symlink: ${ref}`);
53
+ if (item.isDirectory()) { if (!['target', '.git'].includes(item.name)) visit(path.join(directory, item.name), ref); }
54
+ else if (!names.has(ref) && ref !== '.yss/scaffold-generation.json' && ref !== '.yss/platform-dependencies.json' && !ref.endsWith('/.yss/platform-dependencies.json')) fail(`unexpected source file: ${ref}`);
55
+ }
56
+ };
57
+ visit(projectRoot);
58
+ return digest(JSON.stringify(Object.fromEntries(Object.entries(actual).sort(([a],[b]) => a.localeCompare(b)))));
59
+ }
60
+
61
+ export function assertResumableCandidate(projectRoot, contract, contractBytes) {
62
+ const manifest = JSON.parse(readFileSync(path.join(projectRoot, '.yss/scaffold-generation.json'), 'utf8'));
63
+ if (manifest.platform_verification !== 'candidate' || manifest.schema_version !== 4 || manifest.contract_id !== contract.contract_id || manifest.contract_version !== contract.contract_version || manifest.contract_digest.replace('sha256:', '') !== digest(contractBytes).replace('sha256:', '') || JSON.stringify(manifest.platform_configuration) !== JSON.stringify(contract.platform_configuration)) fail('resume requires the identical candidate contract/Manifest');
64
+ assertSourceFingerprint(manifest.source_fingerprint, contract.architecture_family);
65
+ if (generatedTreeDigest(projectRoot, manifest) !== manifest.generated_tree_digest) fail('resume generated tree drift');
66
+ return manifest;
67
+ }