create-yss-spec 3.3.7 → 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 (131) hide show
  1. package/README.md +12 -13
  2. package/package.json +1 -1
  3. package/template/.agents/skills/.strategic-design-skills-manifest.json +2 -2
  4. package/template/.agents/skills/implementation-repo-onboarding/SKILL.md +2 -2
  5. package/template/.agents/skills/yss-application/SKILL.md +1 -1
  6. package/template/.agents/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  7. package/template/.agents/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  8. package/template/.agents/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  9. package/template/.agents/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  10. package/template/.agents/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  11. package/template/.agents/skills/yss-prototype-stage/SKILL.md +10 -1
  12. package/template/.agents/skills/yss-technical-design/SKILL.md +2 -0
  13. package/template/.agents/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  14. package/template/.agents/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  15. package/template/.agents/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  16. package/template/.agents/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  17. package/template/.agents/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  18. package/template/.agents/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  19. package/template/.agents/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  20. package/template/.agents/skills/yss-web-controller/SKILL.md +1 -1
  21. package/template/.agents/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  22. package/template/.agents/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  23. package/template/.codex/skills/implementation-repo-onboarding/SKILL.md +2 -2
  24. package/template/.codex/skills/yss-application/SKILL.md +1 -1
  25. package/template/.codex/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  26. package/template/.codex/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  27. package/template/.codex/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  28. package/template/.codex/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  29. package/template/.codex/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  30. package/template/.codex/skills/yss-prototype-stage/SKILL.md +10 -1
  31. package/template/.codex/skills/yss-technical-design/SKILL.md +2 -0
  32. package/template/.codex/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  33. package/template/.codex/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  34. package/template/.codex/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  35. package/template/.codex/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  36. package/template/.codex/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  37. package/template/.codex/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  38. package/template/.codex/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  39. package/template/.codex/skills/yss-web-controller/SKILL.md +1 -1
  40. package/template/.codex/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  41. package/template/.codex/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  42. package/template/.cursor/skills/implementation-repo-onboarding/SKILL.md +2 -2
  43. package/template/.cursor/skills/yss-application/SKILL.md +1 -1
  44. package/template/.cursor/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  45. package/template/.cursor/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  46. package/template/.cursor/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  47. package/template/.cursor/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  48. package/template/.cursor/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  49. package/template/.cursor/skills/yss-prototype-stage/SKILL.md +10 -1
  50. package/template/.cursor/skills/yss-technical-design/SKILL.md +2 -0
  51. package/template/.cursor/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  52. package/template/.cursor/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  53. package/template/.cursor/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  54. package/template/.cursor/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  55. package/template/.cursor/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  56. package/template/.cursor/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  57. package/template/.cursor/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  58. package/template/.cursor/skills/yss-web-controller/SKILL.md +1 -1
  59. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  60. package/template/.cursor/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  61. package/template/.pi/skills/implementation-repo-onboarding/SKILL.md +2 -2
  62. package/template/.pi/skills/yss-application/SKILL.md +1 -1
  63. package/template/.pi/skills/yss-application/references/profiles/existing-domain-driven-maven.md +5 -0
  64. package/template/.pi/skills/yss-application/references/profiles/existing-layered-mvc-maven.md +5 -0
  65. package/template/.pi/skills/yss-implementation-contract-compiler/SKILL.md +2 -2
  66. package/template/.pi/skills/yss-implementation-contract-compiler/references/compiler-contract.yaml +4 -0
  67. package/template/.pi/skills/yss-product-lifecycle/references/orchestration-contract.yaml +6 -1
  68. package/template/.pi/skills/yss-prototype-stage/SKILL.md +10 -1
  69. package/template/.pi/skills/yss-technical-design/SKILL.md +2 -0
  70. package/template/.pi/skills/yss-technical-design/references/engineering-design.schema.json +224 -0
  71. package/template/.pi/skills/yss-technical-design/references/technical-design-common.schema.json +6 -0
  72. package/template/.pi/skills/yss-technical-design/references/technical-design.schema.json +288 -10
  73. package/template/.pi/skills/yss-technical-design/scripts/engineering-design.mjs +30 -0
  74. package/template/.pi/skills/yss-technical-design/scripts/generate-schema.mjs +2 -1
  75. package/template/.pi/skills/yss-technical-design/scripts/validate-technical-design.mjs +20 -8
  76. package/template/.pi/skills/yss-technical-design/tests/engineering-scenarios.mjs +12 -0
  77. package/template/.pi/skills/yss-web-controller/SKILL.md +1 -1
  78. package/template/.pi/skills/yss-web-controller/references/profiles/existing-domain-driven-maven.md +5 -0
  79. package/template/.pi/skills/yss-web-controller/references/profiles/existing-layered-mvc-maven.md +5 -0
  80. package/template/README.md +4 -6
  81. package/template/docs/agents/backend-architecture-profiles.md +4 -0
  82. package/template/docs/agents/yss-skill-registry.yaml +13 -0
  83. package/template/docs/design/templates/prototype-confirmation-template.md +2 -2
  84. package/template/docs/design/templates/prototype-review-checklist.md +2 -2
  85. package/template/docs/plan/templates/market-analysis-template.md +3 -3
  86. package/template/docs/plan/templates/user-pain-points-template.md +3 -3
  87. package/template/docs/process/delivery-preflight.md +72 -0
  88. package/template/docs/process/document-writing.md +5 -1
  89. package/template/docs/process/existing-backend-architecture.md +31 -0
  90. package/template/docs/process/existing-ui-baseline.md +40 -0
  91. package/template/docs/process/frontend-backend-delivery.md +19 -6
  92. package/template/docs/process/implementation-repo-integration.md +6 -0
  93. package/template/docs/process/schemas/backend-architecture-identity.schema.json +111 -14
  94. package/template/docs/process/schemas/delivery-preflight-input.schema.json +158 -0
  95. package/template/docs/process/schemas/delivery-preflight-result.schema.json +159 -0
  96. package/template/docs/process/schemas/digital-human-task-package.schema.json +1 -1
  97. package/template/docs/process/schemas/existing-ui-baseline.schema.json +365 -0
  98. package/template/docs/process/schemas/frontend-delivery-acceptance-v3.schema.json +308 -0
  99. package/template/docs/process/schemas/frontend-strategic-preflight-v2.schema.json +114 -0
  100. package/template/docs/process/schemas/strategic-design-handoff-v5.schema.json +932 -0
  101. package/template/docs/process/schemas/strategic-handoff-export-v2.schema.json +378 -0
  102. package/template/docs/process/strategic-handoff-package.md +21 -13
  103. 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
  104. package/template/docs/user-guide//347/224/250/346/210/267/346/211/213/345/206/214.md +83 -67
  105. 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
  106. 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
  107. package/template/scripts/backend-delivery +20 -4
  108. package/template/scripts/lib/approved-execution-context.mjs +106 -0
  109. package/template/scripts/lib/backend-architecture.mjs +12 -0
  110. package/template/scripts/lib/backend-delivery.mjs +10 -6
  111. package/template/scripts/lib/delivery-preflight.mjs +238 -0
  112. package/template/scripts/lib/existing-backend-architecture.mjs +139 -0
  113. package/template/scripts/lib/existing-ui-baseline.mjs +84 -0
  114. package/template/scripts/lib/frontend-delivery.mjs +23 -15
  115. package/template/scripts/lib/implementation-contract-compiler.mjs +19 -5
  116. package/template/scripts/lib/json-schema.mjs +19 -4
  117. package/template/scripts/lib/profile-skill-sync.mjs +26 -0
  118. package/template/scripts/lib/strategic-handoff-consumption.mjs +6 -5
  119. package/template/scripts/lib/strategic-handoff-design-targets.mjs +2 -3
  120. package/template/scripts/lib/strategic-handoff-io.mjs +10 -0
  121. package/template/scripts/lib/strategic-handoff.mjs +47 -29
  122. package/template/scripts/lib/task-package.mjs +11 -3
  123. package/template/scripts/lib/technical-design-boundary.mjs +9 -1
  124. package/template/scripts/lib/ui-baseline.mjs +26 -0
  125. package/template/scripts/lib/user-decision.mjs +4 -1
  126. package/template/scripts/preflight-delivery +14 -0
  127. package/template/scripts/strategic-handoff +19 -4
  128. package/template/scripts/sync-profile-skills +4 -5
  129. package/template/skills-lock.json +15 -15
  130. package/template.snapshot.json +3 -3
  131. 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,932 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://yss.dev/schemas/strategic-design-handoff-v5.schema.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
