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