create-yss-spec 3.5.0 → 3.5.2

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 (513) hide show
  1. package/README.md +6 -2
  2. package/package.json +1 -1
  3. package/src/api/_sync-service.js +31 -6
  4. package/src/cli/args.js +2 -0
  5. package/src/cli/help.js +4 -1
  6. package/src/commands/attach.js +9 -3
  7. package/src/commands/diff.js +1 -0
  8. package/src/commands/doctor.js +1 -0
  9. package/src/commands/init.js +2 -1
  10. package/src/commands/sync.js +1 -0
  11. package/src/family-identity.js +1 -1
  12. package/src/template/asset-runtime.js +57 -49
  13. package/src/template/attach-planner.js +1 -1
  14. package/src/template/distribution-runtime.js +9 -9
  15. package/src/template/instance-runtime.js +9 -9
  16. package/src/template/layout-migration.js +160 -0
  17. package/src/template/migration-runtime.js +2 -2
  18. package/src/template/sync-planner.js +1 -1
  19. package/template/.agents/rules/yss-ai-skills.md +1 -1
  20. package/template/.agents/skills/.strategic-design-skills-manifest.json +7 -8
  21. package/template/.agents/skills/.yss-skills-manifest.json +2 -2
  22. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -1
  23. package/template/.agents/skills/code-review/SKILL.md +6 -6
  24. package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
  25. package/template/.agents/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  26. package/template/.agents/skills/i-have-adhd/SKILL.md +1 -1
  27. package/template/.agents/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  28. package/template/.agents/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  29. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  30. package/template/.agents/skills/llm-wiki/references/discover.md +3 -3
  31. package/template/.agents/skills/prototype-review/SKILL.md +4 -4
  32. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  33. package/template/.agents/skills/triage/SKILL.md +1 -1
  34. package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  35. package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  36. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +1 -1
  37. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  38. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  39. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  40. package/template/.agents/skills/yss-design-system/SKILL.md +10 -10
  41. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -3
  42. package/template/.agents/skills/yss-design-system/references/design-system.md +3 -3
  43. package/template/.agents/skills/yss-exception/SKILL.md +1 -1
  44. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  45. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  46. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  47. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  48. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  49. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  50. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  51. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  52. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  53. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  54. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  55. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  56. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  57. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +2 -2
  58. package/template/.agents/skills/yss-openapi-governance/SKILL.md +7 -7
  59. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -11
  60. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  61. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +65 -43
  62. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  63. package/template/.agents/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  64. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +3 -3
  65. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  66. package/template/.agents/skills/yss-prototype-stage/SKILL.md +7 -7
  67. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  68. package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  69. package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  70. package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  71. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  72. package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  73. package/template/.agents/skills/yss-repository/SKILL.md +2 -2
  74. package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  75. package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  76. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  77. package/template/.agents/skills/yss-research/SKILL.md +2 -2
  78. package/template/.agents/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  79. package/template/.agents/skills/yss-stage-decision/SKILL.md +5 -5
  80. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  81. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  82. package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
  83. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  84. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  85. package/template/.agents/skills/yss-technical-design/SKILL.md +6 -6
  86. package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  87. package/template/.agents/skills/yss-ui/SKILL.md +1 -1
  88. package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
  89. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  90. package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  91. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -1
  92. package/template/.codex/skills/code-review/SKILL.md +6 -6
  93. package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
  94. package/template/.codex/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  95. package/template/.codex/skills/i-have-adhd/SKILL.md +1 -1
  96. package/template/.codex/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  97. package/template/.codex/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  98. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  99. package/template/.codex/skills/llm-wiki/references/discover.md +3 -3
  100. package/template/.codex/skills/prototype-review/SKILL.md +4 -4
  101. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  102. package/template/.codex/skills/triage/SKILL.md +1 -1
  103. package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  104. package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  105. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +1 -1
  106. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  107. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  108. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  109. package/template/.codex/skills/yss-design-system/SKILL.md +10 -10
  110. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -3
  111. package/template/.codex/skills/yss-design-system/references/design-system.md +3 -3
  112. package/template/.codex/skills/yss-exception/SKILL.md +1 -1
  113. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  114. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  115. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  116. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  117. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  118. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  119. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  120. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  121. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  122. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  123. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  124. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  125. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  126. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +2 -2
  127. package/template/.codex/skills/yss-openapi-governance/SKILL.md +7 -7
  128. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -11
  129. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  130. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +65 -43
  131. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  132. package/template/.codex/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  133. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +3 -3
  134. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  135. package/template/.codex/skills/yss-prototype-stage/SKILL.md +7 -7
  136. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  137. package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  138. package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  139. package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  140. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  141. package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  142. package/template/.codex/skills/yss-repository/SKILL.md +2 -2
  143. package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  144. package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  145. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  146. package/template/.codex/skills/yss-research/SKILL.md +2 -2
  147. package/template/.codex/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  148. package/template/.codex/skills/yss-stage-decision/SKILL.md +5 -5
  149. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  150. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  151. package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
  152. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  153. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  154. package/template/.codex/skills/yss-technical-design/SKILL.md +6 -6
  155. package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  156. package/template/.codex/skills/yss-ui/SKILL.md +1 -1
  157. package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
  158. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  159. package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  160. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -1
  161. package/template/.cursor/skills/code-review/SKILL.md +6 -6
  162. package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
  163. package/template/.cursor/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  164. package/template/.cursor/skills/i-have-adhd/SKILL.md +1 -1
  165. package/template/.cursor/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  166. package/template/.cursor/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  167. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  168. package/template/.cursor/skills/llm-wiki/references/discover.md +3 -3
  169. package/template/.cursor/skills/prototype-review/SKILL.md +4 -4
  170. package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  171. package/template/.cursor/skills/triage/SKILL.md +1 -1
  172. package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  173. package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  174. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +1 -1
  175. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  176. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  177. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  178. package/template/.cursor/skills/yss-design-system/SKILL.md +10 -10
  179. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -3
  180. package/template/.cursor/skills/yss-design-system/references/design-system.md +3 -3
  181. package/template/.cursor/skills/yss-exception/SKILL.md +1 -1
  182. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  183. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  184. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  185. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  186. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  187. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  188. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  189. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  190. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  191. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  192. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  193. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  194. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  195. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +2 -2
  196. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +7 -7
  197. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +11 -11
  198. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  199. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +65 -43
  200. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  201. package/template/.cursor/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  202. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +3 -3
  203. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  204. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +7 -7
  205. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  206. package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  207. package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  208. package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  209. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  210. package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  211. package/template/.cursor/skills/yss-repository/SKILL.md +2 -2
  212. package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  213. package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  214. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  215. package/template/.cursor/skills/yss-research/SKILL.md +2 -2
  216. package/template/.cursor/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  217. package/template/.cursor/skills/yss-stage-decision/SKILL.md +5 -5
  218. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  219. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  220. package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
  221. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  222. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  223. package/template/.cursor/skills/yss-technical-design/SKILL.md +6 -6
  224. package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  225. package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
  226. package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
  227. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  228. package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  229. package/template/.cursorrules +1 -1
  230. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -1
  231. package/template/.pi/skills/code-review/SKILL.md +6 -6
  232. package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
  233. package/template/.pi/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  234. package/template/.pi/skills/i-have-adhd/SKILL.md +1 -1
  235. package/template/.pi/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  236. package/template/.pi/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  237. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  238. package/template/.pi/skills/llm-wiki/references/discover.md +3 -3
  239. package/template/.pi/skills/prototype-review/SKILL.md +4 -4
  240. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  241. package/template/.pi/skills/triage/SKILL.md +1 -1
  242. package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  243. package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  244. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +1 -1
  245. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  246. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  247. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  248. package/template/.pi/skills/yss-design-system/SKILL.md +10 -10
  249. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -3
  250. package/template/.pi/skills/yss-design-system/references/design-system.md +3 -3
  251. package/template/.pi/skills/yss-exception/SKILL.md +1 -1
  252. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  253. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  254. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  255. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  256. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  257. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  258. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  259. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  260. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  261. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  262. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  263. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  264. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  265. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +2 -2
  266. package/template/.pi/skills/yss-openapi-governance/SKILL.md +7 -7
  267. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -11
  268. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  269. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +65 -43
  270. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  271. package/template/.pi/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  272. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +3 -3
  273. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  274. package/template/.pi/skills/yss-prototype-stage/SKILL.md +7 -7
  275. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  276. package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  277. package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  278. package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  279. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  280. package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  281. package/template/.pi/skills/yss-repository/SKILL.md +2 -2
  282. package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  283. package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  284. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  285. package/template/.pi/skills/yss-research/SKILL.md +2 -2
  286. package/template/.pi/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  287. package/template/.pi/skills/yss-stage-decision/SKILL.md +5 -5
  288. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  289. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  290. package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
  291. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  292. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  293. package/template/.pi/skills/yss-technical-design/SKILL.md +6 -6
  294. package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  295. package/template/.pi/skills/yss-ui/SKILL.md +1 -1
  296. package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
  297. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  298. package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  299. package/template/{docs → .template-spec}/adr/README.md +1 -1
  300. package/template/{docs → .template-spec}/agents/README.md +1 -1
  301. package/template/{docs → .template-spec}/agents/backend-architecture-profiles.md +2 -2
  302. package/template/{docs → .template-spec}/agents/digital-human-roles.md +6 -6
  303. package/template/{docs → .template-spec}/agents/digital-human-roles.yaml +5 -5
  304. package/template/{docs → .template-spec}/agents/gitlab-workflow-skills.md +2 -2
  305. package/template/{docs → .template-spec}/agents/issue-tracker.md +1 -1
  306. package/template/{docs → .template-spec}/agents/skill-migrations.md +2 -2
  307. package/template/{docs → .template-spec}/agents/triage-labels.md +1 -1
  308. package/template/{docs → .template-spec}/agents/yss-skill-registry.yaml +2 -2
  309. package/template/{docs → .template-spec}/architecture/README.md +3 -3
  310. package/template/{docs → .template-spec}/architecture/templates/tech-design-template.md +3 -1
  311. package/template/{docs → .template-spec}/design/README.md +12 -11
  312. package/template/{docs → .template-spec}/design/design.md +19 -19
  313. package/template/{docs/design/templates/interaction-spec-template.md → .template-spec/design/templates/examples/model-publishing-interaction.example.md} +5 -3
  314. package/template/{docs/design/templates/state-matrix-template.md → .template-spec/design/templates/examples/model-publishing-state-matrix.example.md} +3 -1
  315. package/template/.template-spec/design/templates/interaction-spec-template.md +61 -0
  316. package/template/{docs → .template-spec}/design/templates/product-overview-design-template.md +11 -11
  317. package/template/{docs → .template-spec}/design/templates/prototype-evidence-template.yaml +4 -4
  318. package/template/{docs → .template-spec}/design/templates/prototype-review-checklist.md +1 -1
  319. package/template/.template-spec/design/templates/state-matrix-template.md +29 -0
  320. package/template/.template-spec/design/tokens/.design-md-projection.json +13 -0
  321. package/template/{docs → .template-spec}/engineering/backend-platforms.md +1 -1
  322. package/template/{docs → .template-spec}/plan/entry-review.md +8 -4
  323. package/template/{docs → .template-spec}/plan/templates/plan-template.md +1 -1
  324. package/template/{docs → .template-spec}/process/contract-reading.md +1 -1
  325. package/template/{docs → .template-spec}/process/lifecycle-artifact-map.md +5 -5
  326. package/template/.template-spec/process/lifecycle-registry-baseline.json +253 -0
  327. package/template/{docs → .template-spec}/process/lifecycle-registry.yaml +19 -12
  328. package/template/{docs → .template-spec}/process/plan-migration.md +1 -1
  329. package/template/{docs → .template-spec}/process/schemas/digital-human-task-package.schema.json +14 -1
  330. package/template/{docs → .template-spec}/process/schemas/lifecycle-checkpoint.schema.json +15 -0
  331. package/template/{docs → .template-spec}/process/schemas/lifecycle-registry.schema.json +1 -1
  332. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v3.schema.json +1 -1
  333. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v4.schema.json +1 -1
  334. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v5.schema.json +1 -1
  335. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff.schema.json +1 -1
  336. package/template/{docs → .template-spec}/process/stage-tracking.md +1 -1
  337. package/template/{docs → .template-spec}/process/subagent-collaboration.md +2 -2
  338. package/template/{docs → .template-spec}/templates/build-architecture-checklist-template.md +2 -2
  339. package/template/{docs → .template-spec}/templates/digital-human-runtime-profile-template.md +2 -2
  340. package/template/{docs → .template-spec}/templates/grok-bot-profile-template.md +1 -1
  341. package/template/{docs → .template-spec}/templates/local-parent-ticket-template.md +1 -1
  342. package/template/.template-spec/templates/release-note-template.md +29 -0
  343. package/template/.template-spec/templates/retro-report-template.md +24 -0
  344. package/template/{docs → .template-spec}/templates/subagent-task-package-template.md +3 -3
  345. package/template/.template-spec/templates/verification-record-template.md +64 -0
  346. package/template/{docs → .template-spec}/templates/vertical-slice-ticket-template.md +5 -10
  347. package/template/{docs → .template-spec}/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
  348. package/template/{docs → .template-spec}/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +4 -4
  349. package/template/AGENTS.md +12 -12
  350. package/template/CONTEXT.md +3 -3
  351. package/template/README.md +21 -21
  352. package/template/scripts/backend-delivery +1 -1
  353. package/template/scripts/lib/api-contract-decision.mjs +1 -1
  354. package/template/scripts/lib/approved-execution-context.mjs +5 -5
  355. package/template/scripts/lib/backend-delivery.mjs +4 -4
  356. package/template/scripts/lib/backend-platform.mjs +1 -1
  357. package/template/scripts/lib/backend-review.mjs +1 -1
  358. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
  359. package/template/scripts/lib/backend-standards-coverage.mjs +2 -2
  360. package/template/scripts/lib/context-reconciliation.mjs +1 -1
  361. package/template/scripts/lib/contract-views.mjs +9 -9
  362. package/template/scripts/lib/delivery-preflight.mjs +6 -6
  363. package/template/scripts/lib/design-md.mjs +2 -2
  364. package/template/scripts/lib/digital-human-roles.mjs +2 -2
  365. package/template/scripts/lib/existing-backend-architecture.mjs +1 -1
  366. package/template/scripts/lib/existing-ui-baseline.mjs +1 -1
  367. package/template/scripts/lib/frontend-delivery.mjs +2 -2
  368. package/template/scripts/lib/governance-layout.mjs +74 -0
  369. package/template/scripts/lib/harness-execution-scope.mjs +2 -2
  370. package/template/scripts/lib/lifecycle-context-query.mjs +11 -3
  371. package/template/scripts/lib/lifecycle-registry.mjs +46 -7
  372. package/template/scripts/lib/lifecycle-status.mjs +111 -0
  373. package/template/scripts/lib/lifecycle-transition.mjs +71 -10
  374. package/template/scripts/lib/openapi-draft-validation.mjs +1 -1
  375. package/template/scripts/lib/plan-spec-entry-view.mjs +48 -0
  376. package/template/scripts/lib/plan-spec-entry.mjs +3 -3
  377. package/template/scripts/lib/skill-registry.mjs +8 -8
  378. package/template/scripts/lib/skill-supply-chain.mjs +1 -1
  379. package/template/scripts/lib/slice-contract-preparation.mjs +3 -3
  380. package/template/scripts/lib/slice-contract.mjs +1 -1
  381. package/template/scripts/lib/slice-repositories.mjs +1 -1
  382. package/template/scripts/lib/slice-task-package.mjs +3 -3
  383. package/template/scripts/lib/stage-tracking-migration.mjs +2 -2
  384. package/template/scripts/lib/stage-tracking.mjs +5 -5
  385. package/template/scripts/lib/strategic-feedback.mjs +2 -2
  386. package/template/scripts/lib/strategic-handoff-routing.mjs +2 -2
  387. package/template/scripts/lib/strategic-handoff.mjs +15 -15
  388. package/template/scripts/lib/task-package-schema.mjs +2 -2
  389. package/template/scripts/lib/task-package.mjs +1 -1
  390. package/template/scripts/lib/technical-design-boundary.mjs +1 -1
  391. package/template/scripts/lib/user-decision.mjs +2 -1
  392. package/template/scripts/lifecycle-status +14 -0
  393. package/template/scripts/plan-spec-entry +21 -0
  394. package/template/scripts/strategic-consumer-entry +1 -1
  395. package/template/scripts/strategic-handoff +1 -1
  396. package/template/scripts/verify-frontend-implementation-evidence +1 -1
  397. package/template/scripts/verify-governance-layout +15 -0
  398. package/template/scripts/verify-lifecycle-checkpoint +1 -1
  399. package/template/scripts/verify-project-instance +2 -0
  400. package/template/scripts/verify-scaffold-architecture-decisions +1 -1
  401. package/template/scripts/verify-strategic-context-import +3 -3
  402. package/template/skills-lock.json +77 -77
  403. package/template.manifest.json +19 -19
  404. package/template.snapshot.json +5 -5
  405. package/template/docs/agents/archify-integration.md +0 -19
  406. package/template/docs/design/design-system-sync.yaml +0 -13
  407. package/template/docs/design/preview-dark.html +0 -178
  408. package/template/docs/design/preview.css +0 -730
  409. package/template/docs/design/preview.html +0 -178
  410. package/template/docs/design/preview.js +0 -71
  411. package/template/docs/design/tokens/.design-md-projection.json +0 -13
  412. package/template/docs/engineering/evidence/aliyun-artifact-resolution.json +0 -446
  413. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +0 -13
  414. package/template/docs/process/github-workflows.md +0 -52
  415. package/template/docs/templates/release-note-template.md +0 -14
  416. package/template/docs/templates/retro-report-template.md +0 -16
  417. package/template/docs/templates/verification-record-template.md +0 -53
  418. /package/template/{docs → .template-spec}/agents/domain.md +0 -0
  419. /package/template/{docs → .template-spec}/api/templates/openapi-draft-review-checklist.md +0 -0
  420. /package/template/{docs → .template-spec}/api/templates/openapi-draft-validation-record-template.yaml +0 -0
  421. /package/template/{docs → .template-spec}/api/templates/openapi-freeze-record-template.md +0 -0
  422. /package/template/{docs → .template-spec}/api/templates/openapi-json-export-record-template.md +0 -0
  423. /package/template/{docs → .template-spec}/architecture/templates/architecture-deepening-template.md +0 -0
  424. /package/template/{docs → .template-spec}/architecture/templates/architecture-review-checklist.md +0 -0
  425. /package/template/{docs → .template-spec}/architecture/templates/business-architecture-template.md +0 -0
  426. /package/template/{docs → .template-spec}/architecture/templates/data-architecture-template.md +0 -0
  427. /package/template/{docs → .template-spec}/architecture/templates/engineering-baseline-review-template.md +0 -0
  428. /package/template/{docs → .template-spec}/architecture/templates/functional-architecture-template.md +0 -0
  429. /package/template/{docs → .template-spec}/architecture/templates/system-overview-design-template.md +0 -0
  430. /package/template/{docs → .template-spec}/design/diagrams/README.md +0 -0
  431. /package/template/{docs → .template-spec}/design/schemas/visual-baseline.schema.json +0 -0
  432. /package/template/{docs → .template-spec}/design/templates/prototype-confirmation-template.md +0 -0
  433. /package/template/{docs → .template-spec}/design/templates/visual-baseline-template.yaml +0 -0
  434. /package/template/{docs → .template-spec}/design/tokens/theme.json +0 -0
  435. /package/template/{docs → .template-spec}/design/tokens/tokens.compact.json +0 -0
  436. /package/template/{docs → .template-spec}/design/tokens/tokens.dark.json +0 -0
  437. /package/template/{docs → .template-spec}/design/tokens/tokens.default.json +0 -0
  438. /package/template/{docs → .template-spec}/design/tokens/variables.css +0 -0
  439. /package/template/{docs → .template-spec}/design/tokens/variables.dark.css +0 -0
  440. /package/template/{docs → .template-spec}/engineering/backend-platforms.json +0 -0
  441. /package/template/{docs → .template-spec}/plan/README.md +0 -0
  442. /package/template/{docs → .template-spec}/plan/templates/competitive-analysis-template.md +0 -0
  443. /package/template/{docs → .template-spec}/plan/templates/competitive-matrix-template.md +0 -0
  444. /package/template/{docs → .template-spec}/plan/templates/market-analysis-template.md +0 -0
  445. /package/template/{docs → .template-spec}/plan/templates/user-pain-points-template.md +0 -0
  446. /package/template/{docs → .template-spec}/process/delivery-preflight.md +0 -0
  447. /package/template/{docs → .template-spec}/process/document-writing.md +0 -0
  448. /package/template/{docs → .template-spec}/process/existing-backend-architecture.md +0 -0
  449. /package/template/{docs → .template-spec}/process/existing-ui-baseline.md +0 -0
  450. /package/template/{docs → .template-spec}/process/frontend-backend-delivery.md +0 -0
  451. /package/template/{docs → .template-spec}/process/harness-process-tailoring.md +0 -0
  452. /package/template/{docs → .template-spec}/process/implementation-repo-integration.md +0 -0
  453. /package/template/{docs/process/lifecycle-registry-baseline.json → .template-spec/process/lifecycle-registry-baseline-v1.json} +0 -0
  454. /package/template/{docs → .template-spec}/process/schemas/api-contract-decision-v2.schema.json +0 -0
  455. /package/template/{docs → .template-spec}/process/schemas/api-contract-decision.schema.json +0 -0
  456. /package/template/{docs → .template-spec}/process/schemas/backend-architecture-identity.schema.json +0 -0
  457. /package/template/{docs → .template-spec}/process/schemas/backend-delivery-verification.schema.json +0 -0
  458. /package/template/{docs → .template-spec}/process/schemas/backend-delivery.schema.json +0 -0
  459. /package/template/{docs → .template-spec}/process/schemas/context-reconciliation.schema.json +0 -0
  460. /package/template/{docs → .template-spec}/process/schemas/data-architecture-decision.schema.json +0 -0
  461. /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-input.schema.json +0 -0
  462. /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-result.schema.json +0 -0
  463. /package/template/{docs → .template-spec}/process/schemas/existing-ui-baseline.schema.json +0 -0
  464. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v1.schema.json +0 -0
  465. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v3.schema.json +0 -0
  466. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance.schema.json +0 -0
  467. /package/template/{docs → .template-spec}/process/schemas/frontend-implementation-evidence.schema.json +0 -0
  468. /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight-v2.schema.json +0 -0
  469. /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight.schema.json +0 -0
  470. /package/template/{docs → .template-spec}/process/schemas/implementation-repository-preparation-result.schema.json +0 -0
  471. /package/template/{docs → .template-spec}/process/schemas/openapi-draft-validation-record.schema.json +0 -0
  472. /package/template/{docs → .template-spec}/process/schemas/project-scaffold-contract.schema.json +0 -0
  473. /package/template/{docs → .template-spec}/process/schemas/review-bundle.schema.json +0 -0
  474. /package/template/{docs → .template-spec}/process/schemas/scaffold-architecture-decisions.schema.json +0 -0
  475. /package/template/{docs → .template-spec}/process/schemas/slice-implementation-contract-v3.schema.json +0 -0
  476. /package/template/{docs → .template-spec}/process/schemas/stage-tracking.schema.json +0 -0
  477. /package/template/{docs → .template-spec}/process/schemas/strategic-consumer-feedback.schema.json +0 -0
  478. /package/template/{docs → .template-spec}/process/schemas/strategic-feedback-adjudication.schema.json +0 -0
  479. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery-verification.schema.json +0 -0
  480. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery.schema.json +0 -0
  481. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +0 -0
  482. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy.schema.json +0 -0
  483. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export-v2.schema.json +0 -0
  484. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export.schema.json +0 -0
  485. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt-v3.schema.json +0 -0
  486. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt.schema.json +0 -0
  487. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-package.schema.json +0 -0
  488. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +0 -0
  489. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package.schema.json +0 -0
  490. /package/template/{docs → .template-spec}/process/schemas/subagent-task-package.schema.json +0 -0
  491. /package/template/{docs → .template-spec}/process/schemas/user-decision.schema.json +0 -0
  492. /package/template/{docs → .template-spec}/process/strategic-handoff-package.md +0 -0
  493. /package/template/{docs → .template-spec}/process/templates/context-reconciliation-template.yaml +0 -0
  494. /package/template/{docs → .template-spec}/process/templates/frontend-implementation-plan-template.yaml +0 -0
  495. /package/template/{docs → .template-spec}/process/templates/frontend-implementation-verification-template.yaml +0 -0
  496. /package/template/{docs → .template-spec}/process/templates/lifecycle-checkpoint-template.yaml +0 -0
  497. /package/template/{docs → .template-spec}/process/templates/scaffold-architecture-decisions-template.yaml +0 -0
  498. /package/template/{docs → .template-spec}/process/templates/stage-checkpoint-template.md +0 -0
  499. /package/template/{docs → .template-spec}/process/templates/user-decision-template.yaml +0 -0
  500. /package/template/{docs → .template-spec}/templates/adr-template.md +0 -0
  501. /package/template/{docs → .template-spec}/templates/approval-record-template.yaml +0 -0
  502. /package/template/{docs → .template-spec}/templates/cross-repo-slice-template.md +0 -0
  503. /package/template/{docs → .template-spec}/templates/examples/lifecycle-writing-examples.md +0 -0
  504. /package/template/{docs → .template-spec}/templates/implementation-repo-registry-template.md +0 -0
  505. /package/template/{docs → .template-spec}/templates/openapi-spec-template.yaml +0 -0
  506. /package/template/{docs → .template-spec}/templates/review-bundle-template.yaml +0 -0
  507. /package/template/{docs → .template-spec}/templates/review-report-template.md +0 -0
  508. /package/template/{docs → .template-spec}/templates/spec-delta-template.md +0 -0
  509. /package/template/{docs → .template-spec}/templates/spec-template.md +0 -0
  510. /package/template/{docs → .template-spec}/user-guide/yss-ui-mcp.md +0 -0
  511. /package/template/{docs → .template-spec}/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" +0 -0
  512. /package/template/{docs → .template-spec}/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" +0 -0
  513. /package/template/{docs → .template-spec}/user-guide//351/230/266/346/256/265/346/216/245/345/205/245/344/270/216/344/272/247/347/211/251/345/244/215/347/224/250/344/275/277/347/224/250/346/211/213/345/206/214.md" +0 -0
