archidocs 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +62 -13
  2. package/dist/cli/commands.d.ts +225 -4
  3. package/dist/cli/commands.js +129 -4
  4. package/dist/cli/init.d.ts +1 -1
  5. package/dist/cli/init.js +2 -2
  6. package/dist/cli/main.js +9 -14
  7. package/dist/core/compare.d.ts +2 -13
  8. package/dist/core/compare.js +2 -35
  9. package/dist/core/index.d.ts +2 -5
  10. package/dist/core/index.js +2 -5
  11. package/dist/core/rules.d.ts +10 -0
  12. package/dist/core/rules.js +186 -7
  13. package/dist/core/views/compare.d.ts +12 -0
  14. package/dist/core/views/compare.js +37 -0
  15. package/dist/core/{deployment-views.d.ts → views/deployment.d.ts} +4 -5
  16. package/dist/core/{deployment-views.js → views/deployment.js} +5 -7
  17. package/dist/core/{dynamic-views.d.ts → views/dynamic.d.ts} +1 -3
  18. package/dist/core/{dynamic-views.js → views/dynamic.js} +4 -8
  19. package/dist/core/views/generated.d.ts +18 -0
  20. package/dist/core/views/generated.js +92 -0
  21. package/dist/core/views/ids.d.ts +36 -0
  22. package/dist/core/views/ids.js +51 -0
  23. package/dist/core/views/index.d.ts +13 -0
  24. package/dist/core/views/index.js +12 -0
  25. package/dist/core/views/lens.d.ts +27 -0
  26. package/dist/core/views/lens.js +112 -0
  27. package/dist/core/views/model.d.ts +21 -0
  28. package/dist/core/views/model.js +69 -0
  29. package/dist/core/views/resolve.d.ts +42 -0
  30. package/dist/core/views/resolve.js +81 -0
  31. package/dist/core/{save-as-view.d.ts → views/save-as-view.d.ts} +2 -2
  32. package/dist/core/{save-as-view.js → views/save-as-view.js} +13 -10
  33. package/dist/core/{saved-views.d.ts → views/saved.d.ts} +4 -18
  34. package/dist/core/{saved-views.js → views/saved.js} +8 -103
  35. package/dist/core/views/types.d.ts +91 -0
  36. package/dist/core/views/types.js +2 -0
  37. package/dist/mcp/errors.d.ts +37 -0
  38. package/dist/mcp/errors.js +35 -0
  39. package/dist/mcp/index.d.ts +2 -1
  40. package/dist/mcp/index.js +1 -0
  41. package/dist/mcp/server.d.ts +1 -2
  42. package/dist/mcp/server.js +12 -12
  43. package/dist/render/layout.d.ts +20 -3
  44. package/dist/render/layout.js +49 -12
  45. package/dist/render/sequence-svg.d.ts +1 -1
  46. package/dist/render/sequence.d.ts +1 -1
  47. package/dist/render/svg.d.ts +1 -1
  48. package/dist/render/svg.js +4 -4
  49. package/dist/schema/adr.js +18 -13
  50. package/dist/schema/workspace.js +226 -130
  51. package/dist/viewer/assets/index-BXa5R96a.js +138 -0
  52. package/dist/viewer/assets/index-YFA-pYjQ.css +1 -0
  53. package/dist/viewer/assets/{layout.worker-Bg-OaLVN.js → layout.worker-BRHAGJrD.js} +1 -1
  54. package/dist/viewer/assets/{png-BDKIXtm5.js → png-CAaXWR-k.js} +1 -1
  55. package/dist/viewer/assets/{svg-Bulv5YWn.js → svg-BPVHfD36.js} +2 -2
  56. package/dist/viewer/index.html +2 -2
  57. package/guide/SKILL.md +1 -1
  58. package/guide/topics/bootstrap.md +1 -1
  59. package/guide/topics/relationships.md +1 -1
  60. package/package.json +4 -3
  61. package/schemas/adr.schema.json +18 -15
  62. package/schemas/model.schema.json +637 -1144
  63. package/schemas/project.schema.json +8 -4
  64. package/schemas/workspace.schema.json +39 -20
  65. package/dist/core/views.d.ts +0 -126
  66. package/dist/core/views.js +0 -217
  67. package/dist/viewer/assets/index-DvKgCpBr.css +0 -1
  68. package/dist/viewer/assets/index-gucix3xm.js +0 -113
@@ -4,771 +4,51 @@
4
4
  "type": "object",
