@tokenroll/llmdoc 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,908 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://llmdoc.dev/schemas/output.schema.json",
4
+ "$defs": {
5
+ "kind": {
6
+ "type": "string",
7
+ "enum": [
8
+ "architecture",
9
+ "guide",
10
+ "reference"
11
+ ]
12
+ },
13
+ "path": {
14
+ "type": "string",
15
+ "minLength": 1
16
+ },
17
+ "pagination": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": [
21
+ "totalItems",
22
+ "returnedItems",
23
+ "totalEstimatedTokens",
24
+ "returnedEstimatedTokens",
25
+ "nextCursor"
26
+ ],
27
+ "properties": {
28
+ "totalItems": {
29
+ "type": "integer",
30
+ "minimum": 0
31
+ },
32
+ "returnedItems": {
33
+ "type": "integer",
34
+ "minimum": 0
35
+ },
36
+ "totalEstimatedTokens": {
37
+ "type": "integer",
38
+ "minimum": 0
39
+ },
40
+ "returnedEstimatedTokens": {
41
+ "type": "integer",
42
+ "minimum": 0
43
+ },
44
+ "nextCursor": {
45
+ "type": [
46
+ "string",
47
+ "null"
48
+ ]
49
+ }
50
+ }
51
+ },
52
+ "docRef": {
53
+ "type": "object",
54
+ "additionalProperties": false,
55
+ "required": [
56
+ "path",
57
+ "kind",
58
+ "description"
59
+ ],
60
+ "properties": {
61
+ "path": {
62
+ "$ref": "#/$defs/path"
63
+ },
64
+ "kind": {
65
+ "$ref": "#/$defs/kind"
66
+ },
67
+ "description": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ }
71
+ }
72
+ },
73
+ "issue": {
74
+ "type": "object",
75
+ "additionalProperties": false,
76
+ "required": [
77
+ "severity",
78
+ "code",
79
+ "message"
80
+ ],
81
+ "properties": {
82
+ "severity": {
83
+ "type": "string",
84
+ "enum": [
85
+ "error",
86
+ "warning"
87
+ ]
88
+ },
89
+ "code": {
90
+ "type": "string",
91
+ "minLength": 1
92
+ },
93
+ "message": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "path": {
98
+ "type": "string",
99
+ "minLength": 1
100
+ }
101
+ }
102
+ },
103
+ "growth": {
104
+ "type": "object",
105
+ "additionalProperties": false,
106
+ "required": [
107
+ "currentDocumentCount",
108
+ "currentTotalEstimatedTokens",
109
+ "baselineDocumentCount",
110
+ "baselineTotalEstimatedTokens",
111
+ "documentDelta",
112
+ "tokenDelta",
113
+ "exceedsGate"
114
+ ],
115
+ "properties": {
116
+ "currentDocumentCount": {
117
+ "type": "integer",
118
+ "minimum": 0
119
+ },
120
+ "currentTotalEstimatedTokens": {
121
+ "type": "integer",
122
+ "minimum": 0
123
+ },
124
+ "baselineDocumentCount": {
125
+ "type": [
126
+ "integer",
127
+ "null"
128
+ ],
129
+ "minimum": 0
130
+ },
131
+ "baselineTotalEstimatedTokens": {
132
+ "type": [
133
+ "integer",
134
+ "null"
135
+ ],
136
+ "minimum": 0
137
+ },
138
+ "documentDelta": {
139
+ "type": [
140
+ "integer",
141
+ "null"
142
+ ]
143
+ },
144
+ "tokenDelta": {
145
+ "type": [
146
+ "integer",
147
+ "null"
148
+ ]
149
+ },
150
+ "exceedsGate": {
151
+ "type": "boolean"
152
+ }
153
+ }
154
+ },
155
+ "treeTopics": {
156
+ "type": "object",
157
+ "additionalProperties": false,
158
+ "required": [
159
+ "root",
160
+ "rootSingletons",
161
+ "topics",
162
+ "pagination"
163
+ ],
164
+ "properties": {
165
+ "root": {
166
+ "type": "string",
167
+ "const": "llmdoc"
168
+ },
169
+ "rootSingletons": {
170
+ "type": "array",
171
+ "items": {
172
+ "$ref": "#/$defs/docRef"
173
+ }
174
+ },
175
+ "topics": {
176
+ "type": "array",
177
+ "items": {
178
+ "type": "object",
179
+ "additionalProperties": false,
180
+ "required": [
181
+ "topic",
182
+ "summary",
183
+ "documentCount",
184
+ "estimatedTokens"
185
+ ],
186
+ "properties": {
187
+ "topic": {
188
+ "type": "string",
189
+ "minLength": 1
190
+ },
191
+ "documentCount": {
192
+ "type": "integer",
193
+ "minimum": 0
194
+ },
195
+ "summary": {
196
+ "type": "string"
197
+ },
198
+ "estimatedTokens": {
199
+ "type": "integer",
200
+ "minimum": 0
201
+ }
202
+ }
203
+ }
204
+ },
205
+ "pagination": {
206
+ "$ref": "#/$defs/pagination"
207
+ }
208
+ }
209
+ },
210
+ "treeDocs": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "root",
215
+ "documents",
216
+ "pagination"
217
+ ],
218
+ "properties": {
219
+ "root": {
220
+ "type": "string",
221
+ "const": "llmdoc"
222
+ },
223
+ "documents": {
224
+ "type": "array",
225
+ "items": {
226
+ "type": "object",
227
+ "additionalProperties": false,
228
+ "required": [
229
+ "path",
230
+ "kind",
231
+ "description",
232
+ "topic"
233
+ ],
234
+ "properties": {
235
+ "path": {
236
+ "$ref": "#/$defs/path"
237
+ },
238
+ "kind": {
239
+ "$ref": "#/$defs/kind"
240
+ },
241
+ "description": {
242
+ "type": "string",
243
+ "minLength": 1
244
+ },
245
+ "topic": {
246
+ "type": [
247
+ "string",
248
+ "null"
249
+ ]
250
+ }
251
+ }
252
+ }
253
+ },
254
+ "pagination": {
255
+ "$ref": "#/$defs/pagination"
256
+ }
257
+ }
258
+ },
259
+ "index": {
260
+ "type": "object",
261
+ "additionalProperties": false,
262
+ "required": [
263
+ "documents",
264
+ "pagination"
265
+ ],
266
+ "properties": {
267
+ "documents": {
268
+ "type": "array",
269
+ "items": {
270
+ "type": "object",
271
+ "additionalProperties": false,
272
+ "required": [
273
+ "path",
274
+ "kind",
275
+ "description",
276
+ "relations",
277
+ "code"
278
+ ],
279
+ "properties": {
280
+ "path": {
281
+ "$ref": "#/$defs/path"
282
+ },
283
+ "kind": {
284
+ "$ref": "#/$defs/kind"
285
+ },
286
+ "description": {
287
+ "type": "string",
288
+ "minLength": 1
289
+ },
290
+ "relations": {
291
+ "type": "object",
292
+ "additionalProperties": false,
293
+ "properties": {
294
+ "requires": {
295
+ "type": "array",
296
+ "items": {
297
+ "type": "string",
298
+ "minLength": 1
299
+ }
300
+ },
301
+ "related": {
302
+ "type": "array",
303
+ "items": {
304
+ "type": "string",
305
+ "minLength": 1
306
+ }
307
+ }
308
+ }
309
+ },
310
+ "code": {
311
+ "type": "object",
312
+ "additionalProperties": false,
313
+ "properties": {
314
+ "paths": {
315
+ "type": "array",
316
+ "items": {
317
+ "type": "string",
318
+ "minLength": 1
319
+ }
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ },
326
+ "pagination": {
327
+ "$ref": "#/$defs/pagination"
328
+ }
329
+ }
330
+ },
331
+ "show": {
332
+ "type": "object",
333
+ "additionalProperties": false,
334
+ "required": [
335
+ "documents",
336
+ "pagination"
337
+ ],
338
+ "properties": {
339
+ "documents": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "required": [
345
+ "path",
346
+ "kind",
347
+ "description",
348
+ "body"
349
+ ],
350
+ "properties": {
351
+ "path": {
352
+ "$ref": "#/$defs/path"
353
+ },
354
+ "kind": {
355
+ "$ref": "#/$defs/kind"
356
+ },
357
+ "description": {
358
+ "type": "string",
359
+ "minLength": 1
360
+ },
361
+ "body": {
362
+ "type": "string"
363
+ }
364
+ }
365
+ }
366
+ },
367
+ "pagination": {
368
+ "$ref": "#/$defs/pagination"
369
+ }
370
+ }
371
+ },
372
+ "search": {
373
+ "type": "object",
374
+ "additionalProperties": false,
375
+ "required": [
376
+ "query",
377
+ "results",
378
+ "pagination"
379
+ ],
380
+ "properties": {
381
+ "query": {
382
+ "type": "string",
383
+ "minLength": 1
384
+ },
385
+ "results": {
386
+ "type": "array",
387
+ "items": {
388
+ "type": "object",
389
+ "additionalProperties": false,
390
+ "required": [
391
+ "path",
392
+ "kind",
393
+ "description",
394
+ "snippet",
395
+ "score"
396
+ ],
397
+ "properties": {
398
+ "path": {
399
+ "$ref": "#/$defs/path"
400
+ },
401
+ "kind": {
402
+ "$ref": "#/$defs/kind"
403
+ },
404
+ "description": {
405
+ "type": "string",
406
+ "minLength": 1
407
+ },
408
+ "snippet": {
409
+ "type": "string"
410
+ },
411
+ "score": {
412
+ "type": "number"
413
+ }
414
+ }
415
+ }
416
+ },
417
+ "pagination": {
418
+ "$ref": "#/$defs/pagination"
419
+ }
420
+ }
421
+ },
422
+ "context": {
423
+ "type": "object",
424
+ "additionalProperties": false,
425
+ "required": [
426
+ "impacted",
427
+ "prerequisites",
428
+ "pagination"
429
+ ],
430
+ "properties": {
431
+ "impacted": {
432
+ "type": "array",
433
+ "items": {
434
+ "$ref": "#/$defs/docRef"
435
+ }
436
+ },
437
+ "prerequisites": {
438
+ "type": "array",
439
+ "items": {
440
+ "$ref": "#/$defs/docRef"
441
+ }
442
+ },
443
+ "pagination": {
444
+ "$ref": "#/$defs/pagination"
445
+ }
446
+ }
447
+ },
448
+ "validate": {
449
+ "type": "object",
450
+ "additionalProperties": false,
451
+ "required": [
452
+ "ok",
453
+ "errors",
454
+ "warnings"
455
+ ],
456
+ "properties": {
457
+ "ok": {
458
+ "type": "boolean"
459
+ },
460
+ "errors": {
461
+ "type": "array",
462
+ "items": {
463
+ "$ref": "#/$defs/issue"
464
+ }
465
+ },
466
+ "warnings": {
467
+ "type": "array",
468
+ "items": {
469
+ "$ref": "#/$defs/issue"
470
+ }
471
+ }
472
+ }
473
+ },
474
+ "status": {
475
+ "type": "object",
476
+ "additionalProperties": false,
477
+ "required": [
478
+ "baseline",
479
+ "head",
480
+ "commitsBehindHead",
481
+ "degradedReason",
482
+ "documents",
483
+ "unmapped",
484
+ "growth"
485
+ ],
486
+ "properties": {
487
+ "baseline": {
488
+ "type": [
489
+ "string",
490
+ "null"
491
+ ]
492
+ },
493
+ "head": {
494
+ "type": [
495
+ "string",
496
+ "null"
497
+ ]
498
+ },
499
+ "commitsBehindHead": {
500
+ "type": [
501
+ "integer",
502
+ "null"
503
+ ],
504
+ "minimum": 0
505
+ },
506
+ "degradedReason": {
507
+ "type": [
508
+ "string",
509
+ "null"
510
+ ]
511
+ },
512
+ "documents": {
513
+ "type": "object",
514
+ "additionalProperties": false,
515
+ "required": [
516
+ "total",
517
+ "impacted",
518
+ "needsReview",
519
+ "dirty"
520
+ ],
521
+ "properties": {
522
+ "total": {
523
+ "type": "integer",
524
+ "minimum": 0
525
+ },
526
+ "impacted": {
527
+ "type": "integer",
528
+ "minimum": 0
529
+ },
530
+ "needsReview": {
531
+ "type": "integer",
532
+ "minimum": 0
533
+ },
534
+ "dirty": {
535
+ "type": "integer",
536
+ "minimum": 0
537
+ }
538
+ }
539
+ },
540
+ "unmapped": {
541
+ "type": "object",
542
+ "additionalProperties": false,
543
+ "required": [
544
+ "committed",
545
+ "dirty"
546
+ ],
547
+ "properties": {
548
+ "committed": {
549
+ "type": "array",
550
+ "items": {
551
+ "type": "string",
552
+ "minLength": 1
553
+ }
554
+ },
555
+ "dirty": {
556
+ "type": "array",
557
+ "items": {
558
+ "type": "string",
559
+ "minLength": 1
560
+ }
561
+ }
562
+ }
563
+ },
564
+ "growth": {
565
+ "$ref": "#/$defs/growth"
566
+ }
567
+ }
568
+ },
569
+ "delta": {
570
+ "type": "object",
571
+ "additionalProperties": false,
572
+ "required": [
573
+ "suggestedMode",
574
+ "reasons",
575
+ "degradedReason",
576
+ "impacted",
577
+ "needsReview",
578
+ "unmapped",
579
+ "pagination"
580
+ ],
581
+ "properties": {
582
+ "suggestedMode": {
583
+ "type": "string",
584
+ "enum": [
585
+ "light",
586
+ "deep"
587
+ ]
588
+ },
589
+ "reasons": {
590
+ "type": "array",
591
+ "items": {
592
+ "type": "string",
593
+ "minLength": 1
594
+ }
595
+ },
596
+ "degradedReason": {
597
+ "type": [
598
+ "string",
599
+ "null"
600
+ ]
601
+ },
602
+ "impacted": {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "object",
606
+ "additionalProperties": false,
607
+ "required": [
608
+ "path",
609
+ "changedCommittedPaths",
610
+ "dirtyPaths"
611
+ ],
612
+ "properties": {
613
+ "path": {
614
+ "$ref": "#/$defs/path"
615
+ },
616
+ "changedCommittedPaths": {
617
+ "type": "array",
618
+ "items": {
619
+ "type": "string",
620
+ "minLength": 1
621
+ }
622
+ },
623
+ "dirtyPaths": {
624
+ "type": "array",
625
+ "items": {
626
+ "type": "string",
627
+ "minLength": 1
628
+ }
629
+ }
630
+ }
631
+ }
632
+ },
633
+ "needsReview": {
634
+ "type": "array",
635
+ "items": {
636
+ "type": "string",
637
+ "minLength": 1
638
+ }
639
+ },
640
+ "unmapped": {
641
+ "type": "object",
642
+ "additionalProperties": false,
643
+ "required": [
644
+ "committed",
645
+ "dirty"
646
+ ],
647
+ "properties": {
648
+ "committed": {
649
+ "type": "array",
650
+ "items": {
651
+ "type": "string",
652
+ "minLength": 1
653
+ }
654
+ },
655
+ "dirty": {
656
+ "type": "array",
657
+ "items": {
658
+ "type": "string",
659
+ "minLength": 1
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "pagination": {
665
+ "$ref": "#/$defs/pagination"
666
+ }
667
+ }
668
+ },
669
+ "fingerprint": {
670
+ "type": "object",
671
+ "additionalProperties": false,
672
+ "required": [
673
+ "status",
674
+ "updateAll",
675
+ "updated",
676
+ "baselineRevision"
677
+ ],
678
+ "properties": {
679
+ "status": {
680
+ "type": "string",
681
+ "const": "success"
682
+ },
683
+ "updateAll": {
684
+ "type": "boolean"
685
+ },
686
+ "updated": {
687
+ "type": "array",
688
+ "items": {
689
+ "type": "string",
690
+ "minLength": 1
691
+ }
692
+ },
693
+ "baselineRevision": {
694
+ "type": "string",
695
+ "minLength": 1
696
+ }
697
+ }
698
+ },
699
+ "prune": {
700
+ "type": "object",
701
+ "additionalProperties": false,
702
+ "required": [
703
+ "status",
704
+ "writable",
705
+ "growth",
706
+ "duplicateCandidates",
707
+ "mergeCandidates"
708
+ ],
709
+ "properties": {
710
+ "status": {
711
+ "type": "string",
712
+ "const": "dry_run"
713
+ },
714
+ "writable": {
715
+ "type": "boolean",
716
+ "const": false
717
+ },
718
+ "growth": {
719
+ "$ref": "#/$defs/growth"
720
+ },
721
+ "duplicateCandidates": {
722
+ "type": "array",
723
+ "items": {
724
+ "type": "object",
725
+ "additionalProperties": false,
726
+ "required": [
727
+ "paths",
728
+ "score",
729
+ "reasons"
730
+ ],
731
+ "properties": {
732
+ "paths": {
733
+ "type": "array",
734
+ "minItems": 2,
735
+ "maxItems": 2,
736
+ "items": {
737
+ "type": "string",
738
+ "minLength": 1
739
+ }
740
+ },
741
+ "score": {
742
+ "type": "number"
743
+ },
744
+ "reasons": {
745
+ "type": "array",
746
+ "items": {
747
+ "type": "string",
748
+ "minLength": 1
749
+ }
750
+ }
751
+ }
752
+ }
753
+ },
754
+ "mergeCandidates": {
755
+ "type": "array",
756
+ "items": {
757
+ "type": "object",
758
+ "additionalProperties": false,
759
+ "required": [
760
+ "topic",
761
+ "paths",
762
+ "totalEstimatedTokens",
763
+ "reasons"
764
+ ],
765
+ "properties": {
766
+ "topic": {
767
+ "type": "string",
768
+ "minLength": 1
769
+ },
770
+ "paths": {
771
+ "type": "array",
772
+ "items": {
773
+ "type": "string",
774
+ "minLength": 1
775
+ }
776
+ },
777
+ "totalEstimatedTokens": {
778
+ "type": "integer",
779
+ "minimum": 0
780
+ },
781
+ "reasons": {
782
+ "type": "array",
783
+ "items": {
784
+ "type": "string",
785
+ "minLength": 1
786
+ }
787
+ }
788
+ }
789
+ }
790
+ }
791
+ }
792
+ },
793
+ "upgrade": {
794
+ "type": "object",
795
+ "additionalProperties": false,
796
+ "required": [
797
+ "status",
798
+ "summary",
799
+ "legacyPaths",
800
+ "targetStructure",
801
+ "requiresRecorderSemanticMigration",
802
+ "notes"
803
+ ],
804
+ "properties": {
805
+ "status": {
806
+ "type": "string",
807
+ "enum": [
808
+ "no_change",
809
+ "dry_run"
810
+ ]
811
+ },
812
+ "summary": {
813
+ "type": "string",
814
+ "minLength": 1
815
+ },
816
+ "legacyPaths": {
817
+ "type": "array",
818
+ "items": {
819
+ "type": "string",
820
+ "minLength": 1
821
+ }
822
+ },
823
+ "targetStructure": {
824
+ "type": "array",
825
+ "items": {
826
+ "type": "string",
827
+ "minLength": 1
828
+ }
829
+ },
830
+ "requiresRecorderSemanticMigration": {
831
+ "type": "boolean"
832
+ },
833
+ "notes": {
834
+ "type": "array",
835
+ "items": {
836
+ "type": "string",
837
+ "minLength": 1
838
+ }
839
+ }
840
+ }
841
+ },
842
+ "new": {
843
+ "type": "object",
844
+ "additionalProperties": false,
845
+ "required": [
846
+ "created"
847
+ ],
848
+ "properties": {
849
+ "created": {
850
+ "type": "string",
851
+ "minLength": 1
852
+ }
853
+ }
854
+ },
855
+ "mv": {
856
+ "type": "object",
857
+ "additionalProperties": false,
858
+ "required": [
859
+ "moved",
860
+ "rewrittenDocuments"
861
+ ],
862
+ "properties": {
863
+ "moved": {
864
+ "type": "object",
865
+ "additionalProperties": false,
866
+ "required": [
867
+ "from",
868
+ "to"
869
+ ],
870
+ "properties": {
871
+ "from": {
872
+ "type": "string",
873
+ "minLength": 1
874
+ },
875
+ "to": {
876
+ "type": "string",
877
+ "minLength": 1
878
+ }
879
+ }
880
+ },
881
+ "rewrittenDocuments": {
882
+ "type": "array",
883
+ "items": {
884
+ "type": "string",
885
+ "minLength": 1
886
+ }
887
+ }
888
+ }
889
+ },
890
+ "hook": {
891
+ "type": "object",
892
+ "additionalProperties": false,
893
+ "required": [
894
+ "continue"
895
+ ],
896
+ "properties": {
897
+ "continue": {
898
+ "type": "boolean",
899
+ "const": true
900
+ },
901
+ "systemMessage": {
902
+ "type": "string",
903
+ "minLength": 1
904
+ }
905
+ }
906
+ }
907
+ }
908
+ }