create-yss-spec 3.3.8 → 3.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (908) hide show
  1. package/README.md +1 -1
  2. package/package.json +2 -2
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -13
  4. package/template/.agents/skills/archify/SKILL.md +1 -1
  5. package/template/.agents/skills/code-review/SKILL.md +12 -8
  6. package/template/.agents/skills/file-export-download/SKILL.md +1 -1
  7. package/template/.agents/skills/frontend-commit/SKILL.md +1 -1
  8. package/template/.agents/skills/java-backend-commit/SKILL.md +1 -1
  9. package/template/.agents/skills/llm-wiki/SKILL.md +1 -6
  10. package/template/.agents/skills/lombok/SKILL.md +10 -336
  11. package/template/.agents/skills/lombok/references/annotation-examples.md +307 -0
  12. package/template/.agents/skills/maintaining-skills/SKILL.md +2 -1
  13. package/template/.agents/skills/maintaining-skills/references/authoring.md +27 -0
  14. package/template/.agents/skills/mapstruct/SKILL.md +11 -318
  15. package/template/.agents/skills/mapstruct/references/annotation-examples.md +300 -0
  16. package/template/.agents/skills/page-form-module/SKILL.md +1 -1
  17. package/template/.agents/skills/page-skeleton/SKILL.md +1 -1
  18. package/template/.agents/skills/theme-token-usage/SKILL.md +1 -1
  19. package/template/.agents/skills/to-tickets/SKILL.md +1 -1
  20. package/template/.agents/skills/using-git-worktrees/SKILL.md +1 -1
  21. package/template/.agents/skills/wayfinder/SKILL.md +1 -1
  22. package/template/.agents/skills/yedit-table-usage/SKILL.md +1 -1
  23. package/template/.agents/skills/yss-api-integration/SKILL.md +1 -1
  24. package/template/.agents/skills/yss-audit-log/SKILL.md +1 -1
  25. package/template/.agents/skills/yss-cache/SKILL.md +1 -1
  26. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
  27. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  28. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  29. package/template/.agents/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  30. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  31. package/template/.agents/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  32. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
  33. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
  34. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  35. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
  36. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
  37. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
  38. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
  39. package/template/.agents/skills/yss-design-system/SKILL.md +19 -19
  40. package/template/.agents/skills/yss-design-system/references/data-quality-theme.md +13 -0
  41. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -1
  42. package/template/.agents/skills/yss-design-system/references/design-system.md +7 -9
  43. package/template/.agents/skills/yss-distributed-id/SKILL.md +1 -1
  44. package/template/.agents/skills/yss-dto/SKILL.md +5 -1
  45. package/template/.agents/skills/yss-excel-mvc/SKILL.md +1 -1
  46. package/template/.agents/skills/yss-exception/SKILL.md +5 -1
  47. package/template/.agents/skills/yss-formily/SKILL.md +21 -258
  48. package/template/.agents/skills/yss-formily-schema-generator/SKILL.md +1 -1
  49. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  50. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  51. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  52. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  53. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  54. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  55. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  56. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  57. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  58. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  59. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  60. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  61. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  62. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  63. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  64. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  65. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  66. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  67. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  68. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  69. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  70. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  71. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  72. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  73. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  74. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  75. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  76. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  77. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  78. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  79. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  80. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  81. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  82. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  83. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  84. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  85. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  86. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  87. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  88. package/template/.agents/skills/yss-hook/SKILL.md +1 -1
  89. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  90. package/template/.agents/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  91. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  92. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
  93. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  94. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  95. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
  96. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  97. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
  98. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  99. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
  100. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  101. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  102. package/template/.agents/skills/yss-mybatis/SKILL.md +4 -0
  103. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +1 -1
  104. package/template/.agents/skills/yss-openapi-governance/SKILL.md +3 -1
  105. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -4
  106. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
  107. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  108. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -1
  109. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
  110. package/template/.agents/skills/yss-prototype-stage/SKILL.md +13 -9
  111. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  112. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  113. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  114. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  115. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  116. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  117. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  118. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  119. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  120. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  121. package/template/.agents/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  122. package/template/.agents/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  123. package/template/.agents/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  124. package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  125. package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  126. package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  127. package/template/.agents/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  128. package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  129. package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  130. package/template/.agents/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  131. package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  132. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  133. package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  134. package/template/.agents/skills/yss-repository/SKILL.md +4 -0
  135. package/template/.agents/skills/yss-research/SKILL.md +1 -1
  136. package/template/.agents/skills/yss-resilience4j/SKILL.md +1 -1
  137. package/template/.agents/skills/yss-security-algorithm/SKILL.md +1 -1
  138. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  139. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  140. package/template/.agents/skills/yss-tactical-design/SKILL.md +5 -1
  141. package/template/.agents/skills/yss-technical-design/SKILL.md +4 -0
  142. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  143. package/template/.agents/skills/yss-ui/SKILL.md +4 -3
  144. package/template/.agents/skills/yss-ui/references/component-routing.md +11 -10
  145. package/template/.agents/skills/yss-ui/references/specialized-components.md +52 -0
  146. package/template/.agents/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  147. package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
  148. package/template/.agents/skills/yss-use-table-height/SKILL.md +1 -1
  149. package/template/.agents/skills/yss-use-tree-height/SKILL.md +1 -1
  150. package/template/.agents/skills/yss-userinfo/SKILL.md +1 -1
  151. package/template/.agents/skills/yss-validation/SKILL.md +5 -1
  152. package/template/.agents/skills/yss-web-controller/SKILL.md +5 -1
  153. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
  154. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  155. package/template/.agents/skills/ytable-usage/SKILL.md +1 -1
  156. package/template/.agents/skills/ytree-usage/SKILL.md +1 -1
  157. package/template/.codex/skills/archify/SKILL.md +1 -1
  158. package/template/.codex/skills/code-review/SKILL.md +12 -8
  159. package/template/.codex/skills/data-analytics/skills/analyze-data-quality/SKILL.md +1 -1
  160. package/template/.codex/skills/data-analytics/skills/build-dashboard/SKILL.md +1 -1
  161. package/template/.codex/skills/data-analytics/skills/build-report/SKILL.md +1 -1
  162. package/template/.codex/skills/data-analytics/skills/design-kpis/SKILL.md +1 -1
  163. package/template/.codex/skills/data-analytics/skills/gather-business-context/SKILL.md +1 -1
  164. package/template/.codex/skills/data-analytics/skills/index/SKILL.md +1 -1
  165. package/template/.codex/skills/data-analytics/skills/jupyter-notebooks/SKILL.md +1 -1
  166. package/template/.codex/skills/data-analytics/skills/kpi-reporting/SKILL.md +1 -1
  167. package/template/.codex/skills/data-analytics/skills/market-sizing/SKILL.md +1 -1
  168. package/template/.codex/skills/data-analytics/skills/metric-diagnostics/SKILL.md +1 -1
  169. package/template/.codex/skills/data-analytics/skills/product-business-analysis/SKILL.md +1 -1
  170. package/template/.codex/skills/data-analytics/skills/spreadsheets/SKILL.md +1 -1
  171. package/template/.codex/skills/data-analytics/skills/validate-data/SKILL.md +1 -1
  172. package/template/.codex/skills/data-analytics/skills/visualize-data/SKILL.md +1 -1
  173. package/template/.codex/skills/file-export-download/SKILL.md +1 -1
  174. package/template/.codex/skills/frontend-commit/SKILL.md +1 -1
  175. package/template/.codex/skills/java-backend-commit/SKILL.md +1 -1
  176. package/template/.codex/skills/llm-wiki/SKILL.md +1 -6
  177. package/template/.codex/skills/lombok/SKILL.md +10 -336
  178. package/template/.codex/skills/lombok/references/annotation-examples.md +307 -0
  179. package/template/.codex/skills/maintaining-skills/SKILL.md +2 -1
  180. package/template/.codex/skills/maintaining-skills/references/authoring.md +27 -0
  181. package/template/.codex/skills/mapstruct/SKILL.md +11 -318
  182. package/template/.codex/skills/mapstruct/references/annotation-examples.md +300 -0
  183. package/template/.codex/skills/page-form-module/SKILL.md +1 -1
  184. package/template/.codex/skills/page-skeleton/SKILL.md +1 -1
  185. package/template/.codex/skills/product-design/skills/audit/SKILL.md +1 -1
  186. package/template/.codex/skills/product-design/skills/design-qa/SKILL.md +1 -1
  187. package/template/.codex/skills/product-design/skills/get-context/SKILL.md +1 -1
  188. package/template/.codex/skills/product-design/skills/ideate/SKILL.md +1 -1
  189. package/template/.codex/skills/product-design/skills/image-to-code/SKILL.md +1 -1
  190. package/template/.codex/skills/product-design/skills/index/SKILL.md +1 -1
  191. package/template/.codex/skills/product-design/skills/prototype/SKILL.md +1 -1
  192. package/template/.codex/skills/product-design/skills/research/SKILL.md +1 -1
  193. package/template/.codex/skills/product-design/skills/user-context/SKILL.md +1 -1
  194. package/template/.codex/skills/theme-token-usage/SKILL.md +1 -1
  195. package/template/.codex/skills/to-tickets/SKILL.md +1 -1
  196. package/template/.codex/skills/using-git-worktrees/SKILL.md +1 -1
  197. package/template/.codex/skills/wayfinder/SKILL.md +1 -1
  198. package/template/.codex/skills/yedit-table-usage/SKILL.md +1 -1
  199. package/template/.codex/skills/yss-api-integration/SKILL.md +1 -1
  200. package/template/.codex/skills/yss-audit-log/SKILL.md +1 -1
  201. package/template/.codex/skills/yss-cache/SKILL.md +1 -1
  202. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
  203. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  204. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  205. package/template/.codex/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  206. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  207. package/template/.codex/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  208. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
  209. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
  210. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  211. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
  212. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
  213. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
  214. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
  215. package/template/.codex/skills/yss-design-system/SKILL.md +19 -19
  216. package/template/.codex/skills/yss-design-system/references/data-quality-theme.md +13 -0
  217. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -1
  218. package/template/.codex/skills/yss-design-system/references/design-system.md +7 -9
  219. package/template/.codex/skills/yss-distributed-id/SKILL.md +1 -1
  220. package/template/.codex/skills/yss-dto/SKILL.md +5 -1
  221. package/template/.codex/skills/yss-excel-mvc/SKILL.md +1 -1
  222. package/template/.codex/skills/yss-exception/SKILL.md +5 -1
  223. package/template/.codex/skills/yss-formily/SKILL.md +21 -258
  224. package/template/.codex/skills/yss-formily-schema-generator/SKILL.md +1 -1
  225. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  226. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  227. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  228. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  229. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  230. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  231. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  232. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  233. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  234. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  235. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  236. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  237. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  238. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  239. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  240. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  241. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  242. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  243. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  244. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  245. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  246. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  247. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  248. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  249. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  250. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  251. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  252. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  253. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  254. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  255. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  256. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  257. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  258. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  259. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  260. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  261. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  262. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  263. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  264. package/template/.codex/skills/yss-hook/SKILL.md +1 -1
  265. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  266. package/template/.codex/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  267. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  268. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
  269. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  270. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  271. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
  272. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  273. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
  274. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  275. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
  276. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  277. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  278. package/template/.codex/skills/yss-mybatis/SKILL.md +4 -0
  279. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +1 -1
  280. package/template/.codex/skills/yss-openapi-governance/SKILL.md +3 -1
  281. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -4
  282. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
  283. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  284. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -1
  285. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
  286. package/template/.codex/skills/yss-prototype-stage/SKILL.md +13 -9
  287. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  288. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  289. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  290. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  291. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  292. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  293. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  294. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  295. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  296. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  297. package/template/.codex/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  298. package/template/.codex/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  299. package/template/.codex/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  300. package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  301. package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  302. package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  303. package/template/.codex/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  304. package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  305. package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  306. package/template/.codex/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  307. package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  308. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  309. package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  310. package/template/.codex/skills/yss-repository/SKILL.md +4 -0
  311. package/template/.codex/skills/yss-research/SKILL.md +1 -1
  312. package/template/.codex/skills/yss-resilience4j/SKILL.md +1 -1
  313. package/template/.codex/skills/yss-security-algorithm/SKILL.md +1 -1
  314. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  315. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  316. package/template/.codex/skills/yss-tactical-design/SKILL.md +5 -1
  317. package/template/.codex/skills/yss-technical-design/SKILL.md +4 -0
  318. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  319. package/template/.codex/skills/yss-ui/SKILL.md +4 -3
  320. package/template/.codex/skills/yss-ui/references/component-routing.md +11 -10
  321. package/template/.codex/skills/yss-ui/references/specialized-components.md +52 -0
  322. package/template/.codex/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  323. package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
  324. package/template/.codex/skills/yss-use-table-height/SKILL.md +1 -1
  325. package/template/.codex/skills/yss-use-tree-height/SKILL.md +1 -1
  326. package/template/.codex/skills/yss-userinfo/SKILL.md +1 -1
  327. package/template/.codex/skills/yss-validation/SKILL.md +5 -1
  328. package/template/.codex/skills/yss-web-controller/SKILL.md +5 -1
  329. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
  330. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  331. package/template/.codex/skills/ytable-usage/SKILL.md +1 -1
  332. package/template/.codex/skills/ytree-usage/SKILL.md +1 -1
  333. package/template/.cursor/skills/archify/SKILL.md +1 -1
  334. package/template/.cursor/skills/code-review/SKILL.md +12 -8
  335. package/template/.cursor/skills/file-export-download/SKILL.md +1 -1
  336. package/template/.cursor/skills/frontend-commit/SKILL.md +1 -1
  337. package/template/.cursor/skills/java-backend-commit/SKILL.md +1 -1
  338. package/template/.cursor/skills/llm-wiki/SKILL.md +1 -6
  339. package/template/.cursor/skills/lombok/SKILL.md +10 -336
  340. package/template/.cursor/skills/lombok/references/annotation-examples.md +307 -0
  341. package/template/.cursor/skills/maintaining-skills/SKILL.md +2 -1
  342. package/template/.cursor/skills/maintaining-skills/references/authoring.md +27 -0
  343. package/template/.cursor/skills/mapstruct/SKILL.md +11 -318
  344. package/template/.cursor/skills/mapstruct/references/annotation-examples.md +300 -0
  345. package/template/.cursor/skills/page-form-module/SKILL.md +1 -1
  346. package/template/.cursor/skills/page-skeleton/SKILL.md +1 -1
  347. package/template/.cursor/skills/theme-token-usage/SKILL.md +1 -1
  348. package/template/.cursor/skills/to-tickets/SKILL.md +1 -1
  349. package/template/.cursor/skills/using-git-worktrees/SKILL.md +1 -1
  350. package/template/.cursor/skills/wayfinder/SKILL.md +1 -1
  351. package/template/.cursor/skills/yedit-table-usage/SKILL.md +1 -1
  352. package/template/.cursor/skills/yss-api-integration/SKILL.md +1 -1
  353. package/template/.cursor/skills/yss-audit-log/SKILL.md +1 -1
  354. package/template/.cursor/skills/yss-cache/SKILL.md +1 -1
  355. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
  356. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  357. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  358. package/template/.cursor/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  359. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  360. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  361. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
  362. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
  363. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  364. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
  365. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
  366. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
  367. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
  368. package/template/.cursor/skills/yss-design-system/SKILL.md +19 -19
  369. package/template/.cursor/skills/yss-design-system/references/data-quality-theme.md +13 -0
  370. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -1
  371. package/template/.cursor/skills/yss-design-system/references/design-system.md +7 -9
  372. package/template/.cursor/skills/yss-distributed-id/SKILL.md +1 -1
  373. package/template/.cursor/skills/yss-dto/SKILL.md +5 -1
  374. package/template/.cursor/skills/yss-excel-mvc/SKILL.md +1 -1
  375. package/template/.cursor/skills/yss-exception/SKILL.md +5 -1
  376. package/template/.cursor/skills/yss-formily/SKILL.md +21 -258
  377. package/template/.cursor/skills/yss-formily-schema-generator/SKILL.md +1 -1
  378. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  379. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  380. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  381. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  382. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  383. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  384. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  385. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  386. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  387. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  388. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  389. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  390. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  391. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  392. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  393. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  394. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  395. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  396. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  397. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  398. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  399. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  400. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  401. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  402. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  403. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  404. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  405. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  406. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  407. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  408. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  409. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  410. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  411. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  412. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  413. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  414. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  415. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  416. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  417. package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
  418. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  419. package/template/.cursor/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  420. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  421. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
  422. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  423. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  424. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
  425. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  426. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
  427. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  428. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
  429. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  430. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  431. package/template/.cursor/skills/yss-mybatis/SKILL.md +4 -0
  432. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +1 -1
  433. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +3 -1
  434. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -4
  435. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
  436. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  437. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -1
  438. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
  439. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +13 -9
  440. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  441. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  442. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  443. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  444. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  445. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  446. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  447. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  448. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  449. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  450. package/template/.cursor/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  451. package/template/.cursor/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  452. package/template/.cursor/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  453. package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  454. package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  455. package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  456. package/template/.cursor/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  457. package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  458. package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  459. package/template/.cursor/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  460. package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  461. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  462. package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  463. package/template/.cursor/skills/yss-repository/SKILL.md +4 -0
  464. package/template/.cursor/skills/yss-research/SKILL.md +1 -1
  465. package/template/.cursor/skills/yss-resilience4j/SKILL.md +1 -1
  466. package/template/.cursor/skills/yss-security-algorithm/SKILL.md +1 -1
  467. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  468. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  469. package/template/.cursor/skills/yss-tactical-design/SKILL.md +5 -1
  470. package/template/.cursor/skills/yss-technical-design/SKILL.md +4 -0
  471. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  472. package/template/.cursor/skills/yss-ui/SKILL.md +4 -3
  473. package/template/.cursor/skills/yss-ui/references/component-routing.md +11 -10
  474. package/template/.cursor/skills/yss-ui/references/specialized-components.md +52 -0
  475. package/template/.cursor/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  476. package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
  477. package/template/.cursor/skills/yss-use-table-height/SKILL.md +1 -1
  478. package/template/.cursor/skills/yss-use-tree-height/SKILL.md +1 -1
  479. package/template/.cursor/skills/yss-userinfo/SKILL.md +1 -1
  480. package/template/.cursor/skills/yss-validation/SKILL.md +5 -1
  481. package/template/.cursor/skills/yss-web-controller/SKILL.md +5 -1
  482. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
  483. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  484. package/template/.cursor/skills/ytable-usage/SKILL.md +1 -1
  485. package/template/.cursor/skills/ytree-usage/SKILL.md +1 -1
  486. package/template/.pi/skills/archify/SKILL.md +1 -1
  487. package/template/.pi/skills/code-review/SKILL.md +12 -8
  488. package/template/.pi/skills/file-export-download/SKILL.md +1 -1
  489. package/template/.pi/skills/frontend-commit/SKILL.md +1 -1
  490. package/template/.pi/skills/java-backend-commit/SKILL.md +1 -1
  491. package/template/.pi/skills/llm-wiki/SKILL.md +1 -6
  492. package/template/.pi/skills/lombok/SKILL.md +10 -336
  493. package/template/.pi/skills/lombok/references/annotation-examples.md +307 -0
  494. package/template/.pi/skills/maintaining-skills/SKILL.md +2 -1
  495. package/template/.pi/skills/maintaining-skills/references/authoring.md +27 -0
  496. package/template/.pi/skills/mapstruct/SKILL.md +11 -318
  497. package/template/.pi/skills/mapstruct/references/annotation-examples.md +300 -0
  498. package/template/.pi/skills/page-form-module/SKILL.md +1 -1
  499. package/template/.pi/skills/page-skeleton/SKILL.md +1 -1
  500. package/template/.pi/skills/theme-token-usage/SKILL.md +1 -1
  501. package/template/.pi/skills/to-tickets/SKILL.md +1 -1
  502. package/template/.pi/skills/using-git-worktrees/SKILL.md +1 -1
  503. package/template/.pi/skills/wayfinder/SKILL.md +1 -1
  504. package/template/.pi/skills/yedit-table-usage/SKILL.md +1 -1
  505. package/template/.pi/skills/yss-api-integration/SKILL.md +1 -1
  506. package/template/.pi/skills/yss-audit-log/SKILL.md +1 -1
  507. package/template/.pi/skills/yss-cache/SKILL.md +1 -1
  508. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +18 -5
  509. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/application-pom.xml.template +1 -1
  510. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/parent-pom.xml.template +15 -10
  511. package/template/.pi/skills/yss-ddd-scaffold-generator/assets/templates/pom/web-pom.xml.template +3 -3
  512. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  513. package/template/.pi/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  514. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +4 -4
  515. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +18 -5
  516. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-verification.test.mjs +5 -2
  517. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +21 -17
  518. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +4 -2
  519. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +41 -7
  520. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +109 -13
  521. package/template/.pi/skills/yss-design-system/SKILL.md +19 -19
  522. package/template/.pi/skills/yss-design-system/references/data-quality-theme.md +13 -0
  523. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -1
  524. package/template/.pi/skills/yss-design-system/references/design-system.md +7 -9
  525. package/template/.pi/skills/yss-distributed-id/SKILL.md +1 -1
  526. package/template/.pi/skills/yss-dto/SKILL.md +5 -1
  527. package/template/.pi/skills/yss-excel-mvc/SKILL.md +1 -1
  528. package/template/.pi/skills/yss-exception/SKILL.md +5 -1
  529. package/template/.pi/skills/yss-formily/SKILL.md +21 -258
  530. package/template/.pi/skills/yss-formily-schema-generator/SKILL.md +1 -1
  531. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  532. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  533. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  534. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  535. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  536. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  537. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  538. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  539. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  540. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  541. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  542. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  543. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  544. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  545. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  546. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  547. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  548. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  549. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  550. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  551. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  552. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  553. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  554. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  555. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  556. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  557. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  558. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  559. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  560. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  561. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  562. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  563. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  564. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  565. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  566. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  567. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  568. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  569. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  570. package/template/.pi/skills/yss-hook/SKILL.md +1 -1
  571. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +14 -6
  572. package/template/.pi/skills/yss-implementation-contract-compiler/agents/openai.yaml +1 -1
  573. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  574. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +29 -5
  575. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +214 -0
  576. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +66 -204
  577. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +17 -4
  578. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  579. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +38 -25
  580. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  581. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +101 -13
  582. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  583. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  584. package/template/.pi/skills/yss-mybatis/SKILL.md +4 -0
  585. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +1 -1
  586. package/template/.pi/skills/yss-openapi-governance/SKILL.md +3 -1
  587. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -4
  588. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +50 -17
  589. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +6 -2
  590. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -1
  591. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +23 -3
  592. package/template/.pi/skills/yss-prototype-stage/SKILL.md +13 -9
  593. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  594. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  595. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  596. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  597. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  598. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  599. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  600. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  601. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  602. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  603. package/template/.pi/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  604. package/template/.pi/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  605. package/template/.pi/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  606. package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  607. package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  608. package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  609. package/template/.pi/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  610. package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  611. package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  612. package/template/.pi/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  613. package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  614. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  615. package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  616. package/template/.pi/skills/yss-repository/SKILL.md +4 -0
  617. package/template/.pi/skills/yss-research/SKILL.md +1 -1
  618. package/template/.pi/skills/yss-resilience4j/SKILL.md +1 -1
  619. package/template/.pi/skills/yss-security-algorithm/SKILL.md +1 -1
  620. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  621. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  622. package/template/.pi/skills/yss-tactical-design/SKILL.md +5 -1
  623. package/template/.pi/skills/yss-technical-design/SKILL.md +4 -0
  624. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +2 -2
  625. package/template/.pi/skills/yss-ui/SKILL.md +4 -3
  626. package/template/.pi/skills/yss-ui/references/component-routing.md +11 -10
  627. package/template/.pi/skills/yss-ui/references/specialized-components.md +52 -0
  628. package/template/.pi/skills/yss-ui-business-page-generation/SKILL.md +1 -1
  629. package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
  630. package/template/.pi/skills/yss-use-table-height/SKILL.md +1 -1
  631. package/template/.pi/skills/yss-use-tree-height/SKILL.md +1 -1
  632. package/template/.pi/skills/yss-userinfo/SKILL.md +1 -1
  633. package/template/.pi/skills/yss-validation/SKILL.md +5 -1
  634. package/template/.pi/skills/yss-web-controller/SKILL.md +5 -1
  635. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +9 -5
  636. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  637. package/template/.pi/skills/ytable-usage/SKILL.md +1 -1
  638. package/template/.pi/skills/ytree-usage/SKILL.md +1 -1
  639. package/template/AGENTS.md +1 -0
  640. package/template/CONTEXT.md +3 -1
  641. package/template/DESIGN.md +31 -14
  642. package/template/__yss_dotfile__.gitignore +4 -0
  643. package/template/docs/agents/backend-architecture-profiles.md +1 -1
  644. package/template/docs/agents/digital-human-roles.yaml +29 -5
  645. package/template/docs/agents/issue-tracker.md +2 -0
  646. package/template/docs/agents/skill-migrations.md +15 -2
  647. package/template/docs/agents/yss-skill-registry.yaml +6 -40
  648. package/template/docs/design/README.md +4 -4
  649. package/template/docs/design/design-system-sync.yaml +2 -1
  650. package/template/docs/design/design.md +23 -31
  651. package/template/docs/design/preview-dark.html +3 -3
  652. package/template/docs/design/preview.css +1 -1
  653. package/template/docs/design/preview.html +2 -2
  654. package/template/docs/design/templates/interaction-spec-template.md +2 -2
  655. package/template/docs/design/templates/prototype-evidence-template.yaml +18 -22
  656. package/template/docs/design/templates/prototype-review-checklist.md +3 -1
  657. package/template/docs/design/templates/state-matrix-template.md +1 -1
  658. package/template/docs/design/templates/visual-baseline-template.yaml +3 -2
  659. package/template/docs/design/tokens/.design-md-projection.json +7 -7
  660. package/template/docs/design/tokens/theme.json +16 -10
  661. package/template/docs/design/tokens/tokens.compact.json +521 -237
  662. package/template/docs/design/tokens/tokens.dark.json +527 -240
  663. package/template/docs/design/tokens/tokens.default.json +513 -235
  664. package/template/docs/design/tokens/variables.css +67 -65
  665. package/template/docs/design/tokens/variables.dark.css +41 -41
  666. package/template/docs/engineering/backend-platforms.json +174 -0
  667. package/template/docs/engineering/backend-platforms.md +77 -0
  668. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +1 -0
  669. package/template/docs/process/delivery-preflight.md +1 -1
  670. package/template/docs/process/frontend-backend-delivery.md +2 -1
  671. package/template/docs/process/harness-process-tailoring.md +9 -1
  672. package/template/docs/process/lifecycle-artifact-map.md +4 -4
  673. package/template/docs/process/lifecycle-registry-baseline.json +1 -1
  674. package/template/docs/process/lifecycle-registry.yaml +9 -9
  675. package/template/docs/process/schemas/api-contract-decision.schema.json +74 -0
  676. package/template/docs/process/schemas/backend-architecture-identity.schema.json +91 -0
  677. package/template/docs/process/schemas/data-architecture-decision.schema.json +34 -0
  678. package/template/docs/process/schemas/digital-human-task-package.schema.json +2 -1
  679. package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +80 -24
  680. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +4 -0
  681. package/template/docs/process/schemas/project-scaffold-contract.schema.json +666 -73
  682. package/template/docs/process/schemas/scaffold-architecture-decisions.schema.json +323 -39
  683. package/template/docs/process/schemas/slice-implementation-contract-v3.schema.json +925 -0
  684. package/template/docs/process/schemas/strategic-design-handoff.schema.json +296 -107
  685. package/template/docs/process/schemas/strategic-handoff-delivery-verification.schema.json +19 -0
  686. package/template/docs/process/schemas/strategic-handoff-delivery.schema.json +84 -0
  687. package/template/docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json +42 -0
  688. package/template/docs/process/strategic-handoff-package.md +26 -9
  689. package/template/docs/templates/approval-record-template.yaml +2 -0
  690. package/template/docs/templates/vertical-slice-ticket-template.md +22 -31
  691. 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 +1 -1
  692. package/template/scripts/audit-legacy-backend-scaffold +29 -0
  693. package/template/scripts/backend-platforms +14 -0
  694. package/template/scripts/lib/api-contract-decision.mjs +49 -0
  695. package/template/scripts/lib/api-contract-decision.test.mjs +69 -0
  696. package/template/scripts/lib/approval-record.mjs +32 -6
  697. package/template/scripts/lib/approved-execution-context.mjs +31 -8
  698. package/template/scripts/lib/backend-architecture.mjs +6 -0
  699. package/template/scripts/lib/backend-platform-provenance.mjs +67 -0
  700. package/template/scripts/lib/backend-platform-verification.mjs +210 -0
  701. package/template/scripts/lib/backend-platform.mjs +175 -0
  702. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +123 -0
  703. package/template/scripts/lib/decision-continuation.mjs +79 -0
  704. package/template/scripts/lib/delivery-preflight.mjs +6 -5
  705. package/template/scripts/lib/digital-human-roles.mjs +10 -0
  706. package/template/scripts/lib/frontend-delivery-boundary.mjs +3 -0
  707. package/template/scripts/lib/implementation-contract-compiler.mjs +42 -9
  708. package/template/scripts/lib/legacy-backend-scaffold-audit.mjs +87 -0
  709. package/template/scripts/lib/legacy-backend-scaffold-audit.test.mjs +64 -0
  710. package/template/scripts/lib/lifecycle-controls.mjs +2 -2
  711. package/template/scripts/lib/lifecycle-transition.mjs +155 -5
  712. package/template/scripts/lib/openapi-draft-validation.mjs +111 -0
  713. package/template/scripts/lib/plan-spec-entry.mjs +3 -3
  714. package/template/scripts/lib/scaffold-local-database.mjs +1 -0
  715. package/template/scripts/lib/skill-registry.mjs +17 -3
  716. package/template/scripts/lib/skill-supply-chain.mjs +12 -1
  717. package/template/scripts/lib/slice-applicability.mjs +10 -0
  718. package/template/scripts/lib/slice-contract-preparation.mjs +257 -0
  719. package/template/scripts/lib/slice-contract-views.mjs +52 -0
  720. package/template/scripts/lib/slice-contract.mjs +211 -0
  721. package/template/scripts/lib/slice-repositories.mjs +49 -0
  722. package/template/scripts/lib/slice-task-package.mjs +66 -0
  723. package/template/scripts/lib/strategic-feedback.mjs +2 -2
  724. package/template/scripts/lib/strategic-handoff-consumption.mjs +2 -2
  725. package/template/scripts/lib/strategic-handoff.mjs +89 -4
  726. package/template/scripts/lib/task-package.mjs +6 -2
  727. package/template/scripts/lib/technical-design-boundary.mjs +1 -0
  728. package/template/scripts/lib/user-decision-reuse.mjs +1 -0
  729. package/template/scripts/lib/user-decision.mjs +4 -1
  730. package/template/scripts/preflight-delivery +2 -2
  731. package/template/scripts/slice-contract +30 -0
  732. package/template/scripts/strategic-handoff +6 -4
  733. package/template/scripts/verify-backend-platform-matrix +69 -0
  734. package/template/scripts/verify-openapi-draft-validation-record +10 -129
  735. package/template/scripts/verify-scaffold-architecture-decisions +5 -0
  736. package/template/scripts/verify-strategic-context-import +12 -14
  737. package/template/scripts/verify-user-decision +7 -2
  738. package/template/skills-lock.json +67 -117
  739. package/template/yss-public-skills.json +0 -6
  740. package/template.snapshot.json +8 -4
  741. package/template/.agents/skills/yss-antd-design/SKILL.md +0 -35
  742. package/template/.agents/skills/yss-antd-design/references/boundaries.md +0 -30
  743. package/template/.agents/skills/yss-antd-design/references/cli-matrix.md +0 -38
  744. package/template/.agents/skills/yss-antd-design/references/evidence.md +0 -35
  745. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  746. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  747. package/template/.agents/skills/yss-antdv-next-design/SKILL.md +0 -48
  748. package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  749. package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  750. package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  751. package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  752. package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  753. package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  754. package/template/.agents/skills/yss-components/SKILL.md +0 -386
  755. package/template/.agents/skills/yss-components/agents/openai.yaml +0 -5
  756. package/template/.agents/skills/yss-components/references/frontend-docs.md +0 -9
  757. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  758. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  759. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  760. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  761. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  762. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  763. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  764. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  765. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  766. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  767. package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  768. package/template/.agents/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  769. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  770. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  771. package/template/.agents/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  772. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  773. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  774. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  775. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  776. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  777. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  778. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  779. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  780. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  781. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  782. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  783. package/template/.codex/skills/yss-antd-design/SKILL.md +0 -35
  784. package/template/.codex/skills/yss-antd-design/references/boundaries.md +0 -30
  785. package/template/.codex/skills/yss-antd-design/references/cli-matrix.md +0 -38
  786. package/template/.codex/skills/yss-antd-design/references/evidence.md +0 -35
  787. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  788. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  789. package/template/.codex/skills/yss-antdv-next-design/SKILL.md +0 -48
  790. package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  791. package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  792. package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  793. package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  794. package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  795. package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  796. package/template/.codex/skills/yss-components/SKILL.md +0 -386
  797. package/template/.codex/skills/yss-components/agents/openai.yaml +0 -5
  798. package/template/.codex/skills/yss-components/references/frontend-docs.md +0 -9
  799. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  800. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  801. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  802. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  803. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  804. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  805. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  806. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  807. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  808. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  809. package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  810. package/template/.codex/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  811. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  812. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  813. package/template/.codex/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  814. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  815. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  816. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  817. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  818. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  819. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  820. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  821. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  822. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  823. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  824. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  825. package/template/.cursor/skills/yss-antd-design/SKILL.md +0 -35
  826. package/template/.cursor/skills/yss-antd-design/references/boundaries.md +0 -30
  827. package/template/.cursor/skills/yss-antd-design/references/cli-matrix.md +0 -38
  828. package/template/.cursor/skills/yss-antd-design/references/evidence.md +0 -35
  829. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  830. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  831. package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +0 -48
  832. package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  833. package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  834. package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  835. package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  836. package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  837. package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  838. package/template/.cursor/skills/yss-components/SKILL.md +0 -386
  839. package/template/.cursor/skills/yss-components/agents/openai.yaml +0 -5
  840. package/template/.cursor/skills/yss-components/references/frontend-docs.md +0 -9
  841. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  842. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  843. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  844. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  845. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  846. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  847. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  848. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  849. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  850. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  851. package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  852. package/template/.cursor/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  853. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  854. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  855. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  856. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  857. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  858. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  859. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  860. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  861. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  862. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  863. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  864. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  865. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  866. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  867. package/template/.pi/skills/yss-antd-design/SKILL.md +0 -35
  868. package/template/.pi/skills/yss-antd-design/references/boundaries.md +0 -30
  869. package/template/.pi/skills/yss-antd-design/references/cli-matrix.md +0 -38
  870. package/template/.pi/skills/yss-antd-design/references/evidence.md +0 -35
  871. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  872. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  873. package/template/.pi/skills/yss-antdv-next-design/SKILL.md +0 -48
  874. package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  875. package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  876. package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  877. package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  878. package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  879. package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  880. package/template/.pi/skills/yss-components/SKILL.md +0 -386
  881. package/template/.pi/skills/yss-components/agents/openai.yaml +0 -5
  882. package/template/.pi/skills/yss-components/references/frontend-docs.md +0 -9
  883. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  884. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  885. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  886. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  887. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  888. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  889. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  890. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  891. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  892. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  893. package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  894. package/template/.pi/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  895. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  896. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  897. package/template/.pi/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  898. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  899. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  900. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  901. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  902. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  903. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  904. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  905. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  906. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  907. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  908. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import { assertUserDecisionRequirement, decisionDigest, decisionIO } from "../../../../scripts/lib/user-decision.mjs";