package/README.md CHANGED
@@ -34,7 +34,7 @@ CLI 在规划和写入前检查模板家族身份,当前主路线识别:
34
34
  - `create-yss-harness-backend` / `.yss-harness-backend.json`
35
35
  - `create-yss-harness-frontend` / `.yss-harness-frontend.json`
36
36
 
37
- `docs/process/harness-profile.yaml` 也参与身份判断。异族、多重 identity、损坏 metadata、未知或矛盾 profile、identity symlink 均在写入前 fail closed,`--force` 不能绕过;Programmatic API 使用相同 guard。帮助和版本查询不受目标家族限制。
37
+ `.template-spec/process/harness-profile.yaml` 也参与身份判断。异族、多重 identity、损坏 metadata、未知或矛盾 profile、identity symlink 均在写入前 fail closed,`--force` 不能绕过;Programmatic API 使用相同 guard。帮助和版本查询不受目标家族限制。
38
38
 
39
39
  旧 `create-yss-harness-dev` / `.yss-harness-dev.json` 仍会被识别并拒绝跨家族接管;既有实例按原固定版本维护,不再作为新项目入口。战略、后端和前端分别使用专职 CLI,任何家族都不做跨家族原地迁移。
40
40
 
@@ -183,4 +183,8 @@ npm pack --dry-run
183
183
  - [Ownership Policy v1](docs/implementation/ownership-policy-v1.md)