5
5
  "properties": {
6
6
  "people": {
7
+ "description": "Persons, keyed by id. An id is unique in the Project across all its Elements and Deployment Targets.",
7
8
  "type": "object",
8
9
  "propertyNames": {
9
10
  "type": "string",
10
11
  "pattern": "^[a-z0-9][a-z0-9-]*$"
11
12
  },
12
13
  "additionalProperties": {
13
- "type": "object",
14
- "properties": {
15
- "name": {
16
- "type": "string"
17
- },
18
- "description": {
19
- "type": "string"
20
- },
21
- "owner": {
22
- "type": "string",
23
- "pattern": "^[a-z0-9][a-z0-9-]*$"
24
- },
25
- "tags": {
26
- "type": "array",
27
- "items": {
28
- "type": "string"
29
- }
30
- },
31
- "links": {
32
- "type": "array",
33
- "items": {
34
- "type": "object",
35
- "properties": {
36
- "label": {
37
- "type": "string"
38
- },
39
- "url": {
40
- "type": "string",
41
- "format": "uri"
42
- }
43
- },
44
- "required": [
45
- "label",
46
- "url"
47
- ],
48
- "additionalProperties": false
49
- }
50
- },
51
- "relationships": {
52
- "type": "array",
53
- "items": {
54
- "type": "object",
55
- "properties": {
56
- "to": {
57
- "type": "string",
58
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
59
- "description": "An id in this Project, or `project:id` for one in another Project"
60
- },
61
- "id": {
62
- "type": "string",
63
- "pattern": "^[a-z0-9][a-z0-9-]*$"
64
- },
65
- "description": {
66
- "type": "string"
67
- },
68
- "technology": {
69
- "type": "string"
70
- },
71
- "interaction": {
72
- "type": "string",
73
- "enum": [
74
- "sync",
75
- "async"
76
- ]
77
- },
78
- "via": {
79
- "type": "string",
80
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
81
- "description": "An id in this Project, or `project:id` for one in another Project"
82
- },
83
- "channel": {
84
- "type": "string"
85
- },
86
- "tags": {
87
- "type": "array",
88
- "items": {
89
- "type": "string"
90
- }
91
- }
92
- },
93
- "required": [
94
- "to"
95
- ],
96
- "additionalProperties": false
97
- }
98
- }
99
- },
100
- "required": [
101
- "name"
102
- ],
103
- "additionalProperties": false
14
+ "$ref": "#/$defs/Person"
104
15
  }
105
16
  },
106
17
  "systems": {
18
+ "description": "Systems, keyed by id, each with its Services nested under `services`.",
107
19
  "type": "object",
108
20
  "propertyNames": {
109
21
  "type": "string",
110
22
  "pattern": "^[a-z0-9][a-z0-9-]*$"
111
23
  },
112
24
  "additionalProperties": {
113
- "type": "object",
114
- "properties": {
115
- "name": {
116
- "type": "string"
117
- },
118
- "description": {
119
- "type": "string"
120
- },
121
- "owner": {
122
- "type": "string",
123
- "pattern": "^[a-z0-9][a-z0-9-]*$"
124
- },
125
- "tags": {
126
- "type": "array",
127
- "items": {
128
- "type": "string"
129
- }
130
- },
131
- "links": {
132
- "type": "array",
133
- "items": {
134
- "type": "object",
135
- "properties": {
136
- "label": {
137
- "type": "string"
138
- },
139
- "url": {
140
- "type": "string",
141
- "format": "uri"
142
- }
143
- },
144
- "required": [
145
- "label",
146
- "url"
147
- ],
148
- "additionalProperties": false
149
- }
150
- },
151
- "relationships": {
152
- "type": "array",
153
- "items": {
154
- "type": "object",
155
- "properties": {
156
- "to": {
157
- "type": "string",
158
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
159
- "description": "An id in this Project, or `project:id` for one in another Project"
160
- },
161
- "id": {
162
- "type": "string",
163
- "pattern": "^[a-z0-9][a-z0-9-]*$"
164
- },
165
- "description": {
166
- "type": "string"
167
- },
168
- "technology": {
169
- "type": "string"
170
- },
171
- "interaction": {
172
- "type": "string",
173
- "enum": [
174
- "sync",
175
- "async"
176
- ]
177
- },
178
- "via": {
179
- "type": "string",
180
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
181
- "description": "An id in this Project, or `project:id` for one in another Project"
182
- },
183
- "channel": {
184
- "type": "string"
185
- },
186
- "tags": {
187
- "type": "array",
188
- "items": {
189
- "type": "string"
190
- }
191
- }
192
- },
193
- "required": [
194
- "to"
195
- ],
196
- "additionalProperties": false
197
- }
198
- },
199
- "external": {
200
- "type": "boolean"
201
- },
202
- "services": {
203
- "type": "object",
204
- "propertyNames": {
205
- "type": "string",
206
- "pattern": "^[a-z0-9][a-z0-9-]*$"
207
- },
208
- "additionalProperties": {
209
- "type": "object",
210
- "properties": {
211
- "name": {
212
- "type": "string"
213
- },
214
- "description": {
215
- "type": "string"
216
- },
217
- "owner": {
218
- "type": "string",
219
- "pattern": "^[a-z0-9][a-z0-9-]*$"
220
- },
221
- "tags": {
222
- "type": "array",
223
- "items": {
224
- "type": "string"
225
- }
226
- },
227
- "links": {
228
- "type": "array",
229
- "items": {
230
- "type": "object",
231
- "properties": {
232
- "label": {
233
- "type": "string"
234
- },
235
- "url": {
236
- "type": "string",
237
- "format": "uri"
238
- }
239
- },
240
- "required": [
241
- "label",
242
- "url"
243
- ],
244
- "additionalProperties": false
245
- }
246
- },
247
- "relationships": {
248
- "type": "array",
249
- "items": {
250
- "type": "object",
251
- "properties": {
252
- "to": {
253
- "type": "string",
254
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
255
- "description": "An id in this Project, or `project:id` for one in another Project"
256
- },
257
- "id": {
258
- "type": "string",
259
- "pattern": "^[a-z0-9][a-z0-9-]*$"
260
- },
261
- "description": {
262
- "type": "string"
263
- },
264
- "technology": {
265
- "type": "string"
266
- },
267
- "interaction": {
268
- "type": "string",
269
- "enum": [
270
- "sync",
271
- "async"
272
- ]
273
- },
274
- "via": {
275
- "type": "string",
276
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
277
- "description": "An id in this Project, or `project:id` for one in another Project"
278
- },
279
- "channel": {
280
- "type": "string"
281
- },
282
- "tags": {
283
- "type": "array",
284
- "items": {
285
- "type": "string"
286
- }
287
- }
288
- },
289
- "required": [
290
- "to"
291
- ],
292
- "additionalProperties": false
293
- }
294
- },
295
- "type": {
296
- "type": "string",
297
- "enum": [
298
- "app",
299
- "datastore",
300
- "broker"
301
- ]
302
- },
303
- "technology": {
304
- "type": "string"
305
- },
306
- "external": {
307
- "type": "boolean"
308
- },
309
- "in": {
310
- "type": "string",
311
- "pattern": "^[a-z0-9][a-z0-9-]*$",
312
- "description": "Id of the parent declared in another file of this Project"
313
- },
314
- "components": {
315
- "type": "object",
316
- "propertyNames": {
317
- "type": "string",
318
- "pattern": "^[a-z0-9][a-z0-9-]*$"
319
- },
320
- "additionalProperties": {
321
- "type": "object",
322
- "properties": {
323
- "name": {
324
- "type": "string"
325
- },
326
- "description": {
327
- "type": "string"
328
- },
329
- "owner": {
330
- "type": "string",
331
- "pattern": "^[a-z0-9][a-z0-9-]*$"
332
- },
333
- "tags": {
334
- "type": "array",
335
- "items": {
336
- "type": "string"
337
- }
338
- },
339
- "links": {
340
- "type": "array",
341
- "items": {
342
- "type": "object",
343
- "properties": {
344
- "label": {
345
- "type": "string"
346
- },
347
- "url": {
348
- "type": "string",
349
- "format": "uri"
350
- }
351
- },
352
- "required": [
353
- "label",
354
- "url"
355
- ],
356
- "additionalProperties": false
357
- }
358
- },
359
- "relationships": {
360
- "type": "array",
361
- "items": {
362
- "type": "object",
363
- "properties": {
364
- "to": {
365
- "type": "string",
366
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
367
- "description": "An id in this Project, or `project:id` for one in another Project"
368
- },
369
- "id": {
370
- "type": "string",
371
- "pattern": "^[a-z0-9][a-z0-9-]*$"
372
- },
373
- "description": {
374
- "type": "string"
375
- },
376
- "technology": {
377
- "type": "string"
378
- },
379
- "interaction": {
380
- "type": "string",
381
- "enum": [
382
- "sync",
383
- "async"
384
- ]
385
- },
386
- "via": {
387
- "type": "string",
388
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
389
- "description": "An id in this Project, or `project:id` for one in another Project"
390
- },
391
- "channel": {
392
- "type": "string"
393
- },
394
- "tags": {
395
- "type": "array",
396
- "items": {
397
- "type": "string"
398
- }
399
- }
400
- },
401
- "required": [
402
- "to"
403
- ],
404
- "additionalProperties": false
405
- }
406
- },
407
- "technology": {
408
- "type": "string"
409
- },
410
- "in": {
411
- "type": "string",
412
- "pattern": "^[a-z0-9][a-z0-9-]*$",
413
- "description": "Id of the parent declared in another file of this Project"
414
- }
415
- },
416
- "required": [
417
- "name"
418
- ],
419
- "additionalProperties": false
420
- }
421
- }
422
- },
423
- "required": [
424
- "name"
425
- ],
426
- "additionalProperties": false
427
- }
428
- }
429
- },
430
- "required": [
431
- "name"
432
- ],
433
- "additionalProperties": false
25
+ "$ref": "#/$defs/System"
434
26
  }
435
27
  },
436
28
  "services": {
29
+ "description": "Services declared at the top level, keyed by id: those outside any System, and those that join a System with `in`.",
437
30
  "type": "object",
438
31
  "propertyNames": {
439
32
  "type": "string",
440
33
  "pattern": "^[a-z0-9][a-z0-9-]*$"
441
34
  },
442
35
  "additionalProperties": {
443
- "type": "object",
444
- "properties": {
445
- "name": {
446
- "type": "string"
447
- },
448
- "description": {
449
- "type": "string"
450
- },
451
- "owner": {
452
- "type": "string",
453
- "pattern": "^[a-z0-9][a-z0-9-]*$"
454
- },
455
- "tags": {
456
- "type": "array",
457
- "items": {
458
- "type": "string"
459
- }
460
- },
461
- "links": {
462
- "type": "array",
463
- "items": {
464
- "type": "object",
465
- "properties": {
466
- "label": {
467
- "type": "string"
468
- },
469
- "url": {
470
- "type": "string",
471
- "format": "uri"
472
- }
473
- },
474
- "required": [
475
- "label",
476
- "url"
477
- ],
478
- "additionalProperties": false
479
- }
480
- },
481
- "relationships": {
482
- "type": "array",
483
- "items": {
484
- "type": "object",
485
- "properties": {
486
- "to": {
487
- "type": "string",
488
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
489
- "description": "An id in this Project, or `project:id` for one in another Project"
490
- },
491
- "id": {
492
- "type": "string",
493
- "pattern": "^[a-z0-9][a-z0-9-]*$"
494
- },
495
- "description": {
496
- "type": "string"
497
- },
498
- "technology": {
499
- "type": "string"
500
- },
501
- "interaction": {
502
- "type": "string",
503
- "enum": [
504
- "sync",
505
- "async"
506
- ]
507
- },
508
- "via": {
509
- "type": "string",
510
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
511
- "description": "An id in this Project, or `project:id` for one in another Project"
512
- },
513
- "channel": {
514
- "type": "string"
515
- },
516
- "tags": {
517
- "type": "array",
518
- "items": {
519
- "type": "string"
520
- }
521
- }
522
- },
523
- "required": [
524
- "to"
525
- ],
526
- "additionalProperties": false
527
- }
528
- },
529
- "type": {
530
- "type": "string",
531
- "enum": [
532
- "app",
533
- "datastore",
534
- "broker"
535
- ]
536
- },
537
- "technology": {
538
- "type": "string"
539
- },
540
- "external": {
541
- "type": "boolean"
542
- },
543
- "in": {
544
- "type": "string",
545
- "pattern": "^[a-z0-9][a-z0-9-]*$",
546
- "description": "Id of the parent declared in another file of this Project"
547
- },
548
- "components": {
549
- "type": "object",
550
- "propertyNames": {
551
- "type": "string",
552
- "pattern": "^[a-z0-9][a-z0-9-]*$"
553
- },
554
- "additionalProperties": {
555
- "type": "object",
556
- "properties": {
557
- "name": {
558
- "type": "string"
559
- },
560
- "description": {
561
- "type": "string"
562
- },
563
- "owner": {
564
- "type": "string",
565
- "pattern": "^[a-z0-9][a-z0-9-]*$"
566
- },
567
- "tags": {
568
- "type": "array",
569
- "items": {
570
- "type": "string"
571
- }
572
- },
573
- "links": {
574
- "type": "array",
575
- "items": {
576
- "type": "object",
577
- "properties": {
578
- "label": {
579
- "type": "string"
580
- },
581
- "url": {
582
- "type": "string",
583
- "format": "uri"
584
- }
585
- },
586
- "required": [
587
- "label",
588
- "url"
589
- ],
590
- "additionalProperties": false
591
- }
592
- },
593
- "relationships": {
594
- "type": "array",
595
- "items": {
596
- "type": "object",
597
- "properties": {
598
- "to": {
599
- "type": "string",
600
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
601
- "description": "An id in this Project, or `project:id` for one in another Project"
602
- },
603
- "id": {
604
- "type": "string",
605
- "pattern": "^[a-z0-9][a-z0-9-]*$"
606
- },
607
- "description": {
608
- "type": "string"
609
- },
610
- "technology": {
611
- "type": "string"
612
- },
613
- "interaction": {
614
- "type": "string",
615
- "enum": [
616
- "sync",
617
- "async"
618
- ]
619
- },
620
- "via": {
621
- "type": "string",
622
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
623
- "description": "An id in this Project, or `project:id` for one in another Project"
624
- },
625
- "channel": {
626
- "type": "string"
627
- },
628
- "tags": {
629
- "type": "array",
630
- "items": {
631
- "type": "string"
632
- }
633
- }
634
- },
635
- "required": [
636
- "to"
637
- ],
638
- "additionalProperties": false
639
- }
640
- },
641
- "technology": {
642
- "type": "string"
643
- },
644
- "in": {
645
- "type": "string",
646
- "pattern": "^[a-z0-9][a-z0-9-]*$",
647
- "description": "Id of the parent declared in another file of this Project"
648
- }
649
- },
650
- "required": [
651
- "name"
652
- ],
653
- "additionalProperties": false
654
- }
655
- }
656
- },
657
- "required": [
658
- "name"
659
- ],
660
- "additionalProperties": false
36
+ "$ref": "#/$defs/Service"
661
37
  }
662
38
  },
663
39
  "components": {
40
+ "description": "Components declared at the top level, keyed by id. Each names its Service with `in`.",
664
41
  "type": "object",
665
42
  "propertyNames": {
666
43
  "type": "string",
667
44
  "pattern": "^[a-z0-9][a-z0-9-]*$"
668
45
  },
669
46
  "additionalProperties": {
670
- "type": "object",
671
- "properties": {
672
- "name": {
673
- "type": "string"
674
- },
675
- "description": {
676
- "type": "string"
677
- },
678
- "owner": {
679
- "type": "string",
680
- "pattern": "^[a-z0-9][a-z0-9-]*$"
681
- },
682
- "tags": {
683
- "type": "array",
684
- "items": {
685
- "type": "string"
686
- }
687
- },
688
- "links": {
689
- "type": "array",
690
- "items": {
691
- "type": "object",
692
- "properties": {
693
- "label": {
694
- "type": "string"
695
- },
696
- "url": {
697
- "type": "string",
698
- "format": "uri"
699
- }
700
- },
701
- "required": [
702
- "label",
703
- "url"
704
- ],
705
- "additionalProperties": false
706
- }
707
- },
708
- "relationships": {
709
- "type": "array",
710
- "items": {
711
- "type": "object",
712
- "properties": {
713
- "to": {
714
- "type": "string",
715
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
716
- "description": "An id in this Project, or `project:id` for one in another Project"
717
- },
718
- "id": {
719
- "type": "string",
720
- "pattern": "^[a-z0-9][a-z0-9-]*$"
721
- },
722
- "description": {
723
- "type": "string"
724
- },
725
- "technology": {
726
- "type": "string"
727
- },
728
- "interaction": {
729
- "type": "string",
730
- "enum": [
731
- "sync",
732
- "async"
733
- ]
734
- },
735
- "via": {
736
- "type": "string",
737
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
738
- "description": "An id in this Project, or `project:id` for one in another Project"
739
- },
740
- "channel": {
741
- "type": "string"
742
- },
743
- "tags": {
744
- "type": "array",
745
- "items": {
746
- "type": "string"
747
- }
748
- }
749
- },
750
- "required": [
751
- "to"
752
- ],
753
- "additionalProperties": false
754
- }
755
- },
756
- "technology": {
757
- "type": "string"
758
- },
759
- "in": {
760
- "type": "string",
761
- "pattern": "^[a-z0-9][a-z0-9-]*$",
762
- "description": "Id of the parent declared in another file of this Project"
763
- }
764
- },
765
- "required": [
766
- "name"
767
- ],
768
- "additionalProperties": false
47
+ "$ref": "#/$defs/Component"
769
48
  }
770
49
  },
771
50
  "targets": {
51
+ "description": "Deployment Targets, keyed by id and nested as they nest. Their ids share the Project's ids with its Elements.",
772
52
  "type": "object",
773
53
  "propertyNames": {
774
54
  "type": "string",
@@ -779,6 +59,7 @@
779
59
  }
780
60
  },
781
61
  "deployments": {
62
+ "description": "Deployments: which Service runs in which Environment on which Deployment Target, with its URLs.",
782
63
  "type": "array",
783
64
  "items": {
784
65
  "type": "object",
@@ -786,39 +67,45 @@
786
67
  "service": {
787
68
  "type": "string",
788
69
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
789
- "description": "An id in this Project, or `project:id` for one in another Project"
70
+ "description": "The Service that runs: an id in this Project, or `project:id`. It must name a Service, not a System or a Component."
790
71
  },
791
72
  "environment": {
792
73
  "type": "string",
793
- "pattern": "^[a-z0-9][a-z0-9-]*$"
74
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
75
+ "description": "The Environment it runs in: the id of an Environment in `workspace.yaml`."
794
76
  },
795
77
  "target": {
796
78
  "type": "string",
797
79
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
798
- "description": "An id in this Project, or `project:id` for one in another Project"
80
+ "description": "The Deployment Target it runs on: an id in this Project, or `project:id` for one another Project declares."
799
81
  },
800
82
  "url": {
83
+ "description": "The Service's main URL in this Environment. A full URL, such as `https://cart.example.com`.",
801
84
  "type": "string",
802
85
  "format": "uri"
803
86
  },
804
87
  "endpoints": {
88
+ "description": "Further named URLs of the Service in this Environment, such as a health check or an admin console.",
805
89
  "type": "array",
806
90
  "items": {
807
91
  "type": "object",
808
92
  "properties": {
809
93
  "name": {
810
- "type": "string"
94
+ "type": "string",
95
+ "description": "What the endpoint is, such as `health` or `admin`."
811
96
  },
812
97
  "url": {
813
98
  "type": "string",
814
- "format": "uri"
99
+ "format": "uri",
100
+ "description": "The endpoint's address. A full URL."
815
101
  }
816
102
  },
817
103
  "required": [
818
104
  "name",
819
105
  "url"
820
106
  ],
821
- "additionalProperties": false
107
+ "additionalProperties": false,
108
+ "description": "A further named URL of the Service in this Environment."
822
109
  }
823
110
  }
824
111
  },
@@ -827,13 +114,15 @@
827
114
  "environment",
828
115
  "target"
829
116
  ],
830
- "additionalProperties": false
117
+ "additionalProperties": false,
118
+ "description": "A Deployment: one Service running in one Environment on one Deployment Target. The three together name it, so the same three can appear only once."
831
119
  }
