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,743 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.local/schemas/strategic-design-handoff-v3.json",
4
+ "title": "YSS 业务方案交接包",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "handoff_id",
10
+ "handoff_version",
11
+ "status",
12
+ "source",
13
+ "source_context_snapshot",
14
+ "context_delta",
15
+ "target_context_reconciliation",
16
+ "target",
17
+ "problem_and_business_outcomes",
18
+ "bounded_context_and_subdomain_map",
19
+ "context_map_and_translation_responsibility",
20
+ "ubiquitous_language_and_concept_candidates",
21
+ "scenarios_and_business_invariants",
22
+ "tactical_design_questions",
23
+ "deferred_decisions_and_ownership",
24
+ "evidence_and_version_digests",
25
+ "acceptance"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": 3
30
+ },
31
+ "handoff_id": {
32
+ "type": "string",
33
+ "pattern": "^strategic-design-handoff\\.[a-z0-9][a-z0-9-]*$"
34
+ },
35
+ "handoff_version": {
36
+ "type": "string",
37
+ "pattern": "^v[0-9]+$"
38
+ },
39
+ "status": {
40
+ "enum": [
41
+ "draft",
42
+ "ready-for-human",
43
+ "approved",
44
+ "stale",
45
+ "blocked"
46
+ ]
47
+ },
48
+ "source": {
49
+ "type": "object",
50
+ "additionalProperties": false,
51
+ "required": [
52
+ "domain_strategy_ref",
53
+ "stage_decision_package_ref",
54
+ "spec_ref",
55
+ "prototype_ref",
56
+ "visual_baseline_ref",
57
+ "business_ticket_set_ref"
58
+ ],
59
+ "properties": {
60
+ "domain_strategy_ref": {
61
+ "$ref": "#/$defs/versionedRef"
62
+ },
63
+ "stage_decision_package_ref": {
64
+ "$ref": "#/$defs/versionedRef"
65
+ },
66
+ "spec_ref": {
67
+ "$ref": "#/$defs/versionedRef"
68
+ },
69
+ "prototype_ref": {
70
+ "$ref": "#/$defs/versionedRef"
71
+ },
72
+ "visual_baseline_ref": {
73
+ "$ref": "#/$defs/visualBaselineRef"
74
+ },
75
+ "business_ticket_set_ref": {
76
+ "$ref": "#/$defs/versionedRef"
77
+ }
78
+ }
79
+ },
80
+ "source_context_snapshot": {
81
+ "$ref": "#/$defs/contextSnapshot"
82
+ },
83
+ "context_delta": {
84
+ "type": "object",
85
+ "additionalProperties": false,
86
+ "required": [
87
+ "added",
88
+ "updated",
89
+ "deprecated"
90
+ ],
91
+ "properties": {
92
+ "added": {
93
+ "$ref": "#/$defs/contextTerms"
94
+ },
95
+ "updated": {
96
+ "$ref": "#/$defs/contextTerms"
97
+ },
98
+ "deprecated": {
99
+ "$ref": "#/$defs/contextTerms"
100
+ }
101
+ }
102
+ },
103
+ "target_context_reconciliation": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "target_context_ref",
108
+ "reconciliation_schema_ref",
109
+ "required_before_skill",
110
+ "status"
111
+ ],
112
+ "properties": {
113
+ "target_context_ref": {
114
+ "const": "CONTEXT.md"
115
+ },
116
+ "reconciliation_schema_ref": {
117
+ "const": "docs/process/schemas/context-reconciliation.schema.json"
118
+ },
119
+ "required_before_skill": {
120
+ "enum": [
121
+ "yss-technical-design",
122
+ "yss-tactical-design"
123
+ ]
124
+ },
125
+ "status": {
126
+ "const": "pending"
127
+ }
128
+ }
129
+ },
130
+ "target": {
131
+ "type": "object",
132
+ "additionalProperties": false,
133
+ "required": [
134
+ "team",
135
+ "skill",
136
+ "output"
137
+ ],
138
+ "properties": {
139
+ "team": {
140
+ "const": "downstream-rd-team"
141
+ },
142
+ "skill": {
143
+ "enum": [
144
+ "yss-technical-design",
145
+ "yss-tactical-design"
146
+ ]
147
+ },
148
+ "output": {
149
+ "enum": [
150
+ "technical-design-contract",
151
+ "tactical-design-contract"
152
+ ]
153
+ }
154
+ }
155
+ },
156
+ "problem_and_business_outcomes": {
157
+ "$ref": "#/$defs/nonEmptyStrings"
158
+ },
159
+ "bounded_context_and_subdomain_map": {
160
+ "$ref": "#/$defs/nonEmptyStrings"
161
+ },
162
+ "context_map_and_translation_responsibility": {
163
+ "$ref": "#/$defs/nonEmptyStrings"
164
+ },
165
+ "ubiquitous_language_and_concept_candidates": {
166
+ "$ref": "#/$defs/nonEmptyStrings"
167
+ },
168
+ "scenarios_and_business_invariants": {
169
+ "$ref": "#/$defs/nonEmptyStrings"
170
+ },
171
+ "tactical_design_questions": {
172
+ "$ref": "#/$defs/nonEmptyStrings"
173
+ },
174
+ "deferred_decisions_and_ownership": {
175
+ "type": "array",
176
+ "items": {
177
+ "$ref": "#/$defs/deferred"
178
+ }
179
+ },
180
+ "evidence_and_version_digests": {
181
+ "$ref": "#/$defs/nonEmptyStrings"
182
+ },
183
+ "acceptance": {
184
+ "$ref": "#/$defs/nonEmptyStrings"
185
+ },
186
+ "package_export": {
187
+ "type": "object",
188
+ "additionalProperties": false,
189
+ "required": [
190
+ "schema_version",
191
+ "approvals",
192
+ "additional_files",
193
+ "reference_map",
194
+ "prototype"
195
+ ],
196
+ "properties": {
197
+ "schema_version": {
198
+ "const": 1
199
+ },
200
+ "approvals": {
201
+ "type": "object",
202
+ "additionalProperties": false,
203
+ "required": [
204
+ "domain_strategy_ref",
205
+ "stage_decision_package_ref",
206
+ "spec_ref",
207
+ "prototype_ref",
208
+ "visual_baseline_ref",
209
+ "business_ticket_set_ref",
210
+ "handoff"
211
+ ],
212
+ "properties": {
213
+ "domain_strategy_ref": {
214
+ "type": "object",
215
+ "additionalProperties": false,
216
+ "required": [
217
+ "record_ref",
218
+ "gate_id",
219
+ "digest_kind"
220
+ ],
221
+ "properties": {
222
+ "record_ref": {
223
+ "type": "string",
224
+ "minLength": 1
225
+ },
226
+ "gate_id": {
227
+ "type": "string",
228
+ "minLength": 1
229
+ },
230
+ "digest_kind": {
231
+ "enum": [
232
+ "canonical-json",
233
+ "sha256-bytes",
234
+ "visual-baseline"
235
+ ]
236
+ }
237
+ }
238
+ },
239
+ "stage_decision_package_ref": {
240
+ "type": "object",
241
+ "additionalProperties": false,
242
+ "required": [
243
+ "record_ref",
244
+ "gate_id",
245
+ "digest_kind"
246
+ ],
247
+ "properties": {
248
+ "record_ref": {
249
+ "type": "string",
250
+ "minLength": 1
251
+ },
252
+ "gate_id": {
253
+ "type": "string",
254
+ "minLength": 1
255
+ },
256
+ "digest_kind": {
257
+ "enum": [
258
+ "canonical-json",
259
+ "sha256-bytes",
260
+ "visual-baseline"
261
+ ]
262
+ }
263
+ }
264
+ },
265
+ "spec_ref": {
266
+ "type": "object",
267
+ "additionalProperties": false,
268
+ "required": [
269
+ "record_ref",
270
+ "gate_id",
271
+ "digest_kind"
272
+ ],
273
+ "properties": {
274
+ "record_ref": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "gate_id": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "digest_kind": {
283
+ "enum": [
284
+ "canonical-json",
285
+ "sha256-bytes",
286
+ "visual-baseline"
287
+ ]
288
+ }
289
+ }
290
+ },
291
+ "prototype_ref": {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "required": [
295
+ "record_ref",
296
+ "gate_id",
297
+ "digest_kind"
298
+ ],
299
+ "properties": {
300
+ "record_ref": {
301
+ "type": "string",
302
+ "minLength": 1
303
+ },
304
+ "gate_id": {
305
+ "type": "string",
306
+ "minLength": 1
307
+ },
308
+ "digest_kind": {
309
+ "enum": [
310
+ "canonical-json",
311
+ "sha256-bytes",
312
+ "visual-baseline"
313
+ ]
314
+ }
315
+ }
316
+ },
317
+ "visual_baseline_ref": {
318
+ "type": "object",
319
+ "additionalProperties": false,
320
+ "required": [
321
+ "record_ref",
322
+ "gate_id",
323
+ "digest_kind"
324
+ ],
325
+ "properties": {
326
+ "record_ref": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ },
330
+ "gate_id": {
331
+ "type": "string",
332
+ "minLength": 1
333
+ },
334
+ "digest_kind": {
335
+ "enum": [
336
+ "canonical-json",
337
+ "sha256-bytes",
338
+ "visual-baseline"
339
+ ]
340
+ }
341
+ }
342
+ },
343
+ "business_ticket_set_ref": {
344
+ "type": "object",
345
+ "additionalProperties": false,
346
+ "required": [
347
+ "record_ref",
348
+ "gate_id",
349
+ "digest_kind"
350
+ ],
351
+ "properties": {
352
+ "record_ref": {
353
+ "type": "string",
354
+ "minLength": 1
355
+ },
356
+ "gate_id": {
357
+ "type": "string",
358
+ "minLength": 1
359
+ },
360
+ "digest_kind": {
361
+ "enum": [
362
+ "canonical-json",
363
+ "sha256-bytes",
364
+ "visual-baseline"
365
+ ]
366
+ }
367
+ }
368
+ },
369
+ "handoff": {
370
+ "type": "object",
371
+ "additionalProperties": false,
372
+ "required": [
373
+ "record_ref",
374
+ "gate_id",
375
+ "digest_kind"
376
+ ],
377
+ "properties": {
378
+ "record_ref": {
379
+ "type": "string",
380
+ "minLength": 1
381
+ },
382
+ "gate_id": {
383
+ "type": "string",
384
+ "minLength": 1
385
+ },
386
+ "digest_kind": {
387
+ "enum": [
388
+ "canonical-json",
389
+ "sha256-bytes",
390
+ "visual-baseline"
391
+ ]
392
+ }
393
+ }
394
+ }
395
+ }
396
+ },
397
+ "additional_files": {
398
+ "type": "array",
399
+ "items": {
400
+ "type": "string",
401
+ "minLength": 1
402
+ },
403
+ "minItems": 0
404
+ },
405
+ "reference_map": {
406
+ "type": "object",
407
+ "additionalProperties": {
408
+ "type": "string",
409
+ "minLength": 1
410
+ }
411
+ },
412
+ "prototype": {
413
+ "type": "object",
414
+ "additionalProperties": false,
415
+ "required": [
416
+ "profile",
417
+ "preview_root",
418
+ "entry_ref",
419
+ "verification_ref",
420
+ "verification_digest"
421
+ ],
422
+ "properties": {
423
+ "profile": {
424
+ "enum": [
425
+ "H1",
426
+ "H2"
427
+ ]
428
+ },
429
+ "preview_root": {
430
+ "type": "string",
431
+ "minLength": 1
432
+ },
433
+ "entry_ref": {
434
+ "type": "string",
435
+ "minLength": 1
436
+ },
437
+ "verification_ref": {
438
+ "type": "string",
439
+ "minLength": 1
440
+ },
441
+ "source_root": {
442
+ "type": "string",
443
+ "minLength": 1
444
+ },
445
+ "lock_ref": {
446
+ "type": "string",
447
+ "minLength": 1
448
+ },
449
+ "verification_digest": {
450
+ "type": "string",
451
+ "pattern": "^sha256:[a-f0-9]{64}$"
452
+ },
453
+ "source_digest": {
454
+ "type": "string",
455
+ "pattern": "^sha256:[a-f0-9]{64}$"
456
+ }
457
+ },
458
+ "allOf": [
459
+ {
460
+ "if": {
461
+ "properties": {
462
+ "profile": {
463
+ "const": "H2"
464
+ }
465
+ }
466
+ },
467
+ "then": {
468
+ "required": [
469
+ "source_root",
470
+ "lock_ref",
471
+ "source_digest"
472
+ ]
473
+ }
474
+ }
475
+ ]
476
+ }
477
+ }
478
+ }
479
+ },
480
+ "$defs": {
481
+ "termRefs": {
482
+ "type": "array",
483
+ "uniqueItems": true,
484
+ "items": {
485
+ "type": "string",
486
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)/[A-Z][A-Za-z0-9]+$"
487
+ }
488
+ },
489
+ "contextTerms": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "object",
493
+ "additionalProperties": false,
494
+ "required": [
495
+ "term_ref",
496
+ "term",
497
+ "meaning",
498
+ "english_identifier",
499
+ "context_id",
500
+ "forbidden_aliases"
501
+ ],
502
+ "properties": {
503
+ "term_ref": {
504
+ "type": "string",
505
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)/[A-Z][A-Za-z0-9]+$"
506
+ },
507
+ "term": {
508
+ "type": "string",
509
+ "minLength": 1
510
+ },
511
+ "meaning": {
512
+ "type": "string",
513
+ "minLength": 1
514
+ },
515
+ "english_identifier": {
516
+ "type": "string",
517
+ "pattern": "^[A-Z][A-Za-z0-9]+$"
518
+ },
519
+ "context_id": {
520
+ "type": "string",
521
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)$"
522
+ },
523
+ "forbidden_aliases": {
524
+ "type": "array",
525
+ "uniqueItems": true,
526
+ "items": {
527
+ "type": "string",
528
+ "minLength": 1
529
+ }
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "contextSnapshot": {
535
+ "type": "object",
536
+ "additionalProperties": false,
537
+ "required": [
538
+ "context_ref",
539
+ "context_schema_version",
540
+ "document_digest",
541
+ "referenced_terms_digest",
542
+ "term_refs"
543
+ ],
544
+ "properties": {
545
+ "context_ref": {
546
+ "const": "CONTEXT.md"
547
+ },
548
+ "context_schema_version": {
549
+ "const": 1
550
+ },
551
+ "document_digest": {
552
+ "type": "string",
553
+ "pattern": "^sha256:[a-f0-9]{64}$"
554
+ },
555
+ "referenced_terms_digest": {
556
+ "type": "string",
557
+ "pattern": "^sha256:[a-f0-9]{64}$"
558
+ },
559
+ "term_refs": {
560
+ "$ref": "#/$defs/termRefs"
561
+ }
562
+ }
563
+ },
564
+ "nonEmptyStrings": {
565
+ "type": "array",
566
+ "minItems": 1,
567
+ "items": {
568
+ "type": "string",
569
+ "minLength": 1
570
+ }
571
+ },
572
+ "versionedRef": {
573
+ "type": "object",
574
+ "additionalProperties": false,
575
+ "required": [
576
+ "id",
577
+ "version",
578
+ "digest",
579
+ "status",
580
+ "persisted_ref"
581
+ ],
582
+ "properties": {
583
+ "id": {
584
+ "type": "string",
585
+ "minLength": 1
586
+ },
587
+ "version": {
588
+ "type": "string",
589
+ "pattern": "^v[0-9]+$"
590
+ },
591
+ "digest": {
592
+ "type": "string",
593
+ "minLength": 1
594
+ },
595
+ "status": {
596
+ "const": "approved"
597
+ },
598
+ "persisted_ref": {
599
+ "type": "string",
600
+ "minLength": 1
601
+ }
602
+ }
603
+ },
604
+ "visualBaselineRef": {
605
+ "type": "object",
606
+ "additionalProperties": false,
607
+ "required": [
608
+ "baseline_id",
609
+ "version",
610
+ "digest",
611
+ "status",
612
+ "persisted_ref",
613
+ "manifest_ref",
614
+ "case_ids"
615
+ ],
616
+ "properties": {
617
+ "baseline_id": {
618
+ "type": "string",
619
+ "pattern": "^visual-baseline\\.[a-z0-9][a-z0-9-]*$"
620
+ },
621
+ "version": {
622
+ "type": "string",
623
+ "pattern": "^v[1-9][0-9]*$"
624
+ },
625
+ "digest": {
626
+ "type": "string",
627
+ "pattern": "^sha256:[a-f0-9]{64}$"
628
+ },
629
+ "status": {
630
+ "const": "approved"
631
+ },
632
+ "persisted_ref": {
633
+ "type": "string",
634
+ "minLength": 1
635
+ },
636
+ "manifest_ref": {
637
+ "const": "visual-baseline.yaml"
638
+ },
639
+ "case_ids": {
640
+ "type": "array",
641
+ "minItems": 2,
642
+ "uniqueItems": true,
643
+ "items": {
644
+ "type": "string",
645
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
646
+ }
647
+ }
648
+ }
649
+ },
650
+ "deferred": {
651
+ "type": "object",
652
+ "additionalProperties": false,
653
+ "required": [
654
+ "decision",
655
+ "owner",
656
+ "next_action",
657
+ "target_version"
658
+ ],
659
+ "properties": {
660
+ "decision": {
661
+ "type": "string",
662
+ "minLength": 1
663
+ },
664
+ "owner": {
665
+ "type": "string",
666
+ "minLength": 1
667
+ },
668
+ "next_action": {
669
+ "type": "string",
670
+ "minLength": 1
671
+ },
672
+ "target_version": {
673
+ "type": "string",
674
+ "minLength": 1
675
+ }
676
+ }
677
+ }
678
+ },
679
+ "allOf": [
680
+ {
681
+ "if": {
682
+ "properties": {
683
+ "target": {
684
+ "properties": {
685
+ "skill": {
686
+ "const": "yss-technical-design"
687
+ }
688
+ }
689
+ }
690
+ }
691
+ },
692
+ "then": {
693
+ "properties": {
694
+ "target": {
695
+ "properties": {
696
+ "output": {
697
+ "const": "technical-design-contract"
698
+ }
699
+ }
700
+ },
701
+ "target_context_reconciliation": {
702
+ "properties": {
703
+ "required_before_skill": {
704
+ "const": "yss-technical-design"
705
+ }
706
+ }
707
+ }
708
+ }
709
+ }
710
+ },
711
+ {
712
+ "if": {
713
+ "properties": {
714
+ "target": {
715
+ "properties": {
716
+ "skill": {
717
+ "const": "yss-tactical-design"
718
+ }
719
+ }
720
+ }
721
+ }
722
+ },
723
+ "then": {
724
+ "properties": {
725
+ "target": {
726
+ "properties": {
727
+ "output": {
728
+ "const": "tactical-design-contract"
729
+ }
730
+ }
731
+ },
732
+ "target_context_reconciliation": {
733
+ "properties": {
734
+ "required_before_skill": {
735
+ "const": "yss-tactical-design"
736
+ }
737
+ }
738
+ }
739
+ }
740
+ }
741
+ }
742
+ ]
743
+ }