create-yss-spec 3.3.7 → 3.4.1

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 (729) hide show
  1. package/README.md +12 -13
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -13
  4. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  5. package/template/.agents/skills/yss-application/SKILL.md +1 -1
  6. package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  7. package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  8. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  9. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  10. package/template/.agents/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  11. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  12. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  13. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  14. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  15. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  16. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  17. package/template/.agents/skills/yss-design-system/SKILL.md +19 -19
  18. package/template/.agents/skills/yss-design-system/references/data-quality-theme.md +13 -0
  19. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -1
  20. package/template/.agents/skills/yss-design-system/references/design-system.md +7 -9
  21. package/template/.agents/skills/yss-formily/SKILL.md +21 -258
  22. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  23. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  24. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  25. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  26. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  27. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  28. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  29. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  30. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  31. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  32. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  33. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  34. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  35. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  36. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  37. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  38. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  39. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  40. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  41. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  42. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  43. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  44. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  45. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  46. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  47. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  48. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  49. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  50. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  51. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  52. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  53. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  54. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  55. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  56. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  57. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  58. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  59. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  60. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  61. package/template/.agents/skills/yss-hook/SKILL.md +1 -1
  62. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  63. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  64. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  65. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  66. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  67. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  68. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  69. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  70. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  71. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  72. package/template/.agents/skills/yss-openapi-governance/SKILL.md +2 -0
  73. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  74. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  75. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
  76. package/template/.agents/skills/yss-prototype-stage/SKILL.md +22 -9
  77. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  78. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  79. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  80. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  81. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  82. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  83. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  84. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  85. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  86. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  87. package/template/.agents/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  88. package/template/.agents/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  89. package/template/.agents/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  90. package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  91. package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  92. package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  93. package/template/.agents/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  94. package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  95. package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  96. package/template/.agents/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  97. package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  98. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  99. package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  100. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  101. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  102. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -1
  103. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  104. package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  105. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  106. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  107. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  108. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  109. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  110. package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  111. package/template/.agents/skills/yss-ui/SKILL.md +3 -2
  112. package/template/.agents/skills/yss-ui/references/component-routing.md +11 -10
  113. package/template/.agents/skills/yss-ui/references/specialized-components.md +52 -0
  114. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  115. package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  116. package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  117. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  118. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  119. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  120. package/template/.codex/skills/yss-application/SKILL.md +1 -1
  121. package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  122. package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  123. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  124. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  125. package/template/.codex/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  126. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  127. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  128. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  129. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  130. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  131. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  132. package/template/.codex/skills/yss-design-system/SKILL.md +19 -19
  133. package/template/.codex/skills/yss-design-system/references/data-quality-theme.md +13 -0
  134. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -1
  135. package/template/.codex/skills/yss-design-system/references/design-system.md +7 -9
  136. package/template/.codex/skills/yss-formily/SKILL.md +21 -258
  137. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  138. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  139. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  140. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  141. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  142. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  143. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  144. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  145. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  146. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  147. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  148. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  149. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  150. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  151. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  152. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  153. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  154. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  155. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  156. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  157. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  158. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  159. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  160. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  161. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  162. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  163. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  164. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  165. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  166. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  167. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  168. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  169. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  170. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  171. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  172. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  173. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  174. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  175. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  176. package/template/.codex/skills/yss-hook/SKILL.md +1 -1
  177. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  178. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  179. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  180. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  181. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  182. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  183. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  184. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  185. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  186. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  187. package/template/.codex/skills/yss-openapi-governance/SKILL.md +2 -0
  188. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  189. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  190. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
  191. package/template/.codex/skills/yss-prototype-stage/SKILL.md +22 -9
  192. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  193. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  194. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  195. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  196. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  197. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  198. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  199. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  200. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  201. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  202. package/template/.codex/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  203. package/template/.codex/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  204. package/template/.codex/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  205. package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  206. package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  207. package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  208. package/template/.codex/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  209. package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  210. package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  211. package/template/.codex/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  212. package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  213. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  214. package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  215. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  216. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  217. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -1
  218. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  219. package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  220. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  221. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  222. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  223. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  224. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  225. package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  226. package/template/.codex/skills/yss-ui/SKILL.md +3 -2
  227. package/template/.codex/skills/yss-ui/references/component-routing.md +11 -10
  228. package/template/.codex/skills/yss-ui/references/specialized-components.md +52 -0
  229. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  230. package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  231. package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  232. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  233. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  234. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  235. package/template/.cursor/skills/yss-application/SKILL.md +1 -1
  236. package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  237. package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  238. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  239. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  240. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  241. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  242. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  243. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  244. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  245. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  246. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  247. package/template/.cursor/skills/yss-design-system/SKILL.md +19 -19
  248. package/template/.cursor/skills/yss-design-system/references/data-quality-theme.md +13 -0
  249. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -1
  250. package/template/.cursor/skills/yss-design-system/references/design-system.md +7 -9
  251. package/template/.cursor/skills/yss-formily/SKILL.md +21 -258
  252. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  253. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  254. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  255. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  256. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  257. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  258. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  259. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  260. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  261. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  262. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  263. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  264. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  265. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  266. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  267. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  268. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  269. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  270. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  271. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  272. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  273. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  274. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  275. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  276. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  277. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  278. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  279. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  280. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  281. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  282. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  283. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  284. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  285. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  286. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  287. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  288. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  289. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  290. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  291. package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
  292. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  293. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  294. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  295. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  296. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  297. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  298. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  299. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  300. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  301. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  302. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +2 -0
  303. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  304. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  305. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
  306. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +22 -9
  307. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  308. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  309. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  310. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  311. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  312. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  313. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  314. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  315. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  316. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  317. package/template/.cursor/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  318. package/template/.cursor/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  319. package/template/.cursor/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  320. package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  321. package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  322. package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  323. package/template/.cursor/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  324. package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  325. package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  326. package/template/.cursor/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  327. package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  328. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  329. package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  330. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  331. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  332. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -1
  333. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  334. package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  335. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  336. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  337. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  338. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  339. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  340. package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  341. package/template/.cursor/skills/yss-ui/SKILL.md +3 -2
  342. package/template/.cursor/skills/yss-ui/references/component-routing.md +11 -10
  343. package/template/.cursor/skills/yss-ui/references/specialized-components.md +52 -0
  344. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  345. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  346. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  347. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  348. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  349. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  350. package/template/.pi/skills/yss-application/SKILL.md +1 -1
  351. package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  352. package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  353. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  354. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  355. package/template/.pi/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  356. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  357. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  358. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  359. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  360. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  361. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  362. package/template/.pi/skills/yss-design-system/SKILL.md +19 -19
  363. package/template/.pi/skills/yss-design-system/references/data-quality-theme.md +13 -0
  364. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -1
  365. package/template/.pi/skills/yss-design-system/references/design-system.md +7 -9
  366. package/template/.pi/skills/yss-formily/SKILL.md +21 -258
  367. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  368. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  369. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  370. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  371. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  372. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  373. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  374. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  375. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  376. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  377. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  378. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  379. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  380. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  381. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  382. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  383. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  384. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  385. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  386. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  387. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  388. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  389. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  390. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  391. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  392. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  393. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  394. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  395. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  396. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  397. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  398. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  399. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  400. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  401. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  402. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  403. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  404. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  405. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  406. package/template/.pi/skills/yss-hook/SKILL.md +1 -1
  407. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  408. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  409. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  410. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  411. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  412. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  413. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  414. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  415. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  416. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  417. package/template/.pi/skills/yss-openapi-governance/SKILL.md +2 -0
  418. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  419. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  420. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
  421. package/template/.pi/skills/yss-prototype-stage/SKILL.md +22 -9
  422. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  423. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  424. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  425. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  426. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  427. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  428. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  429. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  430. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  431. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  432. package/template/.pi/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  433. package/template/.pi/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  434. package/template/.pi/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  435. package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  436. package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  437. package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  438. package/template/.pi/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  439. package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  440. package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  441. package/template/.pi/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  442. package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  443. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  444. package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  445. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  446. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  447. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -1
  448. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  449. package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  450. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  451. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  452. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  453. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  454. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  455. package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  456. package/template/.pi/skills/yss-ui/SKILL.md +3 -2
  457. package/template/.pi/skills/yss-ui/references/component-routing.md +11 -10
  458. package/template/.pi/skills/yss-ui/references/specialized-components.md +52 -0
  459. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  460. package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  461. package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  462. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  463. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  464. package/template/CONTEXT.md +1 -0
  465. package/template/DESIGN.md +31 -14
  466. package/template/README.md +4 -6
  467. package/template/__yss_dotfile__.gitignore +4 -0
  468. package/template/docs/agents/backend-architecture-profiles.md +4 -0
  469. package/template/docs/agents/digital-human-roles.yaml +4 -4
  470. package/template/docs/agents/skill-migrations.md +15 -2
  471. package/template/docs/agents/yss-skill-registry.yaml +19 -40
  472. package/template/docs/design/README.md +4 -4
  473. package/template/docs/design/design-system-sync.yaml +2 -1
  474. package/template/docs/design/design.md +23 -31
  475. package/template/docs/design/preview-dark.html +3 -3
  476. package/template/docs/design/preview.css +1 -1
  477. package/template/docs/design/preview.html +2 -2
  478. package/template/docs/design/templates/interaction-spec-template.md +2 -2
  479. package/template/docs/design/templates/prototype-confirmation-template.md +2 -2
  480. package/template/docs/design/templates/prototype-evidence-template.yaml +18 -22
  481. package/template/docs/design/templates/prototype-review-checklist.md +5 -3
  482. package/template/docs/design/templates/state-matrix-template.md +1 -1
  483. package/template/docs/design/templates/visual-baseline-template.yaml +3 -2
  484. package/template/docs/design/tokens/.design-md-projection.json +7 -7
  485. package/template/docs/design/tokens/theme.json +16 -10
  486. package/template/docs/design/tokens/tokens.compact.json +521 -237
  487. package/template/docs/design/tokens/tokens.dark.json +527 -240
  488. package/template/docs/design/tokens/tokens.default.json +513 -235
  489. package/template/docs/design/tokens/variables.css +67 -65
  490. package/template/docs/design/tokens/variables.dark.css +41 -41
  491. package/template/docs/plan/templates/market-analysis-template.md +3 -3
  492. package/template/docs/plan/templates/user-pain-points-template.md +3 -3
  493. package/template/docs/process/delivery-preflight.md +72 -0
  494. package/template/docs/process/document-writing.md +5 -1
  495. package/template/docs/process/existing-backend-architecture.md +31 -0
  496. package/template/docs/process/existing-ui-baseline.md +40 -0
  497. package/template/docs/process/frontend-backend-delivery.md +20 -6
  498. package/template/docs/process/implementation-repo-integration.md +6 -0
  499. package/template/docs/process/lifecycle-registry-baseline.json +1 -1
  500. package/template/docs/process/lifecycle-registry.yaml +5 -5
  501. package/template/docs/process/schemas/api-contract-decision.schema.json +74 -0
  502. package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
  503. package/template/docs/process/schemas/data-architecture-decision.schema.json +34 -0
  504. package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
  505. package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
  506. package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
  507. package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
  508. package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
  509. package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
  510. package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +80 -24
  511. package/template/docs/process/schemas/project-scaffold-contract.schema.json +85 -11
  512. package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -0
  513. package/template/docs/process/schemas/strategic-design-handoff.schema.json +296 -107
  514. package/template/docs/process/schemas/strategic-handoff-delivery-verification.schema.json +19 -0
  515. package/template/docs/process/schemas/strategic-handoff-delivery.schema.json +84 -0
  516. package/template/docs/process/schemas/strategic-handoff-export-v2.schema.json +378 -0
  517. package/template/docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json +42 -0
  518. package/template/docs/process/strategic-handoff-package.md +42 -17
  519. package/template/docs/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md +43 -0
  520. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
  521. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +9 -10
  522. package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +13 -10
  523. package/template/scripts/audit-legacy-backend-scaffold +29 -0
  524. package/template/scripts/backend-delivery +20 -4
  525. package/template/scripts/lib/api-contract-decision.mjs +49 -0
  526. package/template/scripts/lib/api-contract-decision.test.mjs +69 -0
  527. package/template/scripts/lib/approved-execution-context.mjs +106 -0
  528. package/template/scripts/lib/backend-architecture.mjs +12 -0
  529. package/template/scripts/lib/backend-delivery.mjs +10 -6
  530. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +123 -0
  531. package/template/scripts/lib/delivery-preflight.mjs +238 -0
  532. package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
  533. package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
  534. package/template/scripts/lib/frontend-delivery.mjs +23 -15
  535. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
  536. package/template/scripts/lib/json-schema.mjs +19 -4
  537. package/template/scripts/lib/legacy-backend-scaffold-audit.mjs +87 -0
  538. package/template/scripts/lib/legacy-backend-scaffold-audit.test.mjs +64 -0
  539. package/template/scripts/lib/lifecycle-transition.mjs +153 -5
  540. package/template/scripts/lib/openapi-draft-validation.mjs +111 -0
  541. package/template/scripts/lib/profile-skill-sync.mjs +26 -0
  542. package/template/scripts/lib/skill-registry.mjs +17 -3
  543. package/template/scripts/lib/skill-supply-chain.mjs +12 -1
  544. package/template/scripts/lib/strategic-feedback.mjs +2 -2
  545. package/template/scripts/lib/strategic-handoff-consumption.mjs +8 -7
  546. package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
  547. package/template/scripts/lib/strategic-handoff-io.mjs +10 -0
  548. package/template/scripts/lib/strategic-handoff.mjs +124 -32
  549. package/template/scripts/lib/task-package.mjs +11 -3
  550. package/template/scripts/lib/technical-design-boundary.mjs +9 -1
  551. package/template/scripts/lib/ui-baseline.mjs +26 -0
  552. package/template/scripts/lib/user-decision.mjs +4 -1
  553. package/template/scripts/preflight-delivery +14 -0
  554. package/template/scripts/strategic-handoff +23 -6
  555. package/template/scripts/sync-profile-skills +4 -5
  556. package/template/scripts/verify-openapi-draft-validation-record +10 -129
  557. package/template/scripts/verify-strategic-context-import +12 -14
  558. package/template/skills-lock.json +25 -80
  559. package/template/yss-public-skills.json +0 -6
  560. package/template.snapshot.json +8 -4
  561. package/template/.agents/skills/yss-antd-design/SKILL.md +0 -35
  562. package/template/.agents/skills/yss-antd-design/references/boundaries.md +0 -30
  563. package/template/.agents/skills/yss-antd-design/references/cli-matrix.md +0 -38
  564. package/template/.agents/skills/yss-antd-design/references/evidence.md +0 -35
  565. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  566. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  567. package/template/.agents/skills/yss-antdv-next-design/SKILL.md +0 -48
  568. package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  569. package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  570. package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  571. package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  572. package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  573. package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  574. package/template/.agents/skills/yss-components/SKILL.md +0 -386
  575. package/template/.agents/skills/yss-components/agents/openai.yaml +0 -5
  576. package/template/.agents/skills/yss-components/references/frontend-docs.md +0 -9
  577. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  578. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  579. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  580. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  581. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  582. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  583. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  584. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  585. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  586. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  587. package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  588. package/template/.agents/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  589. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  590. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  591. package/template/.agents/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  592. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  593. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  594. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  595. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  596. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  597. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  598. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  599. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  600. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  601. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  602. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  603. package/template/.codex/skills/yss-antd-design/SKILL.md +0 -35
  604. package/template/.codex/skills/yss-antd-design/references/boundaries.md +0 -30
  605. package/template/.codex/skills/yss-antd-design/references/cli-matrix.md +0 -38
  606. package/template/.codex/skills/yss-antd-design/references/evidence.md +0 -35
  607. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  608. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  609. package/template/.codex/skills/yss-antdv-next-design/SKILL.md +0 -48
  610. package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  611. package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  612. package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  613. package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  614. package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  615. package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  616. package/template/.codex/skills/yss-components/SKILL.md +0 -386
  617. package/template/.codex/skills/yss-components/agents/openai.yaml +0 -5
  618. package/template/.codex/skills/yss-components/references/frontend-docs.md +0 -9
  619. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  620. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  621. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  622. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  623. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  624. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  625. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  626. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  627. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  628. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  629. package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  630. package/template/.codex/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  631. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  632. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  633. package/template/.codex/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  634. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  635. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  636. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  637. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  638. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  639. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  640. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  641. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  642. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  643. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  644. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  645. package/template/.cursor/skills/yss-antd-design/SKILL.md +0 -35
  646. package/template/.cursor/skills/yss-antd-design/references/boundaries.md +0 -30
  647. package/template/.cursor/skills/yss-antd-design/references/cli-matrix.md +0 -38
  648. package/template/.cursor/skills/yss-antd-design/references/evidence.md +0 -35
  649. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  650. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  651. package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +0 -48
  652. package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  653. package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  654. package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  655. package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  656. package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  657. package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  658. package/template/.cursor/skills/yss-components/SKILL.md +0 -386
  659. package/template/.cursor/skills/yss-components/agents/openai.yaml +0 -5
  660. package/template/.cursor/skills/yss-components/references/frontend-docs.md +0 -9
  661. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  662. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  663. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  664. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  665. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  666. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  667. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  668. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  669. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  670. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  671. package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  672. package/template/.cursor/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  673. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  674. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  675. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  676. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  677. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  678. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  679. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  680. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  681. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  682. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  683. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  684. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  685. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  686. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  687. package/template/.pi/skills/yss-antd-design/SKILL.md +0 -35
  688. package/template/.pi/skills/yss-antd-design/references/boundaries.md +0 -30
  689. package/template/.pi/skills/yss-antd-design/references/cli-matrix.md +0 -38
  690. package/template/.pi/skills/yss-antd-design/references/evidence.md +0 -35
  691. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  692. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  693. package/template/.pi/skills/yss-antdv-next-design/SKILL.md +0 -48
  694. package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  695. package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  696. package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  697. package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  698. package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  699. package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  700. package/template/.pi/skills/yss-components/SKILL.md +0 -386
  701. package/template/.pi/skills/yss-components/agents/openai.yaml +0 -5
  702. package/template/.pi/skills/yss-components/references/frontend-docs.md +0 -9
  703. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  704. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  705. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  706. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  707. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  708. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  709. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  710. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  711. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  712. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  713. package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  714. package/template/.pi/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  715. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  716. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  717. package/template/.pi/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  718. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  719. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  720. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  721. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  722. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  723. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  724. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  725. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  726. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  727. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  728. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  729. 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 +0 -35