832
120
  },
833
121
  "views": {
834
122
  "type": "object",
835
123
  "properties": {
836
124
  "structural": {
125
+ "description": "Structural Views and Deployment Views, keyed by id. Other Projects name a View as `project:id`.",
837
126
  "type": "object",
838
127
  "propertyNames": {
839
128
  "type": "string",
@@ -843,12 +132,15 @@
843
132
  "type": "object",
844
133
  "properties": {
845
134
  "title": {
846
- "type": "string"
135
+ "type": "string",
136
+ "description": "The View's display title."
847
137
  },
848
138
  "description": {
139
+ "description": "What the View shows, or the question it answers.",
849
140
  "type": "string"
850
141
  },
851
142
  "tags": {
143
+ "description": "Free-form labels for the View.",
852
144
  "type": "array",
853
145
  "items": {
854
146
  "type": "string"
@@ -861,27 +153,29 @@
861
153
  "c2",
862
154
  "c3",
863
155
  "deployment"
864
- ]
156
+ ],
157
+ "description": "The level every selected Element is collapsed to. `c1`: Persons and Systems. `c2`: Services, grouped in their Systems. `c3`: Components, inside their Services. `deployment`: a Deployment View, which places Deployments on their Deployment Targets in one Environment and needs `environment`."
865
158
  },
866
159
  "expand": {
867
- "description": "Elements opened one level deeper than `level`",
160
+ "description": "Elements to open one level deeper than `level`, showing their children. Each is an id in this Project, or `project:id`, and must be a node of the View that has children. A Deployment View ignores it.",
868
161
  "type": "array",
869
162
  "items": {
870
163
  "type": "string",
871
164
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
872
- "description": "An id in this Project, or `project:id` for one in another Project"
165
+ "description": "An id in this Project, or `project:id` for one in another Project."
873
166
  }
874
167
  },
875
168
  "collapse": {
876
- "description": "Elements closed, hiding everything inside them",
169
+ "description": "Elements to close, hiding everything inside them. Each is an id in this Project, or `project:id`, and must be a node of the View that has children. A Deployment View ignores it.",
877
170
  "type": "array",
878
171
  "items": {
879
172
  "type": "string",
880
173
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
881
- "description": "An id in this Project, or `project:id` for one in another Project"
174
+ "description": "An id in this Project, or `project:id` for one in another Project."
882
175
  }
883
176
  },
884
177
  "direction": {
178
+ "description": "The way the diagram runs. `TB`: top to bottom. `BT`: bottom to top. `LR`: left to right. `RL`: right to left. Default: `LR`, or `TB` for a Deployment View.",
885
179
  "type": "string",
886
180
  "enum": [
887
181
  "TB",
@@ -891,476 +185,485 @@
891
185
  ]
892
186
  },
893
187
  "environment": {
894
- "description": "For `level: deployment`: the Environment shown",
188
+ "description": "For a Deployment View (`level: deployment`), which must have it, and for no other View: the Environment shown, as the id of an Environment in `workspace.yaml`.",
895
189
  "type": "string",
896
190
  "pattern": "^[a-z0-9][a-z0-9-]*$"
897
191
  },
898
192
  "targets": {
899
- "description": "For `level: deployment`: only these Deployment Target subtrees",
193
+ "description": "For a Deployment View (`level: deployment`) only: shows only the Deployments on these Deployment Targets and on the Targets inside them. Each is an id in this Project, or `project:id`. Default: every Deployment Target.",
900
194
  "type": "array",
901
195
  "items": {
902
196
  "type": "string",
903
197
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
904
- "description": "An id in this Project, or `project:id` for one in another Project"
198
+ "description": "An id in this Project, or `project:id` for one in another Project."
905
199
  }
906
200
  },
907
201
  "include": {
908
- "description": "Selectors to show; every Element when absent",
202
+ "description": "Selectors for the Elements to show. Default: every Element in the Workspace.",
909
203
  "type": "array",
910
204
  "items": {
911
- "anyOf": [
912
- {
913
- "type": "string",
914
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
915
- "description": "An id in this Project, or `project:id` for one in another Project"
916
- },
917
- {
918
- "type": "object",
919
- "properties": {
920
- "element": {
921
- "type": "string",
922
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
923
- "description": "An id in this Project, or `project:id` for one in another Project"
924
- },
925
- "with": {
926
- "type": "string",
927
- "enum": [
928
- "children",
929
- "descendants"
930
- ]
931
- },
932
- "upstream": {
933
- "anyOf": [
934
- {
935
- "type": "integer",
936
- "minimum": 0,
937
- "maximum": 9007199254740991
938
- },
939
- {
940
- "type": "string",
941
- "const": "all"
942
- }
943
- ],
944
- "description": "A number of hops, or `all`"
945
- },
946
- "downstream": {
947
- "anyOf": [
948
- {
949
- "type": "integer",
950
- "minimum": 0,
951
- "maximum": 9007199254740991
952
- },
953
- {
954
- "type": "string",
955
- "const": "all"
956
- }
957
- ],
958
- "description": "A number of hops, or `all`"
959
- }
960
- },
961
- "required": [
962
- "element"
963
- ],
964
- "additionalProperties": false
965
- },
966
- {
967
- "type": "object",
968
- "properties": {
969
- "team": {
970
- "type": "string",
971
- "pattern": "^[a-z0-9][a-z0-9-]*$"
972
- }
973
- },
974
- "required": [
975
- "team"
976
- ],
977
- "additionalProperties": false
978
- },
979
- {
980
- "type": "object",
981
- "properties": {
982
- "tag": {
983
- "type": "string"
984
- }
985
- },
986
- "required": [
987
- "tag"
988
- ],
989
- "additionalProperties": false
990
- },
991
- {
992
- "type": "object",
993
- "properties": {
994
- "from": {
995
- "type": "string",
996
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
997
- "description": "An id in this Project, or `project:id` for one in another Project"
998
- },
999
- "to": {
1000
- "type": "string",
1001
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1002
- "description": "An id in this Project, or `project:id` for one in another Project"
1003
- },
1004
- "paths": {
1005
- "anyOf": [
1006
- {
1007
- "type": "string",
1008
- "const": "shortest"
1009
- },
1010
- {
1011
- "type": "integer",
1012
- "minimum": 1,
1013
- "maximum": 9007199254740991
1014
- }
1015
- ],
1016
- "description": "`shortest` (the default), or n for every path of at most n hops"
1017
- }
1018
- },
1019
- "required": [
1020
- "from",
1021
- "to"
1022
- ],
1023
- "additionalProperties": false
1024
- }
1025
- ]
205
+ "$ref": "#/$defs/Selector"
1026
206
  }
1027
207
  },
1028
208
  "exclude": {
209
+ "description": "Selectors for the Elements to leave out of what `include` picked. An excluded Element takes everything inside it with it.",
1029
210
  "type": "array",
1030
211
  "items": {
1031
- "anyOf": [
1032
- {
212
+ "$ref": "#/$defs/Selector"
213
+ }
214
+ },
215
+ "lens": {
216
+ "$ref": "#/$defs/Lens"
217
+ }
218
+ },
219
+ "required": [
220
+ "title",
221
+ "level"
222
+ ],
223
+ "additionalProperties": false,
224
+ "description": "A structural Saved View: the Elements its selectors pick, drawn at one `level`. With `level: deployment` it is a Deployment View. Its key is the View's id, unique among the Project's Saved Views."
225
+ }
226
+ },
227
+ "dynamic": {
228
+ "description": "Dynamic Views, keyed by id. Other Projects name a View as `project:id`.",
229
+ "type": "object",
230
+ "propertyNames": {
231
+ "type": "string",
232
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
233
+ },
234
+ "additionalProperties": {
235
+ "type": "object",
236
+ "properties": {
237
+ "title": {
238
+ "type": "string",
239
+ "description": "The View's display title."
240
+ },
241
+ "description": {
242
+ "description": "What the scenario is.",
243
+ "type": "string"
244
+ },
245
+ "tags": {
246
+ "description": "Free-form labels for the View.",
247
+ "type": "array",
248
+ "items": {
249
+ "type": "string"
250
+ }
251
+ },
252
+ "participants": {
253
+ "description": "Elements that take part, in the order to draw them, each as an id in this Project or `project:id`. Participants not listed follow, in the order the Steps first use them. An Element and its own ancestor can't both take part. Default: the order the Steps first use them.",
254
+ "type": "array",
255
+ "items": {
256
+ "type": "string",
257
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
258
+ "description": "An id in this Project, or `project:id` for one in another Project."
259
+ }
260
+ },
261
+ "steps": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "object",
265
+ "properties": {
266
+ "from": {
1033
267
  "type": "string",
1034
268
  "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1035
- "description": "An id in this Project, or `project:id` for one in another Project"
1036
- },
1037
- {
1038
- "type": "object",
1039
- "properties": {
1040
- "element": {
1041
- "type": "string",
1042
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1043
- "description": "An id in this Project, or `project:id` for one in another Project"
1044
- },
1045
- "with": {
1046
- "type": "string",
1047
- "enum": [
1048
- "children",
1049
- "descendants"
1050
- ]
1051
- },
1052
- "upstream": {
1053
- "anyOf": [
1054
- {
1055
- "type": "integer",
1056
- "minimum": 0,
1057
- "maximum": 9007199254740991
1058
- },
1059
- {
1060
- "type": "string",
1061
- "const": "all"
1062
- }
1063
- ],
1064
- "description": "A number of hops, or `all`"
1065
- },
1066
- "downstream": {
1067
- "anyOf": [
1068
- {
1069
- "type": "integer",
1070
- "minimum": 0,
1071
- "maximum": 9007199254740991
1072
- },
1073
- {
1074
- "type": "string",
1075
- "const": "all"
1076
- }
1077
- ],
1078
- "description": "A number of hops, or `all`"
1079
- }
1080
- },
1081
- "required": [
1082
- "element"
1083
- ],
1084
- "additionalProperties": false
269
+ "description": "The Element the Step starts at: the consumer of a call, the Publisher of an event, or the sender of a reply. An id in this Project, or `project:id`."
1085
270
  },
1086
- {
1087
- "type": "object",
1088
- "properties": {
1089
- "team": {
1090
- "type": "string",
1091
- "pattern": "^[a-z0-9][a-z0-9-]*$"
1092
- }
1093
- },
1094
- "required": [
1095
- "team"
1096
- ],
1097
- "additionalProperties": false
271
+ "to": {
272
+ "type": "string",
273
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
274
+ "description": "The Element the Step reaches: the provider of a call, the Subscriber of an event, or the receiver of a reply. An id in this Project, or `project:id`."
1098
275
  },
1099
- {
1100
- "type": "object",
1101
- "properties": {
1102
- "tag": {
1103
- "type": "string"
1104
- }
1105
- },
1106
- "required": [
1107
- "tag"
1108
- ],
1109
- "additionalProperties": false
276
+ "relationship": {
277
+ "description": "The `id` of the Relationship the Step takes, as an id in this Project or `project:id`. Needed only when several Relationships match the two Elements.",
278
+ "type": "string",
279
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$"
1110
280
  },
1111
- {
1112
- "type": "object",
1113
- "properties": {
1114
- "from": {
1115
- "type": "string",
1116
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1117
- "description": "An id in this Project, or `project:id` for one in another Project"
1118
- },
1119
- "to": {
1120
- "type": "string",
1121
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1122
- "description": "An id in this Project, or `project:id` for one in another Project"
1123
- },
1124
- "paths": {
1125
- "anyOf": [
1126
- {
1127
- "type": "string",
1128
- "const": "shortest"
1129
- },
1130
- {
1131
- "type": "integer",
1132
- "minimum": 1,
1133
- "maximum": 9007199254740991
1134
- }
1135
- ],
1136
- "description": "`shortest` (the default), or n for every path of at most n hops"
1137
- }
1138
- },
1139
- "required": [
1140
- "from",
1141
- "to"
1142
- ],
1143
- "additionalProperties": false
1144
- }
1145
- ]
1146
- }
1147
- },
1148
- "lens": {
1149
- "anyOf": [
1150
- {
1151
- "type": "object",
1152
- "properties": {
1153
- "impact": {
1154
- "type": "string",
1155
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1156
- "description": "An id in this Project, or `project:id` for one in another Project"
1157
- },
1158
- "direction": {
1159
- "type": "string",
1160
- "enum": [
1161
- "upstream",
1162
- "downstream",
1163
- "both"
1164
- ]
1165
- }
281
+ "description": {
282
+ "description": "The text on the Step's arrow. Default: the Relationship's `description`, or its `channel` for an event.",
283
+ "type": "string"
1166
284
  },
1167
- "required": [
1168
- "impact"
1169
- ],
1170
- "additionalProperties": false
1171
- },
1172
- {
1173
- "type": "object",
1174
- "properties": {
1175
- "team": {
1176
- "type": "string",
1177
- "pattern": "^[a-z0-9][a-z0-9-]*$"
1178
- }
285
+ "note": {
286
+ "description": "A note shown under the Step.",
287
+ "type": "string"
1179
288
  },
1180
- "required": [
1181
- "team"
1182
- ],
1183
- "additionalProperties": false
289
+ "return": {
290
+ "description": "`true` makes the Step the reply to a sync Relationship declared from `to` to `from`. An async Relationship has no reply. Default: `false`.",
291
+ "type": "boolean"
292
+ }
1184
293
  },
1185
- {
1186
- "type": "object",
1187
- "properties": {
1188
- "path": {
1189
- "type": "object",
1190
- "properties": {
1191
- "from": {
1192
- "type": "string",
1193
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1194
- "description": "An id in this Project, or `project:id` for one in another Project"
1195
- },
1196
- "to": {
1197
- "type": "string",
1198
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1199
- "description": "An id in this Project, or `project:id` for one in another Project"
1200
- },
1201
- "paths": {
1202
- "anyOf": [
1203
- {
1204
- "type": "string",
1205
- "const": "shortest"
1206
- },
1207
- {
1208
- "type": "integer",
1209
- "minimum": 1,
1210
- "maximum": 9007199254740991
1211
- }
1212
- ],
1213
- "description": "`shortest` (the default), or n for every path of at most n hops"
1214
- }
1215
- },
1216
- "required": [
1217
- "from",
1218
- "to"
1219
- ],
1220
- "additionalProperties": false
1221
- }
1222
- },
1223
- "required": [
1224
- "path"
1225
- ],
1226
- "additionalProperties": false
1227
- }
1228
- ]
294
+ "required": [
295
+ "from",
296
+ "to"
297
+ ],
298
+ "additionalProperties": false,
299
+ "description": "A Step: one interaction of the scenario, which must follow a Relationship in the Model. It is a call from a consumer to its provider, an event from a Publisher to a Subscriber, or with `return: true` a reply."
300
+ },
301
+ "description": "The Steps of the scenario, in order."
1229
302
  }
1230
303
  },
1231
304
  "required": [
1232
305
  "title",
1233
- "level"
306
+ "steps"
1234
307
  ],
1235
- "additionalProperties": false
308
+ "additionalProperties": false,
309
+ "description": "A Dynamic View: one scenario as an ordered list of Steps, shown as a sequence chart. Its key is the View's id, unique among the Project's Saved Views."
310
+ }
311
+ }
312
+ },
313
+ "additionalProperties": false,
314
+ "description": "The Project's Saved Views: `structural` ones, which include Deployment Views, and `dynamic` ones."
315
+ }
316
+ },
317
+ "additionalProperties": false,
318
+ "description": "A Project file: any `.yaml` file in a Project folder other than `project.yaml`.",
319
+ "$defs": {
320
+ "Person": {
321
+ "type": "object",
322
+ "properties": {
323
+ "name": {
324
+ "type": "string",
325
+ "description": "The Element's display name."
326
+ },
327
+ "description": {
328
+ "description": "What the Element is or does, in a sentence or two.",
329
+ "type": "string"
330
+ },
331
+ "owner": {
332
+ "description": "The Team that owns the Element: the id of a Team in `workspace.yaml`. Set it only when it differs from the Project's; nothing is inherited from the parent Element. Default: the Project's `owner`.",
333
+ "type": "string",
334
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
335
+ },
336
+ "tags": {
337
+ "description": "Free-form labels. A Saved View's `{tag}` selector picks Elements by them.",
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string"
341
+ }
342
+ },
343
+ "links": {
344
+ "description": "Links to pages about the Element, such as a runbook or a dashboard.",
345
+ "type": "array",
346
+ "items": {
347
+ "$ref": "#/$defs/Link"
348
+ }
349
+ },
350
+ "relationships": {
351
+ "description": "The Relationships this Element is the consumer of: what it depends on. A Relationship is never declared under its provider.",
352
+ "type": "array",
353
+ "items": {
354
+ "$ref": "#/$defs/Relationship"
355
+ }
356
+ }
357
+ },
358
+ "required": [
359
+ "name"
360
+ ],
361
+ "additionalProperties": false,
362
+ "title": "Person",
363
+ "description": "A Person: a human or role that uses a System, such as a shopper or a support agent. A Person is only ever the consumer in a Relationship."
364
+ },
365
+ "Link": {
366
+ "type": "object",
367
+ "properties": {
368
+ "label": {
369
+ "type": "string",
370
+ "description": "The text of the link, such as `Runbook`."
371
+ },
372
+ "url": {
373
+ "type": "string",
374
+ "format": "uri",
375
+ "description": "The page the link opens. A full URL, such as `https://wiki.example.com/runbooks/web`."
376
+ }
377
+ },
378
+ "required": [
379
+ "label",
380
+ "url"
381
+ ],
382
+ "additionalProperties": false,
383
+ "title": "Link",
384
+ "description": "A link to a page about the thing it is declared on, such as a runbook or a dashboard."
385
+ },
386
+ "Relationship": {
387
+ "type": "object",
388
+ "properties": {
389
+ "to": {
390
+ "type": "string",
391
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
392
+ "description": "The provider: the Element this one depends on. An id in this Project, or `project:id` for an Element in another Project. It can't be a Person, this Element itself, or an ancestor or descendant of this Element."
393
+ },
394
+ "id": {
395
+ "description": "An id for the Relationship, unique among the Project's Relationships. Needed only when several Relationships connect the same two Elements, so that a Dynamic View Step can name one.",
396
+ "type": "string",
397
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
398
+ },
399
+ "description": {
400
+ "description": "What the consumer uses the provider for, as a verb phrase that reads from consumer to provider, such as `Reads prices from`.",
401
+ "type": "string"
402
+ },
403
+ "technology": {
404
+ "description": "How the consumer reaches the provider: a protocol, a driver or a format, such as `JSON/HTTPS`, `gRPC` or `SQL`.",
405
+ "type": "string"
406
+ },
407
+ "interaction": {
408
+ "description": "`sync`: a call that waits for an answer. `async`: an event or message that gets no reply, such as an event through a broker or a webhook. Default: `sync`.",
409
+ "type": "string",
410
+ "enum": [
411
+ "sync",
412
+ "async"
413
+ ]
414
+ },
415
+ "via": {
416
+ "description": "For an `async` Relationship only: the broker the events travel through. A Service with `type: broker`, as an id in this Project or `project:id`. Leave it out when there is no broker, as with a webhook.",
417
+ "type": "string",
418
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$"
419
+ },
420
+ "channel": {
421
+ "description": "For an `async` Relationship only: the topic or queue the events travel on, such as `orders.placed`.",
422
+ "type": "string"
423
+ },
424
+ "tags": {
425
+ "description": "Free-form labels for the Relationship.",
426
+ "type": "array",
427
+ "items": {
428
+ "type": "string"
1236
429
  }
430
+ }
431
+ },
432
+ "required": [
433
+ "to"
434
+ ],
435
+ "additionalProperties": false,
436
+ "title": "Relationship",
437
+ "description": "A Relationship: a dependency of the Element it is declared under (the consumer) on the Element `to` names (the provider). Declare it once, under the consumer."
438
+ },
439
+ "System": {
440
+ "type": "object",
441
+ "properties": {
442
+ "name": {
443
+ "type": "string",
444
+ "description": "The Element's display name."
1237
445
  },
1238
- "dynamic": {
446
+ "description": {
447
+ "description": "What the Element is or does, in a sentence or two.",
448
+ "type": "string"
449
+ },
450
+ "owner": {
451
+ "description": "The Team that owns the Element: the id of a Team in `workspace.yaml`. Set it only when it differs from the Project's; nothing is inherited from the parent Element. Default: the Project's `owner`.",
452
+ "type": "string",
453
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
454
+ },
455
+ "tags": {
456
+ "description": "Free-form labels. A Saved View's `{tag}` selector picks Elements by them.",
457
+ "type": "array",
458
+ "items": {
459
+ "type": "string"
460
+ }
461
+ },
462
+ "links": {
463
+ "description": "Links to pages about the Element, such as a runbook or a dashboard.",
464
+ "type": "array",
465
+ "items": {
466
+ "$ref": "#/$defs/Link"
467
+ }
468
+ },
469
+ "relationships": {
470
+ "description": "The Relationships this Element is the consumer of: what it depends on. A Relationship is never declared under its provider.",
471
+ "type": "array",
472
+ "items": {
473
+ "$ref": "#/$defs/Relationship"
474
+ }
475
+ },
476
+ "external": {
477
+ "description": "`true` for a System run outside the organization, such as a payment provider. Nothing inside an External System can declare Components. Default: `false`.",
478
+ "type": "boolean"
479
+ },
480
+ "services": {
481
+ "description": "The Services in the System, keyed by id.",
1239
482
  "type": "object",
1240
483
  "propertyNames": {
1241
484
  "type": "string",
1242
485
  "pattern": "^[a-z0-9][a-z0-9-]*$"
1243
486
  },
1244
487
  "additionalProperties": {
1245
- "type": "object",
1246
- "properties": {
1247
- "title": {
1248
- "type": "string"
1249
- },
1250
- "description": {
1251
- "type": "string"
1252
- },
1253
- "tags": {
1254
- "type": "array",
1255
- "items": {
1256
- "type": "string"
1257
- }
1258
- },
1259
- "participants": {
1260
- "description": "Fixes the participants' order; otherwise they are ordered by first appearance",
1261
- "type": "array",
1262
- "items": {
1263
- "type": "string",
1264
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1265
- "description": "An id in this Project, or `project:id` for one in another Project"
1266
- }
1267
- },
1268
- "steps": {
1269
- "type": "array",
1270
- "items": {
1271
- "type": "object",
1272
- "properties": {
1273
- "from": {
1274
- "type": "string",
1275
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1276
- "description": "An id in this Project, or `project:id` for one in another Project"
1277
- },
1278
- "to": {
1279
- "type": "string",
1280
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
1281
- "description": "An id in this Project, or `project:id` for one in another Project"
1282
- },
1283
- "relationship": {
1284
- "description": "The id of the Relationship the Step takes, when several connect the pair",
1285
- "type": "string",
1286
- "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$"
1287
- },
1288
- "description": {
1289
- "type": "string"
1290
- },
1291
- "note": {
1292
- "type": "string"
1293
- },
1294
- "return": {
1295
- "description": "The reply to a sync Relationship from `to` to `from`",
1296
- "type": "boolean"
1297
- }
1298
- },
1299
- "required": [
1300
- "from",
1301
- "to"
1302
- ],
1303
- "additionalProperties": false
1304
- }
1305
- }
1306
- },
1307
- "required": [
1308
- "title",
1309
- "steps"
1310
- ],
1311
- "additionalProperties": false
488
+ "$ref": "#/$defs/Service"
1312
489
  }
1313
490
  }
1314
491
  },
1315
- "additionalProperties": false
1316
- }
1317
- },
1318
- "additionalProperties": false,
1319
- "$defs": {
1320
- "Target": {
492
+ "required": [
493
+ "name"
494
+ ],
495
+ "additionalProperties": false,
496
+ "title": "System",
497
+ "description": "A System: a named grouping of Services that together deliver a business capability. Systems do not nest."
498
+ },
499
+ "Service": {
500
+ "type": "object",
501
+ "properties": {
502
+ "name": {
503
+ "type": "string",
504
+ "description": "The Element's display name."
505
+ },
506
+ "description": {
507
+ "description": "What the Element is or does, in a sentence or two.",
508
+ "type": "string"
509
+ },
510
+ "owner": {
511
+ "description": "The Team that owns the Element: the id of a Team in `workspace.yaml`. Set it only when it differs from the Project's; nothing is inherited from the parent Element. Default: the Project's `owner`.",
512
+ "type": "string",
513
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
514
+ },
515
+ "tags": {
516
+ "description": "Free-form labels. A Saved View's `{tag}` selector picks Elements by them.",
517
+ "type": "array",
518
+ "items": {
519
+ "type": "string"
520
+ }
521
+ },
522
+ "links": {
523
+ "description": "Links to pages about the Element, such as a runbook or a dashboard.",
524
+ "type": "array",
525
+ "items": {
526
+ "$ref": "#/$defs/Link"
527
+ }
528
+ },
529
+ "relationships": {
530
+ "description": "The Relationships this Element is the consumer of: what it depends on. A Relationship is never declared under its provider.",
531
+ "type": "array",
532
+ "items": {
533
+ "$ref": "#/$defs/Relationship"
534
+ }
535
+ },
536
+ "type": {
537
+ "description": "What the Service is; each type is drawn differently. `app`: an application, the usual case. `datastore`: a database or other store. `broker`: a message broker that async Relationships run through, named by their `via`. Default: `app`.",
538
+ "type": "string",
539
+ "enum": [
540
+ "app",
541
+ "datastore",
542
+ "broker"
543
+ ]
544
+ },
545
+ "technology": {
546
+ "description": "What the Service is built with, such as `Go` or `PostgreSQL`. Shown under its name.",
547
+ "type": "string"
548
+ },
549
+ "external": {
550
+ "description": "`true` for a Service run outside the organization, such as a payment provider's API. An External Service can't declare Components. Default: `false`.",
551
+ "type": "boolean"
552
+ },
553
+ "in": {
554
+ "description": "The System this Service belongs to, as an id in this Project. Only for a Service under the top-level `services` key, and not allowed for one nested under a System's `services`. Without it, a top-level Service stands outside any System.",
555
+ "type": "string",
556
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
557
+ },
558
+ "components": {
559
+ "description": "The Components inside the Service, keyed by id.",
560
+ "type": "object",
561
+ "propertyNames": {
562
+ "type": "string",
563
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
564
+ },
565
+ "additionalProperties": {
566
+ "$ref": "#/$defs/Component"
567
+ }
568
+ }
569
+ },
570
+ "required": [
571
+ "name"
572
+ ],
573
+ "additionalProperties": false,
574
+ "title": "Service",
575
+ "description": "A Service: a deployable, addressable unit of software; the thing that has a URL and a Deployment."
576
+ },
577
+ "Component": {
1321
578
  "type": "object",
1322
579
  "properties": {
1323
580
  "name": {
581
+ "type": "string",
582
+ "description": "The Element's display name."
583
+ },
584
+ "description": {
585
+ "description": "What the Element is or does, in a sentence or two.",
586
+ "type": "string"
587
+ },
588
+ "owner": {
589
+ "description": "The Team that owns the Element: the id of a Team in `workspace.yaml`. Set it only when it differs from the Project's; nothing is inherited from the parent Element. Default: the Project's `owner`.",
590
+ "type": "string",
591
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
592
+ },
593
+ "tags": {
594
+ "description": "Free-form labels. A Saved View's `{tag}` selector picks Elements by them.",
595
+ "type": "array",
596
+ "items": {
597
+ "type": "string"
598
+ }
599
+ },
600
+ "links": {
601
+ "description": "Links to pages about the Element, such as a runbook or a dashboard.",
602
+ "type": "array",
603
+ "items": {
604
+ "$ref": "#/$defs/Link"
605
+ }
606
+ },
607
+ "relationships": {
608
+ "description": "The Relationships this Element is the consumer of: what it depends on. A Relationship is never declared under its provider.",
609
+ "type": "array",
610
+ "items": {
611
+ "$ref": "#/$defs/Relationship"
612
+ }
613
+ },
614
+ "technology": {
615
+ "description": "What the Component is built with, such as `TypeScript module`. Shown under its name.",
1324
616
  "type": "string"
1325
617
  },
618
+ "in": {
619
+ "description": "The Service this Component belongs to, as an id in this Project. Required for a Component under the top-level `components` key, and not allowed for one nested under a Service's `components`.",
620
+ "type": "string",
621
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
622
+ }
623
+ },
624
+ "required": [
625
+ "name"
626
+ ],
627
+ "additionalProperties": false,
628
+ "title": "Component",
629
+ "description": "A Component: a part inside a Service that is not deployed on its own."
630
+ },
631
+ "Target": {
632
+ "type": "object",
633
+ "properties": {
634
+ "name": {
635
+ "type": "string",
636
+ "description": "The Deployment Target's display name."
637
+ },
1326
638
  "kind": {
1327
639
  "type": "string",
1328
- "description": "What the Target is, such as region, cluster, namespace or platform"
640
+ "description": "What the Deployment Target is, in a word you choose, such as `region`, `cluster`, `namespace` or `platform`."
1329
641
  },
1330
642
  "description": {
643
+ "description": "What the Deployment Target is, in a sentence or two.",
1331
644
  "type": "string"
1332
645
  },
1333
646
  "owner": {
647
+ "description": "The Team that owns the Deployment Target: the id of a Team in `workspace.yaml`. Default: the Project's `owner`.",
1334
648
  "type": "string",
1335
649
  "pattern": "^[a-z0-9][a-z0-9-]*$"
1336
650
  },
1337
651
  "tags": {
652
+ "description": "Free-form labels for the Deployment Target.",
1338
653
  "type": "array",
1339
654
  "items": {
1340
655
  "type": "string"
1341
656
  }
1342
657
  },
1343
658
  "links": {
659
+ "description": "Links to pages about the Deployment Target, such as a dashboard.",
1344
660
  "type": "array",
1345
661
  "items": {
1346
- "type": "object",
1347
- "properties": {
1348
- "label": {
1349
- "type": "string"
1350
- },
1351
- "url": {
1352
- "type": "string",
1353
- "format": "uri"
1354
- }
1355
- },
1356
- "required": [
1357
- "label",
1358
- "url"
1359
- ],
1360
- "additionalProperties": false
662
+ "$ref": "#/$defs/Link"
1361
663
  }
1362
664
  },
1363
665
  "targets": {
666
+ "description": "The Deployment Targets inside this one, keyed by id, such as the clusters in a region.",
1364
667
  "type": "object",
1365
668
  "propertyNames": {
1366
669
  "type": "string",
@@ -1375,7 +678,197 @@
1375
678
  "name",
1376
679
  "kind"
1377
680
  ],
1378
- "additionalProperties": false
681
+ "additionalProperties": false,
682
+ "title": "Deployment Target",
683
+ "description": "A Deployment Target: a place Services run, such as a region, a cluster in it or a platform. Deployment Targets nest to any depth and are not Elements."
684
+ },
685
+ "Selector": {
686
+ "anyOf": [
687
+ {
688
+ "type": "string",
689
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
690
+ "description": "One Element, by its id: an id in this Project, or `project:id`."
691
+ },
692
+ {
693
+ "type": "object",
694
+ "properties": {
695
+ "element": {
696
+ "type": "string",
697
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
698
+ "description": "The Element to start from: an id in this Project, or `project:id`."
699
+ },
700
+ "with": {
701
+ "description": "Also selects what is inside the Element. `children`: the Elements directly inside it. `descendants`: everything inside it, at any depth.",
702
+ "type": "string",
703
+ "enum": [
704
+ "children",
705
+ "descendants"
706
+ ]
707
+ },
708
+ "upstream": {
709
+ "description": "Also selects the Elements upstream of it, those that depend on it: a number of hops, or `all` for every one of them.",
710
+ "anyOf": [
711
+ {
712
+ "type": "integer",
713
+ "minimum": 0,
714
+ "maximum": 9007199254740991
715
+ },
716
+ {
717
+ "type": "string",
718
+ "const": "all"
719
+ }
720
+ ]
721
+ },
722
+ "downstream": {
723
+ "description": "Also selects the Elements downstream of it, those it depends on: a number of hops, or `all` for every one of them.",
724
+ "anyOf": [
725
+ {
726
+ "type": "integer",
727
+ "minimum": 0,
728
+ "maximum": 9007199254740991
729
+ },
730
+ {
731
+ "type": "string",
732
+ "const": "all"
733
+ }
734
+ ]
735
+ }
736
+ },
737
+ "required": [
738
+ "element"
739
+ ],
740
+ "additionalProperties": false,
741
+ "description": "One Element, and optionally what is inside it and what is upstream or downstream of it."
742
+ },
743
+ {
744
+ "type": "object",
745
+ "properties": {
746
+ "team": {
747
+ "type": "string",
748
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
749
+ "description": "The Team: the id of a Team in `workspace.yaml`."
750
+ }
751
+ },
752
+ "required": [
753
+ "team"
754
+ ],
755
+ "additionalProperties": false,
756
+ "description": "Every Element a Team owns."
757
+ },
758
+ {
759
+ "type": "object",
760
+ "properties": {
761
+ "tag": {
762
+ "type": "string",
763
+ "description": "The tag, as written in the Elements' `tags`."
764
+ }
765
+ },
766
+ "required": [
767
+ "tag"
768
+ ],
769
+ "additionalProperties": false,
770
+ "description": "Every Element that carries a tag."
771
+ },
772
+ {
773
+ "$ref": "#/$defs/PathSelector"
774
+ }
775
+ ],
776
+ "title": "Selector",
777
+ "description": "One entry of a Saved View's `include` or `exclude`: an id, or a map that picks several Elements at once."
778
+ },
779
+ "PathSelector": {
780
+ "type": "object",
781
+ "properties": {
782
+ "from": {
783
+ "type": "string",
784
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
785
+ "description": "One end of the paths: an id in this Project, or `project:id`."
786
+ },
787
+ "to": {
788
+ "type": "string",
789
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
790
+ "description": "The other end of the paths: an id in this Project, or `project:id`."
791
+ },
792
+ "paths": {
793
+ "description": "Which paths to take. `shortest`: the shortest paths, however long. A number n: every path of at most n hops. Default: `shortest`.",
794
+ "anyOf": [
795
+ {
796
+ "type": "string",
797
+ "const": "shortest"
798
+ },
799
+ {
800
+ "type": "integer",
801
+ "minimum": 1,
802
+ "maximum": 9007199254740991
803
+ }
804
+ ]
805
+ }
806
+ },
807
+ "required": [
808
+ "from",
809
+ "to"
810
+ ],
811
+ "additionalProperties": false,
812
+ "title": "Path selector",
813
+ "description": "The paths between two Elements, followed in both directions. As a selector it picks every Element on them; as a Lens it highlights them."
814
+ },
815
+ "Lens": {
816
+ "anyOf": [
817
+ {
818
+ "type": "object",
819
+ "properties": {
820
+ "impact": {
821
+ "type": "string",
822
+ "pattern": "^([a-z0-9][a-z0-9-]*:)?[a-z0-9][a-z0-9-]*$",
823
+ "description": "The Element whose impact is highlighted: an id in this Project, or `project:id`."
824
+ },
825
+ "direction": {
826
+ "description": "Which side to highlight. `upstream`: what depends on the Element. `downstream`: what it depends on. `both`: both sides. Default: `both`.",
827
+ "type": "string",
828
+ "enum": [
829
+ "upstream",
830
+ "downstream",
831
+ "both"
832
+ ]
833
+ }
834
+ },
835
+ "required": [
836
+ "impact"
837
+ ],
838
+ "additionalProperties": false,
839
+ "description": "The Impact Lens: what is upstream or downstream of one Element, each node marked with how many hops away it is."
840
+ },
841
+ {
842
+ "type": "object",
843
+ "properties": {
844
+ "team": {
845
+ "type": "string",
846
+ "pattern": "^[a-z0-9][a-z0-9-]*$",
847
+ "description": "The Team: the id of a Team in `workspace.yaml`."
848
+ }
849
+ },
850
+ "required": [
851
+ "team"
852
+ ],
853
+ "additionalProperties": false,
854
+ "description": "The Team Lens: what one Team owns."
855
+ },
856
+ {
857
+ "type": "object",
858
+ "properties": {
859
+ "path": {
860
+ "$ref": "#/$defs/PathSelector"
861
+ }
862
+ },
863
+ "required": [
864
+ "path"
865
+ ],
866
+ "additionalProperties": false,
867
+ "description": "The Path Lens: the paths between two Elements."
868
+ }
869
+ ],
870
+ "title": "Lens",
871
+ "description": "The Lens the View opens with. A Lens highlights nodes and never changes which nodes the View shows."
1379
872
  }
1380
873
  }
1381
874
  }