create-yss-spec 3.0.1 → 3.1.3

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 (1348) hide show
  1. package/README.md +117 -91
  2. package/bin/create-yss-spec.js +11 -3
  3. package/package.json +9 -2
  4. package/src/api/_sync-service.js +191 -0
  5. package/src/api/index.js +22 -0
  6. package/src/api/project-diff.js +9 -0
  7. package/src/api/project-doctor.js +10 -0
  8. package/src/api/template-apply.js +10 -0
  9. package/src/api/template-plan.js +9 -0
  10. package/src/cli/args.js +60 -0
  11. package/src/cli/error-output.js +52 -0
  12. package/src/cli/flags.js +9 -0
  13. package/src/cli/help.js +95 -0
  14. package/src/cli/index.js +82 -0
  15. package/src/cli/plan-output.js +61 -0
  16. package/src/cli/prompts.js +91 -0
  17. package/src/cli/router.js +41 -0
  18. package/src/cli.js +5 -2253
  19. package/src/commands/attach.js +280 -0
  20. package/src/commands/diff.js +23 -0
  21. package/src/commands/doctor.js +417 -0
  22. package/src/commands/init.js +193 -0
  23. package/src/commands/sync.js +146 -0
  24. package/src/commands/update.js +14 -0
  25. package/src/contracts/apply-result-v1.json +45 -0
  26. package/src/contracts/customization-policy-v1.json +28 -0
  27. package/src/contracts/doctor-report-v1.json +29 -0
  28. package/src/contracts/error-envelope-v1.json +24 -0
  29. package/src/contracts/generator-policy-v1.json +24 -0
  30. package/src/contracts/ownership-policy-v1.json +40 -0
  31. package/src/contracts/plan-schema-v1.json +115 -0
  32. package/src/family-identity.js +365 -0
  33. package/src/family-runtime.js +23 -0
  34. package/src/filesystem/apply-plan.js +44 -0
  35. package/src/filesystem/copy-path.js +28 -0
  36. package/src/filesystem/path-utils.js +67 -0
  37. package/src/filesystem/transaction-runner.js +41 -0
  38. package/src/filesystem/transaction.js +153 -0
  39. package/src/git/submodule.js +115 -0
  40. package/src/git/worktree.js +69 -0
  41. package/src/template/attach-planner-runtime.js +51 -0
  42. package/src/template/attach-planner.js +160 -0
  43. package/src/template/instance-runtime.js +463 -0
  44. package/src/template/lifecycle-metadata.js +99 -0
  45. package/src/template/lifecycle-policy.js +129 -0
  46. package/src/template/lifecycle-runtime.js +90 -0
  47. package/src/template/migration-planner.js +95 -0
  48. package/src/template/migration-runtime.js +247 -0
  49. package/src/template/ownership-metadata.js +79 -0
  50. package/src/template/ownership-policy.js +149 -0
  51. package/src/template/ownership-runtime.js +109 -0
  52. package/src/template/plan-schema.js +36 -0
  53. package/src/template/sync-planner-runtime.js +57 -0
  54. package/src/template/sync-planner.js +206 -0
  55. package/src/template/verification-runtime.js +154 -0
  56. package/src/validation/identity.js +41 -0
  57. package/src/validation/metadata.js +105 -0
  58. package/src/validation/security.js +67 -0
  59. package/src/validation/snapshot.js +47 -0
  60. package/template/.agents/rules/yss-ai-skills.md +3 -55
  61. package/template/.agents/skills/.strategic-design-skills-manifest.json +11 -6
  62. package/template/.agents/skills/.yss-skills-manifest.json +1 -3
  63. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -0
  64. package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
  65. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  66. package/template/.agents/skills/domain-modeling/SKILL.md +10 -26
  67. package/template/.agents/skills/grill-with-docs/SKILL.md +6 -5
  68. package/template/.agents/skills/lombok/SKILL.md +2 -1
  69. package/template/.agents/skills/mapstruct/SKILL.md +3 -2
  70. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  71. package/template/.agents/skills/setup-matt-pocock-skills/domain.md +6 -20
  72. package/template/.agents/skills/wait-what/SKILL.md +1 -1
  73. package/template/.agents/skills/yss-antdv-next-design/SKILL.md +48 -0
  74. package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  75. package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  76. package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  77. package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  78. package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  79. package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  80. package/template/.agents/skills/yss-application/SKILL.md +6 -0
  81. package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  82. package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  83. package/template/.agents/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  84. package/template/.agents/skills/yss-components/SKILL.md +1 -1
  85. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  86. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  87. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  88. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  89. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  90. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  91. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  92. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  93. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  94. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  95. package/template/.agents/skills/yss-design-system/SKILL.md +25 -22
  96. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +22 -24
  97. package/template/.agents/skills/yss-design-system/references/design-system.md +39 -56
  98. package/template/.agents/skills/yss-domain/SKILL.md +1 -1
  99. package/template/.agents/skills/yss-dto/SKILL.md +1 -0
  100. package/template/.agents/skills/yss-exception/SKILL.md +1 -0
  101. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  102. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  103. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  104. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  105. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  106. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  107. package/template/.agents/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  108. package/template/.agents/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  109. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  110. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  111. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  112. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  113. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  114. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  115. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  116. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  117. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  118. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  119. package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  120. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  121. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  122. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  123. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  124. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  125. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  126. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  127. package/template/.agents/skills/yss-mybatis/SKILL.md +2 -2
  128. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +33 -7
  129. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  130. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  131. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  132. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  133. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +7 -2
  134. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  135. package/template/.agents/skills/yss-prototype-stage/SKILL.md +9 -8
  136. package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  137. package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  138. package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  139. package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  140. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  141. package/template/.agents/skills/yss-repository/SKILL.md +6 -0
  142. package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  143. package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  144. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  145. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  146. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  147. package/template/.agents/skills/yss-stage-decision/SKILL.md +16 -12
  148. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  149. package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  150. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  151. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  152. package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +1 -1
  153. package/template/.agents/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  154. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  155. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  156. package/template/.agents/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  157. package/template/.agents/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  158. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  159. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  160. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  161. package/template/.agents/skills/yss-tactical-design/SKILL.md +8 -2
  162. package/template/.agents/skills/yss-tactical-design/references/output-template.md +3 -0
  163. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  164. package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  165. package/template/.agents/skills/yss-ui/SKILL.md +3 -2
  166. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  167. package/template/.agents/skills/yss-validation/SKILL.md +1 -0
  168. package/template/.agents/skills/yss-web-controller/SKILL.md +6 -0
  169. package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  170. package/template/.agents/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  171. package/template/.agents/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  172. package/template/.agents/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  173. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  174. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  175. package/template/.claude/skills/alibaba-java-code-style/SKILL.md +1 -0
  176. package/template/.claude/skills/code-review/references/yss-review-standards.md +1 -1
  177. package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  178. package/template/.claude/skills/domain-modeling/SKILL.md +10 -26
  179. package/template/.claude/skills/grill-with-docs/SKILL.md +6 -5
  180. package/template/.claude/skills/lombok/SKILL.md +2 -1
  181. package/template/.claude/skills/mapstruct/SKILL.md +3 -2
  182. package/template/.claude/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  183. package/template/.claude/skills/setup-matt-pocock-skills/domain.md +6 -20
  184. package/template/.claude/skills/wait-what/SKILL.md +1 -1
  185. package/template/.claude/skills/yss-antdv-next-design/SKILL.md +48 -0
  186. package/template/.claude/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  187. package/template/.claude/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  188. package/template/.claude/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  189. package/template/.claude/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  190. package/template/.claude/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  191. package/template/.claude/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  192. package/template/.claude/skills/yss-application/SKILL.md +6 -0
  193. package/template/.claude/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  194. package/template/.claude/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  195. package/template/.claude/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  196. package/template/.claude/skills/yss-components/SKILL.md +1 -1
  197. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  198. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  199. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  200. package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  201. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  202. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  203. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  204. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  205. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  206. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  207. package/template/.claude/skills/yss-design-system/SKILL.md +25 -22
  208. package/template/.claude/skills/yss-design-system/references/design-qa-theme.md +22 -24
  209. package/template/.claude/skills/yss-design-system/references/design-system.md +39 -56
  210. package/template/.claude/skills/yss-domain/SKILL.md +1 -1
  211. package/template/.claude/skills/yss-dto/SKILL.md +1 -0
  212. package/template/.claude/skills/yss-exception/SKILL.md +1 -0
  213. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  214. package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  215. package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  216. package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  217. package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  218. package/template/.claude/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  219. package/template/.claude/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  220. package/template/.claude/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  221. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  222. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  223. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  224. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  225. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  226. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  227. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  228. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  229. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  230. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  231. package/template/.claude/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  232. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  233. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  234. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  235. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  236. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  237. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  238. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  239. package/template/.claude/skills/yss-mybatis/SKILL.md +2 -2
  240. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +33 -7
  241. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  242. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  243. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  244. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  245. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +7 -2
  246. package/template/.claude/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  247. package/template/.claude/skills/yss-prototype-stage/SKILL.md +9 -8
  248. package/template/.claude/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  249. package/template/.claude/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  250. package/template/.claude/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  251. package/template/.claude/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  252. package/template/.claude/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  253. package/template/.claude/skills/yss-repository/SKILL.md +6 -0
  254. package/template/.claude/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  255. package/template/.claude/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  256. package/template/.claude/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  257. package/template/.claude/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  258. package/template/.claude/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  259. package/template/.claude/skills/yss-stage-decision/SKILL.md +16 -12
  260. package/template/.claude/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  261. package/template/.claude/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  262. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  263. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  264. package/template/.claude/skills/yss-stage-decision/references/validation-rules.md +1 -1
  265. package/template/.claude/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  266. package/template/.claude/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  267. package/template/.claude/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  268. package/template/.claude/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  269. package/template/.claude/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  270. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  271. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  272. package/template/.claude/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  273. package/template/.claude/skills/yss-tactical-design/SKILL.md +8 -2
  274. package/template/.claude/skills/yss-tactical-design/references/output-template.md +3 -0
  275. package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  276. package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  277. package/template/.claude/skills/yss-ui/SKILL.md +3 -2
  278. package/template/.claude/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  279. package/template/.claude/skills/yss-validation/SKILL.md +1 -0
  280. package/template/.claude/skills/yss-web-controller/SKILL.md +6 -0
  281. package/template/.claude/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  282. package/template/.claude/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  283. package/template/.claude/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  284. package/template/.claude/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  285. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  286. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  287. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -0
  288. package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
  289. package/template/.codex/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  290. package/template/.codex/skills/domain-modeling/SKILL.md +10 -26
  291. package/template/.codex/skills/grill-with-docs/SKILL.md +6 -5
  292. package/template/.codex/skills/lombok/SKILL.md +2 -1
  293. package/template/.codex/skills/mapstruct/SKILL.md +3 -2
  294. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  295. package/template/.codex/skills/setup-matt-pocock-skills/domain.md +6 -20
  296. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  297. package/template/.codex/skills/yss-antdv-next-design/SKILL.md +48 -0
  298. package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  299. package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  300. package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  301. package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  302. package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  303. package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  304. package/template/.codex/skills/yss-application/SKILL.md +6 -0
  305. package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  306. package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  307. package/template/.codex/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  308. package/template/.codex/skills/yss-components/SKILL.md +1 -1
  309. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  310. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  311. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  312. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  313. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  314. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  315. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  316. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  317. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  318. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  319. package/template/.codex/skills/yss-design-system/SKILL.md +25 -22
  320. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +22 -24
  321. package/template/.codex/skills/yss-design-system/references/design-system.md +39 -56
  322. package/template/.codex/skills/yss-domain/SKILL.md +1 -1
  323. package/template/.codex/skills/yss-dto/SKILL.md +1 -0
  324. package/template/.codex/skills/yss-exception/SKILL.md +1 -0
  325. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  326. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  327. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  328. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  329. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  330. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  331. package/template/.codex/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  332. package/template/.codex/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  333. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  334. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  335. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  336. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  337. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  338. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  339. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  340. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  341. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  342. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  343. package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  344. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  345. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  346. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  347. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  348. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  349. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  350. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  351. package/template/.codex/skills/yss-mybatis/SKILL.md +2 -2
  352. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +33 -7
  353. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  354. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  355. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  356. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  357. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +7 -2
  358. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  359. package/template/.codex/skills/yss-prototype-stage/SKILL.md +9 -8
  360. package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  361. package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  362. package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  363. package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  364. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  365. package/template/.codex/skills/yss-repository/SKILL.md +6 -0
  366. package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  367. package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  368. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  369. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  370. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  371. package/template/.codex/skills/yss-stage-decision/SKILL.md +16 -12
  372. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  373. package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  374. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  375. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  376. package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +1 -1
  377. package/template/.codex/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  378. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  379. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  380. package/template/.codex/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  381. package/template/.codex/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  382. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  383. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  384. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  385. package/template/.codex/skills/yss-tactical-design/SKILL.md +8 -2
  386. package/template/.codex/skills/yss-tactical-design/references/output-template.md +3 -0
  387. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  388. package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  389. package/template/.codex/skills/yss-ui/SKILL.md +3 -2
  390. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  391. package/template/.codex/skills/yss-validation/SKILL.md +1 -0
  392. package/template/.codex/skills/yss-web-controller/SKILL.md +6 -0
  393. package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  394. package/template/.codex/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  395. package/template/.codex/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  396. package/template/.codex/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  397. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  398. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  399. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -0
  400. package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
  401. package/template/.cursor/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  402. package/template/.cursor/skills/domain-modeling/SKILL.md +10 -26
  403. package/template/.cursor/skills/grill-with-docs/SKILL.md +6 -5
  404. package/template/.cursor/skills/lombok/SKILL.md +2 -1
  405. package/template/.cursor/skills/mapstruct/SKILL.md +3 -2
  406. package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  407. package/template/.cursor/skills/setup-matt-pocock-skills/domain.md +6 -20
  408. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  409. package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +48 -0
  410. package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  411. package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  412. package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  413. package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  414. package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  415. package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  416. package/template/.cursor/skills/yss-application/SKILL.md +6 -0
  417. package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  418. package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  419. package/template/.cursor/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  420. package/template/.cursor/skills/yss-components/SKILL.md +1 -1
  421. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  422. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  423. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  424. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  425. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  426. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  427. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  428. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  429. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  430. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  431. package/template/.cursor/skills/yss-design-system/SKILL.md +25 -22
  432. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +22 -24
  433. package/template/.cursor/skills/yss-design-system/references/design-system.md +39 -56
  434. package/template/.cursor/skills/yss-domain/SKILL.md +1 -1
  435. package/template/.cursor/skills/yss-dto/SKILL.md +1 -0
  436. package/template/.cursor/skills/yss-exception/SKILL.md +1 -0
  437. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  438. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  439. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  440. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  441. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  442. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  443. package/template/.cursor/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  444. package/template/.cursor/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  445. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  446. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  447. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  448. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  449. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  450. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  451. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  452. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  453. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  454. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  455. package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  456. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  457. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  458. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  459. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  460. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  461. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  462. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  463. package/template/.cursor/skills/yss-mybatis/SKILL.md +2 -2
  464. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +33 -7
  465. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  466. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  467. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  468. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  469. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +7 -2
  470. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  471. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +9 -8
  472. package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  473. package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  474. package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  475. package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  476. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  477. package/template/.cursor/skills/yss-repository/SKILL.md +6 -0
  478. package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  479. package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  480. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  481. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  482. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  483. package/template/.cursor/skills/yss-stage-decision/SKILL.md +16 -12
  484. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  485. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  486. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  487. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  488. package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +1 -1
  489. package/template/.cursor/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  490. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  491. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  492. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  493. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  494. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  495. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  496. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  497. package/template/.cursor/skills/yss-tactical-design/SKILL.md +8 -2
  498. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +3 -0
  499. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  500. package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  501. package/template/.cursor/skills/yss-ui/SKILL.md +3 -2
  502. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  503. package/template/.cursor/skills/yss-validation/SKILL.md +1 -0
  504. package/template/.cursor/skills/yss-web-controller/SKILL.md +6 -0
  505. package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  506. package/template/.cursor/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  507. package/template/.cursor/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  508. package/template/.cursor/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  509. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  510. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  511. package/template/.cursorrules +6 -34
  512. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -0
  513. package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
  514. package/template/.pi/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  515. package/template/.pi/skills/domain-modeling/SKILL.md +10 -26
  516. package/template/.pi/skills/grill-with-docs/SKILL.md +6 -5
  517. package/template/.pi/skills/lombok/SKILL.md +2 -1
  518. package/template/.pi/skills/mapstruct/SKILL.md +3 -2
  519. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  520. package/template/.pi/skills/setup-matt-pocock-skills/domain.md +6 -20
  521. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  522. package/template/.pi/skills/yss-antdv-next-design/SKILL.md +48 -0
  523. package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  524. package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  525. package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  526. package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  527. package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  528. package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  529. package/template/.pi/skills/yss-application/SKILL.md +6 -0
  530. package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  531. package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  532. package/template/.pi/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  533. package/template/.pi/skills/yss-components/SKILL.md +1 -1
  534. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  535. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  536. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  537. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  538. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  539. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  540. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  541. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  542. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  543. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  544. package/template/.pi/skills/yss-design-system/SKILL.md +25 -22
  545. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +22 -24
  546. package/template/.pi/skills/yss-design-system/references/design-system.md +39 -56
  547. package/template/.pi/skills/yss-domain/SKILL.md +1 -1
  548. package/template/.pi/skills/yss-dto/SKILL.md +1 -0
  549. package/template/.pi/skills/yss-exception/SKILL.md +1 -0
  550. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  551. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  552. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  553. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  554. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  555. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  556. package/template/.pi/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  557. package/template/.pi/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  558. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  559. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  560. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  561. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  562. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  563. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  564. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  565. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  566. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  567. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  568. package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  569. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  570. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  571. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  572. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  573. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  574. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  575. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  576. package/template/.pi/skills/yss-mybatis/SKILL.md +2 -2
  577. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +33 -7
  578. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  579. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  580. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  581. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  582. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +7 -2
  583. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  584. package/template/.pi/skills/yss-prototype-stage/SKILL.md +9 -8
  585. package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  586. package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  587. package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  588. package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  589. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  590. package/template/.pi/skills/yss-repository/SKILL.md +6 -0
  591. package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  592. package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  593. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  594. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  595. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  596. package/template/.pi/skills/yss-stage-decision/SKILL.md +16 -12
  597. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  598. package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  599. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  600. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  601. package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +1 -1
  602. package/template/.pi/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  603. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  604. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  605. package/template/.pi/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  606. package/template/.pi/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  607. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  608. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  609. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  610. package/template/.pi/skills/yss-tactical-design/SKILL.md +8 -2
  611. package/template/.pi/skills/yss-tactical-design/references/output-template.md +3 -0
  612. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  613. package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  614. package/template/.pi/skills/yss-ui/SKILL.md +3 -2
  615. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  616. package/template/.pi/skills/yss-validation/SKILL.md +1 -0
  617. package/template/.pi/skills/yss-web-controller/SKILL.md +6 -0
  618. package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  619. package/template/.pi/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  620. package/template/.pi/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  621. package/template/.pi/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  622. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  623. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  624. package/template/.qoder/skills/alibaba-java-code-style/SKILL.md +1 -0
  625. package/template/.qoder/skills/code-review/references/yss-review-standards.md +1 -1
  626. package/template/.qoder/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  627. package/template/.qoder/skills/domain-modeling/SKILL.md +10 -26
  628. package/template/.qoder/skills/grill-with-docs/SKILL.md +6 -5
  629. package/template/.qoder/skills/lombok/SKILL.md +2 -1
  630. package/template/.qoder/skills/mapstruct/SKILL.md +3 -2
  631. package/template/.qoder/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  632. package/template/.qoder/skills/setup-matt-pocock-skills/domain.md +6 -20
  633. package/template/.qoder/skills/wait-what/SKILL.md +1 -1
  634. package/template/.qoder/skills/yss-antdv-next-design/SKILL.md +48 -0
  635. package/template/.qoder/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  636. package/template/.qoder/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  637. package/template/.qoder/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  638. package/template/.qoder/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  639. package/template/.qoder/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  640. package/template/.qoder/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  641. package/template/.qoder/skills/yss-application/SKILL.md +6 -0
  642. package/template/.qoder/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  643. package/template/.qoder/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  644. package/template/.qoder/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  645. package/template/.qoder/skills/yss-components/SKILL.md +1 -1
  646. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  647. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  648. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  649. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  650. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  651. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  652. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  653. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  654. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  655. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  656. package/template/.qoder/skills/yss-design-system/SKILL.md +25 -22
  657. package/template/.qoder/skills/yss-design-system/references/design-qa-theme.md +22 -24
  658. package/template/.qoder/skills/yss-design-system/references/design-system.md +39 -56
  659. package/template/.qoder/skills/yss-domain/SKILL.md +1 -1
  660. package/template/.qoder/skills/yss-dto/SKILL.md +1 -0
  661. package/template/.qoder/skills/yss-exception/SKILL.md +1 -0
  662. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  663. package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  664. package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  665. package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  666. package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  667. package/template/.qoder/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  668. package/template/.qoder/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  669. package/template/.qoder/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  670. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  671. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  672. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  673. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  674. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  675. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  676. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  677. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  678. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  679. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  680. package/template/.qoder/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  681. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  682. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  683. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  684. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  685. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  686. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  687. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  688. package/template/.qoder/skills/yss-mybatis/SKILL.md +2 -2
  689. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +33 -7
  690. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  691. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  692. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  693. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  694. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +7 -2
  695. package/template/.qoder/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  696. package/template/.qoder/skills/yss-prototype-stage/SKILL.md +9 -8
  697. package/template/.qoder/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  698. package/template/.qoder/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  699. package/template/.qoder/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  700. package/template/.qoder/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  701. package/template/.qoder/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  702. package/template/.qoder/skills/yss-repository/SKILL.md +6 -0
  703. package/template/.qoder/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  704. package/template/.qoder/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  705. package/template/.qoder/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  706. package/template/.qoder/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  707. package/template/.qoder/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  708. package/template/.qoder/skills/yss-stage-decision/SKILL.md +16 -12
  709. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  710. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  711. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  712. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  713. package/template/.qoder/skills/yss-stage-decision/references/validation-rules.md +1 -1
  714. package/template/.qoder/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  715. package/template/.qoder/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  716. package/template/.qoder/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  717. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  718. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  719. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  720. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  721. package/template/.qoder/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  722. package/template/.qoder/skills/yss-tactical-design/SKILL.md +8 -2
  723. package/template/.qoder/skills/yss-tactical-design/references/output-template.md +3 -0
  724. package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  725. package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  726. package/template/.qoder/skills/yss-ui/SKILL.md +3 -2
  727. package/template/.qoder/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  728. package/template/.qoder/skills/yss-validation/SKILL.md +1 -0
  729. package/template/.qoder/skills/yss-web-controller/SKILL.md +6 -0
  730. package/template/.qoder/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  731. package/template/.qoder/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  732. package/template/.qoder/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  733. package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  734. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  735. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  736. package/template/.trae/skills/alibaba-java-code-style/SKILL.md +1 -0
  737. package/template/.trae/skills/code-review/references/yss-review-standards.md +1 -1
  738. package/template/.trae/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  739. package/template/.trae/skills/domain-modeling/SKILL.md +10 -26
  740. package/template/.trae/skills/grill-with-docs/SKILL.md +6 -5
  741. package/template/.trae/skills/lombok/SKILL.md +2 -1
  742. package/template/.trae/skills/mapstruct/SKILL.md +3 -2
  743. package/template/.trae/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  744. package/template/.trae/skills/setup-matt-pocock-skills/domain.md +6 -20
  745. package/template/.trae/skills/wait-what/SKILL.md +1 -1
  746. package/template/.trae/skills/yss-antdv-next-design/SKILL.md +48 -0
  747. package/template/.trae/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  748. package/template/.trae/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  749. package/template/.trae/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  750. package/template/.trae/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  751. package/template/.trae/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  752. package/template/.trae/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  753. package/template/.trae/skills/yss-application/SKILL.md +6 -0
  754. package/template/.trae/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  755. package/template/.trae/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  756. package/template/.trae/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  757. package/template/.trae/skills/yss-components/SKILL.md +1 -1
  758. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  759. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  760. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  761. package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  762. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  763. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  764. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  765. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  766. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  767. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  768. package/template/.trae/skills/yss-design-system/SKILL.md +25 -22
  769. package/template/.trae/skills/yss-design-system/references/design-qa-theme.md +22 -24
  770. package/template/.trae/skills/yss-design-system/references/design-system.md +39 -56
  771. package/template/.trae/skills/yss-domain/SKILL.md +1 -1
  772. package/template/.trae/skills/yss-dto/SKILL.md +1 -0
  773. package/template/.trae/skills/yss-exception/SKILL.md +1 -0
  774. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +3 -1
  775. package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +10 -2
  776. package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  777. package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +78 -19
  778. package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +7 -1
  779. package/template/.trae/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  780. package/template/.trae/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  781. package/template/.trae/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  782. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  783. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  784. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  785. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  786. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  787. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  788. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  789. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  790. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  791. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  792. package/template/.trae/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  793. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  794. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  795. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  796. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  797. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  798. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  799. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  800. package/template/.trae/skills/yss-mybatis/SKILL.md +2 -2
  801. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +33 -7
  802. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  803. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  804. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  805. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  806. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +7 -2
  807. package/template/.trae/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  808. package/template/.trae/skills/yss-prototype-stage/SKILL.md +9 -8
  809. package/template/.trae/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  810. package/template/.trae/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  811. package/template/.trae/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  812. package/template/.trae/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  813. package/template/.trae/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  814. package/template/.trae/skills/yss-repository/SKILL.md +6 -0
  815. package/template/.trae/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  816. package/template/.trae/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  817. package/template/.trae/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  818. package/template/.trae/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  819. package/template/.trae/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  820. package/template/.trae/skills/yss-stage-decision/SKILL.md +16 -12
  821. package/template/.trae/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  822. package/template/.trae/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  823. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  824. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  825. package/template/.trae/skills/yss-stage-decision/references/validation-rules.md +1 -1
  826. package/template/.trae/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  827. package/template/.trae/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  828. package/template/.trae/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  829. package/template/.trae/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  830. package/template/.trae/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  831. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  832. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  833. package/template/.trae/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  834. package/template/.trae/skills/yss-tactical-design/SKILL.md +8 -2
  835. package/template/.trae/skills/yss-tactical-design/references/output-template.md +3 -0
  836. package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  837. package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  838. package/template/.trae/skills/yss-ui/SKILL.md +3 -2
  839. package/template/.trae/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  840. package/template/.trae/skills/yss-validation/SKILL.md +1 -0
  841. package/template/.trae/skills/yss-web-controller/SKILL.md +6 -0
  842. package/template/.trae/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  843. package/template/.trae/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  844. package/template/.trae/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  845. package/template/.trae/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  846. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  847. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  848. package/template/AGENTS.md +52 -91
  849. package/template/CONTEXT.md +17 -5
  850. package/template/DESIGN.md +85 -41
  851. package/template/README.md +4 -0
  852. package/template/__yss_dotfile__.gitignore +1 -0
  853. package/template/docs/agents/backend-architecture-profiles.md +25 -0
  854. package/template/docs/agents/digital-human-roles.md +3 -3
  855. package/template/docs/agents/digital-human-roles.yaml +47 -13
  856. package/template/docs/agents/domain.md +7 -6
  857. package/template/docs/agents/skill-migrations.md +20 -2
  858. package/template/docs/agents/skills-maintenance.md +3 -3
  859. package/template/docs/agents/strategic-design-skills-integration.md +6 -1
  860. package/template/docs/agents/yss-skill-registry.yaml +78 -94
  861. package/template/docs/agents/yss-ui-skills-integration.md +3 -3
  862. package/template/docs/api/templates/openapi-draft-review-checklist.md +2 -2
  863. package/template/docs/architecture/templates/engineering-baseline-review-template.md +18 -6
  864. package/template/docs/design/README.md +9 -6
  865. package/template/docs/design/design-system-sync.yaml +1 -1
  866. package/template/docs/design/design.md +86 -118
  867. package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +38 -0
  868. package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +434 -0
  869. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +7 -0
  870. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +246 -0
  871. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +40 -0
  872. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +32 -0
  873. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +7 -0
  874. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +190 -0
  875. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +20 -0
  876. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +256 -0
  877. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +7 -0
  878. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +460 -0
  879. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +70 -0
  880. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +123 -0
  881. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +7 -0
  882. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +646 -0
  883. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +50 -0
  884. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +130 -0
  885. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +7 -0
  886. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +640 -0
  887. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +70 -0
  888. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +172 -0
  889. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +7 -0
  890. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +1010 -0
  891. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +70 -0
  892. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +263 -0
  893. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +7 -0
  894. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +321 -0
  895. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +25 -0
  896. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +25 -0
  897. package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +3 -0
  898. package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +215 -0
  899. package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +5 -0
  900. package/template/docs/design/preview-dark.html +170 -7
  901. package/template/docs/design/preview.css +730 -0
  902. package/template/docs/design/preview.html +168 -10
  903. package/template/docs/design/preview.js +71 -0
  904. package/template/docs/design/schemas/visual-baseline.schema.json +66 -0
  905. package/template/docs/design/templates/interaction-spec-template.md +1 -1
  906. package/template/docs/design/templates/product-overview-design-template.md +6 -6
  907. package/template/docs/design/templates/prototype-evidence-template.yaml +21 -8
  908. package/template/docs/design/templates/prototype-review-checklist.md +1 -1
  909. package/template/docs/design/templates/visual-baseline-template.yaml +70 -0
  910. package/template/docs/design/tokens/.design-md-projection.json +3 -3
  911. package/template/docs/design/tokens/theme.json +2 -2
  912. package/template/docs/design/tokens/variables.css +5 -0
  913. package/template/docs/process/frontend-backend-delivery.md +72 -0
  914. package/template/docs/process/harness-executive-blueprint.md +1 -1
  915. package/template/docs/process/harness-process-tailoring.md +1 -0
  916. package/template/docs/process/implementation-repo-integration.md +2 -0
  917. package/template/docs/process/lifecycle-artifact-map.md +6 -4
  918. package/template/docs/process/lifecycle-registry-baseline.json +8 -5
  919. package/template/docs/process/lifecycle-registry.yaml +27 -0
  920. package/template/docs/process/schemas/backend-architecture-identity.schema.json +19 -0
  921. package/template/docs/process/schemas/backend-delivery-verification.schema.json +113 -0
  922. package/template/docs/process/schemas/backend-delivery.schema.json +301 -0
  923. package/template/docs/process/schemas/context-reconciliation.schema.json +57 -0
  924. package/template/docs/process/schemas/digital-human-task-package.schema.json +18 -0
  925. package/template/docs/process/schemas/frontend-delivery-acceptance.schema.json +200 -0
  926. package/template/docs/process/schemas/frontend-implementation-evidence.schema.json +65 -29
  927. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +16 -2
  928. package/template/docs/process/schemas/lifecycle-registry.schema.json +4 -4
  929. package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +68 -0
  930. package/template/docs/process/schemas/strategic-design-handoff.schema.json +670 -0
  931. package/template/docs/process/schemas/strategic-handoff-domain-strategy.schema.json +146 -0
  932. package/template/docs/process/schemas/strategic-handoff-export.schema.json +295 -0
  933. package/template/docs/process/schemas/strategic-handoff-package.schema.json +97 -0
  934. package/template/docs/process/schemas/strategic-handoff-stage-decision-package.schema.json +98 -0
  935. package/template/docs/process/schemas/user-decision.schema.json +357 -0
  936. package/template/docs/process/strategic-handoff-package.md +56 -0
  937. package/template/docs/process/template-verification-profiles.yaml +66 -1
  938. package/template/docs/process/templates/context-reconciliation-template.yaml +18 -0
  939. package/template/docs/process/templates/frontend-implementation-plan-template.yaml +11 -5
  940. package/template/docs/process/templates/frontend-implementation-verification-template.yaml +25 -5
  941. package/template/docs/process/templates/lifecycle-checkpoint-template.yaml +9 -0
  942. package/template/docs/process/templates/scaffold-architecture-decisions-template.yaml +32 -0
  943. package/template/docs/process/templates/stage-checkpoint-template.md +5 -0
  944. package/template/docs/process/templates/user-decision-template.yaml +30 -0
  945. package/template/docs/templates/approval-record-template.yaml +4 -0
  946. package/template/docs/templates/build-architecture-checklist-template.md +3 -3
  947. package/template/docs/templates/implementation-repo-registry-template.md +3 -1
  948. package/template/docs/templates/implementation-routing-template.md +8 -6
  949. package/template/docs/templates/requirement-freeze-template.md +1 -1
  950. package/template/docs/templates/review-report-template.md +1 -1
  951. package/template/docs/templates/spec-template.md +5 -5
  952. package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +20 -204
  953. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +63 -963
  954. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +11 -14
  955. package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +127 -0
  956. package/template/scripts/backend-delivery +14 -0
  957. package/template/scripts/fixtures/backend-delivery/revision-server.mjs +11 -0
  958. package/template/scripts/fixtures/strategic-handoff/base-stage.json +91 -0
  959. package/template/scripts/fixtures/strategic-handoff/base-strategy.json +205 -0
  960. package/template/scripts/fixtures/strategic-handoff/fixture.mjs +57 -0
  961. package/template/scripts/fixtures/strategic-handoff/source-roles.json +528 -0
  962. package/template/scripts/fixtures/user-decision/build-fixture.mjs +61 -0
  963. package/template/scripts/instantiate-harness +69 -0
  964. package/template/scripts/lib/approval-record.mjs +32 -1
  965. package/template/scripts/lib/backend-architecture.mjs +43 -0
  966. package/template/scripts/lib/backend-delivery.mjs +164 -0
  967. package/template/scripts/lib/context-contract.mjs +203 -0
  968. package/template/scripts/lib/digital-human-roles.mjs +21 -3
  969. package/template/scripts/lib/first-slice-architecture.mjs +23 -0
  970. package/template/scripts/lib/frontend-delivery-boundary.mjs +49 -0
  971. package/template/scripts/lib/frontend-delivery.mjs +73 -0
  972. package/template/scripts/lib/harness-execution-scope.mjs +52 -0
  973. package/template/scripts/lib/implementation-contract-compiler.mjs +45 -2
  974. package/template/scripts/lib/lifecycle-registry.mjs +14 -6
  975. package/template/scripts/lib/lifecycle-transition.mjs +26 -4
  976. package/template/scripts/lib/scaffold-local-database.mjs +26 -0
  977. package/template/scripts/lib/scenario-checks.mjs +25 -12
  978. package/template/scripts/lib/skill-governance.mjs +25 -10
  979. package/template/scripts/lib/skill-registry.mjs +1 -1
  980. package/template/scripts/lib/skill-supply-chain.mjs +1 -1
  981. package/template/scripts/lib/strategic-handoff-consumption.mjs +83 -0
  982. package/template/scripts/lib/strategic-handoff-io.mjs +75 -0
  983. package/template/scripts/lib/strategic-handoff-rules.mjs +37 -0
  984. package/template/scripts/lib/strategic-handoff-zip.py +52 -0
  985. package/template/scripts/lib/strategic-handoff.mjs +259 -0
  986. package/template/scripts/lib/task-package.mjs +17 -2
  987. package/template/scripts/lib/user-decision.mjs +210 -0
  988. package/template/scripts/strategic-handoff +14 -0
  989. package/template/scripts/sync-strategic-handoff-tools +20 -0
  990. package/template/scripts/verify-approval-record +5 -4
  991. package/template/scripts/verify-business-language-scenarios +59 -0
  992. package/template/scripts/verify-context-contract +15 -0
  993. package/template/scripts/verify-context-contract-scenarios +105 -0
  994. package/template/scripts/verify-context-reconciliation +58 -0
  995. package/template/scripts/verify-context-reconciliation-scenarios +69 -0
  996. package/template/scripts/verify-digital-human-roles-scenarios +1 -1
  997. package/template/scripts/verify-frontend-delivery +9 -0
  998. package/template/scripts/verify-frontend-delivery-scenarios +131 -0
  999. package/template/scripts/verify-frontend-implementation-evidence +33 -8
  1000. package/template/scripts/verify-frontend-implementation-evidence-scenarios +56 -0
  1001. package/template/scripts/verify-grill-with-docs-context-scenarios +15 -0
  1002. package/template/scripts/verify-lifecycle-checkpoint +9 -1
  1003. package/template/scripts/verify-lifecycle-transition-scenarios +13 -3
  1004. package/template/scripts/verify-retired-skill-ids +30 -4
  1005. package/template/scripts/verify-scaffold-architecture-decision-scenarios +30 -0
  1006. package/template/scripts/verify-scaffold-architecture-decisions +61 -0
  1007. package/template/scripts/verify-scaffold-generator-scenarios +74 -3
  1008. package/template/scripts/verify-strategic-context-import +65 -0
  1009. package/template/scripts/verify-strategic-context-import-scenarios +50 -0
  1010. package/template/scripts/verify-strategic-handoff-consumption +10 -0
  1011. package/template/scripts/verify-strategic-handoff-package-scenarios +102 -0
  1012. package/template/scripts/verify-subagent-task-package-scenarios +17 -3
  1013. package/template/scripts/verify-template-verification-scenarios +6 -1
  1014. package/template/scripts/verify-user-decision +17 -0
  1015. package/template/scripts/verify-user-decision-scenarios +103 -0
  1016. package/template/skills-lock.json +77 -270
  1017. package/template/yss-public-skills.json +4 -4
  1018. package/template.manifest.json +43 -1
  1019. package/template.snapshot.json +5 -5
  1020. package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1021. package/template/.agents/skills/ask-matt/SKILL.md +0 -95
  1022. package/template/.agents/skills/ask-matt/agents/openai.yaml +0 -5
  1023. package/template/.agents/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1024. package/template/.agents/skills/loop-me/SKILL.md +0 -32
  1025. package/template/.agents/skills/loop-me/agents/openai.yaml +0 -5
  1026. package/template/.agents/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1027. package/template/.agents/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1028. package/template/.agents/skills/prototype-page-acceptance/SKILL.md +0 -62
  1029. package/template/.agents/skills/scaffold-exercises/SKILL.md +0 -106
  1030. package/template/.agents/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1031. package/template/.agents/skills/setup-pre-commit/SKILL.md +0 -91
  1032. package/template/.agents/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1033. package/template/.agents/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1034. package/template/.agents/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1035. package/template/.agents/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1036. package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1037. package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1038. package/template/.agents/skills/teach/MISSION-FORMAT.md +0 -31
  1039. package/template/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
  1040. package/template/.agents/skills/teach/SKILL.md +0 -140
  1041. package/template/.agents/skills/teach/agents/openai.yaml +0 -5
  1042. package/template/.agents/skills/writing-beats/SKILL.md +0 -67
  1043. package/template/.agents/skills/writing-beats/agents/openai.yaml +0 -5
  1044. package/template/.agents/skills/writing-fragments/SKILL.md +0 -79
  1045. package/template/.agents/skills/writing-fragments/agents/openai.yaml +0 -5
  1046. package/template/.agents/skills/writing-shape/SKILL.md +0 -79
  1047. package/template/.agents/skills/writing-shape/agents/openai.yaml +0 -5
  1048. package/template/.agents/skills/yss-microapp-commit/SKILL.md +0 -201
  1049. package/template/.agents/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1050. package/template/.agents/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1051. package/template/.agents/skills/yss-page-module-development/SKILL.md +0 -165
  1052. package/template/.agents/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1053. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1054. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1055. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1056. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1057. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1058. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1059. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1060. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1061. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1062. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1063. package/template/.agents/skills/yss-page-module-development/references/component-map.md +0 -34
  1064. package/template/.agents/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1065. package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1066. package/template/.agents/skills/yss-page-module-development/references/utils-map.md +0 -14
  1067. package/template/.claude/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1068. package/template/.claude/skills/ask-matt/SKILL.md +0 -95
  1069. package/template/.claude/skills/ask-matt/agents/openai.yaml +0 -5
  1070. package/template/.claude/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1071. package/template/.claude/skills/loop-me/SKILL.md +0 -32
  1072. package/template/.claude/skills/loop-me/agents/openai.yaml +0 -5
  1073. package/template/.claude/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1074. package/template/.claude/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1075. package/template/.claude/skills/prototype-page-acceptance/SKILL.md +0 -62
  1076. package/template/.claude/skills/scaffold-exercises/SKILL.md +0 -106
  1077. package/template/.claude/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1078. package/template/.claude/skills/setup-pre-commit/SKILL.md +0 -91
  1079. package/template/.claude/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1080. package/template/.claude/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1081. package/template/.claude/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1082. package/template/.claude/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1083. package/template/.claude/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1084. package/template/.claude/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1085. package/template/.claude/skills/teach/MISSION-FORMAT.md +0 -31
  1086. package/template/.claude/skills/teach/RESOURCES-FORMAT.md +0 -32
  1087. package/template/.claude/skills/teach/SKILL.md +0 -140
  1088. package/template/.claude/skills/teach/agents/openai.yaml +0 -5
  1089. package/template/.claude/skills/writing-beats/SKILL.md +0 -67
  1090. package/template/.claude/skills/writing-beats/agents/openai.yaml +0 -5
  1091. package/template/.claude/skills/writing-fragments/SKILL.md +0 -79
  1092. package/template/.claude/skills/writing-fragments/agents/openai.yaml +0 -5
  1093. package/template/.claude/skills/writing-shape/SKILL.md +0 -79
  1094. package/template/.claude/skills/writing-shape/agents/openai.yaml +0 -5
  1095. package/template/.claude/skills/yss-microapp-commit/SKILL.md +0 -201
  1096. package/template/.claude/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1097. package/template/.claude/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1098. package/template/.claude/skills/yss-page-module-development/SKILL.md +0 -165
  1099. package/template/.claude/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1100. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1101. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1102. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1103. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1104. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1105. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1106. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1107. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1108. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1109. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1110. package/template/.claude/skills/yss-page-module-development/references/component-map.md +0 -34
  1111. package/template/.claude/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1112. package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1113. package/template/.claude/skills/yss-page-module-development/references/utils-map.md +0 -14
  1114. package/template/.codex/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1115. package/template/.codex/skills/ask-matt/SKILL.md +0 -95
  1116. package/template/.codex/skills/ask-matt/agents/openai.yaml +0 -5
  1117. package/template/.codex/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1118. package/template/.codex/skills/loop-me/SKILL.md +0 -32
  1119. package/template/.codex/skills/loop-me/agents/openai.yaml +0 -5
  1120. package/template/.codex/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1121. package/template/.codex/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1122. package/template/.codex/skills/prototype-page-acceptance/SKILL.md +0 -62
  1123. package/template/.codex/skills/scaffold-exercises/SKILL.md +0 -106
  1124. package/template/.codex/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1125. package/template/.codex/skills/setup-pre-commit/SKILL.md +0 -91
  1126. package/template/.codex/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1127. package/template/.codex/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1128. package/template/.codex/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1129. package/template/.codex/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1130. package/template/.codex/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1131. package/template/.codex/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1132. package/template/.codex/skills/teach/MISSION-FORMAT.md +0 -31
  1133. package/template/.codex/skills/teach/RESOURCES-FORMAT.md +0 -32
  1134. package/template/.codex/skills/teach/SKILL.md +0 -140
  1135. package/template/.codex/skills/teach/agents/openai.yaml +0 -5
  1136. package/template/.codex/skills/writing-beats/SKILL.md +0 -67
  1137. package/template/.codex/skills/writing-beats/agents/openai.yaml +0 -5
  1138. package/template/.codex/skills/writing-fragments/SKILL.md +0 -79
  1139. package/template/.codex/skills/writing-fragments/agents/openai.yaml +0 -5
  1140. package/template/.codex/skills/writing-shape/SKILL.md +0 -79
  1141. package/template/.codex/skills/writing-shape/agents/openai.yaml +0 -5
  1142. package/template/.codex/skills/yss-microapp-commit/SKILL.md +0 -201
  1143. package/template/.codex/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1144. package/template/.codex/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1145. package/template/.codex/skills/yss-page-module-development/SKILL.md +0 -165
  1146. package/template/.codex/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1147. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1148. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1149. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1150. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1151. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1152. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1153. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1154. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1155. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1156. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1157. package/template/.codex/skills/yss-page-module-development/references/component-map.md +0 -34
  1158. package/template/.codex/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1159. package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1160. package/template/.codex/skills/yss-page-module-development/references/utils-map.md +0 -14
  1161. package/template/.cursor/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1162. package/template/.cursor/skills/ask-matt/SKILL.md +0 -95
  1163. package/template/.cursor/skills/ask-matt/agents/openai.yaml +0 -5
  1164. package/template/.cursor/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1165. package/template/.cursor/skills/loop-me/SKILL.md +0 -32
  1166. package/template/.cursor/skills/loop-me/agents/openai.yaml +0 -5
  1167. package/template/.cursor/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1168. package/template/.cursor/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1169. package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +0 -62
  1170. package/template/.cursor/skills/scaffold-exercises/SKILL.md +0 -106
  1171. package/template/.cursor/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1172. package/template/.cursor/skills/setup-pre-commit/SKILL.md +0 -91
  1173. package/template/.cursor/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1174. package/template/.cursor/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1175. package/template/.cursor/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1176. package/template/.cursor/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1177. package/template/.cursor/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1178. package/template/.cursor/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1179. package/template/.cursor/skills/teach/MISSION-FORMAT.md +0 -31
  1180. package/template/.cursor/skills/teach/RESOURCES-FORMAT.md +0 -32
  1181. package/template/.cursor/skills/teach/SKILL.md +0 -140
  1182. package/template/.cursor/skills/teach/agents/openai.yaml +0 -5
  1183. package/template/.cursor/skills/writing-beats/SKILL.md +0 -67
  1184. package/template/.cursor/skills/writing-beats/agents/openai.yaml +0 -5
  1185. package/template/.cursor/skills/writing-fragments/SKILL.md +0 -79
  1186. package/template/.cursor/skills/writing-fragments/agents/openai.yaml +0 -5
  1187. package/template/.cursor/skills/writing-shape/SKILL.md +0 -79
  1188. package/template/.cursor/skills/writing-shape/agents/openai.yaml +0 -5
  1189. package/template/.cursor/skills/yss-microapp-commit/SKILL.md +0 -201
  1190. package/template/.cursor/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1191. package/template/.cursor/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1192. package/template/.cursor/skills/yss-page-module-development/SKILL.md +0 -165
  1193. package/template/.cursor/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1194. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1195. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1196. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1197. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1198. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1199. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1200. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1201. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1202. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1203. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1204. package/template/.cursor/skills/yss-page-module-development/references/component-map.md +0 -34
  1205. package/template/.cursor/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1206. package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1207. package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +0 -14
  1208. package/template/.pi/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1209. package/template/.pi/skills/ask-matt/SKILL.md +0 -95
  1210. package/template/.pi/skills/ask-matt/agents/openai.yaml +0 -5
  1211. package/template/.pi/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1212. package/template/.pi/skills/loop-me/SKILL.md +0 -32
  1213. package/template/.pi/skills/loop-me/agents/openai.yaml +0 -5
  1214. package/template/.pi/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1215. package/template/.pi/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1216. package/template/.pi/skills/prototype-page-acceptance/SKILL.md +0 -62
  1217. package/template/.pi/skills/scaffold-exercises/SKILL.md +0 -106
  1218. package/template/.pi/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1219. package/template/.pi/skills/setup-pre-commit/SKILL.md +0 -91
  1220. package/template/.pi/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1221. package/template/.pi/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1222. package/template/.pi/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1223. package/template/.pi/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1224. package/template/.pi/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1225. package/template/.pi/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1226. package/template/.pi/skills/teach/MISSION-FORMAT.md +0 -31
  1227. package/template/.pi/skills/teach/RESOURCES-FORMAT.md +0 -32
  1228. package/template/.pi/skills/teach/SKILL.md +0 -140
  1229. package/template/.pi/skills/teach/agents/openai.yaml +0 -5
  1230. package/template/.pi/skills/writing-beats/SKILL.md +0 -67
  1231. package/template/.pi/skills/writing-beats/agents/openai.yaml +0 -5
  1232. package/template/.pi/skills/writing-fragments/SKILL.md +0 -79
  1233. package/template/.pi/skills/writing-fragments/agents/openai.yaml +0 -5
  1234. package/template/.pi/skills/writing-shape/SKILL.md +0 -79
  1235. package/template/.pi/skills/writing-shape/agents/openai.yaml +0 -5
  1236. package/template/.pi/skills/yss-microapp-commit/SKILL.md +0 -201
  1237. package/template/.pi/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1238. package/template/.pi/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1239. package/template/.pi/skills/yss-page-module-development/SKILL.md +0 -165
  1240. package/template/.pi/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1241. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1242. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1243. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1244. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1245. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1246. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1247. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1248. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1249. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1250. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1251. package/template/.pi/skills/yss-page-module-development/references/component-map.md +0 -34
  1252. package/template/.pi/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1253. package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1254. package/template/.pi/skills/yss-page-module-development/references/utils-map.md +0 -14
  1255. package/template/.qoder/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1256. package/template/.qoder/skills/ask-matt/SKILL.md +0 -95
  1257. package/template/.qoder/skills/ask-matt/agents/openai.yaml +0 -5
  1258. package/template/.qoder/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1259. package/template/.qoder/skills/loop-me/SKILL.md +0 -32
  1260. package/template/.qoder/skills/loop-me/agents/openai.yaml +0 -5
  1261. package/template/.qoder/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1262. package/template/.qoder/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1263. package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +0 -62
  1264. package/template/.qoder/skills/scaffold-exercises/SKILL.md +0 -106
  1265. package/template/.qoder/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1266. package/template/.qoder/skills/setup-pre-commit/SKILL.md +0 -91
  1267. package/template/.qoder/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1268. package/template/.qoder/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1269. package/template/.qoder/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1270. package/template/.qoder/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1271. package/template/.qoder/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1272. package/template/.qoder/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1273. package/template/.qoder/skills/teach/MISSION-FORMAT.md +0 -31
  1274. package/template/.qoder/skills/teach/RESOURCES-FORMAT.md +0 -32
  1275. package/template/.qoder/skills/teach/SKILL.md +0 -140
  1276. package/template/.qoder/skills/teach/agents/openai.yaml +0 -5
  1277. package/template/.qoder/skills/writing-beats/SKILL.md +0 -67
  1278. package/template/.qoder/skills/writing-beats/agents/openai.yaml +0 -5
  1279. package/template/.qoder/skills/writing-fragments/SKILL.md +0 -79
  1280. package/template/.qoder/skills/writing-fragments/agents/openai.yaml +0 -5
  1281. package/template/.qoder/skills/writing-shape/SKILL.md +0 -79
  1282. package/template/.qoder/skills/writing-shape/agents/openai.yaml +0 -5
  1283. package/template/.qoder/skills/yss-microapp-commit/SKILL.md +0 -201
  1284. package/template/.qoder/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1285. package/template/.qoder/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1286. package/template/.qoder/skills/yss-page-module-development/SKILL.md +0 -165
  1287. package/template/.qoder/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1288. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1289. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1290. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1291. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1292. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1293. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1294. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1295. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1296. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1297. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1298. package/template/.qoder/skills/yss-page-module-development/references/component-map.md +0 -34
  1299. package/template/.qoder/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1300. package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1301. package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +0 -14
  1302. package/template/.trae/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1303. package/template/.trae/skills/ask-matt/SKILL.md +0 -95
  1304. package/template/.trae/skills/ask-matt/agents/openai.yaml +0 -5
  1305. package/template/.trae/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1306. package/template/.trae/skills/loop-me/SKILL.md +0 -32
  1307. package/template/.trae/skills/loop-me/agents/openai.yaml +0 -5
  1308. package/template/.trae/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1309. package/template/.trae/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1310. package/template/.trae/skills/prototype-page-acceptance/SKILL.md +0 -62
  1311. package/template/.trae/skills/scaffold-exercises/SKILL.md +0 -106
  1312. package/template/.trae/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1313. package/template/.trae/skills/setup-pre-commit/SKILL.md +0 -91
  1314. package/template/.trae/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1315. package/template/.trae/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1316. package/template/.trae/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1317. package/template/.trae/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1318. package/template/.trae/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1319. package/template/.trae/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1320. package/template/.trae/skills/teach/MISSION-FORMAT.md +0 -31
  1321. package/template/.trae/skills/teach/RESOURCES-FORMAT.md +0 -32
  1322. package/template/.trae/skills/teach/SKILL.md +0 -140
  1323. package/template/.trae/skills/teach/agents/openai.yaml +0 -5
  1324. package/template/.trae/skills/writing-beats/SKILL.md +0 -67
  1325. package/template/.trae/skills/writing-beats/agents/openai.yaml +0 -5
  1326. package/template/.trae/skills/writing-fragments/SKILL.md +0 -79
  1327. package/template/.trae/skills/writing-fragments/agents/openai.yaml +0 -5
  1328. package/template/.trae/skills/writing-shape/SKILL.md +0 -79
  1329. package/template/.trae/skills/writing-shape/agents/openai.yaml +0 -5
  1330. package/template/.trae/skills/yss-microapp-commit/SKILL.md +0 -201
  1331. package/template/.trae/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1332. package/template/.trae/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1333. package/template/.trae/skills/yss-page-module-development/SKILL.md +0 -165
  1334. package/template/.trae/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1335. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1336. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1337. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1338. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1339. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1340. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1341. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1342. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1343. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1344. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1345. package/template/.trae/skills/yss-page-module-development/references/component-map.md +0 -34
  1346. package/template/.trae/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1347. package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1348. package/template/.trae/skills/yss-page-module-development/references/utils-map.md +0 -14