+ "ui_baseline_kind"
26
+ ],
27
+ "properties": {
28
+ "schema_version": {
29
+ "const": 5
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
+ "business_ticket_set_ref"
56
+ ],
57
+ "properties": {
58
+ "domain_strategy_ref": {
59
+ "$ref": "#/$defs/versionedRef"
60
+ },
61
+ "stage_decision_package_ref": {
62
+ "$ref": "#/$defs/versionedRef"
63
+ },
64
+ "spec_ref": {
65
+ "$ref": "#/$defs/versionedRef"
66
+ },
67
+ "prototype_ref": {
68
+ "$ref": "#/$defs/versionedRef"
69
+ },
70
+ "visual_baseline_ref": {
71
+ "$ref": "#/$defs/visualBaselineRef"
72
+ },
73
+ "business_ticket_set_ref": {
74
+ "$ref": "#/$defs/versionedRef"
75
+ },
76
+ "existing_ui_baseline_ref": {
77
+ "$ref": "#/$defs/existingUiBaselineRef"
78
+ }
79
+ }
80
+ },
81
+ "source_context_snapshot": {
82
+ "$ref": "#/$defs/contextSnapshot"
83
+ },
84
+ "context_delta": {
85
+ "type": "object",
86
+ "additionalProperties": false,
87
+ "required": [
88
+ "added",
89
+ "updated",
90
+ "deprecated"
91
+ ],
92
+ "properties": {
93
+ "added": {
94
+ "$ref": "#/$defs/contextTerms"
95
+ },
96
+ "updated": {
97
+ "$ref": "#/$defs/contextTerms"
98
+ },
99
+ "deprecated": {
100
+ "$ref": "#/$defs/contextTerms"
101
+ }
102
+ }
103
+ },
104
+ "consumer_routes": {
105
+ "type": "array",
106
+ "minItems": 3,
107
+ "maxItems": 3,
108
+ "items": {
109
+ "$ref": "#/$defs/consumerRoute"
110
+ }
111
+ },
112
+ "problem_and_business_outcomes": {
113
+ "$ref": "#/$defs/nonEmptyStrings"
114
+ },
115
+ "bounded_context_and_subdomain_map": {
116
+ "$ref": "#/$defs/nonEmptyStrings"
117
+ },
118
+ "context_map_and_translation_responsibility": {
119
+ "$ref": "#/$defs/nonEmptyStrings"
120
+ },
121
+ "ubiquitous_language_and_concept_candidates": {
122
+ "$ref": "#/$defs/nonEmptyStrings"
123
+ },
124
+ "scenarios_and_business_invariants": {
125
+ "$ref": "#/$defs/nonEmptyStrings"
126
+ },
127
+ "tactical_design_questions": {
128
+ "$ref": "#/$defs/nonEmptyStrings"
129
+ },
130
+ "deferred_decisions_and_ownership": {
131
+ "type": "array",
132
+ "items": {
133
+ "$ref": "#/$defs/deferred"
134
+ }
135
+ },
136
+ "evidence_and_version_digests": {
137
+ "$ref": "#/$defs/nonEmptyStrings"
138
+ },
139
+ "acceptance": {
140
+ "$ref": "#/$defs/nonEmptyStrings"
141
+ },
142
+ "package_export": {
143
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
144
+ "$id": "https://yss.dev/schemas/strategic-handoff-export.schema.json",
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "schema_version",
149
+ "approvals",
150
+ "additional_files",
151
+ "reference_map",
152
+ "ui_baseline_kind"
153
+ ],
154
+ "properties": {
155
+ "schema_version": {
156
+ "const": 2
157
+ },
158
+ "approvals": {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": [
162
+ "domain_strategy_ref",
163
+ "stage_decision_package_ref",
164
+ "spec_ref",
165
+ "business_ticket_set_ref",
166
+ "handoff"
167
+ ],
168
+ "properties": {
169
+ "domain_strategy_ref": {
170
+ "type": "object",
171
+ "additionalProperties": false,
172
+ "required": [
173
+ "record_ref",
174
+ "gate_id",
175
+ "digest_kind"
176
+ ],
177
+ "properties": {
178
+ "record_ref": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ },
182
+ "gate_id": {
183
+ "type": "string",
184
+ "minLength": 1
185
+ },
186
+ "digest_kind": {
187
+ "enum": [
188
+ "canonical-json",
189
+ "sha256-bytes",
190
+ "visual-baseline"
191
+ ]
192
+ }
193
+ }
194
+ },
195
+ "stage_decision_package_ref": {
196
+ "type": "object",
197
+ "additionalProperties": false,
198
+ "required": [
199
+ "record_ref",
200
+ "gate_id",
201
+ "digest_kind"
202
+ ],
203
+ "properties": {
204
+ "record_ref": {
205
+ "type": "string",
206
+ "minLength": 1
207
+ },
208
+ "gate_id": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "digest_kind": {
213
+ "enum": [
214
+ "canonical-json",
215
+ "sha256-bytes",
216
+ "visual-baseline"
217
+ ]
218
+ }
219
+ }
220
+ },
221
+ "spec_ref": {
222
+ "type": "object",
223
+ "additionalProperties": false,
224
+ "required": [
225
+ "record_ref",
226
+ "gate_id",
227
+ "digest_kind"
228
+ ],
229
+ "properties": {
230
+ "record_ref": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ },
234
+ "gate_id": {
235
+ "type": "string",
236
+ "minLength": 1
237
+ },
238
+ "digest_kind": {
239
+ "enum": [
240
+ "canonical-json",
241
+ "sha256-bytes",
242
+ "visual-baseline"
243
+ ]
244
+ }
245
+ }
246
+ },
247
+ "prototype_ref": {
248
+ "type": "object",
249
+ "additionalProperties": false,
250
+ "required": [
251
+ "record_ref",
252
+ "gate_id",
253
+ "digest_kind"
254
+ ],
255
+ "properties": {
256
+ "record_ref": {
257
+ "type": "string",
258
+ "minLength": 1
259
+ },
260
+ "gate_id": {
261
+ "type": "string",
262
+ "minLength": 1
263
+ },
264
+ "digest_kind": {
265
+ "enum": [
266
+ "canonical-json",
267
+ "sha256-bytes",
268
+ "visual-baseline"
269
+ ]
270
+ }
271
+ }
272
+ },
273
+ "visual_baseline_ref": {
274
+ "type": "object",
275
+ "additionalProperties": false,
276
+ "required": [
277
+ "record_ref",
278
+ "gate_id",
279
+ "digest_kind"
280
+ ],
281
+ "properties": {
282
+ "record_ref": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "gate_id": {
287
+ "type": "string",
288
+ "minLength": 1
289
+ },
290
+ "digest_kind": {
291
+ "enum": [
292
+ "canonical-json",
293
+ "sha256-bytes",
294
+ "visual-baseline"
295
+ ]
296
+ }
297
+ }
298
+ },
299
+ "business_ticket_set_ref": {
300
+ "type": "object",
301
+ "additionalProperties": false,
302
+ "required": [
303
+ "record_ref",
304
+ "gate_id",
305
+ "digest_kind"
306
+ ],
307
+ "properties": {
308
+ "record_ref": {
309
+ "type": "string",
310
+ "minLength": 1
311
+ },
312
+ "gate_id": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "digest_kind": {
317
+ "enum": [
318
+ "canonical-json",
319
+ "sha256-bytes",
320
+ "visual-baseline"
321
+ ]
322
+ }
323
+ }
324
+ },
325
+ "handoff": {
326
+ "type": "object",
327
+ "additionalProperties": false,
328
+ "required": [
329
+ "record_ref",
330
+ "gate_id",
331
+ "digest_kind"
332
+ ],
333
+ "properties": {
334
+ "record_ref": {
335
+ "type": "string",
336
+ "minLength": 1
337
+ },
338
+ "gate_id": {
339
+ "type": "string",
340
+ "minLength": 1
341
+ },
342
+ "digest_kind": {
343
+ "enum": [
344
+ "canonical-json",
345
+ "sha256-bytes",
346
+ "visual-baseline"
347
+ ]
348
+ }
349
+ }
350
+ },
351
+ "existing_ui_baseline_ref": {
352
+ "type": "object",
353
+ "additionalProperties": false,
354
+ "required": [
355
+ "record_ref",
356
+ "gate_id",
357
+ "digest_kind"
358
+ ],
359
+ "properties": {
360
+ "record_ref": {
361
+ "type": "string",
362
+ "minLength": 1
363
+ },
364
+ "gate_id": {
365
+ "type": "string",
366
+ "minLength": 1
367
+ },
368
+ "digest_kind": {
369
+ "const": "sha256-bytes"
370
+ }
371
+ }
372
+ }
373
+ }
374
+ },
375
+ "additional_files": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "string",
379
+ "minLength": 1
380
+ },
381
+ "minItems": 0
382
+ },
383
+ "reference_map": {
384
+ "type": "object",
385
+ "additionalProperties": {
386
+ "type": "string",
387
+ "minLength": 1
388
+ }
389
+ },
390
+ "prototype": {
391
+ "type": "object",
392
+ "additionalProperties": false,
393
+ "required": [
394
+ "profile",
395
+ "preview_root",
396
+ "entry_ref",
397
+ "verification_ref",
398
+ "verification_digest"
399
+ ],
400
+ "properties": {
401
+ "profile": {
402
+ "enum": [
403
+ "H1",
404
+ "H2"
405
+ ]
406
+ },
407
+ "preview_root": {
408
+ "type": "string",
409
+ "minLength": 1
410
+ },
411
+ "entry_ref": {
412
+ "type": "string",
413
+ "minLength": 1
414
+ },
415
+ "verification_ref": {
416
+ "type": "string",
417
+ "minLength": 1
418
+ },
419
+ "source_root": {
420
+ "type": "string",
421
+ "minLength": 1
422
+ },
423
+ "lock_ref": {
424
+ "type": "string",
425
+ "minLength": 1
426
+ },
427
+ "verification_digest": {
428
+ "type": "string",
429
+ "pattern": "^sha256:[a-f0-9]{64}$"
430
+ },
431
+ "source_digest": {
432
+ "type": "string",
433
+ "pattern": "^sha256:[a-f0-9]{64}$"
434
+ }
435
+ },
436
+ "allOf": [
437
+ {
438
+ "if": {
439
+ "properties": {
440
+ "profile": {
441
+ "const": "H2"
442
+ }
443
+ }
444
+ },
445
+ "then": {
446
+ "required": [
447
+ "source_root",
448
+ "lock_ref",
449
+ "source_digest"
450
+ ]
451
+ }
452
+ }
453
+ ]
454
+ },
455
+ "ui_baseline_kind": {
456
+ "enum": [
457
+ "prototype",
458
+ "existing-ui-baseline"
459
+ ]
460
+ }
461
+ },
462
+ "allOf": [
463
+ {
464
+ "if": {
465
+ "properties": {
466
+ "ui_baseline_kind": {
467
+ "const": "prototype"
468
+ }
469
+ }
470
+ },
471
+ "then": {
472
+ "required": [
473
+ "prototype"
474
+ ],
475
+ "properties": {
476
+ "approvals": {
477
+ "required": [
478
+ "prototype_ref",
479
+ "visual_baseline_ref"
480
+ ],
481
+ "not": {
482
+ "required": [
483
+ "existing_ui_baseline_ref"
484
+ ]
485
+ }
486
+ }
487
+ }
488
+ },
489
+ "else": {
490
+ "not": {
491
+ "required": [
492
+ "prototype"
493
+ ]
494
+ },
495
+ "properties": {
496
+ "approvals": {
497
+ "required": [
498
+ "existing_ui_baseline_ref"
499
+ ],
500
+ "not": {
501
+ "anyOf": [
502
+ {
503
+ "required": [
504
+ "prototype_ref"
505
+ ]
506
+ },
507
+ {
508
+ "required": [
509
+ "visual_baseline_ref"
510
+ ]
511
+ }
512
+ ]
513
+ }
514
+ }
515
+ }
516
+ }
517
+ }
518
+ ]
519
+ },
520
+ "ui_baseline_kind": {
521
+ "enum": [
522
+ "prototype",
523
+ "existing-ui-baseline"
524
+ ]
525
+ }
526
+ },
527
+ "$defs": {
528
+ "termRefs": {
529
+ "type": "array",
530
+ "uniqueItems": true,
531
+ "items": {
532
+ "type": "string",
533
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)/[A-Z][A-Za-z0-9]+$"
534
+ }
535
+ },
536
+ "contextTerms": {
537
+ "type": "array",
538
+ "items": {
539
+ "type": "object",
540
+ "additionalProperties": false,
541
+ "required": [
542
+ "term_ref",
543
+ "term",
544
+ "meaning",
545
+ "english_identifier",
546
+ "context_id",
547
+ "forbidden_aliases"
548
+ ],
549
+ "properties": {
550
+ "term_ref": {
551
+ "type": "string",
552
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)/[A-Z][A-Za-z0-9]+$"
553
+ },
554
+ "term": {
555
+ "type": "string",
556
+ "minLength": 1
557
+ },
558
+ "meaning": {
559
+ "type": "string",
560
+ "minLength": 1
561
+ },
562
+ "english_identifier": {
563
+ "type": "string",
564
+ "pattern": "^[A-Z][A-Za-z0-9]+$"
565
+ },
566
+ "context_id": {
567
+ "type": "string",
568
+ "pattern": "^(Global|[A-Z][A-Za-z0-9]+)$"
569
+ },
570
+ "forbidden_aliases": {
571
+ "type": "array",
572
+ "uniqueItems": true,
573
+ "items": {
574
+ "type": "string",
575
+ "minLength": 1
576
+ }
577
+ }
578
+ }
579
+ }
580
+ },
581
+ "contextSnapshot": {
582
+ "type": "object",
583
+ "additionalProperties": false,
584
+ "required": [
585
+ "context_ref",
586
+ "context_schema_version",
587
+ "document_digest",
588
+ "referenced_terms_digest",
589
+ "term_refs"
590
+ ],
591
+ "properties": {
592
+ "context_ref": {
593
+ "const": "CONTEXT.md"
594
+ },
595
+ "context_schema_version": {
596
+ "const": 1
597
+ },
598
+ "document_digest": {
599
+ "type": "string",
600
+ "pattern": "^sha256:[a-f0-9]{64}$"
601
+ },
602
+ "referenced_terms_digest": {
603
+ "type": "string",
604
+ "pattern": "^sha256:[a-f0-9]{64}$"
605
+ },
606
+ "term_refs": {
607
+ "$ref": "#/$defs/termRefs"
608
+ }
609
+ }
610
+ },
611
+ "nonEmptyStrings": {
612
+ "type": "array",
613
+ "minItems": 1,
614
+ "items": {
615
+ "type": "string",
616
+ "minLength": 1
617
+ }
618
+ },
619
+ "versionedRef": {
620
+ "type": "object",
621
+ "additionalProperties": false,
622
+ "required": [
623
+ "id",
624
+ "version",
625
+ "digest",
626
+ "status",
627
+ "persisted_ref"
628
+ ],
629
+ "properties": {
630
+ "id": {
631
+ "type": "string",
632
+ "minLength": 1
633
+ },
634
+ "version": {
635
+ "type": "string",
636
+ "pattern": "^v[0-9]+$"
637
+ },
638
+ "digest": {
639
+ "type": "string",
640
+ "minLength": 1
641
+ },
642
+ "status": {
643
+ "const": "approved"
644
+ },
645
+ "persisted_ref": {
646
+ "type": "string",
647
+ "minLength": 1
648
+ }
649
+ }
650
+ },
651
+ "visualBaselineRef": {
652
+ "type": "object",
653
+ "additionalProperties": false,
654
+ "required": [
655
+ "baseline_id",
656
+ "version",
657
+ "digest",
658
+ "status",
659
+ "persisted_ref",
660
+ "manifest_ref",
661
+ "case_ids"
662
+ ],
663
+ "properties": {
664
+ "baseline_id": {
665
+ "type": "string",
666
+ "pattern": "^visual-baseline\\.[a-z0-9][a-z0-9-]*$"
667
+ },
668
+ "version": {
669
+ "type": "string",
670
+ "pattern": "^v[1-9][0-9]*$"
671
+ },
672
+ "digest": {
673
+ "type": "string",
674
+ "pattern": "^sha256:[a-f0-9]{64}$"
675
+ },
676
+ "status": {
677
+ "const": "approved"
678
+ },
679
+ "persisted_ref": {
680
+ "type": "string",
681
+ "minLength": 1
682
+ },
683
+ "manifest_ref": {
684
+ "const": "visual-baseline.yaml"
685
+ },
686
+ "case_ids": {
687
+ "type": "array",
688
+ "minItems": 2,
689
+ "uniqueItems": true,
690
+ "items": {
691
+ "type": "string",
692
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
693
+ }
694
+ }
695
+ }
696
+ },
697
+ "consumerRoute": {
698
+ "type": "object",
699
+ "additionalProperties": false,
700
+ "required": [
701
+ "route_id",
702
+ "capability",
703
+ "activation",
704
+ "impact_refs",
705
+ "entry_work_unit",
706
+ "expected_outputs",
707
+ "dependencies",
708
+ "context_reconciliation"
709
+ ],
710
+ "properties": {
711
+ "route_id": {
712
+ "type": "string",
713
+ "pattern": "^route\\.[a-z0-9][a-z0-9-]*$"
714
+ },
715
+ "capability": {
716
+ "enum": [
717
+ "backend-technical-design",
718
+ "frontend-engineering-design",
719
+ "delivery-coordination"
720
+ ]
721
+ },
722
+ "activation": {
723
+ "enum": [
724
+ "required",
725
+ "optional",
726
+ "not-applicable"
727
+ ]
728
+ },
729
+ "impact_refs": {
730
+ "type": "array",
731
+ "minItems": 1,
732
+ "uniqueItems": true,
733
+ "items": {
734
+ "type": "string",
735
+ "pattern": "^impact_assessment\\.(ui|api|data|backend|frontend|cross_repo|high_risk)$"
736
+ }
737
+ },
738
+ "entry_work_unit": {
739
+ "enum": [
740
+ "work-unit.technical-design",
741
+ "work-unit.frontend-engineering-design",
742
+ "work-unit.delivery-coordination"
743
+ ]
744
+ },
745
+ "expected_outputs": {
746
+ "$ref": "#/$defs/nonEmptyStrings"
747
+ },
748
+ "dependencies": {
749
+ "type": "array",
750
+ "uniqueItems": true,
751
+ "items": {
752
+ "type": "string",
753
+ "pattern": "^route\\.[a-z0-9][a-z0-9-]*$"
754
+ }
755
+ },
756
+ "context_reconciliation": {
757
+ "type": "object",
758
+ "additionalProperties": false,
759
+ "required": [
760
+ "required",
761
+ "target_context_ref",
762
+ "schema_ref"
763
+ ],
764
+ "properties": {
765
+ "required": {
766
+ "const": true
767
+ },
768
+ "target_context_ref": {
769
+ "const": "CONTEXT.md"
770
+ },
771
+ "schema_ref": {
772
+ "const": "docs/process/schemas/context-reconciliation.schema.json"
773
+ }
774
+ }
775
+ },
776
+ "reason": {
777
+ "type": "string",
778
+ "minLength": 1
779
+ },
780
+ "evidence_refs": {
781
+ "$ref": "#/$defs/nonEmptyStrings"
782
+ }
783
+ },
784
+ "allOf": [
785
+ {
786
+ "if": {
787
+ "properties": {
788
+ "activation": {
789
+ "enum": [
790
+ "optional",
791
+ "not-applicable"
792
+ ]
793
+ }
794
+ },
795
+ "required": [
796
+ "activation"
797
+ ]
798
+ },
799
+ "then": {
800
+ "required": [
801
+ "reason",
802
+ "evidence_refs"
803
+ ]
804
+ }
805
+ }
806
+ ]
807
+ },
808
+ "deferred": {
809
+ "type": "object",
810
+ "additionalProperties": false,
811
+ "required": [
812
+ "decision",
813
+ "owner",
814
+ "next_action",
815
+ "target_version"
816
+ ],
817
+ "properties": {
818
+ "decision": {
819
+ "type": "string",
820
+ "minLength": 1
821
+ },
822
+ "owner": {
823
+ "type": "string",
824
+ "minLength": 1
825
+ },
826
+ "next_action": {
827
+ "type": "string",
828
+ "minLength": 1
829
+ },
830
+ "target_version": {
831
+ "type": "string",
832
+ "minLength": 1
833
+ }
834
+ }
835
+ },
836
+ "existingUiBaselineRef": {
837
+ "type": "object",
838
+ "additionalProperties": false,
839
+ "required": [
840
+ "baseline_id",
841
+ "version",
842
+ "digest",
843
+ "status",
844
+ "persisted_ref",
845
+ "manifest_ref",
846
+ "case_ids"
847
+ ],
848
+ "properties": {
849
+ "baseline_id": {
850
+ "type": "string",
851
+ "pattern": "^existing-ui-baseline\\.[a-z0-9][a-z0-9-]*$"
852
+ },
853
+ "version": {
854
+ "type": "string",
855
+ "pattern": "^v[1-9][0-9]*$"
856
+ },
857
+ "digest": {
858
+ "type": "string",
859
+ "pattern": "^sha256:[a-f0-9]{64}$"
860
+ },
861
+ "status": {
862
+ "const": "approved"
863
+ },
864
+ "persisted_ref": {
865
+ "type": "string",
866
+ "minLength": 1
867
+ },
868
+ "manifest_ref": {
869
+ "const": "existing-ui-baseline.json"
870
+ },
871
+ "case_ids": {
872
+ "type": "array",
873
+ "minItems": 1,
874
+ "uniqueItems": true,
875
+ "items": {
876
+ "type": "string",
877
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
878
+ }
879
+ }
880
+ }
881
+ }
882
+ },
883
+ "allOf": [
884
+ {
885
+ "if": {
886
+ "properties": {
887
+ "ui_baseline_kind": {
888
+ "const": "prototype"
889
+ }
890
+ }
891
+ },
892
+ "then": {
893
+ "properties": {
894
+ "source": {
895
+ "required": [
896
+ "prototype_ref",
897
+ "visual_baseline_ref"
898
+ ],
899
+ "not": {
900
+ "required": [
901
+ "existing_ui_baseline_ref"
902
+ ]
903
+ }
904
+ }
905
+ }
906
+ },
907
+ "else": {
908
+ "properties": {
909
+ "source": {
910
+ "required": [
911
+ "existing_ui_baseline_ref"
912
+ ],
913
+ "not": {
914
+ "anyOf": [
915
+ {
916
+ "required": [
917
+ "prototype_ref"
918
+ ]
919
+ },
920
+ {
921
+ "required": [
922
+ "visual_baseline_ref"
923
+ ]
924
+ }
925
+ ]
926
+ }
927
+ }
928
+ }
929
+ }
930
+ }
931
+ ]
932
+ }