3
3
  import { existsSync } from "node:fs";
4
- import { mkdir, readFile, writeFile } from "node:fs/promises";
4
+ import { readFile } from "node:fs/promises";
5
+ import { prepareOfflineHtml, validateOfflineHtml, sealOfflineHtml } from "./offline-html.mjs";
5
6
  import path from "node:path";
6
7
  import { pathToFileURL } from "node:url";
7
8
  import { parseDocument } from "../../../../scripts/vendor/yaml.mjs";
@@ -10,12 +11,6 @@ const nonEmpty = (value) => typeof value === "string" && value.trim().length > 0
10
11
  const object = (value) => value && typeof value === "object" && !Array.isArray(value);
11
12
  const antdSemver = /^6\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/;
12
13
  const exactSemver = /^[0-9]+\.[0-9]+\.[0-9]+(?:-[0-9A-Za-z.-]+)?$/;
13
- const DEFAULT_H2_COMPONENT_BASIS = "vue-antdv-next";
14
- const DEFAULT_ANTDV_NEXT_VERSION = "1.5.2";
15
- const DEFAULT_VUE_VERSION = "3.5.21";
16
- const DEFAULT_VITE_VERSION = "6.4.2";
17
- const DEFAULT_VUE_PLUGIN_VERSION = "5.2.4";
18
- const H2_COMPONENT_BASES = new Set([DEFAULT_H2_COMPONENT_BASIS, "react-antd-6"]);
19
14
  const PROFILE_KIND = { H1: "visual-review", H2: "flow-review" };
