create-yss-spec 3.4.10 → 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 (642) hide show
  1. package/README.md +8 -4
  2. package/package.json +1 -1
  3. package/src/api/_sync-service.js +141 -23
  4. package/src/cli/args.js +3 -0
  5. package/src/cli/help.js +14 -2
  6. package/src/cli/index.js +3 -0
  7. package/src/cli/prompts.js +5 -1
  8. package/src/cli/router.js +2 -0
  9. package/src/commands/attach.js +21 -5
  10. package/src/commands/diff.js +1 -0
  11. package/src/commands/doctor.js +1 -0
  12. package/src/commands/init.js +4 -1
  13. package/src/commands/skills.js +253 -0
  14. package/src/commands/sync.js +4 -0
  15. package/src/family-identity.js +2 -2
  16. package/src/template/asset-runtime.js +228 -0
  17. package/src/template/attach-planner.js +1 -1
  18. package/src/template/distribution-runtime.js +165 -0
  19. package/src/template/instance-runtime.js +76 -29
  20. package/src/template/layout-migration.js +160 -0
  21. package/src/template/migration-runtime.js +2 -2
  22. package/src/template/ownership-policy.js +17 -1
  23. package/src/template/prune-planner.js +6 -1
  24. package/src/template/sync-planner.js +4 -1
  25. package/src/template/verification-runtime.js +56 -1
  26. package/src/validation/metadata.js +24 -1
  27. package/template/.agents/rules/yss-ai-skills.md +1 -1
  28. package/template/.agents/skills/.strategic-design-skills-manifest.json +7 -8
  29. package/template/.agents/skills/.yss-skills-manifest.json +2 -2
  30. package/template/.agents/skills/alibaba-java-code-style/SKILL.md +1 -1
  31. package/template/.agents/skills/code-review/SKILL.md +6 -6
  32. package/template/.agents/skills/code-review/references/yss-review-standards.md +1 -1
  33. package/template/.agents/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  34. package/template/.agents/skills/i-have-adhd/SKILL.md +1 -1
  35. package/template/.agents/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  36. package/template/.agents/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  37. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  38. package/template/.agents/skills/llm-wiki/references/discover.md +3 -3
  39. package/template/.agents/skills/prototype-review/SKILL.md +4 -4
  40. package/template/.agents/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  41. package/template/.agents/skills/triage/SKILL.md +1 -1
  42. package/template/.agents/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  43. package/template/.agents/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  44. package/template/.agents/skills/yss-backend-spec-review/SKILL.md +1 -1
  45. package/template/.agents/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  46. package/template/.agents/skills/yss-cache/SKILL.md +6 -5
  47. package/template/.agents/skills/yss-cache/references/annotations.md +3 -1
  48. package/template/.agents/skills/yss-cache/references/architecture.md +4 -2
  49. package/template/.agents/skills/yss-cache/references/configuration.md +6 -3
  50. package/template/.agents/skills/yss-cache/references/jetcache.md +21 -0
  51. package/template/.agents/skills/yss-cache/references/redis-fallback.md +5 -3
  52. package/template/.agents/skills/yss-cache/references/verification.md +10 -4
  53. package/template/.agents/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
  54. package/template/.agents/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  55. package/template/.agents/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  56. package/template/.agents/skills/yss-design-system/SKILL.md +10 -10
  57. package/template/.agents/skills/yss-design-system/references/design-qa-theme.md +3 -3
  58. package/template/.agents/skills/yss-design-system/references/design-system.md +3 -3
  59. package/template/.agents/skills/yss-distributed-id/SKILL.md +14 -58
  60. package/template/.agents/skills/yss-distributed-id/agents/openai.yaml +2 -2
  61. package/template/.agents/skills/yss-distributed-id/references/README.md +11 -47
  62. package/template/.agents/skills/yss-exception/SKILL.md +1 -1
  63. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  64. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  65. package/template/.agents/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  66. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  67. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  68. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  69. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  70. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  71. package/template/.agents/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  72. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  73. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  74. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  75. package/template/.agents/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  76. package/template/.agents/skills/yss-mybatis/SKILL.md +14 -2
  77. package/template/.agents/skills/yss-openapi-draft-review/SKILL.md +2 -2
  78. package/template/.agents/skills/yss-openapi-governance/SKILL.md +7 -7
  79. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +11 -11
  80. package/template/.agents/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  81. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
  82. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  83. package/template/.agents/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  84. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +11 -11
  85. package/template/.agents/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  86. package/template/.agents/skills/yss-prototype-stage/SKILL.md +9 -9
  87. package/template/.agents/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  88. package/template/.agents/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  89. package/template/.agents/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  90. package/template/.agents/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  91. package/template/.agents/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  92. package/template/.agents/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  93. package/template/.agents/skills/yss-repository/SKILL.md +3 -2
  94. package/template/.agents/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  95. package/template/.agents/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  96. package/template/.agents/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  97. package/template/.agents/skills/yss-research/SKILL.md +2 -2
  98. package/template/.agents/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  99. package/template/.agents/skills/yss-stage-decision/SKILL.md +5 -5
  100. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  101. package/template/.agents/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  102. package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
  103. package/template/.agents/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  104. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  105. package/template/.agents/skills/yss-technical-design/SKILL.md +6 -6
  106. package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  107. package/template/.agents/skills/yss-ui/SKILL.md +1 -1
  108. package/template/.agents/skills/yss-up-springboot3/SKILL.md +1 -1
  109. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  110. package/template/.agents/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  111. package/template/.codex/skills/alibaba-java-code-style/SKILL.md +1 -1
  112. package/template/.codex/skills/code-review/SKILL.md +6 -6
  113. package/template/.codex/skills/code-review/references/yss-review-standards.md +1 -1
  114. package/template/.codex/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  115. package/template/.codex/skills/i-have-adhd/SKILL.md +1 -1
  116. package/template/.codex/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  117. package/template/.codex/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  118. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  119. package/template/.codex/skills/llm-wiki/references/discover.md +3 -3
  120. package/template/.codex/skills/prototype-review/SKILL.md +4 -4
  121. package/template/.codex/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  122. package/template/.codex/skills/triage/SKILL.md +1 -1
  123. package/template/.codex/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  124. package/template/.codex/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  125. package/template/.codex/skills/yss-backend-spec-review/SKILL.md +1 -1
  126. package/template/.codex/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  127. package/template/.codex/skills/yss-cache/SKILL.md +6 -5
  128. package/template/.codex/skills/yss-cache/references/annotations.md +3 -1
  129. package/template/.codex/skills/yss-cache/references/architecture.md +4 -2
  130. package/template/.codex/skills/yss-cache/references/configuration.md +6 -3
  131. package/template/.codex/skills/yss-cache/references/jetcache.md +21 -0
  132. package/template/.codex/skills/yss-cache/references/redis-fallback.md +5 -3
  133. package/template/.codex/skills/yss-cache/references/verification.md +10 -4
  134. package/template/.codex/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
  135. package/template/.codex/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  136. package/template/.codex/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  137. package/template/.codex/skills/yss-design-system/SKILL.md +10 -10
  138. package/template/.codex/skills/yss-design-system/references/design-qa-theme.md +3 -3
  139. package/template/.codex/skills/yss-design-system/references/design-system.md +3 -3
  140. package/template/.codex/skills/yss-distributed-id/SKILL.md +14 -58
  141. package/template/.codex/skills/yss-distributed-id/agents/openai.yaml +2 -2
  142. package/template/.codex/skills/yss-distributed-id/references/README.md +11 -47
  143. package/template/.codex/skills/yss-exception/SKILL.md +1 -1
  144. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  145. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  146. package/template/.codex/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  147. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  148. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  149. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  150. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  151. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  152. package/template/.codex/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  153. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  154. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  155. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  156. package/template/.codex/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  157. package/template/.codex/skills/yss-mybatis/SKILL.md +14 -2
  158. package/template/.codex/skills/yss-openapi-draft-review/SKILL.md +2 -2
  159. package/template/.codex/skills/yss-openapi-governance/SKILL.md +7 -7
  160. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +11 -11
  161. package/template/.codex/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  162. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
  163. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  164. package/template/.codex/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  165. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +11 -11
  166. package/template/.codex/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  167. package/template/.codex/skills/yss-prototype-stage/SKILL.md +9 -9
  168. package/template/.codex/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  169. package/template/.codex/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  170. package/template/.codex/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  171. package/template/.codex/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  172. package/template/.codex/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  173. package/template/.codex/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  174. package/template/.codex/skills/yss-repository/SKILL.md +3 -2
  175. package/template/.codex/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  176. package/template/.codex/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  177. package/template/.codex/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  178. package/template/.codex/skills/yss-research/SKILL.md +2 -2
  179. package/template/.codex/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  180. package/template/.codex/skills/yss-stage-decision/SKILL.md +5 -5
  181. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  182. package/template/.codex/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  183. package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
  184. package/template/.codex/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  185. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  186. package/template/.codex/skills/yss-technical-design/SKILL.md +6 -6
  187. package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  188. package/template/.codex/skills/yss-ui/SKILL.md +1 -1
  189. package/template/.codex/skills/yss-up-springboot3/SKILL.md +1 -1
  190. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  191. package/template/.codex/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  192. package/template/.cursor/skills/alibaba-java-code-style/SKILL.md +1 -1
  193. package/template/.cursor/skills/code-review/SKILL.md +6 -6
  194. package/template/.cursor/skills/code-review/references/yss-review-standards.md +1 -1
  195. package/template/.cursor/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  196. package/template/.cursor/skills/i-have-adhd/SKILL.md +1 -1
  197. package/template/.cursor/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  198. package/template/.cursor/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  199. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  200. package/template/.cursor/skills/llm-wiki/references/discover.md +3 -3
  201. package/template/.cursor/skills/prototype-review/SKILL.md +4 -4
  202. package/template/.cursor/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  203. package/template/.cursor/skills/triage/SKILL.md +1 -1
  204. package/template/.cursor/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  205. package/template/.cursor/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  206. package/template/.cursor/skills/yss-backend-spec-review/SKILL.md +1 -1
  207. package/template/.cursor/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  208. package/template/.cursor/skills/yss-cache/SKILL.md +6 -5
  209. package/template/.cursor/skills/yss-cache/references/annotations.md +3 -1
  210. package/template/.cursor/skills/yss-cache/references/architecture.md +4 -2
  211. package/template/.cursor/skills/yss-cache/references/configuration.md +6 -3
  212. package/template/.cursor/skills/yss-cache/references/jetcache.md +21 -0
  213. package/template/.cursor/skills/yss-cache/references/redis-fallback.md +5 -3
  214. package/template/.cursor/skills/yss-cache/references/verification.md +10 -4
  215. package/template/.cursor/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
  216. package/template/.cursor/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  217. package/template/.cursor/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  218. package/template/.cursor/skills/yss-design-system/SKILL.md +10 -10
  219. package/template/.cursor/skills/yss-design-system/references/design-qa-theme.md +3 -3
  220. package/template/.cursor/skills/yss-design-system/references/design-system.md +3 -3
  221. package/template/.cursor/skills/yss-distributed-id/SKILL.md +14 -58
  222. package/template/.cursor/skills/yss-distributed-id/agents/openai.yaml +2 -2
  223. package/template/.cursor/skills/yss-distributed-id/references/README.md +11 -47
  224. package/template/.cursor/skills/yss-exception/SKILL.md +1 -1
  225. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  226. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  227. package/template/.cursor/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  228. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  229. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  230. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  231. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  232. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  233. package/template/.cursor/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  234. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  235. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  236. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  237. package/template/.cursor/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  238. package/template/.cursor/skills/yss-mybatis/SKILL.md +14 -2
  239. package/template/.cursor/skills/yss-openapi-draft-review/SKILL.md +2 -2
  240. package/template/.cursor/skills/yss-openapi-governance/SKILL.md +7 -7
  241. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +11 -11
  242. package/template/.cursor/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  243. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
  244. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  245. package/template/.cursor/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  246. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +11 -11
  247. package/template/.cursor/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  248. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +9 -9
  249. package/template/.cursor/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  250. package/template/.cursor/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  251. package/template/.cursor/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  252. package/template/.cursor/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  253. package/template/.cursor/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  254. package/template/.cursor/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  255. package/template/.cursor/skills/yss-repository/SKILL.md +3 -2
  256. package/template/.cursor/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  257. package/template/.cursor/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  258. package/template/.cursor/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  259. package/template/.cursor/skills/yss-research/SKILL.md +2 -2
  260. package/template/.cursor/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  261. package/template/.cursor/skills/yss-stage-decision/SKILL.md +5 -5
  262. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  263. package/template/.cursor/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  264. package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
  265. package/template/.cursor/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  266. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  267. package/template/.cursor/skills/yss-technical-design/SKILL.md +6 -6
  268. package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  269. package/template/.cursor/skills/yss-ui/SKILL.md +1 -1
  270. package/template/.cursor/skills/yss-up-springboot3/SKILL.md +1 -1
  271. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  272. package/template/.cursor/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  273. package/template/.cursorrules +1 -1
  274. package/template/.pi/skills/alibaba-java-code-style/SKILL.md +1 -1
  275. package/template/.pi/skills/code-review/SKILL.md +6 -6
  276. package/template/.pi/skills/code-review/references/yss-review-standards.md +1 -1
  277. package/template/.pi/skills/cross-repo-implementation-routing/SKILL.md +2 -2
  278. package/template/.pi/skills/i-have-adhd/SKILL.md +1 -1
  279. package/template/.pi/skills/i-have-adhd/references/yss-adaptation.md +1 -1
  280. package/template/.pi/skills/i-have-adhd/tests/verify-integration.mjs +2 -2
  281. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  282. package/template/.pi/skills/llm-wiki/references/discover.md +3 -3
  283. package/template/.pi/skills/prototype-review/SKILL.md +4 -4
  284. package/template/.pi/skills/setup-matt-pocock-skills/SKILL.md +10 -10
  285. package/template/.pi/skills/triage/SKILL.md +1 -1
  286. package/template/.pi/skills/yss-application/references/profiles/layered-mvc-service.md +1 -1
  287. package/template/.pi/skills/yss-application/references/profiles/mvc-data-analysis-v1.md +1 -1
  288. package/template/.pi/skills/yss-backend-spec-review/SKILL.md +1 -1
  289. package/template/.pi/skills/yss-backend-spec-review/references/check-inputs.md +1 -1
  290. package/template/.pi/skills/yss-cache/SKILL.md +6 -5
  291. package/template/.pi/skills/yss-cache/references/annotations.md +3 -1
  292. package/template/.pi/skills/yss-cache/references/architecture.md +4 -2
  293. package/template/.pi/skills/yss-cache/references/configuration.md +6 -3
  294. package/template/.pi/skills/yss-cache/references/jetcache.md +21 -0
  295. package/template/.pi/skills/yss-cache/references/redis-fallback.md +5 -3
  296. package/template/.pi/skills/yss-cache/references/verification.md +10 -4
  297. package/template/.pi/skills/yss-cache/scripts/verify-cache-component.sh +26 -20
  298. package/template/.pi/skills/yss-ddd-scaffold-generator/SKILL.md +2 -2
  299. package/template/.pi/skills/yss-ddd-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  300. package/template/.pi/skills/yss-design-system/SKILL.md +10 -10
  301. package/template/.pi/skills/yss-design-system/references/design-qa-theme.md +3 -3
  302. package/template/.pi/skills/yss-design-system/references/design-system.md +3 -3
  303. package/template/.pi/skills/yss-distributed-id/SKILL.md +14 -58
  304. package/template/.pi/skills/yss-distributed-id/agents/openai.yaml +2 -2
  305. package/template/.pi/skills/yss-distributed-id/references/README.md +11 -47
  306. package/template/.pi/skills/yss-exception/SKILL.md +1 -1
  307. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +2 -2
  308. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/generate_scaffold.mjs +1 -1
  309. package/template/.pi/skills/yss-frontend-scaffold-generator/scripts/refresh_baseline.mjs +2 -2
  310. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +9 -9
  311. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +1 -1
  312. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +9 -9
  313. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract-v2.md +3 -3
  314. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +1 -1
  315. package/template/.pi/skills/yss-implementation-contract-compiler/references/strategic-handoff-routing.md +1 -1
  316. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/SKILL.md +2 -2
  317. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/data-analysis-profile.mjs +5 -5
  318. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/generate_scaffold.mjs +2 -2
  319. package/template/.pi/skills/yss-layered-mvc-scaffold-generator/scripts/scaffold-generator.test.mjs +42 -0
  320. package/template/.pi/skills/yss-mybatis/SKILL.md +14 -2
  321. package/template/.pi/skills/yss-openapi-draft-review/SKILL.md +2 -2
  322. package/template/.pi/skills/yss-openapi-governance/SKILL.md +7 -7
  323. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +11 -11
  324. package/template/.pi/skills/yss-product-lifecycle/references/matt-yss-adapter.md +5 -5
  325. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +70 -47
  326. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +22 -14
  327. package/template/.pi/skills/yss-product-lifecycle/references/request-triage.md +2 -0
  328. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +11 -11
  329. package/template/.pi/skills/yss-product-lifecycle/references/user-decisions.md +2 -2
  330. package/template/.pi/skills/yss-prototype-stage/SKILL.md +9 -9
  331. package/template/.pi/skills/yss-prototype-stage/references/existing-ui-entry.md +1 -1
  332. package/template/.pi/skills/yss-prototype-stage/scripts/build-antd-prototype.mjs +1 -1
  333. package/template/.pi/skills/yss-prototype-stage/scripts/offline-html.mjs +3 -3
  334. package/template/.pi/skills/yss-prototype-stage/tests/browser-smoke.mjs +2 -2
  335. package/template/.pi/skills/yss-prototype-stage/tests/run-scenarios.mjs +4 -4
  336. package/template/.pi/skills/yss-prototype-stage/tests/workbench-smoke.mjs +1 -1
  337. package/template/.pi/skills/yss-repository/SKILL.md +3 -2
  338. package/template/.pi/skills/yss-repository/references/profiles/layered-mvc-service.md +1 -1
  339. package/template/.pi/skills/yss-repository/references/profiles/mvc-data-analysis-v1.md +1 -1
  340. package/template/.pi/skills/yss-repository/tests/profile-routing.test.mjs +2 -2
  341. package/template/.pi/skills/yss-research/SKILL.md +2 -2
  342. package/template/.pi/skills/yss-skill-source-index-refresh/references/backend-component-platform-compatibility.md +1 -1
  343. package/template/.pi/skills/yss-stage-decision/SKILL.md +5 -5
  344. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +1 -1
  345. package/template/.pi/skills/yss-stage-decision/references/strategic-handoff-routing.md +1 -1
  346. package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
  347. package/template/.pi/skills/yss-tactical-design/references/strategic-handoff-routing.md +1 -1
  348. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +1 -1
  349. package/template/.pi/skills/yss-technical-design/SKILL.md +6 -6
  350. package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +1 -1
  351. package/template/.pi/skills/yss-ui/SKILL.md +1 -1
  352. package/template/.pi/skills/yss-up-springboot3/SKILL.md +1 -1
  353. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  354. package/template/.pi/skills/yss-web-controller/references/profiles/layered-mvc-service.md +1 -1
  355. package/template/{docs → .template-spec}/adr/README.md +1 -1
  356. package/template/{docs → .template-spec}/agents/README.md +1 -1
  357. package/template/{docs → .template-spec}/agents/backend-architecture-profiles.md +2 -2
  358. package/template/{docs → .template-spec}/agents/digital-human-roles.md +6 -6
  359. package/template/{docs → .template-spec}/agents/digital-human-roles.yaml +5 -5
  360. package/template/{docs → .template-spec}/agents/gitlab-workflow-skills.md +2 -2
  361. package/template/{docs → .template-spec}/agents/issue-tracker.md +1 -1
  362. package/template/{docs → .template-spec}/agents/skill-migrations.md +6 -2
  363. package/template/{docs → .template-spec}/agents/triage-labels.md +1 -1
  364. package/template/{docs → .template-spec}/agents/yss-skill-registry.yaml +9 -8
  365. package/template/{docs → .template-spec}/architecture/README.md +3 -3
  366. package/template/{docs → .template-spec}/architecture/templates/tech-design-template.md +3 -1
  367. package/template/{docs → .template-spec}/design/README.md +12 -12
  368. package/template/{docs → .template-spec}/design/design.md +20 -20
  369. package/template/{docs/design/templates/interaction-spec-template.md → .template-spec/design/templates/examples/model-publishing-interaction.example.md} +6 -4
  370. package/template/{docs/design/templates/state-matrix-template.md → .template-spec/design/templates/examples/model-publishing-state-matrix.example.md} +3 -1
  371. package/template/.template-spec/design/templates/interaction-spec-template.md +61 -0
  372. package/template/{docs → .template-spec}/design/templates/product-overview-design-template.md +11 -11
  373. package/template/{docs → .template-spec}/design/templates/prototype-evidence-template.yaml +4 -4
  374. package/template/{docs → .template-spec}/design/templates/prototype-review-checklist.md +1 -1
  375. package/template/.template-spec/design/templates/state-matrix-template.md +29 -0
  376. package/template/.template-spec/design/tokens/.design-md-projection.json +13 -0
  377. package/template/{docs → .template-spec}/engineering/backend-platforms.md +1 -1
  378. package/template/{docs → .template-spec}/plan/entry-review.md +8 -4
  379. package/template/{docs → .template-spec}/plan/templates/plan-template.md +1 -1
  380. package/template/{docs → .template-spec}/process/contract-reading.md +1 -1
  381. package/template/{docs → .template-spec}/process/lifecycle-artifact-map.md +5 -5
  382. package/template/.template-spec/process/lifecycle-registry-baseline.json +253 -0
  383. package/template/{docs → .template-spec}/process/lifecycle-registry.yaml +19 -12
  384. package/template/{docs → .template-spec}/process/plan-migration.md +1 -1
  385. package/template/{docs → .template-spec}/process/schemas/digital-human-task-package.schema.json +14 -1
  386. package/template/{docs → .template-spec}/process/schemas/lifecycle-checkpoint.schema.json +15 -0
  387. package/template/{docs → .template-spec}/process/schemas/lifecycle-registry.schema.json +1 -1
  388. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v3.schema.json +1 -1
  389. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v4.schema.json +1 -1
  390. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff-v5.schema.json +1 -1
  391. package/template/{docs → .template-spec}/process/schemas/strategic-design-handoff.schema.json +1 -1
  392. package/template/{docs → .template-spec}/process/stage-tracking.md +1 -1
  393. package/template/{docs → .template-spec}/process/subagent-collaboration.md +2 -2
  394. package/template/{docs → .template-spec}/templates/build-architecture-checklist-template.md +2 -2
  395. package/template/{docs → .template-spec}/templates/digital-human-runtime-profile-template.md +2 -2
  396. package/template/{docs → .template-spec}/templates/grok-bot-profile-template.md +1 -1
  397. package/template/{docs → .template-spec}/templates/local-parent-ticket-template.md +1 -1
  398. package/template/.template-spec/templates/release-note-template.md +29 -0
  399. package/template/.template-spec/templates/retro-report-template.md +24 -0
  400. package/template/{docs → .template-spec}/templates/subagent-task-package-template.md +3 -3
  401. package/template/.template-spec/templates/verification-record-template.md +64 -0
  402. package/template/{docs → .template-spec}/templates/vertical-slice-ticket-template.md +5 -10
  403. package/template/{docs → .template-spec}/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +1 -1
  404. 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
  405. package/template/AGENTS.md +12 -12
  406. package/template/CONTEXT.md +3 -3
  407. package/template/README.md +22 -25
  408. package/template/scripts/backend-delivery +1 -1
  409. package/template/scripts/design-md +2 -0
  410. package/template/scripts/lib/api-contract-decision.mjs +1 -1
  411. package/template/scripts/lib/approved-execution-context.mjs +5 -5
  412. package/template/scripts/lib/backend-delivery.mjs +4 -4
  413. package/template/scripts/lib/backend-platform.mjs +1 -1
  414. package/template/scripts/lib/backend-review.mjs +1 -1
  415. package/template/scripts/lib/backend-scaffold-prerequisites.mjs +1 -1
  416. package/template/scripts/lib/backend-standards-coverage.mjs +2 -2
  417. package/template/scripts/lib/context-reconciliation.mjs +1 -1
  418. package/template/scripts/lib/contract-views.mjs +9 -9
  419. package/template/scripts/lib/delivery-preflight.mjs +6 -6
  420. package/template/scripts/lib/design-md.mjs +230 -0
  421. package/template/scripts/lib/digital-human-roles.mjs +2 -2
  422. package/template/scripts/lib/existing-backend-architecture.mjs +1 -1
  423. package/template/scripts/lib/existing-ui-baseline.mjs +1 -1
  424. package/template/scripts/lib/frontend-delivery.mjs +2 -2
  425. package/template/scripts/lib/governance-layout.mjs +74 -0
  426. package/template/scripts/lib/harness-execution-scope.mjs +2 -2
  427. package/template/scripts/lib/lifecycle-context-query.mjs +11 -3
  428. package/template/scripts/lib/lifecycle-registry.mjs +46 -7
  429. package/template/scripts/lib/lifecycle-status.mjs +111 -0
  430. package/template/scripts/lib/lifecycle-transition.mjs +71 -10
  431. package/template/scripts/lib/openapi-draft-validation.mjs +1 -1
  432. package/template/scripts/lib/plan-spec-entry-view.mjs +48 -0
  433. package/template/scripts/lib/plan-spec-entry.mjs +3 -3
  434. package/template/scripts/lib/skill-registry.mjs +16 -9
  435. package/template/scripts/lib/skill-supply-chain.mjs +34 -15
  436. package/template/scripts/lib/slice-contract-preparation.mjs +3 -3
  437. package/template/scripts/lib/slice-contract.mjs +1 -1
  438. package/template/scripts/lib/slice-repositories.mjs +1 -1
  439. package/template/scripts/lib/slice-task-package.mjs +3 -3
  440. package/template/scripts/lib/stage-tracking-migration.mjs +2 -2
  441. package/template/scripts/lib/stage-tracking.mjs +5 -5
  442. package/template/scripts/lib/strategic-feedback.mjs +2 -2
  443. package/template/scripts/lib/strategic-handoff-routing.mjs +2 -2
  444. package/template/scripts/lib/strategic-handoff.mjs +15 -15
  445. package/template/scripts/lib/task-package-schema.mjs +2 -2
  446. package/template/scripts/lib/task-package.mjs +1 -1
  447. package/template/scripts/lib/technical-design-boundary.mjs +1 -1
  448. package/template/scripts/lib/user-decision.mjs +2 -1
  449. package/template/scripts/lifecycle-status +14 -0
  450. package/template/scripts/plan-spec-entry +21 -0
  451. package/template/scripts/strategic-consumer-entry +1 -1
  452. package/template/scripts/strategic-handoff +1 -1
  453. package/template/scripts/verify-frontend-implementation-evidence +1 -1
  454. package/template/scripts/verify-governance-layout +15 -0
  455. package/template/scripts/verify-lifecycle-checkpoint +1 -1
  456. package/template/scripts/verify-project-instance +13 -10
  457. package/template/scripts/verify-scaffold-architecture-decisions +1 -1
  458. package/template/scripts/verify-strategic-context-import +3 -3
  459. package/template/skills-lock.json +80 -95
  460. package/template.manifest.json +30 -15
  461. package/template.snapshot.json +5 -5
  462. package/template/.agents/skills/grill-me/SKILL.md +0 -7
  463. package/template/.agents/skills/grill-me/agents/openai.yaml +0 -5
  464. package/template/.agents/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
  465. package/template/.agents/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
  466. package/template/.agents/skills/yss-distributed-id/assets/LeafConf.java +0 -36
  467. package/template/.codex/skills/grill-me/SKILL.md +0 -7
  468. package/template/.codex/skills/grill-me/agents/openai.yaml +0 -5
  469. package/template/.codex/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
  470. package/template/.codex/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
  471. package/template/.codex/skills/yss-distributed-id/assets/LeafConf.java +0 -36
  472. package/template/.cursor/skills/grill-me/SKILL.md +0 -7
  473. package/template/.cursor/skills/grill-me/agents/openai.yaml +0 -5
  474. package/template/.cursor/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
  475. package/template/.cursor/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
  476. package/template/.cursor/skills/yss-distributed-id/assets/LeafConf.java +0 -36
  477. package/template/.pi/skills/grill-me/SKILL.md +0 -7
  478. package/template/.pi/skills/grill-me/agents/openai.yaml +0 -5
  479. package/template/.pi/skills/yss-distributed-id/assets/AutoIdInterceptor.java +0 -246
  480. package/template/.pi/skills/yss-distributed-id/assets/EnableDistributedId.java +0 -25
  481. package/template/.pi/skills/yss-distributed-id/assets/LeafConf.java +0 -36
  482. package/template/docs/agents/archify-integration.md +0 -19
  483. package/template/docs/agents/yss-plugin-dependency-contract.md +0 -45
  484. package/template/docs/api/.gitkeep +0 -0
  485. package/template/docs/api/specs/.gitkeep +0 -0
  486. package/template/docs/architecture/.gitkeep +0 -0
  487. package/template/docs/design/design-system-sync.yaml +0 -13
  488. package/template/docs/design/facts/antdv-next/1.5.2/cli-help.txt +0 -38
  489. package/template/docs/design/facts/antdv-next/1.5.2/component-list.json +0 -434
  490. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/demo-basic.json +0 -7
  491. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/info.json +0 -246
  492. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/semantic.json +0 -40
  493. package/template/docs/design/facts/antdv-next/1.5.2/components/Alert/token.json +0 -32
  494. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/demo-basic.json +0 -7
  495. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/info.json +0 -190
  496. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/semantic.json +0 -20
  497. package/template/docs/design/facts/antdv-next/1.5.2/components/Button/token.json +0 -256
  498. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/demo-basic.json +0 -7
  499. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/info.json +0 -460
  500. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/semantic.json +0 -70
  501. package/template/docs/design/facts/antdv-next/1.5.2/components/Input/token.json +0 -123
  502. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/demo-basic.json +0 -7
  503. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/info.json +0 -646
  504. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/semantic.json +0 -50
  505. package/template/docs/design/facts/antdv-next/1.5.2/components/Modal/token.json +0 -130
  506. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/demo-basic.json +0 -7
  507. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/info.json +0 -640
  508. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/semantic.json +0 -70
  509. package/template/docs/design/facts/antdv-next/1.5.2/components/Select/token.json +0 -172
  510. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/demo-basic.json +0 -7
  511. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/info.json +0 -1010
  512. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/semantic.json +0 -70
  513. package/template/docs/design/facts/antdv-next/1.5.2/components/Table/token.json +0 -263
  514. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/demo-basic.json +0 -7
  515. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/info.json +0 -321
  516. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/semantic.json +0 -25
  517. package/template/docs/design/facts/antdv-next/1.5.2/components/Tag/token.json +0 -25
  518. package/template/docs/design/facts/antdv-next/1.5.2/design-md.json +0 -3
  519. package/template/docs/design/facts/antdv-next/1.5.2/manifest.json +0 -215
  520. package/template/docs/design/facts/antdv-next/1.5.2/resolution-probe.json +0 -5
  521. package/template/docs/design/preview-dark.html +0 -178
  522. package/template/docs/design/preview.css +0 -730
  523. package/template/docs/design/preview.html +0 -178
  524. package/template/docs/design/preview.js +0 -71
  525. package/template/docs/design/prototypes/.gitkeep +0 -1
  526. package/template/docs/design/tokens/.design-md-projection.json +0 -13
  527. package/template/docs/implementation/.gitkeep +0 -1
  528. package/template/docs/plan/IDEATION.md +0 -96
  529. package/template/docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md +0 -13
  530. package/template/docs/process/PDCA-SCRUM.md +0 -10
  531. package/template/docs/process/github-workflows.md +0 -52
  532. package/template/docs/process/harness-executive-blueprint.md +0 -10
  533. package/template/docs/releases/.gitkeep +0 -1
  534. package/template/docs/requirements/README.md +0 -85
  535. package/template/docs/requirements/tickets/.gitkeep +0 -1
  536. package/template/docs/templates/agent-brief-template.md +0 -46
  537. package/template/docs/templates/architecture-proposal-template.md +0 -18
  538. package/template/docs/templates/implementation-plan-template.md +0 -16
  539. package/template/docs/templates/implementation-routing-template.md +0 -350
  540. package/template/docs/templates/release-note-template.md +0 -14
  541. package/template/docs/templates/requirement-freeze-template.md +0 -63
  542. package/template/docs/templates/retro-report-template.md +0 -16
  543. package/template/docs/templates/risk-register-template.md +0 -11
  544. package/template/docs/templates/user-story-template.md +0 -20
  545. package/template/docs/templates/verification-record-template.md +0 -53
  546. package/template/docs/testing/README.md +0 -110
  547. /package/template/{docs → .template-spec}/agents/domain.md +0 -0
  548. /package/template/{docs → .template-spec}/api/templates/openapi-draft-review-checklist.md +0 -0
  549. /package/template/{docs → .template-spec}/api/templates/openapi-draft-validation-record-template.yaml +0 -0
  550. /package/template/{docs → .template-spec}/api/templates/openapi-freeze-record-template.md +0 -0
  551. /package/template/{docs → .template-spec}/api/templates/openapi-json-export-record-template.md +0 -0
  552. /package/template/{docs → .template-spec}/architecture/templates/architecture-deepening-template.md +0 -0
  553. /package/template/{docs → .template-spec}/architecture/templates/architecture-review-checklist.md +0 -0
  554. /package/template/{docs → .template-spec}/architecture/templates/business-architecture-template.md +0 -0
  555. /package/template/{docs → .template-spec}/architecture/templates/data-architecture-template.md +0 -0
  556. /package/template/{docs → .template-spec}/architecture/templates/engineering-baseline-review-template.md +0 -0
  557. /package/template/{docs → .template-spec}/architecture/templates/functional-architecture-template.md +0 -0
  558. /package/template/{docs → .template-spec}/architecture/templates/system-overview-design-template.md +0 -0
  559. /package/template/{docs → .template-spec}/design/diagrams/README.md +0 -0
  560. /package/template/{docs → .template-spec}/design/schemas/visual-baseline.schema.json +0 -0
  561. /package/template/{docs → .template-spec}/design/templates/prototype-confirmation-template.md +0 -0
  562. /package/template/{docs → .template-spec}/design/templates/visual-baseline-template.yaml +0 -0
  563. /package/template/{docs → .template-spec}/design/tokens/theme.json +0 -0
  564. /package/template/{docs → .template-spec}/design/tokens/tokens.compact.json +0 -0
  565. /package/template/{docs → .template-spec}/design/tokens/tokens.dark.json +0 -0
  566. /package/template/{docs → .template-spec}/design/tokens/tokens.default.json +0 -0
  567. /package/template/{docs → .template-spec}/design/tokens/variables.css +0 -0
  568. /package/template/{docs → .template-spec}/design/tokens/variables.dark.css +0 -0
  569. /package/template/{docs → .template-spec}/engineering/backend-platforms.json +0 -0
  570. /package/template/{docs → .template-spec}/plan/README.md +0 -0
  571. /package/template/{docs → .template-spec}/plan/templates/competitive-analysis-template.md +0 -0
  572. /package/template/{docs → .template-spec}/plan/templates/competitive-matrix-template.md +0 -0
  573. /package/template/{docs → .template-spec}/plan/templates/market-analysis-template.md +0 -0
  574. /package/template/{docs → .template-spec}/plan/templates/user-pain-points-template.md +0 -0
  575. /package/template/{docs → .template-spec}/process/delivery-preflight.md +0 -0
  576. /package/template/{docs → .template-spec}/process/document-writing.md +0 -0
  577. /package/template/{docs → .template-spec}/process/existing-backend-architecture.md +0 -0
  578. /package/template/{docs → .template-spec}/process/existing-ui-baseline.md +0 -0
  579. /package/template/{docs → .template-spec}/process/frontend-backend-delivery.md +0 -0
  580. /package/template/{docs → .template-spec}/process/harness-process-tailoring.md +0 -0
  581. /package/template/{docs → .template-spec}/process/implementation-repo-integration.md +0 -0
  582. /package/template/{docs/process/lifecycle-registry-baseline.json → .template-spec/process/lifecycle-registry-baseline-v1.json} +0 -0
  583. /package/template/{docs → .template-spec}/process/schemas/api-contract-decision-v2.schema.json +0 -0
  584. /package/template/{docs → .template-spec}/process/schemas/api-contract-decision.schema.json +0 -0
  585. /package/template/{docs → .template-spec}/process/schemas/backend-architecture-identity.schema.json +0 -0
  586. /package/template/{docs → .template-spec}/process/schemas/backend-delivery-verification.schema.json +0 -0
  587. /package/template/{docs → .template-spec}/process/schemas/backend-delivery.schema.json +0 -0
  588. /package/template/{docs → .template-spec}/process/schemas/context-reconciliation.schema.json +0 -0
  589. /package/template/{docs → .template-spec}/process/schemas/data-architecture-decision.schema.json +0 -0
  590. /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-input.schema.json +0 -0
  591. /package/template/{docs → .template-spec}/process/schemas/delivery-preflight-result.schema.json +0 -0
  592. /package/template/{docs → .template-spec}/process/schemas/existing-ui-baseline.schema.json +0 -0
  593. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v1.schema.json +0 -0
  594. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance-v3.schema.json +0 -0
  595. /package/template/{docs → .template-spec}/process/schemas/frontend-delivery-acceptance.schema.json +0 -0
  596. /package/template/{docs → .template-spec}/process/schemas/frontend-implementation-evidence.schema.json +0 -0
  597. /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight-v2.schema.json +0 -0
  598. /package/template/{docs → .template-spec}/process/schemas/frontend-strategic-preflight.schema.json +0 -0
  599. /package/template/{docs → .template-spec}/process/schemas/implementation-repository-preparation-result.schema.json +0 -0
  600. /package/template/{docs → .template-spec}/process/schemas/openapi-draft-validation-record.schema.json +0 -0
  601. /package/template/{docs → .template-spec}/process/schemas/project-scaffold-contract.schema.json +0 -0
  602. /package/template/{docs → .template-spec}/process/schemas/review-bundle.schema.json +0 -0
  603. /package/template/{docs → .template-spec}/process/schemas/scaffold-architecture-decisions.schema.json +0 -0
  604. /package/template/{docs → .template-spec}/process/schemas/slice-implementation-contract-v3.schema.json +0 -0
  605. /package/template/{docs → .template-spec}/process/schemas/stage-tracking.schema.json +0 -0
  606. /package/template/{docs → .template-spec}/process/schemas/strategic-consumer-feedback.schema.json +0 -0
  607. /package/template/{docs → .template-spec}/process/schemas/strategic-feedback-adjudication.schema.json +0 -0
  608. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery-verification.schema.json +0 -0
  609. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-delivery.schema.json +0 -0
  610. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +0 -0
  611. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-domain-strategy.schema.json +0 -0
  612. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export-v2.schema.json +0 -0
  613. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-export.schema.json +0 -0
  614. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt-v3.schema.json +0 -0
  615. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-import-receipt.schema.json +0 -0
  616. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-package.schema.json +0 -0
  617. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +0 -0
  618. /package/template/{docs → .template-spec}/process/schemas/strategic-handoff-stage-decision-package.schema.json +0 -0
  619. /package/template/{docs → .template-spec}/process/schemas/subagent-task-package.schema.json +0 -0
  620. /package/template/{docs → .template-spec}/process/schemas/user-decision.schema.json +0 -0
  621. /package/template/{docs → .template-spec}/process/strategic-handoff-package.md +0 -0
  622. /package/template/{docs → .template-spec}/process/templates/context-reconciliation-template.yaml +0 -0
  623. /package/template/{docs → .template-spec}/process/templates/frontend-implementation-plan-template.yaml +0 -0
  624. /package/template/{docs → .template-spec}/process/templates/frontend-implementation-verification-template.yaml +0 -0
  625. /package/template/{docs → .template-spec}/process/templates/lifecycle-checkpoint-template.yaml +0 -0
  626. /package/template/{docs → .template-spec}/process/templates/scaffold-architecture-decisions-template.yaml +0 -0
  627. /package/template/{docs → .template-spec}/process/templates/stage-checkpoint-template.md +0 -0
  628. /package/template/{docs → .template-spec}/process/templates/user-decision-template.yaml +0 -0
  629. /package/template/{docs → .template-spec}/templates/adr-template.md +0 -0
  630. /package/template/{docs → .template-spec}/templates/approval-record-template.yaml +0 -0
  631. /package/template/{docs → .template-spec}/templates/cross-repo-slice-template.md +0 -0
  632. /package/template/{docs → .template-spec}/templates/examples/lifecycle-writing-examples.md +0 -0
  633. /package/template/{docs → .template-spec}/templates/implementation-repo-registry-template.md +0 -0
  634. /package/template/{docs → .template-spec}/templates/openapi-spec-template.yaml +0 -0
  635. /package/template/{docs → .template-spec}/templates/review-bundle-template.yaml +0 -0
  636. /package/template/{docs → .template-spec}/templates/review-report-template.md +0 -0
  637. /package/template/{docs → .template-spec}/templates/spec-delta-template.md +0 -0
  638. /package/template/{docs → .template-spec}/templates/spec-template.md +0 -0
  639. /package/template/{docs → .template-spec}/user-guide/yss-ui-mcp.md +0 -0
  640. /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
  641. /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
  642. /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
