@tenhaw/core 0.0.0-bootstrap

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.
package/dist/index.js ADDED
@@ -0,0 +1,3585 @@
1
+ // src/index.ts
2
+ import Ajv2020 from "ajv/dist/2020.js";
3
+ import addFormats from "ajv-formats";
4
+
5
+ // src/schemas.ts
6
+ var schemas = {
7
+ "delivery-events": {
8
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
9
+ "$id": "https://kit.tenhaw.com/schemas/delivery-events.schema.json",
10
+ "type": "array",
11
+ "items": {
12
+ "oneOf": [
13
+ {
14
+ "type": "object",
15
+ "properties": {
16
+ "id": {
17
+ "type": "string",
18
+ "minLength": 1
19
+ },
20
+ "type": {
21
+ "const": "commit"
22
+ },
23
+ "timestamp": {
24
+ "type": "string",
25
+ "format": "date-time"
26
+ },
27
+ "service": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ }
31
+ },
32
+ "required": [
33
+ "id",
34
+ "type",
35
+ "timestamp",
36
+ "service"
37
+ ],
38
+ "additionalProperties": false
39
+ },
40
+ {
41
+ "type": "object",
42
+ "properties": {
43
+ "id": {
44
+ "type": "string",
45
+ "minLength": 1
46
+ },
47
+ "type": {
48
+ "const": "deployment"
49
+ },
50
+ "timestamp": {
51
+ "type": "string",
52
+ "format": "date-time"
53
+ },
54
+ "service": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "environment": {
59
+ "type": "string",
60
+ "minLength": 1
61
+ },
62
+ "commitIds": {
63
+ "type": "array",
64
+ "items": {
65
+ "type": "string",
66
+ "minLength": 1
67
+ }
68
+ },
69
+ "status": {
70
+ "type": "string",
71
+ "enum": [
72
+ "success",
73
+ "failed"
74
+ ]
75
+ },
76
+ "rework": {
77
+ "type": "boolean"
78
+ },
79
+ "proxy": {
80
+ "type": "boolean"
81
+ }
82
+ },
83
+ "required": [
84
+ "id",
85
+ "type",
86
+ "timestamp",
87
+ "service",
88
+ "environment",
89
+ "commitIds",
90
+ "status"
91
+ ],
92
+ "additionalProperties": false
93
+ },
94
+ {
95
+ "type": "object",
96
+ "properties": {
97
+ "id": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ },
101
+ "type": {
102
+ "const": "incident"
103
+ },
104
+ "startedAt": {
105
+ "type": "string",
106
+ "format": "date-time"
107
+ },
108
+ "restoredAt": {
109
+ "type": "string",
110
+ "format": "date-time"
111
+ },
112
+ "service": {
113
+ "type": "string",
114
+ "minLength": 1
115
+ },
116
+ "deploymentId": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ }
120
+ },
121
+ "required": [
122
+ "id",
123
+ "type",
124
+ "startedAt",
125
+ "service",
126
+ "deploymentId"
127
+ ],
128
+ "additionalProperties": false
129
+ },
130
+ {
131
+ "type": "object",
132
+ "properties": {
133
+ "id": {
134
+ "type": "string",
135
+ "minLength": 1
136
+ },
137
+ "type": {
138
+ "const": "work-item"
139
+ },
140
+ "startedAt": {
141
+ "type": "string",
142
+ "format": "date-time"
143
+ },
144
+ "completedAt": {
145
+ "type": "string",
146
+ "format": "date-time"
147
+ },
148
+ "service": {
149
+ "type": "string",
150
+ "minLength": 1
151
+ },
152
+ "activeMinutes": {
153
+ "type": "number",
154
+ "minimum": 0
155
+ }
156
+ },
157
+ "required": [
158
+ "id",
159
+ "type",
160
+ "startedAt",
161
+ "service"
162
+ ],
163
+ "additionalProperties": false
164
+ },
165
+ {
166
+ "type": "object",
167
+ "properties": {
168
+ "id": {
169
+ "type": "string",
170
+ "minLength": 1
171
+ },
172
+ "type": {
173
+ "const": "pull-request"
174
+ },
175
+ "createdAt": {
176
+ "type": "string",
177
+ "format": "date-time"
178
+ },
179
+ "firstReviewAt": {
180
+ "type": "string",
181
+ "format": "date-time"
182
+ },
183
+ "mergedAt": {
184
+ "type": "string",
185
+ "format": "date-time"
186
+ },
187
+ "service": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "additions": {
192
+ "type": "integer",
193
+ "minimum": 0
194
+ },
195
+ "deletions": {
196
+ "type": "integer",
197
+ "minimum": 0
198
+ }
199
+ },
200
+ "required": [
201
+ "id",
202
+ "type",
203
+ "createdAt",
204
+ "service"
205
+ ],
206
+ "additionalProperties": false
207
+ }
208
+ ]
209
+ },
210
+ "maxItems": 5e4
211
+ },
212
+ "delivery-health": {
213
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
214
+ "$id": "https://kit.tenhaw.com/schemas/delivery-health.schema.json",
215
+ "type": "object",
216
+ "properties": {
217
+ "status": {
218
+ "const": "informational"
219
+ },
220
+ "metrics": {
221
+ "type": "object",
222
+ "properties": {
223
+ "deploymentFrequency": {
224
+ "type": "object",
225
+ "properties": {
226
+ "value": {
227
+ "type": [
228
+ "number",
229
+ "null"
230
+ ],
231
+ "minimum": 0
232
+ },
233
+ "unit": {
234
+ "const": "deployments/day"
235
+ },
236
+ "sampleSize": {
237
+ "type": "integer",
238
+ "minimum": 0
239
+ },
240
+ "period": {
241
+ "type": "object",
242
+ "properties": {
243
+ "since": {
244
+ "type": "string",
245
+ "format": "date-time"
246
+ },
247
+ "until": {
248
+ "type": "string",
249
+ "format": "date-time"
250
+ }
251
+ },
252
+ "required": [
253
+ "since",
254
+ "until"
255
+ ],
256
+ "additionalProperties": false
257
+ },
258
+ "dataSource": {
259
+ "const": "supplied events"
260
+ },
261
+ "caveats": {
262
+ "type": "array",
263
+ "items": {
264
+ "type": "string"
265
+ }
266
+ }
267
+ },
268
+ "required": [
269
+ "value",
270
+ "unit",
271
+ "sampleSize",
272
+ "period",
273
+ "dataSource",
274
+ "caveats"
275
+ ],
276
+ "additionalProperties": false
277
+ },
278
+ "changeLeadTime": {
279
+ "type": "object",
280
+ "properties": {
281
+ "value": {
282
+ "type": [
283
+ "number",
284
+ "null"
285
+ ],
286
+ "minimum": 0
287
+ },
288
+ "unit": {
289
+ "const": "hours"
290
+ },
291
+ "sampleSize": {
292
+ "type": "integer",
293
+ "minimum": 0
294
+ },
295
+ "period": {
296
+ "type": "object",
297
+ "properties": {
298
+ "since": {
299
+ "type": "string",
300
+ "format": "date-time"
301
+ },
302
+ "until": {
303
+ "type": "string",
304
+ "format": "date-time"
305
+ }
306
+ },
307
+ "required": [
308
+ "since",
309
+ "until"
310
+ ],
311
+ "additionalProperties": false
312
+ },
313
+ "dataSource": {
314
+ "const": "supplied events"
315
+ },
316
+ "caveats": {
317
+ "type": "array",
318
+ "items": {
319
+ "type": "string"
320
+ }
321
+ }
322
+ },
323
+ "required": [
324
+ "value",
325
+ "unit",
326
+ "sampleSize",
327
+ "period",
328
+ "dataSource",
329
+ "caveats"
330
+ ],
331
+ "additionalProperties": false
332
+ },
333
+ "changeFailRate": {
334
+ "type": "object",
335
+ "properties": {
336
+ "value": {
337
+ "type": [
338
+ "number",
339
+ "null"
340
+ ],
341
+ "minimum": 0,
342
+ "maximum": 100
343
+ },
344
+ "unit": {
345
+ "const": "percent"
346
+ },
347
+ "sampleSize": {
348
+ "type": "integer",
349
+ "minimum": 0
350
+ },
351
+ "period": {
352
+ "type": "object",
353
+ "properties": {
354
+ "since": {
355
+ "type": "string",
356
+ "format": "date-time"
357
+ },
358
+ "until": {
359
+ "type": "string",
360
+ "format": "date-time"
361
+ }
362
+ },
363
+ "required": [
364
+ "since",
365
+ "until"
366
+ ],
367
+ "additionalProperties": false
368
+ },
369
+ "dataSource": {
370
+ "const": "supplied events"
371
+ },
372
+ "caveats": {
373
+ "type": "array",
374
+ "items": {
375
+ "type": "string"
376
+ }
377
+ }
378
+ },
379
+ "required": [
380
+ "value",
381
+ "unit",
382
+ "sampleSize",
383
+ "period",
384
+ "dataSource",
385
+ "caveats"
386
+ ],
387
+ "additionalProperties": false
388
+ },
389
+ "failedDeploymentRecoveryTime": {
390
+ "type": "object",
391
+ "properties": {
392
+ "value": {
393
+ "type": [
394
+ "number",
395
+ "null"
396
+ ],
397
+ "minimum": 0
398
+ },
399
+ "unit": {
400
+ "const": "hours"
401
+ },
402
+ "sampleSize": {
403
+ "type": "integer",
404
+ "minimum": 0
405
+ },
406
+ "period": {
407
+ "type": "object",
408
+ "properties": {
409
+ "since": {
410
+ "type": "string",
411
+ "format": "date-time"
412
+ },
413
+ "until": {
414
+ "type": "string",
415
+ "format": "date-time"
416
+ }
417
+ },
418
+ "required": [
419
+ "since",
420
+ "until"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ "dataSource": {
425
+ "const": "supplied events"
426
+ },
427
+ "caveats": {
428
+ "type": "array",
429
+ "items": {
430
+ "type": "string"
431
+ }
432
+ }
433
+ },
434
+ "required": [
435
+ "value",
436
+ "unit",
437
+ "sampleSize",
438
+ "period",
439
+ "dataSource",
440
+ "caveats"
441
+ ],
442
+ "additionalProperties": false
443
+ },
444
+ "deploymentReworkRate": {
445
+ "type": "object",
446
+ "properties": {
447
+ "value": {
448
+ "type": [
449
+ "number",
450
+ "null"
451
+ ],
452
+ "minimum": 0,
453
+ "maximum": 100
454
+ },
455
+ "unit": {
456
+ "const": "percent"
457
+ },
458
+ "sampleSize": {
459
+ "type": "integer",
460
+ "minimum": 0
461
+ },
462
+ "period": {
463
+ "type": "object",
464
+ "properties": {
465
+ "since": {
466
+ "type": "string",
467
+ "format": "date-time"
468
+ },
469
+ "until": {
470
+ "type": "string",
471
+ "format": "date-time"
472
+ }
473
+ },
474
+ "required": [
475
+ "since",
476
+ "until"
477
+ ],
478
+ "additionalProperties": false
479
+ },
480
+ "dataSource": {
481
+ "const": "supplied events"
482
+ },
483
+ "caveats": {
484
+ "type": "array",
485
+ "items": {
486
+ "type": "string"
487
+ }
488
+ }
489
+ },
490
+ "required": [
491
+ "value",
492
+ "unit",
493
+ "sampleSize",
494
+ "period",
495
+ "dataSource",
496
+ "caveats"
497
+ ],
498
+ "additionalProperties": false
499
+ },
500
+ "cycleTime": {
501
+ "type": "object",
502
+ "properties": {
503
+ "value": {
504
+ "type": [
505
+ "number",
506
+ "null"
507
+ ],
508
+ "minimum": 0
509
+ },
510
+ "unit": {
511
+ "const": "hours"
512
+ },
513
+ "sampleSize": {
514
+ "type": "integer",
515
+ "minimum": 0
516
+ },
517
+ "period": {
518
+ "type": "object",
519
+ "properties": {
520
+ "since": {
521
+ "type": "string",
522
+ "format": "date-time"
523
+ },
524
+ "until": {
525
+ "type": "string",
526
+ "format": "date-time"
527
+ }
528
+ },
529
+ "required": [
530
+ "since",
531
+ "until"
532
+ ],
533
+ "additionalProperties": false
534
+ },
535
+ "dataSource": {
536
+ "const": "supplied events"
537
+ },
538
+ "caveats": {
539
+ "type": "array",
540
+ "items": {
541
+ "type": "string"
542
+ }
543
+ }
544
+ },
545
+ "required": [
546
+ "value",
547
+ "unit",
548
+ "sampleSize",
549
+ "period",
550
+ "dataSource",
551
+ "caveats"
552
+ ],
553
+ "additionalProperties": false
554
+ },
555
+ "throughput": {
556
+ "type": "object",
557
+ "properties": {
558
+ "value": {
559
+ "type": [
560
+ "number",
561
+ "null"
562
+ ],
563
+ "minimum": 0
564
+ },
565
+ "unit": {
566
+ "const": "items/week"
567
+ },
568
+ "sampleSize": {
569
+ "type": "integer",
570
+ "minimum": 0
571
+ },
572
+ "period": {
573
+ "type": "object",
574
+ "properties": {
575
+ "since": {
576
+ "type": "string",
577
+ "format": "date-time"
578
+ },
579
+ "until": {
580
+ "type": "string",
581
+ "format": "date-time"
582
+ }
583
+ },
584
+ "required": [
585
+ "since",
586
+ "until"
587
+ ],
588
+ "additionalProperties": false
589
+ },
590
+ "dataSource": {
591
+ "const": "supplied events"
592
+ },
593
+ "caveats": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "string"
597
+ }
598
+ }
599
+ },
600
+ "required": [
601
+ "value",
602
+ "unit",
603
+ "sampleSize",
604
+ "period",
605
+ "dataSource",
606
+ "caveats"
607
+ ],
608
+ "additionalProperties": false
609
+ },
610
+ "wip": {
611
+ "type": "object",
612
+ "properties": {
613
+ "value": {
614
+ "type": [
615
+ "number",
616
+ "null"
617
+ ],
618
+ "minimum": 0
619
+ },
620
+ "unit": {
621
+ "const": "items at period end"
622
+ },
623
+ "sampleSize": {
624
+ "type": "integer",
625
+ "minimum": 0
626
+ },
627
+ "period": {
628
+ "type": "object",
629
+ "properties": {
630
+ "since": {
631
+ "type": "string",
632
+ "format": "date-time"
633
+ },
634
+ "until": {
635
+ "type": "string",
636
+ "format": "date-time"
637
+ }
638
+ },
639
+ "required": [
640
+ "since",
641
+ "until"
642
+ ],
643
+ "additionalProperties": false
644
+ },
645
+ "dataSource": {
646
+ "const": "supplied events"
647
+ },
648
+ "caveats": {
649
+ "type": "array",
650
+ "items": {
651
+ "type": "string"
652
+ }
653
+ }
654
+ },
655
+ "required": [
656
+ "value",
657
+ "unit",
658
+ "sampleSize",
659
+ "period",
660
+ "dataSource",
661
+ "caveats"
662
+ ],
663
+ "additionalProperties": false
664
+ },
665
+ "flowEfficiency": {
666
+ "type": "object",
667
+ "properties": {
668
+ "value": {
669
+ "type": [
670
+ "number",
671
+ "null"
672
+ ],
673
+ "minimum": 0,
674
+ "maximum": 100
675
+ },
676
+ "unit": {
677
+ "const": "percent"
678
+ },
679
+ "sampleSize": {
680
+ "type": "integer",
681
+ "minimum": 0
682
+ },
683
+ "period": {
684
+ "type": "object",
685
+ "properties": {
686
+ "since": {
687
+ "type": "string",
688
+ "format": "date-time"
689
+ },
690
+ "until": {
691
+ "type": "string",
692
+ "format": "date-time"
693
+ }
694
+ },
695
+ "required": [
696
+ "since",
697
+ "until"
698
+ ],
699
+ "additionalProperties": false
700
+ },
701
+ "dataSource": {
702
+ "const": "supplied events"
703
+ },
704
+ "caveats": {
705
+ "type": "array",
706
+ "items": {
707
+ "type": "string"
708
+ }
709
+ }
710
+ },
711
+ "required": [
712
+ "value",
713
+ "unit",
714
+ "sampleSize",
715
+ "period",
716
+ "dataSource",
717
+ "caveats"
718
+ ],
719
+ "additionalProperties": false
720
+ },
721
+ "prReviewTime": {
722
+ "type": "object",
723
+ "properties": {
724
+ "value": {
725
+ "type": [
726
+ "number",
727
+ "null"
728
+ ],
729
+ "minimum": 0
730
+ },
731
+ "unit": {
732
+ "const": "hours"
733
+ },
734
+ "sampleSize": {
735
+ "type": "integer",
736
+ "minimum": 0
737
+ },
738
+ "period": {
739
+ "type": "object",
740
+ "properties": {
741
+ "since": {
742
+ "type": "string",
743
+ "format": "date-time"
744
+ },
745
+ "until": {
746
+ "type": "string",
747
+ "format": "date-time"
748
+ }
749
+ },
750
+ "required": [
751
+ "since",
752
+ "until"
753
+ ],
754
+ "additionalProperties": false
755
+ },
756
+ "dataSource": {
757
+ "const": "supplied events"
758
+ },
759
+ "caveats": {
760
+ "type": "array",
761
+ "items": {
762
+ "type": "string"
763
+ }
764
+ }
765
+ },
766
+ "required": [
767
+ "value",
768
+ "unit",
769
+ "sampleSize",
770
+ "period",
771
+ "dataSource",
772
+ "caveats"
773
+ ],
774
+ "additionalProperties": false
775
+ },
776
+ "prSize": {
777
+ "type": "object",
778
+ "properties": {
779
+ "value": {
780
+ "type": [
781
+ "number",
782
+ "null"
783
+ ],
784
+ "minimum": 0
785
+ },
786
+ "unit": {
787
+ "const": "changed lines"
788
+ },
789
+ "sampleSize": {
790
+ "type": "integer",
791
+ "minimum": 0
792
+ },
793
+ "period": {
794
+ "type": "object",
795
+ "properties": {
796
+ "since": {
797
+ "type": "string",
798
+ "format": "date-time"
799
+ },
800
+ "until": {
801
+ "type": "string",
802
+ "format": "date-time"
803
+ }
804
+ },
805
+ "required": [
806
+ "since",
807
+ "until"
808
+ ],
809
+ "additionalProperties": false
810
+ },
811
+ "dataSource": {
812
+ "const": "supplied events"
813
+ },
814
+ "caveats": {
815
+ "type": "array",
816
+ "items": {
817
+ "type": "string"
818
+ }
819
+ }
820
+ },
821
+ "required": [
822
+ "value",
823
+ "unit",
824
+ "sampleSize",
825
+ "period",
826
+ "dataSource",
827
+ "caveats"
828
+ ],
829
+ "additionalProperties": false
830
+ }
831
+ },
832
+ "required": [
833
+ "deploymentFrequency",
834
+ "changeLeadTime",
835
+ "changeFailRate",
836
+ "failedDeploymentRecoveryTime",
837
+ "deploymentReworkRate",
838
+ "cycleTime",
839
+ "throughput",
840
+ "wip",
841
+ "flowEfficiency",
842
+ "prReviewTime",
843
+ "prSize"
844
+ ],
845
+ "additionalProperties": false
846
+ },
847
+ "actions": {
848
+ "type": "array",
849
+ "items": {
850
+ "type": "string"
851
+ },
852
+ "minItems": 1,
853
+ "maxItems": 3
854
+ },
855
+ "limitations": {
856
+ "type": "array",
857
+ "items": {
858
+ "type": "string"
859
+ }
860
+ },
861
+ "sources": {
862
+ "type": "array",
863
+ "items": {
864
+ "type": "string",
865
+ "format": "uri"
866
+ }
867
+ }
868
+ },
869
+ "required": [
870
+ "status",
871
+ "metrics",
872
+ "actions",
873
+ "limitations",
874
+ "sources"
875
+ ],
876
+ "additionalProperties": false
877
+ },
878
+ "delivery-report": {
879
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
880
+ "$id": "https://kit.tenhaw.com/schemas/delivery-report.schema.json",
881
+ "type": "object",
882
+ "properties": {
883
+ "period": {
884
+ "type": "object",
885
+ "properties": {
886
+ "since": {
887
+ "type": "string",
888
+ "format": "date-time"
889
+ },
890
+ "until": {
891
+ "type": "string",
892
+ "format": "date-time"
893
+ }
894
+ },
895
+ "required": [
896
+ "since",
897
+ "until"
898
+ ],
899
+ "additionalProperties": false
900
+ },
901
+ "metrics": {
902
+ "type": "object",
903
+ "properties": {
904
+ "deploymentFrequency": {
905
+ "type": "object",
906
+ "properties": {
907
+ "value": {
908
+ "type": [
909
+ "number",
910
+ "null"
911
+ ],
912
+ "minimum": 0
913
+ },
914
+ "unit": {
915
+ "const": "deployments/day"
916
+ },
917
+ "sampleSize": {
918
+ "type": "integer",
919
+ "minimum": 0
920
+ },
921
+ "period": {
922
+ "type": "object",
923
+ "properties": {
924
+ "since": {
925
+ "type": "string",
926
+ "format": "date-time"
927
+ },
928
+ "until": {
929
+ "type": "string",
930
+ "format": "date-time"
931
+ }
932
+ },
933
+ "required": [
934
+ "since",
935
+ "until"
936
+ ],
937
+ "additionalProperties": false
938
+ },
939
+ "dataSource": {
940
+ "const": "supplied events"
941
+ },
942
+ "caveats": {
943
+ "type": "array",
944
+ "items": {
945
+ "type": "string"
946
+ }
947
+ }
948
+ },
949
+ "required": [
950
+ "value",
951
+ "unit",
952
+ "sampleSize",
953
+ "period",
954
+ "dataSource",
955
+ "caveats"
956
+ ],
957
+ "additionalProperties": false
958
+ },
959
+ "changeLeadTime": {
960
+ "type": "object",
961
+ "properties": {
962
+ "value": {
963
+ "type": [
964
+ "number",
965
+ "null"
966
+ ],
967
+ "minimum": 0
968
+ },
969
+ "unit": {
970
+ "const": "hours"
971
+ },
972
+ "sampleSize": {
973
+ "type": "integer",
974
+ "minimum": 0
975
+ },
976
+ "period": {
977
+ "type": "object",
978
+ "properties": {
979
+ "since": {
980
+ "type": "string",
981
+ "format": "date-time"
982
+ },
983
+ "until": {
984
+ "type": "string",
985
+ "format": "date-time"
986
+ }
987
+ },
988
+ "required": [
989
+ "since",
990
+ "until"
991
+ ],
992
+ "additionalProperties": false
993
+ },
994
+ "dataSource": {
995
+ "const": "supplied events"
996
+ },
997
+ "caveats": {
998
+ "type": "array",
999
+ "items": {
1000
+ "type": "string"
1001
+ }
1002
+ }
1003
+ },
1004
+ "required": [
1005
+ "value",
1006
+ "unit",
1007
+ "sampleSize",
1008
+ "period",
1009
+ "dataSource",
1010
+ "caveats"
1011
+ ],
1012
+ "additionalProperties": false
1013
+ },
1014
+ "changeFailRate": {
1015
+ "type": "object",
1016
+ "properties": {
1017
+ "value": {
1018
+ "type": [
1019
+ "number",
1020
+ "null"
1021
+ ],
1022
+ "minimum": 0,
1023
+ "maximum": 100
1024
+ },
1025
+ "unit": {
1026
+ "const": "percent"
1027
+ },
1028
+ "sampleSize": {
1029
+ "type": "integer",
1030
+ "minimum": 0
1031
+ },
1032
+ "period": {
1033
+ "type": "object",
1034
+ "properties": {
1035
+ "since": {
1036
+ "type": "string",
1037
+ "format": "date-time"
1038
+ },
1039
+ "until": {
1040
+ "type": "string",
1041
+ "format": "date-time"
1042
+ }
1043
+ },
1044
+ "required": [
1045
+ "since",
1046
+ "until"
1047
+ ],
1048
+ "additionalProperties": false
1049
+ },
1050
+ "dataSource": {
1051
+ "const": "supplied events"
1052
+ },
1053
+ "caveats": {
1054
+ "type": "array",
1055
+ "items": {
1056
+ "type": "string"
1057
+ }
1058
+ }
1059
+ },
1060
+ "required": [
1061
+ "value",
1062
+ "unit",
1063
+ "sampleSize",
1064
+ "period",
1065
+ "dataSource",
1066
+ "caveats"
1067
+ ],
1068
+ "additionalProperties": false
1069
+ },
1070
+ "failedDeploymentRecoveryTime": {
1071
+ "type": "object",
1072
+ "properties": {
1073
+ "value": {
1074
+ "type": [
1075
+ "number",
1076
+ "null"
1077
+ ],
1078
+ "minimum": 0
1079
+ },
1080
+ "unit": {
1081
+ "const": "hours"
1082
+ },
1083
+ "sampleSize": {
1084
+ "type": "integer",
1085
+ "minimum": 0
1086
+ },
1087
+ "period": {
1088
+ "type": "object",
1089
+ "properties": {
1090
+ "since": {
1091
+ "type": "string",
1092
+ "format": "date-time"
1093
+ },
1094
+ "until": {
1095
+ "type": "string",
1096
+ "format": "date-time"
1097
+ }
1098
+ },
1099
+ "required": [
1100
+ "since",
1101
+ "until"
1102
+ ],
1103
+ "additionalProperties": false
1104
+ },
1105
+ "dataSource": {
1106
+ "const": "supplied events"
1107
+ },
1108
+ "caveats": {
1109
+ "type": "array",
1110
+ "items": {
1111
+ "type": "string"
1112
+ }
1113
+ }
1114
+ },
1115
+ "required": [
1116
+ "value",
1117
+ "unit",
1118
+ "sampleSize",
1119
+ "period",
1120
+ "dataSource",
1121
+ "caveats"
1122
+ ],
1123
+ "additionalProperties": false
1124
+ },
1125
+ "deploymentReworkRate": {
1126
+ "type": "object",
1127
+ "properties": {
1128
+ "value": {
1129
+ "type": [
1130
+ "number",
1131
+ "null"
1132
+ ],
1133
+ "minimum": 0,
1134
+ "maximum": 100
1135
+ },
1136
+ "unit": {
1137
+ "const": "percent"
1138
+ },
1139
+ "sampleSize": {
1140
+ "type": "integer",
1141
+ "minimum": 0
1142
+ },
1143
+ "period": {
1144
+ "type": "object",
1145
+ "properties": {
1146
+ "since": {
1147
+ "type": "string",
1148
+ "format": "date-time"
1149
+ },
1150
+ "until": {
1151
+ "type": "string",
1152
+ "format": "date-time"
1153
+ }
1154
+ },
1155
+ "required": [
1156
+ "since",
1157
+ "until"
1158
+ ],
1159
+ "additionalProperties": false
1160
+ },
1161
+ "dataSource": {
1162
+ "const": "supplied events"
1163
+ },
1164
+ "caveats": {
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string"
1168
+ }
1169
+ }
1170
+ },
1171
+ "required": [
1172
+ "value",
1173
+ "unit",
1174
+ "sampleSize",
1175
+ "period",
1176
+ "dataSource",
1177
+ "caveats"
1178
+ ],
1179
+ "additionalProperties": false
1180
+ },
1181
+ "cycleTime": {
1182
+ "type": "object",
1183
+ "properties": {
1184
+ "value": {
1185
+ "type": [
1186
+ "number",
1187
+ "null"
1188
+ ],
1189
+ "minimum": 0
1190
+ },
1191
+ "unit": {
1192
+ "const": "hours"
1193
+ },
1194
+ "sampleSize": {
1195
+ "type": "integer",
1196
+ "minimum": 0
1197
+ },
1198
+ "period": {
1199
+ "type": "object",
1200
+ "properties": {
1201
+ "since": {
1202
+ "type": "string",
1203
+ "format": "date-time"
1204
+ },
1205
+ "until": {
1206
+ "type": "string",
1207
+ "format": "date-time"
1208
+ }
1209
+ },
1210
+ "required": [
1211
+ "since",
1212
+ "until"
1213
+ ],
1214
+ "additionalProperties": false
1215
+ },
1216
+ "dataSource": {
1217
+ "const": "supplied events"
1218
+ },
1219
+ "caveats": {
1220
+ "type": "array",
1221
+ "items": {
1222
+ "type": "string"
1223
+ }
1224
+ }
1225
+ },
1226
+ "required": [
1227
+ "value",
1228
+ "unit",
1229
+ "sampleSize",
1230
+ "period",
1231
+ "dataSource",
1232
+ "caveats"
1233
+ ],
1234
+ "additionalProperties": false
1235
+ },
1236
+ "throughput": {
1237
+ "type": "object",
1238
+ "properties": {
1239
+ "value": {
1240
+ "type": [
1241
+ "number",
1242
+ "null"
1243
+ ],
1244
+ "minimum": 0
1245
+ },
1246
+ "unit": {
1247
+ "const": "items/week"
1248
+ },
1249
+ "sampleSize": {
1250
+ "type": "integer",
1251
+ "minimum": 0
1252
+ },
1253
+ "period": {
1254
+ "type": "object",
1255
+ "properties": {
1256
+ "since": {
1257
+ "type": "string",
1258
+ "format": "date-time"
1259
+ },
1260
+ "until": {
1261
+ "type": "string",
1262
+ "format": "date-time"
1263
+ }
1264
+ },
1265
+ "required": [
1266
+ "since",
1267
+ "until"
1268
+ ],
1269
+ "additionalProperties": false
1270
+ },
1271
+ "dataSource": {
1272
+ "const": "supplied events"
1273
+ },
1274
+ "caveats": {
1275
+ "type": "array",
1276
+ "items": {
1277
+ "type": "string"
1278
+ }
1279
+ }
1280
+ },
1281
+ "required": [
1282
+ "value",
1283
+ "unit",
1284
+ "sampleSize",
1285
+ "period",
1286
+ "dataSource",
1287
+ "caveats"
1288
+ ],
1289
+ "additionalProperties": false
1290
+ },
1291
+ "wip": {
1292
+ "type": "object",
1293
+ "properties": {
1294
+ "value": {
1295
+ "type": [
1296
+ "number",
1297
+ "null"
1298
+ ],
1299
+ "minimum": 0
1300
+ },
1301
+ "unit": {
1302
+ "const": "items at period end"
1303
+ },
1304
+ "sampleSize": {
1305
+ "type": "integer",
1306
+ "minimum": 0
1307
+ },
1308
+ "period": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "since": {
1312
+ "type": "string",
1313
+ "format": "date-time"
1314
+ },
1315
+ "until": {
1316
+ "type": "string",
1317
+ "format": "date-time"
1318
+ }
1319
+ },
1320
+ "required": [
1321
+ "since",
1322
+ "until"
1323
+ ],
1324
+ "additionalProperties": false
1325
+ },
1326
+ "dataSource": {
1327
+ "const": "supplied events"
1328
+ },
1329
+ "caveats": {
1330
+ "type": "array",
1331
+ "items": {
1332
+ "type": "string"
1333
+ }
1334
+ }
1335
+ },
1336
+ "required": [
1337
+ "value",
1338
+ "unit",
1339
+ "sampleSize",
1340
+ "period",
1341
+ "dataSource",
1342
+ "caveats"
1343
+ ],
1344
+ "additionalProperties": false
1345
+ },
1346
+ "flowEfficiency": {
1347
+ "type": "object",
1348
+ "properties": {
1349
+ "value": {
1350
+ "type": [
1351
+ "number",
1352
+ "null"
1353
+ ],
1354
+ "minimum": 0,
1355
+ "maximum": 100
1356
+ },
1357
+ "unit": {
1358
+ "const": "percent"
1359
+ },
1360
+ "sampleSize": {
1361
+ "type": "integer",
1362
+ "minimum": 0
1363
+ },
1364
+ "period": {
1365
+ "type": "object",
1366
+ "properties": {
1367
+ "since": {
1368
+ "type": "string",
1369
+ "format": "date-time"
1370
+ },
1371
+ "until": {
1372
+ "type": "string",
1373
+ "format": "date-time"
1374
+ }
1375
+ },
1376
+ "required": [
1377
+ "since",
1378
+ "until"
1379
+ ],
1380
+ "additionalProperties": false
1381
+ },
1382
+ "dataSource": {
1383
+ "const": "supplied events"
1384
+ },
1385
+ "caveats": {
1386
+ "type": "array",
1387
+ "items": {
1388
+ "type": "string"
1389
+ }
1390
+ }
1391
+ },
1392
+ "required": [
1393
+ "value",
1394
+ "unit",
1395
+ "sampleSize",
1396
+ "period",
1397
+ "dataSource",
1398
+ "caveats"
1399
+ ],
1400
+ "additionalProperties": false
1401
+ },
1402
+ "prReviewTime": {
1403
+ "type": "object",
1404
+ "properties": {
1405
+ "value": {
1406
+ "type": [
1407
+ "number",
1408
+ "null"
1409
+ ],
1410
+ "minimum": 0
1411
+ },
1412
+ "unit": {
1413
+ "const": "hours"
1414
+ },
1415
+ "sampleSize": {
1416
+ "type": "integer",
1417
+ "minimum": 0
1418
+ },
1419
+ "period": {
1420
+ "type": "object",
1421
+ "properties": {
1422
+ "since": {
1423
+ "type": "string",
1424
+ "format": "date-time"
1425
+ },
1426
+ "until": {
1427
+ "type": "string",
1428
+ "format": "date-time"
1429
+ }
1430
+ },
1431
+ "required": [
1432
+ "since",
1433
+ "until"
1434
+ ],
1435
+ "additionalProperties": false
1436
+ },
1437
+ "dataSource": {
1438
+ "const": "supplied events"
1439
+ },
1440
+ "caveats": {
1441
+ "type": "array",
1442
+ "items": {
1443
+ "type": "string"
1444
+ }
1445
+ }
1446
+ },
1447
+ "required": [
1448
+ "value",
1449
+ "unit",
1450
+ "sampleSize",
1451
+ "period",
1452
+ "dataSource",
1453
+ "caveats"
1454
+ ],
1455
+ "additionalProperties": false
1456
+ },
1457
+ "prSize": {
1458
+ "type": "object",
1459
+ "properties": {
1460
+ "value": {
1461
+ "type": [
1462
+ "number",
1463
+ "null"
1464
+ ],
1465
+ "minimum": 0
1466
+ },
1467
+ "unit": {
1468
+ "const": "changed lines"
1469
+ },
1470
+ "sampleSize": {
1471
+ "type": "integer",
1472
+ "minimum": 0
1473
+ },
1474
+ "period": {
1475
+ "type": "object",
1476
+ "properties": {
1477
+ "since": {
1478
+ "type": "string",
1479
+ "format": "date-time"
1480
+ },
1481
+ "until": {
1482
+ "type": "string",
1483
+ "format": "date-time"
1484
+ }
1485
+ },
1486
+ "required": [
1487
+ "since",
1488
+ "until"
1489
+ ],
1490
+ "additionalProperties": false
1491
+ },
1492
+ "dataSource": {
1493
+ "const": "supplied events"
1494
+ },
1495
+ "caveats": {
1496
+ "type": "array",
1497
+ "items": {
1498
+ "type": "string"
1499
+ }
1500
+ }
1501
+ },
1502
+ "required": [
1503
+ "value",
1504
+ "unit",
1505
+ "sampleSize",
1506
+ "period",
1507
+ "dataSource",
1508
+ "caveats"
1509
+ ],
1510
+ "additionalProperties": false
1511
+ }
1512
+ },
1513
+ "required": [
1514
+ "deploymentFrequency",
1515
+ "changeLeadTime",
1516
+ "changeFailRate",
1517
+ "failedDeploymentRecoveryTime",
1518
+ "deploymentReworkRate",
1519
+ "cycleTime",
1520
+ "throughput",
1521
+ "wip",
1522
+ "flowEfficiency",
1523
+ "prReviewTime",
1524
+ "prSize"
1525
+ ],
1526
+ "additionalProperties": false
1527
+ },
1528
+ "caveats": {
1529
+ "type": "array",
1530
+ "items": {
1531
+ "type": "string"
1532
+ }
1533
+ }
1534
+ },
1535
+ "required": [
1536
+ "period",
1537
+ "metrics",
1538
+ "caveats"
1539
+ ],
1540
+ "additionalProperties": false
1541
+ },
1542
+ "interaction": {
1543
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1544
+ "$id": "https://kit.tenhaw.com/schemas/interaction.schema.json",
1545
+ "type": "object",
1546
+ "properties": {
1547
+ "from": {
1548
+ "type": "string",
1549
+ "minLength": 1
1550
+ },
1551
+ "to": {
1552
+ "type": "string",
1553
+ "minLength": 1
1554
+ },
1555
+ "mode": {
1556
+ "type": "string",
1557
+ "enum": [
1558
+ "collaboration",
1559
+ "X-as-a-Service",
1560
+ "facilitating"
1561
+ ]
1562
+ }
1563
+ },
1564
+ "required": [
1565
+ "from",
1566
+ "to",
1567
+ "mode"
1568
+ ],
1569
+ "additionalProperties": false
1570
+ },
1571
+ "okr": {
1572
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1573
+ "$id": "https://kit.tenhaw.com/schemas/okr.schema.json",
1574
+ "type": "object",
1575
+ "properties": {
1576
+ "id": {
1577
+ "type": "string",
1578
+ "minLength": 1
1579
+ },
1580
+ "objective": {
1581
+ "type": "string",
1582
+ "minLength": 1
1583
+ },
1584
+ "teamId": {
1585
+ "type": "string",
1586
+ "minLength": 1
1587
+ },
1588
+ "keyResults": {
1589
+ "type": "array",
1590
+ "items": {
1591
+ "type": "object",
1592
+ "properties": {
1593
+ "id": {
1594
+ "type": "string",
1595
+ "minLength": 1
1596
+ },
1597
+ "description": {
1598
+ "type": "string",
1599
+ "minLength": 1
1600
+ },
1601
+ "baseline": {
1602
+ "type": "number"
1603
+ },
1604
+ "target": {
1605
+ "type": "number"
1606
+ },
1607
+ "current": {
1608
+ "type": "number"
1609
+ },
1610
+ "confidence": {
1611
+ "type": "number",
1612
+ "minimum": 0,
1613
+ "maximum": 1
1614
+ }
1615
+ },
1616
+ "required": [
1617
+ "id",
1618
+ "description",
1619
+ "baseline",
1620
+ "target",
1621
+ "current",
1622
+ "confidence"
1623
+ ],
1624
+ "additionalProperties": false
1625
+ }
1626
+ }
1627
+ },
1628
+ "required": [
1629
+ "id",
1630
+ "objective",
1631
+ "keyResults"
1632
+ ],
1633
+ "additionalProperties": false
1634
+ },
1635
+ "opmodel-report": {
1636
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1637
+ "$id": "https://kit.tenhaw.com/schemas/opmodel-report.schema.json",
1638
+ "type": "object",
1639
+ "properties": {
1640
+ "model": {
1641
+ "type": "object",
1642
+ "properties": {
1643
+ "teams": {
1644
+ "type": "array",
1645
+ "items": {
1646
+ "type": "object",
1647
+ "properties": {
1648
+ "id": {
1649
+ "type": "string",
1650
+ "minLength": 1
1651
+ },
1652
+ "name": {
1653
+ "type": "string",
1654
+ "minLength": 1
1655
+ },
1656
+ "type": {
1657
+ "type": "string",
1658
+ "enum": [
1659
+ "stream-aligned",
1660
+ "platform",
1661
+ "enabling",
1662
+ "complicated-subsystem"
1663
+ ]
1664
+ },
1665
+ "size": {
1666
+ "type": "integer",
1667
+ "minimum": 1
1668
+ },
1669
+ "cognitiveLoad": {
1670
+ "type": "string",
1671
+ "enum": [
1672
+ "low",
1673
+ "medium",
1674
+ "high"
1675
+ ]
1676
+ },
1677
+ "platformDependencies": {
1678
+ "type": "array",
1679
+ "items": {
1680
+ "type": "string",
1681
+ "minLength": 1
1682
+ }
1683
+ }
1684
+ },
1685
+ "required": [
1686
+ "id",
1687
+ "name",
1688
+ "type",
1689
+ "size"
1690
+ ],
1691
+ "additionalProperties": false
1692
+ }
1693
+ },
1694
+ "okrs": {
1695
+ "type": "array",
1696
+ "items": {
1697
+ "type": "object",
1698
+ "properties": {
1699
+ "id": {
1700
+ "type": "string",
1701
+ "minLength": 1
1702
+ },
1703
+ "objective": {
1704
+ "type": "string",
1705
+ "minLength": 1
1706
+ },
1707
+ "teamId": {
1708
+ "type": "string",
1709
+ "minLength": 1
1710
+ },
1711
+ "keyResults": {
1712
+ "type": "array",
1713
+ "items": {
1714
+ "type": "object",
1715
+ "properties": {
1716
+ "id": {
1717
+ "type": "string",
1718
+ "minLength": 1
1719
+ },
1720
+ "description": {
1721
+ "type": "string",
1722
+ "minLength": 1
1723
+ },
1724
+ "baseline": {
1725
+ "type": "number"
1726
+ },
1727
+ "target": {
1728
+ "type": "number"
1729
+ },
1730
+ "current": {
1731
+ "type": "number"
1732
+ },
1733
+ "confidence": {
1734
+ "type": "number",
1735
+ "minimum": 0,
1736
+ "maximum": 1
1737
+ },
1738
+ "progress": {
1739
+ "type": "number"
1740
+ }
1741
+ },
1742
+ "required": [
1743
+ "id",
1744
+ "description",
1745
+ "baseline",
1746
+ "target",
1747
+ "current",
1748
+ "confidence",
1749
+ "progress"
1750
+ ],
1751
+ "additionalProperties": false
1752
+ }
1753
+ }
1754
+ },
1755
+ "required": [
1756
+ "id",
1757
+ "objective",
1758
+ "keyResults"
1759
+ ],
1760
+ "additionalProperties": false
1761
+ }
1762
+ },
1763
+ "roadmap": {
1764
+ "type": "array",
1765
+ "items": {
1766
+ "type": "object",
1767
+ "properties": {
1768
+ "id": {
1769
+ "type": "string",
1770
+ "minLength": 1
1771
+ },
1772
+ "title": {
1773
+ "type": "string",
1774
+ "minLength": 1
1775
+ },
1776
+ "horizon": {
1777
+ "type": "string",
1778
+ "enum": [
1779
+ "now",
1780
+ "next",
1781
+ "later"
1782
+ ]
1783
+ },
1784
+ "outcome": {
1785
+ "type": "string"
1786
+ },
1787
+ "teamId": {
1788
+ "type": "string",
1789
+ "minLength": 1
1790
+ },
1791
+ "okrId": {
1792
+ "type": "string",
1793
+ "minLength": 1
1794
+ }
1795
+ },
1796
+ "required": [
1797
+ "id",
1798
+ "title",
1799
+ "horizon"
1800
+ ],
1801
+ "additionalProperties": false
1802
+ }
1803
+ },
1804
+ "interactions": {
1805
+ "type": "array",
1806
+ "items": {
1807
+ "type": "object",
1808
+ "properties": {
1809
+ "from": {
1810
+ "type": "string",
1811
+ "minLength": 1
1812
+ },
1813
+ "to": {
1814
+ "type": "string",
1815
+ "minLength": 1
1816
+ },
1817
+ "mode": {
1818
+ "type": "string",
1819
+ "enum": [
1820
+ "collaboration",
1821
+ "X-as-a-Service",
1822
+ "facilitating"
1823
+ ]
1824
+ }
1825
+ },
1826
+ "required": [
1827
+ "from",
1828
+ "to",
1829
+ "mode"
1830
+ ],
1831
+ "additionalProperties": false
1832
+ }
1833
+ },
1834
+ "products": {
1835
+ "type": "array",
1836
+ "items": {
1837
+ "type": "object",
1838
+ "properties": {
1839
+ "id": {
1840
+ "type": "string",
1841
+ "minLength": 1
1842
+ },
1843
+ "name": {
1844
+ "type": "string",
1845
+ "minLength": 1
1846
+ }
1847
+ },
1848
+ "required": [
1849
+ "id",
1850
+ "name"
1851
+ ],
1852
+ "additionalProperties": false
1853
+ }
1854
+ }
1855
+ },
1856
+ "required": [
1857
+ "teams",
1858
+ "okrs",
1859
+ "roadmap",
1860
+ "interactions",
1861
+ "products"
1862
+ ],
1863
+ "additionalProperties": false
1864
+ },
1865
+ "checks": {
1866
+ "type": "array",
1867
+ "items": {
1868
+ "type": "object",
1869
+ "properties": {
1870
+ "code": {
1871
+ "type": "string"
1872
+ },
1873
+ "entityId": {
1874
+ "type": "string"
1875
+ },
1876
+ "message": {
1877
+ "type": "string"
1878
+ }
1879
+ },
1880
+ "required": [
1881
+ "code",
1882
+ "entityId",
1883
+ "message"
1884
+ ],
1885
+ "additionalProperties": false
1886
+ }
1887
+ },
1888
+ "limitations": {
1889
+ "type": "array",
1890
+ "items": {
1891
+ "type": "string"
1892
+ }
1893
+ },
1894
+ "sources": {
1895
+ "type": "array",
1896
+ "items": {
1897
+ "type": "string"
1898
+ }
1899
+ }
1900
+ },
1901
+ "required": [
1902
+ "model",
1903
+ "checks",
1904
+ "limitations",
1905
+ "sources"
1906
+ ],
1907
+ "additionalProperties": false
1908
+ },
1909
+ "opmodel": {
1910
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1911
+ "$id": "https://kit.tenhaw.com/schemas/opmodel.schema.json",
1912
+ "type": "object",
1913
+ "properties": {
1914
+ "teams": {
1915
+ "type": "array",
1916
+ "items": {
1917
+ "type": "object",
1918
+ "properties": {
1919
+ "id": {
1920
+ "type": "string",
1921
+ "minLength": 1
1922
+ },
1923
+ "name": {
1924
+ "type": "string",
1925
+ "minLength": 1
1926
+ },
1927
+ "type": {
1928
+ "type": "string",
1929
+ "enum": [
1930
+ "stream-aligned",
1931
+ "platform",
1932
+ "enabling",
1933
+ "complicated-subsystem"
1934
+ ]
1935
+ },
1936
+ "size": {
1937
+ "type": "integer",
1938
+ "minimum": 1
1939
+ },
1940
+ "cognitiveLoad": {
1941
+ "type": "string",
1942
+ "enum": [
1943
+ "low",
1944
+ "medium",
1945
+ "high"
1946
+ ]
1947
+ },
1948
+ "platformDependencies": {
1949
+ "type": "array",
1950
+ "items": {
1951
+ "type": "string",
1952
+ "minLength": 1
1953
+ }
1954
+ }
1955
+ },
1956
+ "required": [
1957
+ "id",
1958
+ "name",
1959
+ "type",
1960
+ "size"
1961
+ ],
1962
+ "additionalProperties": false
1963
+ }
1964
+ },
1965
+ "okrs": {
1966
+ "type": "array",
1967
+ "items": {
1968
+ "type": "object",
1969
+ "properties": {
1970
+ "id": {
1971
+ "type": "string",
1972
+ "minLength": 1
1973
+ },
1974
+ "objective": {
1975
+ "type": "string",
1976
+ "minLength": 1
1977
+ },
1978
+ "teamId": {
1979
+ "type": "string",
1980
+ "minLength": 1
1981
+ },
1982
+ "keyResults": {
1983
+ "type": "array",
1984
+ "items": {
1985
+ "type": "object",
1986
+ "properties": {
1987
+ "id": {
1988
+ "type": "string",
1989
+ "minLength": 1
1990
+ },
1991
+ "description": {
1992
+ "type": "string",
1993
+ "minLength": 1
1994
+ },
1995
+ "baseline": {
1996
+ "type": "number"
1997
+ },
1998
+ "target": {
1999
+ "type": "number"
2000
+ },
2001
+ "current": {
2002
+ "type": "number"
2003
+ },
2004
+ "confidence": {
2005
+ "type": "number",
2006
+ "minimum": 0,
2007
+ "maximum": 1
2008
+ }
2009
+ },
2010
+ "required": [
2011
+ "id",
2012
+ "description",
2013
+ "baseline",
2014
+ "target",
2015
+ "current",
2016
+ "confidence"
2017
+ ],
2018
+ "additionalProperties": false
2019
+ }
2020
+ }
2021
+ },
2022
+ "required": [
2023
+ "id",
2024
+ "objective",
2025
+ "keyResults"
2026
+ ],
2027
+ "additionalProperties": false
2028
+ }
2029
+ },
2030
+ "roadmap": {
2031
+ "type": "array",
2032
+ "items": {
2033
+ "type": "object",
2034
+ "properties": {
2035
+ "id": {
2036
+ "type": "string",
2037
+ "minLength": 1
2038
+ },
2039
+ "title": {
2040
+ "type": "string",
2041
+ "minLength": 1
2042
+ },
2043
+ "horizon": {
2044
+ "type": "string",
2045
+ "enum": [
2046
+ "now",
2047
+ "next",
2048
+ "later"
2049
+ ]
2050
+ },
2051
+ "outcome": {
2052
+ "type": "string"
2053
+ },
2054
+ "teamId": {
2055
+ "type": "string",
2056
+ "minLength": 1
2057
+ },
2058
+ "okrId": {
2059
+ "type": "string",
2060
+ "minLength": 1
2061
+ }
2062
+ },
2063
+ "required": [
2064
+ "id",
2065
+ "title",
2066
+ "horizon"
2067
+ ],
2068
+ "additionalProperties": false
2069
+ }
2070
+ },
2071
+ "interactions": {
2072
+ "type": "array",
2073
+ "items": {
2074
+ "type": "object",
2075
+ "properties": {
2076
+ "from": {
2077
+ "type": "string",
2078
+ "minLength": 1
2079
+ },
2080
+ "to": {
2081
+ "type": "string",
2082
+ "minLength": 1
2083
+ },
2084
+ "mode": {
2085
+ "type": "string",
2086
+ "enum": [
2087
+ "collaboration",
2088
+ "X-as-a-Service",
2089
+ "facilitating"
2090
+ ]
2091
+ }
2092
+ },
2093
+ "required": [
2094
+ "from",
2095
+ "to",
2096
+ "mode"
2097
+ ],
2098
+ "additionalProperties": false
2099
+ }
2100
+ },
2101
+ "products": {
2102
+ "type": "array",
2103
+ "items": {
2104
+ "type": "object",
2105
+ "properties": {
2106
+ "id": {
2107
+ "type": "string",
2108
+ "minLength": 1
2109
+ },
2110
+ "name": {
2111
+ "type": "string",
2112
+ "minLength": 1
2113
+ }
2114
+ },
2115
+ "required": [
2116
+ "id",
2117
+ "name"
2118
+ ],
2119
+ "additionalProperties": false
2120
+ }
2121
+ }
2122
+ },
2123
+ "required": [
2124
+ "teams"
2125
+ ],
2126
+ "additionalProperties": false
2127
+ },
2128
+ "project-cost-input": {
2129
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2130
+ "$id": "https://kit.tenhaw.com/schemas/project-cost-input.schema.json",
2131
+ "type": "object",
2132
+ "properties": {
2133
+ "stage": {
2134
+ "enum": [
2135
+ "poc",
2136
+ "pilot",
2137
+ "production"
2138
+ ]
2139
+ },
2140
+ "people": {
2141
+ "type": "number",
2142
+ "exclusiveMinimum": 0
2143
+ },
2144
+ "durationWeeks": {
2145
+ "type": "number",
2146
+ "exclusiveMinimum": 0
2147
+ },
2148
+ "dayRate": {
2149
+ "type": "number",
2150
+ "exclusiveMinimum": 0
2151
+ },
2152
+ "currency": {
2153
+ "type": "string",
2154
+ "pattern": "^[A-Z]{3}$"
2155
+ }
2156
+ },
2157
+ "required": [
2158
+ "stage"
2159
+ ],
2160
+ "additionalProperties": false
2161
+ },
2162
+ "project-cost-report": {
2163
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2164
+ "$id": "https://kit.tenhaw.com/schemas/project-cost-report.schema.json",
2165
+ "type": "object",
2166
+ "properties": {
2167
+ "stage": {
2168
+ "enum": [
2169
+ "poc",
2170
+ "pilot",
2171
+ "production"
2172
+ ]
2173
+ },
2174
+ "currency": {
2175
+ "type": "string"
2176
+ },
2177
+ "low": {
2178
+ "type": "number",
2179
+ "minimum": 0
2180
+ },
2181
+ "high": {
2182
+ "type": "number",
2183
+ "minimum": 0
2184
+ },
2185
+ "assumptions": {
2186
+ "type": "object",
2187
+ "properties": {
2188
+ "people": {
2189
+ "type": "number",
2190
+ "minimum": 0
2191
+ },
2192
+ "dayRate": {
2193
+ "type": "number",
2194
+ "minimum": 0
2195
+ },
2196
+ "workingDaysPerWeek": {
2197
+ "const": 5
2198
+ },
2199
+ "weeksLow": {
2200
+ "type": "number",
2201
+ "minimum": 0
2202
+ },
2203
+ "weeksHigh": {
2204
+ "type": "number",
2205
+ "minimum": 0
2206
+ }
2207
+ },
2208
+ "required": [
2209
+ "people",
2210
+ "dayRate",
2211
+ "workingDaysPerWeek",
2212
+ "weeksLow",
2213
+ "weeksHigh"
2214
+ ],
2215
+ "additionalProperties": false
2216
+ },
2217
+ "limitations": {
2218
+ "type": "array",
2219
+ "items": {
2220
+ "type": "string"
2221
+ }
2222
+ }
2223
+ },
2224
+ "required": [
2225
+ "stage",
2226
+ "currency",
2227
+ "low",
2228
+ "high",
2229
+ "assumptions",
2230
+ "limitations"
2231
+ ],
2232
+ "additionalProperties": false
2233
+ },
2234
+ "readiness-questionnaire": {
2235
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2236
+ "$id": "https://kit.tenhaw.com/schemas/readiness-questionnaire.schema.json",
2237
+ "type": "object",
2238
+ "properties": {
2239
+ "version": {
2240
+ "const": "v1"
2241
+ },
2242
+ "dimensions": {
2243
+ "type": "array",
2244
+ "items": {
2245
+ "type": "object"
2246
+ },
2247
+ "minItems": 6,
2248
+ "maxItems": 6
2249
+ },
2250
+ "bands": {
2251
+ "type": "array",
2252
+ "items": {
2253
+ "type": "object"
2254
+ }
2255
+ },
2256
+ "minimumBandCoverage": {
2257
+ "const": 0.8
2258
+ },
2259
+ "limitations": {
2260
+ "type": "array",
2261
+ "items": {
2262
+ "type": "string"
2263
+ }
2264
+ },
2265
+ "contentCredit": {
2266
+ "const": "Tenhaw AI Readiness Framework, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), https://tenhaw.com."
2267
+ }
2268
+ },
2269
+ "required": [
2270
+ "version",
2271
+ "dimensions",
2272
+ "bands",
2273
+ "minimumBandCoverage",
2274
+ "limitations",
2275
+ "contentCredit"
2276
+ ],
2277
+ "additionalProperties": false
2278
+ },
2279
+ "readiness-report": {
2280
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2281
+ "$id": "https://kit.tenhaw.com/schemas/readiness-report.schema.json",
2282
+ "type": "object",
2283
+ "properties": {
2284
+ "frameworkVersion": {
2285
+ "const": "v1"
2286
+ },
2287
+ "overall": {
2288
+ "type": [
2289
+ "number",
2290
+ "null"
2291
+ ],
2292
+ "minimum": 1,
2293
+ "maximum": 5
2294
+ },
2295
+ "band": {
2296
+ "type": [
2297
+ "string",
2298
+ "null"
2299
+ ],
2300
+ "enum": [
2301
+ "Exploring",
2302
+ "Experimenting",
2303
+ "Scaling",
2304
+ "Embedded",
2305
+ "Leading",
2306
+ null
2307
+ ]
2308
+ },
2309
+ "coverage": {
2310
+ "type": "number",
2311
+ "minimum": 0,
2312
+ "maximum": 1
2313
+ },
2314
+ "dimensions": {
2315
+ "type": "array",
2316
+ "items": {
2317
+ "type": "object",
2318
+ "properties": {
2319
+ "id": {
2320
+ "type": "string"
2321
+ },
2322
+ "label": {
2323
+ "type": "string"
2324
+ },
2325
+ "weight": {
2326
+ "type": "number",
2327
+ "minimum": 0,
2328
+ "maximum": 1
2329
+ },
2330
+ "score": {
2331
+ "type": [
2332
+ "number",
2333
+ "null"
2334
+ ],
2335
+ "minimum": 1,
2336
+ "maximum": 5
2337
+ },
2338
+ "answered": {
2339
+ "type": "integer",
2340
+ "minimum": 0
2341
+ },
2342
+ "total": {
2343
+ "const": 5
2344
+ },
2345
+ "coverage": {
2346
+ "type": "number",
2347
+ "minimum": 0,
2348
+ "maximum": 1
2349
+ }
2350
+ },
2351
+ "required": [
2352
+ "id",
2353
+ "label",
2354
+ "weight",
2355
+ "score",
2356
+ "answered",
2357
+ "total",
2358
+ "coverage"
2359
+ ],
2360
+ "additionalProperties": false
2361
+ },
2362
+ "minItems": 6,
2363
+ "maxItems": 6
2364
+ },
2365
+ "gaps": {
2366
+ "type": "array",
2367
+ "items": {
2368
+ "type": "object",
2369
+ "properties": {
2370
+ "questionId": {
2371
+ "type": "string"
2372
+ },
2373
+ "dimensionId": {
2374
+ "type": "string"
2375
+ },
2376
+ "score": {
2377
+ "type": "integer",
2378
+ "minimum": 1,
2379
+ "maximum": 2
2380
+ },
2381
+ "priority": {
2382
+ "type": "number",
2383
+ "minimum": 0
2384
+ },
2385
+ "recommendation": {
2386
+ "type": "string"
2387
+ }
2388
+ },
2389
+ "required": [
2390
+ "questionId",
2391
+ "dimensionId",
2392
+ "score",
2393
+ "priority",
2394
+ "recommendation"
2395
+ ],
2396
+ "additionalProperties": false
2397
+ }
2398
+ },
2399
+ "recommendations": {
2400
+ "type": "array",
2401
+ "items": {
2402
+ "type": "object",
2403
+ "properties": {
2404
+ "questionId": {
2405
+ "type": "string"
2406
+ },
2407
+ "action": {
2408
+ "type": "string"
2409
+ }
2410
+ },
2411
+ "required": [
2412
+ "questionId",
2413
+ "action"
2414
+ ],
2415
+ "additionalProperties": false
2416
+ }
2417
+ },
2418
+ "limitations": {
2419
+ "type": "array",
2420
+ "items": {
2421
+ "type": "string"
2422
+ }
2423
+ },
2424
+ "contentCredit": {
2425
+ "const": "Tenhaw AI Readiness Framework, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/), https://tenhaw.com."
2426
+ }
2427
+ },
2428
+ "required": [
2429
+ "frameworkVersion",
2430
+ "overall",
2431
+ "band",
2432
+ "coverage",
2433
+ "dimensions",
2434
+ "gaps",
2435
+ "recommendations",
2436
+ "limitations",
2437
+ "contentCredit"
2438
+ ],
2439
+ "additionalProperties": false
2440
+ },
2441
+ "readiness-response": {
2442
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2443
+ "$id": "https://kit.tenhaw.com/schemas/readiness-response.schema.json",
2444
+ "type": "object",
2445
+ "properties": {
2446
+ "answers": {
2447
+ "type": "array",
2448
+ "items": {
2449
+ "type": "object",
2450
+ "properties": {
2451
+ "questionId": {
2452
+ "type": "string",
2453
+ "pattern": "^(strategy|data|technology|people|governance|delivery)-[1-5]$"
2454
+ },
2455
+ "score": {
2456
+ "type": "integer",
2457
+ "minimum": 1,
2458
+ "maximum": 5
2459
+ },
2460
+ "evidence": {
2461
+ "type": "string"
2462
+ }
2463
+ },
2464
+ "required": [
2465
+ "questionId",
2466
+ "score"
2467
+ ],
2468
+ "additionalProperties": false
2469
+ },
2470
+ "maxItems": 30
2471
+ }
2472
+ },
2473
+ "required": [
2474
+ "answers"
2475
+ ],
2476
+ "additionalProperties": false
2477
+ },
2478
+ "roadmap-item": {
2479
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2480
+ "$id": "https://kit.tenhaw.com/schemas/roadmap-item.schema.json",
2481
+ "type": "object",
2482
+ "properties": {
2483
+ "id": {
2484
+ "type": "string",
2485
+ "minLength": 1
2486
+ },
2487
+ "title": {
2488
+ "type": "string",
2489
+ "minLength": 1
2490
+ },
2491
+ "horizon": {
2492
+ "type": "string",
2493
+ "enum": [
2494
+ "now",
2495
+ "next",
2496
+ "later"
2497
+ ]
2498
+ },
2499
+ "outcome": {
2500
+ "type": "string"
2501
+ },
2502
+ "teamId": {
2503
+ "type": "string",
2504
+ "minLength": 1
2505
+ },
2506
+ "okrId": {
2507
+ "type": "string",
2508
+ "minLength": 1
2509
+ }
2510
+ },
2511
+ "required": [
2512
+ "id",
2513
+ "title",
2514
+ "horizon"
2515
+ ],
2516
+ "additionalProperties": false
2517
+ },
2518
+ "roi-input": {
2519
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2520
+ "$id": "https://kit.tenhaw.com/schemas/roi-input.schema.json",
2521
+ "type": "object",
2522
+ "properties": {
2523
+ "useCase": {
2524
+ "type": "string",
2525
+ "minLength": 1
2526
+ },
2527
+ "users": {
2528
+ "type": "number",
2529
+ "minimum": 0
2530
+ },
2531
+ "minutesPerTask": {
2532
+ "type": "number",
2533
+ "minimum": 0
2534
+ },
2535
+ "tasksPerUserPerMonth": {
2536
+ "type": "number",
2537
+ "minimum": 0
2538
+ },
2539
+ "savings": {
2540
+ "type": "object",
2541
+ "properties": {
2542
+ "low": {
2543
+ "type": "number",
2544
+ "minimum": 0,
2545
+ "maximum": 1
2546
+ },
2547
+ "base": {
2548
+ "type": "number",
2549
+ "minimum": 0,
2550
+ "maximum": 1
2551
+ },
2552
+ "high": {
2553
+ "type": "number",
2554
+ "minimum": 0,
2555
+ "maximum": 1
2556
+ }
2557
+ },
2558
+ "required": [
2559
+ "low",
2560
+ "base",
2561
+ "high"
2562
+ ],
2563
+ "additionalProperties": false
2564
+ },
2565
+ "hourlyCost": {
2566
+ "type": "number",
2567
+ "minimum": 0
2568
+ },
2569
+ "buildCost": {
2570
+ "type": "number",
2571
+ "minimum": 0
2572
+ },
2573
+ "monthlyRunCost": {
2574
+ "type": "number",
2575
+ "minimum": 0
2576
+ },
2577
+ "adoptionMonths": {
2578
+ "type": "integer",
2579
+ "minimum": 0,
2580
+ "maximum": 1200
2581
+ },
2582
+ "horizonMonths": {
2583
+ "type": "integer",
2584
+ "minimum": 1,
2585
+ "maximum": 1200
2586
+ },
2587
+ "annualDiscountRate": {
2588
+ "type": "number",
2589
+ "minimum": 0,
2590
+ "maximum": 10
2591
+ },
2592
+ "cashRealisation": {
2593
+ "type": "number",
2594
+ "minimum": 0,
2595
+ "maximum": 1
2596
+ },
2597
+ "currency": {
2598
+ "type": "string",
2599
+ "pattern": "^[A-Z]{3}$"
2600
+ }
2601
+ },
2602
+ "required": [
2603
+ "useCase",
2604
+ "users",
2605
+ "minutesPerTask",
2606
+ "tasksPerUserPerMonth",
2607
+ "savings",
2608
+ "hourlyCost",
2609
+ "buildCost",
2610
+ "monthlyRunCost",
2611
+ "adoptionMonths",
2612
+ "horizonMonths",
2613
+ "annualDiscountRate",
2614
+ "cashRealisation",
2615
+ "currency"
2616
+ ],
2617
+ "additionalProperties": false
2618
+ },
2619
+ "roi-report": {
2620
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
2621
+ "$id": "https://kit.tenhaw.com/schemas/roi-report.schema.json",
2622
+ "type": "object",
2623
+ "properties": {
2624
+ "currency": {
2625
+ "type": "string"
2626
+ },
2627
+ "assumptions": {
2628
+ "type": "object",
2629
+ "properties": {
2630
+ "cashRealisation": {
2631
+ "type": "number",
2632
+ "minimum": 0,
2633
+ "maximum": 1
2634
+ },
2635
+ "capacityIsCash": {
2636
+ "const": false
2637
+ }
2638
+ },
2639
+ "required": [
2640
+ "cashRealisation",
2641
+ "capacityIsCash"
2642
+ ],
2643
+ "additionalProperties": false
2644
+ },
2645
+ "scenarios": {
2646
+ "type": "object",
2647
+ "properties": {
2648
+ "low": {
2649
+ "type": "object",
2650
+ "properties": {
2651
+ "monthlyCashFlow": {
2652
+ "type": "array",
2653
+ "items": {
2654
+ "type": "object",
2655
+ "properties": {
2656
+ "month": {
2657
+ "type": "integer",
2658
+ "minimum": 1
2659
+ },
2660
+ "adoption": {
2661
+ "type": "number",
2662
+ "minimum": 0,
2663
+ "maximum": 1
2664
+ },
2665
+ "hoursSaved": {
2666
+ "type": "number",
2667
+ "minimum": 0
2668
+ },
2669
+ "potentialValue": {
2670
+ "type": "number",
2671
+ "minimum": 0
2672
+ },
2673
+ "cashBenefit": {
2674
+ "type": "number",
2675
+ "minimum": 0
2676
+ },
2677
+ "runCost": {
2678
+ "type": "number",
2679
+ "minimum": 0
2680
+ },
2681
+ "netCashFlow": {
2682
+ "type": "number"
2683
+ },
2684
+ "cumulativeCashFlow": {
2685
+ "type": "number"
2686
+ }
2687
+ },
2688
+ "required": [
2689
+ "month",
2690
+ "adoption",
2691
+ "hoursSaved",
2692
+ "potentialValue",
2693
+ "cashBenefit",
2694
+ "runCost",
2695
+ "netCashFlow",
2696
+ "cumulativeCashFlow"
2697
+ ],
2698
+ "additionalProperties": false
2699
+ }
2700
+ },
2701
+ "totalCashBenefit": {
2702
+ "type": "number",
2703
+ "minimum": 0
2704
+ },
2705
+ "totalRunCost": {
2706
+ "type": "number",
2707
+ "minimum": 0
2708
+ },
2709
+ "totalHoursSaved": {
2710
+ "type": "number",
2711
+ "minimum": 0
2712
+ },
2713
+ "recoveredCapacityHours": {
2714
+ "type": "number",
2715
+ "minimum": 0
2716
+ },
2717
+ "npv": {
2718
+ "type": "number"
2719
+ },
2720
+ "paybackMonth": {
2721
+ "type": [
2722
+ "integer",
2723
+ "null"
2724
+ ],
2725
+ "minimum": 0
2726
+ },
2727
+ "roiPercent": {
2728
+ "type": [
2729
+ "number",
2730
+ "null"
2731
+ ]
2732
+ },
2733
+ "costPerTask": {
2734
+ "type": [
2735
+ "number",
2736
+ "null"
2737
+ ],
2738
+ "minimum": 0
2739
+ },
2740
+ "breakEvenAdoption": {
2741
+ "type": [
2742
+ "number",
2743
+ "null"
2744
+ ],
2745
+ "minimum": 0
2746
+ }
2747
+ },
2748
+ "required": [
2749
+ "monthlyCashFlow",
2750
+ "totalCashBenefit",
2751
+ "totalRunCost",
2752
+ "totalHoursSaved",
2753
+ "recoveredCapacityHours",
2754
+ "npv",
2755
+ "paybackMonth",
2756
+ "roiPercent",
2757
+ "costPerTask",
2758
+ "breakEvenAdoption"
2759
+ ],
2760
+ "additionalProperties": false
2761
+ },
2762
+ "base": {
2763
+ "type": "object",
2764
+ "properties": {
2765
+ "monthlyCashFlow": {
2766
+ "type": "array",
2767
+ "items": {
2768
+ "type": "object",
2769
+ "properties": {
2770
+ "month": {
2771
+ "type": "integer",
2772
+ "minimum": 1
2773
+ },
2774
+ "adoption": {
2775
+ "type": "number",
2776
+ "minimum": 0,
2777
+ "maximum": 1
2778
+ },
2779
+ "hoursSaved": {
2780
+ "type": "number",
2781
+ "minimum": 0
2782
+ },
2783
+ "potentialValue": {
2784
+ "type": "number",
2785
+ "minimum": 0
2786
+ },
2787
+ "cashBenefit": {
2788
+ "type": "number",
2789
+ "minimum": 0
2790
+ },
2791
+ "runCost": {
2792
+ "type": "number",
2793
+ "minimum": 0
2794
+ },
2795
+ "netCashFlow": {
2796
+ "type": "number"
2797
+ },
2798
+ "cumulativeCashFlow": {
2799
+ "type": "number"
2800
+ }
2801
+ },
2802
+ "required": [
2803
+ "month",
2804
+ "adoption",
2805
+ "hoursSaved",
2806
+ "potentialValue",
2807
+ "cashBenefit",
2808
+ "runCost",
2809
+ "netCashFlow",
2810
+ "cumulativeCashFlow"
2811
+ ],
2812
+ "additionalProperties": false
2813
+ }
2814
+ },
2815
+ "totalCashBenefit": {
2816
+ "type": "number",
2817
+ "minimum": 0
2818
+ },
2819
+ "totalRunCost": {
2820
+ "type": "number",
2821
+ "minimum": 0
2822
+ },
2823
+ "totalHoursSaved": {
2824
+ "type": "number",
2825
+ "minimum": 0
2826
+ },
2827
+ "recoveredCapacityHours": {
2828
+ "type": "number",
2829
+ "minimum": 0
2830
+ },
2831
+ "npv": {
2832
+ "type": "number"
2833
+ },
2834
+ "paybackMonth": {
2835
+ "type": [
2836
+ "integer",
2837
+ "null"
2838
+ ],
2839
+ "minimum": 0
2840
+ },
2841
+ "roiPercent": {
2842
+ "type": [
2843
+ "number",
2844
+ "null"
2845
+ ]
2846
+ },
2847
+ "costPerTask": {
2848
+ "type": [
2849
+ "number",
2850
+ "null"
2851
+ ],
2852
+ "minimum": 0
2853
+ },
2854
+ "breakEvenAdoption": {
2855
+ "type": [
2856
+ "number",
2857
+ "null"
2858
+ ],
2859
+ "minimum": 0
2860
+ }
2861
+ },
2862
+ "required": [
2863
+ "monthlyCashFlow",
2864
+ "totalCashBenefit",
2865
+ "totalRunCost",
2866
+ "totalHoursSaved",
2867
+ "recoveredCapacityHours",
2868
+ "npv",
2869
+ "paybackMonth",
2870
+ "roiPercent",
2871
+ "costPerTask",
2872
+ "breakEvenAdoption"
2873
+ ],
2874
+ "additionalProperties": false
2875
+ },
2876
+ "high": {
2877
+ "type": "object",
2878
+ "properties": {
2879
+ "monthlyCashFlow": {
2880
+ "type": "array",
2881
+ "items": {
2882
+ "type": "object",
2883
+ "properties": {
2884
+ "month": {
2885
+ "type": "integer",
2886
+ "minimum": 1
2887
+ },
2888
+ "adoption": {
2889
+ "type": "number",
2890
+ "minimum": 0,
2891
+ "maximum": 1
2892
+ },
2893
+ "hoursSaved": {
2894
+ "type": "number",
2895
+ "minimum": 0
2896
+ },
2897
+ "potentialValue": {
2898
+ "type": "number",
2899
+ "minimum": 0
2900
+ },
2901
+ "cashBenefit": {
2902
+ "type": "number",
2903
+ "minimum": 0
2904
+ },
2905
+ "runCost": {
2906
+ "type": "number",
2907
+ "minimum": 0
2908
+ },
2909
+ "netCashFlow": {
2910
+ "type": "number"
2911
+ },
2912
+ "cumulativeCashFlow": {
2913
+ "type": "number"
2914
+ }
2915
+ },
2916
+ "required": [
2917
+ "month",
2918
+ "adoption",
2919
+ "hoursSaved",
2920
+ "potentialValue",
2921
+ "cashBenefit",
2922
+ "runCost",
2923
+ "netCashFlow",
2924
+ "cumulativeCashFlow"
2925
+ ],
2926
+ "additionalProperties": false
2927
+ }
2928
+ },
2929
+ "totalCashBenefit": {
2930
+ "type": "number",
2931
+ "minimum": 0
2932
+ },
2933
+ "totalRunCost": {
2934
+ "type": "number",
2935
+ "minimum": 0
2936
+ },
2937
+ "totalHoursSaved": {
2938
+ "type": "number",
2939
+ "minimum": 0
2940
+ },
2941
+ "recoveredCapacityHours": {
2942
+ "type": "number",
2943
+ "minimum": 0
2944
+ },
2945
+ "npv": {
2946
+ "type": "number"
2947
+ },
2948
+ "paybackMonth": {
2949
+ "type": [
2950
+ "integer",
2951
+ "null"
2952
+ ],
2953
+ "minimum": 0
2954
+ },
2955
+ "roiPercent": {
2956
+ "type": [
2957
+ "number",
2958
+ "null"
2959
+ ]
2960
+ },
2961
+ "costPerTask": {
2962
+ "type": [
2963
+ "number",
2964
+ "null"
2965
+ ],
2966
+ "minimum": 0
2967
+ },
2968
+ "breakEvenAdoption": {
2969
+ "type": [
2970
+ "number",
2971
+ "null"
2972
+ ],
2973
+ "minimum": 0
2974
+ }
2975
+ },
2976
+ "required": [
2977
+ "monthlyCashFlow",
2978
+ "totalCashBenefit",
2979
+ "totalRunCost",
2980
+ "totalHoursSaved",
2981
+ "recoveredCapacityHours",
2982
+ "npv",
2983
+ "paybackMonth",
2984
+ "roiPercent",
2985
+ "costPerTask",
2986
+ "breakEvenAdoption"
2987
+ ],
2988
+ "additionalProperties": false
2989
+ }
2990
+ },
2991
+ "required": [
2992
+ "low",
2993
+ "base",
2994
+ "high"
2995
+ ],
2996
+ "additionalProperties": false
2997
+ },
2998
+ "topDrivers": {
2999
+ "type": "array",
3000
+ "items": {
3001
+ "type": "object",
3002
+ "properties": {
3003
+ "name": {
3004
+ "type": "string"
3005
+ },
3006
+ "value": {
3007
+ "type": "number"
3008
+ }
3009
+ },
3010
+ "required": [
3011
+ "name",
3012
+ "value"
3013
+ ],
3014
+ "additionalProperties": false
3015
+ },
3016
+ "minItems": 3,
3017
+ "maxItems": 3
3018
+ },
3019
+ "limitations": {
3020
+ "type": "array",
3021
+ "items": {
3022
+ "type": "string"
3023
+ }
3024
+ }
3025
+ },
3026
+ "required": [
3027
+ "currency",
3028
+ "assumptions",
3029
+ "scenarios",
3030
+ "topDrivers",
3031
+ "limitations"
3032
+ ],
3033
+ "additionalProperties": false
3034
+ },
3035
+ "team": {
3036
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3037
+ "$id": "https://kit.tenhaw.com/schemas/team.schema.json",
3038
+ "type": "object",
3039
+ "properties": {
3040
+ "id": {
3041
+ "type": "string",
3042
+ "minLength": 1
3043
+ },
3044
+ "name": {
3045
+ "type": "string",
3046
+ "minLength": 1
3047
+ },
3048
+ "type": {
3049
+ "type": "string",
3050
+ "enum": [
3051
+ "stream-aligned",
3052
+ "platform",
3053
+ "enabling",
3054
+ "complicated-subsystem"
3055
+ ]
3056
+ },
3057
+ "size": {
3058
+ "type": "integer",
3059
+ "minimum": 1
3060
+ },
3061
+ "cognitiveLoad": {
3062
+ "type": "string",
3063
+ "enum": [
3064
+ "low",
3065
+ "medium",
3066
+ "high"
3067
+ ]
3068
+ },
3069
+ "platformDependencies": {
3070
+ "type": "array",
3071
+ "items": {
3072
+ "type": "string",
3073
+ "minLength": 1
3074
+ }
3075
+ }
3076
+ },
3077
+ "required": [
3078
+ "id",
3079
+ "name",
3080
+ "type",
3081
+ "size"
3082
+ ],
3083
+ "additionalProperties": false
3084
+ },
3085
+ "usecase-register-report": {
3086
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3087
+ "$id": "https://kit.tenhaw.com/schemas/usecase-register-report.schema.json",
3088
+ "type": "object",
3089
+ "properties": {
3090
+ "useCases": {
3091
+ "type": "array",
3092
+ "items": {
3093
+ "type": "object",
3094
+ "properties": {
3095
+ "id": {
3096
+ "type": "string",
3097
+ "minLength": 1
3098
+ },
3099
+ "title": {
3100
+ "type": "string",
3101
+ "minLength": 1
3102
+ },
3103
+ "problem": {
3104
+ "type": "string",
3105
+ "minLength": 1
3106
+ },
3107
+ "ownerRole": {
3108
+ "type": "string",
3109
+ "minLength": 1
3110
+ },
3111
+ "businessUnit": {
3112
+ "type": "string",
3113
+ "minLength": 1
3114
+ },
3115
+ "value": {
3116
+ "type": "number",
3117
+ "minimum": 0,
3118
+ "maximum": 5
3119
+ },
3120
+ "feasibility": {
3121
+ "type": "number",
3122
+ "minimum": 0,
3123
+ "maximum": 5
3124
+ },
3125
+ "riskTier": {
3126
+ "type": "string",
3127
+ "enum": [
3128
+ "prohibited",
3129
+ "high",
3130
+ "limited",
3131
+ "minimal",
3132
+ "unknown"
3133
+ ]
3134
+ },
3135
+ "status": {
3136
+ "type": "string",
3137
+ "enum": [
3138
+ "idea",
3139
+ "assessed",
3140
+ "approved",
3141
+ "PoC",
3142
+ "pilot",
3143
+ "production",
3144
+ "retired"
3145
+ ]
3146
+ },
3147
+ "dataRequired": {
3148
+ "type": "array",
3149
+ "items": {
3150
+ "type": "string"
3151
+ }
3152
+ },
3153
+ "dataSensitivity": {
3154
+ "type": "string",
3155
+ "enum": [
3156
+ "public",
3157
+ "internal",
3158
+ "confidential",
3159
+ "restricted"
3160
+ ]
3161
+ },
3162
+ "valueHypothesis": {
3163
+ "type": "string"
3164
+ },
3165
+ "valueEstimate": {
3166
+ "type": "object"
3167
+ },
3168
+ "dependencies": {
3169
+ "type": "array",
3170
+ "items": {
3171
+ "type": "string",
3172
+ "minLength": 1
3173
+ }
3174
+ },
3175
+ "kpis": {
3176
+ "type": "array",
3177
+ "items": {
3178
+ "type": "string"
3179
+ }
3180
+ },
3181
+ "reviewDate": {
3182
+ "type": "string",
3183
+ "format": "date"
3184
+ },
3185
+ "priority": {
3186
+ "type": "number",
3187
+ "minimum": 0,
3188
+ "maximum": 25
3189
+ },
3190
+ "governanceGate": {
3191
+ "enum": [
3192
+ "blocked",
3193
+ "review-required",
3194
+ "standard-review"
3195
+ ]
3196
+ }
3197
+ },
3198
+ "required": [
3199
+ "id",
3200
+ "title",
3201
+ "problem",
3202
+ "ownerRole",
3203
+ "businessUnit",
3204
+ "value",
3205
+ "feasibility",
3206
+ "riskTier",
3207
+ "status",
3208
+ "priority",
3209
+ "governanceGate"
3210
+ ],
3211
+ "additionalProperties": false
3212
+ }
3213
+ },
3214
+ "methodology": {
3215
+ "type": "string"
3216
+ },
3217
+ "limitations": {
3218
+ "type": "array",
3219
+ "items": {
3220
+ "type": "string"
3221
+ }
3222
+ }
3223
+ },
3224
+ "required": [
3225
+ "useCases",
3226
+ "methodology",
3227
+ "limitations"
3228
+ ],
3229
+ "additionalProperties": false
3230
+ },
3231
+ "usecase-register": {
3232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3233
+ "$id": "https://kit.tenhaw.com/schemas/usecase-register.schema.json",
3234
+ "type": "object",
3235
+ "properties": {
3236
+ "useCases": {
3237
+ "type": "array",
3238
+ "items": {
3239
+ "type": "object",
3240
+ "properties": {
3241
+ "id": {
3242
+ "type": "string",
3243
+ "minLength": 1
3244
+ },
3245
+ "title": {
3246
+ "type": "string",
3247
+ "minLength": 1
3248
+ },
3249
+ "problem": {
3250
+ "type": "string",
3251
+ "minLength": 1
3252
+ },
3253
+ "ownerRole": {
3254
+ "type": "string",
3255
+ "minLength": 1
3256
+ },
3257
+ "businessUnit": {
3258
+ "type": "string",
3259
+ "minLength": 1
3260
+ },
3261
+ "value": {
3262
+ "type": "number",
3263
+ "minimum": 0,
3264
+ "maximum": 5
3265
+ },
3266
+ "feasibility": {
3267
+ "type": "number",
3268
+ "minimum": 0,
3269
+ "maximum": 5
3270
+ },
3271
+ "riskTier": {
3272
+ "type": "string",
3273
+ "enum": [
3274
+ "prohibited",
3275
+ "high",
3276
+ "limited",
3277
+ "minimal",
3278
+ "unknown"
3279
+ ]
3280
+ },
3281
+ "status": {
3282
+ "type": "string",
3283
+ "enum": [
3284
+ "idea",
3285
+ "assessed",
3286
+ "approved",
3287
+ "PoC",
3288
+ "pilot",
3289
+ "production",
3290
+ "retired"
3291
+ ]
3292
+ },
3293
+ "dataRequired": {
3294
+ "type": "array",
3295
+ "items": {
3296
+ "type": "string"
3297
+ }
3298
+ },
3299
+ "dataSensitivity": {
3300
+ "type": "string",
3301
+ "enum": [
3302
+ "public",
3303
+ "internal",
3304
+ "confidential",
3305
+ "restricted"
3306
+ ]
3307
+ },
3308
+ "valueHypothesis": {
3309
+ "type": "string"
3310
+ },
3311
+ "valueEstimate": {
3312
+ "type": "object"
3313
+ },
3314
+ "dependencies": {
3315
+ "type": "array",
3316
+ "items": {
3317
+ "type": "string",
3318
+ "minLength": 1
3319
+ }
3320
+ },
3321
+ "kpis": {
3322
+ "type": "array",
3323
+ "items": {
3324
+ "type": "string"
3325
+ }
3326
+ },
3327
+ "reviewDate": {
3328
+ "type": "string",
3329
+ "format": "date"
3330
+ }
3331
+ },
3332
+ "required": [
3333
+ "id",
3334
+ "title",
3335
+ "problem",
3336
+ "ownerRole",
3337
+ "businessUnit",
3338
+ "value",
3339
+ "feasibility",
3340
+ "riskTier",
3341
+ "status"
3342
+ ],
3343
+ "additionalProperties": false
3344
+ },
3345
+ "maxItems": 1e4
3346
+ }
3347
+ },
3348
+ "required": [
3349
+ "useCases"
3350
+ ],
3351
+ "additionalProperties": false
3352
+ },
3353
+ "usecase": {
3354
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3355
+ "$id": "https://kit.tenhaw.com/schemas/usecase.schema.json",
3356
+ "type": "object",
3357
+ "properties": {
3358
+ "id": {
3359
+ "type": "string",
3360
+ "minLength": 1
3361
+ },
3362
+ "title": {
3363
+ "type": "string",
3364
+ "minLength": 1
3365
+ },
3366
+ "problem": {
3367
+ "type": "string",
3368
+ "minLength": 1
3369
+ },
3370
+ "ownerRole": {
3371
+ "type": "string",
3372
+ "minLength": 1
3373
+ },
3374
+ "businessUnit": {
3375
+ "type": "string",
3376
+ "minLength": 1
3377
+ },
3378
+ "value": {
3379
+ "type": "number",
3380
+ "minimum": 0,
3381
+ "maximum": 5
3382
+ },
3383
+ "feasibility": {
3384
+ "type": "number",
3385
+ "minimum": 0,
3386
+ "maximum": 5
3387
+ },
3388
+ "riskTier": {
3389
+ "type": "string",
3390
+ "enum": [
3391
+ "prohibited",
3392
+ "high",
3393
+ "limited",
3394
+ "minimal",
3395
+ "unknown"
3396
+ ]
3397
+ },
3398
+ "status": {
3399
+ "type": "string",
3400
+ "enum": [
3401
+ "idea",
3402
+ "assessed",
3403
+ "approved",
3404
+ "PoC",
3405
+ "pilot",
3406
+ "production",
3407
+ "retired"
3408
+ ]
3409
+ },
3410
+ "dataRequired": {
3411
+ "type": "array",
3412
+ "items": {
3413
+ "type": "string"
3414
+ }
3415
+ },
3416
+ "dataSensitivity": {
3417
+ "type": "string",
3418
+ "enum": [
3419
+ "public",
3420
+ "internal",
3421
+ "confidential",
3422
+ "restricted"
3423
+ ]
3424
+ },
3425
+ "valueHypothesis": {
3426
+ "type": "string"
3427
+ },
3428
+ "valueEstimate": {
3429
+ "type": "object"
3430
+ },
3431
+ "dependencies": {
3432
+ "type": "array",
3433
+ "items": {
3434
+ "type": "string",
3435
+ "minLength": 1
3436
+ }
3437
+ },
3438
+ "kpis": {
3439
+ "type": "array",
3440
+ "items": {
3441
+ "type": "string"
3442
+ }
3443
+ },
3444
+ "reviewDate": {
3445
+ "type": "string",
3446
+ "format": "date"
3447
+ }
3448
+ },
3449
+ "required": [
3450
+ "id",
3451
+ "title",
3452
+ "problem",
3453
+ "ownerRole",
3454
+ "businessUnit",
3455
+ "value",
3456
+ "feasibility",
3457
+ "riskTier",
3458
+ "status"
3459
+ ],
3460
+ "additionalProperties": false
3461
+ }
3462
+ };
3463
+
3464
+ // src/index.ts
3465
+ var VERSION = "0.0.0-bootstrap";
3466
+ var AUDIT_URL = "https://tenhaw.com/contact#book";
3467
+ var round = (value) => {
3468
+ invariant(Number.isFinite(value) && Number.isFinite(value * 1e6), "/", "Calculation exceeded the finite numeric range");
3469
+ return Math.round(value * 1e6) / 1e6;
3470
+ };
3471
+ var ajv = new Ajv2020({ allErrors: true, strict: false, strictNumbers: true, messages: true });
3472
+ addFormats(ajv);
3473
+ var dateTimeValidator = ajv.compile({ type: "string", format: "date-time" });
3474
+ var validators = /* @__PURE__ */ new Map();
3475
+ var ValidationError = class extends Error {
3476
+ constructor(issues) {
3477
+ super(issues.map((i) => `${i.path}: ${i.message}`).join("; "));
3478
+ this.issues = issues;
3479
+ this.name = "ValidationError";
3480
+ }
3481
+ issues;
3482
+ code = "VALIDATION_ERROR";
3483
+ };
3484
+ function validateInput(name, input) {
3485
+ const pending = [{ value: input, path: "/" }], seen = /* @__PURE__ */ new WeakSet();
3486
+ while (pending.length) {
3487
+ const { value, path } = pending.pop();
3488
+ if (typeof value === "number") invariant(Number.isFinite(value), path, "Numbers must be finite");
3489
+ else if (value && typeof value === "object" && !seen.has(value)) {
3490
+ seen.add(value);
3491
+ for (const [key, child] of Object.entries(value)) pending.push({ value: child, path: `${path === "/" ? "" : path}/${key}` });
3492
+ }
3493
+ }
3494
+ let validator = validators.get(name);
3495
+ if (!validator) {
3496
+ validator = ajv.compile(schemas[name]);
3497
+ validators.set(name, validator);
3498
+ }
3499
+ if (!validator(input)) throw new ValidationError(validator.errors.map((e) => ({ path: e.instancePath || "/", message: e.message })));
3500
+ return input;
3501
+ }
3502
+ function validateDateTime(value, path = "/date") {
3503
+ invariant(typeof value === "string" && /^(?!0000)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/i.test(value) && dateTimeValidator(value) && Number.isFinite(Date.parse(value)), path, "Use a valid RFC 3339 timestamp with timezone");
3504
+ }
3505
+ function invariant(condition, path, message) {
3506
+ if (!condition) throw new ValidationError([{ path, message }]);
3507
+ }
3508
+ function buildUtmUrl({ source, medium, content }) {
3509
+ const url = new URL(AUDIT_URL);
3510
+ url.searchParams.set("utm_source", source);
3511
+ url.searchParams.set("utm_medium", medium);
3512
+ url.searchParams.set("utm_campaign", "tenhaw-kit");
3513
+ url.searchParams.set("utm_content", content);
3514
+ return url.toString();
3515
+ }
3516
+ function escapeHtml(value) {
3517
+ return String(value).replace(/[&<>"']/g, (c) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" })[c]);
3518
+ }
3519
+ function enabled(options) {
3520
+ return options.attribution !== false && !(typeof process !== "undefined" && process.env.TENHAW_NO_ATTRIBUTION === "1");
3521
+ }
3522
+ function generator(options = {}) {
3523
+ return { generator: "Tenhaw Kit", version: VERSION, url: buildUtmUrl({ source: options.source ?? "github", medium: options.medium ?? "report", content: options.content ?? "kit" }) };
3524
+ }
3525
+ function attributionFooter(format, options = {}) {
3526
+ if (!enabled(options)) return "";
3527
+ const value = generator(options);
3528
+ const label = "Generated with Tenhaw Kit. Want help acting on this?";
3529
+ if (format === "json") return JSON.stringify(value);
3530
+ if (format === "html") return `<p>${label} <a href="${escapeHtml(value.url)}">Book an AI readiness audit</a>.</p>`;
3531
+ if (format === "md") return `${label} [Book an AI readiness audit](${value.url}).`;
3532
+ return `${label} ${value.url}`;
3533
+ }
3534
+ function renderJson(report, options = {}) {
3535
+ const body = report !== null && typeof report === "object" && !Array.isArray(report) ? report : { result: report };
3536
+ return JSON.stringify(enabled(options) ? { ...body, generator: generator(options) } : body, null, 2);
3537
+ }
3538
+ function renderMarkdown(report, options = {}) {
3539
+ const json = JSON.stringify(report, null, 2), longest = Math.max(0, ...(json.match(/`+/g) ?? []).map((s) => s.length));
3540
+ const fence = "`".repeat(Math.max(3, longest + 1));
3541
+ return `# Tenhaw Kit report
3542
+
3543
+ ${fence}json
3544
+ ${json}
3545
+ ${fence}
3546
+
3547
+ ${attributionFooter("md", options)}`.trimEnd() + "\n";
3548
+ }
3549
+ function renderHtml(report, options = {}) {
3550
+ return `<!doctype html><html lang="en-GB"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>Tenhaw Kit report</title></head><body><main><h1>Tenhaw Kit report</h1><pre style="white-space:pre-wrap;overflow-wrap:anywhere">${escapeHtml(JSON.stringify(report, null, 2))}</pre>${attributionFooter("html", options)}</main></body></html>`;
3551
+ }
3552
+ function renderReport(report, format, options = {}) {
3553
+ return format === "html" ? renderHtml(report, options) : format === "md" ? renderMarkdown(report, options) : renderJson(report, options);
3554
+ }
3555
+ function canonicalJson(value) {
3556
+ const normalise = (v) => {
3557
+ if (typeof v === "number") {
3558
+ invariant(Number.isFinite(v), "/", "Numbers must be finite");
3559
+ return round(v);
3560
+ }
3561
+ if (Array.isArray(v)) return v.map(normalise);
3562
+ if (v && typeof v === "object") return Object.fromEntries(Object.entries(v).sort(([a], [b]) => a.localeCompare(b, "en")).map(([k, x]) => [k, normalise(x)]));
3563
+ return v;
3564
+ };
3565
+ return JSON.stringify(normalise(value));
3566
+ }
3567
+ export {
3568
+ AUDIT_URL,
3569
+ VERSION,
3570
+ ValidationError,
3571
+ attributionFooter,
3572
+ buildUtmUrl,
3573
+ canonicalJson,
3574
+ escapeHtml,
3575
+ generator,
3576
+ invariant,
3577
+ renderHtml,
3578
+ renderJson,
3579
+ renderMarkdown,
3580
+ renderReport,
3581
+ round,
3582
+ schemas,
3583
+ validateDateTime,
3584
+ validateInput
3585
+ };