create-yss-spec 3.3.6 → 3.3.8

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 (222) hide show
  1. package/README.md +12 -13
  2. package/package.json +1 -1
  3. package/src/template/instance-runtime.js +8 -2
  4. package/src/validation/snapshot.js +7 -0
  5. package/template/.agents/skills/.strategic-design-skills-manifest.json +6 -4
  6. package/template/.agents/skills/archify/SKILL.md +1 -1
  7. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  8. package/template/.agents/skills/yss-application/SKILL.md +1 -1
  9. package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  10. package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  11. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  12. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  13. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  14. package/template/.agents/skills/yss-prototype-stage/SKILL.md +10 -1
  15. package/template/.agents/skills/yss-stage-decision/SKILL.md +13 -4
  16. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-contract.md +4 -3
  17. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-v2.schema.json +8 -0
  18. package/template/.agents/skills/yss-stage-decision/references/domain-strategy-v3.schema.json +8 -0
  19. package/template/.agents/skills/yss-stage-decision/references/domain-strategy.schema.json +75 -5
  20. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-contract.md +4 -4
  21. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-v2.schema.json +8 -0
  22. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package-v3.schema.json +8 -0
  23. package/template/.agents/skills/yss-stage-decision/references/stage-decision-package.schema.json +59 -9
  24. package/template/.agents/skills/yss-stage-decision/references/validation-rules.md +2 -2
  25. package/template/.agents/skills/yss-stage-decision/scripts/migrate-contract-v3.mjs +143 -0
  26. package/template/.agents/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +46 -4
  27. package/template/.agents/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +48 -4
  28. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +42 -13
  29. package/template/.agents/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +37 -5
  30. package/template/.agents/skills/yss-stage-decision/tests/run-scenarios.mjs +116 -23
  31. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  32. package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  33. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  34. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  35. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  36. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  37. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  38. package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  39. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  40. package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  41. package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  42. package/template/.codex/skills/archify/SKILL.md +1 -1
  43. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  44. package/template/.codex/skills/yss-application/SKILL.md +1 -1
  45. package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  46. package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  47. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  48. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  49. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  50. package/template/.codex/skills/yss-prototype-stage/SKILL.md +10 -1
  51. package/template/.codex/skills/yss-stage-decision/SKILL.md +13 -4
  52. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-contract.md +4 -3
  53. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-v2.schema.json +8 -0
  54. package/template/.codex/skills/yss-stage-decision/references/domain-strategy-v3.schema.json +8 -0
  55. package/template/.codex/skills/yss-stage-decision/references/domain-strategy.schema.json +75 -5
  56. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-contract.md +4 -4
  57. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-v2.schema.json +8 -0
  58. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package-v3.schema.json +8 -0
  59. package/template/.codex/skills/yss-stage-decision/references/stage-decision-package.schema.json +59 -9
  60. package/template/.codex/skills/yss-stage-decision/references/validation-rules.md +2 -2
  61. package/template/.codex/skills/yss-stage-decision/scripts/migrate-contract-v3.mjs +143 -0
  62. package/template/.codex/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +46 -4
  63. package/template/.codex/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +48 -4
  64. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +42 -13
  65. package/template/.codex/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +37 -5
  66. package/template/.codex/skills/yss-stage-decision/tests/run-scenarios.mjs +116 -23
  67. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  68. package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  69. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  70. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  71. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  72. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  73. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  74. package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  75. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  76. package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  77. package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  78. package/template/.cursor/skills/archify/SKILL.md +1 -1
  79. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  80. package/template/.cursor/skills/yss-application/SKILL.md +1 -1
  81. package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  82. package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  83. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  84. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  85. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  86. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +10 -1
  87. package/template/.cursor/skills/yss-stage-decision/SKILL.md +13 -4
  88. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-contract.md +4 -3
  89. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-v2.schema.json +8 -0
  90. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy-v3.schema.json +8 -0
  91. package/template/.cursor/skills/yss-stage-decision/references/domain-strategy.schema.json +75 -5
  92. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-contract.md +4 -4
  93. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-v2.schema.json +8 -0
  94. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package-v3.schema.json +8 -0
  95. package/template/.cursor/skills/yss-stage-decision/references/stage-decision-package.schema.json +59 -9
  96. package/template/.cursor/skills/yss-stage-decision/references/validation-rules.md +2 -2
  97. package/template/.cursor/skills/yss-stage-decision/scripts/migrate-contract-v3.mjs +143 -0
  98. package/template/.cursor/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +46 -4
  99. package/template/.cursor/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +48 -4
  100. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +42 -13
  101. package/template/.cursor/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +37 -5
  102. package/template/.cursor/skills/yss-stage-decision/tests/run-scenarios.mjs +116 -23
  103. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  104. package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  105. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  106. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  107. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  108. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  109. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  110. package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  111. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  112. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  113. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  114. package/template/.pi/skills/archify/SKILL.md +1 -1
  115. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  116. package/template/.pi/skills/yss-application/SKILL.md +1 -1
  117. package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  118. package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  119. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  120. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  121. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  122. package/template/.pi/skills/yss-prototype-stage/SKILL.md +10 -1
  123. package/template/.pi/skills/yss-stage-decision/SKILL.md +13 -4
  124. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-contract.md +4 -3
  125. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-v2.schema.json +8 -0
  126. package/template/.pi/skills/yss-stage-decision/references/domain-strategy-v3.schema.json +8 -0
  127. package/template/.pi/skills/yss-stage-decision/references/domain-strategy.schema.json +75 -5
  128. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-contract.md +4 -4
  129. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-v2.schema.json +8 -0
  130. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package-v3.schema.json +8 -0
  131. package/template/.pi/skills/yss-stage-decision/references/stage-decision-package.schema.json +59 -9
  132. package/template/.pi/skills/yss-stage-decision/references/validation-rules.md +2 -2
  133. package/template/.pi/skills/yss-stage-decision/scripts/migrate-contract-v3.mjs +143 -0
  134. package/template/.pi/skills/yss-stage-decision/scripts/validate-domain-strategy.mjs +46 -4
  135. package/template/.pi/skills/yss-stage-decision/scripts/validate-stage-decision-package.mjs +48 -4
  136. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-stage-decision-package.yaml +42 -13
  137. package/template/.pi/skills/yss-stage-decision/tests/fixtures/valid-supplier-domain.yaml +37 -5
  138. package/template/.pi/skills/yss-stage-decision/tests/run-scenarios.mjs +116 -23
  139. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  140. package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  141. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  142. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  143. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  144. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  145. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  146. package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  147. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  148. package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  149. package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  150. package/template/README.md +4 -6
  151. package/template/docs/agents/backend-architecture-profiles.md +4 -0
  152. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  153. package/template/docs/design/templates/prototype-confirmation-template.md +2 -2
  154. package/template/docs/design/templates/prototype-review-checklist.md +2 -2
  155. package/template/docs/plan/templates/market-analysis-template.md +3 -3
  156. package/template/docs/plan/templates/user-pain-points-template.md +3 -3
  157. package/template/docs/process/delivery-preflight.md +72 -0
  158. package/template/docs/process/document-writing.md +5 -1
  159. package/template/docs/process/existing-backend-architecture.md +31 -0
  160. package/template/docs/process/existing-ui-baseline.md +40 -0
  161. package/template/docs/process/frontend-backend-delivery.md +21 -5
  162. package/template/docs/process/implementation-repo-integration.md +6 -0
  163. package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
  164. package/template/docs/process/schemas/backend-delivery.schema.json +4 -0
  165. package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
  166. package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
  167. package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
  168. package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
  169. package/template/docs/process/schemas/frontend-delivery-acceptance-v1.schema.json +200 -0
  170. package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
  171. package/template/docs/process/schemas/frontend-delivery-acceptance.schema.json +37 -3
  172. package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
  173. package/template/docs/process/schemas/frontend-strategic-preflight.schema.json +32 -0
  174. package/template/docs/process/schemas/lifecycle-checkpoint.schema.json +2 -1
  175. package/template/docs/process/schemas/strategic-consumer-feedback.schema.json +40 -0
  176. package/template/docs/process/schemas/strategic-design-handoff-v3.schema.json +743 -0
  177. package/template/docs/process/schemas/strategic-design-handoff-v4.schema.json +712 -0
  178. package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -0
  179. package/template/docs/process/schemas/strategic-feedback-adjudication.schema.json +42 -0
  180. package/template/docs/process/schemas/strategic-handoff-domain-strategy-v3.schema.json +216 -0
  181. package/template/docs/process/schemas/strategic-handoff-export-v2.schema.json +378 -0
  182. package/template/docs/process/schemas/strategic-handoff-import-receipt.schema.json +39 -0
  183. package/template/docs/process/schemas/strategic-handoff-stage-decision-package-v3.schema.json +148 -0
  184. package/template/docs/process/strategic-handoff-package.md +51 -10
  185. package/template/docs/process/templates/lifecycle-checkpoint-template.yaml +1 -0
  186. package/template/docs/process/templates/stage-checkpoint-template.md +1 -0
  187. package/template/docs/user-guide//346/212/200/346/234/257/350/256/276/350/256/241/347/224/250/346/210/267/346/214/207/345/215/227.md +43 -0
  188. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
  189. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214/347/264/242/345/274/225.md +9 -10
  190. 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 +12 -9
  191. package/template/scripts/backend-delivery +20 -4
  192. package/template/scripts/lib/approval-record.mjs +2 -1
  193. package/template/scripts/lib/approved-execution-context.mjs +106 -0
  194. package/template/scripts/lib/backend-architecture.mjs +12 -0
  195. package/template/scripts/lib/backend-delivery.mjs +21 -5
  196. package/template/scripts/lib/delivery-preflight.mjs +238 -0
  197. package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
  198. package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
  199. package/template/scripts/lib/frontend-delivery-boundary.mjs +20 -4
  200. package/template/scripts/lib/frontend-delivery.mjs +76 -4
  201. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
  202. package/template/scripts/lib/json-schema.mjs +19 -4
  203. package/template/scripts/lib/profile-skill-sync.mjs +26 -0
  204. package/template/scripts/lib/strategic-feedback.mjs +33 -0
  205. package/template/scripts/lib/strategic-handoff-consumption.mjs +11 -5
  206. package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
  207. package/template/scripts/lib/strategic-handoff-io.mjs +11 -0
  208. package/template/scripts/lib/strategic-handoff.mjs +143 -34
  209. package/template/scripts/lib/task-package.mjs +11 -3
  210. package/template/scripts/lib/technical-design-boundary.mjs +9 -1
  211. package/template/scripts/lib/ui-baseline.mjs +26 -0
  212. package/template/scripts/lib/user-decision-reuse.mjs +38 -0
  213. package/template/scripts/lib/user-decision.mjs +4 -1
  214. package/template/scripts/preflight-delivery +14 -0
  215. package/template/scripts/strategic-feedback +10 -0
  216. package/template/scripts/strategic-handoff +19 -4
  217. package/template/scripts/sync-profile-skills +4 -5
  218. package/template/scripts/verify-frontend-strategic-preflight +12 -0
  219. package/template/skills-lock.json +18 -18
  220. package/template.manifest.json +1 -0
  221. package/template.snapshot.json +6 -5
  222. package/template/docs/user-guide//346/210/230/346/234/257/350/256/276/350/256/241/345/255/220/351/241/271/347/233/256/347/224/250/346/210/267/346/211/213/345/206/214.md +0 -35