@@ -3,7 +3,7 @@ import path from "node:path";
3
3
  import { parseDocument } from "../vendor/yaml.mjs";
4
4
  import { nestedSkillPaths, OBSOLETE, PROJECTION_ROOTS, ROOT, unregisteredNestedSkillPaths } from "./skill-supply-chain.mjs";
5
5
 
6
- export const DEFAULT_REGISTRY = path.join(ROOT, "docs/agents/yss-skill-registry.yaml");
6
+ export const DEFAULT_REGISTRY = path.join(ROOT, ".template-spec/agents/yss-skill-registry.yaml");
7
7
  const LOCK_PATH = path.join(ROOT, "skills-lock.json");
8
8
  const COMPILER_CONTRACT = path.join(ROOT, ".agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml");
9
9
  const LIFECYCLE_CONTRACT = [
@@ -11,7 +11,7 @@ const LIFECYCLE_CONTRACT = [
11
11
  path.join(ROOT, ".agents/skills/harness-orchestrator/references/orchestration-contract.yaml"),
12
12
  ].find((candidate) => existsSync(candidate))
13
13
  ?? path.join(ROOT, ".agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml");
14
- const BACKEND_PLATFORMS = path.join(ROOT, "docs/engineering/backend-platforms.json");
14
+ const BACKEND_PLATFORMS = path.join(ROOT, ".template-spec/engineering/backend-platforms.json");
15
15
  const LAYERS = new Set(["core", "specialist", "compatibility", "maintainer-only"]);
16
16
  const MATURITIES = new Set(["draft", "verified", "supported", "deprecated"]);
17
17
  const INVOCATION_MODES = new Set(["user", "model", "both"]);
@@ -65,10 +65,17 @@ export function loadSkillRegistry(filePath = DEFAULT_REGISTRY) {
65
65
  export function resolveSkillForNewUse(registry, requestedId) {
66
66
  requireString(requestedId, "requested skill id");
67
67
  if (OBSOLETE.has(requestedId)) {
68
+ const replacementSkill = requestedId === "grill-me" ? "grilling" : null;
68
69
  throw new SkillLifecycleError(
69
70
  SKILL_LIFECYCLE_FAILURE_CODES.retired,
70
- `${requestedId} 已硬退役;按迁移 tombstone 重新路由`,
71
- { skill: requestedId, migration_ref: "docs/agents/skill-migrations.md" }
71
+ replacementSkill
72
+ ? `${requestedId} 已硬退役;请使用 ${replacementSkill}`
73
+ : `${requestedId} 已硬退役;按迁移 tombstone 重新路由`,
74
+ {
75
+ skill: requestedId,
76
+ migration_ref: ".template-spec/agents/skill-migrations.md",
77
+ ...(replacementSkill ? { replacement_skill: replacementSkill } : {})
78
+ }
72
79
  );
73
80
  }
74
81
  const aliases = new Map((registry.skills ?? []).flatMap((skill) => (skill.aliases ?? []).map((alias) => [alias, skill.id])));
@@ -372,7 +379,7 @@ export function validateSkillRegistry(registry, { lock, compilerContract, lifecy
372
379
  requireStringSet(registry.retirement_contract.stages, ["deprecated", "retired"], "retirement_contract.stages");
373
380
  if (registry.retirement_contract.deprecated_new_use !== "forbidden") fail("retirement_contract.deprecated_new_use 必须为 forbidden");
374
381
  requireStringSet(registry.retirement_contract.cleanup_statuses, [...CLEANUP_STATUSES], "retirement_contract.cleanup_statuses");
375
- if (registry.retirement_contract.hard_retirement_tombstone !== "docs/agents/skill-migrations.md") fail("retirement_contract.hard_retirement_tombstone 必须指向技能迁移说明");
382
+ if (registry.retirement_contract.hard_retirement_tombstone !== ".template-spec/agents/skill-migrations.md") fail("retirement_contract.hard_retirement_tombstone 必须指向技能迁移说明");
376
383
  if (registry.retirement_contract.retired_id_source !== "scripts/lib/skill-supply-chain.mjs#OBSOLETE") fail("retirement_contract.retired_id_source 必须指向统一 OBSOLETE 集");
377
384
  requireObject(registry.retirement_contract.failure_codes, "retirement_contract.failure_codes");
378
385
  if (registry.retirement_contract.failure_codes.deprecated !== SKILL_LIFECYCLE_FAILURE_CODES.deprecated || registry.retirement_contract.failure_codes.retired !== SKILL_LIFECYCLE_FAILURE_CODES.retired) {
@@ -462,7 +469,7 @@ export function validateSkillRegistry(registry, { lock, compilerContract, lifecy
462
469
  fail("capability_contract.deterministic_order 必须固定为 recipe-declaration、dependency-topology、skill-id");
463
470
  }
464
471
  requireObject(capabilityContract.platform_component_binding, "capability_contract.platform_component_binding");
465
- if (capabilityContract.platform_component_binding.marker !== "provider" || capabilityContract.platform_component_binding.required_kind !== "yss-component" || capabilityContract.platform_component_binding.catalog_source !== "docs/engineering/backend-platforms.json") {
472
+ if (capabilityContract.platform_component_binding.marker !== "provider" || capabilityContract.platform_component_binding.required_kind !== "yss-component" || capabilityContract.platform_component_binding.catalog_source !== ".template-spec/engineering/backend-platforms.json") {
466
473
  fail("capability_contract.platform_component_binding 必须绑定中央后端平台目录");
467
474
  }
468
475
  requireStringSet(capabilityContract.provider_kinds, [...PROVIDER_KINDS], "capability_contract.provider_kinds");
@@ -608,8 +615,8 @@ export function validateSkillRegistry(registry, { lock, compilerContract, lifecy
608
615
  if (deprecatedCompilerRefs.length) fail(`实现合同编译器合同仍引用 deprecated skill: ${deprecatedCompilerRefs.join(", ")}`);
609
616
  if (compilerContract.schema_version !== 2) fail("compiler-contract.yaml schema_version 必须为 2;v1 已停止支持");
610
617
  if (compilerContract.compiled_by !== "yss-implementation-contract-compiler") fail("compiler-contract.yaml compiled_by 无效");
611
- if (compilerContract.capability_source !== "docs/agents/yss-skill-registry.yaml") fail("compiler-contract.yaml capability_source 必须指向技能注册表");
612
- if (compilerContract.recipe_source !== "docs/agents/yss-skill-registry.yaml") fail("compiler-contract.yaml recipe_source 必须指向技能注册表");
618
+ if (compilerContract.capability_source !== ".template-spec/agents/yss-skill-registry.yaml") fail("compiler-contract.yaml capability_source 必须指向技能注册表");
619
+ if (compilerContract.recipe_source !== ".template-spec/agents/yss-skill-registry.yaml") fail("compiler-contract.yaml recipe_source 必须指向技能注册表");
613
620
  requireObject(compilerContract.impact_to_capabilities, "compiler-contract.impact_to_capabilities");
614
621
  for (const [impact, mapped] of Object.entries(compilerContract.impact_to_capabilities)) {
615
622
  requireStringArray(mapped, `compiler-contract.impact_to_capabilities.${impact}`, { nonEmpty: true });
@@ -662,7 +669,7 @@ export function validateSkillRegistry(registry, { lock, compilerContract, lifecy
662
669
  fail(`${routeId}.frontend_route 主入口引用了未登记技能`);
663
670
  }
664
671
  }
665
- if (routeId === "work-unit.prototype-design") {
672
+ if (routeId === "work-unit.prototype-design-v2") {
666
673
  if (!route.skills.includes("prototype-review") || !route.supporting_skills.includes("prototype-review")) {
667
674
  fail("原型工作单元必须包含独立 prototype-review supporting skill");
668
675
  }
@@ -1,5 +1,5 @@
1
1
  import { createHash } from "node:crypto";
2
- import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
2
+ import { cpSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, symlinkSync, unlinkSync, writeFileSync } from "node:fs";
3
3
  import { spawnSync } from "node:child_process";
4
4
  import path from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -10,7 +10,7 @@ const LOCK_PATH = path.join(ROOT, "skills-lock.json");
10
10
  const YSS_UI_MANIFEST_PATH = path.join(SOURCE_ROOT, ".yss-skills-manifest.json");
11
11
  const STRATEGIC_DESIGN_MANIFEST_PATH = path.join(SOURCE_ROOT, ".strategic-design-skills-manifest.json");
12
12
  export const PROJECTION_ROOTS = [".codex/skills", ".cursor/skills", ".pi/skills"];
13
- export const OBSOLETE = new Set(["yss-antd-design", "yss-antdv-next-design", "to-" + "prd", "to-" + "issues", "design-an-interface", "qa", "request-refactor-plan", "ubiquitous-language", "edit-article", "obsidian-vault", "writing-great-skills", "code-review-process", "yss-domain-modeling", "yss-dir", "yss-duckdb", "yss-file", "yss-filerunner", "yss-db2mybatis", "yss-mail", "yss-mapper-dynamic", "yss-quality", "yss-sql-condition", "yss-sql-tpl", "yss-valuation", "yss-variable", "yss-openapi", "web-design-engineer", "web-video-presentation", "wireframe-prototype", "wizard", "git-guardrails-claude-code", "claude-handoff", "batch-grill-me", "product-design-prototype", "research", "ask-matt", "dispatching-parallel-agents", "loop-me", "migrate-to-shoehorn", "prototype-page-acceptance", "scaffold-exercises", "setup-pre-commit", "setup-ts-deep-modules", "teach", "writing-beats", "writing-fragments", "writing-shape", "yss-microapp-commit", "yss-page-module-development", "yss-dictionary", "yss-jdbc", "yss-log", "yss-taskflow", "yss-backend-scaffold-application", "yss-backend-scaffold-domain", "yss-backend-scaffold-infrastructure", "yss-backend-scaffold-web", "yss-router", "yss-source-index"]);
13
+ export const OBSOLETE = new Set(["yss-antd-design", "yss-antdv-next-design", "to-" + "prd", "to-" + "issues", "design-an-interface", "qa", "request-refactor-plan", "ubiquitous-language", "edit-article", "obsidian-vault", "writing-great-skills", "code-review-process", "yss-domain-modeling", "yss-dir", "yss-duckdb", "yss-file", "yss-filerunner", "yss-db2mybatis", "yss-mail", "yss-mapper-dynamic", "yss-quality", "yss-sql-condition", "yss-sql-tpl", "yss-valuation", "yss-variable", "yss-openapi", "web-design-engineer", "web-video-presentation", "wireframe-prototype", "wizard", "git-guardrails-claude-code", "claude-handoff", "batch-grill-me", "grill-me", "product-design-prototype", "research", "ask-matt", "dispatching-parallel-agents", "loop-me", "migrate-to-shoehorn", "prototype-page-acceptance", "scaffold-exercises", "setup-pre-commit", "setup-ts-deep-modules", "teach", "writing-beats", "writing-fragments", "writing-shape", "yss-microapp-commit", "yss-page-module-development", "yss-dictionary", "yss-jdbc", "yss-log", "yss-taskflow", "yss-backend-scaffold-application", "yss-backend-scaffold-domain", "yss-backend-scaffold-infrastructure", "yss-backend-scaffold-web", "yss-router", "yss-source-index"]);
14
14
  for (const id of ["component-selection-imports", "page-form-module", "page-list-module", "page-skeleton", "vue3-best-practices", "yss-use-table-height", "yss-use-tree-height", "yss-components", "yss-mvc-scaffold-generator", "yss-mvc-design", "yss-mvc-data-analysis-project-initializer", "yss-backend-scaffold-parent", "yss-backend-scaffold-adapter", "yss-application-layer-reference", "yss-domain-layer-reference", "yss-infrastructure-layer-reference", "yss-web-layer-reference"]) OBSOLETE.add(id);
15
15
  export function obsoleteCanonicalResidues(names, obsolete = OBSOLETE) {
16
16
  return names.filter((name) => obsolete.has(name)).sort();
@@ -49,6 +49,21 @@ export function treeHash(directory) {
49
49
  return digest.digest("hex");
50
50
  }
51
51
 
52
+ // treeHash is the published, normalized Skill digest. A no-op copy needs the
53
+ // stricter filesystem comparison so modes, links and raw line endings survive.
54
+ function projectionMatchesSource(source, target) {
55
+ const sourceInfo = lstatSafe(source);
56
+ const targetInfo = lstatSafe(target);
57
+ if (!sourceInfo || !targetInfo || (sourceInfo.mode & 0o7777) !== (targetInfo.mode & 0o7777)) return false;
58
+ if (sourceInfo.isSymbolicLink()) return targetInfo.isSymbolicLink() && readlinkSync(source) === readlinkSync(target);
59
+ if (sourceInfo.isFile()) return targetInfo.isFile() && readFileSync(source).equals(readFileSync(target));
60
+ if (!sourceInfo.isDirectory() || !targetInfo.isDirectory()) return false;
61
+ const sourceNames = readdirSync(source).sort();
62
+ const targetNames = readdirSync(target).sort();
63
+ return sourceNames.length === targetNames.length && sourceNames.every((name, index) =>
64
+ name === targetNames[index] && projectionMatchesSource(path.join(source, name), path.join(target, name)));
65
+ }
66
+
52
67
  /**
53
68
  * 校验并返回 YSS UI 前端 skills 与 MCP 的上游集成合同。
54
69
  *
@@ -156,13 +171,12 @@ export function unlockedCanonicalEntries(names, allowedNames, hasSkillMd = () =>
156
171
  const allowed = new Set(allowedNames);
157
172
  return names.filter((name) => !allowed.has(name) && !OBSOLETE.has(name) && hasSkillMd(name)).sort();
158
173
  }
159
- export function syncSkills({ check = false } = {}) {
174
+ export function syncSkills({ check = false, hashCache = new Map() } = {}) {
160
175
  let trackedSet;
161
176
  const tracked = ref => (trackedSet ??= trackedPaths()).has(ref);
162
- const sourceHashes = new Map();
163
177
  const sourceHash = source => {
164
- if (!sourceHashes.has(source)) sourceHashes.set(source, treeHash(source));
165
- return sourceHashes.get(source);
178
+ if (!hashCache.has(source)) hashCache.set(source, treeHash(source));
179
+ return hashCache.get(source);
166
180
  };
167
181
  const lock = parseLock();
168
182
  const shared = sharedFromLock(lock);
@@ -192,10 +206,12 @@ export function syncSkills({ check = false } = {}) {
192
206
  else if (sourceHash(source) !== treeHash(target)) drift.push(`projection drift: ${relative(target)}`);
193
207
  } else if (info?.isSymbolicLink() && existsSync(target) && realpathSync(target) === realpathSync(source)) {
194
208
  continue;
209
+ } else if (info?.isDirectory() && tracked(relative(target)) && projectionMatchesSource(source, target)) {
210
+ continue;
195
211
  } else {
196
212
  rmSync(target, { recursive: true, force: true });
197
213
  if (!info || !tracked(relative(target))) symlinkSync(path.relative(projection, source), target, "dir");
198
- else cpSync(source, target, { recursive: true, preserveTimestamps: true });
214
+ else cpSync(source, target, { recursive: true, preserveTimestamps: true, verbatimSymlinks: true });
199
215
  }
200
216
  }
201
217
  for (const name of OBSOLETE) {
@@ -230,11 +246,12 @@ function sourceRevisionMap(oldLock, arguments_) {
230
246
  }
231
247
  return sources;
232
248
  }
233
- function metadata(name, skillPath, directory, previous, canonical = false, sources = {}, upstreamRoot = null) {
249
+ function metadata(name, skillPath, directory, previous, canonical = false, sources = {}, upstreamRoot = null, hashCache = new Map()) {
234
250
  const old = previous[name] ?? {};
235
251
  let recordedPath = old.skillPath ?? skillPath;
236
252
  if (canonical && /^\.(codex|cursor|pi)\/skills\//.test(recordedPath)) recordedPath = skillPath;
237
- const result = { source: old.source ?? "project", sourceType: old.sourceType ?? "local", skillPath: recordedPath, effectiveHash: treeHash(directory) };
253
+ if (!hashCache.has(directory)) hashCache.set(directory, treeHash(directory));
254
+ const result = { source: old.source ?? "project", sourceType: old.sourceType ?? "local", skillPath: recordedPath, effectiveHash: hashCache.get(directory) };
238
255
  const sourceInfo = sources[result.source];
239
256
  if (sourceInfo?.revision) result.sourceRevision = sourceInfo.revision;
240
257
  let upstreamDirectory = null;
@@ -244,12 +261,12 @@ function metadata(name, skillPath, directory, previous, canonical = false, sourc
244
261
  result.upstreamHash = treeHash(upstreamDirectory);
245
262
  } else if (old.upstreamHash ?? old.computedHash) result.upstreamHash = old.upstreamHash ?? old.computedHash;
246
263
  if (result.upstreamHash && result.effectiveHash !== result.upstreamHash) {
247
- const adaptationRef = old.adaptationRef ?? (result.source === "mattpocock/skills" ? "docs/process/MATT-POCOCK-ENGINEERING-SKILLS.md" : null);
264
+ const adaptationRef = old.adaptationRef ?? (result.source === "mattpocock/skills" ? ".template-source/process/MATT-POCOCK-ENGINEERING-SKILLS.md" : null);
248
265
  if (adaptationRef) result.adaptationRef = adaptationRef;
249
266
  }
250
267
  return result;
251
268
  }
252
- export function updateSkillLock(arguments_ = process.argv.slice(2)) {
269
+ export function updateSkillLock(arguments_ = process.argv.slice(2), { hashCache = new Map() } = {}) {
253
270
  const oldLock = parseLock(); const previous = priorMetadata(oldLock); const sources = sourceRevisionMap(oldLock, arguments_); const upstreamRoot = option(arguments_, "upstream-root");
254
271
  const yssUiManifest = loadYssUiSkillManifest();
255
272
  sources[yssUiManifest.source] = { ...(sources[yssUiManifest.source] ?? {}), revision: yssUiManifest.source_revision };
@@ -269,7 +286,7 @@ export function updateSkillLock(arguments_ = process.argv.slice(2)) {
269
286
  if (unlocked.length) throw new TypeError(`发现未登记到 skills-lock.json 的已跟踪共享 skills: ${unlocked.join(", ")}\n确认新增后运行 scripts/update-skill-lock --add=<skill-name>`);
270
287
  const targets = [".agents/skills", ...PROJECTION_ROOTS];
271
288
  const shared = Object.fromEntries(sharedNames.map((name) => {
272
- const item = metadata(name, `.agents/skills/${name}/SKILL.md`, path.join(SOURCE_ROOT, name), previous, true, sources, upstreamRoot);
289
+ const item = metadata(name, `.agents/skills/${name}/SKILL.md`, path.join(SOURCE_ROOT, name), previous, true, sources, upstreamRoot, hashCache);
273
290
  const yssUiSkill = yssUiSkills.get(name);
274
291
  if (yssUiSkill) {
275
292
  item.source = yssUiManifest.source;
@@ -300,10 +317,12 @@ export function updateSkillLock(arguments_ = process.argv.slice(2)) {
300
317
  if (!names.length) continue;
301
318
  const absentPlatform = names.filter((name) => !lstatSafe(path.join(location, name))?.isDirectory());
302
319
  if (absentPlatform.length) throw new TypeError(`锁文件声明的平台 skills 缺少内容 (${root}): ${absentPlatform.join(", ")}`);
303
- platform[root] = Object.fromEntries(names.map((name) => { const item = metadata(name, `${root}/${name}/SKILL.md`, path.join(location, name), previous, false, sources, upstreamRoot); item.targets = [root]; return [name, item]; }));
320
+ platform[root] = Object.fromEntries(names.map((name) => { const item = metadata(name, `${root}/${name}/SKILL.md`, path.join(location, name), previous, false, sources, upstreamRoot, hashCache); item.targets = [root]; return [name, item]; }));
304
321
  }
305
322
  const manifest = { version: 3, generatedBy: "scripts/update-skill-lock", canonicalRoot: ".agents/skills", projectionRoots: PROJECTION_ROOTS, sources, skills: { shared, platform } };
306
323
  const rendered = `${JSON.stringify(manifest, null, 2)}\n`;
307
- if (arguments_.includes("--check")) { if (!existsSync(LOCK_PATH) || readFileSync(LOCK_PATH, "utf8") !== rendered) throw new TypeError("skills-lock.json is stale; run scripts/update-skill-lock"); return "skills-lock.json matches distributed skills"; }
308
- writeFileSync(LOCK_PATH, rendered); return `updated skills-lock.json with ${sharedNames.length} shared skills and ${Object.values(platform).reduce((sum, group) => sum + Object.keys(group).length, 0)} platform skills`;
324
+ const current = existsSync(LOCK_PATH) ? readFileSync(LOCK_PATH, "utf8") : null;
325
+ if (arguments_.includes("--check")) { if (current !== rendered) throw new TypeError("skills-lock.json is stale; run scripts/update-skill-lock"); return "skills-lock.json matches distributed skills"; }
326
+ if (current !== rendered) writeFileSync(LOCK_PATH, rendered);
327
+ return `updated skills-lock.json with ${sharedNames.length} shared skills and ${Object.values(platform).reduce((sum, group) => sum + Object.keys(group).length, 0)} platform skills`;
309
328
  }
@@ -31,7 +31,7 @@ function markdownAcceptance(text) {
31
31
  }
32
32
  function lifecycleSources(checkpoint,report) {
33
33
  const result={};
34
- for(const [artifact,key]of Object.entries({'artifact.spec':'spec','artifact.engineering-baseline':'engineering_baseline','artifact.architecture-review':'architecture_review','artifact.technical-design':'technical_design','artifact.data-architecture':'data_architecture','artifact.state-matrix':'state_matrix','artifact.prototype-deliverable':'prototype_deliverable','artifact.prototype-review':'prototype_review','artifact.prototype-confirmation':'prototype_confirmation','artifact.openapi-freeze-record':'openapi_freeze'})) {
34
+ for(const [artifact,key]of Object.entries({'artifact.spec':'spec','artifact.engineering-baseline':'engineering_baseline','artifact.architecture-review':'architecture_review','artifact.technical-design':'technical_design','artifact.data-architecture':'data_architecture','artifact.state-matrix':'state_matrix','artifact.prototype-deliverable':'prototype_deliverable','artifact.prototype-review-v2':'prototype_review','artifact.prototype-confirmation-v2':'prototype_confirmation','artifact.openapi-freeze-record':'openapi_freeze'})) {
35
35
  const value=checkpoint.artifacts?.[artifact];if(value===undefined)continue;
36
36
  if(typeof value==='string')result[key]={ref:value};
37
37
  else if(object(value)&&typeof value.ref==='string')result[key]=Object.fromEntries(['ref','version','digest','approval_ref'].filter(k=>value[k]!==undefined).map(k=>[k,value[k]]));
@@ -72,7 +72,7 @@ function prepare({root=process.cwd(),ticket_ref,checkpoint_ref,sources={},refine
72
72
  const selected=mergeFacts(lifecycleSources(saved,report),mergeFacts(input.sources || {},sources,'sources',report),'sources',report);
73
73
  if(selected.ticket && (typeof selected.ticket==='string'?selected.ticket:selected.ticket.ref)!==ticket_ref)throw new TypeError('Ticket 来源冲突');
74
74
  selected.ticket=selected.ticket || {ref:ticket_ref};
75
- if(input.scope?.risk_level){selected.lifecycle_registry??={ref:'docs/process/lifecycle-registry.yaml'};selected.process_tailoring??={ref:'docs/process/harness-process-tailoring.md'};}
75
+ if(input.scope?.risk_level){selected.lifecycle_registry??={ref:'.template-spec/process/lifecycle-registry.yaml'};selected.process_tailoring??={ref:'.template-spec/process/harness-process-tailoring.md'};}
76
76
  if(!selected.context&&fs.existsSync(safe(root,'CONTEXT.md',{missing:true})))selected.context={ref:'CONTEXT.md'};
77
77
  const basis={},seen=new Map();
78
78
  for(const [key,value] of Object.entries(selected)) {
@@ -136,7 +136,7 @@ function prepare({root=process.cwd(),ticket_ref,checkpoint_ref,sources={},refine
136
136
  for(const reason of compiled.readiness_blockers||[])report.blockers.push({reason});
137
137
  normalizeSliceContract(contract,{root});
138
138
  report.checks.push({check:'structure-sources-scope-acceptance',result:'pass'});
139
- report.provenance.push({target:'resolution',source_ref:'docs/agents/yss-skill-registry.yaml',digest:compiled.registry_digest,rule:'existing-capability-compiler'});
139
+ report.provenance.push({target:'resolution',source_ref:'.template-spec/agents/yss-skill-registry.yaml',digest:compiled.registry_digest,rule:'existing-capability-compiler'});
140
140
  for(const field of ['scope','acceptance','verification','work_units','applicability','extensions'])if(contract[field]) {
141
141
  const origins=[];
142
142
  if(saved.slice_implementation?.[field]!==undefined)origins.push({kind:'checkpoint',ref:checkpoint_ref});
@@ -113,7 +113,7 @@ export function normalizeSliceContract(document, options = {}) {
113
113
  }
114
114
  return structuredClone(raw);
115
115
  }
116
- schema(raw,'docs/process/schemas/slice-implementation-contract-v3.schema.json');
116
+ schema(raw,'.template-spec/process/schemas/slice-implementation-contract-v3.schema.json');
117
117
  const sources=readSliceSources(raw,options), refs=Object.fromEntries(Object.entries(sources).map(([key,item])=>[key,item.ref]));
118
118
  requireKeys(refs,['spec','ticket','engineering_baseline','implementation_repository','build_architecture_checklist'],'依据');
119
119
  const ticketHeader = sources.ticket.text.match(/^---\r?\n([\s\S]*?)\r?\n---/);
@@ -10,7 +10,7 @@ export function sliceRepositories(contract,sources,{root=process.cwd()}={}) {
10
10
  check(lifecycle.SLICE_REPOSITORY_PREPARATION_PROTOCOL===1&&typeof lifecycle.validateImplementationRepositoriesReady==='function','接收端不支持当前来源的多项目准备协议,不能套用本地默认规则');
11
11
  check(sources.repository_preparation,'缺少多项目准备结果');
12
12
  const preparation=parseSliceYaml(sources.repository_preparation.text);
13
- schema(preparation,'docs/process/schemas/implementation-repository-preparation-result.schema.json');
13
+ schema(preparation,'.template-spec/process/schemas/implementation-repository-preparation-result.schema.json');
14
14
  const ready=lifecycle.validateImplementationRepositoriesReady({implementation_repository_preparation:preparation,delivery_impacts:Object.fromEntries(['backend','frontend'].map(role=>[role,preparation.projects.some(p=>p.delivery_role===role&&p.status!=='not-applicable')]))},{root,exists:ref=>fs.existsSync(path.resolve(root,ref)),read:ref=>fs.readFileSync(path.resolve(root,ref),'utf8')});
15
15
  check(ready.result!=='blocked',`多项目准备未就绪: ${ready.missing_requirements.join('; ')}`);
16
16
  check(new Set(Object.keys(bindings).map(p=>path.resolve(p))).size===Object.keys(bindings).length,'工程根存在路径别名,不能重复登记');
@@ -10,13 +10,13 @@ const fail=message=>{throw new TypeError(message);};
10
10
  const equalArrays=(a,b)=>Array.isArray(a)&&a.length===b.length&&a.every((x,i)=>x===b[i]);
11
11
  function generateTaskPackageDefaults(roleId,overrides,{rolesDoc}={}) {
12
12
  const defaults=taskPackageDefaults(roleId,rolesDoc||loadDigitalHumanRoles());
13
- return {schema_version:1,role_id:roleId,skill_source:{registry_ref:'docs/agents/digital-human-roles.yaml',defaults_ref:`taskPackageDefaults(${roleId})`,core_skills:defaults.core_skills,forbidden_skills:defaults.forbidden_skills},...overrides};
13
+ return {schema_version:1,role_id:roleId,skill_source:{registry_ref:'.template-spec/agents/digital-human-roles.yaml',defaults_ref:`taskPackageDefaults(${roleId})`,core_skills:defaults.core_skills,forbidden_skills:defaults.forbidden_skills},...overrides};
14
14
  }
15
15
 
16
16
  /** Compile dispatch from the approved YAML. Only runtime identity and task ID come from the caller. */
17
17
  export function compileSliceTaskPackage(binding,options={}) {return withValidationPhase({root:options.root||ROOT,purpose:'slice-dispatch',slice_id:binding.ref,work_unit_id:options.work_unit_id,readOnly:false,signal:options.signal},()=>compile(binding,options));}
18
18
  function compile(binding,{root=ROOT,work_unit_id,task_id,actor_id,runtime_id,execution_state='Worker',rolesDoc,user_decisions}={}) {
19
- const actualRoles=parseSliceYaml(readFileSync(safe(root,'docs/agents/digital-human-roles.yaml')));
19
+ const actualRoles=parseSliceYaml(readFileSync(safe(root,'.template-spec/agents/digital-human-roles.yaml')));
20
20
  if(rolesDoc&&digest(rolesDoc)!==digest(actualRoles))fail('调用方不能替换接收端角色能力');
21
21
  rolesDoc=actualRoles;
22
22
  if(!actualRoles.runtimes.some(runtime=>runtime.id===runtime_id))fail('接收端不支持该 runtime_id');
@@ -46,7 +46,7 @@ export function assertSliceV3TaskPackage(value,slice,{root=ROOT}={}) {
46
46
  enforceHarnessTaskScope(value,{root});
47
47
  const contract=value.contract;
48
48
  const current=normalizeSliceContract(slice,{root});
49
- const roles=parseSliceYaml(readFileSync(safe(root,'docs/agents/digital-human-roles.yaml'))),defaults=taskPackageDefaults(value.role_id,roles);
49
+ const roles=parseSliceYaml(readFileSync(safe(root,'.template-spec/agents/digital-human-roles.yaml'))),defaults=taskPackageDefaults(value.role_id,roles);
50
50
  if(!roles.runtimes.some(runtime=>runtime.id===value.runtime_id)||!defaults.stages.includes(value.stage_id))fail('接收端角色或运行时不支持当前任务');
51
51
  if(!equalArrays(value.skill_source.core_skills,defaults.core_skills)||!equalArrays(value.skill_source.forbidden_skills,defaults.forbidden_skills))fail('任务角色能力与接收端不一致');
52
52
  const unit=current.work_units.find(item=>item.id===value.work_unit_id);
@@ -46,12 +46,12 @@ export function planTracking(root, { checkpoint_ref, items = [], refresh = false
46
46
  watch(ref);
47
47
  if (!observed[ref] || sha256(after) !== observed[ref].digest) changes.push({ ref, before: observed[ref], after, after_digest: sha256(after) });
48
48
  }
49
- for (const ref of ['yss-project.yaml', 'CONTEXT.md', TRACKER_REF, 'docs/process/lifecycle-registry.yaml', 'docs/process/schemas/stage-tracking.schema.json', 'docs/process/harness-profile.yaml', checkpoint_ref]) watch(ref);
49
+ for (const ref of ['yss-project.yaml', 'CONTEXT.md', TRACKER_REF, '.template-spec/process/lifecycle-registry.yaml', '.template-spec/process/schemas/stage-tracking.schema.json', '.template-spec/process/harness-profile.yaml', checkpoint_ref]) watch(ref);
50
50
  const exists = observed[checkpoint_ref] !== null;
51
51
  let checkpoint;
52
52
  if (exists) checkpoint = parseYaml(readTracking(root, checkpoint_ref));
53
53
  else {
54
- const template = 'docs/process/templates/lifecycle-checkpoint-template.yaml'; watch(template);
54
+ const template = '.template-spec/process/templates/lifecycle-checkpoint-template.yaml'; watch(template);
55
55
  checkpoint = parseYaml(readTracking(root, template));
56
56
  checkpoint.feature_id = feature;
57
57
  checkpoint.mode = 'orchestrate'; checkpoint.status = 'running';
@@ -4,14 +4,14 @@ import { createHash } from 'node:crypto';
4
4
  import { parseDocument } from '../vendor/yaml.mjs';
5
5
  import { validateJsonSchema } from './json-schema.mjs';
6
6
 
7
- export const TRACKER_REF = 'docs/agents/issue-tracker.md';
7
+ export const TRACKER_REF = '.template-spec/agents/issue-tracker.md';
8
8
  export const STAGE_WORK_UNITS = Object.freeze({
9
9
  'work-unit.plan-opportunity': 'stage.plan',
10
10
  'work-unit.plan-requirements': 'stage.plan',
11
11
  'work-unit.domain-strategy-design': 'stage.plan',
12
12
  'work-unit.stage-decision': 'stage.plan',
13
13
  'work-unit.spec-synthesis': 'stage.spec-architecture',
14
- 'work-unit.prototype-design': 'stage.product-design',
14
+ 'work-unit.prototype-design-v2': 'stage.product-design',
15
15
  });
16
16
  export const sha256 = bytes => `sha256:${createHash('sha256').update(bytes).digest('hex')}`;
17
17
  export function parseYaml(bytes) {
@@ -43,7 +43,7 @@ export function trackerConfig(root) {
43
43
  return config;
44
44
  }
45
45
  export function trackingProfile(root) {
46
- const ref = 'docs/process/harness-profile.yaml';
46
+ const ref = '.template-spec/process/harness-profile.yaml';
47
47
  return existsSync(safeTrackingPath(root, ref)) ? parseYaml(readTracking(root, ref)) : null;
48
48
  }
49
49
  export const isDesign = root => trackingProfile(root)?.profile_id === 'harness.business-ddd-strategy-handoff';
@@ -81,7 +81,7 @@ export function assertStageTracking(checkpoint, { root, checkpointRef, currentWo
81
81
  if (identity.repository_mode === 'project-instance' && config.lifecycle_tracking_version === 1 && relevant) throw new Error('stage-tracking-required');
82
82
  return { status: 'not-applicable', stale_item_ids: [] };
83
83
  }
84
- validateJsonSchema(tracking, path.join(root, 'docs/process/schemas/stage-tracking.schema.json'));
84
+ validateJsonSchema(tracking, path.join(root, '.template-spec/process/schemas/stage-tracking.schema.json'));
85
85
  const feature = checkpoint.feature_id;
86
86
  if (feature !== tracking.feature_id || typeof feature !== 'string' || !feature.trim()) throw new Error('tracking-feature-mismatch');
87
87
  const location = /^(docs\/\.scratch\/[a-z0-9][a-z0-9-]*\/)[^/]+\.(yaml|json)$/.exec(tracking.checkpoint_ref);
@@ -94,7 +94,7 @@ export function assertStageTracking(checkpoint, { root, checkpointRef, currentWo
94
94
  } else if (tracking.entry.kind !== 'parent-ticket' || tracking.entry.ref !== `${base}parent-ticket.md`) throw new Error('tracking-parent-required');
95
95
  const entry = readTracking(root, tracking.entry.ref);
96
96
  if (tracking.entry.kind === 'parent-ticket' && !entry.includes(tracking.checkpoint_ref)) throw new Error('tracking-parent-checkpoint-link-required');
97
- const registry = parseYaml(readTracking(root, 'docs/process/lifecycle-registry.yaml'));
97
+ const registry = parseYaml(readTracking(root, '.template-spec/process/lifecycle-registry.yaml'));
98
98
  const stages = new Set(registry.stages.map(x => x.id));
99
99
  const units = new Set(registry.work_units.map(x => x.id));
100
100
  if (!stages.has(tracking.entry_stage)) throw new Error('tracking-entry-stage-invalid');
@@ -4,7 +4,7 @@ import { read, safe, ensure, hash, schema, project } from './strategic-handoff-i
4
4
 
5
5
  export async function verifyConsumerFeedback({root=process.cwd(),feedbackRef}={}) {
6
6
  project(root);const file=safe(root,feedbackRef),feedback=read(file);
7
- schema(feedback,'docs/process/schemas/strategic-consumer-feedback.schema.json');
7
+ schema(feedback,'.template-spec/process/schemas/strategic-consumer-feedback.schema.json');
8
8
  const receipt=read(safe(root,feedback.import_receipt_ref));
9
9
  ensure([2,3].includes(receipt.schema_version),'Consumer Feedback v1 只接受 route-aware Import Receipt v2/v3');
10
10
  const base=`docs/handoffs/${receipt.bundle_id}/${receipt.version}`;
@@ -22,7 +22,7 @@ export async function verifyConsumerFeedback({root=process.cwd(),feedbackRef}={}
22
22
 
23
23
  export async function verifyFeedbackAdjudication({root=process.cwd(),adjudicationRef}={}) {
24
24
  project(root);const file=safe(root,adjudicationRef),adjudication=read(file);
25
- schema(adjudication,'docs/process/schemas/strategic-feedback-adjudication.schema.json');
25
+ schema(adjudication,'.template-spec/process/schemas/strategic-feedback-adjudication.schema.json');
26
26
  const feedbackFile=safe(root,adjudication.feedback.ref);ensure(hash(readFileSync(feedbackFile))===adjudication.feedback.digest,'Feedback Adjudication 绑定的 feedback digest 已失效');
27
27
  const verified=await verifyConsumerFeedback({root,feedbackRef:adjudication.feedback.ref});
28
28
  for(const ref of adjudication.evidence_refs)ensure(readFileSync(safe(root,ref)).length>0,`Feedback Adjudication evidence 为空: ${ref}`);
@@ -5,13 +5,13 @@ import { read, safe, ensure } from './strategic-handoff-io.mjs';
5
5
  // Wire work-unit IDs belong to the immutable source package. Only target routing is adapted.
6
6
  export function consumerEntry(root, capability, sourceWorkUnit) {
7
7
  const scope = existsSync(path.join(root, '.yss-execution-scope.yaml')) ? read(safe(root, '.yss-execution-scope.yaml')) : null;
8
- const profile = existsSync(path.join(root, 'docs/process/harness-profile.yaml')) ? read(safe(root, 'docs/process/harness-profile.yaml')) : null;
8
+ const profile = existsSync(path.join(root, '.template-spec/process/harness-profile.yaml')) ? read(safe(root, '.template-spec/process/harness-profile.yaml')) : null;
9
9
  const contractRef = scope || !profile ? '.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml' : '.agents/skills/harness-orchestrator/references/orchestration-contract.yaml';
10
10
  const contract = read(safe(root, contractRef));
11
11
  const target = scope?.scope_id || profile?.profile_id || 'yss-full-lifecycle';
12
12
  const policy = contract.consumer_entry_routes?.[target]?.[capability];
13
13
  ensure(policy && policy.source_work_unit === sourceWorkUnit, `consumer-entry-unmapped: ${target}/${capability}/${sourceWorkUnit}`);
14
- const registry = read(safe(root, 'docs/process/lifecycle-registry.yaml'));
14
+ const registry = read(safe(root, '.template-spec/process/lifecycle-registry.yaml'));
15
15
  ensure(registry.work_units.some(unit => unit.id === policy.target_work_unit), 'consumer-entry-unknown-target');
16
16
  if (scope) {
17
17
  ensure(scope.schema_version === 1, 'consumer-entry-invalid-scope');
@@ -14,11 +14,11 @@ const MAX_BYTES = 512 * 1024 * 1024;
14
14
  const own = (a,b) => JSON.stringify(canonical(a)) === JSON.stringify(canonical(b));
15
15
  const nonempty = x => typeof x === 'string' && x.trim();
16
16
  const bytesDigest = (bytes, kind) => kind === 'canonical-json' ? digest(parse(bytes)) : kind === 'sha256-bytes' ? hash(bytes) : (() => { throw new TypeError(`未知摘要算法: ${kind}`); })();
17
- 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']]);
17
+ const HANDOFF_SCHEMAS = new Map([[3,'.template-spec/process/schemas/strategic-design-handoff-v3.schema.json'],[4,'.template-spec/process/schemas/strategic-design-handoff-v4.schema.json'],[5,'.template-spec/process/schemas/strategic-design-handoff-v5.schema.json']]);
18
18
  const SOURCE_SCHEMAS = new Map([
19
- [3,['docs/process/schemas/strategic-handoff-domain-strategy.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package.schema.json']],
20
- [4,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
21
- [5,['docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
19
+ [3,['.template-spec/process/schemas/strategic-handoff-domain-strategy.schema.json','.template-spec/process/schemas/strategic-handoff-stage-decision-package.schema.json']],
20
+ [4,['.template-spec/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','.template-spec/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
21
+ [5,['.template-spec/process/schemas/strategic-handoff-domain-strategy-v3.schema.json','.template-spec/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json']],
22
22
  ]);
23
23
  const CAPABILITIES=['backend-technical-design','frontend-engineering-design','delivery-coordination'];
24
24
 
@@ -167,7 +167,7 @@ export async function inspectSource(root, handoffRef) {
167
167
  schema(handoff,versionSchema(handoff?.schema_version,HANDOFF_SCHEMAS,'Strategic Handoff'));
168
168
  ensure(handoff.status==='approved', '交接包尚未批准');
169
169
  const config=handoff.package_export;
170
- schema(config,handoff.schema_version===5?'docs/process/schemas/strategic-handoff-export-v2.schema.json':'docs/process/schemas/strategic-handoff-export.schema.json');
170
+ schema(config,handoff.schema_version===5?'.template-spec/process/schemas/strategic-handoff-export-v2.schema.json':'.template-spec/process/schemas/strategic-handoff-export.schema.json');
171
171
  if(handoff.schema_version===5)ensure(config.ui_baseline_kind===uiBaselineKind(handoff),'交接与导出 UI 基线类型不一致');
172
172
  const source=parseContextSource(readFileSync(safe(root,'CONTEXT.md'),'utf8'));
173
173
  snapshot(handoff.source_context_snapshot,source); checkDelta(handoff,source);
@@ -184,7 +184,7 @@ export async function inspectSource(root, handoffRef) {
184
184
  validateConsumerRoutes(handoff,stage);
185
185
  if(uiBaselineKind(handoff)==='existing-ui-baseline')ensure(stage.impact_assessment?.ui===false,'existing-ui-baseline 不支持 UI 影响,返回产品设计');
186
186
  const indexes=extractTraceability(strategy);
187
- const sourceRoles=read(safe(root,'docs/agents/digital-human-roles.yaml'));
187
+ const sourceRoles=read(safe(root,'.template-spec/agents/digital-human-roles.yaml'));
188
188
  const roles=sourceApprovalPolicy(sourceRoles);
189
189
  for (const [artifact, version, gateId] of [[strategy,strategy.domain_version,'check.domain-strategy-approved'],[stage,stage.package_version,'check.stage-decision-package-approved']]) {
190
190
  if(artifact.approval) { const record=sourceApprovalRecord(read(safe(root,artifact.approval.approval_ref)),gateId);await sourceApproval(record,roles,root);ensure(artifact.approval.current_version===version,'资产内置批准版本过期'); }
@@ -237,7 +237,7 @@ export async function inspectSource(root, handoffRef) {
237
237
  }
238
238
 
239
239
  function collect(root, handoffRef, handoff, config) {
240
- 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];
240
+ const collected=new Map(), queue=[handoffRef,'CONTEXT.md','.template-spec/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];
241
241
  if(config.prototype)queue.push(config.prototype.preview_root,config.prototype.verification_ref);
242
242
  if(config.prototype?.profile==='H2')queue.push(config.prototype.source_root,config.prototype.lock_ref);
243
243
  const symbolic=config.reference_map || {};
@@ -273,7 +273,7 @@ export async function openBundle(input, action, {readOnly=false}={}) {
273
273
  let root=path.resolve(input);
274
274
  if(lstatSync(root).isFile()){ ensure(!readOnly,'readonly-extraction-required: 只读验证需要已展开目录');root=path.join(temp,'unpacked');mkdirSync(root);archive('unpack',path.resolve(input),root); }
275
275
  const manifest=read(safe(root,'manifest.json'));
276
- schema(manifest,'docs/process/schemas/strategic-handoff-package.schema.json');
276
+ schema(manifest,'.template-spec/process/schemas/strategic-handoff-package.schema.json');
277
277
  const {bundle_digest,...body}=manifest;ensure(bundle_digest===digest(body),'包清单摘要不一致');
278
278
  const paths=manifest.files.map(x=>x.path);
279
279
  ensure(new Set(paths.map(x=>x.toLowerCase())).size===paths.length,'包文件路径重复');
@@ -352,8 +352,8 @@ export async function openDelivery(input, action) {
352
352
  ensure(isDeliveryDirectory(root),'交付目录缺少 delivery-record.json');
353
353
  ensure(!lstatSync(root).isSymbolicLink(),'交付目录不能是 symlink');
354
354
  const recordBytes=readFileSync(safe(root,'delivery-record.json'));
355
- const record=parse(recordBytes);schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');
356
- const verification=read(safe(root,record.verification_ref));schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');
355
+ const record=parse(recordBytes);schema(record,'.template-spec/process/schemas/strategic-handoff-delivery.schema.json');
356
+ const verification=read(safe(root,record.verification_ref));schema(verification,'.template-spec/process/schemas/strategic-handoff-delivery-verification.schema.json');
357
357
  const packageRoot=safe(root,record.package_ref);
358
358
  ensure(lstatSync(packageRoot).isDirectory()&&!lstatSync(packageRoot).isSymbolicLink(),'package_ref 必须指向普通目录');
359
359
  if(record.zip){const archiveRef=safe(root,record.zip.ref);ensure(lstatSync(archiveRef).isFile()&&hash(readFileSync(archiveRef))===record.zip.sha256,'ZIP 摘要不一致');}
@@ -389,11 +389,11 @@ export async function finalizeDelivery({sourceRoot,handoffRef,zip=false,previous
389
389
  const handoffEntry=await openBundle(path.join(stage,'package'),bundle=>bundle.manifest.files.find(file=>file.original_ref===handoffRef));
390
390
  ensure(handoffEntry,'交付包缺少 Handoff 源文件');
391
391
  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};
392
- schema(verification,'docs/process/schemas/strategic-handoff-delivery-verification.schema.json');write(stage,'verification.json',json(verification));
392
+ schema(verification,'.template-spec/process/schemas/strategic-handoff-delivery-verification.schema.json');write(stage,'verification.json',json(verification));
393
393
  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}));
394
394
  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);
395
395
  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};
396
- schema(record,'docs/process/schemas/strategic-handoff-delivery.schema.json');write(stage,'delivery-record.json',json(record));
396
+ schema(record,'.template-spec/process/schemas/strategic-handoff-delivery.schema.json');write(stage,'delivery-record.json',json(record));
397
397
  await openDelivery(stage,()=>null);
398
398
  if(existsSync(delivery)){
399
399
  const existing=await openDelivery(delivery,value=>value.record);
@@ -432,7 +432,7 @@ export async function importBundle({bundle,targetRoot}) {
432
432
  write(stage,'tactical-traceability-draft.json',json({schema_version:1,import_receipt_ref:`${rel}/import-receipt.json`,bundle_digest:b.manifest.bundle_digest,rows}));
433
433
  write(stage,'upstream-change-impact.json',json({schema_version:1,previous_bundle:b.manifest.previous_bundle,changed_source_ids:[...b.changes.updated,...b.changes.removed],added_source_ids:b.changes.added,status:'requires-lifecycle-reconciliation',policy:'mark-dependent-tactical-and-slice-contracts-stale; unknown-dependency-blocks-all'}));
434
434
  }else{
435
- const profileRef=path.join(target,'docs/process/harness-profile.yaml');
435
+ const profileRef=path.join(target,'.template-spec/process/harness-profile.yaml');
436
436
  const profile=existsSync(profileRef)?read(profileRef):null;
437
437
  const capabilities=scopedConsumerCapabilities(target,profile?.handoff?.consumer_capabilities||CAPABILITIES);
438
438
  ensure(Array.isArray(capabilities)&&capabilities.length&&capabilities.every(capability=>CAPABILITIES.includes(capability)),'目标 profile 未声明受支持的消费者能力');
@@ -449,7 +449,7 @@ export async function importBundle({bundle,targetRoot}) {
449
449
  const fromDelivery=Boolean(b.recordBytes);
450
450
  if(fromDelivery)write(stage,'source-delivery-record.json',b.recordBytes);
451
451
  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'};
452
- schema(receipt,fromDelivery?'docs/process/schemas/strategic-handoff-import-receipt-v3.schema.json':'docs/process/schemas/strategic-handoff-import-receipt.schema.json');
452
+ schema(receipt,fromDelivery?'.template-spec/process/schemas/strategic-handoff-import-receipt-v3.schema.json':'.template-spec/process/schemas/strategic-handoff-import-receipt.schema.json');
453
453
  write(stage,'import-receipt.json',json(receipt));
454
454
  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}));
455
455
  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'}));
@@ -459,7 +459,7 @@ export async function importBundle({bundle,targetRoot}) {
459
459
  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}));
460
460
  if(capabilities.includes('frontend-engineering-design')&&frontendRoute.activation!=='not-applicable'){
461
461
  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};
462
- schema(preflight,b.handoff.schema_version===5?'docs/process/schemas/frontend-strategic-preflight-v2.schema.json':'docs/process/schemas/frontend-strategic-preflight.schema.json');
462
+ schema(preflight,b.handoff.schema_version===5?'.template-spec/process/schemas/frontend-strategic-preflight-v2.schema.json':'.template-spec/process/schemas/frontend-strategic-preflight.schema.json');
463
463
  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:[]}))}));
464
464
  }
465
465
  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:[]}))}));
@@ -2,8 +2,8 @@ import path from "node:path";
2
2
  import { ROOT } from "./lifecycle-registry.mjs";
3
3
  import { validateJsonSchema } from "./json-schema.mjs";
4
4
 
5
- export const TASK_PACKAGE_SCHEMA = path.join(ROOT, "docs/process/schemas/digital-human-task-package.schema.json");
6
- export const LEGACY_TASK_PACKAGE_SCHEMA = path.join(ROOT, "docs/process/schemas/subagent-task-package.schema.json");
5
+ export const TASK_PACKAGE_SCHEMA = path.join(ROOT, ".template-spec/process/schemas/digital-human-task-package.schema.json");
6
+ export const LEGACY_TASK_PACKAGE_SCHEMA = path.join(ROOT, ".template-spec/process/schemas/subagent-task-package.schema.json");
7
7
 
8
8
  export function validateTaskPackageSchema(value, schemaPath = TASK_PACKAGE_SCHEMA) {
9
9
  const effectiveSchema = path.resolve(schemaPath) === path.resolve(LEGACY_TASK_PACKAGE_SCHEMA) ? TASK_PACKAGE_SCHEMA : schemaPath;
@@ -16,7 +16,7 @@ import { enforceFrontendDelivery } from "./frontend-delivery-boundary.mjs";
16
16
  import { LEGACY_TASK_PACKAGE_SCHEMA, TASK_PACKAGE_SCHEMA, validateTaskPackageSchema } from "./task-package-schema.mjs";
17
17
 
18
18
  export { LEGACY_TASK_PACKAGE_SCHEMA, TASK_PACKAGE_SCHEMA, validateTaskPackageSchema };
19
- export const TASK_PACKAGE_REGISTRY_REF = "docs/agents/digital-human-roles.yaml";
19
+ export const TASK_PACKAGE_REGISTRY_REF = ".template-spec/agents/digital-human-roles.yaml";
20
20
  export const CONTRACT_KINDS = new Set(["lifecycle-work-unit", "slice-implementation", "template-maintenance"]);
21
21
  export const EXECUTION_STATES = new Set(["Explorer", "Drafter", "Worker", "Reviewer", "Verifier"]);
22
22
  export const WORKFLOW_STATUSES = new Set(["not-started", "active", "paused", "resolved", "failed"]);
@@ -30,5 +30,5 @@ export function enforceTechnicalDesign(state = {}, { root = ROOT, execution, rea
30
30
  if(inValidationPhase())args.push('--validation-dependencies');
31
31
  const verified = spawnSync(process.execPath, args, { cwd: root, encoding: 'utf8', timeout: 60000, maxBuffer: 2 * 1024 * 1024 });
32
32
  ensure(verified.status === 0, `技术设计不可消费: ${verified.error?.message || verified.stderr}`);
33
- if(inValidationPhase()){let output;try{output=JSON.parse(verified.stdout);}catch{throw new TypeError('VALIDATION_RECEIPT_INVALID: 技术设计子进程未返回依赖');}const dependencies=output.validation_dependencies;const required=[file,...(execution?[path.resolve(root,approvedExecutionBinding(execution).ref),path.resolve(root,approvedExecutionBinding(execution).approval_ref),path.resolve(root,'docs/agents/digital-human-roles.yaml')]:[])];ensure(required.every(ref=>dependencies?.files?.some(row=>row.file===ref)),'VALIDATION_RECEIPT_INVALID: 技术设计依赖报告缺少必要原始资产');acceptValidationDependencies(dependencies);}
33
+ if(inValidationPhase()){let output;try{output=JSON.parse(verified.stdout);}catch{throw new TypeError('VALIDATION_RECEIPT_INVALID: 技术设计子进程未返回依赖');}const dependencies=output.validation_dependencies;const required=[file,...(execution?[path.resolve(root,approvedExecutionBinding(execution).ref),path.resolve(root,approvedExecutionBinding(execution).approval_ref),path.resolve(root,'.template-spec/agents/digital-human-roles.yaml')]:[])];ensure(required.every(ref=>dependencies?.files?.some(row=>row.file===ref)),'VALIDATION_RECEIPT_INVALID: 技术设计依赖报告缺少必要原始资产');acceptValidationDependencies(dependencies);}
34
34
  }
@@ -81,7 +81,7 @@ function checkAsset(asset, io) {
81
81
  export function validateUserDecision(record, options = {}) {
82
82
  const io = decisionIO(options);
83
83
  const policy = (options.rolesDoc || loadDigitalHumanRoles()).user_decision_policy;
84
- validateJsonSchema(record, path.join(ROOT, "docs/process/schemas/user-decision.schema.json"), { label: "用户决定记录" });
84
+ validateJsonSchema(record, path.join(ROOT, ".template-spec/process/schemas/user-decision.schema.json"), { label: "用户决定记录" });
85
85
  const { request, responses } = record;
86
86
  const originalRequest = messageFromSource(request.requester_source, io, policy);
87
87
  if (originalRequest.actor_kind !== "biological-human" || originalRequest.principal_ref !== request.requester_ref) decisionError("user-decision-responder-mismatch", "提问者来源不匹配");
@@ -164,6 +164,7 @@ export function verifyUserDecisionFile(ref, options = {}) {
164
164
 
165
165
  export function assertUserDecisionRequirement(requirement, options = {}) {
166
166
  if (!requirement) decisionError("user-decision-response-required", "缺少当前决定及其范围");
167
+ if (requirement.user_decision_ref && requirement.continuation_ref) decisionError("user-decision-proof-conflict", "当前决定与批准延续是两种证明路径,不得同时提供");
167
168
  if (requirement.continuation_ref) return assertDecisionContinuation(requirement, options.rolesDoc || loadDigitalHumanRoles(), options);
168
169
  return verifyUserDecisionFile(requirement.user_decision_ref, { ...options, expected: [requirement] });
169
170
  }
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import path from 'node:path';
4
+ import { lifecycleStatus } from './lib/lifecycle-status.mjs';
5
+
6
+ try {
7
+ const { values } = parseArgs({ strict: true, options: { root: { type: 'string' }, checkpoint: { type: 'string' } } });
8
+ const result = lifecycleStatus({ root: path.resolve(values.root ?? '.'), checkpointRef: values.checkpoint });
9
+ process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
10
+ if (result.blockers.length) process.exitCode = 1;
11
+ } catch (error) {
12
+ process.stdout.write(`${JSON.stringify({ schema_version: 1, read_only: true, blockers: [error.message], owner: '未登记', next_action: `核查状态输入:${error.message}`, execution_authorization: 'not-evaluated', verification_scope: [{ id: 'status-input', status: 'failed', refs: [], reason: error.message }], diagnostics: [{ code: 'status-input-invalid', severity: 'error', message: error.message, source_ref: null, owner: '未登记', recovery: '修复输入后重新读取状态' }], next_step: { action_type: 'repair', command: null, input_refs: [], prerequisites: ['提供有效项目根和 checkpoint 引用'] } }, null, 2)}\n`);
13
+ process.exitCode = 1;
14
+ }
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import { parseArgs } from 'node:util';
3
+ import path from 'node:path';
4
+ import { preparePlanSpecEntry, diffPlanSpecEntry } from './lib/plan-spec-entry-view.mjs';
5
+
6
+ try {
7
+ const [operation, ...args] = process.argv.slice(2);
8
+ const { values } = parseArgs({ args, strict: true, options: {
9
+ root: { type: 'string' }, feature: { type: 'string' }, plan: { type: 'string' },
10
+ 'context-reconciliation': { type: 'string' }, review: { type: 'string' },
11
+ } });
12
+ const root = path.resolve(values.root ?? '.');
13
+ let result;
14
+ if (operation === 'prepare') result = preparePlanSpecEntry({ root, featureId: values.feature, planRef: values.plan, contextRef: values['context-reconciliation'] });
15
+ else if (operation === 'diff') result = diffPlanSpecEntry({ root, reviewRef: values.review });
16
+ else throw new TypeError('用法: scripts/plan-spec-entry prepare --root <项目> --feature <id> --plan <ref> --context-reconciliation <ref> | diff --root <项目> --review <ref>');
17
+ process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
18
+ } catch (error) {
19
+ process.stdout.write(`${JSON.stringify({ schema_version: 1, status: 'blocked', blocking_signals: ['plan-spec-entry-input-unavailable'], missing_requirements: [error.message], approval_created: false }, null, 2)}\n`);
20
+ process.exitCode = 1;
21
+ }