create-yss-spec 3.3.7 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (729) hide show
  1. package/README.md +12 -13
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +3 -13
  4. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  5. package/template/.agents/skills/yss-application/SKILL.md +1 -1
  6. package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  7. package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  8. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  9. package/template/.agents/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  10. package/template/.agents/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  11. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  12. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  13. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  14. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  15. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  16. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  17. package/template/.agents/skills/yss-design-system/SKILL.md +19 -19
  18. package/template/.agents/skills/yss-design-system/references/data-quality-theme.md +13 -0
  19. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -1
  20. package/template/.agents/skills/yss-design-system/references/design-system.md +7 -9
  21. package/template/.agents/skills/yss-formily/SKILL.md +21 -258
  22. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  23. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  24. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  25. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  26. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  27. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  28. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  29. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  30. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  31. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  32. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  33. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  34. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  35. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  36. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  37. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  38. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  39. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  40. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  41. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  42. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  43. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  44. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  45. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  46. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  47. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  48. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  49. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  50. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  51. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  52. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  53. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  54. package/template/.agents/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  55. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  56. package/template/.agents/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  57. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  58. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  59. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  60. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  61. package/template/.agents/skills/yss-hook/SKILL.md +1 -1
  62. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  63. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  64. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  65. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  66. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  67. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  68. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  69. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  70. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  71. package/template/.agents/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  72. package/template/.agents/skills/yss-openapi-governance/SKILL.md +2 -0
  73. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  74. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  75. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
  76. package/template/.agents/skills/yss-prototype-stage/SKILL.md +22 -9
  77. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  78. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  79. package/template/.agents/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  80. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  81. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  82. package/template/.agents/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  83. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  84. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  85. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  86. package/template/.agents/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  87. package/template/.agents/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  88. package/template/.agents/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  89. package/template/.agents/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  90. package/template/.agents/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  91. package/template/.agents/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  92. package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  93. package/template/.agents/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  94. package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  95. package/template/.agents/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  96. package/template/.agents/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  97. package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  98. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  99. package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  100. package/template/.agents/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  101. package/template/.agents/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  102. package/template/.agents/skills/yss-tactical-design/SKILL.md +1 -1
  103. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  104. package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  105. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  106. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  107. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  108. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  109. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  110. package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  111. package/template/.agents/skills/yss-ui/SKILL.md +3 -2
  112. package/template/.agents/skills/yss-ui/references/component-routing.md +11 -10
  113. package/template/.agents/skills/yss-ui/references/specialized-components.md +52 -0
  114. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  115. package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  116. package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  117. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  118. package/template/.agents/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  119. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  120. package/template/.codex/skills/yss-application/SKILL.md +1 -1
  121. package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  122. package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  123. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  124. package/template/.codex/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  125. package/template/.codex/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  126. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  127. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  128. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  129. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  130. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  131. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  132. package/template/.codex/skills/yss-design-system/SKILL.md +19 -19
  133. package/template/.codex/skills/yss-design-system/references/data-quality-theme.md +13 -0
  134. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -1
  135. package/template/.codex/skills/yss-design-system/references/design-system.md +7 -9
  136. package/template/.codex/skills/yss-formily/SKILL.md +21 -258
  137. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  138. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  139. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  140. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  141. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  142. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  143. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  144. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  145. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  146. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  147. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  148. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  149. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  150. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  151. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  152. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  153. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  154. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  155. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  156. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  157. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  158. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  159. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  160. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  161. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  162. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  163. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  164. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  165. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  166. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  167. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  168. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  169. package/template/.codex/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  170. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  171. package/template/.codex/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  172. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  173. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  174. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  175. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  176. package/template/.codex/skills/yss-hook/SKILL.md +1 -1
  177. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  178. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  179. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  180. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  181. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  182. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  183. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  184. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  185. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  186. package/template/.codex/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  187. package/template/.codex/skills/yss-openapi-governance/SKILL.md +2 -0
  188. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  189. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  190. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
  191. package/template/.codex/skills/yss-prototype-stage/SKILL.md +22 -9
  192. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  193. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  194. package/template/.codex/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  195. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  196. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  197. package/template/.codex/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  198. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  199. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  200. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  201. package/template/.codex/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  202. package/template/.codex/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  203. package/template/.codex/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  204. package/template/.codex/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  205. package/template/.codex/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  206. package/template/.codex/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  207. package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  208. package/template/.codex/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  209. package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  210. package/template/.codex/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  211. package/template/.codex/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  212. package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  213. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  214. package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  215. package/template/.codex/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  216. package/template/.codex/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  217. package/template/.codex/skills/yss-tactical-design/SKILL.md +1 -1
  218. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  219. package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  220. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  221. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  222. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  223. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  224. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  225. package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  226. package/template/.codex/skills/yss-ui/SKILL.md +3 -2
  227. package/template/.codex/skills/yss-ui/references/component-routing.md +11 -10
  228. package/template/.codex/skills/yss-ui/references/specialized-components.md +52 -0
  229. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  230. package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  231. package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  232. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  233. package/template/.codex/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  234. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  235. package/template/.cursor/skills/yss-application/SKILL.md +1 -1
  236. package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  237. package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  238. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  239. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  240. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  241. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  242. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  243. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  244. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  245. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  246. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  247. package/template/.cursor/skills/yss-design-system/SKILL.md +19 -19
  248. package/template/.cursor/skills/yss-design-system/references/data-quality-theme.md +13 -0
  249. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -1
  250. package/template/.cursor/skills/yss-design-system/references/design-system.md +7 -9
  251. package/template/.cursor/skills/yss-formily/SKILL.md +21 -258
  252. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  253. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  254. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  255. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  256. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  257. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  258. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  259. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  260. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  261. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  262. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  263. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  264. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  265. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  266. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  267. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  268. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  269. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  270. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  271. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  272. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  273. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  274. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  275. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  276. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  277. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  278. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  279. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  280. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  281. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  282. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  283. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  284. package/template/.cursor/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  285. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  286. package/template/.cursor/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  287. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  288. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  289. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  290. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  291. package/template/.cursor/skills/yss-hook/SKILL.md +1 -1
  292. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  293. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  294. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  295. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  296. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  297. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  298. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  299. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  300. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  301. package/template/.cursor/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  302. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +2 -0
  303. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  304. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  305. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
  306. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +22 -9
  307. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  308. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  309. package/template/.cursor/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  310. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  311. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  312. package/template/.cursor/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  313. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  314. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  315. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  316. package/template/.cursor/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  317. package/template/.cursor/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  318. package/template/.cursor/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  319. package/template/.cursor/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  320. package/template/.cursor/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  321. package/template/.cursor/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  322. package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  323. package/template/.cursor/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  324. package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  325. package/template/.cursor/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  326. package/template/.cursor/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  327. package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  328. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  329. package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  330. package/template/.cursor/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  331. package/template/.cursor/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  332. package/template/.cursor/skills/yss-tactical-design/SKILL.md +1 -1
  333. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  334. package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  335. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  336. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  337. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  338. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  339. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  340. package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  341. package/template/.cursor/skills/yss-ui/SKILL.md +3 -2
  342. package/template/.cursor/skills/yss-ui/references/component-routing.md +11 -10
  343. package/template/.cursor/skills/yss-ui/references/specialized-components.md +52 -0
  344. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  345. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  346. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  347. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  348. package/template/.cursor/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  349. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  350. package/template/.pi/skills/yss-application/SKILL.md +1 -1
  351. package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  352. package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  353. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +3 -3
  354. package/template/.pi/skills/yss-ddd-scaffold-generator/references/USAGE_EXAMPLES.md +1 -1
  355. package/template/.pi/skills/yss-ddd-scaffold-generator/references/layer-skill-routing.md +18 -0
  356. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-parent/SKILL.md +1 -1
  357. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/first-slice-compatibility.test.mjs +13 -4
  358. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +9 -8
  359. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_first_slice_verification.mjs +2 -1
  360. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/run_scaffold_verification.mjs +6 -4
  361. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/scaffold-generator.test.mjs +108 -12
  362. package/template/.pi/skills/yss-design-system/SKILL.md +19 -19
  363. package/template/.pi/skills/yss-design-system/references/data-quality-theme.md +13 -0
  364. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -1
  365. package/template/.pi/skills/yss-design-system/references/design-system.md +7 -9
  366. package/template/.pi/skills/yss-formily/SKILL.md +21 -258
  367. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +17 -13
  368. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.eslintrc.cjs +1 -0
  369. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/.npmrc.example +2 -0
  370. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/DESIGN.md +264 -0
  371. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/README.md +13 -0
  372. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/__yss_dotfile__.gitignore +6 -0
  373. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/micro-config.json +5 -0
  374. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/orval.config.ts +2 -0
  375. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/package.json +30 -0
  376. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.development +1 -0
  377. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.example +5 -0
  378. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production +1 -0
  379. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/.env.production.standalone +1 -0
  380. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/index.html +2 -0
  381. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/package.json +34 -0
  382. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/public/favicon.svg +1 -0
  383. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/App.vue +15 -0
  384. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/api/mutator.ts +7 -0
  385. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/components/ThemeScope.vue +11 -0
  386. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/config/theme.json +41 -0
  387. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/env.d.ts +1 -0
  388. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/main.ts +40 -0
  389. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/router/index.ts +8 -0
  390. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/store/theme.ts +37 -0
  391. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/styles/index.less +6 -0
  392. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/types/microAppBridge.ts +28 -0
  393. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/utils/microAppRouterBridge.ts +266 -0
  394. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/NotFound.vue +1 -0
  395. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/src/views/Welcome.vue +1 -0
  396. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/tsconfig.json +23 -0
  397. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/packages/vite.config.ts +16 -0
  398. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-lock.yaml +9026 -0
  399. package/template/.pi/skills/yss-frontend-scaffold-generator/assets/data-quality-v1/pnpm-workspace.yaml +7 -0
  400. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-baseline.md +17 -0
  401. package/template/.pi/skills/yss-frontend-scaffold-generator/references/data-quality-v1.manifest.json +49 -0
  402. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +41 -13
  403. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +29 -0
  404. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/run_scaffold_verification.mjs +5 -1
  405. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/scaffold-generator.test.mjs +32 -0
  406. package/template/.pi/skills/yss-hook/SKILL.md +1 -1
  407. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +3 -3
  408. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -3
  409. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +17 -5
  410. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  411. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/agents/openai.yaml +1 -1
  412. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +12 -8
  413. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/run_scaffold_verification.mjs +1 -1
  414. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +97 -9
  415. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/SKILL.md +2 -2
  416. package/template/.pi/skills/yss-mvc-data-analysis-project-initializer/scripts/generate_project.mjs +1 -1
  417. package/template/.pi/skills/yss-openapi-governance/SKILL.md +2 -0
  418. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +49 -16
  419. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +2 -2
  420. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
  421. package/template/.pi/skills/yss-prototype-stage/SKILL.md +22 -9
  422. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/package.json +16 -0
  423. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/pnpm-lock.yaml +1678 -0
  424. package/template/.pi/skills/yss-prototype-stage/assets/antd-authoring/workbench.jsx +23 -0
  425. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/app.js +20 -0
  426. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/index.html +11 -0
  427. package/template/.pi/skills/yss-prototype-stage/assets/native-workbench/styles.css +28 -0
  428. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/app.js +50 -0
  429. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/index.html +38 -0
  430. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/scenarios.js +7 -0
  431. package/template/.pi/skills/yss-prototype-stage/assets/offline-html/styles.css +20 -0
  432. package/template/.pi/skills/yss-prototype-stage/references/antd-component-catalog.json +736 -0
  433. package/template/.pi/skills/yss-prototype-stage/references/antd-integration.md +61 -0
  434. package/template/.pi/skills/yss-prototype-stage/references/html-prototype-practices.md +14 -0
  435. package/template/.pi/skills/yss-prototype-stage/references/product-design-adapter.md +28 -51
  436. package/template/.pi/skills/yss-prototype-stage/references/prototype-profile-routing.md +15 -4
  437. package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +71 -0
  438. package/template/.pi/skills/yss-prototype-stage/scripts/collect-antd-reference.mjs +26 -0
  439. package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +121 -0
  440. package/template/.pi/skills/yss-prototype-stage/scripts/prototype-contract.mjs +52 -143
  441. package/template/.pi/skills/yss-prototype-stage/tests/antd-reference.test.mjs +24 -0
  442. package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +77 -0
  443. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +73 -26
  444. package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +57 -0
  445. package/template/.pi/skills/yss-skill-source-index-refresh/references/source-map-config.md +0 -1
  446. package/template/.pi/skills/yss-skill-source-index-refresh/scripts/refresh-yss-skill-index.mjs +0 -1
  447. package/template/.pi/skills/yss-tactical-design/SKILL.md +1 -1
  448. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  449. package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  450. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  451. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  452. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  453. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  454. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  455. package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  456. package/template/.pi/skills/yss-ui/SKILL.md +3 -2
  457. package/template/.pi/skills/yss-ui/references/component-routing.md +11 -10
  458. package/template/.pi/skills/yss-ui/references/specialized-components.md +52 -0
  459. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  460. package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  461. package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  462. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.mjs +4 -3
  463. package/template/.pi/skills/yss-web-controller/scripts/generate_controller.test.mjs +1 -1
  464. package/template/CONTEXT.md +1 -0
  465. package/template/DESIGN.md +31 -14
  466. package/template/README.md +4 -6
  467. package/template/__yss_dotfile__.gitignore +4 -0
  468. package/template/docs/agents/backend-architecture-profiles.md +4 -0
  469. package/template/docs/agents/digital-human-roles.yaml +4 -4
  470. package/template/docs/agents/skill-migrations.md +15 -2
  471. package/template/docs/agents/yss-skill-registry.yaml +19 -40
  472. package/template/docs/design/README.md +4 -4
  473. package/template/docs/design/design-system-sync.yaml +2 -1
  474. package/template/docs/design/design.md +23 -31
  475. package/template/docs/design/preview-dark.html +3 -3
  476. package/template/docs/design/preview.css +1 -1
  477. package/template/docs/design/preview.html +2 -2
  478. package/template/docs/design/templates/interaction-spec-template.md +2 -2
  479. package/template/docs/design/templates/prototype-confirmation-template.md +2 -2
  480. package/template/docs/design/templates/prototype-evidence-template.yaml +18 -22
  481. package/template/docs/design/templates/prototype-review-checklist.md +5 -3
  482. package/template/docs/design/templates/state-matrix-template.md +1 -1
  483. package/template/docs/design/templates/visual-baseline-template.yaml +3 -2
  484. package/template/docs/design/tokens/.design-md-projection.json +7 -7
  485. package/template/docs/design/tokens/theme.json +16 -10
  486. package/template/docs/design/tokens/tokens.compact.json +521 -237
  487. package/template/docs/design/tokens/tokens.dark.json +527 -240
  488. package/template/docs/design/tokens/tokens.default.json +513 -235
  489. package/template/docs/design/tokens/variables.css +67 -65
  490. package/template/docs/design/tokens/variables.dark.css +41 -41
  491. package/template/docs/plan/templates/market-analysis-template.md +3 -3
  492. package/template/docs/plan/templates/user-pain-points-template.md +3 -3
  493. package/template/docs/process/delivery-preflight.md +72 -0
  494. package/template/docs/process/document-writing.md +5 -1
  495. package/template/docs/process/existing-backend-architecture.md +31 -0
  496. package/template/docs/process/existing-ui-baseline.md +40 -0
  497. package/template/docs/process/frontend-backend-delivery.md +20 -6
  498. package/template/docs/process/implementation-repo-integration.md +6 -0
  499. package/template/docs/process/lifecycle-registry-baseline.json +1 -1
  500. package/template/docs/process/lifecycle-registry.yaml +5 -5
  501. package/template/docs/process/schemas/api-contract-decision.schema.json +74 -0
  502. package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
  503. package/template/docs/process/schemas/data-architecture-decision.schema.json +34 -0
  504. package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
  505. package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
  506. package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
  507. package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
  508. package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
  509. package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
  510. package/template/docs/process/schemas/implementation-repository-preparation-result.schema.json +80 -24
  511. package/template/docs/process/schemas/project-scaffold-contract.schema.json +85 -11
  512. package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -0
  513. package/template/docs/process/schemas/strategic-design-handoff.schema.json +296 -107
  514. package/template/docs/process/schemas/strategic-handoff-delivery-verification.schema.json +19 -0
  515. package/template/docs/process/schemas/strategic-handoff-delivery.schema.json +84 -0
  516. package/template/docs/process/schemas/strategic-handoff-export-v2.schema.json +378 -0
  517. package/template/docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json +42 -0
  518. package/template/docs/process/strategic-handoff-package.md +42 -17
  519. package/template/docs/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md +43 -0
  520. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
  521. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +9 -10
  522. package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +13 -10
  523. package/template/scripts/audit-legacy-backend-scaffold +29 -0
  524. package/template/scripts/backend-delivery +20 -4
  525. package/template/scripts/lib/api-contract-decision.mjs +49 -0
  526. package/template/scripts/lib/api-contract-decision.test.mjs +69 -0
  527. package/template/scripts/lib/approved-execution-context.mjs +106 -0
  528. package/template/scripts/lib/backend-architecture.mjs +12 -0
  529. package/template/scripts/lib/backend-delivery.mjs +10 -6
  530. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +123 -0
  531. package/template/scripts/lib/delivery-preflight.mjs +238 -0
  532. package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
  533. package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
  534. package/template/scripts/lib/frontend-delivery.mjs +23 -15
  535. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
  536. package/template/scripts/lib/json-schema.mjs +19 -4
  537. package/template/scripts/lib/legacy-backend-scaffold-audit.mjs +87 -0
  538. package/template/scripts/lib/legacy-backend-scaffold-audit.test.mjs +64 -0
  539. package/template/scripts/lib/lifecycle-transition.mjs +153 -5
  540. package/template/scripts/lib/openapi-draft-validation.mjs +111 -0
  541. package/template/scripts/lib/profile-skill-sync.mjs +26 -0
  542. package/template/scripts/lib/skill-registry.mjs +17 -3
  543. package/template/scripts/lib/skill-supply-chain.mjs +12 -1
  544. package/template/scripts/lib/strategic-feedback.mjs +2 -2
  545. package/template/scripts/lib/strategic-handoff-consumption.mjs +8 -7
  546. package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
  547. package/template/scripts/lib/strategic-handoff-io.mjs +10 -0
  548. package/template/scripts/lib/strategic-handoff.mjs +124 -32
  549. package/template/scripts/lib/task-package.mjs +11 -3
  550. package/template/scripts/lib/technical-design-boundary.mjs +9 -1
  551. package/template/scripts/lib/ui-baseline.mjs +26 -0
  552. package/template/scripts/lib/user-decision.mjs +4 -1
  553. package/template/scripts/preflight-delivery +14 -0
  554. package/template/scripts/strategic-handoff +23 -6
  555. package/template/scripts/sync-profile-skills +4 -5
  556. package/template/scripts/verify-openapi-draft-validation-record +10 -129
  557. package/template/scripts/verify-strategic-context-import +12 -14
  558. package/template/skills-lock.json +25 -80
  559. package/template/yss-public-skills.json +0 -6
  560. package/template.snapshot.json +8 -4
  561. package/template/.agents/skills/yss-antd-design/SKILL.md +0 -35
  562. package/template/.agents/skills/yss-antd-design/references/boundaries.md +0 -30
  563. package/template/.agents/skills/yss-antd-design/references/cli-matrix.md +0 -38
  564. package/template/.agents/skills/yss-antd-design/references/evidence.md +0 -35
  565. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  566. package/template/.agents/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  567. package/template/.agents/skills/yss-antdv-next-design/SKILL.md +0 -48
  568. package/template/.agents/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  569. package/template/.agents/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  570. package/template/.agents/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  571. package/template/.agents/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  572. package/template/.agents/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  573. package/template/.agents/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  574. package/template/.agents/skills/yss-components/SKILL.md +0 -386
  575. package/template/.agents/skills/yss-components/agents/openai.yaml +0 -5
  576. package/template/.agents/skills/yss-components/references/frontend-docs.md +0 -9
  577. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  578. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  579. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  580. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  581. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  582. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  583. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  584. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  585. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  586. package/template/.agents/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  587. package/template/.agents/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  588. package/template/.agents/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  589. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  590. package/template/.agents/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  591. package/template/.agents/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  592. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  593. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  594. package/template/.agents/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  595. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  596. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  597. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  598. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  599. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  600. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  601. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  602. package/template/.agents/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  603. package/template/.codex/skills/yss-antd-design/SKILL.md +0 -35
  604. package/template/.codex/skills/yss-antd-design/references/boundaries.md +0 -30
  605. package/template/.codex/skills/yss-antd-design/references/cli-matrix.md +0 -38
  606. package/template/.codex/skills/yss-antd-design/references/evidence.md +0 -35
  607. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  608. package/template/.codex/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  609. package/template/.codex/skills/yss-antdv-next-design/SKILL.md +0 -48
  610. package/template/.codex/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  611. package/template/.codex/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  612. package/template/.codex/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  613. package/template/.codex/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  614. package/template/.codex/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  615. package/template/.codex/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  616. package/template/.codex/skills/yss-components/SKILL.md +0 -386
  617. package/template/.codex/skills/yss-components/agents/openai.yaml +0 -5
  618. package/template/.codex/skills/yss-components/references/frontend-docs.md +0 -9
  619. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  620. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  621. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  622. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  623. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  624. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  625. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  626. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  627. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  628. package/template/.codex/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  629. package/template/.codex/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  630. package/template/.codex/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  631. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  632. package/template/.codex/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  633. package/template/.codex/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  634. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  635. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  636. package/template/.codex/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  637. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  638. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  639. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  640. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  641. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  642. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  643. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  644. package/template/.codex/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  645. package/template/.cursor/skills/yss-antd-design/SKILL.md +0 -35
  646. package/template/.cursor/skills/yss-antd-design/references/boundaries.md +0 -30
  647. package/template/.cursor/skills/yss-antd-design/references/cli-matrix.md +0 -38
  648. package/template/.cursor/skills/yss-antd-design/references/evidence.md +0 -35
  649. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  650. package/template/.cursor/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  651. package/template/.cursor/skills/yss-antdv-next-design/SKILL.md +0 -48
  652. package/template/.cursor/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  653. package/template/.cursor/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  654. package/template/.cursor/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  655. package/template/.cursor/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  656. package/template/.cursor/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  657. package/template/.cursor/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  658. package/template/.cursor/skills/yss-components/SKILL.md +0 -386
  659. package/template/.cursor/skills/yss-components/agents/openai.yaml +0 -5
  660. package/template/.cursor/skills/yss-components/references/frontend-docs.md +0 -9
  661. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  662. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  663. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  664. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  665. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  666. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  667. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  668. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  669. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  670. package/template/.cursor/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  671. package/template/.cursor/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  672. package/template/.cursor/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  673. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  674. package/template/.cursor/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  675. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  676. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  677. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  678. package/template/.cursor/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  679. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  680. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  681. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  682. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  683. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  684. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  685. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  686. package/template/.cursor/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  687. package/template/.pi/skills/yss-antd-design/SKILL.md +0 -35
  688. package/template/.pi/skills/yss-antd-design/references/boundaries.md +0 -30
  689. package/template/.pi/skills/yss-antd-design/references/cli-matrix.md +0 -38
  690. package/template/.pi/skills/yss-antd-design/references/evidence.md +0 -35
  691. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.mjs +0 -46
  692. package/template/.pi/skills/yss-antd-design/scripts/validate-frontmatter.test.mjs +0 -27
  693. package/template/.pi/skills/yss-antdv-next-design/SKILL.md +0 -48
  694. package/template/.pi/skills/yss-antdv-next-design/references/boundaries.md +0 -25
  695. package/template/.pi/skills/yss-antdv-next-design/references/cli-matrix.md +0 -34
  696. package/template/.pi/skills/yss-antdv-next-design/references/fact-pack.md +0 -38
  697. package/template/.pi/skills/yss-antdv-next-design/scripts/collect-antdv-next-facts.mjs +0 -213
  698. package/template/.pi/skills/yss-antdv-next-design/scripts/validate-fact-pack.mjs +0 -168
  699. package/template/.pi/skills/yss-antdv-next-design/tests/run-scenarios.mjs +0 -139
  700. package/template/.pi/skills/yss-components/SKILL.md +0 -386
  701. package/template/.pi/skills/yss-components/agents/openai.yaml +0 -5
  702. package/template/.pi/skills/yss-components/references/frontend-docs.md +0 -9
  703. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/SKILL.md +0 -31
  704. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-adapter/agents/openai.yaml +0 -5
  705. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/SKILL.md +0 -8
  706. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-application/agents/openai.yaml +0 -5
  707. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/SKILL.md +0 -8
  708. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-domain/agents/openai.yaml +0 -5
  709. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/SKILL.md +0 -8
  710. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-infrastructure/agents/openai.yaml +0 -5
  711. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/SKILL.md +0 -8
  712. package/template/.pi/skills/yss-ddd-scaffold-generator/references/yss-backend-scaffold-web/agents/openai.yaml +0 -5
  713. package/template/.pi/skills/yss-mvc-scaffold-generator/SKILL.md +0 -8
  714. package/template/.pi/skills/yss-mvc-scaffold-generator/agents/openai.yaml +0 -4
  715. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/logback-spring.xml.template +0 -50
  716. package/template/.pi/skills/yss-mvc-scaffold-generator/assets/smart-doc.json.template +0 -42
  717. package/template/.pi/skills/yss-mvc-scaffold-generator/references/architecture.md +0 -28
  718. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.mjs.txt +0 -137
  719. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/generate_project.test.mjs.txt +0 -341
  720. package/template/.pi/skills/yss-mvc-scaffold-generator/references/history/skill.md +0 -87
  721. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.mjs +0 -3
  722. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/generate_project.test.mjs +0 -9
  723. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.mjs +0 -74
  724. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/envelope.test.mjs +0 -36
  725. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/runtime.mjs +0 -114
  726. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/storage.mjs +0 -90
  727. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/lib/templates.mjs +0 -54
  728. package/template/.pi/skills/yss-mvc-scaffold-generator/scripts/verify_project.mjs +0 -103
  729. package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +0 -35
