perttool 0.5.1 → 0.5.3

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 (36) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/README.md +58 -25
  3. package/dist/cli.js +18 -1
  4. package/dist/cli.js.map +1 -1
  5. package/dist/command/actuals-discovery.d.ts.map +1 -1
  6. package/dist/command/actuals-discovery.js +26 -4
  7. package/dist/command/actuals-discovery.js.map +1 -1
  8. package/dist/command/target-governance-discovery.js +2 -2
  9. package/dist/command/target-governance-discovery.js.map +1 -1
  10. package/dist/help/target-governance-guide.js +2 -2
  11. package/dist/help/target-governance-guide.js.map +1 -1
  12. package/dist/index.d.ts +1 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js.map +1 -1
  15. package/dist/schema/registry.d.ts +19 -2
  16. package/dist/schema/registry.d.ts.map +1 -1
  17. package/dist/schema/registry.js +194 -4
  18. package/dist/schema/registry.js.map +1 -1
  19. package/dist/version.d.ts +1 -1
  20. package/dist/version.js +1 -1
  21. package/package.json +1 -1
  22. package/schemas/Perttool.AgentGuidanceResult.v1.schema.json +461 -6
  23. package/schemas/Perttool.AnalysisResult.v4.schema.json +685 -19
  24. package/schemas/Perttool.CheckResult.v3.schema.json +46 -2
  25. package/schemas/Perttool.CliError.v1.schema.json +40 -4
  26. package/schemas/Perttool.CommandHelpResult.v1.schema.json +218 -6
  27. package/schemas/Perttool.Common.v1.schema.json +1460 -75
  28. package/schemas/Perttool.GuideResult.v1.schema.json +36 -2
  29. package/schemas/Perttool.MutationResult.v3.schema.json +57 -6
  30. package/schemas/Perttool.NextResult.v5.schema.json +1137 -12
  31. package/schemas/Perttool.OverrideDecision.v1.schema.json +236 -4
  32. package/schemas/Perttool.ProjectHistoryResult.v1.schema.json +204 -60
  33. package/schemas/Perttool.ProjectResult.v3.schema.json +74 -1
  34. package/schemas/Perttool.SchemaResult.v1.schema.json +56 -3
  35. package/schemas/Perttool.UnitMigrationResult.v3.schema.json +152 -14
  36. package/schemas/Perttool.VelocityObservationResult.v1.schema.json +201 -2
@@ -2,6 +2,1101 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://github.com/mako10k/perttool/schemas/Perttool.NextResult.v5.schema.json",
4
4
  "title": "Perttool.NextResult.v5",
