create-yss-spec 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1273) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
  3. package/template/.agents/rules/yss-ai-skills.md +3 -55
  4. package/template/.agents/skills/.strategic-design-skills-manifest.json +11 -6
  5. package/template/.agents/skills/.yss-skills-manifest.json +1 -3
  6. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -0
  7. package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
  8. package/template/.agents/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  9. package/template/.agents/skills/domain-modeling/SKILL.md +10 -26
  10. package/template/.agents/skills/grill-with-docs/SKILL.md +6 -5
  11. package/template/.agents/skills/lombok/SKILL.md +2 -1
  12. package/template/.agents/skills/mapstruct/SKILL.md +3 -2
  13. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  14. package/template/.agents/skills/setup-matt-pocock-skills/domain.md +6 -20
  15. package/template/.agents/skills/wait-what/SKILL.md +1 -1
  16. package/template/.agents/skills/yss-antdv-next-design/SKILL.md +48 -0
  17. package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  18. package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  19. package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  20. package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  21. package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  22. package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  23. package/template/.agents/skills/yss-application/SKILL.md +6 -0
  24. package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  25. package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  26. package/template/.agents/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  27. package/template/.agents/skills/yss-components/SKILL.md +1 -1
  28. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  29. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  30. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  31. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  32. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  33. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  34. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  35. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  36. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  37. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  38. package/template/.agents/skills/yss-design-system/SKILL.md +25 -22
  39. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +22 -24
  40. package/template/.agents/skills/yss-design-system/references/design-system.md +39 -56
  41. package/template/.agents/skills/yss-domain/SKILL.md +1 -1
  42. package/template/.agents/skills/yss-dto/SKILL.md +1 -0
  43. package/template/.agents/skills/yss-exception/SKILL.md +1 -0
  44. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  45. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  46. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  47. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  48. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  49. package/template/.agents/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  50. package/template/.agents/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  51. package/template/.agents/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  52. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  53. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  54. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  55. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  56. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  57. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  58. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  59. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  60. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  61. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  62. package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  63. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  64. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  65. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  66. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  67. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  68. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  69. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  70. package/template/.agents/skills/yss-mybatis/SKILL.md +2 -2
  71. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +31 -7
  72. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  73. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  74. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  75. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  76. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +7 -2
  77. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  78. package/template/.agents/skills/yss-prototype-stage/SKILL.md +9 -8
  79. package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  80. package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  81. package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  82. package/template/.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  83. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  84. package/template/.agents/skills/yss-repository/SKILL.md +6 -0
  85. package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  86. package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  87. package/template/.agents/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  88. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  89. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  90. package/template/.agents/skills/yss-stage-decision/SKILL.md +16 -12
  91. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  92. package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  93. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  94. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  95. package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +1 -1
  96. package/template/.agents/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  97. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  98. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  99. package/template/.agents/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  100. package/template/.agents/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  101. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  102. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  103. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  104. package/template/.agents/skills/yss-tactical-design/SKILL.md +8 -2
  105. package/template/.agents/skills/yss-tactical-design/references/output-template.md +3 -0
  106. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  107. package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  108. package/template/.agents/skills/yss-ui/SKILL.md +1 -2
  109. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  110. package/template/.agents/skills/yss-validation/SKILL.md +1 -0
  111. package/template/.agents/skills/yss-web-controller/SKILL.md +6 -0
  112. package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  113. package/template/.agents/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  114. package/template/.agents/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  115. package/template/.agents/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  116. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  117. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  118. package/template/.claude/skills/alibaba-java-code-style/SKILL.md +1 -0
  119. package/template/.claude/skills/code-review/references/yss-review-standards.md +1 -1
  120. package/template/.claude/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  121. package/template/.claude/skills/domain-modeling/SKILL.md +10 -26
  122. package/template/.claude/skills/grill-with-docs/SKILL.md +6 -5
  123. package/template/.claude/skills/lombok/SKILL.md +2 -1
  124. package/template/.claude/skills/mapstruct/SKILL.md +3 -2
  125. package/template/.claude/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  126. package/template/.claude/skills/setup-matt-pocock-skills/domain.md +6 -20
  127. package/template/.claude/skills/wait-what/SKILL.md +1 -1
  128. package/template/.claude/skills/yss-antdv-next-design/SKILL.md +48 -0
  129. package/template/.claude/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  130. package/template/.claude/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  131. package/template/.claude/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  132. package/template/.claude/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  133. package/template/.claude/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  134. package/template/.claude/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  135. package/template/.claude/skills/yss-application/SKILL.md +6 -0
  136. package/template/.claude/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  137. package/template/.claude/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  138. package/template/.claude/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  139. package/template/.claude/skills/yss-components/SKILL.md +1 -1
  140. package/template/.claude/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  141. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  142. package/template/.claude/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  143. package/template/.claude/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  144. package/template/.claude/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  145. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  146. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  147. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  148. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  149. package/template/.claude/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  150. package/template/.claude/skills/yss-design-system/SKILL.md +25 -22
  151. package/template/.claude/skills/yss-design-system/references/design-qa-theme.md +22 -24
  152. package/template/.claude/skills/yss-design-system/references/design-system.md +39 -56
  153. package/template/.claude/skills/yss-domain/SKILL.md +1 -1
  154. package/template/.claude/skills/yss-dto/SKILL.md +1 -0
  155. package/template/.claude/skills/yss-exception/SKILL.md +1 -0
  156. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  157. package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  158. package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  159. package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  160. package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  161. package/template/.claude/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  162. package/template/.claude/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  163. package/template/.claude/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  164. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  165. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  166. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  167. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  168. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  169. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  170. package/template/.claude/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  171. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  172. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  173. package/template/.claude/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  174. package/template/.claude/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  175. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  176. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  177. package/template/.claude/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  178. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  179. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  180. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  181. package/template/.claude/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  182. package/template/.claude/skills/yss-mybatis/SKILL.md +2 -2
  183. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +31 -7
  184. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  185. package/template/.claude/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  186. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  187. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  188. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +7 -2
  189. package/template/.claude/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  190. package/template/.claude/skills/yss-prototype-stage/SKILL.md +9 -8
  191. package/template/.claude/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  192. package/template/.claude/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  193. package/template/.claude/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  194. package/template/.claude/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  195. package/template/.claude/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  196. package/template/.claude/skills/yss-repository/SKILL.md +6 -0
  197. package/template/.claude/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  198. package/template/.claude/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  199. package/template/.claude/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  200. package/template/.claude/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  201. package/template/.claude/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  202. package/template/.claude/skills/yss-stage-decision/SKILL.md +16 -12
  203. package/template/.claude/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  204. package/template/.claude/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  205. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  206. package/template/.claude/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  207. package/template/.claude/skills/yss-stage-decision/references/validation-rules.md +1 -1
  208. package/template/.claude/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  209. package/template/.claude/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  210. package/template/.claude/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  211. package/template/.claude/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  212. package/template/.claude/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  213. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  214. package/template/.claude/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  215. package/template/.claude/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  216. package/template/.claude/skills/yss-tactical-design/SKILL.md +8 -2
  217. package/template/.claude/skills/yss-tactical-design/references/output-template.md +3 -0
  218. package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  219. package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  220. package/template/.claude/skills/yss-ui/SKILL.md +1 -2
  221. package/template/.claude/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  222. package/template/.claude/skills/yss-validation/SKILL.md +1 -0
  223. package/template/.claude/skills/yss-web-controller/SKILL.md +6 -0
  224. package/template/.claude/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  225. package/template/.claude/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  226. package/template/.claude/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  227. package/template/.claude/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  228. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  229. package/template/.claude/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  230. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -0
  231. package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
  232. package/template/.codex/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  233. package/template/.codex/skills/domain-modeling/SKILL.md +10 -26
  234. package/template/.codex/skills/grill-with-docs/SKILL.md +6 -5
  235. package/template/.codex/skills/lombok/SKILL.md +2 -1
  236. package/template/.codex/skills/mapstruct/SKILL.md +3 -2
  237. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  238. package/template/.codex/skills/setup-matt-pocock-skills/domain.md +6 -20
  239. package/template/.codex/skills/wait-what/SKILL.md +1 -1
  240. package/template/.codex/skills/yss-antdv-next-design/SKILL.md +48 -0
  241. package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  242. package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  243. package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  244. package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  245. package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  246. package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  247. package/template/.codex/skills/yss-application/SKILL.md +6 -0
  248. package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  249. package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  250. package/template/.codex/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  251. package/template/.codex/skills/yss-components/SKILL.md +1 -1
  252. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  253. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  254. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  255. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  256. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  257. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  258. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  259. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  260. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  261. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  262. package/template/.codex/skills/yss-design-system/SKILL.md +25 -22
  263. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +22 -24
  264. package/template/.codex/skills/yss-design-system/references/design-system.md +39 -56
  265. package/template/.codex/skills/yss-domain/SKILL.md +1 -1
  266. package/template/.codex/skills/yss-dto/SKILL.md +1 -0
  267. package/template/.codex/skills/yss-exception/SKILL.md +1 -0
  268. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  269. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  270. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  271. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  272. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  273. package/template/.codex/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  274. package/template/.codex/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  275. package/template/.codex/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  276. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  277. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  278. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  279. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  280. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  281. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  282. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  283. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  284. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  285. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  286. package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  287. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  288. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  289. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  290. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  291. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  292. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  293. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  294. package/template/.codex/skills/yss-mybatis/SKILL.md +2 -2
  295. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +31 -7
  296. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  297. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  298. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  299. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  300. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +7 -2
  301. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  302. package/template/.codex/skills/yss-prototype-stage/SKILL.md +9 -8
  303. package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  304. package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  305. package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  306. package/template/.codex/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  307. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  308. package/template/.codex/skills/yss-repository/SKILL.md +6 -0
  309. package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  310. package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  311. package/template/.codex/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  312. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  313. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  314. package/template/.codex/skills/yss-stage-decision/SKILL.md +16 -12
  315. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  316. package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  317. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  318. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  319. package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +1 -1
  320. package/template/.codex/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  321. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  322. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  323. package/template/.codex/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  324. package/template/.codex/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  325. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  326. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  327. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  328. package/template/.codex/skills/yss-tactical-design/SKILL.md +8 -2
  329. package/template/.codex/skills/yss-tactical-design/references/output-template.md +3 -0
  330. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  331. package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  332. package/template/.codex/skills/yss-ui/SKILL.md +1 -2
  333. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  334. package/template/.codex/skills/yss-validation/SKILL.md +1 -0
  335. package/template/.codex/skills/yss-web-controller/SKILL.md +6 -0
  336. package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  337. package/template/.codex/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  338. package/template/.codex/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  339. package/template/.codex/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  340. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  341. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  342. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -0
  343. package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
  344. package/template/.cursor/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  345. package/template/.cursor/skills/domain-modeling/SKILL.md +10 -26
  346. package/template/.cursor/skills/grill-with-docs/SKILL.md +6 -5
  347. package/template/.cursor/skills/lombok/SKILL.md +2 -1
  348. package/template/.cursor/skills/mapstruct/SKILL.md +3 -2
  349. package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  350. package/template/.cursor/skills/setup-matt-pocock-skills/domain.md +6 -20
  351. package/template/.cursor/skills/wait-what/SKILL.md +1 -1
  352. package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +48 -0
  353. package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  354. package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  355. package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  356. package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  357. package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  358. package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  359. package/template/.cursor/skills/yss-application/SKILL.md +6 -0
  360. package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  361. package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  362. package/template/.cursor/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  363. package/template/.cursor/skills/yss-components/SKILL.md +1 -1
  364. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  365. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  366. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  367. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  368. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  369. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  370. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  371. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  372. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  373. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  374. package/template/.cursor/skills/yss-design-system/SKILL.md +25 -22
  375. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +22 -24
  376. package/template/.cursor/skills/yss-design-system/references/design-system.md +39 -56
  377. package/template/.cursor/skills/yss-domain/SKILL.md +1 -1
  378. package/template/.cursor/skills/yss-dto/SKILL.md +1 -0
  379. package/template/.cursor/skills/yss-exception/SKILL.md +1 -0
  380. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  381. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  382. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  383. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  384. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  385. package/template/.cursor/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  386. package/template/.cursor/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  387. package/template/.cursor/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  388. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  389. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  390. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  391. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  392. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  393. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  394. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  395. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  396. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  397. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  398. package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  399. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  400. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  401. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  402. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  403. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  404. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  405. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  406. package/template/.cursor/skills/yss-mybatis/SKILL.md +2 -2
  407. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +31 -7
  408. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  409. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  410. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  411. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  412. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +7 -2
  413. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  414. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +9 -8
  415. package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  416. package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  417. package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  418. package/template/.cursor/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  419. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  420. package/template/.cursor/skills/yss-repository/SKILL.md +6 -0
  421. package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  422. package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  423. package/template/.cursor/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  424. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  425. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  426. package/template/.cursor/skills/yss-stage-decision/SKILL.md +16 -12
  427. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  428. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  429. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  430. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  431. package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +1 -1
  432. package/template/.cursor/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  433. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  434. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  435. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  436. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  437. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  438. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  439. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  440. package/template/.cursor/skills/yss-tactical-design/SKILL.md +8 -2
  441. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +3 -0
  442. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  443. package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  444. package/template/.cursor/skills/yss-ui/SKILL.md +1 -2
  445. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  446. package/template/.cursor/skills/yss-validation/SKILL.md +1 -0
  447. package/template/.cursor/skills/yss-web-controller/SKILL.md +6 -0
  448. package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  449. package/template/.cursor/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  450. package/template/.cursor/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  451. package/template/.cursor/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  452. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  453. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  454. package/template/.cursorrules +6 -34
  455. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -0
  456. package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
  457. package/template/.pi/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  458. package/template/.pi/skills/domain-modeling/SKILL.md +10 -26
  459. package/template/.pi/skills/grill-with-docs/SKILL.md +6 -5
  460. package/template/.pi/skills/lombok/SKILL.md +2 -1
  461. package/template/.pi/skills/mapstruct/SKILL.md +3 -2
  462. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  463. package/template/.pi/skills/setup-matt-pocock-skills/domain.md +6 -20
  464. package/template/.pi/skills/wait-what/SKILL.md +1 -1
  465. package/template/.pi/skills/yss-antdv-next-design/SKILL.md +48 -0
  466. package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  467. package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  468. package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  469. package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  470. package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  471. package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  472. package/template/.pi/skills/yss-application/SKILL.md +6 -0
  473. package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  474. package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  475. package/template/.pi/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  476. package/template/.pi/skills/yss-components/SKILL.md +1 -1
  477. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  478. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  479. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  480. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  481. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  482. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  483. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  484. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  485. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  486. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  487. package/template/.pi/skills/yss-design-system/SKILL.md +25 -22
  488. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +22 -24
  489. package/template/.pi/skills/yss-design-system/references/design-system.md +39 -56
  490. package/template/.pi/skills/yss-domain/SKILL.md +1 -1
  491. package/template/.pi/skills/yss-dto/SKILL.md +1 -0
  492. package/template/.pi/skills/yss-exception/SKILL.md +1 -0
  493. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  494. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  495. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  496. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  497. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  498. package/template/.pi/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  499. package/template/.pi/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  500. package/template/.pi/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  501. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  502. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  503. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  504. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  505. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  506. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  507. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  508. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  509. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  510. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  511. package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  512. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  513. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  514. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  515. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  516. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  517. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  518. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  519. package/template/.pi/skills/yss-mybatis/SKILL.md +2 -2
  520. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +31 -7
  521. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  522. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  523. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  524. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  525. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +7 -2
  526. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  527. package/template/.pi/skills/yss-prototype-stage/SKILL.md +9 -8
  528. package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  529. package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  530. package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  531. package/template/.pi/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  532. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  533. package/template/.pi/skills/yss-repository/SKILL.md +6 -0
  534. package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  535. package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  536. package/template/.pi/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  537. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  538. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  539. package/template/.pi/skills/yss-stage-decision/SKILL.md +16 -12
  540. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  541. package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  542. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  543. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  544. package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +1 -1
  545. package/template/.pi/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  546. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  547. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  548. package/template/.pi/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  549. package/template/.pi/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  550. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  551. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  552. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  553. package/template/.pi/skills/yss-tactical-design/SKILL.md +8 -2
  554. package/template/.pi/skills/yss-tactical-design/references/output-template.md +3 -0
  555. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  556. package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  557. package/template/.pi/skills/yss-ui/SKILL.md +1 -2
  558. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  559. package/template/.pi/skills/yss-validation/SKILL.md +1 -0
  560. package/template/.pi/skills/yss-web-controller/SKILL.md +6 -0
  561. package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  562. package/template/.pi/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  563. package/template/.pi/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  564. package/template/.pi/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  565. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  566. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  567. package/template/.qoder/skills/alibaba-java-code-style/SKILL.md +1 -0
  568. package/template/.qoder/skills/code-review/references/yss-review-standards.md +1 -1
  569. package/template/.qoder/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  570. package/template/.qoder/skills/domain-modeling/SKILL.md +10 -26
  571. package/template/.qoder/skills/grill-with-docs/SKILL.md +6 -5
  572. package/template/.qoder/skills/lombok/SKILL.md +2 -1
  573. package/template/.qoder/skills/mapstruct/SKILL.md +3 -2
  574. package/template/.qoder/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  575. package/template/.qoder/skills/setup-matt-pocock-skills/domain.md +6 -20
  576. package/template/.qoder/skills/wait-what/SKILL.md +1 -1
  577. package/template/.qoder/skills/yss-antdv-next-design/SKILL.md +48 -0
  578. package/template/.qoder/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  579. package/template/.qoder/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  580. package/template/.qoder/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  581. package/template/.qoder/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  582. package/template/.qoder/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  583. package/template/.qoder/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  584. package/template/.qoder/skills/yss-application/SKILL.md +6 -0
  585. package/template/.qoder/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  586. package/template/.qoder/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  587. package/template/.qoder/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  588. package/template/.qoder/skills/yss-components/SKILL.md +1 -1
  589. package/template/.qoder/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  590. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  591. package/template/.qoder/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  592. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  593. package/template/.qoder/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  594. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  595. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  596. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  597. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  598. package/template/.qoder/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  599. package/template/.qoder/skills/yss-design-system/SKILL.md +25 -22
  600. package/template/.qoder/skills/yss-design-system/references/design-qa-theme.md +22 -24
  601. package/template/.qoder/skills/yss-design-system/references/design-system.md +39 -56
  602. package/template/.qoder/skills/yss-domain/SKILL.md +1 -1
  603. package/template/.qoder/skills/yss-dto/SKILL.md +1 -0
  604. package/template/.qoder/skills/yss-exception/SKILL.md +1 -0
  605. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  606. package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  607. package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  608. package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  609. package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  610. package/template/.qoder/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  611. package/template/.qoder/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  612. package/template/.qoder/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  613. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  614. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  615. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  616. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  617. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  618. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  619. package/template/.qoder/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  620. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  621. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  622. package/template/.qoder/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  623. package/template/.qoder/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  624. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  625. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  626. package/template/.qoder/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  627. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  628. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  629. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  630. package/template/.qoder/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  631. package/template/.qoder/skills/yss-mybatis/SKILL.md +2 -2
  632. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +31 -7
  633. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  634. package/template/.qoder/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  635. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  636. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  637. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +7 -2
  638. package/template/.qoder/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  639. package/template/.qoder/skills/yss-prototype-stage/SKILL.md +9 -8
  640. package/template/.qoder/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  641. package/template/.qoder/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  642. package/template/.qoder/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  643. package/template/.qoder/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  644. package/template/.qoder/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  645. package/template/.qoder/skills/yss-repository/SKILL.md +6 -0
  646. package/template/.qoder/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  647. package/template/.qoder/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  648. package/template/.qoder/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  649. package/template/.qoder/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  650. package/template/.qoder/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  651. package/template/.qoder/skills/yss-stage-decision/SKILL.md +16 -12
  652. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  653. package/template/.qoder/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  654. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  655. package/template/.qoder/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  656. package/template/.qoder/skills/yss-stage-decision/references/validation-rules.md +1 -1
  657. package/template/.qoder/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  658. package/template/.qoder/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  659. package/template/.qoder/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  660. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  661. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  662. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  663. package/template/.qoder/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  664. package/template/.qoder/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  665. package/template/.qoder/skills/yss-tactical-design/SKILL.md +8 -2
  666. package/template/.qoder/skills/yss-tactical-design/references/output-template.md +3 -0
  667. package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  668. package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  669. package/template/.qoder/skills/yss-ui/SKILL.md +1 -2
  670. package/template/.qoder/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  671. package/template/.qoder/skills/yss-validation/SKILL.md +1 -0
  672. package/template/.qoder/skills/yss-web-controller/SKILL.md +6 -0
  673. package/template/.qoder/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  674. package/template/.qoder/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  675. package/template/.qoder/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  676. package/template/.qoder/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  677. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  678. package/template/.qoder/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  679. package/template/.trae/skills/alibaba-java-code-style/SKILL.md +1 -0
  680. package/template/.trae/skills/code-review/references/yss-review-standards.md +1 -1
  681. package/template/.trae/skills/domain-modeling/CONTEXT-FORMAT.md +37 -42
  682. package/template/.trae/skills/domain-modeling/SKILL.md +10 -26
  683. package/template/.trae/skills/grill-with-docs/SKILL.md +6 -5
  684. package/template/.trae/skills/lombok/SKILL.md +2 -1
  685. package/template/.trae/skills/mapstruct/SKILL.md +3 -2
  686. package/template/.trae/skills/setup-matt-pocock-skills/SKILL.md +5 -6
  687. package/template/.trae/skills/setup-matt-pocock-skills/domain.md +6 -20
  688. package/template/.trae/skills/wait-what/SKILL.md +1 -1
  689. package/template/.trae/skills/yss-antdv-next-design/SKILL.md +48 -0
  690. package/template/.trae/skills/yss-antdv-next-design/references/boundaries.md +25 -0
  691. package/template/.trae/skills/yss-antdv-next-design/references/cli-matrix.md +34 -0
  692. package/template/.trae/skills/yss-antdv-next-design/references/fact-pack.md +38 -0
  693. package/template/.trae/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +213 -0
  694. package/template/.trae/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +168 -0
  695. package/template/.trae/skills/yss-antdv-next-design/tests/run-scenarios.mjs +139 -0
  696. package/template/.trae/skills/yss-application/SKILL.md +6 -0
  697. package/template/.trae/skills/yss-application/references/profiles/layered-mvc-service.md +3 -0
  698. package/template/.trae/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +3 -0
  699. package/template/.trae/skills/yss-application/references/profiles/target-domain-model.md +3 -0
  700. package/template/.trae/skills/yss-components/SKILL.md +1 -1
  701. package/template/.trae/skills/yss-ddd-scaffold-generator/SKILL.md +3 -4
  702. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/config/application.yml.template +0 -13
  703. package/template/.trae/skills/yss-ddd-scaffold-generator/assets/templates/pom/bootstrap-pom.xml.template +13 -0
  704. package/template/.trae/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +13 -4
  705. package/template/.trae/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  706. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +21 -7
  707. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +37 -15
  708. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +22 -10
  709. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +14 -2
  710. package/template/.trae/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +41 -12
  711. package/template/.trae/skills/yss-design-system/SKILL.md +25 -22
  712. package/template/.trae/skills/yss-design-system/references/design-qa-theme.md +22 -24
  713. package/template/.trae/skills/yss-design-system/references/design-system.md +39 -56
  714. package/template/.trae/skills/yss-domain/SKILL.md +1 -1
  715. package/template/.trae/skills/yss-dto/SKILL.md +1 -0
  716. package/template/.trae/skills/yss-exception/SKILL.md +1 -0
  717. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +1 -1
  718. package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +8 -2
  719. package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +16 -8
  720. package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +72 -19
  721. package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +5 -1
  722. package/template/.trae/skills/yss-implementation-contract-compiler/references/yss-skill-execution-result.md +2 -0
  723. package/template/.trae/skills/yss-implementation-contract-compiler/tests/backend-profiles.test.mjs +45 -0
  724. package/template/.trae/skills/yss-implementation-contract-compiler/tests/compiler-scenarios.test.mjs +8 -6
  725. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/SKILL.md +64 -0
  726. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +4 -0
  727. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/references/architecture.md +29 -0
  728. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_and_verify_scaffold.mjs +61 -0
  729. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +315 -0
  730. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +30 -0
  731. package/template/.trae/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +159 -0
  732. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +22 -0
  733. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +77 -0
  734. package/template/.trae/skills/yss-mvc-data-analysis-project-initializer/scripts/run_scaffold_verification.mjs +9 -0
  735. package/template/.trae/skills/yss-mvc-scaffold-generator/SKILL.md +3 -82
  736. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +137 -0
  737. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +341 -0
  738. package/template/.trae/skills/yss-mvc-scaffold-generator/references/history/skill.md +87 -0
  739. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +2 -135
  740. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +4 -332
  741. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +11 -3
  742. package/template/.trae/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +36 -0
  743. package/template/.trae/skills/yss-mybatis/SKILL.md +2 -2
  744. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +31 -7
  745. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +3 -0
  746. package/template/.trae/skills/yss-product-lifecycle/references/matt-yss-adapter.md +4 -6
  747. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +119 -46
  748. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +9 -3
  749. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +7 -2
  750. package/template/.trae/skills/yss-product-lifecycle/references/user-decisions.md +56 -0
  751. package/template/.trae/skills/yss-prototype-stage/SKILL.md +9 -8
  752. package/template/.trae/skills/yss-prototype-stage/references/product-design-adapter.md +33 -10
  753. package/template/.trae/skills/yss-prototype-stage/references/prototype-profile-routing.md +10 -8
  754. package/template/.trae/skills/yss-prototype-stage/scripts/prototype-contract.mjs +129 -22
  755. package/template/.trae/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs +314 -0
  756. package/template/.trae/skills/yss-prototype-stage/tests/run-scenarios.mjs +96 -17
  757. package/template/.trae/skills/yss-repository/SKILL.md +6 -0
  758. package/template/.trae/skills/yss-repository/references/profiles/layered-mvc-service.md +3 -0
  759. package/template/.trae/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +3 -0
  760. package/template/.trae/skills/yss-repository/references/profiles/target-domain-model.md +3 -0
  761. package/template/.trae/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  762. package/template/.trae/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +1 -1
  763. package/template/.trae/skills/yss-stage-decision/SKILL.md +16 -12
  764. package/template/.trae/skills/yss-stage-decision/references/domain-strategy-contract.md +16 -10
  765. package/template/.trae/skills/yss-stage-decision/references/domain-strategy.schema.json +23 -5
  766. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package-contract.md +5 -2
  767. package/template/.trae/skills/yss-stage-decision/references/stage-decision-package.schema.json +16 -4
  768. package/template/.trae/skills/yss-stage-decision/references/validation-rules.md +1 -1
  769. package/template/.trae/skills/yss-stage-decision/scripts/migrate-context-references.mjs +62 -0
  770. package/template/.trae/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +18 -7
  771. package/template/.trae/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +20 -9
  772. package/template/.trae/skills/yss-stage-decision/tests/fixtures/domain-strategy-approval.yaml +1 -1
  773. package/template/.trae/skills/yss-stage-decision/tests/fixtures/stage-decision-approval.yaml +1 -1
  774. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +12 -7
  775. package/template/.trae/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +9 -4
  776. package/template/.trae/skills/yss-stage-decision/tests/run-scenarios.mjs +134 -56
  777. package/template/.trae/skills/yss-tactical-design/SKILL.md +8 -2
  778. package/template/.trae/skills/yss-tactical-design/references/output-template.md +3 -0
  779. package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  780. package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +10 -2
  781. package/template/.trae/skills/yss-ui/SKILL.md +1 -2
  782. package/template/.trae/skills/yss-ui-business-page-generation/SKILL.md +3 -3
  783. package/template/.trae/skills/yss-validation/SKILL.md +1 -0
  784. package/template/.trae/skills/yss-web-controller/SKILL.md +6 -0
  785. package/template/.trae/skills/yss-web-controller/references/profiles/layered-mvc-service.md +3 -0
  786. package/template/.trae/skills/yss-web-controller/references/profiles/mvc-data-analysis-v1.md +3 -0
  787. package/template/.trae/skills/yss-web-controller/references/profiles/target-domain-model.md +3 -0
  788. package/template/.trae/skills/yss-web-controller/references/web-generation-contract.schema.json +3 -2
  789. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.mjs +27 -10
  790. package/template/.trae/skills/yss-web-controller/scripts/generate_controller.test.mjs +29 -1
  791. package/template/AGENTS.md +52 -91
  792. package/template/CONTEXT.md +15 -5
  793. package/template/DESIGN.md +85 -41
  794. package/template/__yss_dotfile__.gitignore +1 -0
  795. package/template/docs/agents/backend-architecture-profiles.md +25 -0
  796. package/template/docs/agents/digital-human-roles.md +3 -3
  797. package/template/docs/agents/digital-human-roles.yaml +46 -13
  798. package/template/docs/agents/domain.md +7 -6
  799. package/template/docs/agents/skill-migrations.md +20 -2
  800. package/template/docs/agents/skills-maintenance.md +3 -3
  801. package/template/docs/agents/strategic-design-skills-integration.md +6 -1
  802. package/template/docs/agents/yss-skill-registry.yaml +78 -94
  803. package/template/docs/agents/yss-ui-skills-integration.md +3 -3
  804. package/template/docs/api/templates/openapi-draft-review-checklist.md +2 -2
  805. package/template/docs/architecture/templates/engineering-baseline-review-template.md +18 -6
  806. package/template/docs/design/README.md +9 -6
  807. package/template/docs/design/design-system-sync.yaml +1 -1
  808. package/template/docs/design/design.md +86 -118
  809. package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +38 -0
  810. package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +434 -0
  811. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +7 -0
  812. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +246 -0
  813. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +40 -0
  814. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +32 -0
  815. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +7 -0
  816. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +190 -0
  817. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +20 -0
  818. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +256 -0
  819. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +7 -0
  820. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +460 -0
  821. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +70 -0
  822. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +123 -0
  823. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +7 -0
  824. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +646 -0
  825. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +50 -0
  826. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +130 -0
  827. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +7 -0
  828. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +640 -0
  829. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +70 -0
  830. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +172 -0
  831. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +7 -0
  832. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +1010 -0
  833. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +70 -0
  834. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +263 -0
  835. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +7 -0
  836. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +321 -0
  837. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +25 -0
  838. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +25 -0
  839. package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +3 -0
  840. package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +215 -0
  841. package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +5 -0
  842. package/template/docs/design/preview-dark.html +170 -7
  843. package/template/docs/design/preview.css +730 -0
  844. package/template/docs/design/preview.html +168 -10
  845. package/template/docs/design/preview.js +71 -0
  846. package/template/docs/design/schemas/visual-baseline.schema.json +66 -0
  847. package/template/docs/design/templates/interaction-spec-template.md +1 -1
  848. package/template/docs/design/templates/product-overview-design-template.md +6 -6
  849. package/template/docs/design/templates/prototype-evidence-template.yaml +21 -8
  850. package/template/docs/design/templates/prototype-review-checklist.md +1 -1
  851. package/template/docs/design/templates/visual-baseline-template.yaml +70 -0
  852. package/template/docs/design/tokens/.design-md-projection.json +3 -3
  853. package/template/docs/design/tokens/theme.json +2 -2
  854. package/template/docs/design/tokens/variables.css +5 -0
  855. package/template/docs/process/harness-executive-blueprint.md +1 -1
  856. package/template/docs/process/harness-process-tailoring.md +1 -0
  857. package/template/docs/process/lifecycle-artifact-map.md +5 -4
  858. package/template/docs/process/lifecycle-registry-baseline.json +7 -5
  859. package/template/docs/process/lifecycle-registry.yaml +22 -0
  860. package/template/docs/process/schemas/backend-architecture-identity.schema.json +19 -0
  861. package/template/docs/process/schemas/context-reconciliation.schema.json +57 -0
  862. package/template/docs/process/schemas/digital-human-task-package.schema.json +10 -0
  863. package/template/docs/process/schemas/frontend-implementation-evidence.schema.json +62 -29
  864. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +16 -2
  865. package/template/docs/process/schemas/lifecycle-registry.schema.json +4 -4
  866. package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +68 -0
  867. package/template/docs/process/schemas/strategic-design-handoff.schema.json +670 -0
  868. package/template/docs/process/schemas/strategic-handoff-domain-strategy.schema.json +146 -0
  869. package/template/docs/process/schemas/strategic-handoff-export.schema.json +295 -0
  870. package/template/docs/process/schemas/strategic-handoff-package.schema.json +97 -0
  871. package/template/docs/process/schemas/strategic-handoff-stage-decision-package.schema.json +98 -0
  872. package/template/docs/process/schemas/user-decision.schema.json +357 -0
  873. package/template/docs/process/strategic-handoff-package.md +56 -0
  874. package/template/docs/process/template-verification-profiles.yaml +60 -1
  875. package/template/docs/process/templates/context-reconciliation-template.yaml +18 -0
  876. package/template/docs/process/templates/frontend-implementation-plan-template.yaml +11 -5
  877. package/template/docs/process/templates/frontend-implementation-verification-template.yaml +25 -5
  878. package/template/docs/process/templates/lifecycle-checkpoint-template.yaml +9 -0
  879. package/template/docs/process/templates/scaffold-architecture-decisions-template.yaml +32 -0
  880. package/template/docs/process/templates/stage-checkpoint-template.md +5 -0
  881. package/template/docs/process/templates/user-decision-template.yaml +30 -0
  882. package/template/docs/templates/approval-record-template.yaml +4 -0
  883. package/template/docs/templates/build-architecture-checklist-template.md +3 -3
  884. package/template/docs/templates/implementation-repo-registry-template.md +3 -1
  885. package/template/docs/templates/implementation-routing-template.md +8 -6
  886. package/template/docs/templates/requirement-freeze-template.md +1 -1
  887. package/template/docs/templates/review-report-template.md +1 -1
  888. package/template/docs/templates/spec-template.md +5 -5
  889. 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 +3 -1
  890. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
  891. package/template/scripts/fixtures/strategic-handoff/base-stage.json +91 -0
  892. package/template/scripts/fixtures/strategic-handoff/base-strategy.json +205 -0
  893. package/template/scripts/fixtures/strategic-handoff/fixture.mjs +57 -0
  894. package/template/scripts/fixtures/strategic-handoff/source-roles.json +528 -0
  895. package/template/scripts/fixtures/user-decision/build-fixture.mjs +61 -0
  896. package/template/scripts/lib/approval-record.mjs +32 -1
  897. package/template/scripts/lib/backend-architecture.mjs +43 -0
  898. package/template/scripts/lib/context-contract.mjs +203 -0
  899. package/template/scripts/lib/digital-human-roles.mjs +21 -3
  900. package/template/scripts/lib/first-slice-architecture.mjs +23 -0
  901. package/template/scripts/lib/implementation-contract-compiler.mjs +34 -1
  902. package/template/scripts/lib/lifecycle-registry.mjs +14 -6
  903. package/template/scripts/lib/lifecycle-transition.mjs +19 -4
  904. package/template/scripts/lib/scaffold-local-database.mjs +26 -0
  905. package/template/scripts/lib/scenario-checks.mjs +25 -12
  906. package/template/scripts/lib/skill-governance.mjs +25 -10
  907. package/template/scripts/lib/skill-registry.mjs +1 -1
  908. package/template/scripts/lib/skill-supply-chain.mjs +1 -1
  909. package/template/scripts/lib/strategic-handoff-consumption.mjs +76 -0
  910. package/template/scripts/lib/strategic-handoff-io.mjs +75 -0
  911. package/template/scripts/lib/strategic-handoff-rules.mjs +37 -0
  912. package/template/scripts/lib/strategic-handoff-zip.py +52 -0
  913. package/template/scripts/lib/strategic-handoff.mjs +259 -0
  914. package/template/scripts/lib/task-package.mjs +10 -2
  915. package/template/scripts/lib/user-decision.mjs +210 -0
  916. package/template/scripts/strategic-handoff +14 -0
  917. package/template/scripts/sync-strategic-handoff-tools +18 -0
  918. package/template/scripts/verify-approval-record +5 -4
  919. package/template/scripts/verify-business-language-scenarios +59 -0
  920. package/template/scripts/verify-context-contract +15 -0
  921. package/template/scripts/verify-context-contract-scenarios +105 -0
  922. package/template/scripts/verify-context-reconciliation +58 -0
  923. package/template/scripts/verify-context-reconciliation-scenarios +69 -0
  924. package/template/scripts/verify-digital-human-roles-scenarios +1 -1
  925. package/template/scripts/verify-frontend-implementation-evidence +31 -8
  926. package/template/scripts/verify-frontend-implementation-evidence-scenarios +56 -0
  927. package/template/scripts/verify-grill-with-docs-context-scenarios +15 -0
  928. package/template/scripts/verify-lifecycle-checkpoint +9 -1
  929. package/template/scripts/verify-lifecycle-transition-scenarios +13 -3
  930. package/template/scripts/verify-retired-skill-ids +30 -4
  931. package/template/scripts/verify-scaffold-architecture-decision-scenarios +30 -0
  932. package/template/scripts/verify-scaffold-architecture-decisions +61 -0
  933. package/template/scripts/verify-scaffold-generator-scenarios +74 -3
  934. package/template/scripts/verify-strategic-context-import +65 -0
  935. package/template/scripts/verify-strategic-context-import-scenarios +50 -0
  936. package/template/scripts/verify-strategic-handoff-consumption +10 -0
  937. package/template/scripts/verify-strategic-handoff-package-scenarios +102 -0
  938. package/template/scripts/verify-subagent-task-package-scenarios +17 -3
  939. package/template/scripts/verify-template-verification-scenarios +6 -1
  940. package/template/scripts/verify-user-decision +17 -0
  941. package/template/scripts/verify-user-decision-scenarios +103 -0
  942. package/template/skills-lock.json +77 -270
  943. package/template/yss-public-skills.json +4 -4
  944. package/template.snapshot.json +4 -4
  945. package/template/.agents/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  946. package/template/.agents/skills/ask-matt/SKILL.md +0 -95
  947. package/template/.agents/skills/ask-matt/agents/openai.yaml +0 -5
  948. package/template/.agents/skills/dispatching-parallel-agents/SKILL.md +0 -185
  949. package/template/.agents/skills/loop-me/SKILL.md +0 -32
  950. package/template/.agents/skills/loop-me/agents/openai.yaml +0 -5
  951. package/template/.agents/skills/migrate-to-shoehorn/SKILL.md +0 -118
  952. package/template/.agents/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  953. package/template/.agents/skills/prototype-page-acceptance/SKILL.md +0 -62
  954. package/template/.agents/skills/scaffold-exercises/SKILL.md +0 -106
  955. package/template/.agents/skills/scaffold-exercises/agents/openai.yaml +0 -3
  956. package/template/.agents/skills/setup-pre-commit/SKILL.md +0 -91
  957. package/template/.agents/skills/setup-pre-commit/agents/openai.yaml +0 -3
  958. package/template/.agents/skills/setup-ts-deep-modules/SKILL.md +0 -102
  959. package/template/.agents/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  960. package/template/.agents/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  961. package/template/.agents/skills/teach/GLOSSARY-FORMAT.md +0 -35
  962. package/template/.agents/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  963. package/template/.agents/skills/teach/MISSION-FORMAT.md +0 -31
  964. package/template/.agents/skills/teach/RESOURCES-FORMAT.md +0 -32
  965. package/template/.agents/skills/teach/SKILL.md +0 -140
  966. package/template/.agents/skills/teach/agents/openai.yaml +0 -5
  967. package/template/.agents/skills/writing-beats/SKILL.md +0 -67
  968. package/template/.agents/skills/writing-beats/agents/openai.yaml +0 -5
  969. package/template/.agents/skills/writing-fragments/SKILL.md +0 -79
  970. package/template/.agents/skills/writing-fragments/agents/openai.yaml +0 -5
  971. package/template/.agents/skills/writing-shape/SKILL.md +0 -79
  972. package/template/.agents/skills/writing-shape/agents/openai.yaml +0 -5
  973. package/template/.agents/skills/yss-microapp-commit/SKILL.md +0 -201
  974. package/template/.agents/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  975. package/template/.agents/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  976. package/template/.agents/skills/yss-page-module-development/SKILL.md +0 -165
  977. package/template/.agents/skills/yss-page-module-development/agents/openai.yaml +0 -5
  978. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  979. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  980. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  981. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  982. package/template/.agents/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  983. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  984. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  985. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  986. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  987. package/template/.agents/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  988. package/template/.agents/skills/yss-page-module-development/references/component-map.md +0 -34
  989. package/template/.agents/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  990. package/template/.agents/skills/yss-page-module-development/references/hooks-map.md +0 -11
  991. package/template/.agents/skills/yss-page-module-development/references/utils-map.md +0 -14
  992. package/template/.claude/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  993. package/template/.claude/skills/ask-matt/SKILL.md +0 -95
  994. package/template/.claude/skills/ask-matt/agents/openai.yaml +0 -5
  995. package/template/.claude/skills/dispatching-parallel-agents/SKILL.md +0 -185
  996. package/template/.claude/skills/loop-me/SKILL.md +0 -32
  997. package/template/.claude/skills/loop-me/agents/openai.yaml +0 -5
  998. package/template/.claude/skills/migrate-to-shoehorn/SKILL.md +0 -118
  999. package/template/.claude/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1000. package/template/.claude/skills/prototype-page-acceptance/SKILL.md +0 -62
  1001. package/template/.claude/skills/scaffold-exercises/SKILL.md +0 -106
  1002. package/template/.claude/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1003. package/template/.claude/skills/setup-pre-commit/SKILL.md +0 -91
  1004. package/template/.claude/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1005. package/template/.claude/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1006. package/template/.claude/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1007. package/template/.claude/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1008. package/template/.claude/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1009. package/template/.claude/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1010. package/template/.claude/skills/teach/MISSION-FORMAT.md +0 -31
  1011. package/template/.claude/skills/teach/RESOURCES-FORMAT.md +0 -32
  1012. package/template/.claude/skills/teach/SKILL.md +0 -140
  1013. package/template/.claude/skills/teach/agents/openai.yaml +0 -5
  1014. package/template/.claude/skills/writing-beats/SKILL.md +0 -67
  1015. package/template/.claude/skills/writing-beats/agents/openai.yaml +0 -5
  1016. package/template/.claude/skills/writing-fragments/SKILL.md +0 -79
  1017. package/template/.claude/skills/writing-fragments/agents/openai.yaml +0 -5
  1018. package/template/.claude/skills/writing-shape/SKILL.md +0 -79
  1019. package/template/.claude/skills/writing-shape/agents/openai.yaml +0 -5
  1020. package/template/.claude/skills/yss-microapp-commit/SKILL.md +0 -201
  1021. package/template/.claude/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1022. package/template/.claude/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1023. package/template/.claude/skills/yss-page-module-development/SKILL.md +0 -165
  1024. package/template/.claude/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1025. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1026. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1027. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1028. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1029. package/template/.claude/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1030. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1031. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1032. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1033. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1034. package/template/.claude/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1035. package/template/.claude/skills/yss-page-module-development/references/component-map.md +0 -34
  1036. package/template/.claude/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1037. package/template/.claude/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1038. package/template/.claude/skills/yss-page-module-development/references/utils-map.md +0 -14
  1039. package/template/.codex/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1040. package/template/.codex/skills/ask-matt/SKILL.md +0 -95
  1041. package/template/.codex/skills/ask-matt/agents/openai.yaml +0 -5
  1042. package/template/.codex/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1043. package/template/.codex/skills/loop-me/SKILL.md +0 -32
  1044. package/template/.codex/skills/loop-me/agents/openai.yaml +0 -5
  1045. package/template/.codex/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1046. package/template/.codex/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1047. package/template/.codex/skills/prototype-page-acceptance/SKILL.md +0 -62
  1048. package/template/.codex/skills/scaffold-exercises/SKILL.md +0 -106
  1049. package/template/.codex/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1050. package/template/.codex/skills/setup-pre-commit/SKILL.md +0 -91
  1051. package/template/.codex/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1052. package/template/.codex/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1053. package/template/.codex/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1054. package/template/.codex/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1055. package/template/.codex/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1056. package/template/.codex/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1057. package/template/.codex/skills/teach/MISSION-FORMAT.md +0 -31
  1058. package/template/.codex/skills/teach/RESOURCES-FORMAT.md +0 -32
  1059. package/template/.codex/skills/teach/SKILL.md +0 -140
  1060. package/template/.codex/skills/teach/agents/openai.yaml +0 -5
  1061. package/template/.codex/skills/writing-beats/SKILL.md +0 -67
  1062. package/template/.codex/skills/writing-beats/agents/openai.yaml +0 -5
  1063. package/template/.codex/skills/writing-fragments/SKILL.md +0 -79
  1064. package/template/.codex/skills/writing-fragments/agents/openai.yaml +0 -5
  1065. package/template/.codex/skills/writing-shape/SKILL.md +0 -79
  1066. package/template/.codex/skills/writing-shape/agents/openai.yaml +0 -5
  1067. package/template/.codex/skills/yss-microapp-commit/SKILL.md +0 -201
  1068. package/template/.codex/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1069. package/template/.codex/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1070. package/template/.codex/skills/yss-page-module-development/SKILL.md +0 -165
  1071. package/template/.codex/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1072. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1073. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1074. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1075. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1076. package/template/.codex/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1077. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1078. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1079. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1080. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1081. package/template/.codex/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1082. package/template/.codex/skills/yss-page-module-development/references/component-map.md +0 -34
  1083. package/template/.codex/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1084. package/template/.codex/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1085. package/template/.codex/skills/yss-page-module-development/references/utils-map.md +0 -14
  1086. package/template/.cursor/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1087. package/template/.cursor/skills/ask-matt/SKILL.md +0 -95
  1088. package/template/.cursor/skills/ask-matt/agents/openai.yaml +0 -5
  1089. package/template/.cursor/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1090. package/template/.cursor/skills/loop-me/SKILL.md +0 -32
  1091. package/template/.cursor/skills/loop-me/agents/openai.yaml +0 -5
  1092. package/template/.cursor/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1093. package/template/.cursor/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1094. package/template/.cursor/skills/prototype-page-acceptance/SKILL.md +0 -62
  1095. package/template/.cursor/skills/scaffold-exercises/SKILL.md +0 -106
  1096. package/template/.cursor/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1097. package/template/.cursor/skills/setup-pre-commit/SKILL.md +0 -91
  1098. package/template/.cursor/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1099. package/template/.cursor/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1100. package/template/.cursor/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1101. package/template/.cursor/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1102. package/template/.cursor/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1103. package/template/.cursor/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1104. package/template/.cursor/skills/teach/MISSION-FORMAT.md +0 -31
  1105. package/template/.cursor/skills/teach/RESOURCES-FORMAT.md +0 -32
  1106. package/template/.cursor/skills/teach/SKILL.md +0 -140
  1107. package/template/.cursor/skills/teach/agents/openai.yaml +0 -5
  1108. package/template/.cursor/skills/writing-beats/SKILL.md +0 -67
  1109. package/template/.cursor/skills/writing-beats/agents/openai.yaml +0 -5
  1110. package/template/.cursor/skills/writing-fragments/SKILL.md +0 -79
  1111. package/template/.cursor/skills/writing-fragments/agents/openai.yaml +0 -5
  1112. package/template/.cursor/skills/writing-shape/SKILL.md +0 -79
  1113. package/template/.cursor/skills/writing-shape/agents/openai.yaml +0 -5
  1114. package/template/.cursor/skills/yss-microapp-commit/SKILL.md +0 -201
  1115. package/template/.cursor/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1116. package/template/.cursor/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1117. package/template/.cursor/skills/yss-page-module-development/SKILL.md +0 -165
  1118. package/template/.cursor/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1119. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1120. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1121. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1122. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1123. package/template/.cursor/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1124. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1125. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1126. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1127. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1128. package/template/.cursor/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1129. package/template/.cursor/skills/yss-page-module-development/references/component-map.md +0 -34
  1130. package/template/.cursor/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1131. package/template/.cursor/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1132. package/template/.cursor/skills/yss-page-module-development/references/utils-map.md +0 -14
  1133. package/template/.pi/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1134. package/template/.pi/skills/ask-matt/SKILL.md +0 -95
  1135. package/template/.pi/skills/ask-matt/agents/openai.yaml +0 -5
  1136. package/template/.pi/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1137. package/template/.pi/skills/loop-me/SKILL.md +0 -32
  1138. package/template/.pi/skills/loop-me/agents/openai.yaml +0 -5
  1139. package/template/.pi/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1140. package/template/.pi/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1141. package/template/.pi/skills/prototype-page-acceptance/SKILL.md +0 -62
  1142. package/template/.pi/skills/scaffold-exercises/SKILL.md +0 -106
  1143. package/template/.pi/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1144. package/template/.pi/skills/setup-pre-commit/SKILL.md +0 -91
  1145. package/template/.pi/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1146. package/template/.pi/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1147. package/template/.pi/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1148. package/template/.pi/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1149. package/template/.pi/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1150. package/template/.pi/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1151. package/template/.pi/skills/teach/MISSION-FORMAT.md +0 -31
  1152. package/template/.pi/skills/teach/RESOURCES-FORMAT.md +0 -32
  1153. package/template/.pi/skills/teach/SKILL.md +0 -140
  1154. package/template/.pi/skills/teach/agents/openai.yaml +0 -5
  1155. package/template/.pi/skills/writing-beats/SKILL.md +0 -67
  1156. package/template/.pi/skills/writing-beats/agents/openai.yaml +0 -5
  1157. package/template/.pi/skills/writing-fragments/SKILL.md +0 -79
  1158. package/template/.pi/skills/writing-fragments/agents/openai.yaml +0 -5
  1159. package/template/.pi/skills/writing-shape/SKILL.md +0 -79
  1160. package/template/.pi/skills/writing-shape/agents/openai.yaml +0 -5
  1161. package/template/.pi/skills/yss-microapp-commit/SKILL.md +0 -201
  1162. package/template/.pi/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1163. package/template/.pi/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1164. package/template/.pi/skills/yss-page-module-development/SKILL.md +0 -165
  1165. package/template/.pi/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1166. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1167. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1168. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1169. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1170. package/template/.pi/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1171. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1172. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1173. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1174. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1175. package/template/.pi/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1176. package/template/.pi/skills/yss-page-module-development/references/component-map.md +0 -34
  1177. package/template/.pi/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1178. package/template/.pi/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1179. package/template/.pi/skills/yss-page-module-development/references/utils-map.md +0 -14
  1180. package/template/.qoder/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1181. package/template/.qoder/skills/ask-matt/SKILL.md +0 -95
  1182. package/template/.qoder/skills/ask-matt/agents/openai.yaml +0 -5
  1183. package/template/.qoder/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1184. package/template/.qoder/skills/loop-me/SKILL.md +0 -32
  1185. package/template/.qoder/skills/loop-me/agents/openai.yaml +0 -5
  1186. package/template/.qoder/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1187. package/template/.qoder/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1188. package/template/.qoder/skills/prototype-page-acceptance/SKILL.md +0 -62
  1189. package/template/.qoder/skills/scaffold-exercises/SKILL.md +0 -106
  1190. package/template/.qoder/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1191. package/template/.qoder/skills/setup-pre-commit/SKILL.md +0 -91
  1192. package/template/.qoder/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1193. package/template/.qoder/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1194. package/template/.qoder/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1195. package/template/.qoder/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1196. package/template/.qoder/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1197. package/template/.qoder/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1198. package/template/.qoder/skills/teach/MISSION-FORMAT.md +0 -31
  1199. package/template/.qoder/skills/teach/RESOURCES-FORMAT.md +0 -32
  1200. package/template/.qoder/skills/teach/SKILL.md +0 -140
  1201. package/template/.qoder/skills/teach/agents/openai.yaml +0 -5
  1202. package/template/.qoder/skills/writing-beats/SKILL.md +0 -67
  1203. package/template/.qoder/skills/writing-beats/agents/openai.yaml +0 -5
  1204. package/template/.qoder/skills/writing-fragments/SKILL.md +0 -79
  1205. package/template/.qoder/skills/writing-fragments/agents/openai.yaml +0 -5
  1206. package/template/.qoder/skills/writing-shape/SKILL.md +0 -79
  1207. package/template/.qoder/skills/writing-shape/agents/openai.yaml +0 -5
  1208. package/template/.qoder/skills/yss-microapp-commit/SKILL.md +0 -201
  1209. package/template/.qoder/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1210. package/template/.qoder/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1211. package/template/.qoder/skills/yss-page-module-development/SKILL.md +0 -165
  1212. package/template/.qoder/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1213. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1214. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1215. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1216. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1217. package/template/.qoder/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1218. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1219. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1220. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1221. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1222. package/template/.qoder/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1223. package/template/.qoder/skills/yss-page-module-development/references/component-map.md +0 -34
  1224. package/template/.qoder/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1225. package/template/.qoder/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1226. package/template/.qoder/skills/yss-page-module-development/references/utils-map.md +0 -14
  1227. package/template/.trae/skills/ask-matt/PHASE-BOUNDARIES.md +0 -55
  1228. package/template/.trae/skills/ask-matt/SKILL.md +0 -95
  1229. package/template/.trae/skills/ask-matt/agents/openai.yaml +0 -5
  1230. package/template/.trae/skills/dispatching-parallel-agents/SKILL.md +0 -185
  1231. package/template/.trae/skills/loop-me/SKILL.md +0 -32
  1232. package/template/.trae/skills/loop-me/agents/openai.yaml +0 -5
  1233. package/template/.trae/skills/migrate-to-shoehorn/SKILL.md +0 -118
  1234. package/template/.trae/skills/migrate-to-shoehorn/agents/openai.yaml +0 -3
  1235. package/template/.trae/skills/prototype-page-acceptance/SKILL.md +0 -62
  1236. package/template/.trae/skills/scaffold-exercises/SKILL.md +0 -106
  1237. package/template/.trae/skills/scaffold-exercises/agents/openai.yaml +0 -3
  1238. package/template/.trae/skills/setup-pre-commit/SKILL.md +0 -91
  1239. package/template/.trae/skills/setup-pre-commit/agents/openai.yaml +0 -3
  1240. package/template/.trae/skills/setup-ts-deep-modules/SKILL.md +0 -102
  1241. package/template/.trae/skills/setup-ts-deep-modules/agents/openai.yaml +0 -5
  1242. package/template/.trae/skills/setup-ts-deep-modules/dependency-cruiser.config.cjs +0 -95
  1243. package/template/.trae/skills/teach/GLOSSARY-FORMAT.md +0 -35
  1244. package/template/.trae/skills/teach/LEARNING-RECORD-FORMAT.md +0 -46
  1245. package/template/.trae/skills/teach/MISSION-FORMAT.md +0 -31
  1246. package/template/.trae/skills/teach/RESOURCES-FORMAT.md +0 -32
  1247. package/template/.trae/skills/teach/SKILL.md +0 -140
  1248. package/template/.trae/skills/teach/agents/openai.yaml +0 -5
  1249. package/template/.trae/skills/writing-beats/SKILL.md +0 -67
  1250. package/template/.trae/skills/writing-beats/agents/openai.yaml +0 -5
  1251. package/template/.trae/skills/writing-fragments/SKILL.md +0 -79
  1252. package/template/.trae/skills/writing-fragments/agents/openai.yaml +0 -5
  1253. package/template/.trae/skills/writing-shape/SKILL.md +0 -79
  1254. package/template/.trae/skills/writing-shape/agents/openai.yaml +0 -5
  1255. package/template/.trae/skills/yss-microapp-commit/SKILL.md +0 -201
  1256. package/template/.trae/skills/yss-microapp-commit/agents/openai.yaml +0 -5
  1257. package/template/.trae/skills/yss-microapp-commit/references/scope-mapping.md +0 -204
  1258. package/template/.trae/skills/yss-page-module-development/SKILL.md +0 -165
  1259. package/template/.trae/skills/yss-page-module-development/agents/openai.yaml +0 -5
  1260. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/constant.ts +0 -32
  1261. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/hooks/useRuleConfig.ts +0 -158
  1262. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/index.vue +0 -188
  1263. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/schemas/ruleConfigSchema.ts +0 -256
  1264. package/template/.trae/skills/yss-page-module-development/examples/AdvancedFormPage/style.less +0 -76
  1265. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/constant.ts +0 -128
  1266. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useQualityRuleList.ts +0 -144
  1267. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/hooks/useRuleActions.ts +0 -141
  1268. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/index.vue +0 -175
  1269. package/template/.trae/skills/yss-page-module-development/examples/StandardListPage/style.less +0 -83
  1270. package/template/.trae/skills/yss-page-module-development/references/component-map.md +0 -34
  1271. package/template/.trae/skills/yss-page-module-development/references/frontend-docs.md +0 -11
  1272. package/template/.trae/skills/yss-page-module-development/references/hooks-map.md +0 -11
  1273. package/template/.trae/skills/yss-page-module-development/references/utils-map.md +0 -14