@@ -0,0 +1,106 @@
1
+ import path from 'node:path';
2
+ import { readFileSync } from 'node:fs';
3
+ import { ROOT, read, parse, safe, hash, digest, schema } from './strategic-handoff-io.mjs';
4
+ import { countersignRuleForGate } from './digital-human-roles.mjs';
5
+ import { validateApprovalRecord } from './approval-record.mjs';
6
+ import { assertImplementationDecision } from './user-decision.mjs';
7
+ import { loadSkillRegistry } from './skill-registry.mjs';
8
+
9
+ const contexts=new WeakMap();
10
+ const gateId='gate.slice-contract-approved';
11
+ const check=(ok,code,message)=>{if(!ok){const error=new TypeError(`${code}: ${message}`);error.code=code;throw error;}};
12
+ const same=(a,b)=>digest(a)===digest(b);
13
+ const ioFor=root=>({root,read:ref=>readFileSync(safe(root,path.relative(root,ref).split(path.sep).join('/')))});
14
+
15
+ /** Existing registrations require persisted input sections; array properties disappear in JSON. */
16
+ export function assertExistingSliceStructure(contract) {
17
+ const identity=contract?.resolution?.architecture_identity;
18
+ if(identity?.schema_version!==2||identity.source_kind!=='existing-registration')return;
19
+ const object=value=>value!==null&&typeof value==='object'&&!Array.isArray(value);
20
+ check(object(contract.lifecycle_refs),'EXECUTION_CONTRACT_INVALID','既有工程 Slice lifecycle_refs 必须是对象');
21
+ for(const field of ['ticket','engineering_baseline'])check(typeof contract.lifecycle_refs[field]==='string'&&contract.lifecycle_refs[field].trim(),'EXECUTION_CONTRACT_INVALID',`既有工程 Slice 缺少 lifecycle_refs.${field}`);
22
+ check(object(contract.readiness),'EXECUTION_CONTRACT_INVALID','既有工程 Slice readiness 必须是对象');
23
+ for(const field of ['blockers','stale_inputs','not_applicable'])check(Array.isArray(contract.readiness[field]),'EXECUTION_CONTRACT_INVALID',`既有工程 Slice readiness.${field} 必须是数组`);
24
+ }
25
+
26
+ /** Reads original local approval; a contract's own approved status never establishes permission. */
27
+ export function verifySliceContractApproval(binding,{root=process.cwd(),contract:expected}={}) {
28
+ root=path.resolve(root);
29
+ check(binding?.ref&&binding?.digest&&binding?.approval_ref,'EXECUTION_APPROVAL_REQUIRED','需要当前持久化 Slice 的 ref/digest/approval_ref');
30
+ const bytes=readFileSync(safe(root,binding.ref));
31
+ check(hash(bytes)===binding.digest,'EXECUTION_CONTRACT_STALE','Slice 原始字节与绑定不一致');
32
+ const document=parse(bytes),contract=document.slice_contract||document;
33
+ check(contract.schema_version===2&&contract.status==='approved'&&typeof contract.contract_id==='string'&&contract.contract_id&&typeof contract.contract_version==='string'&&contract.contract_version&&typeof contract.slice_id==='string'&&contract.slice_id,'EXECUTION_CONTRACT_INVALID','需要已批准且有身份的持久化 Slice v2');
34
+ assertExistingSliceStructure(contract);
35
+ check((!binding.id||binding.id===contract.contract_id)&&(!binding.version||binding.version===contract.contract_version),'EXECUTION_CONTRACT_CONFLICT','当前合同身份或版本不匹配');
36
+ if(expected)check(same(expected.slice_contract||expected,contract),'EXECUTION_CONTRACT_CONFLICT','调用方合同与持久化原字节不一致');
37
+ const roles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
38
+ const approval=read(safe(root,binding.approval_ref));
39
+ if(!countersignRuleForGate(roles.gate_policy,gateId)&&roles.gate_policy.orchestrator?.includes(gateId)) {
40
+ // The current lifecycle already owns this gate. Consume its checkpoint and existing
41
+ // implementation-scope decision instead of inventing an approval-record countersignature.
42
+ check(approval?.gates&&approval?.human_review&&!approval.gate_id,'EXECUTION_APPROVAL_PROTOCOL','当前主控 gate 需要生命周期 checkpoint,不接受伪造 approval-record');
43
+ schema(approval,'docs/process/schemas/lifecycle-checkpoint.schema.json');
44
+ const gate=approval.gates?.[gateId],review=approval.human_review||{};
45
+ check(approval.repository_mode==='project-instance'&&approval.status!=='blocked'&&approval.blockers.length===0,'EXECUTION_APPROVAL_BLOCKED','主控 checkpoint 仍有阻断或不是产品实例');
46
+ check(gate?.status==='approved'&&gate.subject_ref===binding.ref,'EXECUTION_APPROVAL_SCOPE','主控 gate 未批准当前持久化 Slice');
47
+ check(review.implementation?.slice_contract_ref===binding.ref,'EXECUTION_APPROVAL_SCOPE','实施批准不指向当前 Slice 原始文件');
48
+ assertImplementationDecision({...review.implementation,user_decisions:review.user_decisions||[]},{...ioFor(root),rolesDoc:roles});
49
+ } else {
50
+ // Historical source profiles that declared this a countersign gate retain their policy.
51
+ validateApprovalRecord(approval,{...ioFor(root),rolesDoc:roles,requireApproved:true});
52
+ check(approval.gate_id===gateId&&approval.artifact_bindings?.some(item=>item.id===contract.contract_id&&item.version===contract.contract_version&&item.digest===binding.digest),'EXECUTION_APPROVAL_SCOPE','源会签未绑定当前 Slice 的身份、版本和字节');
53
+ }
54
+ return {contract,binding:structuredClone(binding),root};
55
+ }
56
+
57
+ function executionBasis(verified,{allowCompilerDrift=false}={}) {
58
+ const {contract}=verified,resolution=contract.resolution||{};
59
+ const compiler=read(safe(ROOT,'.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml'));
60
+ if(!allowCompilerDrift)for(const [section,fields] of Object.entries(compiler.slice_contract_required))for(const field of fields)check(Object.hasOwn(section==='root'?contract:contract[section]||{},field),'EXECUTION_CONTRACT_INVALID',`合同缺少 ${section}.${field}`);
61
+ check(Array.isArray(contract.common?.allowed_write_paths)&&contract.common.allowed_write_paths.length>0&&contract.common.allowed_write_paths.every(value=>typeof value==='string'&&value.trim()),'EXECUTION_SCOPE_MISSING','合同缺少已批准写范围');
62
+ check(Array.isArray(contract.readiness?.blockers)&&!contract.readiness.blockers.length&&Array.isArray(contract.readiness?.stale_inputs)&&!contract.readiness.stale_inputs.length,'EXECUTION_CONTRACT_STALE','合同就绪条件仍有阻断或过期输入');
63
+ if(!allowCompilerDrift)check(resolution.registry_digest===digest(loadSkillRegistry()).slice(7)&&resolution.compiler_contract_digest===digest(compiler).slice(7),'EXECUTION_CONTRACT_STALE','编译依据已改变,应重新编译批准');
64
+ check(resolution.freshness==='current','EXECUTION_CONTRACT_STALE','resolution 不是 current');
65
+ if(resolution.architecture_identity)check(resolution.architecture_identity_digest===digest(resolution.architecture_identity).slice(7),'EXECUTION_CONTRACT_STALE','编译架构身份摘要不一致');
66
+ return verified;
67
+ }
68
+
69
+ export function createApprovedExecutionContext(binding,options={}) {
70
+ const verified=executionBasis(verifySliceContractApproval(binding,options));
71
+ const context=Object.freeze({kind:'approved-slice-execution-context'});
72
+ contexts.set(context,{binding:verified.binding,root:verified.root,allowCompilerDrift:false});
73
+ return context;
74
+ }
75
+
76
+ /** A prior approved scope may authenticate bounded output while current compiler facts are recomputed. */
77
+ export function createApprovedRecompilationContext(binding,options={}) {
78
+ const verified=executionBasis(verifySliceContractApproval(binding,options),{allowCompilerDrift:true});
79
+ const context=Object.freeze({kind:'approved-slice-recompilation-context'});
80
+ contexts.set(context,{binding:verified.binding,root:verified.root,allowCompilerDrift:true});
81
+ return context;
82
+ }
83
+
84
+ /** Revalidate original bytes on every boundary; a serialized/caller-invented context is rejected. */
85
+ export function assertApprovedExecutionContext(context,{root=process.cwd(),contract,architectureIdentity,architectureEvidence,technicalDesign,sliceId}={}) {
86
+ const saved=contexts.get(context);
87
+ check(saved&&saved.root===path.resolve(root),'EXECUTION_CONTEXT_UNTRUSTED','只允许从当前原始 Slice 与本地批准生成的执行上下文');
88
+ const verified=executionBasis(verifySliceContractApproval(saved.binding,{root,contract}),{allowCompilerDrift:saved.allowCompilerDrift});
89
+ const current=verified.contract,resolution=current.resolution;
90
+ if(sliceId)check(current.slice_id===sliceId,'EXECUTION_SCOPE_CONFLICT','执行上下文属于另一切片');
91
+ if(architectureIdentity)check(same(resolution.architecture_identity,architectureIdentity),'EXECUTION_INPUT_REPLACED','执行上下文不允许替换架构身份或固定源码输入');
92
+ if(architectureEvidence)check(same(resolution.architecture_evidence,architectureEvidence),'EXECUTION_INPUT_REPLACED','执行上下文不允许替换原始架构证据');
93
+ if(technicalDesign) {
94
+ const binding=resolution.technical_design;
95
+ check(binding?.ref&&binding.digest,'EXECUTION_DESIGN_MISSING','Slice 未绑定当前技术设计');
96
+ const bytes=readFileSync(safe(root,binding.ref));
97
+ check(hash(bytes)===binding.digest&&same(parse(bytes),technicalDesign),'EXECUTION_INPUT_REPLACED','执行上下文不允许替换技术设计');
98
+ }
99
+ return {allowed_write_paths:[...current.common.allowed_write_paths],contract:current};
100
+ }
101
+
102
+ export function approvedExecutionBinding(context) {
103
+ const saved=contexts.get(context);
104
+ check(saved,'EXECUTION_CONTEXT_UNTRUSTED','不能序列化未验证的执行上下文');
105
+ return structuredClone(saved.binding);
106
+ }
@@ -1,5 +1,6 @@
1
1
  import { createHash } from "node:crypto";