184
184
  - [Lifecycle Policies v1](docs/implementation/lifecycle-policies-v1.md)
185
185
  - [Programmatic API v1](docs/implementation/programmatic-api-v1.md)
186
- - [完整中文使用手册](docs/user-guide/create-yss-spec-cli-guide.md)
186
+ - [完整中文使用手册](.template-spec/user-guide/create-yss-spec-cli-guide.md)
187
+
188
+ ## 治理目录迁移
189
+
190
+ 新实例将分发治理资产安装到 `.template-spec/`,项目规格产物放在 `docs/`。已有实例只有显式运行 `sync --migrate-layout --plan` 审阅后,才运行 `sync --migrate-layout --apply`;`attach` 同样支持该开关。迁移保留项目 tracker 配置,缺少可信摘要、旧文件被修改或目标路径冲突时阻断。普通 sync 不自动改变旧实例目录。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-yss-spec",
3
- "version": "3.5.0",
3
+ "version": "3.5.2",
4
4
  "description": "Initialize a YSS spec project template repository",
5
5
  "main": "src/api/index.js",
6
6
  "repository": {
@@ -12,6 +12,7 @@ const { collectGitRoots, gitDirtyWarning } = require("../git/worktree");
12
12
  const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
13
13
  const { buildSyncPlanFromRuntime } = require("../template/sync-planner-runtime");
14
14
  const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
15
+ const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
15
16
  const { classifyRemovedFiles } = require("../template/prune-planner");
16
17
  const { decorateMetadataOwnership } = require("../template/ownership-metadata");
17
18
  const { decorateMetadataLifecycle } = require("../template/lifecycle-metadata");
@@ -73,7 +74,7 @@ function affectedPathsForMigration(migrationPlan) {
73
74
  );
74
75
  }