@@ -0,0 +1,259 @@
1
+ import { existsSync, lstatSync, readFileSync, mkdirSync, mkdtempSync, renameSync, rmSync, cpSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import { tmpdir } from 'node:os';
4
+ import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, archive, ROOT, sourceApprovalPolicy } from './strategic-handoff-io.mjs';
5
+ import { parseContextSource, parseContextContract, resolveContextTermRefs } from './context-contract.mjs';
6
+ import { countersignRuleForGate } from './digital-human-roles.mjs';
7
+ import { validateApprovalRecord } from './approval-record.mjs';
8
+ import { treeDigest } from './strategic-handoff-io.mjs';
9
+ import { validateVisualBaseline } from '../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs';
10
+ import { extractTraceability, compareIndexes } from './strategic-handoff-rules.mjs';
11
+ const MAX_BYTES = 512 * 1024 * 1024;
12
+ const own = (a,b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
13
+ const nonempty = x => typeof x === 'string' && x.trim();
14
+ const bytesDigest = (bytes, kind) => kind === 'canonical-json' ? digest(parse(bytes)) : kind === 'sha256-bytes' ? hash(bytes) : (() => { throw new TypeError(`未知摘要算法: ${kind}`); })();
15
+
16
+ async function sourceApproval(record, roles, root) {
17
+ const options={rolesDoc:roles,requireApproved:true,root,read:ref=>readFileSync(safe(root,path.relative(root,ref).split(path.sep).join('/')))};
18
+ if (roles.user_decision_policy.gates.includes(record.gate_id)) {
19
+ ensure(existsSync(path.join(ROOT,'scripts/lib/user-decision.mjs')), '接收工具不支持源用户决定策略,请升级工具后验包');
20
+ const { assertUserDecisionRequirement } = await import('./user-decision.mjs');
21
+ assertUserDecisionRequirement({boundary:record.gate_id,subject_ref:record.subject_ref,scope:record.approval_scope,user_decision_ref:record.user_decision_ref},options);
22
+ }
23
+ validateApprovalRecord(record,options);
24
+ }
25
+
26
+ function snapshot(snapshot, source) {
27
+ ensure(snapshot?.context_ref === 'CONTEXT.md' && snapshot.context_schema_version === 1, '源 context snapshot 合同无效');
28
+ const terms = resolveContextTermRefs(source, snapshot.term_refs);
29
+ ensure(snapshot.document_digest === source.document_digest && snapshot.referenced_terms_digest === terms.referenced_terms_digest, '源 CONTEXT snapshot 摘要过期');
30
+ }
31
+ function checkDelta(handoff, source) {
32
+ const used = new Set();
33
+ for (const op of ['added','updated','deprecated']) for (const term of handoff.context_delta[op]) {
34
+ ensure(!used.has(term.term_ref), '术语增量跨分类重复'); used.add(term.term_ref);
35
+ ensure(handoff.source_context_snapshot.term_refs.includes(term.term_ref), `源 snapshot 未引用增量术语: ${term.term_ref}`);
36
+ const actual = source.terms_by_ref.get(term.term_ref);
37
+ ensure(actual, `源术语不存在: ${term.term_ref}`);
38
+ for (const key of ['term','meaning','english_identifier','context_id','forbidden_aliases']) ensure(own(actual[key],term[key]), `源术语增量不一致: ${term.term_ref}.${key}`);
39
+ }
40
+ }
41
+ function localDependency(from, href) {
42
+ if (!href || /^(?:#|https?:|mailto:|data:)/i.test(href)) return null;
43
+ ensure(!/^[a-z][a-z0-9+.-]*:/i.test(href), `不支持的资源协议: ${href}`);
44
+ const clean = decodeURIComponent(href.split(/[?#]/)[0]);
45
+ ensure(!clean.startsWith('/'), `资源必须使用相对路径: ${href}`);
46
+ return relative(path.posix.normalize(path.posix.join(path.posix.dirname(from), clean)));
47
+ }
48
+ function documentLinks(ref, bytes) {
49
+ const text = String(bytes); const result = [];
50
+ if (/\.md$/i.test(ref)) for (const match of text.matchAll(/!?\[[^\]]*\]\(<?([^\s)>]+)>?(?:\s+[^)]*)?\)/g)) { const p=localDependency(ref,match[1]); if(p)result.push(p); }
51
+ return result;
52
+ }
53
+ function previewFiles(root, config) {
54
+ ensure(['H1','H2'].includes(config?.profile), 'package_export.prototype.profile 必须是 H1/H2');
55
+ const preview = safe(root, config.preview_root);
56
+ ensure(lstatSync(preview).isDirectory(), 'preview_root 必须为目录');
57
+ const entry = safe(root, config.entry_ref);
58
+ ensure(entry.startsWith(`${preview}${path.sep}`), '预览入口必须在 preview_root 内');
59
+ const included = files(root, config.preview_root);
60
+ // Structural closure plus an independently captured offline-browser receipt.
61
+ for (const ref of included.filter(x => /\.(html|css)$/i.test(x))) {
62
+ const text=readFileSync(safe(root,ref),'utf8');
63
+ const matches=[...text.matchAll(/(?:src|href)\s*=\s*["']([^"']+)["']/gi), ...text.matchAll(/url\(\s*["']?([^\s)'";]+)["']?\s*\)/gi)];
64
+ for (const match of matches) {
65
+ ensure(!/^(?:https?:)?\/\//i.test(match[1]), `离线预览包含远程资源: ${ref}`);
66
+ const dependency=localDependency(ref,match[1]); if(dependency)ensure(included.includes(dependency),`离线预览资源未打包: ${dependency}`);
67
+ }
68
+ }
69
+ if (config.profile === 'H2') {
70
+ safe(root,config.lock_ref); const source=safe(root,config.source_root);
71
+ ensure(lstatSync(source).isDirectory() && config.lock_ref.startsWith(`${config.source_root}/`), 'H2 缺少源码/锁文件');
72
+ ensure(!files(root,config.source_root).some(x => x.split('/').some(p => ['node_modules','.git'].includes(p))), 'H2 source_root 必须为不含依赖缓存的源码交付目录');
73
+ ensure(config.source_digest===treeDigest(root,config.source_root), 'H2 源码/锁文件批准摘要已过期');
74
+ }
75
+ ensure(config.verification_digest===hash(readFileSync(safe(root,config.verification_ref))), '离线验证记录批准摘要已过期');
76
+ const receipt=read(safe(root,config.verification_ref));
77
+ ensure(receipt.network_mode === 'offline' && receipt.exit_code === 0 && nonempty(receipt.command) && nonempty(receipt.executed_at) && Array.isArray(receipt.case_ids) && receipt.case_ids.length && Array.isArray(receipt.evidence_refs) && receipt.evidence_refs.length, '缺少实际离线浏览验证证据');
78
+ const tree=treeDigest(root,config.preview_root);
79
+ ensure(receipt.preview_digest===tree, '离线预览验证证据已过期');
80
+ for(const ref of receipt.evidence_refs)safe(root,ref);
81
+ return receipt;
82
+ }
83
+
84
+ export async function inspectSource(root, handoffRef) {
85
+ const handoff=read(safe(root,handoffRef));
86
+ schema(handoff,'docs/process/schemas/strategic-design-handoff.schema.json');
87
+ ensure(handoff.status==='approved', '交接包尚未批准');
88
+ const config=handoff.package_export;
89
+ schema(config,'docs/process/schemas/strategic-handoff-export.schema.json');
90
+ const source=parseContextSource(readFileSync(safe(root,'CONTEXT.md'),'utf8'));
91
+ snapshot(handoff.source_context_snapshot,source); checkDelta(handoff,source);
92
+ const strategy=read(safe(root,handoff.source.domain_strategy_ref.persisted_ref));
93
+ const stage=read(safe(root,handoff.source.stage_decision_package_ref.persisted_ref));
94
+ schema(strategy,'docs/process/schemas/strategic-handoff-domain-strategy.schema.json');
95
+ schema(stage,'docs/process/schemas/strategic-handoff-stage-decision-package.schema.json');
96
+ snapshot(strategy.context_snapshot,source); snapshot(stage.context_snapshot,source);
97
+ ensure(strategy.status==='approved' && stage.status==='approved', '战略合同/方案决策包尚未批准');
98
+ ensure(strategy.domain_strategy_id===handoff.source.domain_strategy_ref.id && strategy.domain_version===handoff.source.domain_strategy_ref.version, '战略身份/版本不一致');
99
+ ensure(stage.stage_decision_id===handoff.source.stage_decision_package_ref.id && stage.package_version===handoff.source.stage_decision_package_ref.version, '阶段包身份/版本不一致');
100
+ ensure(stage.domain_strategy_ref.domain_strategy_id===strategy.domain_strategy_id && stage.domain_strategy_ref.domain_version===strategy.domain_version && stage.domain_strategy_ref.status==='approved' && stage.domain_strategy_ref.persisted_ref===handoff.source.domain_strategy_ref.persisted_ref && stage.domain_strategy_ref.digest===digest(strategy), '阶段包引用的战略内容不一致');
101
+ ensure(!(stage.unresolved_items || []).some(x=>x.type==='blocker'), '阶段包含 blocker');
102
+ const indexes=extractTraceability(strategy);
103
+ const sourceRoles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
104
+ const roles=sourceApprovalPolicy(sourceRoles);
105
+ for (const [artifact, version] of [[strategy,strategy.domain_version],[stage,stage.package_version]]) {
106
+ if(artifact.approval) { const record=read(safe(root,artifact.approval.approval_ref));await sourceApproval(record,roles,root);ensure(artifact.approval.current_version===version,'资产内置批准版本过期'); }
107
+ }
108
+ const terminalGate=countersignRuleForGate(roles.gate_policy,'gate.strategic-design-handoff-approved')?'gate.strategic-design-handoff-approved':'gate.stage-decision-package-approved';
109
+ const expectedGates={domain_strategy_ref:'gate.domain-strategy-approved',stage_decision_package_ref:'gate.stage-decision-package-approved',spec_ref:'gate.spec-baseline-approved',prototype_ref:'gate.user-confirmation',visual_baseline_ref:'gate.user-confirmation',business_ticket_set_ref:terminalGate,handoff:terminalGate};
110
+ const bindings={...handoff.source,handoff:{id:handoff.handoff_id,version:handoff.handoff_version,persisted_ref:handoffRef,status:'approved'}};
111
+ for(const [key,ref] of Object.entries(bindings)) {
112
+ const approval=config.approvals[key];
113
+ ensure(approval,`缺少资产批准绑定: ${key}`);
114
+ ensure(approval.gate_id===expectedGates[key],`资产使用错误批准门禁: ${key}`);
115
+ const bytes=key==='visual_baseline_ref'?null:readFileSync(safe(root,ref.persisted_ref));
116
+ let actual;
117
+ if(key==='visual_baseline_ref') {
118
+ const baseline=read(safe(root,`${ref.persisted_ref}/${ref.manifest_ref}`));
119
+ const result=await validateVisualBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)});
120
+ ensure(!result.errors.length,`视觉基线无效: ${result.errors.join('; ')}`);
121
+ ensure(baseline.baseline_id===ref.baseline_id && baseline.version===ref.version && own([...ref.case_ids].sort(),baseline.cases.map(x=>x.case_id).sort()),'视觉基线身份不一致');
122
+ actual=baseline.bundle.digest;
123
+ } else actual=bytesDigest(bytes,approval.digest_kind);
124
+ if(key!=='handoff')ensure(ref.digest===actual,`源资产摘要过期: ${key}`);
125
+ const record=read(safe(root,approval.record_ref));
126
+ await sourceApproval(record,roles,root);
127
+ ensure(record.gate_id===approval.gate_id,`批准门禁不匹配: ${key}`);
128
+ ensure((record.artifact_bindings || []).some(x=>x.id===(ref.id||ref.baseline_id) && x.version===ref.version && x.digest===actual),`批准记录未绑定当前资产: ${key}`);
129
+ }
130
+ const receipt=previewFiles(root,config.prototype);
131
+ ensure(handoff.source.visual_baseline_ref.case_ids.every(id=>receipt.case_ids.includes(id)), '离线验证未覆盖视觉基线 case');
132
+ return {handoff,config,indexes,strategy,stage};
133
+ }
134
+
135
+ function collect(root, handoffRef, handoff, config) {
136
+ const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files,config.prototype.preview_root,config.prototype.verification_ref];
137
+ if(config.prototype.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
138
+ const symbolic=config.reference_map || {};
139
+ const enqueue=ref=> { if(symbolic[ref])queue.push(symbolic[ref]); else if(/^https?:\/\//i.test(ref))return; else if(ref.startsWith('evidence.'))throw new TypeError(`未解析 evidence ID: ${ref}`); else if(ref.includes('/') || /\.(?:md|yaml|json|html|png|txt|log)$/.test(ref))queue.push(ref); };
140
+ function refs(value,key='') {
141
+ if(Array.isArray(value)) { if(key==='evidence_refs') value.forEach(enqueue); else value.forEach(v=>refs(v,key)); }
142
+ else if(value && typeof value==='object') for(const [k,v]of Object.entries(value)) { if(['approval_ref','persisted_ref','user_decision_ref'].includes(k)&&typeof v==='string')enqueue(v); else if(k==='ref'&&typeof v==='string'&&!/^[a-z]+:\/\//i.test(v))enqueue(v); else refs(v,k); }
143
+ }
144
+ while(queue.length) {
145
+ const ref=symbolic[queue[0]]||queue[0]; queue.shift(); if(/^https?:\/\//i.test(ref))continue; relative(ref);
146
+ if(collected.has(ref))continue;
147
+ const full=safe(root,ref),stat=lstatSync(full);
148
+ if(stat.isDirectory()) { queue.push(...files(root,ref)); continue; }
149
+ ensure(stat.isFile() && stat.size<=MAX_BYTES,`源文件类型/大小无效: ${ref}`);
150
+ const bytes=readFileSync(full); collected.set(ref,bytes);
151
+ ensure(collected.size<=20000 && [...collected.values()].reduce((n,b)=>n+b.length,0)<=MAX_BYTES,'交接包大小超限');
152
+ if(/\.(yaml|yml|json)$/.test(ref))refs(parse(bytes));
153
+ queue.push(...documentLinks(ref,bytes));
154
+ }
155
+ return collected;
156
+ }
157
+ function materialize(bundleRoot, manifest, destination) {
158
+ for(const file of manifest.files.filter(x=>x.original_ref))write(destination,file.original_ref,readFileSync(safe(bundleRoot,file.path)));
159
+ }
160
+ export async function openBundle(input, action) {
161
+ const temp=mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
162
+ try {
163
+ ensure(existsSync(input) && !lstatSync(input).isSymbolicLink(),'交接包不存在或是 symlink');
164
+ let root=path.resolve(input);
165
+ if(lstatSync(root).isFile()){ root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
166
+ const manifest=read(safe(root,'manifest.json'));
167
+ schema(manifest,'docs/process/schemas/strategic-handoff-package.schema.json');
168
+ const {bundle_digest,...body}=manifest;ensure(bundle_digest===digest(body),'包清单摘要不一致');
169
+ const paths=manifest.files.map(x=>x.path);
170
+ ensure(new Set(paths.map(x=>x.toLowerCase())).size===paths.length,'包文件路径重复');
171
+ ensure(own([...paths,'manifest.json'].sort(),files(root).sort()),'包文件缺失或存在未登记文件');
172
+ ensure(manifest.files.length<=20000 && manifest.files.reduce((n,f)=>n+f.size_bytes,0)<=MAX_BYTES,'包大小超限');
173
+ for(const file of manifest.files){const bytes=readFileSync(safe(root,file.path));ensure(bytes.length===file.size_bytes && hash(bytes)===file.sha256,`文件摘要不一致: ${file.path}`);if(file.original_ref)relative(file.original_ref);}
174
+ const originals=manifest.files.filter(x=>x.original_ref).map(x=>x.original_ref);
175
+ ensure(new Set(originals.map(x=>x.toLowerCase())).size===originals.length,'源路径重复');
176
+ const source=path.join(temp,'source');mkdirSync(source);materialize(root,manifest,source);
177
+ const inspected=await inspectSource(source,manifest.handoff_ref);
178
+ ensure(manifest.bundle_id===inspected.handoff.handoff_id && manifest.version===inspected.handoff.handoff_version,'包身份与源交接不一致');
179
+ ensure(own(read(safe(root,'indexes/rules.json')),inspected.indexes.rules) && own(read(safe(root,'indexes/scenarios.json')),inspected.indexes.scenarios),'规则/场景索引与源资产不一致');
180
+ const expected=collect(source,manifest.handoff_ref,inspected.handoff,inspected.config);
181
+ ensure(own([...expected.keys()].sort(),originals.sort()),'源快照闭包不一致');
182
+ const changes=read(safe(root,'indexes/changes.json'));
183
+ ensure(own(changes.previous_bundle,manifest.previous_bundle), '版本差异的前版绑定不一致');
184
+ let previousIndexes;
185
+ if(manifest.previous_bundle){
186
+ const previous=read(safe(root,'indexes/previous-manifest.json'));const{bundle_digest:previousDigest,...previousBody}=previous;
187
+ ensure(previousDigest===digest(previousBody)&&previousDigest===manifest.previous_bundle.digest&&previous.bundle_id===manifest.bundle_id&&previous.version===manifest.previous_bundle.version&&Number(previous.version.slice(1))<Number(manifest.version.slice(1)),'前版清单绑定无效');
188
+ previousIndexes={};
189
+ for(const kind of ['rules','scenarios']){const bytes=readFileSync(safe(root,`indexes/previous-${kind}.json`));const priorFile=previous.files.find(x=>x.path===`indexes/${kind}.json`);ensure(priorFile&&priorFile.sha256===hash(bytes)&&priorFile.size_bytes===bytes.length,'前版索引摘要无效');previousIndexes[kind]=parse(bytes);}
190
+ }
191
+ ensure(own(changes,{previous_bundle:manifest.previous_bundle,...compareIndexes(inspected.indexes,previousIndexes)}),'版本差异与实际索引不一致');
192
+ return await action({root,manifest,...inspected,changes});
193
+ } finally {rmSync(temp,{recursive:true,force:true});}
194
+ }
195
+ export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previous}) {
196
+ const root=project(sourceRoot); parseContextContract({root}); relative(handoffRef);
197
+ const current=await inspectSource(root,handoffRef);
198
+ let prior=null;
199
+ if(previous)prior=await openBundle(previous, b=>({manifest:b.manifest,indexes:b.indexes,handoff:b.handoff,rulesBytes:readFileSync(safe(b.root,'indexes/rules.json')),scenariosBytes:readFileSync(safe(b.root,'indexes/scenarios.json'))}));
200
+ if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
201
+ const previousBundle=prior?{bundle_id:prior.manifest.bundle_id,version:prior.manifest.version,digest:prior.manifest.bundle_digest}:null;
202
+ const snapshotFiles=collect(root,handoffRef,current.handoff,current.config);
203
+ const target=path.resolve(output);
204
+ ensure(!existsSync(target) && (!zip||!existsSync(`${target}.zip`)),'输出已存在,禁止覆盖');
205
+ ensure(target!==root && !root.startsWith(`${target}${path.sep}`),'输出不能覆盖源仓');
206
+ mkdirSync(path.dirname(target),{recursive:true});
207
+ ensure(path.resolve(path.dirname(target))===path.dirname(target),'输出路径无效');
208
+ const staging=mkdtempSync(path.join(path.dirname(target),'.handoff-staging-'));
209
+ try {
210
+ const entries=[];
211
+ const put=(ref,bytes,original)=>{write(staging,ref,bytes);entries.push({path:ref,sha256:hash(bytes),size_bytes:bytes.length,...(original?{original_ref:original}:{})});};
212
+ for(const [ref,bytes]of [...snapshotFiles].sort(([a],[b])=>a.localeCompare(b))) {
213
+ const dest=ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
214
+ ensure(!dest.endsWith('/CONTEXT.md'),'只允许源根词汇快照,禁止嵌套 CONTEXT.md');put(dest,bytes,ref);
215
+ }
216
+ put('indexes/rules.json',Buffer.from(json(current.indexes.rules)));
217
+ put('indexes/scenarios.json',Buffer.from(json(current.indexes.scenarios)));
218
+ put('indexes/changes.json',Buffer.from(json({previous_bundle:previousBundle,...compareIndexes(current.indexes,prior?.indexes)})));
219
+ if(prior){put('indexes/previous-manifest.json',Buffer.from(json(prior.manifest)));put('indexes/previous-rules.json',prior.rulesBytes);put('indexes/previous-scenarios.json',prior.scenariosBytes);}
220
+ const body={schema_version:1,bundle_id:current.handoff.handoff_id,version:current.handoff.handoff_version,handoff_ref:handoffRef,previous_bundle:previousBundle,files:entries.sort((a,b)=>a.path.localeCompare(b.path))};
221
+ const manifest={...body,bundle_digest:digest(body)};write(staging,'manifest.json',json(manifest));
222
+ await openBundle(staging,()=>null);
223
+ // Recheck every captured source byte before publishing the immutable directory.
224
+ for(const [ref,bytes]of snapshotFiles)ensure(hash(readFileSync(safe(root,ref)))===hash(bytes),`导出期间源文件变化: ${ref}`);
225
+ if(zip)archive('pack',staging,`${staging}.zip`);
226
+ ensure(!existsSync(target),'输出并发冲突');renameSync(staging,target);
227
+ if(zip)renameSync(`${staging}.zip`,`${target}.zip`);
228
+ return {result:'exported',bundle_id:manifest.bundle_id,version:manifest.version,bundle_digest:manifest.bundle_digest,output:target,...(zip?{zip:`${target}.zip`,zip_sha256:hash(readFileSync(`${target}.zip`))}:{})};
229
+ } finally {rmSync(staging,{recursive:true,force:true});rmSync(`${staging}.zip`,{force:true});}
230
+ }
231
+ export async function importBundle({bundle,targetRoot}) {
232
+ const target=project(targetRoot);const context=parseContextContract({root:target});
233
+ return openBundle(bundle,async b=>{
234
+ const rel=`docs/handoffs/${b.manifest.bundle_id}/${b.manifest.version}`,dest=safe(target,rel,{missing:true});
235
+ if(existsSync(dest)) {
236
+ const receipt=read(safe(dest,'import-receipt.json'));
237
+ ensure(receipt.bundle_digest===b.manifest.bundle_digest,'同 ID/version 内容冲突');
238
+ await openBundle(safe(dest,'package'),()=>null);
239
+ return {result:'already-imported',receipt_ref:`${rel}/import-receipt.json`};
240
+ }
241
+ const terms=[];
242
+ for(const operation of ['added','updated','deprecated'])for(const expected of b.handoff.context_delta[operation]) {
243
+ const actual=context.terms_by_ref.get(expected.term_ref);
244
+ const equal=actual&&['term','meaning','english_identifier','context_id','forbidden_aliases'].every(key=>own(expected[key],actual[key]));
245
+ terms.push({operation,term_ref:expected.term_ref,expected,current:actual||null,status:operation==='deprecated'?(actual?'pending':'matched'):(equal?'matched':actual?'conflict':'pending')});
246
+ }
247
+ const rows=[...b.indexes.rules.map(x=>({source_id:x.rule_id,source_digest:x.source_digest,kind:'rule'})),...b.indexes.scenarios.filter(x=>x.critical).map(x=>({source_id:x.scenario_id,source_digest:x.source_digest,kind:'scenario'}))].map(x=>({...x,disposition:'pending',tactical_refs:[],test_seam_refs:[],evidence_refs:[],dependent_slice_refs:[],dependency_status:'unknown'}));
248
+ mkdirSync(path.dirname(dest),{recursive:true});const stage=mkdtempSync(path.join(path.dirname(dest),'.import-staging-'));
249
+ try {
250
+ cpSync(b.root,path.join(stage,'package'),{recursive:true,errorOnExist:true,force:false});
251
+ const receipt={schema_version:1,bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,package_ref:`${rel}/package`,target_context_digest:context.document_digest,status:'pending-context-reconciliation'};
252
+ write(stage,'import-receipt.json',json(receipt));write(stage,'context-reconciliation-draft.json',json({schema_version:1,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,target_context_digest:context.document_digest,terms}));
253
+ write(stage,'tactical-traceability-draft.json',json({schema_version:1,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows}));
254
+ write(stage,'upstream-change-impact.json',json({schema_version:1,previous_bundle:b.manifest.previous_bundle,changed_source_ids:[...b.changes.updated,...b.changes.removed],added_source_ids:b.changes.added,status:'requires-lifecycle-reconciliation',policy:'mark-dependent-tactical-and-slice-contracts-stale; unknown-dependency-blocks-all'}));
255
+ ensure(!existsSync(dest),'导入并发冲突');renameSync(stage,dest);
256
+ return {result:'imported-pending-reconciliation',receipt_ref:`${rel}/import-receipt.json`,traceability_ref:`${rel}/tactical-traceability-draft.json`};
257
+ }finally{rmSync(stage,{recursive:true,force:true});}
258
+ });
259
+ }
@@ -4,6 +4,7 @@ import { parseDocument } from "../vendor/yaml.mjs";
4
4
  import { loadDigitalHumanRoles, taskPackageDefaults } from "./digital-human-roles.mjs";
5
5
  import { loadRegistry, ROOT } from "./lifecycle-registry.mjs";
6
6
  import { loadMaintenanceCheckpoint, validateMaintenanceCheckpoint } from "./maintenance-intensity.mjs";
7
+ import { assertImplementationDecision } from "./user-decision.mjs";
7
8
  import { validateNextRoute } from "./lifecycle-transition.mjs";
8
9
  import { LEGACY_TASK_PACKAGE_SCHEMA, TASK_PACKAGE_SCHEMA, validateTaskPackageSchema } from "./task-package-schema.mjs";
9
10
 
@@ -79,12 +80,18 @@ function validateCommon(value, registry, lifecycle) {
79
80
  if (completed) {
80
81
  if (!value.result || value.result.result !== "completed") fail("resolved/完成任务必须返回 result=completed 的 Workflow Execution Result");
81
82
  if (value.workflow_status !== "resolved") fail("result=completed 的任务包必须处于 resolved 状态");
82
- for (const field of ["result_schema", "work_unit", "workflow_reference", "skill", "changed_files", "evidence_refs", "deferred_seams", "drift", "violation", "new_impacts", "stale_candidates", "next_route", "blocking_signals"]) {
83
+ for (const field of ["result_schema", "work_unit", "workflow_reference", "skill", "changed_files", "context_reconciliation", "evidence_refs", "deferred_seams", "drift", "violation", "new_impacts", "stale_candidates", "next_route", "blocking_signals"]) {
83
84
  if (value.result[field] === undefined) fail(`result=completed 时 ${field} 不能为空`);
84
85
  }
85
86
  if (value.result.result_schema !== "workflow-execution-result-v1") fail("result_schema 必须为 workflow-execution-result-v1");
86
87
  if (value.result.work_unit !== value.work_unit_id) fail("Workflow Execution Result.work_unit 必须与任务包 work_unit_id 一致");
87
- const routeResult = validateNextRoute(value.result.work_unit, value.result.next_route);
88
+ const reconciliation = value.result.context_reconciliation;
89
+ const expectedReconciliationStatus = value.contract.kind === "template-maintenance" ? "not-applicable" : "reconciled";
90
+ if (reconciliation?.status !== expectedReconciliationStatus) fail(`result=completed 时 context_reconciliation.status 必须为 ${expectedReconciliationStatus}`);
91
+ assertReadableEvidenceRef(reconciliation.ref, "context_reconciliation.ref");
92
+ if (!value.result.evidence_refs.includes(reconciliation.ref)) fail("context_reconciliation.ref 必须包含在 result.evidence_refs 中");
93
+ if (expectedReconciliationStatus === "not-applicable" && !reconciliation.reason) fail("template-maintenance 的 context_reconciliation 必须说明 reason");
94
+ const routeResult = validateNextRoute(value.result.work_unit, value.result.next_route, value.result);
88
95
  if (routeResult.result !== "allowed") fail(`Workflow Execution Result next_route 非法: ${routeResult.blocking_signals.join(", ")}`);
89
96
  value.expected_evidence_files.forEach((ref) => assertReadableEvidenceRef(ref, "expected_evidence_files"));
90
97
  if (value.verification_results.length === 0) fail("已完成任务必须包含 verification_results");
@@ -169,6 +176,7 @@ function validateContract(value, registry, lifecycle) {
169
176
  for (const field of ["role_id", "runtime_id", "task_package_ref", "contract_id", "contract_version", "allowed_write_paths"]) if (sliceUnit[field] === undefined) fail(`Slice Contract work_unit 缺少 ${field}`);
170
177
  if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version || sliceUnit.task_package_ref !== value.work_unit_id) fail("任务包与 Slice Contract work_unit 不一致");
171
178
  for (const allowed of value.allowed_write_paths) if (!sliceUnit.allowed_write_paths.includes(allowed)) fail(`allowed_write_paths 未获 Slice Contract 授权: ${allowed}`);
179
+ if (value.execution_state === "Worker") assertImplementationDecision({ slice_contract_ref: contract.slice_contract_ref, vertical_slice_ticket_ref: slice.lifecycle_refs.ticket, user_decisions: value.user_decisions });
172
180
  }
173
181
 
174
182
  export function validateTaskPackage(value, { rolesDoc, lifecycleDoc } = {}) {
@@ -0,0 +1,210 @@
1
+ import { createHash } from "node:crypto";
2
+ import { readFileSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { parseDocument } from "../vendor/yaml.mjs";
5
+ import { ROOT } from "./lifecycle-registry.mjs";
6
+ import { loadDigitalHumanRoles } from "./digital-human-roles.mjs";
7
+ import { validateJsonSchema } from "./json-schema.mjs";
8
+
9
+ export function decisionError(code, detail) {
10
+ const error = new TypeError(`${code}: ${detail}`);
11
+ error.code = code;
12
+ throw error;
13
+ }
14
+ const requireText = (value, label) => {
15
+ if (typeof value !== "string" || !value.trim()) decisionError("user-decision-missing", label);
16
+ };
17
+ const canonical = (value) => Array.isArray(value) ? value.map(canonical) : value && typeof value === "object"
18
+ ? Object.fromEntries(Object.keys(value).sort().map((key) => [key, canonical(value[key])])) : value;
19
+ export const decisionDigest = (value) => `sha256:${createHash("sha256").update(typeof value === "string" || Buffer.isBuffer(value) ? value : JSON.stringify(canonical(value))).digest("hex")}`;
20
+ export function requestDigest(request) {
21
+ const { presented_source, ...snapshot } = request;
22
+ return decisionDigest(snapshot);
23
+ }
24
+ export function decisionIO({ root = ROOT, read = (ref) => readFileSync(ref), ...rest } = {}) {
25
+ const resolve = (ref) => /^(?:https?:|\w+:\/\/)/.test(ref) ? ref : path.resolve(root, ref);
26
+ const bytes = (ref) => {
27
+ requireText(ref, "可读引用");
28
+ try { return read(resolve(ref)); } catch { decisionError("user-decision-source-unreadable", ref); }
29
+ };
30
+ const document = (ref) => {
31
+ const doc = parseDocument(String(bytes(ref)), { maxAliasCount: 0, uniqueKeys: true });
32
+ if (doc.errors.length || !doc.toJS()) decisionError("user-decision-source-invalid", ref);
33
+ return doc.toJS({ maxAliasCount: 0 });
34
+ };
35
+ return { root, bytes, document, ...rest };
36
+ }
37
+
38
+ // A capture preserves original author/time/text/reference. It is evidence, not an identity signature.
39
+ function messageFromSource(source, io, policy) {
40
+ if (!source || !policy.source_kinds.includes(source.kind)) decisionError("user-decision-source-invalid", "需要原始消息、会话导出或用户确认文件");
41
+ const raw = io.bytes(source.ref);
42
+ if (decisionDigest(raw) !== source.digest) decisionError("user-decision-source-changed", source.ref);
43
+ const parsed = parseDocument(String(raw), { maxAliasCount: 0, uniqueKeys: true });
44
+ if (parsed.errors.length) decisionError("user-decision-source-invalid", source.ref);
45
+ const capture = parsed.toJS({ maxAliasCount: 0 });
46
+ if (capture?.source_kind !== source.kind || !Array.isArray(capture.messages)) decisionError("user-decision-source-invalid", "来源不是原始消息封装");
47
+ const matches = capture.messages.filter((message) => message.id === source.message_id);
48
+ if (matches.length !== 1) decisionError("user-decision-source-invalid", "消息 ID 缺失或重复");
49
+ const message = matches[0];
50
+ for (const field of ["principal_ref", "original_ref", "sent_at", "text"]) requireText(message[field], `原始消息 ${field}`);
51
+ if (!Number.isFinite(Date.parse(message.sent_at))) decisionError("user-decision-source-invalid", "原始消息时间无效");
52
+ return { ...message, _preceding_message: capture.messages[capture.messages.indexOf(message) - 1] };
53
+ }
54
+
55
+ export function renderDecisionRequest(request) {
56
+ return [
57
+ `决定请求 ${request.id} (${requestDigest(request)})`,
58
+ `提问者:${request.requester_ref}`,
59
+ ...request.items.flatMap((item) => [
60
+ `事项 ${item.id} / ${item.boundary}:${item.title}`,
61
+ `资产:${item.subject.ref};版本:${item.subject.version};摘要:${item.subject.digest}`,
62
+ `依据:${item.basis.map((asset) => `${asset.ref}@${asset.version} (${asset.digest})`).join(";") || "无额外依据"}`,
63
+ `关键变化:${item.changes}`,
64
+ `范围:${item.scope.join(";")}`,
65
+ `风险:${item.risks.join(";") || "已评估,无已知残余风险"}`,
66
+ `推荐方案:${item.recommendation}`,
67
+ `批准后动作:${item.next_actions.join(";")}`,
68
+ `回复负责人:${item.responder_ref}`,
69
+ ]),
70
+ "请明确批准、拒绝或提出修改;多事项回复须说明事项,或明确批准以上全部事项。",
71
+ ].join("\n");
72
+ }
73
+
74
+ function checkAsset(asset, io) {
75
+ if (decisionDigest(io.bytes(asset.ref)) !== asset.digest) decisionError("user-decision-stale", asset.ref);
76
+ }
77
+
78
+ export function validateUserDecision(record, options = {}) {
79
+ const io = decisionIO(options);
80
+ const policy = (options.rolesDoc || loadDigitalHumanRoles()).user_decision_policy;
81
+ validateJsonSchema(record, path.join(ROOT, "docs/process/schemas/user-decision.schema.json"), { label: "用户决定记录" });
82
+ const { request, responses } = record;
83
+ const originalRequest = messageFromSource(request.requester_source, io, policy);
84
+ if (originalRequest.actor_kind !== "biological-human" || originalRequest.principal_ref !== request.requester_ref) decisionError("user-decision-responder-mismatch", "提问者来源不匹配");
85
+ const presentation = messageFromSource(request.presented_source, io, policy);
86
+ const presentedFields = request.items.flatMap((item) => [item.title, item.subject.ref, item.subject.version, item.changes, item.recommendation, ...item.scope, ...item.risks, ...item.next_actions, ...item.basis.flatMap((asset) => [asset.ref, asset.version])]);
87
+ // Preserve equivalent historical presentations without requiring a new templated message.
88
+ if (presentation.text !== renderDecisionRequest(request) && !presentedFields.every((field) => presentation.text.includes(field))) decisionError("user-decision-presentation-mismatch", "原始展示未覆盖当前资产、版本、变化、风险、范围和后续动作");
89
+ if (Date.parse(presentation.sent_at) < Date.parse(originalRequest.sent_at)) decisionError("user-decision-source-invalid", "展示时间早于用户请求");
90
+ const items = new Map();
91
+ for (const item of request.items) {
92
+ if (items.has(item.id)) decisionError("user-decision-ambiguous", "事项 ID 重复");
93
+ items.set(item.id, item);
94
+ if (item.responder_ref !== request.requester_ref) {
95
+ const delegated = messageFromSource(item.delegation_source, io, policy);
96
+ if (delegated.actor_kind !== "biological-human" || delegated.principal_ref !== request.requester_ref || !delegated.text.includes(item.responder_ref) || !delegated.text.includes(item.id)) decisionError("user-decision-delegation-invalid", "负责人须有提问者指向该事项的指定原文");
97
+ if (Date.parse(delegated.sent_at) > Date.parse(presentation.sent_at)) decisionError("user-decision-delegation-invalid", "须先指定负责人再展示当前请求");
98
+ }
99
+ }
100
+ const outcomes = new Map();
101
+ const messageIds = new Set();
102
+ let previousTime = -Infinity;
103
+ for (const response of responses) {
104
+ const source = messageFromSource(response.source, io, policy);
105
+ const identity = `${response.source.ref}#${response.source.message_id}`;
106
+ if (messageIds.has(identity)) decisionError("user-decision-ambiguous", "回复消息重复");
107
+ messageIds.add(identity);
108
+ if (source.reply_to !== presentation.original_ref && source.request_digest !== requestDigest(request) && !(source._preceding_message?.original_ref === presentation.original_ref && source._preceding_message?.text === presentation.text)) decisionError("user-decision-subject-mismatch", "原始回复没有指向当前请求的来源关联");
109
+ if (source.actor_kind !== "biological-human" || source.principal_ref !== response.principal_ref || source.sent_at !== response.responded_at || source.text !== response.text) decisionError("user-decision-responder-mismatch", "记录与原始回复身份、时间或原文不一致");
110
+ if (response.request_digest !== requestDigest(request)) decisionError("user-decision-stale", "回复绑定的请求快照已变化");
111
+ const time = Date.parse(response.responded_at);
112
+ if (time < Date.parse(presentation.sent_at) || time < previousTime) decisionError("user-decision-source-invalid", "回复须在展示之后并按原始时间排序");
113
+ previousTime = time;
114
+ if (response.decision === "approved") {
115
+ const explicit = source.decision === "approved" && Array.isArray(source.item_ids) && response.item_ids.every((id) => source.item_ids.includes(id));
116
+ if (!explicit && (!/(同意|批准|确认|接受|可以|好的|^好[。!!\s]*$|\b(?:approve|approved|agree|agreed|accept|yes|ok)\b)/i.test(source.text) || /(不同意|不批准|拒绝|反对|不要|需[要]?修改|请修改|暂不|reject|decline|do not approve|don't approve|disagree)/i.test(source.text))) decisionError("user-decision-ambiguous", "原文不能明确支持批准结论");
117
+ if (!explicit && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "批量批准原文必须明确全部事项");
118
+ if (!explicit && response.selection === "explicit-items" && items.size > 1 && response.item_ids.some((id) => !source.text.includes(id) && !source.text.includes(items.get(id)?.title))) decisionError("user-decision-ambiguous", "原文未指向所选事项");
119
+ }
120
+ if (response.selection === "single" && items.size !== 1) decisionError("user-decision-ambiguous", "多事项不能用单项回复");
121
+ if (items.size > 1 && /^(继续|continue|go ahead)[。.!!\s]*$/i.test(response.text.trim())) decisionError("user-decision-ambiguous", "继续不能解释为批准全部事项");
122
+ if (response.selection === "explicit-all" && (response.item_ids.length !== items.size || [...items.keys()].some((id) => !response.item_ids.includes(id)))) decisionError("user-decision-ambiguous", "全部批准必须枚举全部事项");
123
+ for (const id of response.item_ids) {
124
+ const item = items.get(id);
125
+ if (!item) decisionError("user-decision-subject-mismatch", id);
126
+ if (item.responder_ref !== response.principal_ref) decisionError("user-decision-responder-mismatch", id);
127
+ if (response.decision === "approved" && (response.approved_scope.length === 0 || response.approved_scope.some((scope) => !response.item_ids.some((selected) => items.get(selected)?.scope.includes(scope))))) decisionError("user-decision-scope-mismatch", id);
128
+ const previous = outcomes.get(id);
129
+ if (response.decision === "approved" && previous?.decision === "approved") {
130
+ outcomes.set(id, { ...response, approved_scope: [...new Set([...previous.approved_scope, ...response.approved_scope])] });
131
+ } else outcomes.set(id, response);
132
+ }
133
+ }
134
+ const validated = [];
135
+ for (const expected of options.expected || []) {
136
+ requireText(expected.boundary, "当前决定边界");
137
+ requireText(expected.subject_ref, "当前资产引用");
138
+ if (!Array.isArray(expected.scope) || expected.scope.length === 0) decisionError("user-decision-scope-mismatch", "当前批准范围缺失");
139
+ const matches = request.items.filter((item) => item.boundary === expected.boundary && item.subject.ref === expected.subject_ref && expected.scope.every((scope) => item.scope.includes(scope)));
140
+ if (matches.length !== 1) decisionError("user-decision-subject-mismatch", expected.boundary);
141
+ const item = matches[0];
142
+ checkAsset(item.subject, io);
143
+ item.basis.forEach((asset) => checkAsset(asset, io));
144
+ const answer = outcomes.get(item.id);
145
+ if (!answer) decisionError("user-decision-response-required", item.id);
146
+ if (answer.decision !== "approved") decisionError("user-decision-not-approved", `${item.id}: ${answer.decision}`);
147
+ if (!expected.scope.every((scope) => answer.approved_scope.includes(scope))) decisionError("user-decision-scope-mismatch", item.id);
148
+ validated.push({ item_id: item.id, boundary: expected.boundary, principal_ref: answer.principal_ref, scope: expected.scope });
149
+ }
150
+ return { request_id: request.id, validated, outcomes: Object.fromEntries([...outcomes].map(([id, answer]) => [id, answer.decision])) };
151
+ }
152
+
153
+ export function verifyUserDecisionFile(ref, options = {}) {
154
+ const io = decisionIO(options);
155
+ requireText(ref, "user_decision_ref");
156
+ return validateUserDecision(io.document(ref), options);
157
+ }
158
+
159
+ export function assertUserDecisionRequirement(requirement, options = {}) {
160
+ if (!requirement) decisionError("user-decision-response-required", "缺少当前决定及其范围");
161
+ return verifyUserDecisionFile(requirement.user_decision_ref, { ...options, expected: [requirement] });
162
+ }
163
+
164
+ export function assertWorkUnitUserDecision(workUnit, state, options = {}) {
165
+ const policy = (options.rolesDoc || loadDigitalHumanRoles()).user_decision_policy;
166
+ const boundaries = [...(policy.work_unit_gates?.[workUnit] || []), ...(policy.work_units[workUnit] ? [policy.work_units[workUnit]] : [])];
167
+ for (const boundary of boundaries) {
168
+ const notApplicable = state?.user_decision_not_applicable?.find((item) => item.boundary === boundary);
169
+ // Only existing conditional technical gates may be untriggered; an executed business decision cannot be skipped.
170
+ if (workUnit === "work-unit.technical-analysis" && notApplicable?.reason?.trim()) continue;
171
+ const requirement = state?.user_decisions?.find((item) => item.boundary === boundary);
172
+ if (!requirement) decisionError("user-decision-response-required", boundary);
173
+ assertUserDecisionRequirement(requirement, options);
174
+ }
175
+ }
176
+
177
+ export function assertImplementationDecision(state, options = {}) {
178
+ const requirement = state?.user_decisions?.find((item) => item.boundary === "implementation-scope");
179
+ const ticketRef = state?.vertical_slice_ticket_ref;
180
+ if (!requirement || !requirement.scope?.includes(ticketRef)) decisionError("user-decision-scope-mismatch", "实施范围必须包含当前切片");
181
+ assertUserDecisionRequirement(requirement, options);
182
+ const io = decisionIO(options);
183
+ const manifest = io.document(requirement.subject_ref);
184
+ const slices = manifest.slices?.filter((slice) => slice.ticket_ref === ticketRef);
185
+ if (manifest.kind !== "implementation-scope" || slices?.length !== 1) decisionError("user-decision-subject-mismatch", "实施范围清单未绑定当前切片");
186
+ const slice = slices[0];
187
+ requireText(state.slice_contract_ref, "当前持久化 Slice 合同引用");
188
+ if (state.slice_contract_ref !== slice.contract?.ref) decisionError("user-decision-subject-mismatch", "当前合同不在批准清单中");
189
+ checkAsset(slice.contract, io);
190
+ const content = io.document(slice.contract.ref);
191
+ const contract = content.slice_contract || content;
192
+ if (contract.lifecycle_refs?.ticket !== ticketRef) decisionError("user-decision-subject-mismatch", "持久化合同的切片引用不匹配");
193
+ for (const [manifestKey, contractKey] of [["repositories", "project_roots"], ["allowed_write_paths", "allowed_write_paths"]]) {
194
+ if (!Array.isArray(slice[manifestKey]) || slice[manifestKey].length === 0 || JSON.stringify([...slice[manifestKey]].sort()) !== JSON.stringify([...(contract.common?.[contractKey] || [])].sort())) decisionError("user-decision-scope-mismatch", manifestKey);
195
+ }
196
+ if (!Array.isArray(slice.baselines) || !slice.baselines.some((asset) => asset.ref === contract.lifecycle_refs?.engineering_baseline)) decisionError("user-decision-scope-mismatch", "工程基线缺失");
197
+ slice.baselines.forEach((asset) => checkAsset(asset, io));
198
+ }
199
+
200
+ export function scaffoldDecisionSnapshot(decision) {
201
+ const { user_confirmation, status, decision_inputs_digest, ...inputs } = decision;
202
+ return inputs;
203
+ }
204
+ export function assertScaffoldUserDecision(decision, options = {}) {
205
+ const confirmation = decision.user_confirmation || {};
206
+ const requirement = { boundary: "scaffold-choice", subject_ref: confirmation.decision_subject_ref, scope: [decision.project_id, decision.confirmed_architecture, decision.decision_inputs_digest], user_decision_ref: confirmation.user_decision_ref };
207
+ assertUserDecisionRequirement(requirement, options);
208
+ const io = decisionIO(options);
209
+ if (decisionDigest(io.document(requirement.subject_ref)) !== decisionDigest(scaffoldDecisionSnapshot(decision))) decisionError("user-decision-stale", "脚手架输入与用户所见快照不一致");
210
+ }
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import path from 'node:path';
4
+ import { exportBundle, openBundle, importBundle } from './lib/strategic-handoff.mjs';
5
+ try {
6
+ const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'}}});
7
+ const [command]=positionals;
8
+ let result;
9
+ if(command==='export'&&values['source-root']&&values.handoff&&values.output)result=await exportBundle({sourceRoot:values['source-root'],handoffRef:values.handoff,output:values.output,zip:values.zip,previous:values.previous});
10
+ else if(command==='verify'&&values.bundle)result=await openBundle(path.resolve(values.bundle),b=>({result:'verified',bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,rules:b.indexes.rules.length,scenarios:b.indexes.scenarios.length}));
11
+ else if(command==='import'&&values.bundle&&values['target-root'])result=await importBundle({bundle:path.resolve(values.bundle),targetRoot:values['target-root']});
12
+ else throw new TypeError('用法: strategic-handoff export --source-root <repo> --handoff <relative-file> --output <new-dir> [--zip] [--previous <bundle>] | verify --bundle <dir|zip> | import --bundle <dir|zip> --target-root <repo>');
13
+ process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
14
+ }catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message})}\n`);process.exitCode=1;}
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+ // Main-template-owned shared handoff implementation; never edits runtime skill projections.
3
+ import { readFileSync, writeFileSync, mkdirSync, existsSync, chmodSync, readdirSync } from 'node:fs';
4
+ import path from 'node:path';
5
+ import { inspectWorkingTreeScope } from './lib/repository-scope-policy.mjs';
6
+ const root=path.resolve(import.meta.dirname,'..');
7
+ const check=process.argv.includes('--check');
8
+ const targets=['submodules/yss-harness-design-agent','submodules/yss-harness-dev-agent'];
9
+ const shared=['scripts/strategic-handoff','scripts/verify-strategic-handoff-consumption','scripts/verify-strategic-handoff-package-scenarios','scripts/verify-strategic-context-import','scripts/verify-strategic-context-import-scenarios','scripts/lib/context-contract.mjs','docs/process/strategic-handoff-package.md','docs/process/schemas/strategic-design-handoff.schema.json',...readdirSync(path.join(root,'scripts/lib')).filter(x=>x.startsWith('strategic-handoff-')||x==='strategic-handoff.mjs').map(x=>`scripts/lib/${x}`),...readdirSync(path.join(root,'docs/process/schemas')).filter(x=>x.startsWith('strategic-handoff-')).map(x=>`docs/process/schemas/${x}`),...readdirSync(path.join(root,'scripts/fixtures/strategic-handoff')).map(x=>`scripts/fixtures/strategic-handoff/${x}`)];
10
+ let differences=[];
11
+ function sync(source,dest){const bytes=readFileSync(source);if(!existsSync(dest)||!bytes.equals(readFileSync(dest))){differences.push(path.relative(root,dest));if(!check){mkdirSync(path.dirname(dest),{recursive:true});writeFileSync(dest,bytes);}}if(!check&&path.basename(path.dirname(dest))==='scripts'&&!path.extname(dest))chmodSync(dest,0o755);}
12
+ for(const kind of ['domain-strategy','stage-decision-package'])sync(path.join(root,`.agents/skills/yss-stage-decision/references/${kind}.schema.json`),path.join(root,`docs/process/schemas/strategic-handoff-${kind}.schema.json`));
13
+ for(const target of targets){
14
+ if(!existsSync(path.join(root,target,'.git')))continue;
15
+ if(!check){const state=inspectWorkingTreeScope(root,{project_root:target,repository_scope:'git-submodule',checkout_state:'attached-branch'});if(!state.writable)throw new Error(`${target}: ${state.violation}`);}
16
+ for(const ref of new Set(shared))sync(path.join(root,ref),path.join(root,target,ref));
17
+ }
18
+ if(check&&differences.length){process.stderr.write(`交接工具同步漂移: ${differences.join(', ')}\n`);process.exitCode=1;}else process.stdout.write(`战略交接共享工具 ${check?'同步检查通过':`同步 ${differences.length} 文件`}\n`);
@@ -3,10 +3,11 @@ import { parseArgs } from "node:util";
3
3
  import { validateApprovalRecordFile } from "./lib/approval-record.mjs";
4
4
 
5
5
  try {
6
- const { positionals } = parseArgs({ allowPositionals: true, strict: true });
7
- if (positionals.length !== 1) throw new TypeError("用法: scripts/verify-approval-record <approval-record.yaml>");
8
- validateApprovalRecordFile(positionals[0]);
9
- process.stdout.write("会签记录校验通过\n");
6
+ const { positionals, values } = parseArgs({ allowPositionals: true, strict: true, options: { "require-approved": { type: "boolean" }, history: { type: "boolean" } } });
7
+ if (positionals.length !== 1) throw new TypeError("用法: scripts/verify-approval-record [--require-approved | --history] <approval-record.yaml>");
8
+ if (values.history && values["require-approved"]) throw new TypeError("--history 不能用于当前批准校验");
9
+ validateApprovalRecordFile(positionals[0], { requireApproved: !values.history });
10
+ process.stdout.write(!values.history ? "会签及当前用户决定校验通过\n" : "会签记录结构校验通过(不构成放行)\n");
10
11
  } catch (error) {
11
12
  process.stderr.write(`会签记录校验失败: ${error.message}\n`);
12
13
  process.exitCode = 1;