20
15
  const PROFILE_BLOCK = { H1: "visual_review", H2: "flow_review" };
21
16
 
@@ -71,6 +66,20 @@ function validateCommonV4(data, errors, allowTemplate) {
71
66
  for (const field of ["ideation_status", "selected_ref", "reuse_reason"]) requiredString(visual, field, "source_visual", errors);
72
67
  if (object(visual) && !["required", "not-applicable"].includes(visual.ideation_status)) errors.push("source_visual.ideation_status 必须为 required/not-applicable");
73
68
 
69
+ if (visual?.kind !== undefined) {
70
+ if (!["design-system", "visual-reference"].includes(visual.kind)) errors.push("source_visual.kind 必须为 design-system/visual-reference");
71
+ const expectedMode = visual.kind === "design-system" ? "design-contract" : "visual-comparison";
72
+ if (data.design_qa?.mode !== expectedMode) errors.push("design_qa.mode 与 source_visual.kind 不一致");
73
+ if (visual.kind === "design-system" && visual.selected_ref !== "DESIGN.md") errors.push("规范直出必须以 DESIGN.md 为规范依据,不能用自身截图自证");
74
+ if (!allowTemplate && visual.kind === "visual-reference" && visual.selected_ref === data.prototype_ref) errors.push("视觉还原目标不得引用原型自身");
75
+ }
76
+ if (data.browser_delivery?.delivery_contract === "offline-html-v1") {
77
+ requiredString(data.browser_delivery, "resource_manifest_ref", "browser_delivery", errors);
78
+ requiredString(data.browser_delivery, "offline_verification_ref", "browser_delivery", errors);
79
+ requiredPassed(data.browser_delivery, "offline_verification_result", "browser_delivery", errors, allowTemplate);
80
+ if (visual?.kind === undefined) errors.push("离线 HTML 证据必须声明 source_visual.kind");
81
+ }
82
+
74
83
  const baseline = data.design_baseline;
75
84
  requiredString(baseline, "canonical_design_ref", "design_baseline", errors);
76
85
  requiredString(baseline, "canonical_design_digest", "design_baseline", errors);
@@ -167,6 +176,17 @@ function validateProfileV4(data, errors, allowTemplate) {
167
176
  const facts = evidence.prototype_library_facts;
168
177
  required(facts, "applicable", "profile_evidence.flow_review.prototype_library_facts", errors);
169
178
  requiredString(facts, "component_basis", "profile_evidence.flow_review.prototype_library_facts", errors);
179
+ if (["html-css-js", "react-antd-prebuilt"].includes(facts?.component_basis)) {
180
+ if (implementation?.runtime_build_required !== false || implementation?.framework !== facts.component_basis || (facts.component_basis === "html-css-js" && facts.applicable !== false)) errors.push("HTML H2 必须声明无组件 Provider、无运行时构建及 html-css-js framework");
181
+ if (data.browser_delivery?.delivery_contract !== "offline-html-v1") errors.push("HTML H2 缺少 offline-html-v1 交付证据");
182
+ for (const field of ["scenario_replay_ref", "scenario_reset_result"]) requiredString(evidence, field, "profile_evidence.flow_review", errors);
183
+ requiredPassed(evidence, "scenario_reset_result", "profile_evidence.flow_review", errors, allowTemplate);
184
+ }
185
+ if (facts?.component_basis === "react-antd-prebuilt") {
186
+ if (facts.applicable !== true || facts.library_package !== "antd" || !antdSemver.test(facts.library_version ?? "")) errors.push("真实 AntD 预构建需要实际 antd 精确版本");
187
+ requiredString(facts, "build_provenance_ref", "prototype_library_facts", errors);
188
+ requiredString(implementation, "selection_reason", "prototype_implementation", errors);
189
+ }
170
190
  if (facts?.applicable === true) {
171
191
  for (const field of ["source", "manifest_ref", "manifest_digest", "canonical_design_digest", "project_token_baseline_digest"]) requiredString(facts, field, "profile_evidence.flow_review.prototype_library_facts", errors);
172
192
  requireArray(facts, "components_covered", "profile_evidence.flow_review.prototype_library_facts", errors, { nonEmpty: true });
@@ -201,6 +221,11 @@ export function validatePrototypeEvidence(data, { allowTemplate = false, allowLe
201
221
  return { errors, warnings };
202
222
  }
203
223
  if (data.schema_version !== 4) return { errors: ["schema_version 必须为 4"], warnings };
224
+ const oldBasis = data.profile_evidence?.flow_review?.prototype_library_facts?.component_basis;
225
+ if (["vue-antdv-next", "react-antd-6"].includes(oldBasis)) {
226
+ if (!allowLegacy && !allowTemplate) errors.push("Provider 已退役;旧证据仅 --allow-legacy 只读检查,在途需迁移 HTML");
227
+ else warnings.push("历史 Provider 证据只读,不代表当前原型通过");
228
+ }
204
229
  validateCommonV4(data, errors, allowTemplate);
205
230
  validateProfileV4(data, errors, allowTemplate);
206
231
  if (!allowTemplate && errors.length === 0) {
@@ -213,146 +238,26 @@ export function validatePrototypeEvidence(data, { allowTemplate = false, allowLe
213
238
  return { errors, warnings };
214
239
  }
215
240
 
216
- function safePrototypeRoot(projectRoot, root, feature) {
217
- const resolvedProject = path.resolve(projectRoot);
218
- const resolvedRoot = path.resolve(root);
219
- const expected = path.resolve(resolvedProject, "docs/.scratch", feature, "design/prototypes");
220
- if (resolvedRoot !== expected) throw new TypeError(`原型目录必须精确匹配 ${expected}`);
221
- if (!resolvedRoot.startsWith(`${resolvedProject}${path.sep}`)) throw new TypeError("原型目录越出项目根");
222
- return { resolvedProject, resolvedRoot };
241
+ export async function prepareStaticPrototype(options) {
242
+ return prepareOfflineHtml({ ...options, profile: "H1" });
223
243
  }
224
244
 
225
- export async function prepareStaticPrototype({ projectRoot, root, feature }) {
226
- if (!/^[a-z0-9][a-z0-9-]*$/.test(feature ?? "")) throw new TypeError("feature 必须是小写 kebab-case");
227
- const { resolvedRoot } = safePrototypeRoot(projectRoot, root, feature);
228
- await mkdir(resolvedRoot, { recursive: true });
229
- for (const forbidden of ["package.json", "pnpm-lock.yaml", "package-lock.json", "yarn.lock"]) if (existsSync(path.join(resolvedRoot, forbidden))) throw new TypeError(`H1 静态适配器拒绝已有 ${forbidden}`);
230
- await writeFile(path.join(resolvedRoot, "index.html"), `<!doctype html>\n<html lang="zh-CN">\n<head>\n <meta charset="utf-8">\n <meta name="viewport" content="width=device-width,initial-scale=1">\n <title>${feature} · H1 visual review</title>\n <link rel="stylesheet" href="./styles.css">\n</head>\n<body>\n <main id="prototype" aria-labelledby="page-title">\n <header><p class="eyebrow">H1 · visual-review</p><h1 id="page-title">${feature}</h1></header>\n <section class="surface" aria-label="原型内容"><p>请在此实现已评审的视觉布局与少量关键交互。</p><button type="button" id="prototype-action">关键操作</button><p role="status" id="prototype-status"></p></section>\n </main>\n <script>document.querySelector('#prototype-action').addEventListener('click',()=>{document.querySelector('#prototype-status').textContent='交互已触发';});</script>\n</body>\n</html>\n`);
231
- await writeFile(path.join(resolvedRoot, "styles.css"), `@import url("../../../../design/tokens/variables.css");\n:root{font-family:var(--brand-font-family,system-ui,sans-serif);color:var(--brand-color-text);background:var(--brand-color-bg-layout)}*{box-sizing:border-box}body{margin:0}main{max-width:1440px;margin:auto;padding:var(--brand-size-lg)}.eyebrow{color:var(--brand-color-primary)}.surface{padding:var(--yss-card-compact-padding,var(--brand-size));border-radius:var(--brand-border-radius-lg);background:var(--brand-color-bg-container);box-shadow:0 1px 3px rgb(0 0 0/.08)}button{min-height:var(--yss-control-height-compact);padding:var(--brand-size-xxs) var(--brand-size-sm);border:0;border-radius:var(--brand-border-radius);color:var(--yss-color-on-primary,var(--brand-color-bg-container));background:var(--yss-color-primary-control,var(--brand-color-primary))}button:hover{background:var(--yss-color-primary-control-hover,var(--brand-color-primary-hover))}button:focus-visible{outline:3px solid color-mix(in srgb,var(--yss-color-primary-control,var(--brand-color-primary)),white 55%);outline-offset:2px}@media(max-width:576px){main{padding:var(--brand-size-sm)}.surface{padding:var(--brand-size-sm)}}\n`);
232
- const manifest = { schema_version: 1, feature, prototype_profile: "H1", profile_kind: "visual-review", runtime_build_required: false, entry: `docs/.scratch/${feature}/design/prototypes/index.html`, theme_source: "docs/design/tokens/variables.css" };
233
- await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
234
- return manifest;
235
- }
236
-
237
- async function writeIfMissing(file, content) {
238
- if (!existsSync(file)) await writeFile(file, content);
239
- }
240
-
241
- async function prepareVueFlowPrototype({ projectRoot, root, feature, libraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion, factPackRef }) {
242
- for (const [field, version] of Object.entries({ libraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion })) {
243
- if (!exactSemver.test(version ?? "")) throw new TypeError(`${field} 必须是明确 semver`);
244
- }
245
- const { resolvedProject, resolvedRoot } = safePrototypeRoot(projectRoot, root, feature);
246
- const themeSourcePath = path.join(resolvedProject, "docs/design/tokens/theme.json");
247
- if (!existsSync(themeSourcePath)) throw new TypeError(`缺少项目主题: ${themeSourcePath}`);
248
- const themeSource = JSON.parse(await readFile(themeSourcePath, "utf8"));
249
- await mkdir(path.join(resolvedRoot, "src"), { recursive: true });
250
- const packagePath = path.join(resolvedRoot, "package.json");
251
- const pkg = existsSync(packagePath) ? JSON.parse(await readFile(packagePath, "utf8")) : {};
252
- if (pkg.dependencies?.react || pkg.dependencies?.antd) throw new TypeError("Vue/Antdv Next H2 不得静默覆盖 React/AntD starter;请显式选择 react-antd-6 或使用新的原型目录");
253
- pkg.name ??= `${feature}-prototype`;
254
- pkg.version ??= "0.0.0";
255
- pkg.private = true;
256
- pkg.type = "module";
257
- pkg.packageManager = `pnpm@${pnpmVersion}`;
258
- pkg.scripts = { dev: "vite --host 127.0.0.1", build: "vite build", preview: "vite preview --host 127.0.0.1", ...(pkg.scripts ?? {}) };
259
- pkg.dependencies = { ...(pkg.dependencies ?? {}), "@vitejs/plugin-vue": vuePluginVersion, "antdv-next": libraryVersion, vite: viteVersion, vue: vueVersion };
260
- await writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
261
- await writeIfMissing(path.join(resolvedRoot, "index.html"), `<!doctype html>\n<html lang="zh-CN">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>${feature} · H2 flow review</title>\n</head>\n<body>\n <div id="app"></div>\n <script type="module" src="/src/main.js"></script>\n</body>\n</html>\n`);
262
- await writeIfMissing(path.join(resolvedRoot, "vite.config.mjs"), `import { defineConfig } from "vite";\nimport vue from "@vitejs/plugin-vue";\n\nexport default defineConfig({ plugins: [vue()] });\n`);
263
- await writeIfMissing(path.join(resolvedRoot, "src/main.js"), `import { createApp } from "vue";\nimport Antdv from "antdv-next";\nimport App from "./App.vue";\nimport "antdv-next/dist/reset.css";\nimport "./styles.css";\n\ncreateApp(App).use(Antdv).mount("#app");\n`);
264
- await writeIfMissing(path.join(resolvedRoot, "src/App.vue"), `<script setup>\nimport { computed, ref } from "vue";\nimport { createYssTheme } from "./yss-theme.js";\n\nconst dark = ref(false);\nconst yssTheme = computed(() => createYssTheme({ dark: dark.value }));\n</script>\n\n<template>\n <a-config-provider :theme="yssTheme">\n <main aria-labelledby="page-title">\n <p class="eyebrow">H2 · flow-review</p>\n <h1 id="page-title">${feature}</h1>\n <p>请在此实现已评审的主流程与关键异常状态。</p>\n <a-button type="primary" @click="dark = !dark">切换主题以验证反馈</a-button>\n </main>\n </a-config-provider>\n</template>\n`);
265
- await writeIfMissing(path.join(resolvedRoot, "src/styles.css"), `:root{font-family:system-ui,sans-serif;color:var(--text-color,#1f2329);background:var(--layout-background,#f0f2f5)}*{box-sizing:border-box}body{margin:0}main{max-width:1440px;margin:auto;padding:24px}.eyebrow{color:var(--brand-primary,#3371ff)}@media(max-width:576px){main{padding:12px}}\n`);
266
- const generated = ['import { theme } from "antdv-next";', "", `const source = ${JSON.stringify(themeSource, null, 2)};`, 'const layoutKeys = new Set(["layoutHeaderHeight", "layoutSiderBackground", "layoutBodyBackground"]);', "export const yssLayoutTokens = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => layoutKeys.has(key)));", "const seed = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => !layoutKeys.has(key)));", "export function createYssTheme({ dark = false } = {}) {", " return { algorithm: dark ? [theme.darkAlgorithm, theme.compactAlgorithm] : [theme.defaultAlgorithm, theme.compactAlgorithm], token: seed };", "}", ""].join("\n");
267
- await writeFile(path.join(resolvedRoot, "src/yss-theme.js"), generated);
268
- const manifest = { schema_version: 3, feature, prototype_profile: "H2", profile_kind: "flow-review", design_standard: "yss-antdv-next", component_basis: "vue-antdv-next", framework: "vue", library: { package: "antdv-next", version: libraryVersion }, framework_packages: { vue: vueVersion, vite: viteVersion, "@vitejs/plugin-vue": vuePluginVersion }, package_manager: `pnpm@${pnpmVersion}`, fact_pack_ref: factPackRef, theme_source: "docs/design/tokens/theme.json", theme_adapter: `docs/.scratch/${feature}/design/prototypes/src/yss-theme.js`, next_commands: ["pnpm install", "pnpm build"] };
269
- await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
270
- return manifest;
271
- }
272
-
273
- async function prepareReactFlowPrototype({ projectRoot, root, feature, targetAntdVersion, pnpmVersion }) {
274
- if (!/^[a-z0-9][a-z0-9-]*$/.test(feature ?? "")) throw new TypeError("feature 必须是小写 kebab-case");
275
- if (!antdSemver.test(targetAntdVersion ?? "")) throw new TypeError("targetAntdVersion 必须是明确的 antd 6.x semver");
276
- if (!exactSemver.test(pnpmVersion ?? "")) throw new TypeError("pnpmVersion 必须是明确 semver");
277
- const { resolvedProject, resolvedRoot } = safePrototypeRoot(projectRoot, root, feature);
278
- const packagePath = path.join(resolvedRoot, "package.json");
279
- if (!existsSync(packagePath)) throw new TypeError(`缺少 Product Design starter package.json: ${packagePath}`);
280
- const pkg = JSON.parse(await readFile(packagePath, "utf8"));
281
- pkg.packageManager = `pnpm@${pnpmVersion}`;
282
- pkg.dependencies = { ...(pkg.dependencies ?? {}), "@ant-design/icons": "^6.0.0", antd: targetAntdVersion };
283
- await writeFile(packagePath, `${JSON.stringify(pkg, null, 2)}\n`);
284
- const themeSourcePath = path.join(resolvedProject, "docs/design/tokens/theme.json");
285
- if (!existsSync(themeSourcePath)) throw new TypeError(`缺少项目主题: ${themeSourcePath}`);
286
- const themeSource = JSON.parse(await readFile(themeSourcePath, "utf8"));
287
- const generated = ['import { theme } from "antd";', "", `const source = ${JSON.stringify(themeSource, null, 2)};`, 'const layoutKeys = new Set(["layoutHeaderHeight", "layoutSiderBackground", "layoutBodyBackground"]);', "export const yssLayoutTokens = Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => layoutKeys.has(key)));", "export const yssTheme = {", " algorithm: [theme.defaultAlgorithm, theme.compactAlgorithm],", " token: Object.fromEntries(Object.entries(source.token ?? {}).filter(([key]) => !layoutKeys.has(key)))", "};", ""].join("\n");
288
- await mkdir(path.join(resolvedRoot, "src"), { recursive: true });
289
- await writeFile(path.join(resolvedRoot, "src/yss-theme.js"), generated);
290
- const manifest = { schema_version: 2, feature, prototype_profile: "H2", profile_kind: "flow-review", design_standard: "ant-design-v6", target_antd_version: targetAntdVersion, prototype_framework: "react", package_manager: `pnpm@${pnpmVersion}`, theme_source: "docs/design/tokens/theme.json", theme_adapter: `docs/.scratch/${feature}/design/prototypes/src/yss-theme.js`, next_commands: ["pnpm install", "pnpm build"] };
291
- await writeFile(path.join(resolvedRoot, "yss-prototype-adapter.json"), `${JSON.stringify(manifest, null, 2)}\n`);
292
- return manifest;
293
- }
294
-
295
- export async function prepareFlowPrototype({ projectRoot, root, feature, componentBasis, libraryVersion, targetAntdVersion, pnpmVersion, vueVersion = DEFAULT_VUE_VERSION, viteVersion = DEFAULT_VITE_VERSION, vuePluginVersion = DEFAULT_VUE_PLUGIN_VERSION, factPackRef }) {
296
- if (!/^[a-z0-9][a-z0-9-]*$/.test(feature ?? "")) throw new TypeError("feature 必须是小写 kebab-case");
297
- const resolvedBasis = componentBasis ?? (targetAntdVersion ? "react-antd-6" : DEFAULT_H2_COMPONENT_BASIS);
298
- if (!H2_COMPONENT_BASES.has(resolvedBasis)) throw new TypeError(`componentBasis 必须为 ${[...H2_COMPONENT_BASES].join("/")}`);
299
- if (resolvedBasis === "react-antd-6") return prepareReactFlowPrototype({ projectRoot, root, feature, targetAntdVersion: targetAntdVersion ?? libraryVersion, pnpmVersion });
300
- const resolvedLibraryVersion = libraryVersion ?? DEFAULT_ANTDV_NEXT_VERSION;
301
- return prepareVueFlowPrototype({ projectRoot, root, feature, libraryVersion: resolvedLibraryVersion, pnpmVersion, vueVersion, viteVersion, vuePluginVersion, factPackRef: factPackRef ?? `docs/design/facts/antdv-next/${resolvedLibraryVersion}/manifest.json` });
245
+ export async function prepareFlowPrototype(options) {
246
+ if (options.targetAntdVersion || options.libraryVersion || options.factPackRef || (options.componentBasis && options.componentBasis !== "html-css-js")) throw new TypeError("原型 Provider 已退役;请迁移到 html-css-js 离线交付,历史原型保持只读");
247
+ return prepareOfflineHtml({ ...options, profile: "H2" });
302
248
  }
303
249
 
304
250
  export const preparePrototype = prepareFlowPrototype;
305
251
 
306
- export async function validatePrototypeProject({ root, profile = "H2", componentBasis, libraryVersion, targetAntdVersion }) {
307
- const errors = [];
308
- if (!Object.hasOwn(PROFILE_KIND, profile)) return { errors: ["profile 必须为 H1/H2"] };
309
- if (!existsSync(path.join(root, "index.html"))) errors.push("缺少浏览器入口 index.html");
310
- if (!existsSync(path.join(root, "yss-prototype-adapter.json"))) errors.push("缺少 yss-prototype-adapter.json");
311
- if (profile === "H1") {
312
- for (const forbidden of ["package.json", "pnpm-lock.yaml", "package-lock.json", "yarn.lock"] ) if (existsSync(path.join(root, forbidden))) errors.push(`H1 不得依赖 ${forbidden}`);
313
- const stylesPath = path.join(root, "styles.css");
314
- if (!existsSync(stylesPath)) errors.push("H1 缺少 styles.css");
315
- else {
316
- const styles = await readFile(stylesPath, "utf8");
317
- for (const token of ["--brand-font-family", "--brand-color-text", "--brand-color-bg-layout", "--brand-color-bg-container", "--yss-color-primary-control", "--yss-control-height-compact"]) if (!styles.includes(token)) errors.push(`H1 styles.css 未消费项目 Token ${token}`);
318
- for (const staleAlias of ["--font-family", "--layout-background", "--container-background", "--brand-primary"]) if (styles.includes(staleAlias)) errors.push(`H1 styles.css 使用过时变量 ${staleAlias}`);
319
- for (const hardcodedDeclaration of ["padding:24px", "padding:20px", "min-height:32px", "border-radius:8px", "border-radius:6px"]) if (styles.includes(hardcodedDeclaration)) errors.push(`H1 styles.css 硬编码视觉基线 ${hardcodedDeclaration}`);
320
- }
321
- return { errors };
252
+ export async function validatePrototypeProject({ root, profile = "H2", componentBasis, targetAntdVersion }) {
253
+ if (!Object.hasOwn(PROFILE_KIND, profile)) return { errors: ["prototype_profile 必须为 H1/H2"] };
254
+ if (targetAntdVersion || (componentBasis && !["html-css-js", "react-antd-prebuilt"].includes(componentBasis))) return { errors: ["旧 Provider 项目不进入当前生成路线;请保留历史快照并迁移"] };
255
+ const result = await validateOfflineHtml(root, profile);
256
+ if (componentBasis && !result.errors.length) {
257
+ const manifest = JSON.parse(await readFile(path.join(root, "yss-prototype-adapter.json"), "utf8"));
258
+ if (manifest.component_basis !== componentBasis) result.errors.push("componentBasis 与原型 manifest 不一致");
322
259
  }
323
- const packagePath = path.join(root, "package.json");
324
- if (!existsSync(packagePath)) return { errors: [...errors, "缺少 package.json"] };
325
- const pkg = JSON.parse(await readFile(packagePath, "utf8"));
326
- if (profile === "H2") {
327
- const adapterPath = path.join(root, "yss-prototype-adapter.json");
328
- const adapter = existsSync(adapterPath) ? JSON.parse(await readFile(adapterPath, "utf8")) : {};
329
- const resolvedBasis = componentBasis ?? (targetAntdVersion ? "react-antd-6" : adapter.component_basis ?? (adapter.prototype_framework === "react" ? "react-antd-6" : DEFAULT_H2_COMPONENT_BASIS));
330
- if (resolvedBasis === "react-antd-6") {
331
- const resolvedVersion = targetAntdVersion ?? libraryVersion ?? adapter.target_antd_version;
332
- if (pkg.dependencies?.antd !== resolvedVersion) errors.push(`package.json 必须精确锁定 antd ${resolvedVersion}`);
333
- if (!antdSemver.test(resolvedVersion ?? "")) errors.push("React H2 libraryVersion 必须是 antd 6.x semver");
334
- if (!existsSync(path.join(root, "src/yss-theme.js"))) errors.push("React/AntD H2 缺少 src/yss-theme.js");
335
- const sourceFiles = ["src/App.jsx", "src/App.tsx", "src/main.jsx", "src/main.tsx"].filter((file) => existsSync(path.join(root, file)));
336
- const source = (await Promise.all(sourceFiles.map((file) => readFile(path.join(root, file), "utf8")))).join("\n");
337
- if (!/ConfigProvider/.test(source) || !/yssTheme/.test(source)) errors.push("React/AntD H2 入口必须通过 ConfigProvider 消费 yssTheme");
338
- } else if (resolvedBasis === "vue-antdv-next") {
339
- const resolvedVersion = libraryVersion ?? adapter.library?.version ?? DEFAULT_ANTDV_NEXT_VERSION;
340
- if (pkg.dependencies?.["antdv-next"] !== resolvedVersion) errors.push(`package.json 必须精确锁定 antdv-next ${resolvedVersion}`);
341
- if (!exactSemver.test(resolvedVersion ?? "")) errors.push("Vue H2 libraryVersion 必须是明确 semver");
342
- for (const [name, expected] of Object.entries(adapter.framework_packages ?? {})) if (pkg.dependencies?.[name] !== expected) errors.push(`package.json 必须精确锁定 ${name} ${expected}`);
343
- for (const file of ["vite.config.mjs", "src/main.js", "src/App.vue", "src/yss-theme.js"]) if (!existsSync(path.join(root, file))) errors.push(`Vue/Antdv Next H2 缺少 ${file}`);
344
- const sourceFiles = ["src/App.vue", "src/main.js", "src/yss-theme.js"].filter((file) => existsSync(path.join(root, file)));
345
- const source = (await Promise.all(sourceFiles.map((file) => readFile(path.join(root, file), "utf8")))).join("\n");
346
- if (!/a-config-provider/.test(source) || !/yssTheme/.test(source)) errors.push("Vue/Antdv Next H2 必须通过 ConfigProvider 消费 yssTheme");
347
- if (!/compactAlgorithm/.test(source)) errors.push("Vue/Antdv Next H2 主题必须消费 compactAlgorithm");
348
- if (adapter.schema_version !== 3 || adapter.component_basis !== "vue-antdv-next" || adapter.framework !== "vue") errors.push("Vue/Antdv Next H2 adapter manifest 必须使用 provider-neutral schema v3");
349
- } else {
350
- errors.push(`不支持的 H2 component basis: ${resolvedBasis}`);
351
- }
352
- if (!String(pkg.packageManager ?? "").startsWith("pnpm@")) errors.push("H2 package.json 必须记录实际 pnpm packageManager");
353
- if (!existsSync(path.join(root, "pnpm-lock.yaml"))) errors.push("H2 缺少 pnpm-lock.yaml");
354
- }
355
- return { errors };
260
+ return result;
356
261
  }
357
262
 
358
263
  function args(argv) {
@@ -378,11 +283,15 @@ async function main(argv) {
378
283
  const parsed = args(argv);
379
284
  const command = parsed._[0];
380
285
  if (command === "prepare-static") {
381
- process.stdout.write(`${JSON.stringify(await prepareStaticPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature }), null, 2)}\n`);
286
+ process.stdout.write(`${JSON.stringify(await prepareStaticPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, pattern: parsed.pattern }), null, 2)}\n`);
382
287
  return;
383
288
  }
384
289
  if (["prepare", "prepare-flow"].includes(command)) {
385
- process.stdout.write(`${JSON.stringify(await prepareFlowPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, componentBasis: parsed["component-basis"], libraryVersion: parsed["library-version"], targetAntdVersion: parsed["target-antd-version"], pnpmVersion: parsed["pnpm-version"], vueVersion: parsed["vue-version"] ?? DEFAULT_VUE_VERSION, viteVersion: parsed["vite-version"] ?? DEFAULT_VITE_VERSION, vuePluginVersion: parsed["vue-plugin-version"] ?? DEFAULT_VUE_PLUGIN_VERSION, factPackRef: parsed["fact-pack-ref"] }), null, 2)}\n`);
290
+ process.stdout.write(`${JSON.stringify(await prepareFlowPrototype({ projectRoot: parsed["project-root"], root: parsed.root, feature: parsed.feature, pattern: parsed.pattern, componentBasis: parsed["component-basis"], libraryVersion: parsed["library-version"], targetAntdVersion: parsed["target-antd-version"], pnpmVersion: parsed["pnpm-version"], factPackRef: parsed["fact-pack-ref"] }), null, 2)}\n`);
291
+ return;
292
+ }
293
+ if (command === "seal-project") {
294
+ process.stdout.write(`${JSON.stringify(await sealOfflineHtml(parsed.root, parsed.profile ?? "H2"), null, 2)}\n`);
386
295
  return;
387
296
  }
388
297
  if (command === "validate-project") {
@@ -397,7 +306,7 @@ async function main(argv) {
397
306
  process.stdout.write(`prototype evidence passed${result.warnings.length ? ` with warnings: ${result.warnings.join(", ")}` : ""}\n`);
398
307
  return;
399
308
  }
400
- throw new TypeError("usage: prototype-contract.mjs prepare-static|prepare-flow|validate-project|validate-evidence ...");
309
+ throw new TypeError("usage: prototype-contract.mjs prepare-static|prepare-flow|seal-project|validate-project|validate-evidence ...");
401
310
  }
402
311
 
403
312
  if (import.meta.url === pathToFileURL(process.argv[1]).href) main(process.argv.slice(2)).catch((error) => { process.stderr.write(`${error.message}\n`); process.exitCode = 1; });
@@ -0,0 +1,24 @@
1
+ import {test} from 'node:test';
2
+ import assert from 'node:assert/strict';
3
+ import {mkdtempSync,mkdirSync,writeFileSync,existsSync,rmSync} from 'node:fs';
4
+ import os from 'node:os';
5
+ import path from 'node:path';
6
+ import {collectAntdReference} from '../scripts/collect-antd-reference.mjs';
7
+ test('reference collection distinguishes exact evidence from minor fallback and refuses fabricated coverage',()=>{
8
+ const temp=mkdtempSync(path.join(os.tmpdir(),'antd-metadata-contract-'));
9
+ try{
10
+ const pkg=path.join(temp,'node_modules/@ant-design/cli');mkdirSync(path.join(pkg,'data'),{recursive:true});
11
+ writeFileSync(path.join(pkg,'package.json'),JSON.stringify({name:'@ant-design/cli',version:'6.6.4'}));
12
+ writeFileSync(path.join(pkg,'data/versions.json'),JSON.stringify({v6:{'6.6':'6.6.4'}}));
13
+ writeFileSync(path.join(pkg,'data/v6.6.4.json'),JSON.stringify({version:'6.6.4',components:[{name:'Button',props:[{name:'disabled'}]}]}));
14
+ const run=(version,name,components=['Button'])=>collectAntdReference({toolchain:temp,version,output:path.join(temp,name),components});
15
+ assert.equal(run('6.6.4','exact').version_match,'exact');
16
+ assert.equal(run('6.6.3','fallback').version_match,'minor-snapshot-only');
17
+ assert.throws(()=>run('6.5.0','unavailable'),/未收录该 minor/);
18
+ assert.throws(()=>run('6.6.4','util',['Util']),/不可补造 API/);
19
+ assert.equal(existsSync(path.join(temp,'util')),false);
20
+ assert.throws(()=>run('6.6.4','exact'),/输出已存在/);
21
+ writeFileSync(path.join(pkg,'data/v6.6.4.json'),JSON.stringify({version:'6.6.3',components:[]}));
22
+ assert.throws(()=>run('6.6.4','drift'),/版本不一致/);
23
+ }finally{rmSync(temp,{recursive:true,force:true});}
24
+ });
@@ -0,0 +1,77 @@
1
+ // Template adapter smoke test; this is not a product prototype approval.
2
+ import assert from "node:assert/strict";
3
+ import { mkdtemp, mkdir, cp, writeFile } from "node:fs/promises";
4
+ import os from "node:os";
5
+ import path from "node:path";
6
+ import { pathToFileURL } from "node:url";
7
+ import { prepareFlowPrototype, prepareStaticPrototype } from "../scripts/prototype-contract.mjs";
8
+
9
+ const { chromium } = await import(process.env.YSS_PLAYWRIGHT_MODULE || "playwright");
10
+ const temp = await mkdtemp(path.join(os.tmpdir(), "yss-offline-browser-"));
11
+ const source = path.join(temp, "source");
12
+ await mkdir(path.join(source, "docs/design/tokens"), { recursive: true });
13
+ await cp(new URL("../../../../DESIGN.md", import.meta.url), path.join(source, "DESIGN.md"));
14
+ await cp(new URL("../../../../docs/design/tokens/variables.css", import.meta.url), path.join(source, "docs/design/tokens/variables.css"));
15
+ const root = path.join(source, "docs/.scratch/fixture/design/prototypes");
16
+ await prepareFlowPrototype({ projectRoot: source, root, feature: "fixture" });
17
+ const portable = path.join(temp, "portable");
18
+ await cp(root, portable, { recursive: true });
19
+ const browser = await chromium.launch(process.env.YSS_BROWSER_CHANNEL ? { channel: process.env.YSS_BROWSER_CHANNEL } : {});
20
+ const results = [];
21
+ try {
22
+ const context = await browser.newContext({ offline: true, viewport: { width: 1440, height: 900 }, deviceScaleFactor: 1, reducedMotion: "reduce", locale: "zh-CN", timezoneId: "Asia/Shanghai" });
23
+ const page = await context.newPage();
24
+ const failures = [];
25
+ page.on("pageerror", error => failures.push(error.message));
26
+ page.on("console", message => { if (["warning", "error"].includes(message.type())) failures.push(message.text()); });
27
+ page.on("requestfailed", request => failures.push(`${request.url()}: ${request.failure()?.errorText}`));
28
+ page.on("request", request => { if (/^https?:/.test(request.url())) failures.push(`unexpected network: ${request.url()}`); });
29
+ const url = pathToFileURL(path.join(portable, "index.html")).href;
30
+ for (const width of [1440, 390]) {
31
+ await page.setViewportSize({ width, height: width === 390 ? 844 : 900 });
32
+ await page.goto("about:blank");
33
+ await page.goto(`${url}#scenario=failure`);
34
+ await page.locator("#content").fill("长中文输入与待保存内容,失败后必须完整保留。");
35
+ await page.locator("#save").click();
36
+ assert.equal(await page.locator("body").getAttribute("data-state"), "error");
37
+ assert.equal(await page.locator("#content").inputValue(), "长中文输入与待保存内容,失败后必须完整保留。");
38
+ await page.locator("#retry").click();
39
+ assert.equal(await page.locator("body").getAttribute("data-state"), "success");
40
+ assert.equal(await page.locator("#retry").isVisible(), false);
41
+ assert.equal(await page.evaluate(() => document.activeElement.id), "save");
42
+ await page.locator("summary").click();
43
+ await page.locator("#reset").click();
44
+ assert.equal(await page.locator("#content").inputValue(), "失败后应保留的输入");
45
+ await page.locator("#scenario").selectOption("no-permission");
46
+ assert.equal(await page.locator("#save").isDisabled(), true);
47
+ assert.equal(await page.locator("#content").getAttribute("readonly"), "");
48
+ await page.locator("#scenario").selectOption("conflict");
49
+ await page.locator("#save").click();
50
+ assert.equal(await page.locator("body").getAttribute("data-state"), "conflict");
51
+ await page.locator("#reload").click();
52
+ assert.equal(await page.locator("#content").inputValue(), "重新加载的最新内容");
53
+ await page.locator("#scenario").selectOption("primary");
54
+ await page.locator("#content").focus();
55
+ await page.keyboard.press("Tab");
56
+ assert.equal(await page.evaluate(() => document.activeElement.id), "save");
57
+ await page.keyboard.press("Enter");
58
+ assert.equal(await page.locator("body").getAttribute("data-state"), "success");
59
+ const layout = await page.evaluate(() => ({ overflow: document.documentElement.scrollWidth > innerWidth, height: getComputedStyle(document.querySelector("#save")).minHeight, color: getComputedStyle(document.querySelector("#save")).backgroundColor, reducedMotion: matchMedia("(prefers-reduced-motion: reduce)").matches }));
60
+ assert.equal(layout.overflow, false);
61
+ assert.equal(layout.height, "32px");
62
+ assert.equal(layout.color, "rgb(36, 91, 219)");
63
+ assert.equal(layout.reducedMotion, true);
64
+ const screenshot = path.join(temp, `h2-${width}.png`);
65
+ await page.screenshot({ path: screenshot, animations: "disabled" });
66
+ results.push({ width, layout, screenshot, scenarios: ["failure-retry-input-preserved", "reset", "no-permission", "conflict-reload", "keyboard-submit"], result: "passed" });
67
+ }
68
+ const h1Root = path.join(source, "docs/.scratch/visual-fixture/design/prototypes");
69
+ await prepareStaticPrototype({ projectRoot: source, root: h1Root, feature: "visual-fixture" });
70
+ await page.goto(pathToFileURL(path.join(h1Root, "index.html")).href);
71
+ assert.equal(await page.locator("h1").innerText(), "visual-fixture");
72
+ assert.deepEqual(failures, []);
73
+ const report = { result: "passed", browser: browser.version(), operating_system: process.platform, delivery: "file://, isolated directory, offline=true", console_and_resource_failures: failures, results, scope: "template starter smoke, not product QA or user approval" };
74
+ const output = path.join(temp, "browser-result.json");
75
+ await writeFile(output, JSON.stringify(report, null, 2));
76
+ process.stdout.write(`${output}\n`);
77
+ } finally { await browser.close(); }
@@ -1,12 +1,14 @@
1
1
  #!/usr/bin/env node
2
2
  import assert from "node:assert/strict";
3
3
  import { buildDecisionFixture } from "../../../../scripts/fixtures/user-decision/build-fixture.mjs";
4
- import { mkdtemp, mkdir, readFile, writeFile } from "node:fs/promises";
4
+ import { mkdtemp, mkdir, readFile, writeFile, rm, cp, symlink } from "node:fs/promises";
5
5
  import os from "node:os";
6
6
  import path from "node:path";
7
7
  import { prepareFlowPrototype, prepareStaticPrototype, validatePrototypeEvidence, validatePrototypeProject, prototypeDecisionSnapshot } from "../scripts/prototype-contract.mjs";
8
8
  import { sealVisualBaseline, validateVisualBaseline } from "../scripts/visual-baseline-contract.mjs";
9
9
 
10
+ import { sealOfflineHtml } from "../scripts/offline-html.mjs";
11
+
10
12
  const tempRoot = await mkdtemp(path.join(os.tmpdir(), "yss-prototype-contract-"));
11
13
  const projectRoot = path.join(tempRoot, "project");
12
14
  const feature = "order-review";
@@ -14,37 +16,48 @@ await mkdir(path.join(projectRoot, "docs/design/tokens"), { recursive: true });
14
16
  await writeFile(path.join(projectRoot, "DESIGN.md"), "---\nversion: alpha\n---\n");
15
17
  await writeFile(path.join(projectRoot, "docs/design/tokens/theme.json"), JSON.stringify({ token: { colorPrimary: "#3371ff", borderRadius: 6, controlHeight: 32 } }, null, 2));
16
18
 
19
+ await cp(new URL("../../../../docs/design/tokens/variables.css", import.meta.url), path.join(projectRoot, "docs/design/tokens/variables.css"));
20
+
17
21
  const h1Root = path.join(projectRoot, "docs/.scratch", feature, "design/prototypes");
18
22
  await prepareStaticPrototype({ projectRoot, root: h1Root, feature });
19
- assert.match(await readFile(path.join(h1Root, "index.html"), "utf8"), /H1 · visual-review/);
20
- const h1Styles = await readFile(path.join(h1Root, "styles.css"), "utf8");
21
- for (const token of ["--brand-font-family", "--brand-color-text", "--brand-color-bg-layout", "--brand-color-bg-container", "--yss-color-primary-control", "--yss-control-height-compact", "--brand-size-lg", "--brand-size", "--brand-size-sm", "--brand-border-radius-lg", "--brand-border-radius"]) assert.match(h1Styles, new RegExp(token));
22
- for (const staleAlias of ["--font-family", "--layout-background", "--container-background", "--brand-primary"]) assert.doesNotMatch(h1Styles, new RegExp(staleAlias));
23
- for (const hardcodedDeclaration of ["padding:24px", "padding:20px", "min-height:32px", "border-radius:8px", "border-radius:6px"]) assert.doesNotMatch(h1Styles, new RegExp(hardcodedDeclaration));
24
23
  assert.deepEqual((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors, []);
24
+ const originalHtml = await readFile(path.join(h1Root, "index.html"), "utf8");
25
+ await assert.rejects(prepareStaticPrototype({ projectRoot, root: h1Root, feature }), /已有内容|已存在内容/);
26
+ assert.equal(await readFile(path.join(h1Root, "index.html"), "utf8"), originalHtml);
25
27
  await writeFile(path.join(h1Root, "package.json"), "{}\n");
26
- assert((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors.some((message) => message.includes("package.json")), "H1 必须拒绝伪构建依赖");
28
+ assert((await validatePrototypeProject({ root: h1Root, profile: "H1" })).errors.some(message => message.includes("package.json")));
29
+ await rm(path.join(h1Root, "package.json"));
27
30
 
28
31
  const h2Feature = "approval-flow";
29
32
  const h2Root = path.join(projectRoot, "docs/.scratch", h2Feature, "design/prototypes");
30
- const h2Manifest = await prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature, pnpmVersion: "10.15.0" });
31
- await writeFile(path.join(h2Root, "pnpm-lock.yaml"), "lockfileVersion: '9.0'\n");
32
- assert.equal(h2Manifest.component_basis, "vue-antdv-next");
33
- assert.equal(h2Manifest.library.version, "1.5.2");
34
- assert.match(await readFile(path.join(h2Root, "src/App.vue"), "utf8"), /a-config-provider/);
35
- assert.match(await readFile(path.join(h2Root, "src/yss-theme.js"), "utf8"), /compactAlgorithm/);
33
+ const h2Manifest = await prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature });
34
+ assert.equal(h2Manifest.component_basis, "html-css-js");
35
+ assert.equal(h2Manifest.runtime_build_required, false);
36
36
  assert.deepEqual((await validatePrototypeProject({ root: h2Root, profile: "H2" })).errors, []);
37
- assert((await validatePrototypeProject({ root: h2Root, profile: "H2", componentBasis: "vue-antdv-next", libraryVersion: "1.5.1" })).errors.some((message) => message.includes("精确锁定")));
38
-
39
- const reactFeature = "legacy-react-flow";
40
- const reactRoot = path.join(projectRoot, "docs/.scratch", reactFeature, "design/prototypes");
41
- await mkdir(path.join(reactRoot, "src"), { recursive: true });
42
- await writeFile(path.join(reactRoot, "index.html"), "<!doctype html><div id=app></div>\n");
43
- await writeFile(path.join(reactRoot, "package.json"), JSON.stringify({ name: "legacy-react-flow-prototype", private: true, type: "module", scripts: { build: "vite build" }, dependencies: { react: "19.2.0", "react-dom": "19.2.0", vite: "6.4.2" } }, null, 2));
44
- await prepareFlowPrototype({ projectRoot, root: reactRoot, feature: reactFeature, targetAntdVersion: "6.6.2", pnpmVersion: "10.15.0" });
45
- await writeFile(path.join(reactRoot, "pnpm-lock.yaml"), "lockfileVersion: '9.0'\n");
46
- await writeFile(path.join(reactRoot, "src/App.jsx"), 'import { ConfigProvider } from "antd"; import { yssTheme } from "./yss-theme.js"; export function App(){return <ConfigProvider theme={yssTheme}/>;}\n');
47
- assert.deepEqual((await validatePrototypeProject({ root: reactRoot, profile: "H2", targetAntdVersion: "6.6.2" })).errors, []);
37
+ await assert.rejects(prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature, componentBasis: "vue-antdv-next" }), /已退役/);
38
+ await assert.rejects(prepareFlowPrototype({ projectRoot, root: h2Root, feature: h2Feature, targetAntdVersion: "6.6.2" }), /已退役/);
39
+ const portableRoot = path.join(tempRoot, "portable");
40
+ await cp(h2Root, portableRoot, { recursive: true });
41
+ assert.deepEqual((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors, [], "脱离源仓后仍可校验");
42
+ const styles = await readFile(path.join(portableRoot, "styles.css"), "utf8");
43
+ await writeFile(path.join(portableRoot, "styles.css"), styles + '\n@import "../outside.css";');
44
+ await assert.rejects(sealOfflineHtml(portableRoot, "H2"), /资源缺失或越出交付包/);
45
+ await writeFile(path.join(portableRoot, "styles.css"), styles);
46
+ await writeFile(path.join(portableRoot, "tokens.css"), "/* tampered */");
47
+ await assert.rejects(sealOfflineHtml(portableRoot, "H2"), /Token 来源摘要/);
48
+ await cp(path.join(h2Root, "tokens.css"), path.join(portableRoot, "tokens.css"));
49
+ await symlink(path.join(projectRoot, "DESIGN.md"), path.join(portableRoot, "escaped.md"));
50
+ assert((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors.some(message => message.includes("符号链接")));
51
+ await rm(path.join(portableRoot, "escaped.md"));
52
+ const html = await readFile(path.join(portableRoot, "index.html"), "utf8");
53
+ for (const addition of ['<script type="module" src="./app.js"></script>', '<script src="https://example.test/app.js"></script>', '<script>fetch("./data.json")</script>']) {
54
+ await writeFile(path.join(portableRoot, "index.html"), html + addition);
55
+ await assert.rejects(sealOfflineHtml(portableRoot, "H2"));
56
+ }
57
+ await writeFile(path.join(portableRoot, "index.html"), html + "<!-- changed -->");
58
+ assert((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors.some(message => message.includes("摘要")));
59
+ await sealOfflineHtml(portableRoot, "H2");
60
+ assert.deepEqual((await validatePrototypeProject({ root: portableRoot, profile: "H2" })).errors, []);
48
61
 
49
62
  function common(profile, kind, block) {
50
63
  const data = {
@@ -109,11 +122,12 @@ const h2Evidence = common("H2", "flow-review", { flow_review: {
109
122
  visual_regression: { applicable: true, result: "passed", evidence_ref: "visual.json" },
110
123
  prototype_library_facts: { applicable: true, component_basis: "vue-antdv-next", source: "fact-pack", library_package: "antdv-next", library_version: "1.5.2", manifest_ref: "docs/design/facts/antdv-next/1.5.2/manifest.json", manifest_digest: "sha256:facts", components_covered: ["Button"], canonical_design_digest: "sha256:design", project_token_baseline_digest: "sha256:tokens", new_api_uncertainty: false }
111
124
  } });
112
- assert.deepEqual(validatePrototypeEvidence(h2Evidence).errors, []);
125
+ assert(validatePrototypeEvidence(h2Evidence).errors.some(message => message.includes("Provider 已退役")));
126
+ assert.deepEqual(validatePrototypeEvidence(h2Evidence, { allowLegacy: true }).errors, []);
113
127
  const legacyReactEvidence = structuredClone(h2Evidence);
114
128
  legacyReactEvidence.profile_evidence.flow_review.implementation.framework = "react";
115
129
  legacyReactEvidence.profile_evidence.flow_review.prototype_library_facts = { applicable: true, component_basis: "react-antd-6", source: "fact-pack", actual_antd_version: "6.6.2", manifest_ref: "docs/design/facts/antd/6.6.2/manifest.json", manifest_digest: "sha256:facts", components_covered: ["Button"], canonical_design_digest: "sha256:design", project_token_baseline_digest: "sha256:tokens", new_api_uncertainty: false };
116
- assert.deepEqual(validatePrototypeEvidence(legacyReactEvidence).errors, []);
130
+ assert.deepEqual(validatePrototypeEvidence(legacyReactEvidence, { allowLegacy: true }).errors, []);
117
131
  const staleFacts = structuredClone(h2Evidence);
118
132
  staleFacts.profile_evidence.flow_review.prototype_library_facts.project_token_baseline_digest = "sha256:old";
119
133
  assert(validatePrototypeEvidence(staleFacts).errors.some((message) => message.includes("Token digest")));
@@ -137,6 +151,39 @@ assert(validatePrototypeEvidence(invalidHandoff).errors.some((message) => messag
137
151
  assert(validatePrototypeEvidence({ schema_version: 3 }).errors.some((message) => message.includes("只读旧证据")));
138
152
  assert.deepEqual(validatePrototypeEvidence({ schema_version: 3 }, { allowLegacy: true }).errors, []);
139
153
 
154
+
155
+ const htmlEvidence = common("H2", "flow-review", { flow_review: {
156
+ implementation: { framework: "html-css-js", runtime_build_required: false },
157
+ main_flow_result: "passed", exceptional_state_result: "passed", exceptional_state_ref: "exceptions.md",
158
+ keyboard_result: "passed", focus_result: "passed", contrast_result: "passed", zoom_200_result: "passed", reduced_motion_result: "passed",
159
+ scenario_replay_ref: "replay.json", scenario_reset_result: "passed",
160
+ visual_regression: { applicable: false, result: "not-applicable", evidence_ref: "first-version.md" },
161
+ prototype_library_facts: { applicable: false, component_basis: "html-css-js" }
162
+ } });
163
+ htmlEvidence.source_visual = { kind: "design-system", ideation_status: "not-applicable", selected_ref: "DESIGN.md", reuse_reason: "已有规范覆盖当前页面模式" };
164
+ htmlEvidence.design_qa.mode = "design-contract";
165
+ Object.assign(htmlEvidence.browser_delivery, { delivery_contract: "offline-html-v1", resource_manifest_ref: "yss-prototype-adapter.json", offline_verification_ref: "offline.json", offline_verification_result: "passed" });
166
+ assert.deepEqual(validatePrototypeEvidence(htmlEvidence).errors, []);
167
+ for (const field of ["offline_verification_result", "offline_verification_ref", "resource_manifest_ref"]) {
168
+ const invalid = structuredClone(htmlEvidence); delete invalid.browser_delivery[field];
169
+ assert(validatePrototypeEvidence(invalid).errors.some(message => message.includes(field)));
170
+ }
171
+ const selfComparison = structuredClone(htmlEvidence); selfComparison.design_qa.mode = "visual-comparison";
172
+ assert(validatePrototypeEvidence(selfComparison).errors.some(message => message.includes("source_visual.kind")));
173
+ const incompleteFlow = structuredClone(htmlEvidence); incompleteFlow.profile_evidence.flow_review.scenario_reset_result = "pending";
174
+ assert(validatePrototypeEvidence(incompleteFlow).errors.some(message => message.includes("scenario_reset_result")));
175
+
176
+ const prebuiltEvidence = structuredClone(htmlEvidence);
177
+ Object.assign(prebuiltEvidence.profile_evidence.flow_review.implementation, { framework: "react-antd-prebuilt", selection_reason: "日期与受控表单影响评审结论" });
178
+ prebuiltEvidence.profile_evidence.flow_review.prototype_library_facts = { applicable: true, component_basis: "react-antd-prebuilt", library_package: "antd", library_version: "6.6.4", source: "fact-pack", manifest_ref: "reference/manifest.json", manifest_digest: "sha256:" + "c".repeat(64), canonical_design_digest: prebuiltEvidence.design_baseline.canonical_design_digest, project_token_baseline_digest: prebuiltEvidence.design_baseline.project_token_baseline_digest, new_api_uncertainty: false, components_covered: ["Table", "Select"], build_provenance_ref: "build-provenance.json" };
179
+ assert.deepEqual(validatePrototypeEvidence(prebuiltEvidence).errors, []);
180
+ for (const field of ["build_provenance_ref", "library_version"]) {
181
+ const invalid = structuredClone(prebuiltEvidence); delete invalid.profile_evidence.flow_review.prototype_library_facts[field];
182
+ assert(validatePrototypeEvidence(invalid).errors.length > 0);
183
+ }
184
+ const noPrebuiltReason = structuredClone(prebuiltEvidence); delete noPrebuiltReason.profile_evidence.flow_review.implementation.selection_reason;
185
+ assert(validatePrototypeEvidence(noPrebuiltReason).errors.some(x => x.includes("selection_reason")));
186
+
140
187
  function pngHeader(width, height) {
141
188
  const value = Buffer.alloc(24);
142
189
  Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]).copy(value, 0);
@@ -0,0 +1,57 @@
1
+ // Real browser verification of reusable maintenance starters; never product approval.
2
+ import assert from 'node:assert/strict';
3
+ import {mkdtemp,mkdir,cp,writeFile,readFile} from 'node:fs/promises';
4
+ import path from 'node:path';
5
+ import os from 'node:os';
6
+ import {pathToFileURL} from 'node:url';
7
+ import {prepareFlowPrototype,validatePrototypeProject} from '../scripts/prototype-contract.mjs';
8
+ import {buildAntdPrototype} from '../scripts/build-antd-prototype.mjs';
9
+ const {chromium}=await import(process.env.YSS_PLAYWRIGHT_MODULE||'playwright');
10
+ const temp=await mkdtemp(path.join(os.tmpdir(),'yss-workbench-browser-'));const source=path.join(temp,'source');
11
+ await mkdir(path.join(source,'docs/design/tokens'),{recursive:true});for(const ref of ['DESIGN.md','docs/design/tokens/variables.css'])await cp(new URL(`../../../../${ref}`,import.meta.url),path.join(source,ref));
12
+ const results=[];const browser=await chromium.launch(process.env.YSS_BROWSER_CHANNEL?{channel:process.env.YSS_BROWSER_CHANNEL}:{});
13
+ try{
14
+ for(const kind of ['native','antd']){
15
+ const root=path.join(source,`docs/.scratch/${kind}/design/prototypes`);
16
+ if(kind==='native')await prepareFlowPrototype({projectRoot:source,root,feature:kind,pattern:'workbench'});
17
+ else{await assert.rejects(buildAntdPrototype({projectRoot:source,root,feature:kind}),/理由/);await buildAntdPrototype({projectRoot:source,root,feature:kind,toolchain:process.env.YSS_ANTD_TOOLCHAIN,reason:'维护测试:复杂表格分页、Select 与日期区间需要真实交互'});}
18
+ assert.deepEqual((await validatePrototypeProject({root,componentBasis:kind==='antd'?'react-antd-prebuilt':'html-css-js'})).errors,[]);
19
+ if(kind==='antd'){
20
+ assert((await validatePrototypeProject({root,componentBasis:'html-css-js'})).errors.length);
21
+ const ref=path.join(root,'build-provenance.json'),original=await readFile(ref,'utf8');
22
+ await writeFile(ref,'{broken');assert((await validatePrototypeProject({root})).errors.some(e=>e.includes('有效 JSON')));await writeFile(ref,original);
23
+ const sourceRef=path.join(root,'authoring-source.jsx'),sourceBytes=await readFile(sourceRef);
24
+ await writeFile(sourceRef,sourceBytes+'\n// drift');assert((await validatePrototypeProject({root})).errors.some(e=>e.includes('源文件')));await writeFile(sourceRef,sourceBytes);
25
+ await assert.rejects(buildAntdPrototype({projectRoot:source,root,feature:kind,toolchain:process.env.YSS_ANTD_TOOLCHAIN,reason:'验证拒绝覆盖'}),/已存在内容/);
26
+ assert.deepEqual((await validatePrototypeProject({root})).errors,[]);
27
+ }
28
+ const portable=path.join(temp,kind);await cp(root,portable,{recursive:true});const url=pathToFileURL(path.join(portable,'index.html')).href;
29
+ const context=await browser.newContext({offline:true,deviceScaleFactor:1,locale:'zh-CN',timezoneId:'Asia/Shanghai',reducedMotion:'reduce'});
30
+ const page=await context.newPage();const failures=[];
31
+ page.on('pageerror',e=>failures.push(e.message));page.on('console',m=>{if(['warning','error'].includes(m.type()))failures.push(m.text());});page.on('requestfailed',r=>failures.push(r.url()));page.on('request',r=>{if(/^https?:/.test(r.url()))failures.push(r.url());});
32
+ for(const width of [1440,390]){
33
+ await page.setViewportSize({width,height:width===390?844:900});await page.goto('about:blank');await page.goto(url+'#scenario=failure');
34
+ await page.getByRole('button',{name:'查看 M-001',exact:true}).click();await page.getByRole('dialog').waitFor();await page.keyboard.press('Escape');await page.getByRole('dialog').waitFor({state:'hidden'});
35
+ await page.getByRole('button',{name:'编辑 M-001',exact:true}).click();await page.locator('#name').fill('维护测试:跨部门资料更新');await page.locator('#save').click();await page.getByText('保存失败,输入已保留,请重试。',{exact:true}).waitFor();assert.equal(await page.locator('#name').inputValue(),'维护测试:跨部门资料更新');await page.locator('#retry').click();await page.getByText('保存成功(本地模拟)。',{exact:true}).waitFor();
36
+ assert.equal(await page.evaluate(()=>document.documentElement.scrollWidth>innerWidth),false);
37
+ await page.locator('.table-scroll, .ant-table-content').evaluateAll(elements=>elements.forEach(el=>{el.scrollLeft=0;}));await page.evaluate(()=>scrollTo(0,0));
38
+ const screenshot=path.join(temp,`${kind}-${width}.png`);await page.screenshot({path:screenshot,animations:'disabled'});
39
+ await page.locator('summary').click();await page.locator('#reset').click();assert.equal(await page.locator('table').getByText('季度经营分析资料',{exact:true}).count(),1);
40
+ await page.locator('#scenario').selectOption('no-permission');assert.equal(await page.getByRole('button',{name:'编辑 M-001',exact:true}).isDisabled(),true);
41
+ await page.locator('#scenario').selectOption('empty');await page.getByText('暂无符合条件的资料',{exact:true}).waitFor();
42
+ await page.locator('#scenario').selectOption('loading');if(kind==='native')await page.getByText('正在加载(固定评审状态)',{exact:true}).waitFor();else assert.equal(await page.locator('.ant-spin-spinning').count(),1);
43
+ await page.locator('#scenario').selectOption('conflict');await page.getByRole('button',{name:'编辑 M-001',exact:true}).click();await page.locator('#name').fill('冲突时保留的输入');await page.locator('#save').click();assert.equal(await page.locator('#name').inputValue(),'冲突时保留的输入');await page.locator('#reload').click();
44
+ const control=await page.locator('#save').evaluate(el=>({height:el.getBoundingClientRect().height,color:getComputedStyle(el).backgroundColor}));assert.equal(control.height,32);assert.equal(control.color,'rgb(36, 91, 219)');
45
+ if(kind==='antd'){const theme=await page.locator('#name').evaluate(el=>({background:getComputedStyle(el).backgroundColor,color:getComputedStyle(el).color}));assert.equal(theme.background,'rgb(255, 255, 255)');assert.equal(theme.color,'rgba(0, 0, 0, 0.88)');}
46
+ if(kind==='antd'){
47
+ await page.locator('#owner').click();await page.locator('.ant-select-item-option').filter({hasText:'王宁'}).click();
48
+ const date=page.locator('.ant-picker-input input').first();await date.click();await page.locator('.ant-picker-panel-container').waitFor();await page.keyboard.press('Escape');await page.locator('.ant-picker-panel-container').waitFor({state:'hidden'});
49
+ }
50
+ await page.locator('#save').focus();await page.keyboard.press('Escape');await page.getByRole('dialog').waitFor({state:'hidden'});
51
+ await page.locator('#scenario').selectOption('primary');await page.locator('#keyword').fill('M-003');await page.getByRole('button',{name:'查询',exact:true}).click();await page.getByRole('button',{name:'查看 M-003',exact:true}).waitFor();
52
+ results.push({kind,width,result:'passed',control,screenshot,scenarios:['query','detail-escape','edit-failure-retry','reset','no-permission','empty','loading','conflict-reload',...(kind==='antd'?['select','date-panel']:[])]});
53
+ }
54
+ assert.deepEqual(failures,[]);await context.close();
55
+ }
56
+ const report={result:'passed',scope:'maintenance starters only; not product QA or approval',browser:browser.version(),os:process.platform,delivery:'file:// isolated directory offline=true',results};await writeFile(path.join(temp,'result.json'),JSON.stringify(report,null,2));console.log(path.join(temp,'result.json'));
57
+ }finally{await browser.close();}