75
76
 
76
- function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd() } = {}) {
77
+ function buildSyncContext({ targetDir = ".", force = false, migrateLayout = false, cwd = process.cwd() } = {}) {
77
78
  const snapshot = readTemplateSnapshot();
78
79
  assertBundledFamily(snapshot);
79
80
  const resolvedTargetDir = normalizeTargetDir(targetDir, cwd);
@@ -84,17 +85,24 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
84
85
 
85
86
  const { metadata } = loadTemplateMetadata(resolvedTargetDir);
86
87
  const identity = readTargetIdentity(resolvedTargetDir);
87
- const desiredOperations = buildSyncDesiredOperations(
88
+ const baseDesiredOperations = buildSyncDesiredOperations(
88
89
  resolvedTargetDir,
89
90
  metadata,
90
91
  identity,
91
92
  snapshot,
92
93
  );
93
- const migrationPlan = buildLegacyMigrationPlan(
94
+ const layout = prepareLayoutMigration({
95
+ targetDir: resolvedTargetDir,
96
+ desiredOperations: baseDesiredOperations,
97
+ managedFiles: metadata.managedFiles || {},
98
+ explicit: migrateLayout,
99
+ });
100
+ const desiredOperations = layout.desiredOperations;
101
+ const migrationPlan = combineMigrationPlans(layout.plan, buildLegacyMigrationPlan(
94
102
  resolvedTargetDir,
95
103
  desiredOperations,
96
104
  { checkFlatTickets: false },
97
- );
105
+ ));
98
106
  const warning = gitDirtyWarning(resolvedTargetDir);
99
107
 
100
108
  const { classified: syncPlan, plan } = buildSyncPlanFromRuntime({
@@ -110,7 +118,9 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
110
118
  getFileHash: (operation) => fileHash(operation.targetPath),
111
119
  });
112
120
  const removedPlan = classifyRemovedFiles({
113
- removed: syncPlan.removed.filter((relativePath) => relativePath !== "README.md"),
121
+ removed: syncPlan.removed.filter((relativePath) =>
122
+ relativePath !== "README.md" &&
123
+ !layout.plan.operations.some((operation) => operation.kind === "remove" && operation.path === relativePath)),
114
124
  managedFiles: metadata.managedFiles || {},
115
125
  getPathKind: (relativePath) => pathKind(targetPath(resolvedTargetDir, relativePath)),
116
126
  getFileHash: (relativePath) => fileHash(targetPath(resolvedTargetDir, relativePath)),
@@ -142,6 +152,7 @@ function buildSyncContext({ targetDir = ".", force = false, cwd = process.cwd()
142
152
  identity,
143
153
  desiredOperations,
144
154
  migrationPlan,
155
+ migrateLayout,
145
156
  warning,
146
157
  syncPlan,
147
158
  plan,
@@ -261,8 +272,17 @@ function applySyncContext(context, { force = false, prune = false } = {}) {
261
272
  throw new Error(`${relativePath}: 待清理文件在规划后已变化,请重新运行 sync`);
262
273
  }
263
274
  }
264
- const currentMigration = buildLegacyMigrationPlan(targetDir, desiredOperations, { checkFlatTickets: false });
275
+ const currentLayout = prepareLayoutMigration({
276
+ targetDir,
277
+ desiredOperations: buildSyncDesiredOperations(targetDir, metadata, readTargetIdentity(targetDir), context.snapshot),
278
+ managedFiles: metadata.managedFiles || {},
279
+ explicit: context.migrateLayout,
280
+ });
281
+ const currentMigration = combineMigrationPlans(currentLayout.plan,
282
+ buildLegacyMigrationPlan(targetDir, desiredOperations, { checkFlatTickets: false }));
265
283
  if (!isDeepStrictEqual(currentMigration.operations, migrationPlan.operations) ||
284
+ !isDeepStrictEqual(currentLayout.desiredOperations.map((operation) => [operation.relativePath, operation.desiredHash]),
285
+ desiredOperations.map((operation) => [operation.relativePath, operation.desiredHash])) ||
266
286
  currentMigration.unsafe.length || currentMigration.conflicts.length) {
267
287
  throw new Error("旧路径迁移在规划后已变化,请重新运行 sync");
268
288
  }
@@ -283,6 +303,11 @@ function applySyncContext(context, { force = false, prune = false } = {}) {
283
303
  const nextMetadata = decorateMetadataLifecycle(
284
304
  decorateMetadataOwnership(buildNextSyncMetadata(metadata, syncPlan, { snapshot: context.snapshot })),
285
305
  );
306
+ for (const operation of context.migrationPlan.operations) {
307
+ if (operation.kind === "remove" && operation.path.startsWith("docs/")) {
308
+ delete nextMetadata.managedFiles[operation.path];
309
+ }
310
+ }
286
311
  if (!isDeepStrictEqual({ ...nextMetadata, lastSyncedAt: metadata.lastSyncedAt }, metadata)) {
287
312
  writeTemplateMetadata(targetDir, nextMetadata, transaction);
288
313
  }
package/src/cli/args.js CHANGED
@@ -39,6 +39,8 @@ function parseArgs(argv = []) {
39
39
  options.force = true;
40
40
  } else if (current === "--prune") {
41
41
  options.prune = true;
42
+ } else if (current === "--migrate-layout") {
43
+ options.migrateLayout = true;
42
44
  } else if (current === "--git-init") {
43
45
  options.gitInit = true;
44
46
  } else if (current === "--include-example-docs") {
package/src/cli/help.js CHANGED
@@ -36,6 +36,7 @@ OPTIONS
36
36
  attach / sync:覆盖受管冲突文件;unsafe 路径始终阻断
37
37
  update:即使已是最新时仍重新安装;npx / 源码目录仍不覆盖
38
38
  --prune sync:备份并删除与旧受管基线一致的退出分发文件
39
+ --migrate-layout attach/sync:显式迁移旧 docs 治理布局,冲突时停止并保留备份
39
40
  --git-init 初始化完成后执行 git init
40
41
  --include-example-docs 显式保留示例文档(默认关闭)
41
42
  --no-example-docs 不生成示例文档
@@ -66,6 +67,8 @@ EXAMPLES
66
67
  $ npx create-yss-spec@latest sync
67
68
  $ npx create-yss-spec@latest sync --dry-run
68
69
  $ npx create-yss-spec@latest sync --plan
70
+ $ npx create-yss-spec@latest sync --plan --migrate-layout
71
+ $ npx create-yss-spec@latest sync --migrate-layout
69
72
  $ npx create-yss-spec@latest sync --json
70
73
  $ npx create-yss-spec@latest diff
71
74
  $ npx create-yss-spec@latest diff --json
@@ -86,7 +89,7 @@ EXAMPLES
86
89
 
87
90
  LEARN MORE
88
91
  仓库 README:https://github.com/iloveZzz/create-yss-spec#readme
89
- 使用手册:https://github.com/iloveZzz/create-yss-spec/blob/main/docs/user-guide/create-yss-spec-cli-guide.md
92
+ 使用手册:https://github.com/iloveZzz/create-yss-spec/blob/main/.template-spec/user-guide/create-yss-spec-cli-guide.md
90
93
  模板仓库:https://github.com/iloveZzz/yss-spec-project-template
91
94
  `;
92
95
  }
@@ -13,6 +13,7 @@ const { gitDirtyWarning } = require("../git/worktree");
13
13
  const { unmanagedPathReason, assertTargetWorkingTreeWritable } = require("../validation/security");
14
14
  const { buildAttachPlanFromRuntime } = require("../template/attach-planner-runtime");
15
15
  const { buildLegacyMigrationPlan } = require("../template/migration-runtime");
16
+ const { prepareLayoutMigration, combineMigrationPlans } = require("../template/layout-migration");
16
17
  const {
17
18
  PACKAGE_ROOT,
18
19
  BUNDLED_TEMPLATE_ROOT,
@@ -190,14 +191,19 @@ async function runAttach(argv = []) {
190
191
 
191
192
  const variables = attachVariables(options);
192
193
  const identity = readTargetIdentity(targetDir);
193
- const desiredOperations = buildAttachDesiredOperations(
194
+ const baseDesiredOperations = buildAttachDesiredOperations(
194
195
  targetDir,
195
196
  variables,
196
197
  identity,
197
198
  );
198
- const migrationPlan = buildLegacyMigrationPlan(targetDir, desiredOperations, {
199
- checkFlatTickets: true,
199
+ const layout = prepareLayoutMigration({
200
+ targetDir, desiredOperations: baseDesiredOperations,
201
+ explicit: Boolean(options.migrateLayout),
200
202
  });
203
+ const desiredOperations = layout.desiredOperations;
204
+ const migrationPlan = combineMigrationPlans(layout.plan, buildLegacyMigrationPlan(targetDir, desiredOperations, {
205
+ checkFlatTickets: true,
206
+ }));
201
207
  const warning = gitDirtyWarning(targetDir);
202
208
 
203
209
  const { classified: plan } = buildAttachPlanFromRuntime({
@@ -8,6 +8,7 @@ const { projectDiff } = require("../api/project-diff");
8
8
  function runDiff(argv = []) {
9
9
  const options = parseArgs(argv);
10
10
  if (options.prune) throw new Error("--prune 仅适用于 sync");
11
+ if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
11
12
  const plan = projectDiff({
12
13
  targetDir: options.targetDir || ".",
13
14
  force: Boolean(options.force),
@@ -394,6 +394,7 @@ function renderDoctorText(report) {
394
394
  function runDoctor(argv = []) {
395
395
  const options = parseArgs(argv);
396
396
  if (options.prune) throw new Error("--prune 仅适用于 sync");
397
+ if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
397
398
  const targetDir = normalizeTargetDir(options.targetDir);
398
399
  const report = buildDoctorReport(targetDir);
399
400
 
@@ -121,6 +121,7 @@ function parentDirectoryOperations(desiredOperations, targetDir) {
121
121
  async function runInit(argv = []) {
122
122
  const options = parseArgs(argv);
123
123
  if (options.prune) throw new Error("--prune 仅适用于 sync");
124
+ if (options.migrateLayout) throw new Error("--migrate-layout 仅适用于 attach/sync");
124
125
  if (options.help) {
125
126
  printHelp(PACKAGE_MANIFEST.version);
126
127
  return;
@@ -195,7 +196,7 @@ async function runInit(argv = []) {
195
196
  ? "2. 运行 git status 检查初始化结果"
196
197
  : "2. 如需版本管理,可执行 git init",
197
198
  );
198
- console.log("3. 检查 AGENTS.md、README 和 docs 目录是否符合预期");
199
+ console.log("3. 检查 AGENTS.md、README 和 .template-spec 目录是否符合预期;docs 将在首次项目产出时创建");
199
200
  }
200
201
 
201
202
  module.exports = {
@@ -88,6 +88,7 @@ function runSync(argv = []) {
88
88
  const context = buildSyncContext({
89
89
  targetDir: options.targetDir || ".",
90
90
  force: Boolean(options.force),
91
+ migrateLayout: Boolean(options.migrateLayout),
91
92
  });
92
93
 
93
94
  if (options.json) {
@@ -36,7 +36,7 @@ const FAMILIES = [
36
36
  },
37
37
  ];
38
38
 
39
- const PROFILE_PATH = "docs/process/harness-profile.yaml";
39
+ const PROFILE_PATH = ".template-spec/process/harness-profile.yaml";
40
40
 
41
41
  function statOrMissing(file) {
42
42
  try {
@@ -7,39 +7,40 @@ const ASSET_PROFILE = "stage-selective";
7
7
  const INITIAL_STAGES = ["stage.entry-triage", "stage.plan"];
8
8
  const TEMPLATE_ONLY_IMPORTS = new Set(["scripts/lib/maintenance-intensity.mjs"]);
9
9
  const RENDERED_SKILL_SCRIPTS = Object.freeze({ "yss-design-system": ["scripts/design-md"] });
10
- const SKILL_ASSET_PREFIXES = Object.freeze({ "yss-design-system": ["docs/design/tokens/"] });
10
+ const SKILL_ASSET_PREFIXES = Object.freeze({ "yss-design-system": [".template-spec/design/tokens/"] });
11
11
 
12
12
  // Paths here are the entry points for each stage. Relative JavaScript imports
13
13
  // are included by moduleClosure; files named by an explicitly installed Skill
14
14
  // are included by skillReferences. The CLI snapshot retains every source file.
15
15
  const COMMON = {
16
16
  files: [
17
- "docs/agents/yss-skill-registry.yaml",
18
- "docs/agents/digital-human-roles.yaml",
19
- "docs/agents/digital-human-roles.md",
20
- "docs/agents/issue-tracker.md",
21
- "docs/agents/triage-labels.md",
22
- "docs/agents/domain.md",
23
- "docs/process/lifecycle-registry.yaml",
24
- "docs/process/lifecycle-registry-baseline.json",
25
- "docs/process/lifecycle-artifact-map.md",
26
- "docs/process/harness-process-tailoring.md",
27
- "docs/process/document-writing.md",
28
- "docs/process/contract-reading.md",
29
- "docs/process/stage-tracking.md",
30
- "docs/process/schemas/context-reconciliation.schema.json",
31
- "docs/process/schemas/digital-human-task-package.schema.json",
32
- "docs/process/schemas/lifecycle-checkpoint.schema.json",
33
- "docs/process/schemas/stage-tracking.schema.json",
34
- "docs/process/schemas/user-decision.schema.json",
35
- "docs/process/templates/context-reconciliation-template.yaml",
36
- "docs/process/templates/lifecycle-checkpoint-template.yaml",
37
- "docs/process/templates/stage-checkpoint-template.md",
38
- "docs/process/templates/user-decision-template.yaml",
39
- "docs/templates/local-parent-ticket-template.md",
40
- "docs/templates/approval-record-template.yaml",
41
- "docs/templates/review-report-template.md",
42
- "docs/user-guide/用户手册.md",
17
+ ".template-spec/agents/yss-skill-registry.yaml",
18
+ ".template-spec/agents/digital-human-roles.yaml",
19
+ ".template-spec/agents/digital-human-roles.md",
20
+ ".template-spec/agents/issue-tracker.md",
21
+ ".template-spec/agents/triage-labels.md",
22
+ ".template-spec/agents/domain.md",
23
+ ".template-spec/process/lifecycle-registry.yaml",
24
+ ".template-spec/process/lifecycle-registry-baseline.json",
25
+ ".template-spec/process/lifecycle-registry-baseline-v1.json",
26
+ ".template-spec/process/lifecycle-artifact-map.md",
27
+ ".template-spec/process/harness-process-tailoring.md",
28
+ ".template-spec/process/document-writing.md",
29
+ ".template-spec/process/contract-reading.md",
30
+ ".template-spec/process/stage-tracking.md",
31
+ ".template-spec/process/schemas/context-reconciliation.schema.json",
32
+ ".template-spec/process/schemas/digital-human-task-package.schema.json",
33
+ ".template-spec/process/schemas/lifecycle-checkpoint.schema.json",
34
+ ".template-spec/process/schemas/stage-tracking.schema.json",
35
+ ".template-spec/process/schemas/user-decision.schema.json",
36
+ ".template-spec/process/templates/context-reconciliation-template.yaml",
37
+ ".template-spec/process/templates/lifecycle-checkpoint-template.yaml",
38
+ ".template-spec/process/templates/stage-checkpoint-template.md",
39
+ ".template-spec/process/templates/user-decision-template.yaml",
40
+ ".template-spec/templates/local-parent-ticket-template.md",
41
+ ".template-spec/templates/approval-record-template.yaml",
42
+ ".template-spec/templates/review-report-template.md",
43
+ ".template-spec/user-guide/用户手册.md",
43
44
  ],
44
45
  scripts: [
45
46
  "scripts/verify-project-instance",
@@ -62,35 +63,35 @@ const COMMON = {
62
63
  const STAGES = Object.freeze({
63
64
  "stage.entry-triage": { files: [], scripts: [], skills: [] },
64
65
  "stage.plan": {
65
- prefixes: ["docs/plan/"],
66
- files: ["docs/process/plan-migration.md"],
66
+ prefixes: [".template-spec/plan/"],
67
+ files: [".template-spec/process/plan-migration.md"],
67
68
  scripts: ["scripts/verify-plan-spec-entry"],
68
69
  skills: [],
69
70
  },
70
71
  "stage.spec-architecture": {
71
72
  files: [
72
- "docs/templates/spec-template.md",
73
- "docs/templates/spec-delta-template.md",
74
- "docs/architecture/templates/business-architecture-template.md",
75
- "docs/architecture/templates/functional-architecture-template.md",
73
+ ".template-spec/templates/spec-template.md",
74
+ ".template-spec/templates/spec-delta-template.md",
75
+ ".template-spec/architecture/templates/business-architecture-template.md",
76
+ ".template-spec/architecture/templates/functional-architecture-template.md",
76
77
  ],
77
78
  scripts: [],
78
79
  skills: [],
79
80
  },
80
81
  "stage.product-design": {
81
- prefixes: ["docs/design/"],
82
+ prefixes: [".template-spec/design/"],
82
83
  files: [],
83
84
  scripts: ["scripts/design-md"],
84
85
  skills: ["yss-prototype-stage"],
85
86
  },
86
87
  "stage.system-data-engineering": {
87
- prefixes: ["docs/engineering/"],
88
+ prefixes: [".template-spec/engineering/"],
88
89
  files: [
89
- "docs/process/implementation-repo-integration.md",
90
- "docs/process/existing-backend-architecture.md",
91
- "docs/process/existing-ui-baseline.md",
92
- "docs/process/frontend-backend-delivery.md",
93
- "docs/templates/implementation-repo-registry-template.md",
90
+ ".template-spec/process/implementation-repo-integration.md",
91
+ ".template-spec/process/existing-backend-architecture.md",
92
+ ".template-spec/process/existing-ui-baseline.md",
93
+ ".template-spec/process/frontend-backend-delivery.md",
94
+ ".template-spec/templates/implementation-repo-registry-template.md",
94
95
  ],
95
96
  scripts: [
96
97
  "scripts/backend-platforms",
@@ -101,21 +102,21 @@ const STAGES = Object.freeze({
101
102
  skills: ["yss-implementation-contract-compiler"],
102
103
  },
103
104
  "stage.ticket-formalization": {
104
- files: ["docs/templates/vertical-slice-ticket-template.md", "docs/templates/cross-repo-slice-template.md"],
105
+ files: [".template-spec/templates/vertical-slice-ticket-template.md", ".template-spec/templates/cross-repo-slice-template.md"],
105
106
  scripts: ["scripts/dispatch-slice-task", "scripts/slice-contract"],
106
107
  skills: [],
107
108
  },
108
109
  "stage.vertical-slice-implementation": {
109
- files: ["docs/templates/verification-record-template.md"],
110
+ files: [".template-spec/templates/verification-record-template.md"],
110
111
  scripts: ["scripts/implementation-path-policy", "scripts/complete-backend-delivery"],
111
112
  skills: [],
112
113
  },
113
114
  "stage.verification-release-retrospective": {
114
115
  files: [
115
- "docs/process/delivery-preflight.md",
116
- "docs/templates/release-note-template.md",
117
- "docs/templates/retro-report-template.md",
118
- "docs/templates/review-bundle-template.yaml",
116
+ ".template-spec/process/delivery-preflight.md",
117
+ ".template-spec/templates/release-note-template.md",
118
+ ".template-spec/templates/retro-report-template.md",
119
+ ".template-spec/templates/review-bundle-template.yaml",
119
120
  ],
120
121
  scripts: ["scripts/preflight-delivery"],
121
122
  skills: [],
@@ -181,7 +182,7 @@ function skillReferences(root, result, skillId, selectedSkills) {
181
182
  if (entry.isDirectory()) visit(file);
182
183
  else if (entry.isFile() && /\.(?:md|yaml|json)$/.test(entry.name)) {
183
184
  const source = fs.readFileSync(file, "utf8");
184
- for (const match of source.matchAll(/(?:docs|scripts)\/[\p{L}\p{N}_.\/-]+/gu)) {
185
+ for (const match of source.matchAll(/(?:\.template-spec|scripts)\/[\p{L}\p{N}_.\/-]+/gu)) {
185
186
  const ref = match[0].replace(/[.,;]+$/, "");
186
187
  if (!fs.existsSync(path.join(root, ref)) || !fs.statSync(path.join(root, ref)).isFile()) continue;
187
188
  if (ref.startsWith("scripts/")) moduleClosure(root, result, ref, selectedSkills);
@@ -197,14 +198,21 @@ function skillReferences(root, result, skillId, selectedSkills) {
197
198
 
198
199
  function assetPaths(root, distribution) {
199
200
  if (distribution.mode !== "selected" || distribution.assetProfile !== ASSET_PROFILE) return null;
200
- const lifecycle = fs.readFileSync(sourceFile(root, "docs/process/lifecycle-registry.yaml"), "utf8");
201
+ const lifecycle = fs.readFileSync(sourceFile(root, ".template-spec/process/lifecycle-registry.yaml"), "utf8");
201
202
  const stageIds = [...lifecycle.matchAll(/^ - id: (stage\.[a-z0-9-]+)\s*$/gm)].map((match) => match[1]).sort();
202
203
  if (JSON.stringify(stageIds) !== JSON.stringify(Object.keys(STAGES).sort())) {
203
204
  throw new Error("CLI 阶段资产映射与生命周期注册表阶段 ID 不一致");
204
205
  }
205
206
  const result = new Set();
206
207
  const selectedSkills = new Set(distribution.installedSkills);
207
- for (const ref of COMMON.files) addFile(root, result, ref);
208
+ for (const ref of COMMON.files) {
209
+ if (ref === ".template-spec/process/lifecycle-registry-baseline-v1.json" &&
210
+ !fs.existsSync(path.join(root, ref))) {
211
+ const baseline = JSON.parse(fs.readFileSync(sourceFile(root, ".template-spec/process/lifecycle-registry-baseline.json"), "utf8"));
212
+ if (baseline.schema_version === 1) continue;
213
+ }
214
+ addFile(root, result, ref);
215
+ }
208
216
  for (const ref of COMMON.scripts) moduleClosure(root, result, ref, selectedSkills);
209
217
  for (const stage of distribution.installedStages) {
210
218
  const bundle = STAGES[stage];
@@ -41,7 +41,7 @@ function classifyAttachOperations({
41
41
  continue;
42
42
  }
43
43
 
44
- if (operation.relativePath === "docs/agents/issue-tracker.md") {
44
+ if (operation.relativePath === ".template-spec/agents/issue-tracker.md") {
45
45
  matched.push({ ...operation, reason: "project-owned-tracker-configuration" });
46
46
  continue;
47
47
  }
@@ -6,16 +6,16 @@ const { ASSET_PROFILE, INITIAL_STAGES } = require("./asset-runtime");
6
6
 
7
7
  const RUNTIMES = Object.freeze({ codex: ".codex/skills", cursor: ".cursor/skills", pi: ".pi/skills" });
8
8
  const OMIT_INSTANCE_PATHS = [
9
- "docs/process/github-workflows.md",
10
- "docs/process/harness-executive-blueprint.md",
11
- "docs/process/PDCA-SCRUM.md",
12
- "docs/design/preview.html", "docs/design/preview.css", "docs/design/preview.js", "docs/design/preview-dark.html",
13
- "docs/design/facts/antdv-next", "docs/user-guide/设备借用贯穿案例.md",
14
- "docs/design/design-system-sync.yaml",
9
+ ".template-source/process/github-workflows.md",
10
+ ".template-spec/process/harness-executive-blueprint.md",
11
+ ".template-spec/process/PDCA-SCRUM.md",
12
+ ".template-spec/design/preview.html", ".template-spec/design/preview.css", ".template-spec/design/preview.js", ".template-spec/design/preview-dark.html",
13
+ ".template-spec/design/facts/antdv-next", ".template-spec/user-guide/设备借用贯穿案例.md",
14
+ ".template-spec/design/design-system-sync.yaml",
15
15
  ];
16
16
 
17
17
  function readDistributionRegistry(templateRoot) {
18
- const registry = fs.readFileSync(path.join(templateRoot, "docs/agents/yss-skill-registry.yaml"), "utf8");
18
+ const registry = fs.readFileSync(path.join(templateRoot, ".template-spec/agents/yss-skill-registry.yaml"), "utf8");
19
19
  const match = registry.match(/^instance_distribution:\n([\s\S]*?)(?=^[^\s#][^\n]*:\s*$)/m);
20
20
  if (!match) throw new Error("Skill 注册表缺少 instance_distribution");
21
21
  const initial = match[1].match(/^ initial_skills: \[([^\]]+)\]/m);
@@ -50,7 +50,7 @@ function isIncludedInstancePath(relativePath, distribution) {
50
50
  if (relativePath === ".cursorrules" && !distribution.runtimes.includes("cursor")) return false;
51
51
  if (OMIT_INSTANCE_PATHS.some((excluded) => relativePath === excluded || relativePath.startsWith(`${excluded}/`))) return false;
52
52
  if (distribution.assetProfile === ASSET_PROFILE &&
53
- (relativePath.startsWith("docs/") || relativePath.startsWith("scripts/") || relativePath.startsWith(".vscode/"))) {
53
+ (relativePath.startsWith(".template-spec/") || relativePath.startsWith("scripts/") || relativePath.startsWith(".vscode/"))) {
54
54
  return distribution.assetPaths.has(relativePath) ||
55
55
  [...distribution.assetPaths].some((ref) => ref.startsWith(`${relativePath}/`));
56
56
  }
@@ -103,7 +103,7 @@ function renderInstanceSkillSupplyChain(sourceText) {
103
103
  function renderInstanceDesignSkillFile(sourceText) {
104
104
  return sourceText
105
105
  .replaceAll("node .template-source/tooling/node/scripts/design-md.mjs", "scripts/design-md")
106
- .replace("运行前先更新 `docs/design/design-system-sync.yaml` 的规范源摘要。", "项目实例无需模板间的 design-system-sync 摘要。")
106
+ .replace("运行前先更新 `.template-spec/design/design-system-sync.yaml` 的规范源摘要。", "项目实例无需模板间的 design-system-sync 摘要。")
107
107
  .replace("修改根 DESIGN.md → 更新 design-system-sync.yaml 摘要 →", "修改根 DESIGN.md →");
108
108
  }
109
109
 
@@ -147,22 +147,22 @@ function renderTemplateFile(relativePath, content, variables) {
147
147
  if (relativePath === "skills-lock.json") return selectedSkillLock(content, distribution);
148
148
  if (relativePath === "scripts/lib/skill-supply-chain.mjs" && distribution.mode === "selected") return renderInstanceSkillSupplyChain(content);
149
149
  if (distribution.mode === "selected" && /^\.(agents|codex|cursor|pi)\/skills\/yss-design-system\/(SKILL\.md|references\/data-quality-theme\.md)$/.test(relativePath)) return renderInstanceDesignSkillFile(content);
150
- if (relativePath === "docs/engineering/backend-platforms.json" && distribution.mode === "selected") {
150
+ if (relativePath === ".template-spec/engineering/backend-platforms.json" && distribution.mode === "selected") {
151
151
  return content.replaceAll(".template-source/evidence/maintenance/2026-09-18-yss-backend-components/aliyun-artifact-resolution.json", "docs/engineering/evidence/aliyun-artifact-resolution.json");
152
152
  }
153
- if (relativePath === "docs/agents/backend-architecture-profiles.md" && distribution.mode === "selected") {
153
+ if (relativePath === ".template-spec/agents/backend-architecture-profiles.md" && distribution.mode === "selected") {
154
154
  return content.replace(/;依据见 `\.template-source\/evidence\/maintenance\/2026-09-12-existing-project-delivery\/maven-adapters-04\.json`/, ";适配验证证据保留在模板源,项目实例须对自身工程重新验证");
155
155
  }
156
- if (relativePath === "docs/user-guide/用户手册.md" && distribution.mode === "selected") {
156
+ if (relativePath === ".template-spec/user-guide/用户手册.md" && distribution.mode === "selected") {
157
157
  if (distribution.assetProfile !== ASSET_PROFILE) {
158
158
  return `# ${variables.projectName} 用户手册\n\n本仓是 \`project-instance\`,用于 ${variables.businessDomain} 的研发资产。先阅读根 [AGENTS.md](../../AGENTS.md)、[CONTEXT.md](../../CONTEXT.md) 与 [生命周期资产索引](../process/lifecycle-artifact-map.md)。\n\n阶段派发前,由 Agent 运行 \`create-yss-spec skills ensure <skill-id...> --plan\` 核对依赖,再运行 \`--apply\` 安装。旧实例继续沿用既有文件分发范围;增加平台使用 \`create-yss-spec skills runtime add <codex|cursor|pi> --plan/--apply\`。CLI 快照必须与实例记录的模板提交一致;升级 CLI 后先运行 \`create-yss-spec sync\`。\n\n项目校验运行 \`scripts/verify-project-instance\`。\n`;
159
159
  }
160
160
  return `# ${variables.projectName} 用户手册\n\n本仓是 \`project-instance\`,用于 ${variables.businessDomain} 的研发资产。先阅读根 [AGENTS.md](../../AGENTS.md)、[CONTEXT.md](../../CONTEXT.md) 与 [生命周期资产索引](../process/lifecycle-artifact-map.md)。\n\n初始化安装分诊与 Plan 入口资产、三项入口 Skill 与所选 Agent 平台。进入后续阶段前,运行 \`create-yss-spec assets ensure <stage-id> --plan\` 核对文件,再运行 \`--apply\` 原子安装;专项 Skill 使用 \`create-yss-spec skills ensure <skill-id...> --plan/--apply\`,会补齐该 Skill 引用的实例文件。增加平台使用 \`create-yss-spec skills runtime add <codex|cursor|pi> --plan/--apply\`。CLI 快照必须与实例记录的模板提交一致;升级 CLI 后先运行 \`create-yss-spec sync\`。\n\n项目校验运行 \`scripts/verify-project-instance\`;实例 CI 应执行该命令和项目实际的构建、测试。\n`;
161
161
  }
162
- if (distribution.mode === "selected" && relativePath === "docs/design/README.md") {
162
+ if (distribution.mode === "selected" && relativePath === ".template-spec/design/README.md") {
163
163
  return content.replace(/^.*design-system-sync\.yaml.*\n/m, "");
164
164
  }
165
- if (distribution.mode === "selected" && relativePath.startsWith("docs/user-guide/") && relativePath.endsWith(".md")) {
165
+ if (distribution.mode === "selected" && relativePath.startsWith(".template-spec/user-guide/") && relativePath.endsWith(".md")) {
166
166
  return content.replaceAll("[设备借用贯穿案例](设备借用贯穿案例.md)", "[项目用户手册](用户手册.md)")
167
167
  .replaceAll("本仓是 `template-source`", "模板源是 `template-source`");
168
168
  }
@@ -186,10 +186,10 @@ function renderTemplateFile(relativePath, content, variables) {
186
186
  );
187
187
  if (distribution.mode !== "selected") return rendered;
188
188
  const base = rendered.replace(/## 4\. \`template-source\` 模板维护路由[\s\S]*?(?=## 5\.)/, "")
189
- .replace(/\| 影响面、\`not-applicable\`、模板维护强度 \|[^\n]*\n/, "| 影响面与 `not-applicable` | `docs/process/harness-process-tailoring.md` |\n");
189
+ .replace(/\| 影响面、\`not-applicable\`、模板维护强度 \|[^\n]*\n/, "| 影响面与 `not-applicable` | `.template-spec/process/harness-process-tailoring.md` |\n");
190
190
  const guidance = distribution.assetProfile === ASSET_PROFILE
191
- ? "## 按需阶段资产与 Skill\n\n进入后续生命周期阶段前,运行 `create-yss-spec assets ensure <stage-id> --plan` 查看完整依赖,核对后运行 `--apply`。专项任务根据 docs/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。缺少阶段资产时先补装,不以缺文件推定门禁不适用。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n"
192
- : "## 按需 Skill\n\n此实例继续沿用原文件分发范围。阶段派发或专项任务开始前,根据 docs/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n";
191
+ ? "## 按需阶段资产与 Skill\n\n进入后续生命周期阶段前,运行 `create-yss-spec assets ensure <stage-id> --plan` 查看完整依赖,核对后运行 `--apply`。专项任务根据 .template-spec/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。缺少阶段资产时先补装,不以缺文件推定门禁不适用。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n"
192
+ : "## 按需 Skill\n\n此实例继续沿用原文件分发范围。阶段派发或专项任务开始前,根据 .template-spec/agents/yss-skill-registry.yaml 选定 Skill,运行 `create-yss-spec skills ensure <skill-id...> --plan`,核对后运行 `--apply`。若 CLI 快照与实例模板提交不一致,先运行 `create-yss-spec sync`。\n";
193
193
  return `${base}\n${guidance}`;
194
194
  }
195
195
 
@@ -197,7 +197,7 @@ function renderTemplateFile(relativePath, content, variables) {
197
197
  const assetGuidance = distribution.assetProfile === ASSET_PROFILE
198
198
  ? "后续阶段先运行 `create-yss-spec assets ensure <stage-id> --plan` 核对依赖,再运行 `--apply`;专项 Skill 使用 `create-yss-spec skills ensure <skill-id> --plan/--apply`。"
199
199
  : "专项 Skill 使用 `create-yss-spec skills ensure <skill-id> --plan/--apply`。";
200
- return `# ${variables.projectName}\n\n本仓库用于管理 ${variables.businessDomain} 的研发资产。\n\n- 默认 Issue Tracker:${variables.issueTracker}\n- Agent 平台:${distribution.mode === "selected" ? distribution.runtimes.join(", ") : "legacy-all"}\n- 协作入口:[AGENTS.md](./AGENTS.md)\n- 业务词汇:[CONTEXT.md](./CONTEXT.md)\n- 用户指南:[docs/user-guide/用户手册.md](./docs/user-guide/用户手册.md)\n\n项目校验:\`scripts/verify-project-instance\`。${assetGuidance}\n`;
200
+ return `# ${variables.projectName}\n\n本仓库用于管理 ${variables.businessDomain} 的研发资产。\n\n- 默认 Issue Tracker:${variables.issueTracker}\n- Agent 平台:${distribution.mode === "selected" ? distribution.runtimes.join(", ") : "legacy-all"}\n- 协作入口:[AGENTS.md](./AGENTS.md)\n- 业务词汇:[CONTEXT.md](./CONTEXT.md)\n- 用户指南:[.template-spec/user-guide/用户手册.md](./.template-spec/user-guide/用户手册.md)\n\n项目校验:\`scripts/verify-project-instance\`。${assetGuidance}\n`;
201
201
  }
202
202
 
203
203
  if (relativePath === ".gitignore") return extractManagedGitignoreBlock(content);