2
2
  import { loadSkillRegistry } from "./skill-registry.mjs";
3
+ import { validateExistingArchitecture, verifyExistingArchitecture } from "./existing-backend-architecture.mjs";
3
4
 
4
5
  export function architectureDigest(value) {
5
6
  const stable = (item) => Array.isArray(item) ? item.map(stable) : item && typeof item === "object"
@@ -9,6 +10,8 @@ export function architectureDigest(value) {
9
10
 
10
11
  export function validateArchitectureIdentity(identity, registry = loadSkillRegistry()) {
11
12
  if (!identity || typeof identity !== "object") throw new TypeError("缺少 architecture_identity;请从工程基线重新编译");
13
+ if (identity.schema_version === 2) return validateExistingArchitecture(identity, registry);
14
+ if (identity.schema_version !== undefined || identity.source_kind !== undefined) throw new TypeError("不支持的 architecture_identity 来源或版本");
12
15
  const profile = registry.architecture_profiles?.[identity.architecture_profile];
13
16
  if (!profile || identity.architecture_family !== profile.architecture_family || identity.generator_skill !== profile.generator_skill) {
14
17
  throw new TypeError("architecture_identity 的架构族、Profile 或生成器不匹配");
@@ -28,6 +31,15 @@ export function validateArchitectureIdentity(identity, registry = loadSkillRegis
28
31
  return profile;
29
32
  }
30
33
 
34
+ // Existing projects must present original on-disk evidence, not three copies supplied by a caller.
35
+ export function verifyArchitectureEvidence(identity, evidence, { root, registry = loadSkillRegistry(), execution } = {}) {
36
+ validateArchitectureIdentity(identity, registry);
37
+ if (identity.schema_version === 2) return verifyExistingArchitecture(identity, evidence, { root, registry, execution });
38
+ if (!evidence?.engineering_baseline || !evidence?.repository_registration || !evidence?.manifest) throw new TypeError("缺少工程基线、仓库登记或 Manifest 架构证据");
39
+ assertArchitectureAgreement(identity, evidence, registry);
40
+ return { source_kind: "scaffold", bindings: evidence };
41
+ }
42
+
31
43
  export function assertArchitectureAgreement(identity, evidence, registry) {
32
44
  validateArchitectureIdentity(identity, registry);
33
45
  for (const [name, source] of Object.entries(evidence ?? {})) {
@@ -1,3 +1,4 @@
1
+ import { verifySliceContractApproval } from './approved-execution-context.mjs';
1
2
  import { cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync } from 'node:fs';
2
3
  import path from 'node:path';
3
4
  import { tmpdir } from 'node:os';
@@ -17,6 +18,7 @@ function boundFile(root, binding) {
17
18
 
18
19
  async function approvedFile(root, binding, gate) {
19
20
  const bytes=boundFile(root,binding);
21
+ if(gate==='gate.slice-contract-approved'){verifySliceContractApproval(binding,{root});return bytes;}
20
22
  const record=read(safe(root,binding.approval_ref));
21
23
  const roles=sourceApprovalPolicy(read(safe(root,'docs/agents/digital-human-roles.yaml')));
22
24
  await sourceApproval(record,roles,root);
@@ -38,7 +40,7 @@ function verification(root, binding, basis, kind) {
38
40
  return record;
39
41
  }
40
42
 
41
- export async function inspectBackendDelivery(root, ref) {
43
+ export async function inspectBackendDelivery(root, ref, { readOnly = false } = {}) {
42
44
  project(root);
43
45
  const delivery=read(safe(root,ref));
44
46
  schema(delivery,'docs/process/schemas/backend-delivery.schema.json');
@@ -57,7 +59,7 @@ export async function inspectBackendDelivery(root, ref) {
57
59
  verification(root,delivery.verification.deployment,basis,'backend-deployment');
58
60
  return openBundle(safe(root,delivery.strategic_bundle_ref),bundle=>{
59
61
  ensure(bundle.manifest.bundle_digest===delivery.strategic_bundle_digest,'后端交付与战略版本不一致');
60
- if(bundle.handoff.schema_version===4){
62
+ if([4,5].includes(bundle.handoff.schema_version)){
61
63
  const route=bundle.handoff.consumer_routes.find(item=>item.capability==='backend-technical-design');
62
64
  ensure(route&&route.activation!=='not-applicable'&&delivery.strategic_route_id===route.route_id,'后端交付未绑定当前 backend-technical-design route_id');
63
65
  }
@@ -71,7 +73,7 @@ export async function inspectBackendDelivery(root, ref) {
71
73
  }
72
74
  ensure(delivery.scope.operation_ids.every(id=>tests.operation_ids.includes(id)),'后端契约验证未覆盖交付接口');
73
75
  return {delivery,basis};
74
- });
76
+ }, { readOnly });
75
77
  }
76
78
 
77
79
  function validManifest(manifest,root) {
@@ -168,9 +170,11 @@ export async function importBackendDelivery({bundle,targetRoot}) {
168
170
  write(staging,'import-receipt.json',json(receipt));
169
171
  const strategicHandoff={import_receipt_ref:strategic.receipt_ref,bundle_digest:strategicReceipt.bundle_digest,...(trace.route_id?{route_id:trace.route_id}:{}),context_reconciliation_ref:'',rows:trace.rows.map(({tactical_refs,test_seam_refs,...row})=>({...row,frontend_case_refs:[]}))};
170
172
  if(strategicReceipt.schema_version===2){
171
- ensure(frontendRoute,'Handoff v4 Import Receipt 未选择 frontend-engineering-design 能力');
172
- const preflightRef=frontendRoute.artifact_refs.find(item=>item.endsWith('frontend-strategic-preflight-draft.json'));ensure(preflightRef,'Handoff v4 缺少 Frontend Strategic Preflight 草案');
173
- write(staging,'frontend-acceptance-draft.json',json({schema_version:2,status:'draft',slice_id:b.delivery.scope.slice_id,strategic_preflight:{ref:preflightRef,digest:hash(readFileSync(safe(target,preflightRef)))},backend_dependency:{mode:'required',route_id:'route.backend'},backend_delivery:{import_receipt_ref:`${ref}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest},strategic_handoff:strategicHandoff,frontend_cases:[]}));
173
+ ensure(frontendRoute,'Import Receipt 未选择 frontend-engineering-design 能力');
174
+ const preflightRef=frontendRoute.artifact_refs.find(item=>item.endsWith('frontend-strategic-preflight-draft.json'));ensure(preflightRef,'缺少 Frontend Strategic Preflight 草案');
175
+ const preflight=read(safe(target,preflightRef));
176
+ ensure([1,2].includes(preflight.schema_version),'未知 Frontend Strategic Preflight 版本');
177
+ write(staging,'frontend-acceptance-draft.json',json({schema_version:preflight.schema_version===2?3:2,...(preflight.schema_version===2?{ui_baseline_kind:preflight.ui_baseline_kind}:{}),status:'draft',slice_id:b.delivery.scope.slice_id,strategic_preflight:{ref:preflightRef,digest:hash(readFileSync(safe(target,preflightRef)))},backend_dependency:{mode:'required',route_id:b.delivery.strategic_route_id},backend_delivery:{import_receipt_ref:`${ref}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest},strategic_handoff:strategicHandoff,frontend_cases:[]}));
174
178
  }else write(staging,'frontend-acceptance-draft.json',json({schema_version:1,status:'draft',slice_id:b.delivery.scope.slice_id,backend_delivery:{import_receipt_ref:`${ref}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest},strategic_handoff:strategicHandoff,frontend_cases:[]}));
175
179
  ensure(!existsSync(destination),'后端包导入并发冲突');renameSync(staging,destination);
176
180
  return {result:'imported-pending-acceptance',receipt_ref:`${ref}/import-receipt.json`,acceptance_ref:`${ref}/frontend-acceptance-draft.json`};
@@ -0,0 +1,123 @@
1
+ import { createHash } from "node:crypto";
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import path from "node:path";
4
+ import { parseDocument } from "../vendor/yaml.mjs";
5
+ import { loadApprovalRecord, validateApprovalRecord } from "./approval-record.mjs";
6
+ import { validateJsonSchema } from "./json-schema.mjs";
7
+ import { ROOT } from "./lifecycle-registry.mjs";
8
+ import { validateTechnicalDesign } from "../../.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs";
9
+ import { validateApiContractDecision } from "./api-contract-decision.mjs";
10
+
11
+ const DATA_DECISION_SCHEMA = path.join(ROOT, "docs/process/schemas/data-architecture-decision.schema.json");
12
+
13
+ const fail = (message) => { throw new TypeError(message); };
14
+ const digest = (bytes) => `sha256:${createHash("sha256").update(bytes).digest("hex")}`;
15
+ const text = (value) => typeof value === "string" && value.trim().length > 0;
16
+
17
+ function resolveLocalRef(root, ref, label) {
18
+ if (!text(ref) || /^[a-z][a-z0-9+.-]*:\/\//i.test(ref)) fail(`${label} 必须是可读取的本地文件引用`);
19
+ const resolved = path.isAbsolute(ref) ? path.normalize(ref) : path.resolve(root, ref);
20
+ if (!existsSync(resolved)) fail(`${label} 不可读取: ${ref}`);
21
+ return resolved;
22
+ }
23
+
24
+ export function findGovernanceRoot(contractFile) {
25
+ let current = path.dirname(path.resolve(contractFile));
26
+ const fallback = current;
27
+ while (true) {
28
+ if (existsSync(path.join(current, "yss-project.yaml"))) return current;
29
+ const parent = path.dirname(current);
30
+ if (parent === current) return fallback;
31
+ current = parent;
32
+ }
33
+ }
34
+
35
+ function readDocument(root, binding, label) {
36
+ if (!binding || !text(binding.ref) || !text(binding.digest)) fail(`${label} 缺少 ref/digest`);
37
+ const file = resolveLocalRef(root, binding.ref, label);
38
+ const bytes = readFileSync(file);
39
+ if (digest(bytes) !== binding.digest) fail(`${label} 原始字节摘要漂移`);
40
+ const document = parseDocument(bytes.toString("utf8"), { maxAliasCount: 0, uniqueKeys: true });
41
+ if (document.errors.length) fail(`${label} 无法解析: ${document.errors[0].message}`);
42
+ const value = document.toJS({ maxAliasCount: 0 });
43
+ if (!value || typeof value !== "object" || Array.isArray(value)) fail(`${label} 必须是对象`);
44
+ return { file, bytes, value };
45
+ }
46
+
47
+ function requireReadableRefs(root, refs, label) {
48
+ if (!Array.isArray(refs) || refs.length === 0) fail(`${label} 必须包含可读取证据`);
49
+ for (const ref of refs) resolveLocalRef(root, ref, label);
50
+ }
51
+
52
+ function requireArtifactBinding(record, expected, label) {
53
+ const binding = (record.artifact_bindings || []).find((item) => item?.id === expected.id);
54
+ if (!binding || binding.version !== expected.version || binding.digest !== expected.digest) fail(`${label} 未绑定当前资产版本和摘要`);
55
+ }
56
+
57
+ function requireExactBinding(actual, expected, label, { impact = false, id = false } = {}) {
58
+ const keys = ["ref", "version", "digest", ...(impact ? ["impact"] : []), ...(id ? ["id"] : [])];
59
+ if (!actual || keys.some((key) => actual[key] !== expected[key])) fail(`${label} 未原子绑定当前资产`);
60
+ }
61
+
62
+ function requireEngineeringPackage(root, approval, contract, technical, data, api, prerequisites) {
63
+ const packageFile = resolveLocalRef(root, approval.subject_ref, "工程合同批准主体");
64
+ const packageDocument = parseDocument(readFileSync(packageFile, "utf8"), { maxAliasCount: 0, uniqueKeys: true });
65
+ if (packageDocument.errors.length) fail(`工程合同批准主体无法解析: ${packageDocument.errors[0].message}`);
66
+ const value = packageDocument.toJS({ maxAliasCount: 0 });
67
+ if (value?.schema_version !== 1 || value?.kind !== "engineering-contract-package" || value?.project_id !== contract.project_name) fail("工程合同批准主体必须是当前项目的 engineering-contract-package v1");
68
+ requireExactBinding(value.technical_design, { ...prerequisites.technical_design, version: technical.value.version }, "工程合同包 Technical Design");
69
+ requireExactBinding(value.data_architecture_decision, { ...prerequisites.data_architecture_decision, version: data.value.decision_version, impact: data.value.impact }, "工程合同包 Data Architecture Decision", { impact: true });
70
+ requireExactBinding(value.api_contract_decision, { ...prerequisites.api_contract_decision, version: api.decision.decision_version, impact: api.decision.impact }, "工程合同包 API Contract Decision", { impact: true });
71
+ if (api.decision.impact === "required") {
72
+ requireExactBinding(value.frozen_openapi, api.decision.openapi, "工程合同包冻结 OpenAPI", { id: true });
73
+ } else if (Object.hasOwn(value, "frozen_openapi")) {
74
+ fail("API not-applicable 的工程合同包禁止携带 frozen_openapi 占位字段");
75
+ }
76
+ }
77
+
78
+ export async function validateBackendScaffoldPrerequisites(contract, { contractFile, root = findGovernanceRoot(contractFile) } = {}) {
79
+ if (contract?.schema_version !== 4 || contract?.delivery_role !== "backend") fail("后端新生成只接受 Project Scaffold Contract v4");
80
+ const prerequisites = contract.design_prerequisites;
81
+ if (!prerequisites || typeof prerequisites !== "object") fail("后端脚手架合同缺少 design_prerequisites");
82
+
83
+ const technical = readDocument(root, prerequisites.technical_design, "Technical Design");
84
+ if (technical.value.schema_version !== 2 || technical.value.status !== "approved" || technical.value.version !== prerequisites.technical_design.version) fail("Technical Design 必须是 approved 的当前 v2 合同");
85
+ if (technical.value.architecture?.family !== contract.architecture_family || technical.value.architecture?.project_id !== contract.project_name || technical.value.architecture?.decision_digest !== contract.decision_digest) fail("Technical Design 与脚手架架构决定不一致");
86
+ await validateTechnicalDesign(technical.value, { root });
87
+
88
+ const data = readDocument(root, prerequisites.data_architecture_decision, "数据架构决定");
89
+ validateJsonSchema(data.value, DATA_DECISION_SCHEMA, { label: "Data Architecture Decision v1" });
90
+ if (data.value.decision_version !== prerequisites.data_architecture_decision.version) fail("数据架构决定版本不匹配");
91
+ const assessment = resolveLocalRef(root, data.value.assessment_ref, "数据影响评估");
92
+ if (digest(readFileSync(assessment)) !== data.value.assessment_digest) fail("数据影响评估摘要漂移");
93
+ requireReadableRefs(root, data.value.evidence_refs, "数据架构决定证据");
94
+ if (data.value.impact === "required") {
95
+ const architecture = resolveLocalRef(root, data.value.data_architecture_ref, "数据架构文档");
96
+ if (digest(readFileSync(architecture)) !== data.value.data_architecture_digest) fail("数据架构文档摘要漂移");
97
+ requireReadableRefs(root, data.value.review_evidence_refs, "数据架构评审证据");
98
+ }
99
+
100
+ const api = validateApiContractDecision(prerequisites.api_contract_decision, { root });
101
+
102
+ const approvalRef = prerequisites.engineering_contract_approval_ref;
103
+ if (approvalRef !== contract.lifecycle_approval_ref || approvalRef !== contract.approval?.approval_ref) fail("工程合同批准引用与脚手架合同不一致");
104
+ const approvalFile = resolveLocalRef(root, approvalRef, "工程合同批准记录");
105
+ const approval = loadApprovalRecord(approvalFile);
106
+ validateApprovalRecord(approval, { requireApproved: true, root });
107
+ if (approval.gate_id !== "gate.engineering-contract-approved") fail("工程合同批准记录 gate_id 必须为 gate.engineering-contract-approved");
108
+ if (!Array.isArray(approval.approval_scope) || !approval.approval_scope.includes(contract.contract_id) || !approval.approval_scope.includes(contract.project_name)) fail("工程合同批准范围未覆盖当前合同和项目");
109
+ requireEngineeringPackage(root, approval, contract, technical, data, api, prerequisites);
110
+ requireArtifactBinding(approval, { id: technical.value.technical_design_id, version: technical.value.version, digest: prerequisites.technical_design.digest }, "工程合同批准记录");
111
+ requireArtifactBinding(approval, { id: data.value.decision_id, version: data.value.decision_version, digest: prerequisites.data_architecture_decision.digest }, "工程合同批准记录");
112
+ requireArtifactBinding(approval, { id: api.decision.decision_id, version: api.decision.decision_version, digest: prerequisites.api_contract_decision.digest }, "工程合同批准记录");
113
+ if (api.decision.impact === "required") {
114
+ requireArtifactBinding(approval, { id: api.decision.openapi.id, version: api.decision.openapi.version, digest: api.decision.openapi.digest }, "工程合同批准记录");
115
+ }
116
+
117
+ return {
118
+ technical_design: { ref: prerequisites.technical_design.ref, version: technical.value.version, digest: prerequisites.technical_design.digest },
119
+ data_architecture_decision: { ref: prerequisites.data_architecture_decision.ref, version: data.value.decision_version, digest: prerequisites.data_architecture_decision.digest, impact: data.value.impact },
120
+ api_contract_decision: { ref: prerequisites.api_contract_decision.ref, version: api.decision.decision_version, digest: prerequisites.api_contract_decision.digest, impact: api.decision.impact },
121
+ engineering_contract_approval_ref: approvalRef,
122
+ };
123
+ }
@@ -0,0 +1,238 @@
1
+ import { assertExistingSliceStructure, createApprovedExecutionContext, verifySliceContractApproval } from './approved-execution-context.mjs';
2
+ import path from 'node:path';
3
+ import { readFileSync, existsSync } from 'node:fs';
4
+ import { ROOT, read, parse, safe, hash, digest, ensure, schema, sourceApprovalPolicy } from './strategic-handoff-io.mjs';
5
+ import { parseContextContract } from './context-contract.mjs';
6
+ import { validateApprovalRecord } from './approval-record.mjs';
7
+ import { loadSkillRegistry } from './skill-registry.mjs';
8
+ import * as architecture from './backend-architecture.mjs';
9
+
10
+ const STAGES=['prepare','build','export','accept'];
11
+ const LATER=stage=>STAGES.slice(STAGES.indexOf(stage));
12
+ const OWNERS={governance:'工程接入负责人',architecture:'工程基线与边界审查负责人',openapi:'接口契约负责人',technical_design:'技术设计负责人','slice_contract.execution':'生命周期编排与合同批准方',slice_contract:'生命周期编排与合同批准方',ui_baseline:'产品设计负责人',build_artifact:'后端构建负责人',build:'后端构建负责人',deployment:'后端部署与验证负责人',strategic_handoff:'战略交付方',backend_delivery:'后端交付方',local_authorization:'目标仓接收负责人'};
13
+ const RECOVERY={governance:'完成工程接入登记或正常初始化,读取有效 yss-project.yaml 和根 CONTEXT.md 后重跑预检',architecture:'按工程接入与 backend-architecture 合同补齐原始登记、工程基线、观测 manifest,重新边界审查并编译',openapi:'回到 OpenAPI Draft 审查与 Freeze,绑定当前字节及真实批准',technical_design:'按已登记架构更新技术设计,补齐输入与审查并重新批准','slice_contract.execution':'读取当前 Slice 字节及本地主控批准,恢复 implementation-scope 原始决定后重试',slice_contract:'重新编译 Slice Implementation Contract 并取得当前合同批准',ui_baseline:'由产品设计负责人确认现有 UI 基线;有 UI 改动则回到原型设计',build_artifact:'绑定实际 JAR 文件并与构建 artifact_digest 核对',build:'使用批准合同正常构建,并记录实际输出摘要与验证',deployment:'部署当前构建,采集同进程身份与真实验证证据',strategic_handoff:'修正战略来源与批准,重新导出当前交接资产',backend_delivery:'从正常后端交付入口重新生成与当前来源一致的交付记录',local_authorization:'由目标仓负责人确认当前生产方、项目、route 和 slice 范围'};
14
+ const ASSETS={openapi:'build',technical_design:'build',slice_contract:'build',ui_baseline:'export',build:'export',build_artifact:'export',deployment:'export',strategic_handoff:'export',backend_delivery:'accept',local_authorization:'accept'};
15
+ const errorStatus=error=>error.code==='EXECUTION_CONTRACT_INVALID'?'conflict':/stale|漂移|过期|摘要/.test(error.message)?'stale':/unsupported|未知|不支持|版本/.test(error.message)?'unsupported':/不可读|ENOENT|缺少/.test(error.message)?'missing':'conflict';
16
+ const docBinding=(root,binding)=>{
17
+ const bytes=readFileSync(safe(root,binding.ref));
18
+ ensure(hash(bytes)===binding.digest,`stale: 资产摘要漂移: ${binding.ref}`);
19
+ return parse(bytes);
20
+ };
21
+ const fileBinding=(root,binding)=>{ ensure(binding?.ref&&binding?.digest,'缺少证据 ref/digest');const bytes=readFileSync(safe(root,binding.ref));ensure(bytes.length>0&&hash(bytes)===binding.digest,`stale: 证据为空或摘要漂移: ${binding.ref}`);return bytes; };
22
+ const same=(a,b)=>digest(a)===digest(b);
23
+
24
+ export function invalidPreflightInput(message) {
25
+ return {schema_version:1,result:'invalid-input',exit_code:2,stage:null,checks:[{code:'input.protocol',status:'conflict',owner:'交付编排方',source:'delivery-preflight-input',evidence:[],blocking_stages:STAGES,recovery:'按 delivery-preflight-input.schema.json 修正输入协议',message}]};
26
+ }
27
+
28
+ /** Installed profile owns backend technical authoring; caller governance_root cannot grant it. */
29
+ export function backendPreflightCapability() {
30
+ const profileRef=path.join(ROOT,'docs/process/harness-profile.yaml');
31
+ const profile=existsSync(profileRef)?read(profileRef):null;
32
+ const profileId=profile?.profile_id||'template.full';
33
+ const ownsBackend=!profile||profileId==='harness.backend-delivery';
34
+ const required=['.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs','.agents/skills/yss-technical-design/references/technical-design.schema.json','.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml'];
35
+ const missing=ownsBackend?required.filter(ref=>!existsSync(path.join(ROOT,ref))):[];
36
+ return {profile_id:profileId,owns_backend:ownsBackend,available:ownsBackend&&!missing.length,missing,
37
+ reason:ownsBackend?(missing.length?`后端验证运行时分发不完整: ${missing.join(', ')}`:'当前安装拥有后端技术设计与合同验证能力'):`${profileId} 不拥有后端技术设计与实现合同编译职责;由主模板或 backend profile 验证`};
38
+ }
39
+ function requireBackendCapability(key) {
40
+ const capability=backendPreflightCapability();
41
+ if(capability.available)return;
42
+ const error=new TypeError(`unsupported: ${capability.reason}`);
43
+ error.code=key==='technical_design'?'PREFLIGHT_TECHNICAL_DESIGN_UNSUPPORTED':'PREFLIGHT_SLICE_CONTRACT_UNSUPPORTED';
44
+ error.recovery=capability.owns_backend?'恢复当前后端 profile 的完整验证运行时分发,再从正常预检入口重跑':'将原始技术资产与批准绑定交给主模板或 backend 工程负责人核验;本 profile 通过已导出的受控交付包接收,不安装另一方创作技能';
45
+ throw error;
46
+ }
47
+
48
+ /** Read-only: never executes input commands, starts services, unpacks archives or writes receipts. */
49
+ export async function preflightDelivery(input,{stage,root=process.cwd()}={}) {
50
+ try { ensure(STAGES.includes(stage),'未知阶段;必须是 prepare|build|export|accept');schema(input,'docs/process/schemas/delivery-preflight-input.schema.json'); }
51
+ catch(error) { return invalidPreflightInput(error.message); }
52
+ root=path.resolve(root,input.governance_root||'.');
53
+ const deliveryKind=input.delivery_kind||'complete';
54
+ const checks=[], documents={}, valid=new Set(), assets=input.assets||{};
55
+ let execution;
56
+ const downstream=key=>deliveryKind==='strategic-handoff'&&(key.startsWith('architecture')||key.startsWith('slice_contract')||['technical_design','slice_contract','build','build_artifact','deployment','backend_delivery','local_authorization'].includes(key)||(key==='openapi'&&!input.assets?.openapi));
57
+ const add=(key,status,message,{code=key,from='prepare',evidence=[],source=key,recovery=RECOVERY[key]||RECOVERY.architecture}={})=>checks.push({code,status,owner:OWNERS[key]||OWNERS.architecture,source,evidence,blocking_stages:downstream(key)?[]:LATER(from),recovery,message});
58
+ const run=async(key,action,options={})=>{
59
+ try { await action();valid.add(key);add(key,'ready','当前原始资产与语义核验通过',options); }
60
+ catch(error) { add(key,errorStatus(error),error.message,{...options,...(error.recovery?{recovery:error.recovery}:{}),code:typeof error.code==='string'?error.code:options.code||key}); }
61
+ };
62
+ const pending=(key,deps,options)=>add(key,'pending',`尚不可判定,依赖未就绪: ${deps.join(', ')}`,options);
63
+ await run('governance',()=>{
64
+ const project=read(safe(root,'yss-project.yaml'));
65
+ ensure(project.schema_version===1&&project.repository_mode==='project-instance','交付预检只消费显式 project-instance;未知身份不得推测');
66
+ parseContextContract({root});
67
+ },{source:'yss-project.yaml / CONTEXT.md',evidence:['yss-project.yaml','CONTEXT.md']});
68
+ if(input.planned_initialization) add('governance','not-applicable','此为拟初始化目标的只读诊断;预检不初始化,缺失的当前阶段前提仍明确阻断',{code:'governance.planned-initialization'});
69
+
70
+ const bindings=input.architecture_bindings||{};
71
+ for(const key of ['repository_registration','engineering_baseline','manifest']) {
72
+ if(!bindings[key]) add('architecture','missing',`缺少原始架构来源: ${key}`,{code:`architecture.${key}`,source:key});
73
+ else await run(`architecture.${key}`,()=>{documents[key]=docBinding(root,bindings[key]);verifyArchitectureDocument(key,documents[key],input.scope,root);},{source:key,evidence:[bindings[key].ref]});
74
+ }
75
+ if(!input.architecture_identity) add('architecture','missing','缺少 architecture_identity;不能从目录或数据库字符串推断',{code:'architecture.identity'});
76
+ else await run('architecture.identity',()=>{
77
+ architecture.validateArchitectureIdentity(input.architecture_identity);
78
+ if(input.architecture_identity.source_kind==='existing-registration')ensure(input.architecture_identity.repository_id===input.scope.repository_id&&input.architecture_identity.project_id===input.scope.project_id,'架构身份与预检目标仓库/项目不一致');
79
+ },{source:'architecture_identity'});
80
+ if(valid.has('architecture.identity'))await run('architecture.profile',()=>{ensure(architecture.validateArchitectureIdentity(input.architecture_identity).maturity==='supported','不支持未达到 supported 的 architecture_profile');},{source:'architecture_profile'});
81
+ if(['build','export','accept'].includes(stage)&&assets.slice_contract)await run('slice_contract.execution',()=>{requireBackendCapability('slice_contract');execution=createApprovedExecutionContext(assets.slice_contract,{root});},{from:'build',source:assets.slice_contract.approval_ref||'slice_contract',evidence:[assets.slice_contract.ref,...(assets.slice_contract.approval_ref?[assets.slice_contract.approval_ref]:[])]});
82
+ const archDeps=['architecture.identity',...['repository_registration','engineering_baseline','manifest'].map(x=>`architecture.${x}`)];
83
+ if(archDeps.every(x=>valid.has(x)))await run('architecture',()=>{
84
+ ensure(typeof architecture.verifyArchitectureEvidence==='function','不支持既有工程原始证据验证,请同步支持该身份版本的模板运行时');
85
+ architecture.verifyArchitectureEvidence(input.architecture_identity,bindings,{root,registry:loadSkillRegistry(),execution});
86
+ },{source:'backend-architecture',evidence:Object.values(bindings).map(x=>x.ref)});
87
+ else pending('architecture',archDeps.filter(x=>!valid.has(x)),{source:'backend-architecture'});
88
+
89
+ // Load the delivery basis before checking deployment; dependency order must not hide drift.
90
+ if(assets.backend_delivery)try{documents.backend_delivery=docBinding(root,assets.backend_delivery);}catch{}
91
+ for(const [key,earliest] of Object.entries(ASSETS)) {
92
+ const from=key==='backend_delivery'&&deliveryKind==='backend-delivery'?'export':earliest;
93
+ if(deliveryKind==='backend-delivery'&&['ui_baseline','strategic_handoff'].includes(key)&&!assets[key])continue;
94
+ if(key==='local_authorization'&&documents.backend_delivery?.schema_version!==2) {
95
+ add(key,'not-applicable','当前未确认交付 v2;本地授权只在受控目标绑定协议 v2 生效',{from});continue;
96
+ }
97
+ if(key==='ui_baseline'&&input.scope.ui_mode==='not-applicable') {
98
+ if(input.scope.ui_not_applicable_reason?.trim())add(key,'not-applicable',input.scope.ui_not_applicable_reason,{from});
99
+ else add(key,'missing','无 UI 影响必须说明不适用原因',{from});
100
+ continue;
101
+ }
102
+ if(!assets[key]) {add(key,'missing',`缺少 ${key} 原始资产绑定${STAGES.indexOf(stage)<STAGES.indexOf(from)?`;到 ${from} 阶段前补齐`:''}`,{from});continue;}
103
+ await run(key,async()=>{
104
+ const binding=assets[key];
105
+ if(['technical_design','slice_contract'].includes(key))requireBackendCapability(key);
106
+ if(key==='build_artifact'){fileBinding(root,binding);ensure(documents.build?.artifact_digest===binding.digest,'stale: 实际制品与构建记录摘要不一致');return;}
107
+ const data=documents[key]=docBinding(root,binding);
108
+ await verifyAsset(key,data,binding,{root,input,documents,assets,execution});
109
+ },{from,source:assets[key].ref,evidence:[assets[key].ref,...(assets[key].approval_ref?[assets[key].approval_ref]:[])]});
110
+ }
111
+ if(deliveryKind==='backend-delivery')for(const key of ['ui_baseline','strategic_handoff'])if(!assets[key])add(key,valid.has('backend_delivery')?'ready':'pending',valid.has('backend_delivery')?'已通过交付绑定的战略包完成来源与 UI 基线只读复验':'尚不可判定,等待后端交付绑定的战略包核验',{code:`${key}.delivery-package`,from:'export',source:'backend_delivery.strategic_bundle_ref',evidence:assets.backend_delivery?[assets.backend_delivery.ref]:[]});
112
+ // A present but unreadable dependency must not turn cross-asset agreement into a success.
113
+ if(assets.slice_contract&&(!valid.has('technical_design')||!valid.has('architecture')))pending('slice_contract',['technical_design','architecture'].filter(x=>!valid.has(x)),{code:'slice_contract.dependencies',from:'build'});
114
+ if(assets.deployment&&!valid.has('backend_delivery'))pending('deployment',['backend_delivery'],{code:'deployment.delivery-basis',from:'export'});
115
+ const blocked=checks.some(x=>!['ready','not-applicable'].includes(x.status)&&x.blocking_stages.includes(stage));
116
+ return {schema_version:1,result:blocked?'blocked':'ready',exit_code:blocked?1:0,stage,checks};
117
+ }
118
+
119
+ async function approved(root,binding,gates) {
120
+ ensure(binding.approval_ref&&binding.id&&binding.version,'缺少当前资产 id/version/approval_ref');
121
+ const record=read(safe(root,binding.approval_ref));
122
+ const roles=sourceApprovalPolicy(read(safe(root,'docs/agents/digital-human-roles.yaml')));
123
+ validateApprovalRecord(record,{rolesDoc:roles,requireApproved:true,root,read:ref=>readFileSync(safe(root,path.relative(root,ref).split(path.sep).join('/')))});
124
+ ensure(gates.includes(record.gate_id),'资产批准使用错误门禁');
125
+ ensure(record.artifact_bindings?.some(x=>x.id===binding.id&&x.version===binding.version&&x.digest===binding.digest),'stale: 批准未绑定当前资产身份、版本及字节');
126
+ }
127
+
128
+ async function verifyAsset(key,data,binding,{root,input,documents,assets,execution}) {
129
+ ensure(data&&typeof data==='object'&&!Array.isArray(data),`${key} 必须是结构化资产`);
130
+ if(key==='openapi') {
131
+ ensure(/^3\.1\./.test(data.openapi)&&data.info?.title&&data.info?.version&&data.paths,'必须提供完整 OpenAPI 3.1 文档');
132
+ const operations=Object.values(data.paths).flatMap(item=>Object.entries(item).filter(([method])=>['get','put','post','delete','options','head','patch','trace'].includes(method)).map(([,operation])=>operation.operationId));
133
+ ensure(new Set(operations).size===operations.length&&operations.every(x=>typeof x==='string'&&x),'OpenAPI operationId 缺失或重复');
134
+ ensure(input.scope.operation_ids.every(id=>operations.includes(id)),'预检接口范围不在冻结 OpenAPI 中');
135
+ await approved(root,binding,['gate.engineering-contract-approved','gate.openapi-frozen','gate.openapi-freeze-confirmed']);
136
+ } else if(key==='technical_design') {
137
+ schema(data,'.agents/skills/yss-technical-design/references/technical-design.schema.json');
138
+ ensure(data.schema_version===2&&data.status==='approved','技术设计必须是已批准 v2 合同');
139
+ ensure(data.digest===digest(Object.fromEntries(Object.entries(data).filter(([k])=>k!=='digest'))),'stale: 技术设计自摘要不匹配');
140
+ ensure(data.architecture?.family===input.architecture_identity?.architecture_family,'技术设计与登记架构冲突');
141
+ for(const asset of data.inputs)fileBinding(root,asset);
142
+ const {validateTechnicalDesign}=await import('../../.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs');
143
+ await validateTechnicalDesign(data,{root,sliceRef:input.scope.slice_id,readOnly:true,execution});
144
+ await approved(root,binding,['gate.engineering-contract-approved','gate.technical-design-approved']);
145
+ } else if(key==='slice_contract') {
146
+ const contract=data.slice_contract||data;
147
+ assertExistingSliceStructure(contract);
148
+ ensure(contract.schema_version===2&&contract.status==='approved'&&contract.slice_id===input.scope.slice_id,'Slice 合同版本、批准状态或切片不匹配');
149
+ ensure(binding.id===contract.contract_id&&binding.version===contract.contract_version,'Slice 合同身份与引用不一致');
150
+ const compiler=read(safe(ROOT,'.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml'));
151
+ for(const [section,fields]of Object.entries(compiler.slice_contract_required))for(const field of fields)ensure(Object.hasOwn(section==='root'?contract:contract[section]||{},field),`合同缺少 ${section}.${field}`);
152
+ ensure(contract.readiness.blockers.length===0&&contract.readiness.stale_inputs.length===0,'Slice 合同仍有 blocker 或 stale input');
153
+ const resolution=contract.resolution;
154
+ ensure(resolution.freshness==='current','Slice resolution 非 current');
155
+ ensure(resolution.registry_digest===digest(loadSkillRegistry()).slice(7)&&resolution.compiler_contract_digest===digest(compiler).slice(7),'stale: 编译事实源已变化,需重新编译');
156
+ ensure(same(resolution.architecture_identity,input.architecture_identity),'Slice 架构与登记不一致');
157
+ ensure(resolution.architecture_identity_digest===architecture.architectureDigest(input.architecture_identity),'stale: Slice 架构摘要漂移');
158
+ if(assets.technical_design)ensure(resolution.technical_design?.ref===assets.technical_design.ref&&resolution.technical_design?.digest===assets.technical_design.digest,'Slice 技术设计绑定不一致');
159
+ verifySliceContractApproval(binding,{root,contract});
160
+ } else if(key==='strategic_handoff') {
161
+ const {inspectSource}=await import('./strategic-handoff.mjs');
162
+ await inspectSource(root,binding.ref);
163
+ const {uiBaselineRef,uiBaselineKind}=await import('./ui-baseline.mjs');
164
+ const ui=uiBaselineRef(data);
165
+ ensure(input.scope.ui_mode!=='not-applicable','战略交接含 UI 基线,不能声明为无 UI 影响');
166
+ ensure(uiBaselineKind(data)===(input.scope.ui_mode==='prototype'?'prototype':'existing-ui-baseline'),'战略交接与预检 UI 来源类型不一致');
167
+ if(assets.ui_baseline)ensure(assets.ui_baseline.ref===`${ui.persisted_ref}/${ui.manifest_ref}`,'战略交接 UI 基线与预检输入不一致');
168
+ } else if(key==='ui_baseline') {
169
+ if(input.scope.ui_mode==='prototype') {
170
+ const {validateVisualBaseline}=await import('../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs');
171
+ const result=await validateVisualBaseline(data,{bundleRoot:path.dirname(safe(root,binding.ref))});
172
+ ensure(!result.errors.length,result.errors.join('; '));
173
+ } else {
174
+ const modulePath=path.join(ROOT,'scripts/lib/existing-ui-baseline.mjs');
175
+ ensure(existsSync(modulePath),'不支持 existing-ui-baseline 的当前运行时');
176
+ const module=await import('./existing-ui-baseline.mjs');
177
+ const verify=module.validateExistingUiBaseline||module.verifyExistingUiBaseline;
178
+ ensure(typeof verify==='function','不支持既有 UI 基线验证接口');
179
+ const result=await verify(data,{bundleRoot:path.dirname(safe(root,binding.ref))});
180
+ ensure(!result?.errors?.length&&result?.result!=='blocked',JSON.stringify(result));
181
+ }
182
+ ensure((input.scope.ui_mode==='prototype'?data.status==='approved':['ready-for-human','approved'].includes(data.status))&&data.baseline_id===binding.id&&data.version===binding.version,'UI 基线身份、版本或待确认状态不一致');
183
+ if(data.openapi&&assets.openapi)ensure(data.openapi.digest===assets.openapi.digest,'UI 基线与冻结 API 字节不一致');
184
+ await approved(root,binding,['gate.product-design-approved','gate.user-confirmation']);
185
+ } else if(key==='build') {
186
+ // Same build shape used by backend-delivery, captured independently before packaging.
187
+ const deliverySchema=read(safe(ROOT,'docs/process/schemas/backend-delivery.schema.json'));
188
+ const buildRules=deliverySchema.properties.build;
189
+ // Validate in memory to avoid writing a generated schema: check the published required fields.
190
+ for(const field of buildRules.required||[])ensure(Object.hasOwn(data,field),`构建缺少交付协议字段: ${field}`);
191
+ ensure(/^[a-f0-9]{40}$/.test(data.source_commit),'构建 source_commit 必须为固定 Git 提交');
192
+ if(documents.manifest?.source?.base_commit)ensure(documents.manifest.source.base_commit===data.source_commit,'构建与观测 manifest 的固定源码提交不一致');
193
+ ensure(/^sha256:[0-9a-f]{64}$/.test(data.artifact_digest),'构建制品摘要无效');
194
+ ensure(Object.keys(data).every(key=>Object.hasOwn(buildRules.properties,key)),'构建包含交付协议未定义字段');
195
+ } else if(key==='deployment') {
196
+ schema(data,'docs/process/schemas/backend-delivery-verification.schema.json');
197
+ ensure(data.kind==='backend-deployment','部署证据 kind 必须为 backend-deployment');
198
+ for(const result of data.results) {
199
+ ensure(result.exit_code===0&&Number.isFinite(Date.parse(result.executed_at))&&Date.parse(result.executed_at)<=Date.now()+60000,'部署执行结果或时间无效');
200
+ result.evidence.forEach(file=>fileBinding(root,file));
201
+ }
202
+ if(documents.backend_delivery) {
203
+ const {backendDeliveryBasis}=await import('./backend-delivery.mjs');
204
+ ensure(data.subject_digest===backendDeliveryBasis(documents.backend_delivery),'stale: 部署验证未绑定当前交付依据');
205
+ }
206
+ } else if(key==='backend_delivery') {
207
+ schema(data,`docs/process/schemas/backend-delivery${data.schema_version===2?'-v2':''}.schema.json`);
208
+ ensure(data.scope.slice_id===input.scope.slice_id&&input.scope.operation_ids.every(id=>data.scope.operation_ids.includes(id)),'后端交付切片/接口范围不匹配');
209
+ for(const asset of ['openapi','slice_contract'])if(assets[asset])ensure(data[asset].ref===assets[asset].ref&&data[asset].digest===assets[asset].digest,'后端交付引用与预检输入不一致');
210
+ for(const asset of [data.environment.test_data,...Object.values(data.verification)])fileBinding(root,asset);
211
+ if(assets.build)ensure(same(data.build,documents.build),'后端交付构建与预检构建不一致');
212
+ if(assets.deployment)ensure(data.verification.deployment.ref===assets.deployment.ref&&data.verification.deployment.digest===assets.deployment.digest,'后端交付部署验证不一致');
213
+ const {inspectBackendDelivery}=await import('./backend-delivery.mjs');
214
+ await inspectBackendDelivery(root,binding.ref,{readOnly:true});
215
+ } else if(key==='local_authorization') {
216
+ throw new TypeError('不支持尚未确认的目标授权协议;须先执行 S3a 并使用确认后的只读授权验证入口');
217
+ }
218
+ }
219
+
220
+ function verifyArchitectureDocument(key,data,scope,root) {
221
+ ensure(data&&typeof data==='object'&&!Array.isArray(data),'原始架构资产必须是对象');
222
+ architecture.validateArchitectureIdentity(data.architecture_identity);
223
+ if(data.architecture_identity.schema_version!==2)return;
224
+ ensure(data.repository_id===scope.repository_id&&data.project_id===scope.project_id,'原始来源与目标仓库/项目不一致');
225
+ if(key==='repository_registration') {
226
+ ensure(data.status==='current','stale: 工程登记不是 current');
227
+ for(const field of ['local_worktree','project_root','owner','repository_url'])ensure(typeof data[field]==='string'&&data[field].trim(),`工程登记缺少 ${field}`);
228
+ ensure(Array.isArray(data.verification_commands)&&data.verification_commands.length,'工程登记缺少可执行验证入口');
229
+ } else {
230
+ ensure(data.schema_version===1&&data.kind===(key==='manifest'?'existing-project-observation':'existing-engineering-baseline'),'既有原始资产来源类型/版本不匹配');
231
+ ensure(data.source&&/^[a-f0-9]{40}$/.test(data.source.base_commit)&&Array.isArray(data.source.files)&&data.source.files.length&&Array.isArray(data.source.roots)&&data.source.roots.length,'原始资产缺少固定源码提交/文件集/根范围');
232
+ ensure(Array.isArray(data.build_units)&&data.build_units.length,'原始资产缺少实际构建单元');
233
+ if(key==='engineering_baseline') {
234
+ ensure(data.status==='current','stale: 工程基线不是 current');
235
+ fileBinding(root,data.boundary_review);
236
+ }
237
+ }
238
+ }