@@ -12,17 +12,19 @@ import { loadSkillRegistry } from "../../../../scripts/lib/skill-registry.mjs";
12
12
  const registry = loadSkillRegistry();
13
13
  const compilerContract = loadCompilerContract();
14
14
  const fixed = "2026-09-04T00:00:00.000Z";
15
- const compile = (input) => compileImplementationContract({ registry, compilerContract, compiledAt: fixed, ...input });
15
+ const identity = { architecture_family: "domain-driven", architecture_profile: "target-domain-model", generator_skill: "yss-ddd-scaffold-generator", requested_capabilities: [], resolved_modules: ["domain", "application", "infrastructure", "adapter", "bootstrap"], verification_database: "h2", production_database: "not-bound", contract_digest: "a".repeat(64) };
16
+ const architecture = { architecture_identity: identity, architecture_evidence: { engineering_baseline: identity, repository_registration: identity, manifest: identity } };
17
+ const compile = (input) => compileImplementationContract({ registry, compilerContract, compiledAt: fixed, ...architecture, ...input });
16
18
 
17
19
  test("combines narrow recipes once and preserves deterministic output", () => {
18
20
  const input = {
19
- recipeIds: ["backend.http-api", "backend.domain-behavior", "backend.persistence-mybatis"],
21
+ recipeIds: ["backend.ddd-http-api", "backend.ddd-domain-behavior", "backend.ddd-persistence-mybatis"],
20
22
  conditions: ["mybatis", "conversion", "pojo", "request-validation", "error-mapping"]
21
23
  };
22
24
  const first = compile(input);
23
25
  const second = compile({ ...input, recipeIds: [...input.recipeIds].reverse(), conditions: [...input.conditions].reverse() });
24
26
  assert.deepEqual(first, second);
25
- assert.deepEqual(first.recipe_ids, ["backend.domain-behavior", "backend.persistence-mybatis", "backend.http-api"]);
27
+ assert.deepEqual(first.recipe_ids, ["backend.ddd-domain-behavior", "backend.ddd-persistence-mybatis", "backend.ddd-http-api"]);
26
28
  for (const skill of ["yss-domain", "yss-application", "yss-repository", "yss-mybatis", "yss-web-controller", "yss-dto", "yss-validation", "yss-exception", "mapstruct", "lombok", "alibaba-java-code-style"]) {
27
29
  assert.equal(first.required_skills.filter((candidate) => candidate === skill).length, 1, `${skill} should appear once`);
28
30
  }
@@ -51,11 +53,11 @@ test("loads only explicitly satisfied context-conditional dependencies", () => {
51
53
  test("rejects recipes that reference skills and context-required cycles", () => {
52
54
  const invalidRecipeRegistry = structuredClone(registry);
53
55
  invalidRecipeRegistry.recipes[0].skills = ["yss-domain"];
54
- assert.throws(() => compileImplementationContract({ registry: invalidRecipeRegistry, compilerContract, recipeIds: [invalidRecipeRegistry.recipes[0].id] }), /不得直接引用 skills/);
56
+ assert.throws(() => compileImplementationContract({ ...architecture, registry: invalidRecipeRegistry, compilerContract, recipeIds: [invalidRecipeRegistry.recipes[0].id] }), /不得直接引用 skills/);
55
57
 
56
58
  const cyclicRegistry = structuredClone(registry);
57
59
  cyclicRegistry.skill_dependencies["alibaba-java-code-style"] = [{ skill: "yss-domain", type: "context-required" }];
58
- assert.throws(() => compileImplementationContract({ registry: cyclicRegistry, compilerContract, requiredCapabilities: ["layer.domain"] }), /依赖循环/);
60
+ assert.throws(() => compileImplementationContract({ ...architecture, registry: cyclicRegistry, compilerContract, requiredCapabilities: ["layer.domain"] }), /依赖循环/);
59
61
  });
60
62
 
61
63
  test("rejects removed ids and schema v1 without compatibility", () => {
@@ -65,7 +67,7 @@ test("rejects removed ids and schema v1 without compatibility", () => {
65
67
  });
66
68
 
67
69
  test("marks digest drift stale and validates v2 execution evidence", () => {
68
- const resolution = compile({ requiredCapabilities: ["layer.domain"] });
70
+ const resolution = compile({ requiredCapabilities: ["contract.request-validation"], architecture_identity: undefined, architecture_evidence: undefined });
69
71
  const contract = { schema_version: 2, contract_id: "slice-1", contract_version: 1, resolution };
70
72
  assert.deepEqual(evaluateContractFreshness(contract, { registry, compilerContract }), { freshness: "current", reasons: [] });
71
73
  const changedRegistry = structuredClone(registry);
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: yss-layered-mvc-scaffold-generator
3
+ description: 用于在生命周期已批准的脚手架合同下生成通用 YSS Java 8 分层 MVC 后端工程;核心模块为 server、service、repository,并按能力确定性增加 adapter、client、feign-client。
4
+ ---
5
+
6
+ # YSS Layered MVC Scaffold Generator
7
+
8
+ 本 skill 只为已登记的全新 backend project 生成机械工程骨架,不创建 `project-instance`、不初始化 Git、不生成业务 Controller、DTO、查询、状态机或 Mock 数据。
9
+
10
+ ## 进入条件
11
+
12
+ - backend `scaffold_status=required`,目标目录已确认且不存在。
13
+ - `scaffold-architecture-decisions.yaml` 中对应项目已达到 `lifecycle-approved`,确认架构为 `layered-mvc`。
14
+ - `yss-implementation-contract-compiler` 已编译 scaffold contract schema v3,生命周期已批准并持久化。
15
+ - 合同中的 `decision_id`、文件 digest、Profile、能力闭包、写路径和验证命令仍为当前版本。
16
+
17
+ 任一条件缺失时返回 `blocked`。本生成器无交互、无默认回退;用户选择由 `yss-product-lifecycle` 在 `work-unit.technical-analysis` 的工程基线内完成。
18
+
19
+ ## 架构与 Profile
20
+
21
+ - 固定核心模块:`server`、`service`、`repository`。
22
+ - `external-integration` 增加 `adapter`。
23
+ - `published-client` 增加 `client`。
24
+ - `feign-client` 增加 `client`、`feign-client`。
25
+ - 固定平台:Java 8、Spring Boot 2.7、`javax`、YSS BOM、MyBatis-Plus。
26
+ - 固定 architecture_profile=layered-mvc-service;verification_database=h2、production_database=not-bound。测试使用 H2,本地运行显式启用 scaffold-local;不引入外部驱动/数据源。
27
+
28
+ 能力解析规则、模块职责和依赖方向见 [architecture.md](references/architecture.md)。生成器必须同时校验 `requested_capabilities` 与 `resolved_modules`,不得自行补猜模块。
29
+
30
+ ## 执行
31
+
32
+ 优先使用一键入口:
33
+
34
+ ```bash
35
+ node scripts/generate_and_verify_scaffold.mjs \
36
+ --project-name my-service \
37
+ --base-package com.yss.myservice \
38
+ --output-dir /path/to/backend-container \
39
+ --contract-file /path/to/approved-scaffold-contract.json \
40
+ --contract-id <id> \
41
+ --contract-version <version> \
42
+ --approval-ref <approval-ref> \
43
+ --compiler-draft-ref <compiler-ref> \
44
+ --persisted-ref <persisted-ref> \
45
+ --group-id com.yss.example \
46
+ --project-version 1.0.0-SNAPSHOT \
47
+ --parent-group-id com.yss.cloud \
48
+ --parent-artifact-id yss-cloud-microservice \
49
+ --parent-version 2.0.0-SNAPSHOT \
50
+ --yss-components-version 2.0.0-SNAPSHOT \
51
+ --evidence-dir /path/to/evidence
52
+ ```
53
+
54
+ 受控工作流必须在项目根实际执行 `./mvnw validate`、`./mvnw test`、`./mvnw package`,逐条记录退出码、时间、stdout/stderr 和失败分类。全部通过后只得到 `empty-scaffold-verified`。
55
+
56
+ ## 硬约束
57
+
58
+ - 只接受 scaffold contract schema v3 和 Manifest schema v3;历史 v2 只读兼容,不用于新生成。
59
+ - `architecture_family` 必须为 `layered-mvc`,`generator_skill` 必须为本 skill。
60
+ - 目标存在、`--force`、旧项目迁移、模板升级均为 `unsupported`。
61
+ - Harness 内只允许以 `apps/backend/` 为输出父容器;外部实现仓库使用已登记真实路径。
62
+ - 不生成业务示例。健康检查、上下文加载测试和架构测试只能验证机械工程能力,不定义用户可见 API。
63
+ - 生成后业务实现必须回到当前批准的 Slice Implementation Contract,使用适用 YSS skills 和 `behavior-tdd`。
64
+ - DDD/MVC 互转不属于脚手架生成;已生成项目改变架构时必须建立独立迁移工作单元。
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "YSS Layered MVC Scaffold Generator"
3
+ short_description: "Generate an approved YSS layered MVC backend skeleton."
4
+ default_prompt: "Use $yss-layered-mvc-scaffold-generator only after a user-confirmed scaffold architecture decision and a lifecycle-approved schema v3 scaffold contract."
@@ -0,0 +1,29 @@
1
+ # 通用分层 MVC 架构合同
2
+
3
+ ## 模块闭包
4
+
5
+ | 能力 | 解析模块 |
6
+ |---|---|
7
+ | 核心 | `server`、`service`、`repository` |
8
+ | `external-integration` | `adapter` |
9
+ | `published-client` | `client` |
10
+ | `feign-client` | `client`、`feign-client` |
11
+
12
+ 合同保存 `requested_capabilities`、`resolved_modules` 和 `resolution_version: 1`。模块按 `server`、`service`、`repository`、`adapter`、`client`、`feign-client` 的稳定顺序生成。
13
+
14
+ ## 职责和依赖
15
+
16
+ | 模块 | 职责 | 允许依赖 |
17
+ |---|---|---|
18
+ | `server` | Spring Boot 启动、Controller 装配和 Web 配置 | `service`、可选 `client` |
19
+ | `service` | 应用服务、事务脚本和用例编排 | `repository`、可选 `adapter` / `feign-client` |
20
+ | `repository` | PO、Mapper、SQL 与数据库访问 | 无本项目上游模块 |
21
+ | `adapter` | 外部系统适配实现 | 无本项目上游模块 |
22
+ | `client` | 对外稳定调用契约 | 无本项目上游模块 |
23
+ | `feign-client` | `client` 的 Feign 实现 | `client` |
24
+
25
+ MVC 模式不等于禁止领域分析。若技术分析发现聚合不变量、复杂状态机、跨聚合一致性、Domain Event 或复杂并发,Agent 应推荐 `domain-driven`;用户仍选择 MVC 时必须记录覆盖理由和残余风险。局部 Tactical DDD Check 仍可按真实领域影响触发。
26
+
27
+ ## 生成边界
28
+
29
+ 允许生成 POM、Wrapper、启动入口、环境配置、包级占位、架构测试与上下文加载测试。禁止生成业务 API、DTO、字段、查询、状态、事务规则、权限、错误映射和 Mock 业务数据。
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ import { execFile } from "node:child_process";
3
+ import { mkdir, readFile, writeFile } from "node:fs/promises";
4
+ import path from "node:path";
5
+ import process from "node:process";
6
+ import { fileURLToPath } from "node:url";
7
+ import { run } from "./run_scaffold_verification.mjs";
8
+
9
+ const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
10
+ const GENERATOR = path.join(SCRIPT_DIR, "generate_scaffold.mjs");
11
+
12
+ function parseArgs(argv) {
13
+ const generatorArgs = [];
14
+ let evidenceDir;
15
+ let outputDir;
16
+ let projectName;
17
+ for (let index = 0; index < argv.length; index += 1) {
18
+ const token = argv[index];
19
+ if (token === "--evidence-dir" || token.startsWith("--evidence-dir=")) {
20
+ evidenceDir = token.includes("=") ? token.slice(token.indexOf("=") + 1) : argv[++index];
21
+ continue;
22
+ }
23
+ generatorArgs.push(token);
24
+ if (token === "--output-dir") outputDir = argv[index + 1];
25
+ if (token.startsWith("--output-dir=")) outputDir = token.slice(token.indexOf("=") + 1);
26
+ if (token === "--project-name") projectName = argv[index + 1];
27
+ if (token.startsWith("--project-name=")) projectName = token.slice(token.indexOf("=") + 1);
28
+ }
29
+ if (!evidenceDir || !outputDir || !projectName) throw new Error("必须提供 --evidence-dir、--output-dir 和 --project-name");
30
+ return { evidenceDir: path.resolve(evidenceDir), generatorArgs, projectRoot: path.join(path.resolve(outputDir), projectName) };
31
+ }
32
+
33
+ function executeGenerator(args) {
34
+ return new Promise((resolve) => execFile(process.execPath, [GENERATOR, ...args], { encoding: "utf8" }, (error, stdout, stderr) => resolve({ exitCode: error?.code ?? 0, stdout, stderr })));
35
+ }
36
+
37
+ async function main() {
38
+ try {
39
+ const args = parseArgs(process.argv.slice(2));
40
+ await mkdir(args.evidenceDir, { recursive: true });
41
+ const generation = await executeGenerator(args.generatorArgs);
42
+ await writeFile(path.join(args.evidenceDir, "generation.stdout.log"), generation.stdout, "utf8");
43
+ await writeFile(path.join(args.evidenceDir, "generation.stderr.log"), generation.stderr, "utf8");
44
+ if (generation.exitCode !== 0) throw new Error(`生成失败: ${generation.stderr.trim()}`);
45
+ const verification = await run(args.projectRoot, args.evidenceDir);
46
+ await writeFile(path.join(args.evidenceDir, "scaffold-verification.json"), `${JSON.stringify(verification, null, 2)}\n`, "utf8");
47
+ if (verification.status !== "passed") return 1;
48
+ const manifestPath = path.join(args.projectRoot, ".yss/scaffold-generation.json");
49
+ const manifest = JSON.parse(await readFile(manifestPath, "utf8"));
50
+ manifest.completion_level = "empty-scaffold-verified";
51
+ manifest.empty_scaffold_verification_ref = path.join(args.evidenceDir, "scaffold-verification.json");
52
+ manifest.empty_scaffold_verified_at = new Date().toISOString();
53
+ await writeFile(manifestPath, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
54
+ return 0;
55
+ } catch (error) {
56
+ process.stderr.write(`❌ MVC 脚手架工作流失败: ${error.message}\n`);
57
+ return 1;
58
+ }
59
+ }
60
+
61
+ process.exitCode = await main();
@@ -0,0 +1,315 @@
1
+ #!/usr/bin/env node
2
+ /** 依据生命周期批准的 schema v3 合同生成纯机械 YSS 分层 MVC 后端骨架。 */
3
+ import { assertScaffoldUserDecision } from "../../../../scripts/lib/user-decision.mjs";
4
+ import { createHash } from "node:crypto";
5
+ import { chmod, cp, lstat, mkdir, mkdtemp, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
6
+ import path from "node:path";
7
+ import process from "node:process";
8
+ import { fileURLToPath } from "node:url";
9
+ import { parseDocument } from "../../../../scripts/vendor/yaml.mjs";
10
+ import { findGitRoot, gitSubmoduleScaffoldViolation, overlayMountViolation } from "../../../../scripts/lib/repository-scope-policy.mjs";
11
+ import { assertLocalDatabaseProfile, localDatabaseConfiguration, scaffoldArchitectureIdentity } from "../../../../scripts/lib/scaffold-local-database.mjs";
12
+ import { validateArchitectureIdentity } from "../../../../scripts/lib/backend-architecture.mjs";
13
+
14
+ const SCRIPT_DIR = path.dirname(fileURLToPath(import.meta.url));
15
+ const SKILL_ROOT = path.resolve(SCRIPT_DIR, "..");
16
+ const REPOSITORY_ROOT = path.resolve(SCRIPT_DIR, "../../../..");
17
+ const SKILL_ID = "yss-layered-mvc-scaffold-generator";
18
+ const COMMANDS = ["./mvnw validate", "./mvnw test", "./mvnw package"];
19
+ const MODULE_ORDER = ["server", "service", "repository", "adapter", "client", "feign-client"];
20
+ const CORE_MODULES = ["server", "service", "repository"];
21
+ const CAPABILITIES = Object.freeze({
22
+ "external-integration": ["adapter"],
23
+ "published-client": ["client"],
24
+ "feign-client": ["client", "feign-client"]
25
+ });
26
+
27
+ function fail(message) { throw new Error(message); }
28
+ function isPresent(value) { return value !== undefined && value !== null && value !== "" && (!Array.isArray(value) || value.length > 0); }
29
+ function sha256(content) { return `sha256:${createHash("sha256").update(content).digest("hex")}`; }
30
+ function rawSha256(content) { return createHash("sha256").update(content).digest("hex"); }
31
+ function isWithin(parent, target) { const relative = path.relative(parent, target); return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative)); }
32
+ function xml(value) { return String(value).replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;"); }
33
+ function toUpperCamel(value) { return value.split("-").map((part) => `${part[0].toUpperCase()}${part.slice(1)}`).join(""); }
34
+ function orderedModules(requested) {
35
+ const modules = new Set(CORE_MODULES);
36
+ for (const capability of requested) {
37
+ if (!CAPABILITIES[capability]) fail(`unsupported MVC capability: ${capability}`);
38
+ for (const module of CAPABILITIES[capability]) modules.add(module);
39
+ }
40
+ return MODULE_ORDER.filter((module) => modules.has(module));
41
+ }
42
+ async function exists(target) { try { await lstat(target); return true; } catch (error) { if (error.code === "ENOENT") return false; throw error; } }
43
+ async function put(root, relative, content) { const target = path.join(root, relative); await mkdir(path.dirname(target), { recursive: true }); await writeFile(target, content.endsWith("\n") ? content : `${content}\n`, "utf8"); }
44
+ async function fileEntries(root, excluded = new Set()) {
45
+ const entries = [];
46
+ async function visit(directory) {
47
+ for (const entry of (await readdir(directory, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {
48
+ const target = path.join(directory, entry.name);
49
+ const relative = path.relative(root, target).split(path.sep).join("/");
50
+ if (entry.name === ".git") continue;
51
+ if (excluded.has(relative)) continue;
52
+ if (entry.isDirectory()) await visit(target);
53
+ else if (entry.isFile()) entries.push({ target, relative });
54
+ }
55
+ }
56
+ await visit(root);
57
+ return entries;
58
+ }
59
+ async function treeDigest(root) {
60
+ const hash = createHash("sha256");
61
+ async function visit(directory) {
62
+ for (const entry of (await readdir(directory, { withFileTypes: true })).sort((a, b) => a.name.localeCompare(b.name))) {
63
+ const target = path.join(directory, entry.name);
64
+ if (entry.isDirectory()) await visit(target);
65
+ else if (entry.isFile()) hash.update(path.relative(root, target)).update("\0").update(await readFile(target)).update("\0");
66
+ }
67
+ }
68
+ await visit(root);
69
+ return `sha256:${hash.digest("hex")}`;
70
+ }
71
+
72
+ export function parseArgs(argv) {
73
+ const options = { force: false };
74
+ const mapping = new Map([
75
+ ["--project-name", "projectName"], ["--base-package", "basePackage"], ["--output-dir", "outputDir"],
76
+ ["--contract-file", "contractFile"], ["--contract-id", "contractId"], ["--contract-version", "contractVersion"],
77
+ ["--approval-ref", "approvalRef"], ["--compiler-draft-ref", "compilerDraftRef"], ["--persisted-ref", "persistedRef"],
78
+ ["--group-id", "groupId"], ["--project-version", "projectVersion"], ["--parent-group-id", "parentGroupId"],
79
+ ["--parent-artifact-id", "parentArtifactId"], ["--parent-version", "parentVersion"], ["--yss-components-version", "yssComponentsVersion"]
80
+ ]);
81
+ for (let index = 0; index < argv.length; index += 1) {
82
+ let token = argv[index];
83
+ if (token === "--help" || token === "-h") { options.help = true; continue; }
84
+ if (token === "--force") { options.force = true; continue; }
85
+ const equal = token.indexOf("=");
86
+ let value;
87
+ if (equal >= 0) { value = token.slice(equal + 1); token = token.slice(0, equal); }
88
+ if (!mapping.has(token)) fail(`不支持的参数: ${token}`);
89
+ if (value === undefined) value = argv[++index];
90
+ if (!value || value.startsWith("--")) fail(`参数 ${token} 缺少值`);
91
+ options[mapping.get(token)] = value;
92
+ }
93
+ if (options.help) return options;
94
+ for (const key of mapping.values()) if (!isPresent(options[key])) fail(`缺少必填参数: ${key}`);
95
+ if (!/^[a-z][a-z0-9-]*$/.test(options.projectName)) fail("--project-name 必须是 kebab-case");
96
+ if (!/^[a-z](?:[a-z0-9]*)(?:\.[a-z](?:[a-z0-9]*)?)*$/.test(options.basePackage)) fail("--base-package 不是合法 Java 包名");
97
+ if (!/^\d+$/.test(options.contractVersion) || Number(options.contractVersion) < 1) fail("--contract-version 必须为正整数");
98
+ options.contractVersion = Number(options.contractVersion);
99
+ if (options.force) fail("unsupported: initialize-only 脚手架禁止 --force");
100
+ return options;
101
+ }
102
+
103
+ function dependency(groupId, artifactId, version = null, scope = null) {
104
+ return `<dependency><groupId>${xml(groupId)}</groupId><artifactId>${xml(artifactId)}</artifactId>${version ? `<version>${xml(version)}</version>` : ""}${scope ? `<scope>${scope}</scope>` : ""}</dependency>`;
105
+ }
106
+
107
+ function parentPom(contract, modules) {
108
+ const c = contract.maven_coordinates;
109
+ return `<?xml version="1.0" encoding="UTF-8"?>
110
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
111
+ <modelVersion>4.0.0</modelVersion>
112
+ <parent><groupId>${xml(c.parent.group_id)}</groupId><artifactId>${xml(c.parent.artifact_id)}</artifactId><version>${xml(c.parent.version)}</version><relativePath/></parent>
113
+ <groupId>${xml(c.group_id)}</groupId><artifactId>${xml(contract.project_name)}</artifactId><version>${xml(c.project_version)}</version><packaging>pom</packaging>
114
+ <properties><java.version>1.8</java.version><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding><yss-components.version>${xml(c.yss_components_version)}</yss-components.version></properties>
115
+ <modules>${modules.map((module) => `<module>${contract.project_name}-${module}</module>`).join("")}</modules>
116
+ <dependencyManagement><dependencies>${dependency("com.yss.cloud", "yss-components-bom", "${yss-components.version}", "import").replace("</dependency>", "<type>pom</type></dependency>")}</dependencies></dependencyManagement>
117
+ <build><pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-compiler-plugin</artifactId><version>3.11.0</version><configuration><source>1.8</source><target>1.8</target><annotationProcessorPaths><path><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.30</version></path><path><groupId>org.mapstruct</groupId><artifactId>mapstruct-processor</artifactId><version>1.5.5.Final</version></path><path><groupId>org.projectlombok</groupId><artifactId>lombok-mapstruct-binding</artifactId><version>0.2.0</version></path></annotationProcessorPaths></configuration></plugin></plugins></pluginManagement></build>
118
+ </project>`;
119
+ }
120
+
121
+ function modulePom(contract, module, modules) {
122
+ const applicationModule = modules.includes("core") ? "core" : "service";
123
+ const own = (name) => dependency(contract.maven_coordinates.group_id, `${contract.project_name}-${name}`, "${project.version}");
124
+ const dependencies = [];
125
+ if (module === "server") {
126
+ dependencies.push(own(applicationModule), dependency("org.springframework.boot", "spring-boot-starter-web"), dependency("org.springframework.boot", "spring-boot-starter-validation"), dependency("org.springframework.boot", "spring-boot-starter-test", null, "test"), dependency("com.tngtech.archunit", "archunit-junit5", "1.2.1", "test"));
127
+ if (modules.includes("client")) dependencies.push(own("client"));
128
+ dependencies.push(dependency("com.h2database", "h2", null, "test"), dependency("org.mapstruct", "mapstruct", "1.5.5.Final"), dependency("com.yss.cloud", "yss-component-dto"));
129
+ }
130
+ if (module === applicationModule) {
131
+ dependencies.push(own("repository"), dependency("org.springframework", "spring-tx"), dependency("com.yss.cloud", "yss-component-dto"), dependency("org.springframework.boot", "spring-boot-starter-test", null, "test"));
132
+ if (modules.includes("adapter")) dependencies.push(own("adapter"));
133
+ }
134
+ if (module === "repository") {
135
+ dependencies.push(dependency("com.yss.cloud", "yss-component-mybatis-plus-starter"), dependency("org.mapstruct", "mapstruct", "1.5.5.Final"), dependency("org.springframework.boot", "spring-boot-starter-test", null, "test"), dependency("com.h2database", "h2", null, "test"));
136
+ }
137
+ if (module === "adapter") {
138
+ dependencies.push(dependency("org.springframework", "spring-context"));
139
+ if (modules.includes("feign-client")) dependencies.push(own("feign-client"));
140
+ }
141
+ if (module === "client") dependencies.push(dependency("com.yss.cloud", "yss-component-dto"), dependency("javax.validation", "validation-api"));
142
+ if (["server", "service", "core", "client", "repository"].includes(module)) dependencies.push(dependency("org.projectlombok", "lombok", "1.18.30", "provided"));
143
+ if (module === "feign-client") dependencies.push(own("client"), dependency("org.springframework.cloud", "spring-cloud-openfeign-core"));
144
+ const plugin = module === "server" ? `<profiles><profile><id>scaffold-local</id><dependencies>${dependency("com.h2database", "h2", null, "runtime")}</dependencies></profile></profiles><build><plugins><plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId></plugin></plugins></build>` : "";
145
+ return `<?xml version="1.0" encoding="UTF-8"?>
146
+ <project xmlns="http://maven.apache.org/POM/4.0.0"><modelVersion>4.0.0</modelVersion><parent><groupId>${xml(contract.maven_coordinates.group_id)}</groupId><artifactId>${xml(contract.project_name)}</artifactId><version>${xml(contract.maven_coordinates.project_version)}</version></parent><artifactId>${xml(contract.project_name)}-${module}</artifactId><dependencies>${dependencies.join("")}</dependencies>${plugin}</project>`;
147
+ }
148
+
149
+ async function validateContract(options, skillId, architectureProfile) {
150
+ const contractFile = path.resolve(options.contractFile);
151
+ const contractText = await readFile(contractFile, "utf8").catch(() => fail(`脚手架合同不可读取: ${contractFile}`));
152
+ let contract;
153
+ try { contract = JSON.parse(contractText); } catch { fail("脚手架合同必须是 JSON 对象"); }
154
+ if (contract.schema_version !== 3) fail(`unsupported: 新生成只接受 scaffold contract schema v3,收到 v${contract.schema_version}`);
155
+ const required = ["contract_id", "contract_version", "scaffold_request_id", "status", "compiler_draft_ref", "lifecycle_approval_ref", "persisted_ref", "current_version", "implementation_repository", "backend_repository", "scaffold_status", "project_name", "target_output_dir", "base_package", "architecture_family", "generator_skill", "decision_ref", "decision_id", "decision_digest", "maven_coordinates", "profiles", "module_profile", "allowed_write_paths", "expected_evidence_files", "verification_commands", "approval", "work_unit", "generation_policy"];
156
+ const missing = required.filter((field) => !isPresent(contract[field]));
157
+ if (missing.length) fail(`脚手架合同缺少字段: ${missing.join(", ")}`);
158
+ if (contract.status !== "approved" || contract.current_version !== contract.contract_version) fail("脚手架合同必须已批准且为当前版本");
159
+ if (contract.contract_id !== options.contractId || contract.contract_version !== options.contractVersion || contract.compiler_draft_ref !== options.compilerDraftRef || contract.lifecycle_approval_ref !== options.approvalRef || contract.persisted_ref !== options.persistedRef) fail("命令行合同元数据与批准合同不一致");
160
+ if (contract.scaffold_status !== "required" || contract.architecture_family !== "layered-mvc" || contract.generator_skill !== skillId) fail("合同必须绑定 layered-mvc 与本生成器");
161
+ if (contract.project_name !== options.projectName || contract.base_package !== options.basePackage || path.resolve(contract.target_output_dir) !== path.resolve(options.outputDir)) fail("项目身份或输出目录与合同不一致");
162
+ if (!["allowed_write_paths", "expected_evidence_files", "verification_commands"].every((field) => Array.isArray(contract[field]) && contract[field].length)) fail("allowed_write_paths、expected_evidence_files、verification_commands 必须为非空数组");
163
+ const finalProjectRoot = path.join(path.resolve(options.outputDir), options.projectName);
164
+ const allowedRoots = contract.allowed_write_paths.map((item) => path.resolve(options.outputDir, String(item)));
165
+ if (!allowedRoots.some((root) => isWithin(root, finalProjectRoot))) fail("实际项目根不在合同 allowed_write_paths 内");
166
+ const expectedProfiles = { architecture: "layered-mvc", persistence: "mybatis-plus", platform: "spring-boot-2.7-jdk8", validation_namespace: "javax", repository: "yss-internal" };
167
+ for (const [field, value] of Object.entries(expectedProfiles)) if (contract.profiles?.[field] !== value) fail(`unsupported profile ${field}: ${contract.profiles?.[field]}`);
168
+ assertLocalDatabaseProfile(contract.profiles);
169
+ if (contract.architecture_profile !== architectureProfile) fail(`合同必须显式绑定 ${architectureProfile} Profile`);
170
+ const requested = contract.module_profile?.requested_capabilities;
171
+ if (!Array.isArray(requested)) fail("module_profile.requested_capabilities 必须是数组");
172
+ const resolved = architectureProfile === "mvc-data-analysis-v1" ? ["server", "core", "client", "repository", "adapter", "feign-client"] : orderedModules(requested);
173
+ if (contract.module_profile.resolution_version !== 1 || JSON.stringify(contract.module_profile.resolved_modules) !== JSON.stringify(resolved)) fail("MVC 能力闭包与 resolution_version=1 不一致");
174
+ if (JSON.stringify(contract.verification_commands) !== JSON.stringify(COMMANDS)) fail("验证命令必须固定为三条 ./mvnw 命令");
175
+ if (!contract.expected_evidence_files.includes(".yss/scaffold-generation.json")) fail("expected_evidence_files 必须包含 Manifest");
176
+ const work = contract.work_unit;
177
+ if (work?.primary_skill !== skillId || work?.tdd_mode !== "controlled-generation" || work?.controlled_generation !== true) fail("工作单元必须绑定本生成器和 controlled-generation");
178
+ if (!Array.isArray(work.allowed_write_paths) || !Array.isArray(work.expected_evidence) || !Array.isArray(work.verification_commands) || JSON.stringify(work.allowed_write_paths) !== JSON.stringify(contract.allowed_write_paths) || JSON.stringify(work.verification_commands) !== JSON.stringify(contract.verification_commands)) fail("工作单元与根级写路径或验证命令不一致");
179
+ const approval = contract.approval;
180
+ if (!approval || ["approval_ref", "approver", "persisted_ref", "current_version"].some((field) => !isPresent(approval[field])) || approval.approval_ref !== options.approvalRef || approval.persisted_ref !== options.persistedRef || approval.current_version !== options.contractVersion) fail("approval 记录不完整或不是当前合同版本");
181
+ const policy = contract.generation_policy;
182
+ if (policy?.mode !== "initialize-only" || policy?.existing_target !== "unsupported" || policy?.old_project_migration !== "unsupported" || policy?.template_upgrade !== "unsupported") fail("generation_policy 不符合 initialize-only");
183
+ const coordinates = contract.maven_coordinates;
184
+ const coordinateValues = [coordinates?.group_id, coordinates?.project_version, coordinates?.parent?.group_id, coordinates?.parent?.artifact_id, coordinates?.parent?.version, coordinates?.yss_components_version];
185
+ const optionValues = [options.groupId, options.projectVersion, options.parentGroupId, options.parentArtifactId, options.parentVersion, options.yssComponentsVersion];
186
+ if (coordinateValues.some((value) => !isPresent(value)) || JSON.stringify(coordinateValues) !== JSON.stringify(optionValues)) fail("Maven 坐标与合同不一致");
187
+ if (coordinateValues.some((value) => !/^[A-Za-z0-9_.-]+$/.test(String(value)))) fail("Maven 坐标只能包含字母、数字、点、下划线和连字符");
188
+ const decisionPath = path.isAbsolute(contract.decision_ref) ? contract.decision_ref : path.resolve(path.dirname(contractFile), contract.decision_ref);
189
+ const decisionText = await readFile(decisionPath, "utf8").catch(() => fail(`架构决策文件不可读取: ${decisionPath}`));
190
+ if (sha256(decisionText) !== contract.decision_digest) fail("架构决策文件 digest 与合同不一致");
191
+ const document = parseDocument(decisionText, { maxAliasCount: 0, uniqueKeys: true });
192
+ if (document.errors.length) fail(`架构决策 YAML 无效: ${document.errors[0].message}`);
193
+ const decisionSet = document.toJS({ maxAliasCount: 0 });
194
+ if (decisionSet?.kind !== "scaffold-architecture-decisions" || decisionSet?.template !== false || decisionSet?.status !== "current") fail("架构决策文件必须是 current 的正式 scaffold-architecture-decisions 记录");
195
+ const decisions = decisionSet.decisions ?? [];
196
+ const decision = decisions.find((item) => item.decision_id === contract.decision_id);
197
+ if (!decision || decision.status !== "lifecycle-approved" || decision.confirmed_architecture !== "layered-mvc" || decision.project_id !== contract.project_name) fail("架构决策未批准、项目不匹配或不是 layered-mvc");
198
+ if (decision.platform_profile !== contract.profiles.platform || decision.architecture_profile !== contract.architecture_profile || decision.verification_database !== "h2" || decision.production_database !== "not-bound" || Object.hasOwn(decision, "database_profile") || JSON.stringify(decision.requested_capabilities) !== JSON.stringify(contract.module_profile.requested_capabilities) || JSON.stringify(decision.resolved_modules) !== JSON.stringify(contract.module_profile.resolved_modules)) fail("架构决策的 Profile 或模块闭包与脚手架合同不一致");
199
+ if (!decision.user_confirmation || Object.values(decision.user_confirmation).some((value) => !isPresent(value))) fail("架构决策缺少完整用户确认记录");
200
+ assertScaffoldUserDecision(decision);
201
+ validateArchitectureIdentity(scaffoldArchitectureIdentity(contract, sha256(contractText)));
202
+ return { contract, contractText, modules: resolved };
203
+ }
204
+
205
+ async function validateOutputLayout(outputDir, projectName) {
206
+ const target = path.join(path.resolve(outputDir), projectName);
207
+ const relative = path.relative(REPOSITORY_ROOT, path.resolve(outputDir));
208
+ if (!relative.startsWith("..") && !path.isAbsolute(relative)) {
209
+ const parts = relative.split(path.sep).filter(Boolean);
210
+ if (!(parts.length === 2 && parts[0] === "apps" && parts[1] === "backend")) fail("Harness 内后端脚手架输出父目录必须是 apps/backend");
211
+ }
212
+ const gitRoot = findGitRoot(target) || findGitRoot(outputDir) || REPOSITORY_ROOT;
213
+ const violation = gitSubmoduleScaffoldViolation(gitRoot, path.resolve(outputDir), projectName, { force: false }) || overlayMountViolation(gitRoot, target, { force: true });
214
+ if (violation) fail(violation);
215
+ if (await exists(target)) fail(`unsupported: 目标已存在 ${target}`);
216
+ }
217
+
218
+ export async function generate(options, { skillId = SKILL_ID, architectureProfile = "layered-mvc-service", finalize } = {}) {
219
+ if (!((skillId === SKILL_ID && architectureProfile === "layered-mvc-service") || (skillId === "yss-mvc-data-analysis-project-initializer" && architectureProfile === "mvc-data-analysis-v1"))) fail("unsupported MVC generator/Profile pair");
220
+ await validateOutputLayout(options.outputDir, options.projectName);
221
+ const { contract, contractText, modules } = await validateContract(options, skillId, architectureProfile);
222
+ const outputDir = path.resolve(options.outputDir);
223
+ await mkdir(outputDir, { recursive: true });
224
+ const staging = await mkdtemp(path.join(outputDir, `.${options.projectName}.staging-`));
225
+ const projectRoot = path.join(staging, options.projectName);
226
+ const packagePath = options.basePackage.replaceAll(".", "/");
227
+ try {
228
+ await mkdir(projectRoot, { recursive: true });
229
+ await put(projectRoot, "pom.xml", parentPom(contract, modules));
230
+ for (const module of modules) {
231
+ const moduleRoot = `${options.projectName}-${module}`;
232
+ await put(projectRoot, `${moduleRoot}/pom.xml`, modulePom(contract, module, modules));
233
+ await put(projectRoot, `${moduleRoot}/src/main/java/${packagePath}/${module.replaceAll("-", "/")}/package-info.java`, `/** ${module} mechanical package boundary. */\npackage ${options.basePackage}.${module.replaceAll("-", ".")};`);
234
+ }
235
+ const applicationClass = `${toUpperCamel(options.projectName)}Application`;
236
+ const serverRoot = `${options.projectName}-server`;
237
+ await put(projectRoot, `${serverRoot}/src/main/java/${packagePath}/${applicationClass}.java`, `package ${options.basePackage};\n\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\n\n/** Mechanical Spring Boot entrypoint. */\n@SpringBootApplication\npublic class ${applicationClass} {\n public static void main(String[] args) {\n SpringApplication.run(${applicationClass}.class, args);\n }\n}`);
238
+ await put(projectRoot, `${serverRoot}/src/main/resources/application.yml`, `spring:\n application:\n name: ${options.projectName}`);
239
+ await put(projectRoot, `${serverRoot}/src/main/resources/application-scaffold-local.yml`, localDatabaseConfiguration(options.projectName));
240
+ await put(projectRoot, `${serverRoot}/src/test/resources/application-scaffold-test.yml`, localDatabaseConfiguration(`${options.projectName}_test`));
241
+ await put(projectRoot, `${serverRoot}/src/test/java/${packagePath}/${applicationClass}Test.java`, `package ${options.basePackage};\n\nimport org.junit.jupiter.api.Test;\nimport org.springframework.boot.test.context.SpringBootTest;\nimport org.springframework.test.context.ActiveProfiles;\n\n@SpringBootTest\n@ActiveProfiles("scaffold-test")\nclass ${applicationClass}Test {\n @Test\n void contextLoads() {\n }\n}`);
242
+ await put(projectRoot, `${serverRoot}/src/test/java/${packagePath}/architecture/LayeredMvcArchitectureTest.java`, `package ${options.basePackage}.architecture;\n\nimport static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;\n\nimport com.tngtech.archunit.core.importer.ImportOption;\nimport com.tngtech.archunit.junit.AnalyzeClasses;\nimport com.tngtech.archunit.junit.ArchTest;\nimport com.tngtech.archunit.lang.ArchRule;\n\n@AnalyzeClasses(packages = "${options.basePackage}", importOptions = ImportOption.DoNotIncludeTests.class)\nclass LayeredMvcArchitectureTest {\n @ArchTest\n static final ArchRule repositoryDoesNotDependOnUpperLayers = noClasses().that().resideInAPackage("..repository..").should().dependOnClassesThat().resideInAnyPackage("..service..", "..server..");\n}`);
243
+ const wrapper = path.join(REPOSITORY_ROOT, ".agents/skills/yss-ddd-scaffold-generator/assets/wrapper");
244
+ await cp(wrapper, projectRoot, { recursive: true });
245
+ await chmod(path.join(projectRoot, "mvnw"), 0o755);
246
+ if (finalize) await finalize({ projectRoot, contract, architectureIdentity: scaffoldArchitectureIdentity(contract, sha256(contractText)) });
247
+ await put(projectRoot, "README.md", `# ${options.projectName}\n\n该工程由 ${skillId} 根据批准的 schema v3 合同生成。模块:${modules.join("、")}。不包含业务 API、SQL 或生产数据库绑定。\n\n本地运行需同时显式启用 Maven -Pscaffold-local 和 Spring scaffold-local Profile;测试独立使用 H2。生产数据库须由后续已批准存储工作单元接入。`);
248
+ const generatedFiles = [];
249
+ for (const entry of await fileEntries(projectRoot, new Set([".yss/scaffold-generation.json"]))) generatedFiles.push({ path: entry.relative, owner: "generator", sha256: rawSha256(await readFile(entry.target)) });
250
+ const architectureRuleset = `${serverRoot}/src/test/java/${packagePath}/architecture/LayeredMvcArchitectureTest.java`;
251
+ const downstream = {};
252
+ for (const skill of ["yss-application", "yss-repository", "yss-mybatis", "yss-web-controller", "yss-dto", "yss-exception", "yss-validation", "mapstruct", "lombok", "alibaba-java-code-style"]) downstream[skill] = (await treeDigest(path.join(REPOSITORY_ROOT, ".agents/skills", skill))).replace(/^sha256:/, "");
253
+ const manifest = {
254
+ schema_version: 3,
255
+ kind: architectureProfile === "mvc-data-analysis-v1" ? "service-project-initialization" : "backend-scaffold",
256
+ architecture_profile: contract.architecture_profile,
257
+ architecture_identity: scaffoldArchitectureIdentity(contract, sha256(contractText)),
258
+ contract_id: contract.contract_id,
259
+ contract_version: contract.contract_version,
260
+ scaffold_request_id: contract.scaffold_request_id,
261
+ architecture_family: "layered-mvc",
262
+ generator_skill: skillId,
263
+ decision_id: contract.decision_id,
264
+ decision_digest: contract.decision_digest,
265
+ decision_ref: contract.decision_ref,
266
+ contract_digest: sha256(contractText),
267
+ contract_file_ref: path.resolve(options.contractFile),
268
+ approval_ref: options.approvalRef,
269
+ approver: contract.approval.approver,
270
+ lifecycle_approval_ref: contract.lifecycle_approval_ref,
271
+ compiler_draft_ref: contract.compiler_draft_ref,
272
+ persisted_ref: contract.persisted_ref,
273
+ current_version: contract.current_version,
274
+ allowed_write_paths: contract.allowed_write_paths,
275
+ expected_evidence_files: contract.expected_evidence_files,
276
+ profiles: contract.profiles,
277
+ module_profile: contract.module_profile,
278
+ maven_coordinates: contract.maven_coordinates,
279
+ maven_coordinates_source: "approved-contract",
280
+ project_name: contract.project_name,
281
+ base_package: contract.base_package,
282
+ bootstrap_main_class: `${options.basePackage}.${applicationClass}`,
283
+ bootstrap_main_source: `${serverRoot}/src/main/java/${packagePath}/${applicationClass}.java`,
284
+ generation_mode: "controlled-generation",
285
+ completion_level: "generated",
286
+ generation_policy: contract.generation_policy,
287
+ verification_commands: COMMANDS,
288
+ generator: { id: skillId, template_digest: await treeDigest(SKILL_ROOT) },
289
+ ownership: { generated_files: generatedFiles, user_owned_globs: ["**/src/main/java/**", "**/src/test/java/**", "db/**"] },
290
+ readiness: { downstream_skills: downstream, contracts: { architecture_profiles: rawSha256(await readFile(path.join(REPOSITORY_ROOT, "docs/agents/backend-architecture-profiles.md"))), compiler_contract: rawSha256(await readFile(path.join(REPOSITORY_ROOT, ".agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml"))) }, architecture_ruleset: rawSha256(await readFile(path.join(projectRoot, architectureRuleset))) },
291
+ generated_at: new Date().toISOString()
292
+ };
293
+ await put(projectRoot, ".yss/scaffold-generation.json", JSON.stringify(manifest, null, 2));
294
+ await rename(projectRoot, path.join(outputDir, options.projectName));
295
+ await rm(staging, { recursive: true, force: true });
296
+ process.stdout.write(`${JSON.stringify({ status: "generated", project_root: path.join(outputDir, options.projectName), modules }, null, 2)}\n`);
297
+ } catch (error) {
298
+ await rm(staging, { recursive: true, force: true });
299
+ throw error;
300
+ }
301
+ }
302
+
303
+ async function main() {
304
+ try {
305
+ const options = parseArgs(process.argv.slice(2));
306
+ if (options.help) { process.stdout.write("Use --project-name --base-package --output-dir and approved contract metadata. Local/test database is H2; production is not bound.\n"); return 0; }
307
+ await generate(options);
308
+ return 0;
309
+ } catch (error) {
310
+ process.stderr.write(`❌ MVC 脚手架生成失败: ${error.message}\n`);
311
+ return 1;
312
+ }
313
+ }
314
+
315
+ if (process.argv[1] === fileURLToPath(import.meta.url)) process.exitCode = await main();
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ /** 复用统一 Manifest v3 / Maven Wrapper 验证协议。 */
3
+ import path from "node:path";
4
+ import process from "node:process";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ import { run as runUnifiedVerification } from "../../yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs";
8
+
9
+ export async function run(projectRoot, evidenceDir, environment = process.env) {
10
+ return runUnifiedVerification(path.resolve(projectRoot), path.resolve(evidenceDir), environment);
11
+ }
12
+
13
+ async function main() {
14
+ const [projectRoot, evidenceDir] = process.argv.slice(2);
15
+ if (!projectRoot || !evidenceDir) {
16
+ process.stderr.write("用法: node run_scaffold_verification.mjs <project-root> <evidence-dir>\n");
17
+ return 1;
18
+ }
19
+ try {
20
+ const report = await run(projectRoot, evidenceDir);
21
+ process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
22
+ return report.status === "passed" ? 0 : 1;
23
+ } catch (error) {
24
+ process.stderr.write(`${error.message}\n`);
25
+ return 1;
26
+ }
27
+ }
28
+
29
+ const currentFile = fileURLToPath(import.meta.url);
30
+ if (process.argv[1] && path.resolve(process.argv[1]) === currentFile) process.exitCode = await main();