create-yss-spec 3.1.0 → 3.2.0

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 (302) hide show
  1. package/README.md +119 -89
  2. package/bin/create-yss-spec.js +11 -3
  3. package/package.json +9 -2
  4. package/src/api/_sync-service.js +191 -0
  5. package/src/api/index.js +22 -0
  6. package/src/api/project-diff.js +9 -0
  7. package/src/api/project-doctor.js +10 -0
  8. package/src/api/template-apply.js +10 -0
  9. package/src/api/template-plan.js +9 -0
  10. package/src/cli/args.js +60 -0
  11. package/src/cli/error-output.js +52 -0
  12. package/src/cli/flags.js +9 -0
  13. package/src/cli/help.js +95 -0
  14. package/src/cli/index.js +82 -0
  15. package/src/cli/plan-output.js +61 -0
  16. package/src/cli/prompts.js +91 -0
  17. package/src/cli/router.js +41 -0
  18. package/src/cli.js +5 -2253
  19. package/src/commands/attach.js +280 -0
  20. package/src/commands/diff.js +23 -0
  21. package/src/commands/doctor.js +417 -0
  22. package/src/commands/init.js +193 -0
  23. package/src/commands/sync.js +146 -0
  24. package/src/commands/update.js +14 -0
  25. package/src/contracts/apply-result-v1.json +45 -0
  26. package/src/contracts/customization-policy-v1.json +28 -0
  27. package/src/contracts/doctor-report-v1.json +29 -0
  28. package/src/contracts/error-envelope-v1.json +24 -0
  29. package/src/contracts/generator-policy-v1.json +24 -0
  30. package/src/contracts/ownership-policy-v1.json +40 -0
  31. package/src/contracts/plan-schema-v1.json +115 -0
  32. package/src/family-identity.js +365 -0
  33. package/src/family-runtime.js +23 -0
  34. package/src/filesystem/apply-plan.js +44 -0
  35. package/src/filesystem/copy-path.js +28 -0
  36. package/src/filesystem/path-utils.js +67 -0
  37. package/src/filesystem/transaction-runner.js +41 -0
  38. package/src/filesystem/transaction.js +153 -0
  39. package/src/git/submodule.js +115 -0
  40. package/src/git/worktree.js +69 -0
  41. package/src/template/attach-planner-runtime.js +51 -0
  42. package/src/template/attach-planner.js +160 -0
  43. package/src/template/instance-runtime.js +463 -0
  44. package/src/template/lifecycle-metadata.js +99 -0
  45. package/src/template/lifecycle-policy.js +129 -0
  46. package/src/template/lifecycle-runtime.js +90 -0
  47. package/src/template/migration-planner.js +95 -0
  48. package/src/template/migration-runtime.js +247 -0
  49. package/src/template/ownership-metadata.js +79 -0
  50. package/src/template/ownership-policy.js +149 -0
  51. package/src/template/ownership-runtime.js +109 -0
  52. package/src/template/plan-schema.js +36 -0
  53. package/src/template/sync-planner-runtime.js +57 -0
  54. package/src/template/sync-planner.js +206 -0
  55. package/src/template/verification-runtime.js +154 -0
  56. package/src/validation/identity.js +41 -0
  57. package/src/validation/metadata.js +105 -0
  58. package/src/validation/security.js +67 -0
  59. package/src/validation/snapshot.js +47 -0
  60. package/template/.agents/skills/.strategic-design-skills-manifest.json +1 -1
  61. package/template/.agents/skills/yss-domain/SKILL.md +3 -3
  62. package/template/.agents/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  63. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  64. package/template/.agents/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  65. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  66. package/template/.agents/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  67. package/template/.agents/skills/yss-mvc-design/SKILL.md +16 -0
  68. package/template/.agents/skills/yss-mvc-design/agents/openai.yaml +4 -0
  69. package/template/.agents/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  70. package/template/.agents/skills/yss-product-lifecycle/SKILL.md +4 -2
  71. package/template/.agents/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  72. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  73. package/template/.agents/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  74. package/template/.agents/skills/yss-product-lifecycle/references/state-model.md +1 -1
  75. package/template/.agents/skills/yss-tactical-design/SKILL.md +2 -2
  76. package/template/.agents/skills/yss-tactical-design/references/output-template.md +2 -0
  77. package/template/.agents/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  78. package/template/.agents/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  79. package/template/.agents/skills/yss-technical-design/SKILL.md +31 -0
  80. package/template/.agents/skills/yss-technical-design/agents/openai.yaml +4 -0
  81. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  82. package/template/.agents/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  83. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  84. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  85. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  86. package/template/.agents/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  87. package/template/.agents/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  88. package/template/.agents/skills/yss-ui/SKILL.md +2 -0
  89. package/template/.claude/skills/yss-domain/SKILL.md +3 -3
  90. package/template/.claude/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  91. package/template/.claude/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  92. package/template/.claude/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  93. package/template/.claude/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  94. package/template/.claude/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  95. package/template/.claude/skills/yss-mvc-design/SKILL.md +16 -0
  96. package/template/.claude/skills/yss-mvc-design/agents/openai.yaml +4 -0
  97. package/template/.claude/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  98. package/template/.claude/skills/yss-product-lifecycle/SKILL.md +4 -2
  99. package/template/.claude/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  100. package/template/.claude/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  101. package/template/.claude/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  102. package/template/.claude/skills/yss-product-lifecycle/references/state-model.md +1 -1
  103. package/template/.claude/skills/yss-tactical-design/SKILL.md +2 -2
  104. package/template/.claude/skills/yss-tactical-design/references/output-template.md +2 -0
  105. package/template/.claude/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  106. package/template/.claude/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  107. package/template/.claude/skills/yss-technical-design/SKILL.md +31 -0
  108. package/template/.claude/skills/yss-technical-design/agents/openai.yaml +4 -0
  109. package/template/.claude/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  110. package/template/.claude/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  111. package/template/.claude/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  112. package/template/.claude/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  113. package/template/.claude/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  114. package/template/.claude/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  115. package/template/.claude/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  116. package/template/.claude/skills/yss-ui/SKILL.md +2 -0
  117. package/template/.codex/skills/yss-domain/SKILL.md +3 -3
  118. package/template/.codex/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  119. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  120. package/template/.codex/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  121. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  122. package/template/.codex/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  123. package/template/.codex/skills/yss-mvc-design/SKILL.md +16 -0
  124. package/template/.codex/skills/yss-mvc-design/agents/openai.yaml +4 -0
  125. package/template/.codex/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  126. package/template/.codex/skills/yss-product-lifecycle/SKILL.md +4 -2
  127. package/template/.codex/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  128. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  129. package/template/.codex/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  130. package/template/.codex/skills/yss-product-lifecycle/references/state-model.md +1 -1
  131. package/template/.codex/skills/yss-tactical-design/SKILL.md +2 -2
  132. package/template/.codex/skills/yss-tactical-design/references/output-template.md +2 -0
  133. package/template/.codex/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  134. package/template/.codex/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  135. package/template/.codex/skills/yss-technical-design/SKILL.md +31 -0
  136. package/template/.codex/skills/yss-technical-design/agents/openai.yaml +4 -0
  137. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  138. package/template/.codex/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  139. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  140. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  141. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  142. package/template/.codex/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  143. package/template/.codex/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  144. package/template/.codex/skills/yss-ui/SKILL.md +2 -0
  145. package/template/.cursor/skills/yss-domain/SKILL.md +3 -3
  146. package/template/.cursor/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  147. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  148. package/template/.cursor/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  149. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  150. package/template/.cursor/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  151. package/template/.cursor/skills/yss-mvc-design/SKILL.md +16 -0
  152. package/template/.cursor/skills/yss-mvc-design/agents/openai.yaml +4 -0
  153. package/template/.cursor/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  154. package/template/.cursor/skills/yss-product-lifecycle/SKILL.md +4 -2
  155. package/template/.cursor/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  156. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  157. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  158. package/template/.cursor/skills/yss-product-lifecycle/references/state-model.md +1 -1
  159. package/template/.cursor/skills/yss-tactical-design/SKILL.md +2 -2
  160. package/template/.cursor/skills/yss-tactical-design/references/output-template.md +2 -0
  161. package/template/.cursor/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  162. package/template/.cursor/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  163. package/template/.cursor/skills/yss-technical-design/SKILL.md +31 -0
  164. package/template/.cursor/skills/yss-technical-design/agents/openai.yaml +4 -0
  165. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  166. package/template/.cursor/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  167. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  168. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  169. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  170. package/template/.cursor/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  171. package/template/.cursor/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  172. package/template/.cursor/skills/yss-ui/SKILL.md +2 -0
  173. package/template/.pi/skills/yss-domain/SKILL.md +3 -3
  174. package/template/.pi/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  175. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  176. package/template/.pi/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  177. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  178. package/template/.pi/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  179. package/template/.pi/skills/yss-mvc-design/SKILL.md +16 -0
  180. package/template/.pi/skills/yss-mvc-design/agents/openai.yaml +4 -0
  181. package/template/.pi/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  182. package/template/.pi/skills/yss-product-lifecycle/SKILL.md +4 -2
  183. package/template/.pi/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  184. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  185. package/template/.pi/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  186. package/template/.pi/skills/yss-product-lifecycle/references/state-model.md +1 -1
  187. package/template/.pi/skills/yss-tactical-design/SKILL.md +2 -2
  188. package/template/.pi/skills/yss-tactical-design/references/output-template.md +2 -0
  189. package/template/.pi/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  190. package/template/.pi/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  191. package/template/.pi/skills/yss-technical-design/SKILL.md +31 -0
  192. package/template/.pi/skills/yss-technical-design/agents/openai.yaml +4 -0
  193. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  194. package/template/.pi/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  195. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  196. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  197. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  198. package/template/.pi/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  199. package/template/.pi/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  200. package/template/.pi/skills/yss-ui/SKILL.md +2 -0
  201. package/template/.qoder/skills/yss-domain/SKILL.md +3 -3
  202. package/template/.qoder/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  203. package/template/.qoder/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  204. package/template/.qoder/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  205. package/template/.qoder/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  206. package/template/.qoder/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  207. package/template/.qoder/skills/yss-mvc-design/SKILL.md +16 -0
  208. package/template/.qoder/skills/yss-mvc-design/agents/openai.yaml +4 -0
  209. package/template/.qoder/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  210. package/template/.qoder/skills/yss-product-lifecycle/SKILL.md +4 -2
  211. package/template/.qoder/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  212. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  213. package/template/.qoder/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  214. package/template/.qoder/skills/yss-product-lifecycle/references/state-model.md +1 -1
  215. package/template/.qoder/skills/yss-tactical-design/SKILL.md +2 -2
  216. package/template/.qoder/skills/yss-tactical-design/references/output-template.md +2 -0
  217. package/template/.qoder/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  218. package/template/.qoder/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  219. package/template/.qoder/skills/yss-technical-design/SKILL.md +31 -0
  220. package/template/.qoder/skills/yss-technical-design/agents/openai.yaml +4 -0
  221. package/template/.qoder/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  222. package/template/.qoder/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  223. package/template/.qoder/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  224. package/template/.qoder/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  225. package/template/.qoder/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  226. package/template/.qoder/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  227. package/template/.qoder/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  228. package/template/.qoder/skills/yss-ui/SKILL.md +2 -0
  229. package/template/.trae/skills/yss-domain/SKILL.md +3 -3
  230. package/template/.trae/skills/yss-frontend-scaffold-generator/SKILL.md +2 -0
  231. package/template/.trae/skills/yss-implementation-contract-compiler/SKILL.md +4 -2
  232. package/template/.trae/skills/yss-implementation-contract-compiler/references/boundaries.md +5 -0
  233. package/template/.trae/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +16 -2
  234. package/template/.trae/skills/yss-implementation-contract-compiler/references/slice-implementation-contract.md +10 -1
  235. package/template/.trae/skills/yss-mvc-design/SKILL.md +16 -0
  236. package/template/.trae/skills/yss-mvc-design/agents/openai.yaml +4 -0
  237. package/template/.trae/skills/yss-mvc-design/references/mvc-design.schema.json +315 -0
  238. package/template/.trae/skills/yss-product-lifecycle/SKILL.md +4 -2
  239. package/template/.trae/skills/yss-product-lifecycle/references/artifact-dependencies.md +2 -2
  240. package/template/.trae/skills/yss-product-lifecycle/references/orchestration-contract.yaml +14 -9
  241. package/template/.trae/skills/yss-product-lifecycle/references/orchestration.md +1 -1
  242. package/template/.trae/skills/yss-product-lifecycle/references/state-model.md +1 -1
  243. package/template/.trae/skills/yss-tactical-design/SKILL.md +2 -2
  244. package/template/.trae/skills/yss-tactical-design/references/output-template.md +2 -0
  245. package/template/.trae/skills/yss-tactical-design/references/tactical-design-contract.md +3 -1
  246. package/template/.trae/skills/yss-tactical-design/scripts/validate-tactical-design.mjs +3 -2
  247. package/template/.trae/skills/yss-technical-design/SKILL.md +31 -0
  248. package/template/.trae/skills/yss-technical-design/agents/openai.yaml +4 -0
  249. package/template/.trae/skills/yss-technical-design/references/technical-design-common.schema.json +290 -0
  250. package/template/.trae/skills/yss-technical-design/references/technical-design-contract.md +31 -0
  251. package/template/.trae/skills/yss-technical-design/references/technical-design.schema.json +759 -0
  252. package/template/.trae/skills/yss-technical-design/scripts/generate-schema.mjs +20 -0
  253. package/template/.trae/skills/yss-technical-design/scripts/validate-technical-design.mjs +134 -0
  254. package/template/.trae/skills/yss-technical-design/tests/fixtures.mjs +32 -0
  255. package/template/.trae/skills/yss-technical-design/tests/run-scenarios.mjs +82 -0
  256. package/template/.trae/skills/yss-ui/SKILL.md +2 -0
  257. package/template/CONTEXT.md +4 -1
  258. package/template/README.md +4 -0
  259. package/template/docs/agents/digital-human-roles.yaml +3 -2
  260. package/template/docs/agents/yss-skill-registry.yaml +20 -1
  261. package/template/docs/architecture/templates/architecture-review-checklist.md +1 -1
  262. package/template/docs/architecture/templates/system-overview-design-template.md +15 -4
  263. package/template/docs/process/frontend-backend-delivery.md +72 -0
  264. package/template/docs/process/implementation-repo-integration.md +2 -0
  265. package/template/docs/process/lifecycle-artifact-map.md +3 -0
  266. package/template/docs/process/lifecycle-registry-baseline.json +4 -1
  267. package/template/docs/process/lifecycle-registry.yaml +14 -2
  268. package/template/docs/process/schemas/backend-delivery-verification.schema.json +113 -0
  269. package/template/docs/process/schemas/backend-delivery.schema.json +301 -0
  270. package/template/docs/process/schemas/digital-human-task-package.schema.json +8 -0
  271. package/template/docs/process/schemas/frontend-delivery-acceptance.schema.json +200 -0
  272. package/template/docs/process/schemas/frontend-implementation-evidence.schema.json +3 -0
  273. package/template/docs/process/schemas/strategic-design-handoff.schema.json +77 -4
  274. package/template/docs/process/strategic-handoff-package.md +4 -2
  275. package/template/docs/process/template-verification-profiles.yaml +20 -0
  276. package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +21 -206
  277. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +63 -963
  278. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +11 -14
  279. package/template/docs/user-guide//350/256/276/345/244/207/345/200/237/347/224/250/350/264/257/347/251/277/346/241/210/344/276/213.md +127 -0
  280. package/template/scripts/backend-delivery +14 -0
  281. package/template/scripts/fixtures/backend-delivery/revision-server.mjs +11 -0
  282. package/template/scripts/fixtures/strategic-handoff/fixture.mjs +3 -2
  283. package/template/scripts/instantiate-harness +69 -0
  284. package/template/scripts/lib/backend-delivery.mjs +164 -0
  285. package/template/scripts/lib/frontend-delivery-boundary.mjs +49 -0
  286. package/template/scripts/lib/frontend-delivery.mjs +73 -0
  287. package/template/scripts/lib/harness-execution-scope.mjs +52 -0
  288. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -2
  289. package/template/scripts/lib/lifecycle-transition.mjs +7 -0
  290. package/template/scripts/lib/strategic-handoff-consumption.mjs +17 -10
  291. package/template/scripts/lib/strategic-handoff-design-targets.mjs +15 -0
  292. package/template/scripts/lib/strategic-handoff.mjs +1 -1
  293. package/template/scripts/lib/task-package.mjs +7 -0
  294. package/template/scripts/lib/technical-design-boundary.mjs +23 -0
  295. package/template/scripts/sync-strategic-handoff-tools +5 -2
  296. package/template/scripts/verify-frontend-delivery +9 -0
  297. package/template/scripts/verify-frontend-delivery-scenarios +131 -0
  298. package/template/scripts/verify-frontend-implementation-evidence +2 -0
  299. package/template/scripts/verify-strategic-handoff-package-scenarios +7 -1
  300. package/template/skills-lock.json +43 -13
  301. package/template.manifest.json +43 -1
  302. package/template.snapshot.json +5 -5
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, writeFileSync } from 'node:fs';
3
+ import { fileURLToPath } from 'node:url';
4
+ const load = ref => JSON.parse(readFileSync(new URL(ref, import.meta.url), 'utf8'));
5
+ const schema = load('../references/technical-design-common.schema.json');
6
+ const branches = [
7
+ ['domain-driven', '../../yss-tactical-design/references/tactical-design.schema.json'],
8
+ ['layered-mvc', '../../yss-mvc-design/references/mvc-design.schema.json']
9
+ ];
10
+ schema.$comment = 'Generated by scripts/generate-schema.mjs from common and specialist schemas. Do not hand-edit.';
11
+ schema.allOf = branches.map(([family, ref]) => {
12
+ const branch = load(ref); delete branch.$id; delete branch.$schema;
13
+ return { if: { properties: { architecture: { properties: { family: { const: family } } } } }, then: { properties: { design: branch } } };
14
+ });
15
+ const output = fileURLToPath(new URL('../references/technical-design.schema.json', import.meta.url));
16
+ const bytes = `${JSON.stringify(schema, null, 2)}\n`;
17
+ if (process.argv.includes('--check')) {
18
+ if (readFileSync(output, 'utf8') !== bytes) throw new Error('技术设计 Schema 投影漂移,请运行 generate-schema.mjs');
19
+ } else writeFileSync(output, bytes);
20
+ process.stdout.write('技术设计分支 Schema 已同步\n');
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from 'node:fs';
3
+ import path from 'node:path';
4
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
+ import { parseArgs } from 'node:util';
6
+ import { assertScaffoldUserDecision } from '../../../../scripts/lib/user-decision.mjs';
7
+ import { validateJsonSchema } from '../../../../scripts/lib/json-schema.mjs';
8
+ import { read, safe, hash, digest, ensure } from '../../../../scripts/lib/strategic-handoff-io.mjs';
9
+ import { validate as validateDdd } from '../../yss-tactical-design/scripts/validate-tactical-design.mjs';
10
+ import { designTargets } from '../../../../scripts/lib/strategic-handoff-design-targets.mjs';
11
+ import { verifyConsumption } from '../../../../scripts/lib/strategic-handoff-consumption.mjs';
12
+
13
+ const schema = fileURLToPath(new URL('../references/technical-design.schema.json', import.meta.url));
14
+ const text = x => typeof x === 'string' && x.trim().length > 0;
15
+ const nonempty = xs => Array.isArray(xs) && xs.length > 0 && xs.every(text);
16
+ export const technicalDigest = data => digest(Object.fromEntries(Object.entries(data).filter(([key]) => key !== 'digest')));
17
+
18
+
19
+ function validateMvc(design) {
20
+ const modules = new Map(design.module_catalog.map(item => [item.module_id, item]));
21
+ const cases = new Map(design.use_case_catalog.map(item => [item.use_case_id, item]));
22
+ const rules = new Set(design.rule_catalog.map(item => item.rule_id));
23
+ const permitted = {
24
+ server: ['service','core','client'], service: ['repository','adapter'], core: ['repository','adapter'],
25
+ repository: [], adapter: ['client','feign-client'], client: [], 'feign-client': ['client']
26
+ };
27
+ for (const module of modules.values()) for (const ref of module.depends_on) {
28
+ ensure(modules.has(ref) && permitted[module.layer].includes(modules.get(ref).layer), `模块依赖越界: ${module.module_id} -> ${ref}`);
29
+ }
30
+ for (const item of cases.values()) {
31
+ ensure(['service','core'].includes(modules.get(item.module_ref)?.layer), `用例必须属于 service/core: ${item.use_case_id}`);
32
+ ensure(item.rule_refs.every(ref => rules.has(ref)), `用例引用未声明规则: ${item.use_case_id}`);
33
+ }
34
+ for (const rule of design.rule_catalog) ensure(rule.use_case_refs.every(ref => cases.has(ref) && cases.get(ref).rule_refs.includes(rule.rule_id)), `规则与用例未双向关联: ${rule.rule_id}`);
35
+ for (const item of design.state_transition_catalog) ensure(cases.has(item.use_case_ref), '状态转换引用未声明用例');
36
+ if (!design.state_transition_catalog.length) ensure(text(design.state_not_applicable_reason), '无状态转换必须说明原因');
37
+ for (const item of design.persistence_mapping) ensure(cases.has(item.use_case_ref) && modules.get(item.repository_ref)?.layer === 'repository', '持久化映射的用例或 Repository 引用无效');
38
+ for (const item of design.integration_catalog) ensure(modules.get(item.adapter_ref)?.layer === 'adapter', '外部集成必须关联 Adapter');
39
+ if (!design.integration_catalog.length) ensure(text(design.integration_not_applicable_reason), '无外部集成必须说明原因');
40
+ }
41
+
42
+ export function verifyArchitecture(data, root) {
43
+ const binding = data.architecture;
44
+ const file = safe(root, binding.decision_ref);
45
+ ensure(hash(readFileSync(file)) === binding.decision_digest, '架构来源摘要漂移');
46
+ const record = read(file);
47
+ if (binding.source_kind === 'scaffold-decision') {
48
+ const decision = record.decisions?.find(item => item.project_id === binding.project_id);
49
+ ensure(record.status === 'current' && record.template === false, '架构选择记录必须为当前正式记录');
50
+ ensure(decision && ['user-confirmed','lifecycle-approved','consumed'].includes(decision.status), '分支设计前必须确认项目架构');
51
+ ensure(decision.confirmed_architecture === binding.family, '技术设计与确认架构不匹配');
52
+ ensure(text(decision.user_confirmation?.confirmation_ref) && text(decision.user_confirmation?.confirmed_by), '缺少真实架构确认引用');
53
+ assertScaffoldUserDecision(decision, { root });
54
+ } else {
55
+ // Registration formats differ by repository; bind the actual registered identity,
56
+ // never infer architecture from a directory or a design's self-declaration.
57
+ const entry = record.repositories?.find(item => item.project_id === binding.project_id) ?? record;
58
+ ensure(entry.project_id === binding.project_id && entry.architecture_identity?.architecture_family === binding.family, '技术设计与既有工程登记架构不匹配');
59
+ ensure(!['stale','blocked'].includes(record.status) && !['stale','blocked'].includes(entry.status), '工程登记已失效');
60
+ }
61
+ }
62
+
63
+ function validateLocalTraceability(data, root, sliceRef) {
64
+ const { ids, seams } = designTargets(data);
65
+ const sources = new Map(data.source_items.map(item => [item.source_id, item]));
66
+ ensure(sources.size === data.source_items.length, '源规则或场景 ID 重复');
67
+ const rows = new Map(data.traceability.map(item => [item.source_id, item]));
68
+ ensure(rows.size === data.traceability.length, '承接记录重复');
69
+ ensure(data.strategic_handoff || sources.size > 0, '无战略包时必须列出需求规则与场景');
70
+ for (const source of sources.values()) ensure(data.inputs.some(item => item.ref === source.source_ref), '源规则或场景未绑定当前输入');
71
+ for (const id of rows.keys()) ensure(sources.has(id), `未知承接来源: ${id}`);
72
+ for (const [id, source] of sources) {
73
+ const row = rows.get(id);
74
+ ensure(row, `缺少规则或场景承接: ${id}`);
75
+ if (row.disposition === 'implemented') {
76
+ ensure(nonempty(row.tactical_refs) && row.tactical_refs.every(ref => ids.has(ref)), `设计落点悬空: ${id}`);
77
+ ensure(nonempty(row.test_seam_refs) && row.test_seam_refs.every(ref => seams.has(ref) && row.tactical_refs.includes(seams.get(ref).subject_ref)), `测试 seam 未关联设计落点: ${id}`);
78
+ if (source.kind === 'scenario' && source.critical) ensure(['success','failure'].every(outcome => row.scenario_tests?.some(test => test.outcome === outcome && row.test_seam_refs.includes(test.seam_ref))), `关键场景缺少成功/失败测试: ${id}`);
79
+ ensure(nonempty(row.evidence_refs), `缺少承接证据: ${id}`);
80
+ } else if (row.disposition === 'not-applicable') {
81
+ ensure(text(row.reason) && nonempty(row.evidence_refs), `不适用缺少依据: ${id}`);
82
+ } else {
83
+ if (row.disposition === 'deferred') for (const key of ['reason','risk','owner','followup_ticket_ref','verification_plan','target_version']) ensure(text(row[key]), `延期缺少 ${key}: ${id}`);
84
+ ensure(sliceRef && row.dependency_status === 'known' && nonempty(row.dependent_slice_refs) && !row.dependent_slice_refs.includes(sliceRef), `未闭合承接阻断当前范围: ${id}`);
85
+ }
86
+ for (const ref of row.evidence_refs || []) safe(root, ref);
87
+ }
88
+ }
89
+
90
+ export async function validateTechnicalDesign(data, { root = process.cwd(), sliceRef, legacyDdd = false } = {}) {
91
+ if (data?.schema_version === 1) {
92
+ ensure(legacyDdd, '旧 v1 合同需要显式 --legacy-ddd,仅按 DDD 兼容读取');
93
+ const errors = validateDdd(data);
94
+ ensure(!errors.length, errors.join('; '));
95
+ if (sliceRef) ensure(data.status === 'approved', '切片只能消费 approved 设计');
96
+ if (data.strategic_handoff || data.strategic_context_import_ref || data.upstream_impact?.source_kind === 'strategic-handoff') {
97
+ const result = await verifyConsumption(data, { root, sliceRef });
98
+ ensure(result.result === 'verified', JSON.stringify(result));
99
+ }
100
+ return { result: 'legacy-ddd-read-only', architecture_family: 'domain-driven', status: data.status };
101
+ }
102
+ validateJsonSchema(data, schema, { label: '技术设计合同' });
103
+ ensure(data.digest === technicalDigest(data), '技术设计合同摘要不匹配');
104
+ ensure(!['stale','blocked','drift','new_impacts'].includes(data.status), '设计状态不可消费');
105
+ if (sliceRef) ensure(data.status === 'approved', '切片只能消费 approved 设计');
106
+ verifyArchitecture(data, root);
107
+ ensure(data.inputs.some(item => item.kind === 'context' && item.ref === 'CONTEXT.md') && data.inputs.some(item => item.kind === 'spec'), '共同输入缺少根 CONTEXT.md 或 Spec');
108
+ for (const input of data.inputs) ensure(hash(readFileSync(safe(root, input.ref))) === input.digest, `输入摘要漂移: ${input.ref}`);
109
+ for (const ref of data.evidence_refs) safe(root, ref);
110
+ if (data.status === 'approved') ensure(data.evidence_refs.length > 0, '已批准设计缺少评审证据');
111
+ if (data.architecture.family === 'domain-driven') {
112
+ const errors = validateDdd(data.design);
113
+ ensure(!errors.length, errors.join('; '));
114
+ ensure(data.design.status === data.status, 'DDD 分支状态与共同合同不一致');
115
+ ensure(data.inputs.some(item => item.kind === 'strategic'), 'DDD 分支缺少战略领域输入');
116
+ ensure(!data.design.strategic_handoff && !data.design.strategic_context_import_ref, '战略绑定只允许在共同合同中维护');
117
+ } else validateMvc(data.design);
118
+ const { ids, seams } = designTargets(data);
119
+ for (const seam of seams.values()) ensure(ids.has(seam.subject_ref), `测试 seam 设计对象悬空: ${seam.seam_id}`);
120
+ validateLocalTraceability(data, root, sliceRef);
121
+ if (data.strategic_handoff) {
122
+ const result = await verifyConsumption(data, { root, sliceRef });
123
+ ensure(result.result === 'verified', JSON.stringify(result));
124
+ }
125
+ return { result: 'ready-for-lifecycle-review', technical_design_id: data.technical_design_id, architecture_family: data.architecture.family, status: data.status, digest: data.digest };
126
+ }
127
+
128
+ async function main() {
129
+ const { values, positionals } = parseArgs({ allowPositionals: true, options: { root: { type: 'string', default: process.cwd() }, slice: { type: 'string' }, 'legacy-ddd': { type: 'boolean', default: false } } });
130
+ ensure(positionals.length === 1, '用法: validate-technical-design.mjs <合同> --root <项目根> [--slice <ID>] [--legacy-ddd]');
131
+ const result = await validateTechnicalDesign(read(path.resolve(positionals[0])), { root: values.root, sliceRef: values.slice, legacyDdd: values['legacy-ddd'] });
132
+ process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
133
+ }
134
+ if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) main().catch(error => { process.stderr.write(`${JSON.stringify({ result: 'blocked', errors: [error.message] })}\n`); process.exitCode = 1; });
@@ -0,0 +1,32 @@
1
+ import { writeFileSync, readFileSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import { hash } from '../../../../scripts/lib/strategic-handoff-io.mjs';
4
+ import { technicalDigest } from '../scripts/validate-technical-design.mjs';
5
+ export function mvcFixture(root) {
6
+ const files = {
7
+ 'CONTEXT.md': '# 业务上下文\n',
8
+ 'spec.md': '# 需求\nrule.valid: 必填材料完整。scenario.submit: 提交成功或校验失败。\n',
9
+ 'registration.json': JSON.stringify({ project_id: 'example', status: 'current', architecture_identity: { architecture_family: 'layered-mvc' } }),
10
+ 'review.md': '设计评审测试证据;不构成真实批准。\n'
11
+ };
12
+ for (const [ref, bytes] of Object.entries(files)) writeFileSync(path.join(root, ref), bytes);
13
+ const data = {
14
+ schema_version: 2, technical_design_id: 'technical-design.example', version: 'v1', status: 'ready-for-human', context_ref: 'CONTEXT.md',
15
+ architecture: { family: 'layered-mvc', project_id: 'example', source_kind: 'existing-registration', decision_ref: 'registration.json', decision_digest: hash(readFileSync(path.join(root, 'registration.json'))) },
16
+ inputs: ['CONTEXT.md','spec.md'].map((ref,index) => ({ kind: index ? 'spec' : 'context', ref, version: 'v1', digest: hash(readFileSync(path.join(root,ref))) })),
17
+ source_items: [{ source_id: 'rule.valid', kind: 'rule', critical: false, source_ref: 'spec.md' }, { source_id: 'scenario.submit', kind: 'scenario', critical: true, source_ref: 'spec.md' }],
18
+ traceability: ['rule.valid','scenario.submit'].map(source_id => ({ source_id, disposition: 'implemented', tactical_refs: ['use-case.submit'], test_seam_refs: ['test-seam.success','test-seam.failure'], evidence_refs: ['spec.md'], dependency_status: 'known', dependent_slice_refs: ['slice.submit'], scenario_tests: [{ outcome: 'success', seam_ref: 'test-seam.success' }, { outcome: 'failure', seam_ref: 'test-seam.failure' }] })),
19
+ design: {
20
+ module_catalog: [{ module_id: 'module.server', layer: 'server', responsibility: 'HTTP 适配', depends_on: ['module.service'] }, { module_id: 'module.service', layer: 'service', responsibility: '提交用例和事务', depends_on: ['module.repository'] }, { module_id: 'module.repository', layer: 'repository', responsibility: '数据持久化', depends_on: [] }],
21
+ use_case_catalog: [{ use_case_id: 'use-case.submit', module_ref: 'module.service', flow: ['校验材料','保存申请'], rule_refs: ['rule.valid'], failure_handling: '材料不完整拒绝提交,写入失败回滚' }],
22
+ rule_catalog: [{ rule_id: 'rule.valid', statement: '材料必须完整', use_case_refs: ['use-case.submit'] }],
23
+ state_transition_catalog: [], state_not_applicable_reason: '本范围只登记申请,无状态流转',
24
+ consistency_policy: { transaction_boundary: '一次提交同一事务', rollback: '写入失败整体回滚', concurrency: '唯一约束拒绝竞争提交', idempotency: '请求键唯一' },
25
+ persistence_mapping: [{ mapping_id: 'mapping.application', use_case_ref: 'use-case.submit', repository_ref: 'module.repository', storage_model: 'application', notes: '请求键唯一' }],
26
+ integration_catalog: [], integration_not_applicable_reason: '无外部集成',
27
+ test_seams: [{ seam_id: 'test-seam.success', kind: 'service', subject_ref: 'use-case.submit', assertion: '完整材料保存成功' }, { seam_id: 'test-seam.failure', kind: 'service', subject_ref: 'use-case.submit', assertion: '缺材料时不写入' }]
28
+ }, evidence_refs: ['review.md']
29
+ };
30
+ data.digest = technicalDigest(data);
31
+ return data;
32
+ }
@@ -0,0 +1,82 @@
1
+ #!/usr/bin/env node
2
+ import assert from 'node:assert/strict';
3
+ import { mkdtempSync, readFileSync, writeFileSync, rmSync } from 'node:fs';
4
+ import { tmpdir } from 'node:os';
5
+ import path from 'node:path';
6
+ import { fileURLToPath } from 'node:url';
7
+ import { attachScaffoldDecisionFixture } from '../../../../scripts/fixtures/user-decision/build-fixture.mjs';
8
+ import { mvcFixture } from './fixtures.mjs';
9
+ import { technicalDigest, validateTechnicalDesign } from '../scripts/validate-technical-design.mjs';
10
+ import { hash, read } from '../../../../scripts/lib/strategic-handoff-io.mjs';
11
+ import { enforceTechnicalDesign } from '../../../../scripts/lib/technical-design-boundary.mjs';
12
+ import { compileDefaultImplementationContract, evaluateContractFreshness, loadCompilerContract } from '../../../../scripts/lib/implementation-contract-compiler.mjs';
13
+ import { loadSkillRegistry } from '../../../../scripts/lib/skill-registry.mjs';
14
+ const root = mkdtempSync(path.join(tmpdir(), 'yss-technical-design-'));
15
+ let checks = 0;
16
+ try {
17
+ const mvc = mvcFixture(root);
18
+ const validate = data => validateTechnicalDesign(data, { root });
19
+ assert.equal((await validate(mvc)).architecture_family, 'layered-mvc'); checks++;
20
+ async function rejected(change, pattern) {
21
+ const data = structuredClone(mvc); change(data); data.digest = technicalDigest(data);
22
+ await assert.rejects(() => validate(data), pattern); checks++;
23
+ }
24
+ await rejected(d => { d.architecture.family = 'mixed'; }, /not one of/);
25
+ await rejected(d => { d.architecture.project_id = 'wrong'; }, /登记架构不匹配/);
26
+ await rejected(d => { d.architecture.decision_digest = `sha256:${'0'.repeat(64)}`; }, /来源摘要漂移/);
27
+ await rejected(d => { d.traceability.pop(); }, /缺少规则或场景承接/);
28
+ await rejected(d => { d.traceability[1].scenario_tests.pop(); }, /成功\/失败测试/);
29
+ await rejected(d => { d.traceability[0].tactical_refs = ['aggregate.fake']; }, /设计落点悬空/);
30
+ await rejected(d => { d.design.module_catalog[0].depends_on = ['module.repository']; }, /模块依赖越界/);
31
+ await rejected(d => { d.design.consistency_policy.transaction_boundary = ''; }, /non-empty/);
32
+ await rejected(d => { d.design.aggregate_catalog = []; }, /Additional properties/);
33
+ await rejected(d => { d.design.test_seams[0].subject_ref = 'missing'; }, /设计对象悬空/);
34
+ await rejected(d => { d.status = 'stale'; }, /状态不可消费/);
35
+ await rejected(d => { d.traceability[0].disposition = 'conflict'; }, /未闭合承接/);
36
+ const deferred = structuredClone(mvc); deferred.status = 'approved';
37
+ Object.assign(deferred.traceability[0], { disposition: 'deferred', reason: '下一版', risk: '提交不可用', owner: '维护者', followup_ticket_ref: 'ticket.next', verification_plan: '回归提交', target_version: 'v2' });
38
+ deferred.digest = technicalDigest(deferred);
39
+ await assert.rejects(() => validateTechnicalDesign(deferred, { root, sliceRef: 'slice.submit' }), /未闭合承接/); checks++;
40
+ assert.equal((await validateTechnicalDesign(deferred, { root, sliceRef: 'slice.other' })).architecture_family, 'layered-mvc'); checks++;
41
+ deferred.traceability[0].dependency_status = 'unknown'; deferred.digest = technicalDigest(deferred);
42
+ await assert.rejects(() => validateTechnicalDesign(deferred, { root, sliceRef: 'slice.other' }), /未闭合承接/); checks++;
43
+ writeFileSync(path.join(root, 'spec.md'), 'changed');
44
+ await assert.rejects(() => validate(mvc), /输入摘要漂移/); checks++;
45
+ mvcFixture(root);
46
+ const old = read(fileURLToPath(new URL('../../yss-tactical-design/tests/fixtures/valid-tactical-design.yaml', import.meta.url)));
47
+ await assert.rejects(() => validate(old), /显式 --legacy-ddd/); checks++;
48
+ assert.equal((await validateTechnicalDesign(old, { root, legacyDdd: true })).result, 'legacy-ddd-read-only'); checks++;
49
+ const ddd = structuredClone(mvc); ddd.architecture.family = 'domain-driven';
50
+ writeFileSync(path.join(root, 'registration.json'), JSON.stringify({ project_id: 'example', status: 'current', architecture_identity: { architecture_family: 'domain-driven' } }));
51
+ ddd.architecture.decision_digest = hash(readFileSync(path.join(root, 'registration.json'))); ddd.design = old;
52
+ ddd.inputs.push({ kind: 'strategic', ref: 'spec.md', version: 'v1', digest: hash(readFileSync(path.join(root, 'spec.md'))) });
53
+ for (const row of ddd.traceability) Object.assign(row, { tactical_refs: [old.test_seams[0].subject_ref], test_seam_refs: [old.test_seams[0].seam_id], scenario_tests: ['success','failure'].map(outcome => ({ outcome, seam_ref: old.test_seams[0].seam_id })) });
54
+ ddd.digest = technicalDigest(ddd);
55
+ assert.equal((await validate(ddd)).architecture_family, 'domain-driven'); checks++;
56
+ ddd.design.aggregate_catalog[0].api_exposure = 'public'; ddd.digest = technicalDigest(ddd);
57
+ await assert.rejects(() => validate(ddd), /internal-only/); checks++;
58
+ const scaffold = mvcFixture(root);
59
+ const decision = attachScaffoldDecisionFixture(path.join(root, 'decision-evidence'), { project_id: 'example', status: 'user-confirmed', confirmed_architecture: 'layered-mvc', decision_inputs_digest: `sha256:${'1'.repeat(64)}`, user_confirmation: { confirmation_ref: 'user-message', confirmed_by: 'user' } });
60
+ const record = { status: 'current', template: false, decisions: [decision] };
61
+ const recordFile = path.join(root, 'decision.json');
62
+ writeFileSync(recordFile, JSON.stringify(record));
63
+ scaffold.architecture = { ...scaffold.architecture, source_kind: 'scaffold-decision', decision_ref: 'decision.json', decision_digest: hash(readFileSync(recordFile)) }; scaffold.digest = technicalDigest(scaffold);
64
+ assert.equal((await validate(scaffold)).architecture_family, 'layered-mvc'); checks++;
65
+ record.decisions[0].status = 'awaiting-user-decision'; writeFileSync(recordFile, JSON.stringify(record)); scaffold.architecture.decision_digest = hash(readFileSync(recordFile)); scaffold.digest = technicalDigest(scaffold);
66
+ await assert.rejects(() => validate(scaffold), /分支设计前必须确认/); checks++;
67
+ record.decisions[0].status = 'user-confirmed'; record.decisions[0].user_confirmation.user_decision_ref = 'missing-user-decision.json'; writeFileSync(recordFile, JSON.stringify(record)); scaffold.architecture.decision_digest = hash(readFileSync(recordFile)); scaffold.digest = technicalDigest(scaffold);
68
+ await assert.rejects(() => validate(scaffold), /user-decision/); checks++;
69
+ const current = mvcFixture(root); current.status = 'approved'; current.digest = technicalDigest(current);
70
+ const file = path.join(root, 'design.json'); writeFileSync(file, JSON.stringify(current));
71
+ const technical_design = { ref: 'design.json', version: 'v1', digest: hash(readFileSync(file)) };
72
+ const identity = { architecture_family: 'layered-mvc', architecture_profile: 'layered-mvc-service', generator_skill: 'yss-layered-mvc-scaffold-generator', requested_capabilities: [], resolved_modules: ['server','service','repository'], verification_database: 'h2', production_database: 'not-bound', contract_digest: 'a'.repeat(64) };
73
+ const state = { technical_design, slice_id: 'slice.submit', architecture_identity: identity, conditions: ['backend-technical-design-impact'] };
74
+ enforceTechnicalDesign(state, { root }); checks++;
75
+ assert.throws(() => enforceTechnicalDesign({ ...state, technical_design: undefined }, { root }), /缺少已批准技术设计/); checks++;
76
+ assert.throws(() => enforceTechnicalDesign({ ...state, architecture_identity: { architecture_family: 'domain-driven' } }, { root }), /架构不匹配/); checks++;
77
+ const resolution = compileDefaultImplementationContract({ ...state, root, requiredCapabilities: ['contract.request-validation'], architecture_evidence: { engineering_baseline: identity, repository_registration: identity, manifest: identity } });
78
+ assert.deepEqual(resolution.technical_design, technical_design); assert(!resolution.required_skills.includes('yss-domain')); checks++;
79
+ writeFileSync(path.join(root, 'spec.md'), 'changed again');
80
+ assert.equal(evaluateContractFreshness({ schema_version: 2, resolution }, { registry: loadSkillRegistry(), compilerContract: loadCompilerContract(), root }).freshness, 'stale'); checks++;
81
+ } finally { rmSync(root, { recursive: true, force: true }); }
82
+ process.stdout.write(`技术设计场景通过:${checks} 项(MVC、DDD、兼容、架构、承接、切片与漂移)\n`);
@@ -22,6 +22,8 @@ description: Use when implementing or reviewing YSS Vue pages that combine YSS w
22
22
 
23
23
  ## 2. 执行前版本预检
24
24
 
25
+ 采用专职前端 profile 或显式 `frontend_delivery` 绑定时,先按 `docs/process/frontend-backend-delivery.md` 实际核验战略与后端联合交付。缺任一输入只能诊断和回交;输入通过后准备计划/合同,正式实现、生成和恢复仍须当前批准的 Slice Contract 冻结接收摘要。接口或部署版本漂移时重新接收,不复用旧成功输出。
26
+
25
27
  进入实现前从前端工程根目录执行:
26
28
 
27
29
  ```bash
@@ -70,7 +70,10 @@ context_schema_version: 1
70
70
  | 执行证据 | 用于证明工作单元结果、门禁裁决或完成结论的可读取引用和实际验证记录。 | — | 口头声明、计划执行的命令或无法解析的引用不构成执行证据。 |
71
71
  | 单一事实来源(Single Source of Truth) | 对某一类流程事实拥有唯一定义权的权威资产。 | — | 其他资产只引用或解释,不重复定义同一规则。 |
72
72
  | 战略交接快照包 | 将批准的战略资产及证据冻结为可离线验证的完整目录或 ZIP,并提供规则和场景的派生索引。 | — | 源规则由战略方维护;包内快照与索引不成为目标仓词汇权威。 |
73
- | 战术承接记录 | 将源规则和关键场景关联到战术落点、测试 seam、处置结论及依赖切片的结构化记录。 | — | 延期登记不等于依赖切片可实现;冲突回交战略方,未知依赖扩大阻断。 |
73
+ | 后端交付包 | 将后端当前切片的战略基线、冻结接口、批准合同及构建、部署和验证证据绑定为可独立接收的交付快照。 | — | 验包通过不代表真实服务当前可用,也不代表前端已获准实现。 |
74
+ | 前端联合接收 | 前端对战略交接快照与后端交付包进行版本、词汇、场景、接口和运行条件核验的过程。 | — | 输入就绪允许准备实现计划和合同;写代码仍需批准且当前的 Slice Implementation Contract。 |
75
+ | 技术设计合同 | 按已确认架构统一记录共同输入、规则与场景承接、对应设计及审查证据的合同。 | — | 技术设计由通用入口组织,领域建模与传统分层是可选分支,生命周期负责批准。 |
76
+ | 战术承接记录 | 将源规则和关键场景关联到所选架构的设计落点、测试 seam、处置结论及依赖切片的结构化记录。 | — | 延期登记不等于依赖切片可实现;冲突回交战略方,未知依赖扩大阻断。 |
74
77
  | 流程模板资产 | 可被不同项目复用的文档模板、技能说明、校验脚本、流程规范和目录占位文件。 | — | 不包含某个具体产品的 Spec、设计、OpenAPI 或 Ticket。 |
75
78
  | 模板维护流程 | 用于评估影响、修改权威资产、同步投影、执行压力验证并审查模板演进的工作流。 | — | 面向模板源仓库,不默认生成具体产品的 Spec、原型、OpenAPI 或垂直切片 Ticket。 |
76
79
  | 模板发布门禁 | 模板源发布前必须通过的结构、技能同步、流程语义和压力场景验证集合。 | — | 不等同于只检查文件存在、Markdown 链接或 YAML 语法。 |
@@ -130,3 +130,7 @@ scripts/verify-template-fast
130
130
  | [docs/templates/implementation-repo-registry-template.md](./docs/templates/implementation-repo-registry-template.md) | 外部实现仓库登记 |
131
131
  | [docs/templates/cross-repo-slice-template.md](./docs/templates/cross-repo-slice-template.md) | 跨仓库垂直切片记录 |
132
132
  | [docs/architecture/templates/architecture-deepening-template.md](./docs/architecture/templates/architecture-deepening-template.md) | 架构 deepening 候选与 seam 设计 |
133
+
134
+ ## 按职责使用与升级
135
+
136
+ [五类项目用户手册](docs/user-guide/用户手册.md)提供选型、初始化及升级;[设备借用贯穿案例](docs/user-guide/设备借用贯穿案例.md)演示战略、后端、前端与统一验收。[全部手册](docs/user-guide/用户手册索引.md)区分日常使用与维护入口。GitHub 当前能力与 npm 发布快照分别核对。
@@ -152,8 +152,8 @@ roles:
152
152
  contract_version: 1
153
153
  title: YSS 后端工程师
154
154
  stages: [stage.system-data-engineering, stage.ticket-formalization, stage.vertical-slice-implementation, stage.verification-release-retrospective]
155
- draft_artifact_ids: [artifact.openapi-draft, artifact.data-architecture]
156
- core_skills: [yss-implementation-contract-compiler, yss-tactical-design, yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-dto, mapstruct, lombok, alibaba-java-code-style, yss-exception, yss-validation, tdd, yss-ddd-scaffold-generator, yss-layered-mvc-scaffold-generator]
155
+ draft_artifact_ids: [artifact.openapi-draft, artifact.data-architecture, artifact.technical-design]
156
+ core_skills: [yss-implementation-contract-compiler, yss-technical-design, yss-tactical-design, yss-mvc-design, yss-domain, yss-application, yss-repository, yss-mybatis, yss-web-controller, yss-dto, mapstruct, lombok, alibaba-java-code-style, yss-exception, yss-validation, tdd, yss-ddd-scaffold-generator, yss-layered-mvc-scaffold-generator]
157
157
  forbidden_skills: [yss-ui, yss-ui-business-page-generation, yss-formily, yss-frontend-scaffold-generator, yss-antd-design, yss-antdv-next-design, page-list-module, page-form-module]
158
158
  description: >-
159
159
  Own OpenAPI Draft, data-architecture contributions, and backend tests.
@@ -215,6 +215,7 @@ gate_policy:
215
215
  - gate.design-reviewed
216
216
  - gate.architecture-reviewed
217
217
  evidence_only:
218
+ - gate.frontend-delivery-inputs-verified
218
219
  - gate.repository-identity-valid
219
220
  - gate.prototype-verified
220
221
  orchestrator:
@@ -57,12 +57,14 @@ capability_contract:
57
57
  preserve_all_reasons: true
58
58
  deterministic_order: [recipe-declaration, dependency-topology, skill-id]
59
59
  capabilities:
60
+ - { id: architecture.technical-design, primary_skill: yss-technical-design, task_modes: [guidance, integration, review-input] }
61
+ - { id: architecture.mvc-design, primary_skill: yss-mvc-design, architecture_family: layered-mvc, task_modes: [guidance, integration, review-input] }
60
62
  - { id: layer.mvc-service, primary_skill: yss-application, architecture_family: layered-mvc, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
61
63
  - { id: layer.mvc-persistence, primary_skill: yss-repository, architecture_family: layered-mvc, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
62
64
  - { id: layer.mvc-web, primary_skill: yss-web-controller, architecture_family: layered-mvc, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
63
65
  - { id: governance.implementation-contract, primary_skill: yss-implementation-contract-compiler, task_modes: [contract-compilation, reroute, result-validation] }
64
66
  - { id: maintenance.skill-source-index, primary_skill: yss-skill-source-index-refresh, task_modes: [component-maintenance, source-index-refresh] }
65
- - { id: architecture.tactical-domain, primary_skill: yss-tactical-design, task_modes: [guidance, integration, slice-implementation, review-input] }
67
+ - { id: architecture.tactical-domain, primary_skill: yss-tactical-design, architecture_family: domain-driven, task_modes: [guidance, integration, slice-implementation, review-input] }
66
68
  - { id: layer.domain, primary_skill: yss-domain, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
67
69
  - { id: layer.application, primary_skill: yss-application, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
68
70
  - { id: layer.persistence, primary_skill: yss-repository, task_modes: [guidance, integration, slice-implementation, troubleshooting, review-input] }
@@ -121,6 +123,11 @@ skill_dependencies:
121
123
  - { skill: domain-modeling, type: coordination-only }
122
124
  - { skill: yss-tactical-design, type: context-conditional, when: tactical-domain }
123
125
  - { skill: lombok, type: context-conditional, when: pojo }
126
+ yss-technical-design:
127
+ - { skill: yss-tactical-design, type: coordination-only, when: domain-driven }
128
+ - { skill: yss-mvc-design, type: coordination-only, when: layered-mvc }
129
+ yss-mvc-design:
130
+ - { skill: yss-openapi-draft-review, type: review-only, when: api-impact }
124
131
  yss-tactical-design:
125
132
  - { skill: domain-modeling, type: coordination-only }
126
133
  - { skill: yss-openapi-draft-review, type: review-only, when: api-impact }
@@ -479,6 +486,18 @@ skills:
479
486
  instance_default_discoverable: false
480
487
  aliases: []
481
488
  impacts: [backend]
489
+ - id: yss-technical-design
490
+ layer: core
491
+ maturity: draft
492
+ instance_default_discoverable: true
493
+ aliases: []
494
+ impacts: [backend, lifecycle]
495
+ - id: yss-mvc-design
496
+ layer: specialist
497
+ maturity: draft
498
+ instance_default_discoverable: false
499
+ aliases: []
500
+ impacts: [backend, lifecycle]
482
501
  - id: yss-tactical-design
483
502
  layer: specialist
484
503
  maturity: draft
@@ -19,7 +19,7 @@
19
19
 
20
20
  - [ ] 若为小改动,已完成 DDD impact check,并确认不影响统一语言、上下文边界、聚合、API、数据或风险 / 回滚约束。
21
21
  - [ ] Strategic DDD Check 已完成或明确不适用:统一语言、核心/支撑/通用子域、限界上下文、上下文映射和非目标范围清楚。
22
- - [ ] Tactical DDD Check 已完成或明确不适用:聚合根、Entity、Value Object、领域服务、不变量、一致性边界和 Repository / Gateway seam 清楚。
22
+ - [ ] 技术设计使用已确认的 DDD / MVC 架构,规则与关键场景承接完整,合同及输入摘要当前。DDD 审查聚合、不变量、一致性和 Gateway;MVC 审查分层、用例、业务规则、事务和持久化映射。两者均需成功/失败测试 seam;无相关影响须明确理由。
23
23
  - [ ] OpenAPI 契约使用上下文的公开语言,不直接暴露内部聚合、Repository 或持久化表结构。
24
24
  - [ ] 领域行为测试、Application 用例测试、契约测试和必要 E2E 已与 DDD 边界对齐。
25
25
 
@@ -64,10 +64,21 @@ owner: ai
64
64
  |----------|-------------|-------------|-------------|------------------|
65
65
  | | | | | 是 / 否 |
66
66
 
67
- ## 8. Tactical DDD Check(轻量)
67
+ ## 8. 技术设计(按已确认架构)
68
68
 
69
- > 本节嵌入系统概要设计 / 数据架构,不新增独立阶段。只有当聚合边界、状态机、一致性或持久化映射复杂到无法在本节说明时,才升级为 `docs/.scratch/<feature>/architecture/<feature>-tactical-design.md`。
70
- > 战术设计优先引用结构化 `tactical-design` contract(含 `version`、`digest` 和 `evidence.tactical-design-review`);独立文档只承载复杂场景的展开,不成为第二套事实源。
69
+ 引用 `artifact.technical-design` 的版本、digest 和 `evidence.technical-design-review`。`yss-technical-design` 先核对逐项目架构决定;新项目与脚手架共用确认来源,既有项目沿用登记。仅填写适用分支,未命中技术设计影响时记录原因。
70
+
71
+ ### 8.1 传统 MVC
72
+
73
+ | 模块 / 层 | 用例与业务规则 | 状态转换 | 事务 / 并发 / 幂等 | 持久化 / 外部适配 | 测试 seam |
74
+ |---|---|---|---|---|---|
75
+ | | | | | | |
76
+
77
+ 检查规则和关键场景逐条承接、成功/失败测试、分层依赖及事务回滚。MVC 不填写聚合、值对象或 DDD Gateway;详细规则消费 `yss-mvc-design`。
78
+
79
+ ### 8.2 DDD Tactical Check
80
+
81
+ 以下仅用于 domain-driven,由 `yss-tactical-design` 细化。复杂场景可附独立说明,结构化技术设计合同仍是事实源;旧 `artifact.tactical-design` 只读兼容。
71
82
 
72
83
  | 限界上下文 | 聚合根 | 业务不变量 | Entity / Value Object | 一致性边界 | Gateway / Repository | 主要测试 seam |
73
84
  |------------|--------|------------|-----------------------|------------|----------------------|----------------|
@@ -121,7 +132,7 @@ owner: ai
121
132
  - [ ] API 影响记录 / 契约草案 / OpenAPI Draft 的路径、schema、错误结构、分页和契约测试已被架构反审,且可落地或已列出回改项。
122
133
  - [ ] 状态流、失败路径、幂等、并发和回滚策略清楚。
123
134
  - [ ] 数据架构需求已明确;涉及持久化、元模型、版本或血缘时已有数据架构。
124
- - [ ] Tactical DDD Check 已完成,或明确说明本次变更不影响领域模型 / 聚合 / 持久化边界。
135
+ - [ ] 技术设计合同的适用 DDD / MVC 分支已完成、架构确认与承接证据当前;无相关影响有明确理由。
125
136
  - [ ] 已明确的认证、授权、租户隔离、敏感数据或合规行为已写入普通架构约束、契约与验证 seam;未触发时不额外登记。
126
137
  - [ ] 风险与人工审查点已标记。
127
138
  - [ ] 需要 ADR 的决策已列出。
@@ -0,0 +1,72 @@
1
+ # 前后端交付与联合接收
2
+
3
+ 本合同适用于 `profile_id: harness.frontend-delivery`、profile 中 `frontend_delivery.required: true` 或显式绑定 `frontend_delivery` 的工作。它补充既有切片就绪和前端还原验证条件,不另起生命周期或批准入口。旧通用研发 profile 未选择该路线时维持原行为。
4
+
5
+ ## 职责与先后关系
6
+
7
+ 战略方维护业务规则、Spec、页面流程和视觉基线;后端维护 API 及后端交付;前端维护工程设计、页面和验收证据;统一管理方维护基线引用、跨仓切片与业务验收汇总。
8
+
9
+ 前端消费需求可在上游设计时提前反馈。前端项目在战略和后端交付尚未齐备时,只能验包、诊断和回交缺口。两类输入通过接收核验后,可以准备前端工程设计、实现计划和 Slice Contract;合同获准前不得写代码。
10
+
11
+ ## 后端导出与前端导入
12
+
13
+ 后端每个交付包绑定一个窄业务切片。交付描述采用 `schemas/backend-delivery.schema.json`,包含战略包路径与摘要、切片规则/场景、OpenAPI operationId、冻结接口和后端 Slice Contract 的批准绑定、构建与部署身份、测试数据准备说明及验证证据。
14
+
15
+ 接口和 Slice Contract 的 `digest` 均为原文件字节 SHA-256,分别由既有 `gate.openapi-frozen` 和 `gate.slice-contract-approved` 的批准记录绑定。同包携带源角色政策及所需用户决定/批准证据;接收端按源政策验证,不能只填 `status: approved`。
16
+
17
+ 验证记录采用 `schemas/backend-delivery-verification.schema.json`,`subject_digest` 使用 `backendDeliveryBasis()`。实际命令、执行时间、零退出码与日志摘要必须齐备;契约验证逐条覆盖交付接口及场景的成功/失败结果。`supporting_files` 显式列出批准或用户决定的其余本地依赖;导出时通过临时源视图验证闭包,漏文件会失败。
18
+
19
+ ```bash
20
+ scripts/backend-delivery export --source-root <backend> --delivery <relative-delivery.json> --output <new-directory> --zip
21
+ scripts/backend-delivery verify --bundle <directory-or-zip>
22
+ scripts/backend-delivery import --bundle <directory-or-zip> --target-root <frontend>
23
+ ```
24
+
25
+ 后端交付保存于 `docs/backend-deliveries/<delivery-id>/<version>/`。战略快照自动通过既有工具导入 `docs/handoffs/`;两种包各自原子落盘、重复导入幂等,同身份版本不同内容拒绝。后端接收失败后已成功导入的战略快照可以保留并在重试时复用,不自动放行工作。
26
+
27
+ 目录和 ZIP 使用同一逻辑包摘要。只携带不可变文件与包内路径映射,不要求源仓或兄弟仓存在,不执行来源代码,不打包运行时凭据;目标根 `CONTEXT.md` 仍由目标维护者对账。
28
+
29
+ ## 接收与启动
30
+
31
+ 导入只产生 `frontend-acceptance-draft.json`,不会批准资产。接收方完成正式词汇对账并按 `schemas/frontend-delivery-acceptance.schema.json` 准备接收记录:
32
+
33
+ - `backend_delivery` 绑定后端导入收据和包摘要。
34
+ - `strategic_handoff` 绑定战略导入收据、包摘要、正式 `context_reconciliation_ref` 和全部源规则/关键场景的承接 rows。
35
+ - `frontend_cases` 绑定业务规则/场景、成功或失败结果、已交付接口、Visual Baseline `case_id` 和可读取的用例说明。
36
+ - 已规划的承接使用 `mapped`,表示已映射用例,不声称代码已实现。当前交付范围必须 mapped 到当前切片;其他范围的 pending、conflict、deferred 或 not-applicable 沿用战略逐条承接的理由、证据和依赖阻断规则。
37
+
38
+ 完成接收核对后记录 `status: accepted` 并执行:
39
+
40
+ ```bash
41
+ scripts/verify-frontend-delivery --root <frontend> --slice <slice-id> <relative-acceptance.json>
42
+ ```
43
+
44
+ 工具重新验两类包及批准、当前目标词汇、已知战略变更、最新已导入后端版本、场景映射和真实服务。成功仅返回 `inputs-verified`、`ready_for_agent: false`,供准备前端实现资产使用;`accepted` 字段本身不能证明就绪。
45
+
46
+ 编译输入传入 `slice_id`、`frontend_delivery.acceptance_ref`;编译结果冻结 `frontend_delivery.digest`(接收文件字节摘要)。正式 Slice Contract 保存为 `frontend.delivery`,也可消费 `resolution.frontend_delivery`。两个位置同时出现时须相同。实施、派发和恢复从已持久化合同读取这组绑定,再实际运行校验器;旧成功输出不作为新的放行证据。
47
+
48
+ 前端计划和正式验证证据绑定 `slice_id` 与 `frontend_delivery`;验证阶段另绑定 `slice_contract_ref`。Task Package 的实现任务从 `contract.slice_contract_ref` 读取绑定,准备任务使用 `slice_id` 与 `frontend_delivery`。模板维护或只读接收诊断不冒充产品实现任务。
49
+
50
+ ## 真实服务检查
51
+
52
+ 环境提供一个可只读探测的 JSON 版本响应,`revision_path` 和 JSON Pointer 由交付描述登记,不假定业务服务已有固定端点。响应须匹配 `deployment_id`、`source_commit`、`openapi_digest`、`artifact_digest` 和 `test_data_digest`;最后一项绑定已准备的数据说明/数据集版本。不能提供这些可核验身份时先补部署证据与探测能力。
53
+
54
+ 探测使用 GET、同 origin、不跟随重定向和有界超时。受保护探测通过 `authorization_env` 指定当前执行环境提供 Authorization 值的变量名;包和输出不携带其值。
55
+
56
+ 版本响应通过只证明当前服务身份可达,业务接口正确性仍依赖同基线的后端契约测试及后续真实联调。离线验包不能证明服务当前可用,也不能证明未同步源仓没有新变化。
57
+
58
+ ## 变更与完成
59
+
60
+ 战略变化使用现有规则/场景及设计基线的依赖失效规则。最新已导入的同身份后端交付使旧接收记录失效。不同切片采用不同后端交付身份,避免不相关切片互相阻塞。依赖未知时扩大阻断;缺口回交资产维护方,业务规则冲突回战略方。
61
+
62
+ 后端可交接、前端可验收和业务切片完成分开记录。最终业务验收绑定同一战略、API、后端部署和前端版本,复用既有视觉、交互、权限/失败场景、端到端和 Fresh Verification 条件;验包不替代其中任何一项。
63
+
64
+ ## 维护与验证
65
+
66
+ 共享实现由当前主模板维护,通过 `scripts/sync-strategic-handoff-tools` 分发;canonical Skill 变更后生成运行时投影与 lock。新/旧模板的实例初始化与 sync 不静默转换 profile。场景入口为 `scripts/verify-frontend-delivery-scenarios`,通过临时实例和明确标注的合成测试服务验证行为,不作为具体产品的交付证据。
67
+
68
+ 前端 `frontend_cases` 的 `evidence_ref` 必须同时绑定 `evidence_digest`(原始文件字节 SHA-256)。用例内容变化后须更新接收记录并重编译依赖合同。
69
+
70
+ OpenAPI Freeze 的来源门禁兼容综合模板 `gate.openapi-frozen` 与研发模板 `gate.openapi-freeze-confirmed`;仍严格校验来源角色策略及批准字节绑定,不允许其他门禁代替。每个交付范围至少包含一个带成功/失败验证的战略场景。
71
+
72
+ 生命周期中的稳定入口为 `gate.frontend-delivery-inputs-verified`,定义见各自 `lifecycle-registry.yaml`;角色表将它登记为 evidence_only,实际核验仍由脚本执行,不增设人工批准,也不替代 Slice Contract 的批准门禁。
@@ -66,6 +66,8 @@ apps/
66
66
 
67
67
  ## 2. 影响面路由
68
68
 
69
+ 采用后端交付驱动前端的专职项目,按 [前后端交付与联合接收](frontend-backend-delivery.md) 执行输入校验。该条件同时进入合同编译、任务派发、生命周期实施/恢复和正式前端证据检查;原通用研发 profile 保留兼容,不能以兼容入口替专职项目跳过接收。
70
+
69
71
  | 影响面 | 必须绑定的记录 | 本变更结论 |
70
72
  |---|---|---|
71
73
  | Harness-only | change、文档路径、压力场景、fresh verification、checkpoint | required:模板仓库、CLI 仓库 |
@@ -26,6 +26,7 @@
26
26
 
27
27
  | 稳定 ID | 门禁 | 所属阶段 | 触发条件 | 前置门禁 | 必须留下的证据 |
28
28
  |---|---|---|---|---|---|
29
+ | `gate.frontend-delivery-inputs-verified` | 前端联合输入核验 | `stage.system-data-engineering` | 专职前端 profile 或显式 frontend_delivery 绑定的任务启动、恢复、合同编译、实现和验证;实际执行 scripts/verify-frontend-delivery,输入就绪不等于实现获批。 | 无 | `evidence.fresh-verification` |
29
30
  | `gate.repository-identity-valid` | 仓库身份校验 | `stage.entry-triage` | 每次进入流程。 | 无 | `evidence.repository-identity-check` |
30
31
  | `gate.domain-strategy-approved` | 业务边界与规则确认 | `stage.discovery` | 需要确定业务板块、业务责任区、统一业务词汇、协作关系或关键规则。 | 无 | `evidence.domain-strategy-review`、`evidence.approval-record` |
31
32
  | `gate.stage-decision-package-approved` | 阶段决策包批准 | `stage.discovery` | Discovery 到 Spec 入口需要稳定的阶段决策合同。 | `gate.domain-strategy-approved` | `evidence.stage-decision-package`、`evidence.approval-record` |
@@ -65,6 +66,7 @@
65
66
  | `artifact.data-architecture` | 数据架构 | `stage.system-data-engineering` | 数据模型、存储或一致性变化。 |
66
67
  | `artifact.engineering-baseline` | 工程基线记录 | `stage.system-data-engineering` | 后端、前端或高风险工程变化。 |
67
68
  | `artifact.architecture-review` | 架构审查记录 | `stage.system-data-engineering` | 高风险或跨边界变化。 |
69
+ | `artifact.technical-design` | 技术设计合同 | `stage.system-data-engineering` | 后端技术设计需要按已确认 DDD 或 MVC 架构明确行为、分层、一致性或数据映射。 |
68
70
  | `artifact.tactical-design` | DDD 战术设计 | `stage.system-data-engineering` | 聚合边界、状态机、一致性或持久化映射复杂到无法在系统概要设计的 Tactical DDD Check 中清楚表达。 |
69
71
  | `artifact.spec-delta` | Spec Delta | `stage.spec-architecture` | 已有冻结 Spec 的高风险行为变化。 |
70
72
  | `artifact.parent-ticket` | 功能父 Ticket | `stage.ticket-formalization` | 每个进入追踪的功能。 |
@@ -81,6 +83,7 @@
81
83
  | `evidence.context-reconciliation` | Context Reconciliation 证据 | 工作单元在批准或流转前对根目录唯一 CONTEXT.md 的稳定术语回写、作用域解析和双摘要核对结果;不新增门禁。 |
82
84
  | `evidence.impact-assessment` | 影响面分析记录 | 受影响仓库、资产、风险与最近可信阶段。 |
83
85
  | `evidence.domain-strategy-review` | 业务边界与规则评审证据 | 业务板块、业务责任区、统一业务词汇、协作与交接关系、关键场景和不可违反规则的结构化评审结果。 |
86
+ | `evidence.technical-design-review` | 技术设计评审证据 | 按已确认 DDD 或 MVC 架构审查规则与场景承接、分层、行为、一致性和测试边界。 |
84
87
  | `evidence.tactical-design-review` | DDD 战术设计评审证据 | 聚合、Entity、Value Object、不变量、状态机、一致性、Gateway 与 API 隔离的结构化评审结果。 |
85
88
  | `evidence.stage-decision-package` | 阶段决策包验证证据 | 阶段决策包的 Schema、引用、语义一致性、影响传播和下游消费验证结果。 |
86
89
  | `evidence.maintenance-intensity-checkpoint` | 模板维护强度 checkpoint | template-source 变更的 L1 / L2 / L3 分级、触发项、最低验证证据、review 模式和升级记录。 |
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schema_version": 1,
3
3
  "registry_id": "yss.lifecycle",
4
- "semantic_sha256": "f745204885a0c335b7f87dc1e1f5fd162a556b84e4543d6e1f356da41f6c081a",
4
+ "semantic_sha256": "4eadc734957c5112dad60ec9fe4d844ac8790cbe798fbd8177ee60eae6dbe1fa",
5
5
  "published_ids": [
6
6
  "artifact.architecture-review",
7
7
  "artifact.data-architecture",
@@ -29,6 +29,7 @@
29
29
  "artifact.stage-decision-package",
30
30
  "artifact.state-matrix",
31
31
  "artifact.tactical-design",
32
+ "artifact.technical-design",
32
33
  "artifact.vertical-slice-ticket",
33
34
  "evidence.antd-cli-validation",
34
35
  "evidence.approval-record",
@@ -50,11 +51,13 @@
50
51
  "evidence.repository-identity-check",
51
52
  "evidence.stage-decision-package",
52
53
  "evidence.tactical-design-review",
54
+ "evidence.technical-design-review",
53
55
  "evidence.yss-skill-execution-result",
54
56
  "gate.architecture-reviewed",
55
57
  "gate.design-reviewed",
56
58
  "gate.domain-strategy-approved",
57
59
  "gate.engineering-baseline-accepted",
60
+ "gate.frontend-delivery-inputs-verified",
58
61
  "gate.frontend-implementation-verified",
59
62
  "gate.openapi-draft-reviewed",
60
63
  "gate.openapi-frozen",