5
+ "$defs": {
6
+ "tier": {
7
+ "enum": [
8
+ "recommended",
9
+ "allowed",
10
+ "deferred",
11
+ "discouraged"
12
+ ]
13
+ },
14
+ "effect": {
15
+ "enum": [
16
+ "supporting",
17
+ "opposing",
18
+ "blocking",
19
+ "neutral"
20
+ ]
21
+ },
22
+ "role": {
23
+ "enum": [
24
+ "decisive",
25
+ "contributing",
26
+ "context"
27
+ ]
28
+ },
29
+ "provenance": {
30
+ "type": "object",
31
+ "required": [
32
+ "kind",
33
+ "source_digest",
34
+ "entity_references",
35
+ "producer",
36
+ "source_span"
37
+ ],
38
+ "properties": {
39
+ "kind": {
40
+ "enum": [
41
+ "document",
42
+ "precedence_analysis",
43
+ "ranking_algorithm",
44
+ "resource_snapshot",
45
+ "recommendation_model"
46
+ ]
47
+ },
48
+ "source_digest": {
49
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/digest"
50
+ },
51
+ "entity_references": {
52
+ "type": "array",
53
+ "items": {
54
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationEntity"
55
+ }
56
+ },
57
+ "producer": {
58
+ "type": "object",
59
+ "required": [
60
+ "id",
61
+ "version"
62
+ ],
63
+ "properties": {
64
+ "id": {
65
+ "type": "string"
66
+ },
67
+ "version": {
68
+ "type": "string"
69
+ }
70
+ },
71
+ "additionalProperties": false
72
+ },
73
+ "source_span": {
74
+ "type": "null"
75
+ }
76
+ },
77
+ "additionalProperties": false
78
+ },
79
+ "fact": {
80
+ "type": "object",
81
+ "required": [
82
+ "id",
83
+ "kind",
84
+ "subject",
85
+ "value",
86
+ "unit",
87
+ "provenance"
88
+ ],
89
+ "properties": {
90
+ "id": {
91
+ "type": "string"
92
+ },
93
+ "kind": {
94
+ "type": "string"
95
+ },
96
+ "subject": {
97
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationEntity"
98
+ },
99
+ "value": {
100
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationValue"
101
+ },
102
+ "unit": {
103
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableRecommendationUnit"
104
+ },
105
+ "provenance": {
106
+ "$ref": "#/$defs/provenance"
107
+ }
108
+ },
109
+ "additionalProperties": false
110
+ },
111
+ "resultDecision": {
112
+ "type": "object",
113
+ "required": [
114
+ "id",
115
+ "action",
116
+ "recommended_task_ids",
117
+ "joint_feasibility_fact_id",
118
+ "step_ids",
119
+ "reason_occurrence_ids"
120
+ ],
121
+ "properties": {
122
+ "id": {
123
+ "type": "string"
124
+ },
125
+ "action": {
126
+ "const": "start"
127
+ },
128
+ "recommended_task_ids": {
129
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
130
+ },
131
+ "joint_feasibility_fact_id": {
132
+ "type": "string"
133
+ },
134
+ "step_ids": {
135
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
136
+ },
137
+ "reason_occurrence_ids": {
138
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
139
+ }
140
+ },
141
+ "additionalProperties": false
142
+ },
143
+ "taskDecision": {
144
+ "type": "object",
145
+ "required": [
146
+ "id",
147
+ "subject_task_id",
148
+ "action",
149
+ "classification",
150
+ "tier",
151
+ "recommended_set_member",
152
+ "step_ids",
153
+ "decisive_step_id",
154
+ "reason_occurrence_ids",
155
+ "comparison_ids",
156
+ "primary_higher_priority_task_id",
157
+ "summary_description_id",
158
+ "description_ids"
159
+ ],
160
+ "properties": {
161
+ "id": {
162
+ "type": "string"
163
+ },
164
+ "subject_task_id": {
165
+ "type": "string"
166
+ },
167
+ "action": {
168
+ "const": "start"
169
+ },
170
+ "classification": {
171
+ "const": "ready"
172
+ },
173
+ "tier": {
174
+ "$ref": "#/$defs/tier"
175
+ },
176
+ "recommended_set_member": {
177
+ "type": "boolean"
178
+ },
179
+ "step_ids": {
180
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
181
+ },
182
+ "decisive_step_id": {
183
+ "type": "string"
184
+ },
185
+ "reason_occurrence_ids": {
186
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
187
+ },
188
+ "comparison_ids": {
189
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
190
+ },
191
+ "primary_higher_priority_task_id": {
192
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
193
+ },
194
+ "summary_description_id": {
195
+ "type": "string"
196
+ },
197
+ "description_ids": {
198
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
199
+ }
200
+ },
201
+ "additionalProperties": false
202
+ },
203
+ "decisionStep": {
204
+ "type": "object",
205
+ "required": [
206
+ "id",
207
+ "phase",
208
+ "rule",
209
+ "input_fact_ids",
210
+ "expression",
211
+ "result",
212
+ "effect",
213
+ "role",
214
+ "reason_occurrence_ids",
215
+ "comparison_ids",
216
+ "depends_on_step_ids"
217
+ ],
218
+ "properties": {
219
+ "id": {
220
+ "type": "string"
221
+ },
222
+ "phase": {
223
+ "enum": [
224
+ "eligibility",
225
+ "negative_fact_filter",
226
+ "selection_horizon",
227
+ "candidate_ranking",
228
+ "resource_selection",
229
+ "set_membership",
230
+ "tier_classification"
231
+ ]
232
+ },
233
+ "rule": {
234
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationEntity"
235
+ },
236
+ "input_fact_ids": {
237
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
238
+ },
239
+ "expression": {
240
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationExpression"
241
+ },
242
+ "result": {
243
+ "type": "boolean"
244
+ },
245
+ "effect": {
246
+ "$ref": "#/$defs/effect"
247
+ },
248
+ "role": {
249
+ "$ref": "#/$defs/role"
250
+ },
251
+ "reason_occurrence_ids": {
252
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
253
+ },
254
+ "comparison_ids": {
255
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
256
+ },
257
+ "depends_on_step_ids": {
258
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
259
+ }
260
+ },
261
+ "additionalProperties": false
262
+ },
263
+ "comparison": {
264
+ "type": "object",
265
+ "required": [
266
+ "id",
267
+ "scope",
268
+ "subject_task_id",
269
+ "alternative_task_id",
270
+ "winner_task_id",
271
+ "loser_task_id",
272
+ "decisive_rule",
273
+ "decisive_expression",
274
+ "prior_tied_rule_ids",
275
+ "contributing_rule_ids",
276
+ "fact_ids"
277
+ ],
278
+ "properties": {
279
+ "id": {
280
+ "type": "string"
281
+ },
282
+ "scope": {
283
+ "enum": [
284
+ "ranking",
285
+ "selection_horizon",
286
+ "resource_selection",
287
+ "tier"
288
+ ]
289
+ },
290
+ "subject_task_id": {
291
+ "type": "string"
292
+ },
293
+ "alternative_task_id": {
294
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
295
+ },
296
+ "winner_task_id": {
297
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
298
+ },
299
+ "loser_task_id": {
300
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
301
+ },
302
+ "decisive_rule": {
303
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationEntity"
304
+ },
305
+ "decisive_expression": {
306
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationExpression"
307
+ },
308
+ "prior_tied_rule_ids": {
309
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
310
+ },
311
+ "contributing_rule_ids": {
312
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
313
+ },
314
+ "fact_ids": {
315
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
316
+ }
317
+ },
318
+ "additionalProperties": false
319
+ },
320
+ "reasonOccurrence": {
321
+ "type": "object",
322
+ "required": [
323
+ "id",
324
+ "code",
325
+ "subject",
326
+ "effect",
327
+ "role",
328
+ "fact_ids",
329
+ "emission_expression",
330
+ "decision_step_id",
331
+ "comparison_ids",
332
+ "description_id"
333
+ ],
334
+ "properties": {
335
+ "id": {
336
+ "type": "string"
337
+ },
338
+ "code": {
339
+ "enum": [
340
+ "task_ready",
341
+ "recommended_set_selected",
342
+ "recommended_set_not_selected",
343
+ "recommended_set_feasible",
344
+ "ranking_rule_supports_task",
345
+ "ranking_rule_opposes_task",
346
+ "ranking_rule_tied",
347
+ "recommended_set_addition_feasible",
348
+ "recommended_set_resource_conflict",
349
+ "policy_defers_start",
350
+ "modeled_negative_fact_applies"
351
+ ]
352
+ },
353
+ "subject": {
354
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationEntity"
355
+ },
356
+ "effect": {
357
+ "$ref": "#/$defs/effect"
358
+ },
359
+ "role": {
360
+ "$ref": "#/$defs/role"
361
+ },
362
+ "fact_ids": {
363
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
364
+ },
365
+ "emission_expression": {
366
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationExpression"
367
+ },
368
+ "decision_step_id": {
369
+ "type": "string"
370
+ },
371
+ "comparison_ids": {
372
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
373
+ },
374
+ "description_id": {
375
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
376
+ }
377
+ },
378
+ "additionalProperties": false
379
+ },
380
+ "description": {
381
+ "type": "object",
382
+ "required": [
383
+ "id",
384
+ "key",
385
+ "registry_version",
386
+ "parameters",
387
+ "source_reason_ids",
388
+ "source_comparison_ids",
389
+ "locale",
390
+ "text",
391
+ "render_status"
392
+ ],
393
+ "properties": {
394
+ "id": {
395
+ "type": "string"
396
+ },
397
+ "key": {
398
+ "type": "string"
399
+ },
400
+ "registry_version": {
401
+ "const": 1
402
+ },
403
+ "parameters": {
404
+ "type": "array",
405
+ "items": {
406
+ "type": "object",
407
+ "required": [
408
+ "name",
409
+ "value",
410
+ "unit"
411
+ ],
412
+ "properties": {
413
+ "name": {
414
+ "type": "string"
415
+ },
416
+ "value": {
417
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/recommendationValue"
418
+ },
419
+ "unit": {
420
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableRecommendationUnit"
421
+ }
422
+ },
423
+ "additionalProperties": false
424
+ }
425
+ },
426
+ "source_reason_ids": {
427
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
428
+ },
429
+ "source_comparison_ids": {
430
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
431
+ },
432
+ "locale": {
433
+ "const": "en"
434
+ },
435
+ "text": {
436
+ "type": "string"
437
+ },
438
+ "render_status": {
439
+ "const": "rendered"
440
+ }
441
+ },
442
+ "additionalProperties": false
443
+ },
444
+ "recommendation": {
445
+ "type": "object",
446
+ "required": [
447
+ "action",
448
+ "algorithm",
449
+ "reason_taxonomy_version",
450
+ "explanation_model_version",
451
+ "expression_version",
452
+ "description_registry_version",
453
+ "description_locale",
454
+ "recommended_task_ids",
455
+ "result_decision",
456
+ "task_decisions",
457
+ "decision_steps",
458
+ "facts",
459
+ "comparisons",
460
+ "reason_occurrences",
461
+ "descriptions",
462
+ "explanation_status"
463
+ ],
464
+ "properties": {
465
+ "action": {
466
+ "const": "start"
467
+ },
468
+ "algorithm": {
469
+ "type": "object",
470
+ "required": [
471
+ "id",
472
+ "version",
473
+ "optimal"
474
+ ],
475
+ "properties": {
476
+ "id": {
477
+ "const": "perttool.recommendation-ranking.lexicographic-frontier"
478
+ },
479
+ "version": {
480
+ "const": 1
481
+ },
482
+ "optimal": {
483
+ "const": false
484
+ }
485
+ },
486
+ "additionalProperties": false
487
+ },
488
+ "reason_taxonomy_version": {
489
+ "const": "1.0"
490
+ },
491
+ "explanation_model_version": {
492
+ "const": 1
493
+ },
494
+ "expression_version": {
495
+ "const": 1
496
+ },
497
+ "description_registry_version": {
498
+ "const": 1
499
+ },
500
+ "description_locale": {
501
+ "const": "en"
502
+ },
503
+ "recommended_task_ids": {
504
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
505
+ },
506
+ "result_decision": {
507
+ "$ref": "#/$defs/resultDecision"
508
+ },
509
+ "task_decisions": {
510
+ "type": "array",
511
+ "items": {
512
+ "$ref": "#/$defs/taskDecision"
513
+ }
514
+ },
515
+ "decision_steps": {
516
+ "type": "array",
517
+ "items": {
518
+ "$ref": "#/$defs/decisionStep"
519
+ }
520
+ },
521
+ "facts": {
522
+ "type": "array",
523
+ "items": {
524
+ "$ref": "#/$defs/fact"
525
+ }
526
+ },
527
+ "comparisons": {
528
+ "type": "array",
529
+ "items": {
530
+ "$ref": "#/$defs/comparison"
531
+ }
532
+ },
533
+ "reason_occurrences": {
534
+ "type": "array",
535
+ "items": {
536
+ "$ref": "#/$defs/reasonOccurrence"
537
+ }
538
+ },
539
+ "descriptions": {
540
+ "type": "array",
541
+ "items": {
542
+ "$ref": "#/$defs/description"
543
+ }
544
+ },
545
+ "explanation_status": {
546
+ "type": "object",
547
+ "required": [
548
+ "level",
549
+ "complete",
550
+ "decisive_chain_complete",
551
+ "truncated",
552
+ "omitted_counts"
553
+ ],
554
+ "properties": {
555
+ "level": {
556
+ "const": "full"
557
+ },
558
+ "complete": {
559
+ "const": true
560
+ },
561
+ "decisive_chain_complete": {
562
+ "const": true
563
+ },
564
+ "truncated": {
565
+ "const": false
566
+ },
567
+ "omitted_counts": {
568
+ "type": "object",
569
+ "required": [
570
+ "decision_steps",
571
+ "facts",
572
+ "comparisons",
573
+ "reason_occurrences",
574
+ "descriptions"
575
+ ],
576
+ "properties": {
577
+ "decision_steps": {
578
+ "const": 0
579
+ },
580
+ "facts": {
581
+ "const": 0
582
+ },
583
+ "comparisons": {
584
+ "const": 0
585
+ },
586
+ "reason_occurrences": {
587
+ "const": 0
588
+ },
589
+ "descriptions": {
590
+ "const": 0
591
+ }
592
+ },
593
+ "additionalProperties": false
594
+ }
595
+ },
596
+ "additionalProperties": false
597
+ }
598
+ },
599
+ "additionalProperties": false
600
+ },
601
+ "explanation": {
602
+ "type": "object",
603
+ "required": [
604
+ "milestone_id",
605
+ "reached",
606
+ "unsatisfied_edges",
607
+ "children",
608
+ "truncated"
609
+ ],
610
+ "properties": {
611
+ "milestone_id": {
612
+ "type": "string"
613
+ },
614
+ "reached": {
615
+ "type": "boolean"
616
+ },
617
+ "unsatisfied_edges": {
618
+ "type": "array",
619
+ "items": {
620
+ "type": "object",
621
+ "required": [
622
+ "edge_id",
623
+ "kind",
624
+ "status",
625
+ "source_milestone_id",
626
+ "source_reached"
627
+ ],
628
+ "properties": {
629
+ "edge_id": {
630
+ "type": "string"
631
+ },
632
+ "kind": {
633
+ "enum": [
634
+ "task",
635
+ "gate"
636
+ ]
637
+ },
638
+ "status": {
639
+ "type": [
640
+ "string",
641
+ "null"
642
+ ],
643
+ "enum": [
644
+ "planned",
645
+ "active",
646
+ "blocked",
647
+ "suspended",
648
+ "done",
649
+ null
650
+ ]
651
+ },
652
+ "source_milestone_id": {
653
+ "type": "string"
654
+ },
655
+ "source_reached": {
656
+ "type": "boolean"
657
+ }
658
+ },
659
+ "additionalProperties": false
660
+ }
661
+ },
662
+ "children": {
663
+ "type": "array",
664
+ "items": {
665
+ "$ref": "#/$defs/explanation"
666
+ }
667
+ },
668
+ "truncated": {
669
+ "type": "boolean"
670
+ }
671
+ },
672
+ "additionalProperties": false
673
+ },
674
+ "task": {
675
+ "type": "object",
676
+ "required": [
677
+ "id",
678
+ "title",
679
+ "status",
680
+ "classification",
681
+ "runnable_now",
682
+ "priority",
683
+ "owner",
684
+ "blocked_reason",
685
+ "expected",
686
+ "total_float",
687
+ "earliest_start",
688
+ "forecast_expected",
689
+ "forecast_total_float",
690
+ "forecast_earliest_start",
691
+ "precedence_critical",
692
+ "schedule_critical",
693
+ "requirements",
694
+ "resource_rejections",
695
+ "explanation"
696
+ ],
697
+ "properties": {
698
+ "id": {
699
+ "type": "string"
700
+ },
701
+ "title": {
702
+ "type": "string"
703
+ },
704
+ "status": {
705
+ "enum": [
706
+ "planned",
707
+ "active",
708
+ "blocked",
709
+ "suspended",
710
+ "done"
711
+ ]
712
+ },
713
+ "classification": {
714
+ "enum": [
715
+ "active",
716
+ "ready",
717
+ "blocked_now",
718
+ "upcoming",
719
+ "suspended"
720
+ ]
721
+ },
722
+ "runnable_now": {
723
+ "type": "boolean"
724
+ },
725
+ "priority": {
726
+ "type": "integer"
727
+ },
728
+ "owner": {
729
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
730
+ },
731
+ "blocked_reason": {
732
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableString"
733
+ },
734
+ "expected": {
735
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/displayedRational"
736
+ },
737
+ "total_float": {
738
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/displayedRational"
739
+ },
740
+ "earliest_start": {
741
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/displayedRational"
742
+ },
743
+ "forecast_expected": {
744
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDisplayedRational"
745
+ },
746
+ "forecast_total_float": {
747
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDisplayedRational"
748
+ },
749
+ "forecast_earliest_start": {
750
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableDisplayedRational"
751
+ },
752
+ "precedence_critical": {
753
+ "type": "boolean"
754
+ },
755
+ "schedule_critical": {
756
+ "type": "boolean"
757
+ },
758
+ "requirements": {
759
+ "type": "array",
760
+ "items": {
761
+ "type": "object",
762
+ "required": [
763
+ "resource_id",
764
+ "units"
765
+ ],
766
+ "properties": {
767
+ "resource_id": {
768
+ "type": "string"
769
+ },
770
+ "units": {
771
+ "type": "integer",
772
+ "minimum": 1
773
+ }
774
+ },
775
+ "additionalProperties": false
776
+ }
777
+ },
778
+ "resource_rejections": {
779
+ "type": "array",
780
+ "items": {
781
+ "type": "object",
782
+ "required": [
783
+ "resource_id",
784
+ "capacity",
785
+ "active_usage",
786
+ "earlier_selected_usage",
787
+ "used_before_decision",
788
+ "required",
789
+ "available",
790
+ "deficit",
791
+ "active_task_ids",
792
+ "earlier_selected_task_ids"
793
+ ],
794
+ "properties": {
795
+ "resource_id": {
796
+ "type": "string"
797
+ },
798
+ "capacity": {
799
+ "type": "integer",
800
+ "minimum": 1
801
+ },
802
+ "active_usage": {
803
+ "type": "integer",
804
+ "minimum": 0
805
+ },
806
+ "earlier_selected_usage": {
807
+ "type": "integer",
808
+ "minimum": 0
809
+ },
810
+ "used_before_decision": {
811
+ "type": "integer",
812
+ "minimum": 0
813
+ },
814
+ "required": {
815
+ "type": "integer",
816
+ "minimum": 1
817
+ },
818
+ "available": {
819
+ "type": "integer",
820
+ "minimum": 0
821
+ },
822
+ "deficit": {
823
+ "type": "integer",
824
+ "minimum": 0
825
+ },
826
+ "active_task_ids": {
827
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
828
+ },
829
+ "earlier_selected_task_ids": {
830
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
831
+ }
832
+ },
833
+ "additionalProperties": false
834
+ }
835
+ },
836
+ "explanation": {
837
+ "type": "array",
838
+ "items": {
839
+ "$ref": "#/$defs/explanation"
840
+ }
841
+ }
842
+ },
843
+ "additionalProperties": false
844
+ },
845
+ "timeEligibility": {
846
+ "type": "object",
847
+ "required": [
848
+ "state",
849
+ "release_bound",
850
+ "explanation",
851
+ "facts",
852
+ "unavailable_causes"
853
+ ],
854
+ "properties": {
855
+ "state": {
856
+ "enum": [
857
+ "eligible",
858
+ "not_yet_eligible",
859
+ "not_applicable",
860
+ "unavailable"
861
+ ]
862
+ },
863
+ "release_bound": {
864
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalExact"
865
+ },
866
+ "explanation": {
867
+ "type": "object",
868
+ "required": [
869
+ "code",
870
+ "fact_ids"
871
+ ],
872
+ "properties": {
873
+ "code": {
874
+ "enum": [
875
+ "no_not_before",
876
+ "not_before_reached",
877
+ "not_before_future",
878
+ "task_already_started",
879
+ "temporal_eligibility_unavailable"
880
+ ]
881
+ },
882
+ "fact_ids": {
883
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
884
+ }
885
+ },
886
+ "additionalProperties": false
887
+ },
888
+ "facts": {
889
+ "type": "array",
890
+ "items": {
891
+ "type": "object",
892
+ "required": [
893
+ "id",
894
+ "kind",
895
+ "value",
896
+ "entity_refs"
897
+ ],
898
+ "properties": {
899
+ "id": {
900
+ "type": "string"
901
+ },
902
+ "kind": {
903
+ "const": "temporal_release_bound"
904
+ },
905
+ "value": {
906
+ "type": "object",
907
+ "required": [
908
+ "state",
909
+ "release_bound"
910
+ ],
911
+ "properties": {
912
+ "state": {
913
+ "enum": [
914
+ "eligible",
915
+ "not_yet_eligible",
916
+ "not_applicable",
917
+ "unavailable"
918
+ ]
919
+ },
920
+ "release_bound": {
921
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalExact"
922
+ }
923
+ },
924
+ "additionalProperties": false
925
+ },
926
+ "entity_refs": {
927
+ "type": "array",
928
+ "items": {
929
+ "type": "object",
930
+ "required": [
931
+ "kind",
932
+ "id"
933
+ ],
934
+ "properties": {
935
+ "kind": {
936
+ "const": "task"
937
+ },
938
+ "id": {
939
+ "type": "string"
940
+ }
941
+ },
942
+ "additionalProperties": false
943
+ }
944
+ }
945
+ },
946
+ "additionalProperties": false
947
+ }
948
+ },
949
+ "unavailable_causes": {
950
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/temporalCauses"
951
+ }
952
+ },
953
+ "additionalProperties": false
954
+ },
955
+ "nextTemporalTask": {
956
+ "type": "object",
957
+ "required": [
958
+ "task_id",
959
+ "declared_not_before",
960
+ "time_eligibility",
961
+ "task_deadline",
962
+ "destination_milestone_id",
963
+ "destination_deadline",
964
+ "precedence_start",
965
+ "precedence_finish",
966
+ "resource_start",
967
+ "resource_finish",
968
+ "task_deadline_evaluation",
969
+ "destination_deadline_evaluation"
970
+ ],
971
+ "properties": {
972
+ "task_id": {
973
+ "type": "string"
974
+ },
975
+ "declared_not_before": {
976
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableCalendarValue"
977
+ },
978
+ "time_eligibility": {
979
+ "$ref": "#/$defs/timeEligibility"
980
+ },
981
+ "task_deadline": {
982
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableCalendarValue"
983
+ },
984
+ "destination_milestone_id": {
985
+ "type": "string"
986
+ },
987
+ "destination_deadline": {
988
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableCalendarValue"
989
+ },
990
+ "precedence_start": {
991
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalPoint"
992
+ },
993
+ "precedence_finish": {
994
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalPoint"
995
+ },
996
+ "resource_start": {
997
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalPoint"
998
+ },
999
+ "resource_finish": {
1000
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableTemporalPoint"
1001
+ },
1002
+ "task_deadline_evaluation": {
1003
+ "oneOf": [
1004
+ {
1005
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/deadlineEvaluation"
1006
+ },
1007
+ {
1008
+ "type": "null"
1009
+ }
1010
+ ]
1011
+ },
1012
+ "destination_deadline_evaluation": {
1013
+ "oneOf": [
1014
+ {
1015
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/deadlineEvaluation"
1016
+ },
1017
+ {
1018
+ "type": "null"
1019
+ }
1020
+ ]
1021
+ }
1022
+ },
1023
+ "additionalProperties": false
1024
+ },
1025
+ "nextTemporal": {
1026
+ "type": "object",
1027
+ "required": [
1028
+ "authority",
1029
+ "tasks"
1030
+ ],
1031
+ "properties": {
1032
+ "authority": {
1033
+ "type": "object",
1034
+ "required": [
1035
+ "policy",
1036
+ "recommendation_algorithm",
1037
+ "deadline_facts_used_for_ranking",
1038
+ "time_eligible_task_ids",
1039
+ "time_ineligible_task_ids",
1040
+ "time_eligibility_unavailable_task_ids",
1041
+ "startable_recommended_task_ids",
1042
+ "delayed_recommended_task_ids",
1043
+ "unavailable_recommended_task_ids"
1044
+ ],
1045
+ "properties": {
1046
+ "policy": {
1047
+ "const": "recommendation_v1_plus_release_gate"
1048
+ },
1049
+ "recommendation_algorithm": {
1050
+ "type": "object",
1051
+ "required": [
1052
+ "id",
1053
+ "version"
1054
+ ],
1055
+ "properties": {
1056
+ "id": {
1057
+ "type": "string"
1058
+ },
1059
+ "version": {
1060
+ "type": "integer",
1061
+ "minimum": 1
1062
+ }
1063
+ },
1064
+ "additionalProperties": false
1065
+ },
1066
+ "deadline_facts_used_for_ranking": {
1067
+ "const": false
1068
+ },
1069
+ "time_eligible_task_ids": {
1070
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1071
+ },
1072
+ "time_ineligible_task_ids": {
1073
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1074
+ },
1075
+ "time_eligibility_unavailable_task_ids": {
1076
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1077
+ },
1078
+ "startable_recommended_task_ids": {
1079
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1080
+ },
1081
+ "delayed_recommended_task_ids": {
1082
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1083
+ },
1084
+ "unavailable_recommended_task_ids": {
1085
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/stringArray"
1086
+ }
1087
+ },
1088
+ "additionalProperties": false
1089
+ },
1090
+ "tasks": {
1091
+ "type": "array",
1092
+ "items": {
1093
+ "$ref": "#/$defs/nextTemporalTask"
1094
+ }
1095
+ }
1096
+ },
1097
+ "additionalProperties": false
1098
+ }
1099
+ },
5
1100
  "type": "object",