@@ -0,0 +1,42 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.local/schemas/strategic-feedback-adjudication-v1.json",
4
+ "title": "YSS Strategic Feedback Adjudication v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "adjudication_id", "status", "feedback", "decision", "reason", "owner", "return_work_unit", "target_version", "evidence_refs", "decided_at"],
8
+ "properties": {
9
+ "schema_version": {"const": 1},
10
+ "adjudication_id": {"type": "string", "pattern": "^feedback-adjudication\\.[a-z0-9][a-z0-9-]*$"},
11
+ "status": {"const": "approved"},
12
+ "feedback": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["ref", "digest"],
16
+ "properties": {
17
+ "ref": {"type": "string", "minLength": 1},
18
+ "digest": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"}
19
+ }
20
+ },
21
+ "decision": {"enum": ["keep", "amend", "defer"]},
22
+ "reason": {"type": "string", "minLength": 1},
23
+ "owner": {"type": "string", "minLength": 1},
24
+ "return_work_unit": {"type": "string", "pattern": "^work-unit\\.[a-z0-9][a-z0-9-]*$"},
25
+ "target_version": {"type": "string", "minLength": 1},
26
+ "risk": {"type": "string", "minLength": 1},
27
+ "verification_plan": {"type": "string", "minLength": 1},
28
+ "approval_ref": {"type": "string", "minLength": 1},
29
+ "evidence_refs": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
30
+ "decided_at": {"type": "string", "format": "date-time"}
31
+ },
32
+ "allOf": [
33
+ {
34
+ "if": {"properties": {"decision": {"enum": ["keep", "amend"]}}, "required": ["decision"]},
35
+ "then": {"required": ["approval_ref"]}
36
+ },
37
+ {
38
+ "if": {"properties": {"decision": {"const": "defer"}}, "required": ["decision"]},
39
+ "then": {"required": ["risk", "verification_plan"]}
40
+ }
41
+ ]
42
+ }
@@ -0,0 +1,216 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.local/schemas/strategic-handoff-domain-strategy-v3.json",
4
+ "title": "YSS 业务边界与规则设计",
5
+ "type": "object",
6
+ "required": ["schema_version", "domain_strategy_id", "domain_version", "status", "contexts", "subdomains", "relationships", "scenarios", "concept_candidates", "invariants", "context_snapshot", "downstream_mapping", "evidence_refs", "approval"],
7
+ "properties": {
8
+ "traceability_version": {"const": 1},
9
+ "rule_catalog": {"type": "array", "items": {"type": "object", "additionalProperties": false, "required": ["rule_id", "statement", "responsible_context", "status"], "properties": {"rule_id": {"type": "string", "pattern": "^rule\\.[a-z0-9][a-z0-9-]*$"}, "statement": {"type": "string", "minLength": 1}, "responsible_context": {"type": "string", "minLength": 1}, "status": {"const": "confirmed"}, "evidence_refs": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}}}}, "minItems": 1},
10
+ "schema_version": {"const": 3},
11
+ "domain_strategy_id": {"type": "string", "pattern": "^domain-strategy\\.[a-z0-9][a-z0-9-]*$"},
12
+ "domain_version": {"type": "string", "pattern": "^v[0-9]+$"},
13
+ "status": {"enum": ["draft", "ready-for-human", "approved", "stale", "blocked"]},
14
+ "contexts": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/context"}},
15
+ "subdomains": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/subdomain"}},
16
+ "relationships": {"type": "array", "items": {"$ref": "#/$defs/relationship"}},
17
+ "scenarios": {"type": "array", "minItems": 1, "items": {"$ref": "#/$defs/scenario"}},
18
+ "concept_candidates": {"type": "array", "items": {"$ref": "#/$defs/concept"}},
19
+ "invariants": {"type": "array", "items": {"$ref": "#/$defs/invariant"}},
20
+ "context_snapshot": {"$ref": "#/$defs/contextSnapshot"},
21
+ "downstream_mapping": {"type": "array"},
22
+ "evidence_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
23
+ "approval": {"$ref": "#/$defs/approval"}
24
+ },
25
+ "$defs": {
26
+ "contextSnapshot": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["context_ref", "context_schema_version", "document_digest", "referenced_terms_digest", "term_refs"],
30
+ "properties": {
31
+ "context_ref": {"const": "CONTEXT.md"},
32
+ "context_schema_version": {"const": 1},
33
+ "document_digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
34
+ "referenced_terms_digest": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
35
+ "term_refs": {"type": "array", "items": {"type": "string", "pattern": "^(Global|[A-Z][A-Za-z0-9]+)/[A-Z][A-Za-z0-9]+$"}, "uniqueItems": true}
36
+ }
37
+ },
38
+ "context": {
39
+ "type": "object",
40
+ "required": ["context_id", "name", "responsibilities", "non_responsibilities", "subdomain_type", "owner", "status"],
41
+ "properties": {
42
+ "context_id": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
43
+ "name": {"type": "string", "minLength": 1},
44
+ "responsibilities": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}},
45
+ "non_responsibilities": {"type": "array", "items": {"type": "string", "minLength": 1}},
46
+ "subdomain_type": {"enum": ["Core Domain", "Supporting Subdomain", "Generic Subdomain"]},
47
+ "owner": {"type": "string", "minLength": 1},
48
+ "status": {"enum": ["candidate", "confirmed", "stale"]}
49
+ }
50
+ },
51
+ "subdomain": {
52
+ "type": "object",
53
+ "required": ["subdomain_id", "name", "type", "rationale", "evidence_refs"],
54
+ "properties": {
55
+ "subdomain_id": {"type": "string", "pattern": "^subdomain\\.[a-z0-9][a-z0-9-]*$"},
56
+ "name": {"type": "string", "minLength": 1},
57
+ "type": {"enum": ["Core Domain", "Supporting Subdomain", "Generic Subdomain"]},
58
+ "rationale": {"type": "string", "minLength": 1},
59
+ "evidence_refs": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
60
+ }
61
+ },
62
+ "relationship": {
63
+ "type": "object",
64
+ "required": ["relationship_id", "from_context", "to_context", "relationship_pattern", "semantic_upstream", "semantic_downstream", "business_authority", "model_change_impact", "transport_direction", "translation_responsibility", "direction_explanation"],
65
+ "properties": {
66
+ "relationship_id": {"type": "string", "pattern": "^relationship\\.[a-z0-9][a-z0-9-]*$"},
67
+ "from_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
68
+ "to_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
69
+ "relationship_pattern": {"enum": ["Partnership", "Customer/Supplier", "Conformist", "Anti-Corruption Layer", "Open Host Service", "Published Language", "Shared Kernel", "Separate Ways"]},
70
+ "semantic_upstream": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
71
+ "semantic_downstream": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
72
+ "business_authority": {"type": "string", "minLength": 1},
73
+ "model_change_impact": {"type": "string", "minLength": 1},
74
+ "transport_direction": {"type": "string", "minLength": 1},
75
+ "translation_responsibility": {"type": "string", "minLength": 1},
76
+ "direction_explanation": {"type": "string", "minLength": 1}
77
+ }
78
+ },
79
+ "scenario": {
80
+ "type": "object",
81
+ "required": ["scenario_id", "actor", "preconditions", "commands", "rules", "events", "failure_results", "responsible_context", "consumers", "status"],
82
+ "properties": {
83
+ "rule_refs": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 1},
84
+ "critical": {"type": "boolean"},
85
+ "success_results": {"type": "array", "items": {"type": "string", "minLength": 1}, "minItems": 1},
86
+ "scenario_id": {"type": "string", "pattern": "^scenario\\.[a-z0-9][a-z0-9-]*$"},
87
+ "actor": {"type": "string", "minLength": 1},
88
+ "preconditions": {"type": "array", "items": {"type": "string"}},
89
+ "commands": {"type": "array", "minItems": 1, "items": {"type": "string"}},
90
+ "rules": {"type": "array", "minItems": 1, "items": {"type": "string"}},
91
+ "events": {"type": "array", "items": {"type": "string"}},
92
+ "failure_results": {"type": "array", "minItems": 1, "items": {"type": "string"}},
93
+ "responsible_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
94
+ "consumers": {"type": "array", "items": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"}},
95
+ "status": {"enum": ["candidate", "confirmed", "stale"]}
96
+ }
97
+ },
98
+ "concept": {
99
+ "type": "object",
100
+ "required": ["concept_id", "name", "context_id", "identity_features", "lifecycle", "confidence", "status"],
101
+ "properties": {
102
+ "concept_id": {"type": "string", "pattern": "^domain-concept\\.[a-z0-9][a-z0-9-]*$"},
103
+ "name": {"type": "string", "minLength": 1},
104
+ "context_id": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
105
+ "identity_features": {"type": "array", "minItems": 1, "items": {"type": "string"}},
106
+ "lifecycle": {"type": "array", "minItems": 1, "items": {"type": "string"}},
107
+ "invariant_refs": {"type": "array", "items": {"type": "string"}},
108
+ "possible_tactical_role": {"type": "string"},
109
+ "confidence": {"enum": ["low", "medium", "high"]},
110
+ "status": {"enum": ["candidate", "confirmed", "stale"]}
111
+ }
112
+ },
113
+ "invariant": {
114
+ "type": "object",
115
+ "required": ["invariant_id", "statement", "responsible_context", "scenario_refs", "verification_method"],
116
+ "properties": {
117
+ "rule_ref": {"type": "string", "minLength": 1},
118
+ "invariant_id": {"type": "string", "pattern": "^invariant\\.[a-z0-9][a-z0-9-]*$"},
119
+ "statement": {"type": "string", "minLength": 1},
120
+ "responsible_context": {"type": "string", "pattern": "^[A-Z][A-Za-z0-9]+$"},
121
+ "scenario_refs": {"type": "array", "minItems": 1, "items": {"type": "string"}},
122
+ "verification_method": {"type": "string", "minLength": 1}
123
+ }
124
+ },
125
+ "mapping": {
126
+ "type": "object",
127
+ "required": ["domain_change", "impacts", "propagation", "reapproval_condition"],
128
+ "properties": {
129
+ "domain_change": {"type": "string", "minLength": 1},
130
+ "impacts": {"type": "array", "minItems": 1, "items": {"type": "string"}},
131
+ "propagation": {"enum": ["direct", "transitive", "stale"]},
132
+ "reapproval_condition": {"type": "string", "minLength": 1}
133
+ }
134
+ },
135
+ "mappingV3": {
136
+ "type": "object",
137
+ "additionalProperties": false,
138
+ "required": ["mapping_id", "source_refs", "consumer_capability", "impacts", "propagation", "reapproval_condition", "evidence_refs"],
139
+ "properties": {
140
+ "mapping_id": {"type": "string", "pattern": "^mapping\\.[a-z0-9][a-z0-9-]*$"},
141
+ "source_refs": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "pattern": "^(rule|scenario|invariant)\\.[a-z0-9][a-z0-9-]*$"}},
142
+ "consumer_capability": {"enum": ["backend-technical-design", "frontend-engineering-design", "delivery-coordination"]},
143
+ "impacts": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}},
144
+ "propagation": {"enum": ["direct", "transitive", "not-applicable", "stale"]},
145
+ "reapproval_condition": {"type": "string", "minLength": 1},
146
+ "evidence_refs": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}}
147
+ }
148
+ },
149
+ "approval": {
150
+ "type": "object",
151
+ "required": ["approval_ref", "approver", "persisted_ref", "current_version"],
152
+ "properties": {
153
+ "approval_ref": {"type": "string", "minLength": 1},
154
+ "approver": {"type": "string", "minLength": 1},
155
+ "persisted_ref": {"type": "string", "minLength": 1},
156
+ "current_version": {"type": "string", "pattern": "^v[0-9]+$"}
157
+ }
158
+ }
159
+ },
160
+ "allOf": [
161
+ {
162
+ "if": {"properties": {"schema_version": {"const": 3}}, "required": ["schema_version"]},
163
+ "then": {
164
+ "required": ["traceability_version", "rule_catalog"],
165
+ "properties": {
166
+ "traceability_version": {"const": 1},
167
+ "rule_catalog": {
168
+ "items": {
169
+ "required": ["evidence_refs"],
170
+ "properties": {
171
+ "evidence_refs": {
172
+ "type": "array",
173
+ "minItems": 1,
174
+ "uniqueItems": true,
175
+ "items": {"type": "string", "minLength": 1}
176
+ }
177
+ }
178
+ }
179
+ },
180
+ "scenarios": {
181
+ "items": {
182
+ "required": ["rule_refs", "critical", "success_results", "evidence_refs"],
183
+ "properties": {
184
+ "evidence_refs": {
185
+ "type": "array",
186
+ "minItems": 1,
187
+ "uniqueItems": true,
188
+ "items": {"type": "string", "minLength": 1}
189
+ }
190
+ }
191
+ }
192
+ },
193
+ "invariants": {
194
+ "items": {
195
+ "required": ["rule_ref", "evidence_refs"],
196
+ "properties": {
197
+ "evidence_refs": {
198
+ "type": "array",
199
+ "minItems": 1,
200
+ "uniqueItems": true,
201
+ "items": {"type": "string", "minLength": 1}
202
+ }
203
+ }
204
+ }
205
+ },
206
+ "downstream_mapping": {"items": {"$ref": "#/$defs/mappingV3"}}
207
+ }
208
+ },
209
+ "else": {
210
+ "properties": {
211
+ "downstream_mapping": {"items": {"$ref": "#/$defs/mapping"}}
212
+ }
213
+ }
214
+ }
215
+ ]
216
+ }
@@ -0,0 +1,378 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.dev/schemas/strategic-handoff-export-v2.schema.json",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schema_version",
8
+ "approvals",
9
+ "additional_files",
10
+ "reference_map",
11
+ "ui_baseline_kind"
12
+ ],
13
+ "properties": {
14
+ "schema_version": {
15
+ "const": 2
16
+ },
17
+ "approvals": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": [
21
+ "domain_strategy_ref",
22
+ "stage_decision_package_ref",
23
+ "spec_ref",
24
+ "business_ticket_set_ref",
25
+ "handoff"
26
+ ],
27
+ "properties": {
28
+ "domain_strategy_ref": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": [
32
+ "record_ref",
33
+ "gate_id",
34
+ "digest_kind"
35
+ ],
36
+ "properties": {
37
+ "record_ref": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "gate_id": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ },
45
+ "digest_kind": {
46
+ "enum": [
47
+ "canonical-json",
48
+ "sha256-bytes",
49
+ "visual-baseline"
50
+ ]
51
+ }
52
+ }
53
+ },
54
+ "stage_decision_package_ref": {
55
+ "type": "object",
56
+ "additionalProperties": false,
57
+ "required": [
58
+ "record_ref",
59
+ "gate_id",
60
+ "digest_kind"
61
+ ],
62
+ "properties": {
63
+ "record_ref": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "gate_id": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "digest_kind": {
72
+ "enum": [
73
+ "canonical-json",
74
+ "sha256-bytes",
75
+ "visual-baseline"
76
+ ]
77
+ }
78
+ }
79
+ },
80
+ "spec_ref": {
81
+ "type": "object",
82
+ "additionalProperties": false,
83
+ "required": [
84
+ "record_ref",
85
+ "gate_id",
86
+ "digest_kind"
87
+ ],
88
+ "properties": {
89
+ "record_ref": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "gate_id": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "digest_kind": {
98
+ "enum": [
99
+ "canonical-json",
100
+ "sha256-bytes",
101
+ "visual-baseline"
102
+ ]
103
+ }
104
+ }
105
+ },
106
+ "prototype_ref": {
107
+ "type": "object",
108
+ "additionalProperties": false,
109
+ "required": [
110
+ "record_ref",
111
+ "gate_id",
112
+ "digest_kind"
113
+ ],
114
+ "properties": {
115
+ "record_ref": {
116
+ "type": "string",
117
+ "minLength": 1
118
+ },
119
+ "gate_id": {
120
+ "type": "string",
121
+ "minLength": 1
122
+ },
123
+ "digest_kind": {
124
+ "enum": [
125
+ "canonical-json",
126
+ "sha256-bytes",
127
+ "visual-baseline"
128
+ ]
129
+ }
130
+ }
131
+ },
132
+ "visual_baseline_ref": {
133
+ "type": "object",
134
+ "additionalProperties": false,
135
+ "required": [
136
+ "record_ref",
137
+ "gate_id",
138
+ "digest_kind"
139
+ ],
140
+ "properties": {
141
+ "record_ref": {
142
+ "type": "string",
143
+ "minLength": 1
144
+ },
145
+ "gate_id": {
146
+ "type": "string",
147
+ "minLength": 1
148
+ },
149
+ "digest_kind": {
150
+ "enum": [
151
+ "canonical-json",
152
+ "sha256-bytes",
153
+ "visual-baseline"
154
+ ]
155
+ }
156
+ }
157
+ },
158
+ "business_ticket_set_ref": {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": [
162
+ "record_ref",
163
+ "gate_id",
164
+ "digest_kind"
165
+ ],
166
+ "properties": {
167
+ "record_ref": {
168
+ "type": "string",
169
+ "minLength": 1
170
+ },
171
+ "gate_id": {
172
+ "type": "string",
173
+ "minLength": 1
174
+ },
175
+ "digest_kind": {
176
+ "enum": [
177
+ "canonical-json",
178
+ "sha256-bytes",
179
+ "visual-baseline"
180
+ ]
181
+ }
182
+ }
183
+ },
184
+ "handoff": {
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": [
188
+ "record_ref",
189
+ "gate_id",
190
+ "digest_kind"
191
+ ],
192
+ "properties": {
193
+ "record_ref": {
194
+ "type": "string",
195
+ "minLength": 1
196
+ },
197
+ "gate_id": {
198
+ "type": "string",
199
+ "minLength": 1
200
+ },
201
+ "digest_kind": {
202
+ "enum": [
203
+ "canonical-json",
204
+ "sha256-bytes",
205
+ "visual-baseline"
206
+ ]
207
+ }
208
+ }
209
+ },
210
+ "existing_ui_baseline_ref": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "record_ref",
215
+ "gate_id",
216
+ "digest_kind"
217
+ ],
218
+ "properties": {
219
+ "record_ref": {
220
+ "type": "string",
221
+ "minLength": 1
222
+ },
223
+ "gate_id": {
224
+ "type": "string",
225
+ "minLength": 1
226
+ },
227
+ "digest_kind": {
228
+ "const": "sha256-bytes"
229
+ }
230
+ }
231
+ }
232
+ }
233
+ },
234
+ "additional_files": {
235
+ "type": "array",
236
+ "items": {
237
+ "type": "string",
238
+ "minLength": 1
239
+ },
240
+ "minItems": 0
241
+ },
242
+ "reference_map": {
243
+ "type": "object",
244
+ "additionalProperties": {
245
+ "type": "string",
246
+ "minLength": 1
247
+ }
248
+ },
249
+ "prototype": {
250
+ "type": "object",
251
+ "additionalProperties": false,
252
+ "required": [
253
+ "profile",
254
+ "preview_root",
255
+ "entry_ref",
256
+ "verification_ref",
257
+ "verification_digest"
258
+ ],
259
+ "properties": {
260
+ "profile": {
261
+ "enum": [
262
+ "H1",
263
+ "H2"
264
+ ]
265
+ },
266
+ "preview_root": {
267
+ "type": "string",
268
+ "minLength": 1
269
+ },
270
+ "entry_ref": {
271
+ "type": "string",
272
+ "minLength": 1
273
+ },
274
+ "verification_ref": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "source_root": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "lock_ref": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "verification_digest": {
287
+ "type": "string",
288
+ "pattern": "^sha256:[a-f0-9]{64}$"
289
+ },
290
+ "source_digest": {
291
+ "type": "string",
292
+ "pattern": "^sha256:[a-f0-9]{64}$"
293
+ }
294
+ },
295
+ "allOf": [
296
+ {
297
+ "if": {
298
+ "properties": {
299
+ "profile": {
300
+ "const": "H2"
301
+ }
302
+ }
303
+ },
304
+ "then": {
305
+ "required": [
306
+ "source_root",
307
+ "lock_ref",
308
+ "source_digest"
309
+ ]
310
+ }
311
+ }
312
+ ]
313
+ },
314
+ "ui_baseline_kind": {
315
+ "enum": [
316
+ "prototype",
317
+ "existing-ui-baseline"
318
+ ]
319
+ }
320
+ },
321
+ "allOf": [
322
+ {
323
+ "if": {
324
+ "properties": {
325
+ "ui_baseline_kind": {
326
+ "const": "prototype"
327
+ }
328
+ }
329
+ },
330
+ "then": {
331
+ "required": [
332
+ "prototype"
333
+ ],
334
+ "properties": {
335
+ "approvals": {
336
+ "required": [
337
+ "prototype_ref",
338
+ "visual_baseline_ref"
339
+ ],
340
+ "not": {
341
+ "required": [
342
+ "existing_ui_baseline_ref"
343
+ ]
344
+ }
345
+ }
346
+ }
347
+ },
348
+ "else": {
349
+ "not": {
350
+ "required": [
351
+ "prototype"
352
+ ]
353
+ },
354
+ "properties": {
355
+ "approvals": {
356
+ "required": [
357
+ "existing_ui_baseline_ref"
358
+ ],
359
+ "not": {
360
+ "anyOf": [
361
+ {
362
+ "required": [
363
+ "prototype_ref"
364
+ ]
365
+ },
366
+ {
367
+ "required": [
368
+ "visual_baseline_ref"
369
+ ]
370
+ }
371
+ ]
372
+ }
373
+ }
374
+ }
375
+ }
376
+ }
377
+ ]
378
+ }
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.local/schemas/strategic-handoff-import-receipt-v2.json",
4
+ "title": "YSS Strategic Handoff Import Receipt v2",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "bundle_id", "version", "bundle_digest", "package_ref", "target_context_digest", "target_profile_id", "selected_consumer_capabilities", "routes", "status"],
8
+ "properties": {
9
+ "schema_version": {"const": 2},
10
+ "bundle_id": {"type": "string", "pattern": "^strategic-design-handoff\\.[a-z0-9][a-z0-9-]*$"},
11
+ "version": {"type": "string", "pattern": "^v[1-9][0-9]*$"},
12
+ "bundle_digest": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
13
+ "package_ref": {"type": "string", "minLength": 1},
14
+ "target_context_digest": {"type": "string", "pattern": "^sha256:[a-f0-9]{64}$"},
15
+ "target_profile_id": {"type": "string", "minLength": 1},
16
+ "selected_consumer_capabilities": {
17
+ "type": "array",
18
+ "minItems": 1,
19
+ "uniqueItems": true,
20
+ "items": {"enum": ["backend-technical-design", "frontend-engineering-design", "delivery-coordination"]}
21
+ },
22
+ "routes": {
23
+ "type": "array",
24
+ "minItems": 1,
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": false,
28
+ "required": ["route_id", "capability", "activation", "artifact_refs"],
29
+ "properties": {
30
+ "route_id": {"type": "string", "pattern": "^route\\.[a-z0-9][a-z0-9-]*$"},
31
+ "capability": {"enum": ["backend-technical-design", "frontend-engineering-design", "delivery-coordination"]},
32
+ "activation": {"enum": ["required", "optional", "not-applicable"]},
33
+ "artifact_refs": {"type": "array", "minItems": 1, "uniqueItems": true, "items": {"type": "string", "minLength": 1}}
34
+ }
35
+ }
36
+ },
37
+ "status": {"const": "pending-context-reconciliation"}
38
+ }
39
+ }