@@ -1,11 +1,20 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { existsSync, lstatSync, readdirSync, readFileSync, mkdirSync, writeFileSync, realpathSync } from 'node:fs';
3
3
  import path from 'node:path';
4
+ import { AsyncLocalStorage } from 'node:async_hooks';
4
5
  import { spawnSync } from 'node:child_process';
5
6
  import { fileURLToPath } from 'node:url';
6
7
  import { validateJsonSchemas } from './json-schema.mjs';
7
8
  import { parseDocument } from '../vendor/yaml.mjs';
8
9
  export const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../..');
10
+ // A v5 package keeps the source glossary as a snapshot, never a nested CONTEXT.md.
11
+ // Only this fixed alias is supported, isolated to the current asynchronous reader.
12
+ const sourceContextSnapshots = new AsyncLocalStorage();
13
+ export function withSourceContextSnapshot(root, action) {
14
+ const roots = new Set(sourceContextSnapshots.getStore() || []);
15
+ roots.add(path.resolve(root));
16
+ return sourceContextSnapshots.run(roots, action);
17
+ }
9
18
  export const ensure = (condition, message) => { if (!condition) throw new TypeError(message); };
10
19
  export const canonical = value => Array.isArray(value) ? value.map(canonical) : value && typeof value === 'object' ? Object.fromEntries(Object.keys(value).sort().map(k => [k, canonical(value[k])])) : value;
