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
@@ -56,6 +56,9 @@ evidence:
56
56
  description: 子域、限界上下文、统一语言、Context Map、场景和不变量的结构化评审结果。
57
57
  public_name: 业务边界与规则评审证据
58
58
  public_description: 业务板块、业务责任区、统一业务词汇、协作与交接关系、关键场景和不可违反规则的结构化评审结果。
59
+ - id: evidence.technical-design-review
60
+ name: 技术设计评审证据
61
+ description: 按已确认 DDD 或 MVC 架构审查规则与场景承接、分层、行为、一致性和测试边界。
59
62
  - id: evidence.tactical-design-review
60
63
  name: DDD 战术设计评审证据
61
64
  description: 聚合、Entity、Value Object、不变量、状态机、一致性、Gateway 与 API 隔离的结构化评审结果。
@@ -112,6 +115,11 @@ evidence:
112
115
  description: 可追溯的变更边界、发布记录和恢复动作。
113
116
 
114
117
  gates:
118
+ - id: gate.frontend-delivery-inputs-verified
119
+ name: 前端联合输入核验
120
+ stage: stage.system-data-engineering
121
+ trigger: 专职前端 profile 或显式 frontend_delivery 绑定的任务启动、恢复、合同编译、实现和验证;实际执行 scripts/verify-frontend-delivery,输入就绪不等于实现获批。
122
+ evidence: [evidence.fresh-verification]
115
123
  - id: gate.repository-identity-valid
116
124
  name: 仓库身份校验
117
125
  stage: stage.entry-triage
@@ -273,6 +281,10 @@ artifacts:
273
281
  name: 架构审查记录
274
282
  stage: stage.system-data-engineering
275
283
  trigger: 高风险或跨边界变化。
284
+ - id: artifact.technical-design
285
+ name: 技术设计合同
286
+ stage: stage.system-data-engineering
287
+ trigger: 后端技术设计需要按已确认 DDD 或 MVC 架构明确行为、分层、一致性或数据映射。
276
288
  - id: artifact.tactical-design
277
289
  name: DDD 战术设计
278
290
  stage: stage.system-data-engineering
@@ -401,8 +413,8 @@ work_units:
401
413
  name: 技术分析与契约冻结
402
414
  scope: project-instance
403
415
  input: Spec、原型、API/数据/工程影响面。
404
- output: OpenAPI、数据架构、Tactical DDD Check、工程基线、架构审查和 Slice 合同草案。
405
- completion: 命中契约已冻结;无 API 影响有可读记录;命中领域影响时战术模型无未解释冲突;工程基线通过。
416
+ output: OpenAPI、数据架构、按确认架构形成的 DDD / MVC 技术设计合同、工程基线、架构审查和 Slice 合同草案。
417
+ completion: 命中契约已冻结;无 API 影响有可读记录;命中技术设计影响时架构已确认、规则与场景承接无未解释冲突;工程基线通过。
406
418
  - id: work-unit.service-project-initialization
407
419
  name: 独立服务项目初始化
408
420
  scope: project-instance