6
1101
  "required": [
7
1102
  "schema_version",
@@ -73,22 +1168,48 @@
73
1168
  ]
74
1169
  },
75
1170
  "velocity": {
76
- "type": [
77
- "object",
78
- "null"
79
- ]
1171
+ "$ref": "Perttool.Common.v1.schema.json#/$defs/nullableVelocity"
80
1172
  },
81
1173
  "velocity_forecast": {
82
- "type": [
83
- "object",
84
- "null"
1174
+ "oneOf": [
1175
+ {
1176
+ "type": "object",
1177
+ "required": [
1178
+ "qualifier",
1179
+ "source_unit",
1180
+ "target_unit"
1181
+ ],
1182
+ "properties": {
1183
+ "qualifier": {
1184
+ "const": "velocity_forecast"
1185
+ },
1186
+ "source_unit": {
1187
+ "enum": [
1188
+ "day",
1189
+ "hour",
1190
+ "point"
1191
+ ]
1192
+ },
1193
+ "target_unit": {
1194
+ "enum": [
1195
+ "day",
1196
+ "hour",
1197
+ "point"
1198
+ ]
1199
+ }
1200
+ },
1201
+ "additionalProperties": false
1202
+ },
1203
+ {
1204
+ "type": "null"
1205
+ }
85
1206
  ]
86
1207
  },
87
1208
  "capacity_overrides": {
88
1209
  "$ref": "Perttool.Common.v1.schema.json#/$defs/capacityOverrides"
89
1210
  },
90
1211
  "recommendation": {
91
- "type": "object"
1212
+ "$ref": "#/$defs/recommendation"
92
1213
  },
93
1214
  "groups": {
94
1215
  "type": "object",
@@ -125,13 +1246,17 @@
125
1246
  "tasks": {
126
1247
  "type": "array",
127
1248
  "items": {
128
- "type": "object"
1249
+ "$ref": "#/$defs/task"
129
1250
  }
130
1251
  },
131
1252
  "temporal": {
132
- "type": [
133
- "object",
134
- "null"
1253
+ "oneOf": [
1254
+ {
1255
+ "$ref": "#/$defs/nextTemporal"
1256
+ },
1257
+ {
1258
+ "type": "null"
1259
+ }
135
1260
  ]
136
1261
  }
137
1262
  },