11
20
  export const hash = bytes => `sha256:${createHash('sha256').update(bytes).digest('hex')}`;
@@ -23,6 +32,7 @@ export function relative(ref) {
23
32
  }
24
33
  export function safe(root, ref, { missing = false } = {}) {
25
34
  relative(ref);
35
+ if (ref === 'CONTEXT.md' && sourceContextSnapshots.getStore()?.has(path.resolve(root))) ref = 'source-context.snapshot.md';
26
36
  let current = path.resolve(root);
27
37
  ensure(!existsSync(current) || !lstatSync(current).isSymbolicLink(), `根目录不能是 symlink: ${root}`);
28
38
  for (const part of ref.split('/')) {
@@ -1,31 +1,44 @@
1
1
  import { existsSync, lstatSync, readFileSync, mkdirSync, mkdtempSync, renameSync, rmSync, cpSync } from 'node:fs';
2
2
  import path from 'node:path';
3
3
  import { tmpdir } from 'node:os';
4
- import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, schemaBatch, archive, ROOT, sourceApprovalPolicy } from './strategic-handoff-io.mjs';
4
+ import { ensure, canonical, digest, hash, json, parse, read, safe, relative, files, write, project, schema, schemaBatch, archive, ROOT, sourceApprovalPolicy, withSourceContextSnapshot } from './strategic-handoff-io.mjs';
5
5
  import { parseContextSource, parseContextContract, resolveContextTermRefs } from './context-contract.mjs';
6
6
  import { countersignRuleForGate } from './digital-human-roles.mjs';
7
7
  import { validateApprovalRecord } from './approval-record.mjs';
8
8
  import { treeDigest } from './strategic-handoff-io.mjs';
9
- import { validateVisualBaseline } from '../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs';
9
+ import { uiBaselineKind, uiBaselineRef, uiBaselineCaseIds, hasConsumerRoutes, validateHandoffUiBaseline } from './ui-baseline.mjs';
10
10
  import { extractTraceability, compareIndexes } from './strategic-handoff-rules.mjs';
11
11
  const MAX_BYTES = 512 * 1024 * 1024;
12
12
  const own = (a,b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
13
13
  const nonempty = x => typeof x === 'string' && x.trim();
14
14
  const bytesDigest = (bytes, kind) => kind === 'canonical-json' ? digest(parse(bytes)) : kind === 'sha256-bytes' ? hash(bytes) : (() => { throw new TypeError(`未知摘要算法: ${kind}`); })();
15
- const HANDOFF_SCHEMAS = new Map([[3,'docs/process/schemas/strategic-design-handoff-v3.schema.json'],[4,'docs/process/schemas/strategic-design-handoff-v4.schema.json']]);
15
+ const HANDOFF_SCHEMAS = new Map([[3,'docs/process/schemas/strategic-design-handoff-v3.schema.json'],[4,'docs/process/schemas/strategic-design-handoff-v4.schema.json'],[5,'docs/process/schemas/strategic-design-handoff-v5.schema.json']]);
16
16
  const SOURCE_SCHEMAS = new Map([
17
17
  [3,['docs/process/schemas/strategic-handoff-domain-strategy.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package.schema.json']],
18
18
  [4,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
19
+ [5,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
19
20
  ]);
20
21
  const CAPABILITIES=['backend-technical-design','frontend-engineering-design','delivery-coordination'];
21
22
 
23
+ function deliveryReadme(handoff) {
24
+ const sources=Object.entries(handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([key,value])=>`- \`${key}\`: \`${value.persisted_ref}\` (${value.version}, ${value.digest})`);
25
+ const routes=handoff.consumer_routes.map(route=>`- \`${route.capability}\`: \`${route.activation}\` (${route.route_id})`);
26
+ const questions=handoff.tactical_design_questions.length?handoff.tactical_design_questions.map((_,index)=>`- tactical-design-question-${index+1}`).join('\n'):'- 无';
27
+ const deferred=handoff.deferred_decisions_and_ownership.length?handoff.deferred_decisions_and_ownership.map(item=>`- ${item.decision_id||item.id||'deferred-decision'} / ${item.owner||'owner-unset'}`).join('\n'):'- 无';
28
+ return `# 战略交接快照包\n\n此目录是由 Handoff v5 确定性生成的不可变研发交付件。业务正文保留在 \`payload/\`,本页只提供接收导航。\n\n## 范围\n\n- Handoff: \`${handoff.handoff_id}\`\n- Version: \`${handoff.handoff_version}\`\n- Schema: \`5\`\n\n## 来源资产\n\n${sources.join('\n')}\n\n## 消费者路线\n\n${routes.join('\n')}\n\n## 待决问题索引\n\n${questions}\n\n## 延期决定索引\n\n${deferred}\n\n## 接收命令\n\n\`\`\`bash\nscripts/strategic-handoff import --bundle <delivery-dir> --target-root <implementation-repository>\n\`\`\`\n`;
29
+ }
30
+
31
+ function isDeliveryDirectory(input) {
32
+ return existsSync(input) && lstatSync(input).isDirectory() && existsSync(path.join(input,'delivery-record.json'));
33
+ }
34
+
22
35
  function versionSchema(version, schemas, label) {
23
36
  ensure(schemas.has(version), `${label} 未知 schema_version: ${String(version)};支持版本: ${[...schemas.keys()].join(', ')};请使用显式迁移器升级`);
24
37
  return schemas.get(version);
25
38
  }
26
39
 
27
40
  function validateConsumerRoutes(handoff, stage) {
28
- if(handoff.schema_version!==4)return;
41
+ if(!hasConsumerRoutes(handoff))return;
29
42
  const routes=new Map();
30
43
  for(const route of handoff.consumer_routes||[]){
31
44
  ensure(!routes.has(route.capability),`消费者能力重复: ${route.capability}`);
@@ -128,7 +141,8 @@ export async function inspectSource(root, handoffRef) {
128
141
  schema(handoff,versionSchema(handoff?.schema_version,HANDOFF_SCHEMAS,'Strategic Handoff'));
129
142
  ensure(handoff.status==='approved', '交接包尚未批准');
130
143
  const config=handoff.package_export;
131
- schema(config,'docs/process/schemas/strategic-handoff-export.schema.json');
144
+ schema(config,handoff.schema_version===5?'docs/process/schemas/strategic-handoff-export-v2.schema.json':'docs/process/schemas/strategic-handoff-export.schema.json');
145
+ if(handoff.schema_version===5)ensure(config.ui_baseline_kind===uiBaselineKind(handoff),'交接与导出 UI 基线类型不一致');
132
146
  const source=parseContextSource(readFileSync(safe(root,'CONTEXT.md'),'utf8'));
133
147
  snapshot(handoff.source_context_snapshot,source); checkDelta(handoff,source);
134
148
  const strategy=read(safe(root,handoff.source.domain_strategy_ref.persisted_ref));
@@ -142,6 +156,7 @@ export async function inspectSource(root, handoffRef) {
142
156
  ensure(stage.domain_strategy_ref.domain_strategy_id===strategy.domain_strategy_id && stage.domain_strategy_ref.domain_version===strategy.domain_version && stage.domain_strategy_ref.status==='approved' && stage.domain_strategy_ref.persisted_ref===handoff.source.domain_strategy_ref.persisted_ref && stage.domain_strategy_ref.digest===digest(strategy), '阶段包引用的战略内容不一致');
143
157
  ensure(!(stage.unresolved_items || []).some(x=>x.type==='blocker'), '阶段包含 blocker');
144
158
  validateConsumerRoutes(handoff,stage);
159
+ if(uiBaselineKind(handoff)==='existing-ui-baseline')ensure(stage.impact_assessment?.ui===false,'existing-ui-baseline 不支持 UI 影响,返回产品设计');
145
160
  const indexes=extractTraceability(strategy);
146
161
  const sourceRoles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
147
162
  const roles=sourceApprovalPolicy(sourceRoles);
@@ -152,22 +167,24 @@ export async function inspectSource(root, handoffRef) {
152
167
  const currentPlan = (roles.gate_policy.dual_digital_human || []).some(rule => rule.gate === 'gate.plan-approved');
153
168
  const terminalGate=currentPlan?'gate.plan-approved':countersignRuleForGate(roles.gate_policy,'gate.strategic-design-handoff-approved')?'gate.strategic-design-handoff-approved':'gate.stage-decision-package-approved';
154
169
  const expectedGates={domain_strategy_ref:currentPlan?'gate.plan-approved':'gate.domain-strategy-approved',stage_decision_package_ref:currentPlan?'gate.plan-approved':'gate.stage-decision-package-approved',spec_ref:'gate.spec-baseline-approved',prototype_ref:currentPlan?'gate.product-design-approved':'gate.user-confirmation',visual_baseline_ref:currentPlan?'gate.product-design-approved':'gate.user-confirmation',business_ticket_set_ref:terminalGate,handoff:terminalGate};
170
+ expectedGates.existing_ui_baseline_ref=expectedGates.prototype_ref;
155
171
  const bindings={...handoff.source,handoff:{id:handoff.handoff_id,version:handoff.handoff_version,persisted_ref:handoffRef,status:'approved'}};
156
172
  for(const [key,ref] of Object.entries(bindings)) {
157
173
  const approval=config.approvals[key];
158
174
  ensure(approval,`缺少资产批准绑定: ${key}`);
159
175
  ensure(approval.gate_id===expectedGates[key],`资产使用错误批准门禁: ${key}`);
160
- const bytes=key==='visual_baseline_ref'?null:readFileSync(safe(root,ref.persisted_ref));
176
+ const baselineKey=['visual_baseline_ref','existing_ui_baseline_ref'].includes(key);
161
177
  let actual;
162
- if(key==='visual_baseline_ref') {
163
- const baseline=read(safe(root,`${ref.persisted_ref}/${ref.manifest_ref}`));
164
- const result=await validateVisualBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)});
165
- ensure(!result.errors.length,`视觉基线无效: ${result.errors.join('; ')}`);
166
- ensure(baseline.baseline_id===ref.baseline_id && baseline.version===ref.version && own([...ref.case_ids].sort(),baseline.cases.map(x=>x.case_id).sort()),'视觉基线身份不一致');
167
- actual=baseline.bundle.digest;
168
- } else actual=bytesDigest(bytes,approval.digest_kind);
178
+ if(baselineKey) {
179
+ const validated=await validateHandoffUiBaseline(root,handoff);actual=validated.digest;
180
+ if(key==='existing_ui_baseline_ref') {
181
+ ensure(approval.digest_kind==='sha256-bytes','既有 UI 批准必须绑定 manifest 原字节');
182
+ ensure(roles.user_decision_policy.gates.includes(expectedGates.existing_ui_baseline_ref),'既有 UI 承接必须使用产品设计真实用户决定策略');
183
+ }
184
+ } else actual=bytesDigest(readFileSync(safe(root,ref.persisted_ref)),approval.digest_kind);
169
185
  if(key!=='handoff')ensure(ref.digest===actual,`源资产摘要过期: ${key}`);
170
186
  const record=read(safe(root,approval.record_ref));
187
+ if(key==='existing_ui_baseline_ref')ensure(record.subject_ref===`${ref.persisted_ref}/${ref.manifest_ref}`,'既有 UI 用户决定必须以当前 manifest 为批准主体');
171
188
  await sourceApproval(record,roles,root);
172
189
  ensure(record.gate_id===approval.gate_id,`批准门禁不匹配: ${key}`);
173
190
  ensure((record.artifact_bindings || []).some(x=>x.id===(ref.id||ref.baseline_id) && x.version===ref.version && x.digest===actual),`批准记录未绑定当前资产: ${key}`);
@@ -180,19 +197,22 @@ export async function inspectSource(root, handoffRef) {
180
197
  ensure(scope.delivery_ref && own(read(safe(root,scope.delivery_ref)),delivery), '交付范围清单未覆盖当前交接内容或风险');
181
198
  ensure(scope.assets?.some(asset=>asset.ref===scope.delivery_ref && asset.digest===hash(readFileSync(safe(root,scope.delivery_ref)))), '交接内容快照缺少批准覆盖');
182
199
  for (const [key,ref] of Object.entries(handoff.source)) {
183
- const file=key==='visual_baseline_ref'?`${ref.persisted_ref}/${ref.manifest_ref}`:ref.persisted_ref;
200
+ const file=['visual_baseline_ref','existing_ui_baseline_ref'].includes(key)?`${ref.persisted_ref}/${ref.manifest_ref}`:ref.persisted_ref;
184
201
  const decisionBoundaries=key==='business_ticket_set_ref'?['gate.spec-baseline-approved',terminalGate]:[expectedGates[key]];
185
202
  ensure(scope.assets?.some(asset=>asset.ref===file && asset.version===ref.version && decisionBoundaries.includes(asset.boundary) && asset.digest===hash(readFileSync(safe(root,file)))), `交付范围清单遗漏当前资产: ${key}`);
186
203
  }
187
204
  }
188
- const receipt=previewFiles(root,config.prototype);
189
- ensure(handoff.source.visual_baseline_ref.case_ids.every(id=>receipt.case_ids.includes(id)), '离线验证未覆盖视觉基线 case');
205
+ if(uiBaselineKind(handoff)==='prototype') {
206
+ const receipt=previewFiles(root,config.prototype);
207
+ ensure(uiBaselineCaseIds(handoff).every(id=>receipt.case_ids.includes(id)), '离线验证未覆盖视觉基线 case');
208
+ }
190
209
  return {handoff,config,indexes,strategy,stage};
191
210
  }
192
211
 
193
212
  function collect(root, handoffRef, handoff, config) {
194
- const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files,config.prototype.preview_root,config.prototype.verification_ref];
195
- if(config.prototype.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
213
+ const collected=new Map(), queue=[handoffRef,'CONTEXT.md','docs/agents/digital-human-roles.yaml',...Object.values(handoff.source).map(x=>x.persisted_ref),...Object.values(config.approvals).map(x=>x.record_ref),...handoff.evidence_and_version_digests,...config.additional_files];
214
+ if(config.prototype)queue.push(config.prototype.preview_root,config.prototype.verification_ref);
215
+ if(config.prototype?.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
196
216
  const symbolic=config.reference_map || {};
197
217
  const enqueue=ref=> { if(symbolic[ref])queue.push(symbolic[ref]); else if(/^https?:\/\//i.test(ref))return; else if(ref.startsWith('evidence.'))throw new TypeError(`未解析 evidence ID: ${ref}`); else if(ref.includes('/') || /\.(?:md|yaml|json|html|png|txt|log)$/.test(ref))queue.push(ref); };
198
218
  function refs(value,key='') {
@@ -208,20 +228,23 @@ function collect(root, handoffRef, handoff, config) {
208
228
  ensure(stat.isFile() && stat.size<=MAX_BYTES,`源文件类型/大小无效: ${ref}`);
209
229
  const bytes=readFileSync(full); collected.set(ref,bytes); totalBytes += bytes.length;
210
230
  ensure(collected.size<=20000 && totalBytes<=MAX_BYTES,'交接包大小超限');
211
- if(/\.(yaml|yml|json)$/.test(ref))refs(parse(bytes));
212
- queue.push(...documentLinks(ref,bytes));
231
+ const localBaseline=uiBaselineKind(handoff)==='existing-ui-baseline'&&ref.startsWith(`${uiBaselineRef(handoff).persisted_ref}/`);
232
+ if(!localBaseline&&/\.(yaml|yml|json)$/.test(ref))refs(parse(bytes));
233
+ // The entire existing UI observation directory was validated as a byte-bound file set.
234
+ // Its copied source documentation is evidence, not governance dependency instructions.
235
+ if(!localBaseline)queue.push(...documentLinks(ref,bytes));
213
236
  }
214
237
  return collected;
215
238
  }
216
239
  function materialize(captured, manifest, destination) {
217
240
  for(const file of manifest.files.filter(x=>x.original_ref))write(destination,file.original_ref,captured.get(file.path));
218
241
  }
219
- export async function openBundle(input, action) {
220
- const temp=mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
242
+ export async function openBundle(input, action, {readOnly=false}={}) {
243
+ const temp=readOnly?null:mkdtempSync(path.join(tmpdir(),'yss-handoff-'));
221
244
  try {
222
245
  ensure(existsSync(input) && !lstatSync(input).isSymbolicLink(),'交接包不存在或是 symlink');
223
246
  let root=path.resolve(input);
224
- if(lstatSync(root).isFile()){ root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
247
+ if(lstatSync(root).isFile()){ ensure(!readOnly,'readonly-extraction-required: 只读验证需要已展开目录');root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
225
248
  const manifest=read(safe(root,'manifest.json'));
226
249
  schema(manifest,'docs/process/schemas/strategic-handoff-package.schema.json');
227
250
  const {bundle_digest,...body}=manifest;ensure(bundle_digest===digest(body),'包清单摘要不一致');
@@ -233,7 +256,12 @@ export async function openBundle(input, action) {
233
256
  for(const file of manifest.files){const bytes=readFileSync(safe(root,file.path));ensure(bytes.length===file.size_bytes && hash(bytes)===file.sha256,`文件摘要不一致: ${file.path}`);if(file.original_ref)relative(file.original_ref);captured.set(file.path,bytes);}
234
257
  const originals=manifest.files.filter(x=>x.original_ref).map(x=>x.original_ref);
235
258
  ensure(new Set(originals.map(x=>x.toLowerCase())).size===originals.length,'源路径重复');
236
- const source=path.join(temp,'source');mkdirSync(source);materialize(captured,manifest,source);
259
+ let source;
260
+ if(readOnly){
261
+ ensure(manifest.files.filter(file=>file.original_ref).every(file=>file.path===`payload/files/${file.original_ref==='CONTEXT.md'?'source-context.snapshot.md':file.original_ref}`),'readonly-source-layout-required: 原始源布局需要只读文件映射支持');
262
+ source=safe(root,'payload/files');
263
+ }else{source=path.join(temp,'source');mkdirSync(source);materialize(captured,manifest,source);}
264
+ const inspect=async()=>{
237
265
  const inspected=await inspectSource(source,manifest.handoff_ref);
238
266
  ensure(manifest.bundle_id===inspected.handoff.handoff_id && manifest.version===inspected.handoff.handoff_version,'包身份与源交接不一致');
239
267
  ensure(own(read(safe(root,'indexes/rules.json')),inspected.indexes.rules) && own(read(safe(root,'indexes/scenarios.json')),inspected.indexes.scenarios),'规则/场景索引与源资产不一致');
@@ -250,14 +278,16 @@ export async function openBundle(input, action) {
250
278
  }
251
279
  ensure(own(changes,{previous_bundle:manifest.previous_bundle,...compareIndexes(inspected.indexes,previousIndexes)}),'版本差异与实际索引不一致');
252
280
  return await action({root,manifest,...inspected,changes});
253
- } finally {rmSync(temp,{recursive:true,force:true});}
281
+ };
282
+ return readOnly?await withSourceContextSnapshot(source,inspect):await inspect();
283
+ } finally {if(temp)rmSync(temp,{recursive:true,force:true});}
254
284
  }
255
285
  export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previous}) {
256
286
  const root=project(sourceRoot); parseContextContract({root}); relative(handoffRef);
257
287
  const current=await inspectSource(root,handoffRef);
258
288
  let prior=null;
259
289
  if(previous)prior=await openBundle(previous, b=>({manifest:b.manifest,indexes:b.indexes,handoff:b.handoff,rulesBytes:readFileSync(safe(b.root,'indexes/rules.json')),scenariosBytes:readFileSync(safe(b.root,'indexes/scenarios.json'))}));
260
- if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
290
+ if(prior){ensure(prior.manifest.bundle_id===current.handoff.handoff_id,'前版属于不同交接');ensure(Number(current.handoff.handoff_version.slice(1))>Number(prior.manifest.version.slice(1)),'更新必须提升交接版本');for(const[key,ref]of Object.entries(current.handoff.source)){const old=prior.handoff.source[key];if(old&&old.digest!==ref.digest)ensure(old.version!==ref.version,`源资产内容变化必须提升版本: ${key}`);}}
261
291
  const previousBundle=prior?{bundle_id:prior.manifest.bundle_id,version:prior.manifest.version,digest:prior.manifest.bundle_digest}:null;
262
292
  const snapshotFiles=collect(root,handoffRef,current.handoff,current.config);
263
293
  const target=path.resolve(output);
@@ -270,12 +300,13 @@ export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previ
270
300
  const entries=[];
271
301
  const put=(ref,bytes,original)=>{write(staging,ref,bytes);entries.push({path:ref,sha256:hash(bytes),size_bytes:bytes.length,...(original?{original_ref:original}:{})});};
272
302
  for(const [ref,bytes]of [...snapshotFiles].sort(([a],[b])=>a.localeCompare(b))) {
273
- const dest=ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
303
+ const dest=current.handoff.schema_version===5?`payload/files/${ref==='CONTEXT.md'?'source-context.snapshot.md':ref}`:ref===handoffRef?'handoff.yaml':ref==='CONTEXT.md'?'payload/source-context.snapshot.md':`payload/files/${ref}`;
274
304
  ensure(!dest.endsWith('/CONTEXT.md'),'只允许源根词汇快照,禁止嵌套 CONTEXT.md');put(dest,bytes,ref);
275
305
  }
276
306
  put('indexes/rules.json',Buffer.from(json(current.indexes.rules)));
277
307
  put('indexes/scenarios.json',Buffer.from(json(current.indexes.scenarios)));
278
308
  put('indexes/changes.json',Buffer.from(json({previous_bundle:previousBundle,...compareIndexes(current.indexes,prior?.indexes)})));
309
+ if(current.handoff.schema_version===5)put('README.md',Buffer.from(deliveryReadme(current.handoff)));
279
310
  if(prior){put('indexes/previous-manifest.json',Buffer.from(json(prior.manifest)));put('indexes/previous-rules.json',prior.rulesBytes);put('indexes/previous-scenarios.json',prior.scenariosBytes);}
280
311
  const body={schema_version:1,bundle_id:current.handoff.handoff_id,version:current.handoff.handoff_version,handoff_ref:handoffRef,previous_bundle:previousBundle,files:entries.sort((a,b)=>a.path.localeCompare(b.path))};
281
312
  const manifest={...body,bundle_digest:digest(body)};write(staging,'manifest.json',json(manifest));
@@ -288,9 +319,68 @@ export async function exportBundle({sourceRoot,handoffRef,output,zip=false,previ
288
319
  return {result:'exported',bundle_id:manifest.bundle_id,version:manifest.version,bundle_digest:manifest.bundle_digest,output:target,...(zip?{zip:`${target}.zip`,zip_sha256:hash(readFileSync(`${target}.zip`))}:{})};
289
320
  } finally {rmSync(staging,{recursive:true,force:true});rmSync(`${staging}.zip`,{force:true});}
290
321
  }
322
+
323
+ export async function openDelivery(input, action) {
324
+ const root=path.resolve(input);
325
+ ensure(isDeliveryDirectory(root),'交付目录缺少 delivery-record.json');
326
+ ensure(!lstatSync(root).isSymbolicLink(),'交付目录不能是 symlink');
327
+ const recordBytes=readFileSync(safe(root,'delivery-record.json'));
328
+ const record=parse(recordBytes);schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');
329
+ const verification=read(safe(root,record.verification_ref));schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');
330
+ const packageRoot=safe(root,record.package_ref);
331
+ ensure(lstatSync(packageRoot).isDirectory()&&!lstatSync(packageRoot).isSymbolicLink(),'package_ref 必须指向普通目录');
332
+ if(record.zip){const archiveRef=safe(root,record.zip.ref);ensure(lstatSync(archiveRef).isFile()&&hash(readFileSync(archiveRef))===record.zip.sha256,'ZIP 摘要不一致');}
333
+ else ensure(!existsSync(path.join(root,'package.zip')),'未登记的 package.zip');
334
+ const allowed=new Set(['delivery-record.json','verification.json',...(record.zip?['package.zip']:[])]);
335
+ for(const ref of files(root))ensure(ref.startsWith('package/')||allowed.has(ref),`交付目录存在未登记文件: ${ref}`);
336
+ return openBundle(packageRoot,async bundle=>{
337
+ ensure(record.handoff.id===bundle.manifest.bundle_id&&record.handoff.version===bundle.manifest.version&&record.handoff.schema_version===bundle.handoff.schema_version,'delivery record 的 Handoff 身份不一致');
338
+ ensure(record.bundle_digest===bundle.manifest.bundle_digest&&record.manifest_ref==='package/manifest.json','delivery record 的包摘要或清单引用不一致');
339
+ ensure(verification.bundle_digest===bundle.manifest.bundle_digest&&verification.package_ref===record.package_ref&&verification.manifest_ref===record.manifest_ref&&verification.exit_code===0&&verification.result==='verified','delivery verification 与包不一致');
340
+ const handoffEntry=bundle.manifest.files.find(file=>file.original_ref===record.handoff.ref);
341
+ ensure(handoffEntry&&handoffEntry.sha256===record.handoff.sha256,'delivery record 的 Handoff 源摘要不一致');
342
+ const sourceAssets=Object.entries(bundle.handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([sourceKey,value])=>({source_key:sourceKey,id:value.id||value.baseline_id,version:value.version,ref:value.persisted_ref,digest:value.digest}));
343
+ ensure(own(sourceAssets,record.source_assets),'delivery record 的来源资产不一致');
344
+ ensure(own(bundle.handoff.consumer_routes.map(({route_id,capability,activation})=>({route_id,capability,activation})),record.consumer_routes),'delivery record 的消费者路由不一致');
345
+ const previous=bundle.manifest.previous_bundle?{handoff_id:bundle.manifest.previous_bundle.bundle_id,version:bundle.manifest.previous_bundle.version,bundle_digest:bundle.manifest.previous_bundle.digest}:null;
346
+ ensure(own(previous,record.previous_delivery),'delivery record 的上一版本身份不一致');
347
+ return action({...bundle,deliveryRoot:root,packageRoot,record,recordBytes,verification});
348
+ });
349
+ }
350
+
351
+ export async function finalizeDelivery({sourceRoot,handoffRef,zip=false,previous}) {
352
+ const root=project(sourceRoot);parseContextContract({root});relative(handoffRef);
353
+ const current=await inspectSource(root,handoffRef);
354
+ ensure(current.handoff.schema_version===5,'migration-required: v3/v4 只允许历史 verify/import;修改或重新交付必须迁移到 Handoff v5 并重新批准');
355
+ const delivery=path.join(root,'docs/deliveries/strategic',current.handoff.handoff_id,current.handoff.handoff_version);
356
+ const parent=path.dirname(delivery);mkdirSync(parent,{recursive:true});
357
+ let previousPackage=previous;
358
+ if(previous&&isDeliveryDirectory(path.resolve(previous)))previousPackage=await openDelivery(path.resolve(previous),value=>value.packageRoot);
359
+ const stage=mkdtempSync(path.join(parent,'.delivery-staging-'));
360
+ try {
361
+ const exported=await exportBundle({sourceRoot:root,handoffRef,output:path.join(stage,'package'),zip,previous:previousPackage});
362
+ const handoffEntry=await openBundle(path.join(stage,'package'),bundle=>bundle.manifest.files.find(file=>file.original_ref===handoffRef));
363
+ ensure(handoffEntry,'交付包缺少 Handoff 源文件');
364
+ const verification={schema_version:1,kind:'strategic-delivery-verification-v1',result:'verified',command:`scripts/strategic-handoff verify --bundle docs/deliveries/strategic/${current.handoff.handoff_id}/${current.handoff.handoff_version}`,exit_code:0,executed_at:new Date().toISOString(),package_ref:'package',manifest_ref:'package/manifest.json',bundle_digest:exported.bundle_digest};
365
+ schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');write(stage,'verification.json',json(verification));
366
+ const sourceAssets=Object.entries(current.handoff.source).sort(([a],[b])=>a.localeCompare(b)).map(([sourceKey,value])=>({source_key:sourceKey,id:value.id||value.baseline_id,version:value.version,ref:value.persisted_ref,digest:value.digest}));
367
+ const previousDelivery=await openBundle(path.join(stage,'package'),bundle=>bundle.manifest.previous_bundle?{handoff_id:bundle.manifest.previous_bundle.bundle_id,version:bundle.manifest.previous_bundle.version,bundle_digest:bundle.manifest.previous_bundle.digest}:null);
368
+ const record={schema_version:1,kind:'strategic-handoff-delivery-v1',status:'packaged',handoff:{id:current.handoff.handoff_id,version:current.handoff.handoff_version,ref:handoffRef,sha256:handoffEntry.sha256,schema_version:5},source_assets:sourceAssets,package_ref:'package',manifest_ref:'package/manifest.json',bundle_digest:exported.bundle_digest,verification_ref:'verification.json',consumer_routes:current.handoff.consumer_routes.map(({route_id,capability,activation})=>({route_id,capability,activation})),...(zip?{zip:{ref:'package.zip',sha256:exported.zip_sha256}}:{}),previous_delivery:previousDelivery};
369
+ schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');write(stage,'delivery-record.json',json(record));
370
+ await openDelivery(stage,()=>null);
371
+ if(existsSync(delivery)){
372
+ const existing=await openDelivery(delivery,value=>value.record);
373
+ ensure(existing.bundle_digest===record.bundle_digest&&existing.handoff.sha256===record.handoff.sha256,'delivery-version-conflict: 同 Handoff ID/version 已存在不同内容;请提升 handoff_version 并重新批准');
374
+ return {result:'already-packaged',handoff_id:record.handoff.id,version:record.handoff.version,bundle_digest:record.bundle_digest,delivery};
375
+ }
376
+ renameSync(stage,delivery);
377
+ return {result:'packaged',handoff_id:record.handoff.id,version:record.handoff.version,bundle_digest:record.bundle_digest,delivery,...(zip?{zip:path.join(delivery,'package.zip'),zip_sha256:record.zip.sha256}:{})};
378
+ } finally {rmSync(stage,{recursive:true,force:true});}
379
+ }
291
380
  export async function importBundle({bundle,targetRoot}) {
292
381
  const target=project(targetRoot);const context=parseContextContract({root:target});
293
- return openBundle(bundle,async b=>{
382
+ const open=isDeliveryDirectory(path.resolve(bundle))?action=>openDelivery(path.resolve(bundle),action):action=>openBundle(bundle,action);
383
+ return open(async b=>{
294
384
  const rel=`docs/handoffs/${b.manifest.bundle_id}/${b.manifest.version}`,dest=safe(target,rel,{missing:true});
295
385
  if(existsSync(dest)) {
296
386
  const receipt=read(safe(dest,'import-receipt.json'));
@@ -329,8 +419,10 @@ export async function importBundle({bundle,targetRoot}) {
329
419
  if(route.activation!=='not-applicable'&&route.capability==='delivery-coordination')artifactRefs.push(`${rel}/consumer-status-index-draft.json`);
330
420
  return {route_id:route.route_id,capability:route.capability,activation:route.activation,artifact_refs:artifactRefs};
331
421
  });
332
- receipt={schema_version:2,bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,package_ref:`${rel}/package`,target_context_digest:context.document_digest,target_profile_id:profile?.profile_id||'yss-full-lifecycle',selected_consumer_capabilities:capabilities,routes:routeRecords,status:'pending-context-reconciliation'};
333
- schema(receipt,'docs/process/schemas/strategic-handoff-import-receipt.schema.json');
422
+ const fromDelivery=Boolean(b.recordBytes);
423
+ if(fromDelivery)write(stage,'source-delivery-record.json',b.recordBytes);
424
+ receipt={schema_version:fromDelivery?3:2,bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,package_ref:`${rel}/package`,...(fromDelivery?{source_delivery_record_ref:`${rel}/source-delivery-record.json`,source_delivery_record_sha256:hash(b.recordBytes),ready_for_agent:false}:{}),target_context_digest:context.document_digest,target_profile_id:profile?.profile_id||'yss-full-lifecycle',selected_consumer_capabilities:capabilities,routes:routeRecords,status:'pending-context-reconciliation'};
425
+ schema(receipt,fromDelivery?'docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json':'docs/process/schemas/strategic-handoff-import-receipt.schema.json');
334
426
  write(stage,'import-receipt.json',json(receipt));
335
427
  write(stage,'context-reconciliation-draft.json',json({schema_version:2,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,target_context_digest:context.document_digest,route_ids:selected.map(route=>route.route_id),terms}));
336
428
  write(stage,'upstream-change-impact.json',json({schema_version:2,previous_bundle:b.manifest.previous_bundle,routes:selected.map(route=>({route_id:route.route_id,capability:route.capability,activation:route.activation,changed_source_ids:[...b.changes.updated,...b.changes.removed],added_source_ids:b.changes.added,status:'requires-lifecycle-reconciliation'})),policy:'mark-only-known-dependent-contracts-stale; unknown-dependency-or-design-basis-change-blocks-all'}));
@@ -339,8 +431,8 @@ export async function importBundle({bundle,targetRoot}) {
339
431
  const coordinationRoute=b.handoff.consumer_routes.find(route=>route.capability==='delivery-coordination');
340
432
  if(capabilities.includes('backend-technical-design')&&backendRoute.activation!=='not-applicable')write(stage,'backend-technical-traceability-draft.json',json({schema_version:2,route_id:backendRoute.route_id,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows}));
341
433
  if(capabilities.includes('frontend-engineering-design')&&frontendRoute.activation!=='not-applicable'){
342
- const preflight={schema_version:1,status:'draft',route_id:frontendRoute.route_id,capability:frontendRoute.capability,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,context_reconciliation_ref:'',visual_baseline_ref:`${rel}/package/payload/files/${b.handoff.source.visual_baseline_ref.persisted_ref}/${b.handoff.source.visual_baseline_ref.manifest_ref}`,source_rule_refs:rows.map(row=>row.source_id),backend_dependency:{mode:backendRoute.activation==='not-applicable'?'not-applicable':'required',route_id:backendRoute.route_id,...(backendRoute.activation==='not-applicable'?{reason:backendRoute.reason,impact_refs:backendRoute.impact_refs,evidence_refs:backendRoute.evidence_refs}:{})},ready_for_agent:false};
343
- schema(preflight,'docs/process/schemas/frontend-strategic-preflight.schema.json');
434
+ const preflight={schema_version:b.handoff.schema_version===5?2:1,status:'draft',route_id:frontendRoute.route_id,capability:frontendRoute.capability,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,context_reconciliation_ref:'',...(b.handoff.schema_version===5?{ui_baseline_kind:uiBaselineKind(b.handoff),ui_baseline_ref:`${rel}/package/payload/files/${uiBaselineRef(b.handoff).persisted_ref}/${uiBaselineRef(b.handoff).manifest_ref}`}:{visual_baseline_ref:`${rel}/package/payload/files/${uiBaselineRef(b.handoff).persisted_ref}/${uiBaselineRef(b.handoff).manifest_ref}`}),source_rule_refs:rows.map(row=>row.source_id),backend_dependency:{mode:backendRoute.activation==='not-applicable'?'not-applicable':'required',route_id:backendRoute.route_id,...(backendRoute.activation==='not-applicable'?{reason:backendRoute.reason,impact_refs:backendRoute.impact_refs,evidence_refs:backendRoute.evidence_refs}:{})},ready_for_agent:false};
435
+ schema(preflight,b.handoff.schema_version===5?'docs/process/schemas/frontend-strategic-preflight-v2.schema.json':'docs/process/schemas/frontend-strategic-preflight.schema.json');
344
436
  write(stage,'frontend-strategic-preflight-draft.json',json(preflight));write(stage,'frontend-traceability-draft.json',json({schema_version:1,route_id:frontendRoute.route_id,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows:rows.map(({tactical_refs,test_seam_refs,...row})=>({...row,frontend_case_refs:[]}))}));
345
437
  }
346
438
  if(capabilities.includes('delivery-coordination')&&coordinationRoute.activation!=='not-applicable')write(stage,'consumer-status-index-draft.json',json({schema_version:1,status:'draft',import_receipt_ref:`${rel}/import-receipt.json`,routes:b.handoff.consumer_routes.map(route=>({route_id:route.route_id,capability:route.capability,activation:route.activation,consumer_status:route.activation==='not-applicable'?'not-applicable':'pending',receipt_refs:[],acceptance_refs:[],feedback_refs:[]}))}));
@@ -179,13 +179,21 @@ function validateContract(value, registry, lifecycle) {
179
179
  if (!existsSync(contractPath)) fail(`Slice Implementation Contract 不存在: ${contract.slice_contract_ref}`);
180
180
  const document = parseYaml(readFileSync(contractPath, "utf8"), "Slice Implementation Contract");
181
181
  const slice = document.slice_contract || document;
182
- if (slice.schema_version !== 1 || typeof slice.slice_id !== "string" || !slice.lifecycle_refs || !slice.readiness || !Array.isArray(slice.work_units)) fail("Slice Implementation Contract 缺少 schema_version/slice_id/lifecycle_refs/readiness/work_units");
182
+ if (slice.schema_version !== 2 || typeof slice.slice_id !== "string" || !slice.lifecycle_refs || !slice.readiness || !Array.isArray(slice.work_units)) fail("Slice Implementation Contract 需要 schema v2 及 slice_id/lifecycle_refs/readiness/work_units");
183
183
  if (slice.contract_id !== contract.contract_id || slice.contract_version !== contract.contract_version || slice.status !== "approved") fail("Slice Contract 必须是当前 approved 版本");
184
184
  const sliceUnit = slice.work_units.find((item) => item && item.id === value.work_unit_id);
185
185
  if (!sliceUnit) fail(`Slice Implementation Contract 缺少 work_unit_id: ${value.work_unit_id}`);
186
186
  for (const field of ["role_id", "runtime_id", "task_package_ref", "contract_id", "contract_version", "allowed_write_paths"]) if (sliceUnit[field] === undefined) fail(`Slice Contract work_unit 缺少 ${field}`);
187
- if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version || sliceUnit.task_package_ref !== value.work_unit_id) fail("任务包与 Slice Contract work_unit 不一致");
187
+ if (sliceUnit.role_id !== value.role_id || sliceUnit.runtime_id !== value.runtime_id || sliceUnit.contract_id !== contract.contract_id || sliceUnit.contract_version !== contract.contract_version) fail("任务包与 Slice Contract work_unit 不一致");
188
188
  for (const allowed of value.allowed_write_paths) if (!sliceUnit.allowed_write_paths.includes(allowed)) fail(`allowed_write_paths 未获 Slice Contract 授权: ${allowed}`);
189
+ // Older packages used the work-unit ID here; new packages bind a readable dispatch file.
190
+ if (sliceUnit.task_package_ref !== value.work_unit_id) {
191
+ const dispatchPath = assertSafeRelativePath(sliceUnit.task_package_ref, "Slice work_unit.task_package_ref");
192
+ if (!existsSync(dispatchPath)) fail("Slice task_package_ref 不可读");
193
+ const dispatched = parseDocument(readFileSync(dispatchPath, "utf8")).toJS();
194
+ for (const field of ["task_id", "work_unit_id", "actor_id", "role_id", "runtime_id"]) if (dispatched?.[field] !== value[field]) fail("Slice task_package_ref 与当前派发身份不一致");
195
+ if (JSON.stringify(dispatched.contract) !== JSON.stringify(value.contract) || JSON.stringify(dispatched.allowed_write_paths) !== JSON.stringify(value.allowed_write_paths)) fail("Slice task_package_ref 与当前合同或写范围不一致");
196
+ }
189
197
  if (value.execution_state === "Worker") assertImplementationDecision({ slice_contract_ref: contract.slice_contract_ref, vertical_slice_ticket_ref: slice.lifecycle_refs.ticket, user_decisions: value.user_decisions });
190
198
  }
191
199
 
@@ -223,7 +231,7 @@ export function validateTaskPackageSet(packages, options = {}) {
223
231
  packages.forEach((pkg) => validateTaskPackage(pkg, options));
224
232
  const slicePackages = packages.filter((pkg) => pkg.contract.kind === "slice-implementation");
225
233
  if (slicePackages.length > 0) {
226
- const contracts = new Set(slicePackages.map((pkg) => `${pkg.contract.contract_id}@${pkg.contract.contract_version}`));
234
+ const contracts = new Set(slicePackages.map((pkg) => JSON.stringify([pkg.contract.contract_id, pkg.contract.contract_version])));
227
235
  if (contracts.size !== 1) fail("同一切片的任务包必须消费同一 contract_id/contract_version");
228
236
  const workers = new Set(slicePackages.filter((pkg) => pkg.execution_state === "Worker").map((pkg) => pkg.actor_id));
229
237
  slicePackages.filter((pkg) => pkg.execution_state === "Reviewer").forEach((pkg) => { if (workers.has(pkg.actor_id)) fail("Reviewer 不得与实现者使用同一 actor_id"); });
@@ -1,10 +1,11 @@
1
+ import { assertApprovedExecutionContext, approvedExecutionBinding } from './approved-execution-context.mjs';
1
2
  import path from 'node:path';
2
3
  import { readFileSync } from 'node:fs';
3
4
  import { spawnSync } from 'node:child_process';
4
5
  import { ROOT, read, safe, ensure, hash } from './strategic-handoff-io.mjs';
5
6
 
6
7
  // The compiler's synchronous boundary reruns the design verifier against current files.
7
- export function enforceTechnicalDesign(state = {}, { root = ROOT } = {}) {
8
+ export function enforceTechnicalDesign(state = {}, { root = ROOT, execution, readOnly = false } = {}) {
8
9
  const binding = state.technical_design;
9
10
  const affected = (state.conditions || []).some(value => ['backend-technical-design-impact','tactical-domain','tactical-domain-impact','aggregate-impact','state-machine-impact','invariant-impact','consistency-impact','domain-event-impact','gateway-boundary-impact','persistence-mapping-impact'].includes(value));
10
11
  if (!binding && !affected) return;
@@ -13,11 +14,18 @@ export function enforceTechnicalDesign(state = {}, { root = ROOT } = {}) {
13
14
  const file = safe(root, binding.ref);
14
15
  ensure(hash(readFileSync(file)) === binding.digest, '技术设计绑定摘要漂移');
15
16
  const data = read(file);
17
+ if(data.design_scope==='engineering-only')ensure(!(state.conditions||[]).some(value=>['tactical-domain','tactical-domain-impact','aggregate-impact','state-machine-impact','invariant-impact','domain-event-impact','gateway-boundary-impact','persistence-mapping-impact'].includes(value)),'engineering-only 技术设计不能承接领域模型、业务状态或持久化映射影响');
16
18
  ensure(data.status === 'approved' && data.version === binding.version, '技术设计必须为批准且绑定版本');
17
19
  const family = data.schema_version === 1 && binding.legacy_ddd === true ? 'domain-driven' : data.architecture?.family;
18
20
  ensure(family && family === state.architecture_identity?.architecture_family, '技术设计与实现架构不匹配');
19
21
  const args = [path.join(ROOT, '.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs'), file, '--root', root, '--slice', state.slice_id];
20
22
  if (binding.legacy_ddd === true) args.push('--legacy-ddd');
23
+ if(readOnly)args.push('--read-only');
24
+ if(execution){
25
+ assertApprovedExecutionContext(execution,{root,technicalDesign:data,architectureIdentity:state.architecture_identity,sliceId:state.slice_id});
26
+ const approved=approvedExecutionBinding(execution);
27
+ args.push('--approved-slice',approved.ref,'--approved-slice-digest',approved.digest,'--approved-slice-approval',approved.approval_ref);
28
+ }
21
29
  const verified = spawnSync(process.execPath, args, { cwd: root, encoding: 'utf8', timeout: 60000, maxBuffer: 2 * 1024 * 1024 });
22
30
  ensure(verified.status === 0, `技术设计不可消费: ${verified.error?.message || verified.stderr}`);
23
31
  }
@@ -0,0 +1,26 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { ensure, read, safe, hash } from './strategic-handoff-io.mjs';
3
+ import { validateVisualBaseline } from '../../.agents/skills/yss-prototype-stage/scripts/visual-baseline-contract.mjs';
4
+ import { validateExistingUiBaseline } from './existing-ui-baseline.mjs';
5
+
6
+ export function hasConsumerRoutes(handoff) { return [4,5].includes(handoff?.schema_version); }
7
+ export function uiBaselineKind(handoff) {
8
+ ensure([3,4,5].includes(handoff?.schema_version),'未知 Strategic Handoff schema_version');
9
+ if(handoff.schema_version<5)return 'prototype';
10
+ ensure(['prototype','existing-ui-baseline'].includes(handoff.ui_baseline_kind),'未知 ui_baseline_kind');
11
+ return handoff.ui_baseline_kind;
12
+ }
13
+ export function uiBaselineRef(handoff) {
14
+ const kind=uiBaselineKind(handoff),ref=handoff.source?.[kind==='prototype'?'visual_baseline_ref':'existing_ui_baseline_ref'];
15
+ ensure(ref,'缺少 UI 基线引用');return ref;
16
+ }
17
+ export function uiBaselineCaseIds(handoff) { return uiBaselineRef(handoff).case_ids; }
18
+ export function uiBaselineSourceKeys(handoff) { return uiBaselineKind(handoff)==='prototype'?['prototype_ref','visual_baseline_ref']:['existing_ui_baseline_ref']; }
19
+ export async function validateHandoffUiBaseline(root,handoff) {
20
+ const kind=uiBaselineKind(handoff),ref=uiBaselineRef(handoff),file=safe(root,`${ref.persisted_ref}/${ref.manifest_ref}`),baseline=read(file);
21
+ const result=kind==='prototype'?await validateVisualBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)}):validateExistingUiBaseline(baseline,{bundleRoot:safe(root,ref.persisted_ref)});
22
+ ensure(!result.errors.length,`UI 基线无效: ${result.errors.join('; ')}`);
23
+ // The immutable existing manifest records readiness; the caller verifies its current approval chain.
24
+ ensure((kind==='existing-ui-baseline'||baseline.status==='approved')&&baseline.baseline_id===ref.baseline_id&&baseline.version===ref.version&&JSON.stringify([...ref.case_ids].sort())===JSON.stringify(baseline.cases.map(item=>item.case_id).sort()),'UI 基线身份不一致');
25
+ return {kind,ref,baseline,digest:kind==='prototype'?baseline.bundle.digest:hash(readFileSync(file))};
26
+ }
@@ -113,8 +113,11 @@ export function validateUserDecision(record, options = {}) {
113
113
  previousTime = time;
114
114
  if (response.decision === "approved") {
115
115
  const explicit = source.decision === "approved" && Array.isArray(source.item_ids) && response.item_ids.every((id) => source.item_ids.includes(id));
116
+ const contextualAll = response.selection === "explicit-all" && items.size > 1
117
+ && /是否\s*(?:明确)?(?:确认|批准|同意|接受)[^\n]{0,32}(?:以上)?全部\s*(?:\d+|[一二三四五六七八九十]+)?\s*(?:项|事项)/i.test(presentation.text)
118
+ && /^(?:确认|同意|批准|接受|可以|好的|好|yes|ok)[。.!!\s]*$/i.test(source.text.trim());
116
119
  if (!explicit && (!/(同意|批准|确认|接受|可以|好的|^好[。!!\s]*$|\b(?:approve|approved|agree|agreed|accept|yes|ok)\b)/i.test(source.text) || /(不同意|不批准|拒绝|反对|不要|需[要]?修改|请修改|暂不|reject|decline|do not approve|don't approve|disagree)/i.test(source.text))) decisionError("user-decision-ambiguous", "原文不能明确支持批准结论");
117
- if (!explicit && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "批量批准原文必须明确全部事项");
120
+ if (!explicit && !contextualAll && response.selection === "explicit-all" && items.size > 1 && !/(全部|所有|\ball\b)/i.test(source.text)) decisionError("user-decision-ambiguous", "批量批准原文必须明确全部事项,或直接回复明确询问全部事项的当前展示");
118
121
  if (!explicit && response.selection === "explicit-items" && items.size > 1 && response.item_ids.some((id) => !source.text.includes(id) && !source.text.includes(items.get(id)?.title))) decisionError("user-decision-ambiguous", "原文未指向所选事项");
119
122
  }
120
123
  if (response.selection === "single" && items.size !== 1) decisionError("user-decision-ambiguous", "多事项不能用单项回复");
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import path from 'node:path';
3
+ import { parseArgs } from 'node:util';
4
+ import { read } from './lib/strategic-handoff-io.mjs';
5
+ import { preflightDelivery, invalidPreflightInput } from './lib/delivery-preflight.mjs';
6
+
7
+ let result;
8
+ try {
9
+ const {values}=parseArgs({options:{input:{type:'string'},stage:{type:'string'},json:{type:'boolean'}},strict:true});
10
+ if(!values.input||!values.stage) throw new TypeError('必须提供 --input <file> 和 --stage prepare|build|export|accept');
11
+ result=await preflightDelivery(read(path.resolve(values.input)),{stage:values.stage,root:process.cwd()});
12
+ } catch(error) { result=invalidPreflightInput(error.message); }
13
+ process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
14
+ process.exitCode=result.exit_code;
@@ -1,14 +1,31 @@
1
1
  #!/usr/bin/env node
2
2
  import { parseArgs } from 'node:util';
3
3
  import path from 'node:path';
4
- import { exportBundle, openBundle, importBundle } from './lib/strategic-handoff.mjs';
4
+ import { existsSync } from 'node:fs';
5
+ import { exportBundle, finalizeDelivery, openBundle, openDelivery, importBundle } from './lib/strategic-handoff.mjs';
6
+ import { read, safe, ensure } from './lib/strategic-handoff-io.mjs';
7
+
8
+ async function preflightExport(values) {
9
+ const root=path.resolve(values['source-root']),handoff=read(safe(root,values.handoff));
10
+ const required=handoff.schema_version===5&&handoff.ui_baseline_kind==='existing-ui-baseline';
11
+ ensure(!required||values['preflight-input'],'preflight-required: 既有 UI 战略导出必须提供 --preflight-input <file>;先按 docs/process/delivery-preflight.md 准备源资产清单并执行 export 阶段只读预检');
12
+ if(!values['preflight-input'])return;
13
+ const {preflightDelivery}=await import('./lib/delivery-preflight.mjs');
14
+ const input=read(path.resolve(values['preflight-input']));
15
+ ensure(!input.delivery_kind||input.delivery_kind==='strategic-handoff','preflight-scope-conflict: 战略导出只能使用 strategic-handoff 清单');
16
+ ensure(path.resolve(root,input.governance_root||'.')===root,'preflight-scope-conflict: 预检治理根与导出来源不同');
17
+ ensure(input.assets?.strategic_handoff?.ref===values.handoff,'preflight-scope-conflict: 预检未绑定本次导出的 handoff 源文件');
18
+ const result=await preflightDelivery({...input,delivery_kind:'strategic-handoff'},{stage:'export',root});
19
+ if(result.exit_code!==0){const error=new TypeError('delivery-preflight-blocked: 请按每项 recovery 补证,再从正常导出入口重试');error.preflight=result;throw error;}
20
+ }
5
21
  try {
6
- const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'}}});
22
+ const {values,positionals}=parseArgs({allowPositionals:true,strict:true,options:{'source-root':{type:'string'},handoff:{type:'string'},output:{type:'string'},zip:{type:'boolean'},previous:{type:'string'},bundle:{type:'string'},'target-root':{type:'string'},'preflight-input':{type:'string'}}});
7
23
  const [command]=positionals;
8
24
  let result;
9
- if(command==='export'&&values['source-root']&&values.handoff&&values.output)result=await exportBundle({sourceRoot:values['source-root'],handoffRef:values.handoff,output:values.output,zip:values.zip,previous:values.previous});
10
- else if(command==='verify'&&values.bundle)result=await openBundle(path.resolve(values.bundle),b=>({result:'verified',bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,rules:b.indexes.rules.length,scenarios:b.indexes.scenarios.length}));
25
+ if(command==='finalize'&&values['source-root']&&values.handoff){await preflightExport(values);result=await finalizeDelivery({sourceRoot:values['source-root'],handoffRef:values.handoff,zip:values.zip,previous:values.previous});}
26
+ else if(command==='export'&&values['source-root']&&values.handoff&&values.output){const sourceRoot=path.resolve(values['source-root']),handoff=read(safe(sourceRoot,values.handoff));ensure(handoff.schema_version===5,'migration-required: v3/v4 不再创建新 export;请迁移到 Handoff v5、重新批准并使用 finalize');await preflightExport(values);result=await exportBundle({sourceRoot:sourceRoot,handoffRef:values.handoff,output:values.output,zip:values.zip,previous:values.previous});}
27
+ else if(command==='verify'&&values.bundle){const input=path.resolve(values.bundle),action=b=>({result:'verified',bundle_id:b.manifest.bundle_id,version:b.manifest.version,bundle_digest:b.manifest.bundle_digest,rules:b.indexes.rules.length,scenarios:b.indexes.scenarios.length});result=existsSync(path.join(input,'delivery-record.json'))?await openDelivery(input,action):await openBundle(input,action);}
11
28
  else if(command==='import'&&values.bundle&&values['target-root'])result=await importBundle({bundle:path.resolve(values.bundle),targetRoot:values['target-root']});
12
- else throw new TypeError('用法: strategic-handoff export --source-root <repo> --handoff <relative-file> --output <new-dir> [--zip] [--previous <bundle>] | verify --bundle <dir|zip> | import --bundle <dir|zip> --target-root <repo>');
29
+ else throw new TypeError('用法: strategic-handoff finalize --source-root <repo> --handoff <relative-file> [--preflight-input <file>] [--previous <delivery-or-package>] [--zip] | verify --bundle <delivery-dir|package-dir|zip> | import --bundle <delivery-dir|package-dir|zip> --target-root <repo>');
13
30
  process.stdout.write(`${JSON.stringify(result,null,2)}\n`);
14
- }catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message})}\n`);process.exitCode=1;}
31
+ }catch(error){process.stderr.write(`${JSON.stringify({result:'blocked',error:error.message,...(error.preflight?{preflight:error.preflight}:{})})}\n`);process.exitCode=1;}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- import { applyProfileSkillSync, loadProfileSyncConfig, planProfileSkillSync, reportProfileSkillSync } from "./lib/profile-skill-sync.mjs";
4
+ import { applyProfileSkillSync, formatProfileSkillSync, loadProfileSyncConfig, planProfileSkillSync, reportProfileSkillSync } from "./lib/profile-skill-sync.mjs";
5
5
 
6
6
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
7
7
  try {
@@ -30,10 +30,9 @@ try {
30
30
  const report = reportProfileSkillSync(result);
31
31
  if (json) process.stdout.write(`${JSON.stringify(report, null, 2)}\n`);
32
32
  else {
33
- process.stdout.write(`profile skills: ${report.profiles.join(", ")}\n`);
34
- for (const [status, count] of Object.entries(report.counts)) process.stdout.write(`${status}: ${count}\n`);
35
- for (const item of report.changes) process.stdout.write(`${item.profile}: ${item.status}: ${item.path}\n`);
36
- for (const item of report.issues) process.stderr.write(`${item.profile}: ${item.status}: ${item.path ?? item.skill ?? item.message}\n`);
33
+ const output = formatProfileSkillSync(report, modes[0]);
34
+ process.stdout.write(output.stdout);
35
+ process.stderr.write(output.stderr);
37
36
  }
38
37
  if (args.includes("--check") && (plan.changes.length || plan.issues.length)) process.exitCode = 1;
39
38
  if (args.includes("--apply") && plan.issues.length) process.exitCode = 1;