@@ -0,0 +1,113 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "schema_version": {
7
+ "const": 1
8
+ },
9
+ "kind": {
10
+ "enum": [
11
+ "backend-contract",
12
+ "backend-deployment"
13
+ ]
14
+ },
15
+ "subject_digest": {
16
+ "type": "string",
17
+ "pattern": "^sha256:[0-9a-f]{64}$"
18
+ },
19
+ "results": {
20
+ "type": "array",
21
+ "items": {
22
+ "type": "object",
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "command": {
26
+ "type": "string",
27
+ "minLength": 1
28
+ },
29
+ "executed_at": {
30
+ "type": "string",
31
+ "minLength": 1
32
+ },
33
+ "exit_code": {
34
+ "const": 0
35
+ },
36
+ "evidence": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "properties": {
42
+ "ref": {
43
+ "type": "string",
44
+ "minLength": 1
45
+ },
46
+ "digest": {
47
+ "type": "string",
48
+ "pattern": "^sha256:[0-9a-f]{64}$"
49
+ }
50
+ },
51
+ "required": [
52
+ "ref",
53
+ "digest"
54
+ ]
55
+ },
56
+ "minItems": 1,
57
+ "uniqueItems": true
58
+ }
59
+ },
60
+ "required": [
61
+ "command",
62
+ "executed_at",
63
+ "exit_code",
64
+ "evidence"
65
+ ]
66
+ },
67
+ "minItems": 1,
68
+ "uniqueItems": true
69
+ },
70
+ "operation_ids": {
71
+ "type": "array",
72
+ "items": {
73
+ "type": "string",
74
+ "minLength": 1
75
+ },
76
+ "minItems": 0,
77
+ "uniqueItems": true
78
+ },
79
+ "coverage": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "additionalProperties": false,
84
+ "properties": {
85
+ "source_id": {
86
+ "type": "string",
87
+ "minLength": 1
88
+ },
89
+ "outcome": {
90
+ "enum": [
91
+ "success",
92
+ "failure"
93
+ ]
94
+ }
95
+ },
96
+ "required": [
97
+ "source_id",
98
+ "outcome"
99
+ ]
100
+ },
101
+ "minItems": 0,
102
+ "uniqueItems": true
103
+ }
104
+ },
105
+ "required": [
106
+ "schema_version",
107
+ "kind",
108
+ "subject_digest",
109
+ "results",
110
+ "operation_ids",
111
+ "coverage"
112
+ ]
113
+ }
@@ -0,0 +1,301 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "schema_version": {
7
+ "const": 1
8
+ },
9
+ "delivery_id": {
10
+ "type": "string",
11
+ "pattern": "^backend-delivery\\.[a-z0-9][a-z0-9.-]*$"
12
+ },
13
+ "version": {
14
+ "type": "string",
15
+ "pattern": "^v[1-9][0-9]*$"
16
+ },
17
+ "status": {
18
+ "const": "verified"
19
+ },
20
+ "strategic_bundle_ref": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "strategic_bundle_digest": {
25
+ "type": "string",
26
+ "pattern": "^sha256:[0-9a-f]{64}$"
27
+ },
28
+ "scope": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "slice_id": {
33
+ "type": "string",
34
+ "minLength": 1
35
+ },
36
+ "source_ids": {
37
+ "type": "array",
38
+ "items": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "minItems": 1,
43
+ "uniqueItems": true
44
+ },
45
+ "operation_ids": {
46
+ "type": "array",
47
+ "items": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "minItems": 1,
52
+ "uniqueItems": true
53
+ }
54
+ },
55
+ "required": [
56
+ "slice_id",
57
+ "source_ids",
58
+ "operation_ids"
59
+ ]
60
+ },
61
+ "openapi": {
62
+ "type": "object",
63
+ "additionalProperties": false,
64
+ "properties": {
65
+ "id": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "version": {
70
+ "type": "string",
71
+ "minLength": 1
72
+ },
73
+ "ref": {
74
+ "type": "string",
75
+ "minLength": 1
76
+ },
77
+ "digest": {
78
+ "type": "string",
79
+ "pattern": "^sha256:[0-9a-f]{64}$"
80
+ },
81
+ "approval_ref": {
82
+ "type": "string",
83
+ "minLength": 1
84
+ }
85
+ },
86
+ "required": [
87
+ "id",
88
+ "version",
89
+ "ref",
90
+ "digest",
91
+ "approval_ref"
92
+ ]
93
+ },
94
+ "slice_contract": {
95
+ "type": "object",
96
+ "additionalProperties": false,
97
+ "properties": {
98
+ "id": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "version": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "ref": {
107
+ "type": "string",
108
+ "minLength": 1
109
+ },
110
+ "digest": {
111
+ "type": "string",
112
+ "pattern": "^sha256:[0-9a-f]{64}$"
113
+ },
114
+ "approval_ref": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ }
118
+ },
119
+ "required": [
120
+ "id",
121
+ "version",
122
+ "ref",
123
+ "digest",
124
+ "approval_ref"
125
+ ]
126
+ },
127
+ "build": {
128
+ "type": "object",
129
+ "additionalProperties": false,
130
+ "properties": {
131
+ "source_commit": {
132
+ "type": "string",
133
+ "pattern": "^[0-9a-f]{40}$"
134
+ },
135
+ "artifact_digest": {
136
+ "type": "string",
137
+ "pattern": "^sha256:[0-9a-f]{64}$"
138
+ }
139
+ },
140
+ "required": [
141
+ "source_commit",
142
+ "artifact_digest"
143
+ ]
144
+ },
145
+ "environment": {
146
+ "type": "object",
147
+ "additionalProperties": false,
148
+ "properties": {
149
+ "id": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "base_url": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ },
157
+ "deployment_id": {
158
+ "type": "string",
159
+ "minLength": 1
160
+ },
161
+ "revision_path": {
162
+ "type": "string",
163
+ "minLength": 1
164
+ },
165
+ "revision_pointers": {
166
+ "type": "object",
167
+ "additionalProperties": false,
168
+ "properties": {
169
+ "deployment_id": {
170
+ "type": "string",
171
+ "minLength": 1
172
+ },
173
+ "source_commit": {
174
+ "type": "string",
175
+ "minLength": 1
176
+ },
177
+ "openapi_digest": {
178
+ "type": "string",
179
+ "minLength": 1
180
+ },
181
+ "artifact_digest": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ },
185
+ "test_data_digest": {
186
+ "type": "string",
187
+ "minLength": 1
188
+ }
189
+ },
190
+ "required": [
191
+ "deployment_id",
192
+ "source_commit",
193
+ "openapi_digest",
194
+ "artifact_digest",
195
+ "test_data_digest"
196
+ ]
197
+ },
198
+ "test_data": {
199
+ "type": "object",
200
+ "additionalProperties": false,
201
+ "required": [
202
+ "ref",
203
+ "digest"
204
+ ],
205
+ "properties": {
206
+ "ref": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ },
210
+ "digest": {
211
+ "type": "string",
212
+ "pattern": "^sha256:[0-9a-f]{64}$"
213
+ }
214
+ }
215
+ },
216
+ "authorization_env": {
217
+ "type": "string",
218
+ "pattern": "^[A-Z][A-Z0-9_]+$"
219
+ }
220
+ },
221
+ "required": [
222
+ "id",
223
+ "base_url",
224
+ "deployment_id",
225
+ "revision_path",
226
+ "revision_pointers",
227
+ "test_data"
228
+ ]
229
+ },
230
+ "verification": {
231
+ "type": "object",
232
+ "additionalProperties": false,
233
+ "properties": {
234
+ "contract": {
235
+ "type": "object",
236
+ "additionalProperties": false,
237
+ "properties": {
238
+ "ref": {
239
+ "type": "string",
240
+ "minLength": 1
241
+ },
242
+ "digest": {
243
+ "type": "string",
244
+ "pattern": "^sha256:[0-9a-f]{64}$"
245
+ }
246
+ },
247
+ "required": [
248
+ "ref",
249
+ "digest"
250
+ ]
251
+ },
252
+ "deployment": {
253
+ "type": "object",
254
+ "additionalProperties": false,
255
+ "properties": {
256
+ "ref": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ },
260
+ "digest": {
261
+ "type": "string",
262
+ "pattern": "^sha256:[0-9a-f]{64}$"
263
+ }
264
+ },
265
+ "required": [
266
+ "ref",
267
+ "digest"
268
+ ]
269
+ }
270
+ },
271
+ "required": [
272
+ "contract",
273
+ "deployment"
274
+ ]
275
+ },
276
+ "supporting_files": {
277
+ "type": "array",
278
+ "items": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "minItems": 0,
283
+ "uniqueItems": true
284
+ }
285
+ },
286
+ "required": [
287
+ "schema_version",
288
+ "delivery_id",
289
+ "version",
290
+ "status",
291
+ "strategic_bundle_ref",
292
+ "strategic_bundle_digest",
293
+ "scope",
294
+ "openapi",
295
+ "slice_contract",
296
+ "build",
297
+ "environment",
298
+ "verification",
299
+ "supporting_files"
300
+ ]
301
+ }
@@ -7,6 +7,14 @@
7
7
  "required": ["schema_version", "task_id", "work_unit_id", "actor_id", "role_id", "runtime_id", "execution_state", "workflow_status", "skill_source", "contract", "inputs", "objective", "allowed_write_paths", "forbidden_actions", "expected_outputs", "expected_evidence_files", "verification_commands", "verification_results", "downstream_consumers", "convergence"],
8
8
  "properties": {
9
9
  "schema_version": { "const": 1 },
10
+ "frontend_delivery": {
11
+ "type": "object", "additionalProperties": false, "required": ["acceptance_ref"],
12
+ "properties": {
13
+ "acceptance_ref": { "type": "string", "minLength": 1 },
14
+ "digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" }
15
+ }
16
+ },
17
+ "slice_id": { "type": "string", "minLength": 1 },
10
18
  "task_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]*$" },
11
19
  "work_unit_id": { "type": "string", "minLength": 1, "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$" },
12
20
  "actor_id": { "type": "string", "minLength": 1, "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]*$" },
@@ -0,0 +1,200 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "properties": {
6
+ "schema_version": {
7
+ "const": 1
8
+ },
9
+ "status": {
10
+ "const": "accepted"
11
+ },
12
+ "slice_id": {
13
+ "type": "string",
14
+ "minLength": 1
15
+ },
16
+ "backend_delivery": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "import_receipt_ref": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "bundle_digest": {
25
+ "type": "string",
26
+ "pattern": "^sha256:[0-9a-f]{64}$"
27
+ }
28
+ },
29
+ "required": [
30
+ "import_receipt_ref",
31
+ "bundle_digest"
32
+ ]
33
+ },
34
+ "strategic_handoff": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "properties": {
38
+ "import_receipt_ref": {
39
+ "type": "string",
40
+ "minLength": 1
41
+ },
42
+ "bundle_digest": {
43
+ "type": "string",
44
+ "pattern": "^sha256:[0-9a-f]{64}$"
45
+ },
46
+ "context_reconciliation_ref": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "rows": {
51
+ "type": "array",
52
+ "items": {
53
+ "type": "object",
54
+ "required": [
55
+ "source_id",
56
+ "source_digest",
57
+ "disposition",
58
+ "dependency_status",
59
+ "dependent_slice_refs",
60
+ "evidence_refs"
61
+ ],
62
+ "properties": {
63
+ "source_id": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "source_digest": {
68
+ "type": "string",
69
+ "pattern": "^sha256:[0-9a-f]{64}$"
70
+ },
71
+ "disposition": {
72
+ "enum": [
73
+ "mapped",
74
+ "pending",
75
+ "conflict",
76
+ "deferred",
77
+ "not-applicable"
78
+ ]
79
+ },
80
+ "dependency_status": {
81
+ "enum": [
82
+ "known",
83
+ "unknown"
84
+ ]
85
+ },
86
+ "dependent_slice_refs": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "minItems": 0,
93
+ "uniqueItems": true
94
+ },
95
+ "evidence_refs": {
96
+ "type": "array",
97
+ "items": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "minItems": 0,
102
+ "uniqueItems": true
103
+ },
104
+ "frontend_case_refs": {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string",
108
+ "minLength": 1
109
+ },
110
+ "minItems": 0,
111
+ "uniqueItems": true
112
+ }
113
+ }
114
+ },
115
+ "minItems": 1,
116
+ "uniqueItems": true
117
+ }
118
+ },
119
+ "required": [
120
+ "import_receipt_ref",
121
+ "bundle_digest",
122
+ "context_reconciliation_ref",
123
+ "rows"
124
+ ]
125
+ },
126
+ "frontend_cases": {
127
+ "type": "array",
128
+ "items": {
129
+ "type": "object",
130
+ "additionalProperties": false,
131
+ "properties": {
132
+ "case_id": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "source_ids": {
137
+ "type": "array",
138
+ "items": {
139
+ "type": "string",
140
+ "minLength": 1
141
+ },
142
+ "minItems": 1,
143
+ "uniqueItems": true
144
+ },
145
+ "outcome": {
146
+ "enum": [
147
+ "success",
148
+ "failure"
149
+ ]
150
+ },
151
+ "operation_ids": {
152
+ "type": "array",
153
+ "items": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ },
157
+ "minItems": 1,
158
+ "uniqueItems": true
159
+ },
160
+ "visual_case_ids": {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ },
166
+ "minItems": 1,
167
+ "uniqueItems": true
168
+ },
169
+ "evidence_ref": {
170
+ "type": "string",
171
+ "minLength": 1
172
+ },
173
+ "evidence_digest": {
174
+ "type": "string",
175
+ "pattern": "^sha256:[a-f0-9]{64}$"
176
+ }
177
+ },
178
+ "required": [
179
+ "case_id",
180
+ "source_ids",
181
+ "outcome",
182
+ "operation_ids",
183
+ "visual_case_ids",
184
+ "evidence_ref",
185
+ "evidence_digest"
186
+ ]
187
+ },
188
+ "minItems": 1,
189
+ "uniqueItems": true
190
+ }
191
+ },
192
+ "required": [
193
+ "schema_version",
194
+ "status",
195
+ "slice_id",
196
+ "backend_delivery",
197
+ "strategic_handoff",
198
+ "frontend_cases"
199
+ ]
200
+ }
@@ -6,6 +6,9 @@
6
6
  "additionalProperties": false,
7
7
  "required": ["schema_version", "kind", "template", "status", "prototype_ref", "spec_ref", "visual_baseline", "route_and_page_inventory", "pnpm_commands"],
8
8
  "properties": {
9
+ "frontend_delivery": {"type":"object","additionalProperties":false,"required":["acceptance_ref","digest"],"properties":{"acceptance_ref":{"type":"string","minLength":1},"digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}}},
10
+ "slice_id": {"type":"string","minLength":1},
11
+ "slice_contract_ref": {"type":"string","minLength":1},
9
12
  "schema_version": {"const": 2},
10
13
  "kind": {"enum": ["plan", "verification"]},
11
14
  "template": {"type": "boolean"},